diff --git a/README.md b/README.md index 8b6d3b5..f8441f9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,21 @@ A web app for displaying, organizing and storing information about servers (VPS) Despite what the name infers this self hosted web app isn't just for storing idling server information. By using a [YABs](https://github.com/masonr/yet-another-bench-script) output you can get disk & network speed values along with GeekBench 5 scores to do easier comparing and sorting. -[![Generic badge](https://img.shields.io/badge/version-1.0-blue.svg)](https://shields.io/) +[![Generic badge](https://img.shields.io/badge/version-1.1-blue.svg)](https://shields.io/) + +## 1.1 changes: +**If you have version 1.0 please run ```update.sql```** +* Added notes input for servers +* Added SSH port input for servers +* Added YABs update disk & network speed values (Keeps history) +* Added red button for closing modals +* Added `update.sql` for pre-existing installations only. +* Fixed page jumping horizontally when opening modals +* Fixed search showing duplicates when typing fast +* Fixed adding provider and locations return id +* Updated `my_idlers.sql` for changes +* Updated view YABs modal to be wider +* Updated config constants to new class at top of ```class.php``` ## Requires @@ -36,8 +50,11 @@ By using a [YABs](https://github.com/masonr/yet-another-bench-script) output you * Download [the zip](https://github.com/cp6/my-idlers/archive/main.zip) and unpack the files from ```my-idlers-main/``` into your directory of choice. * Run `my_idlers.sql` in MySQL. -* Edit ```class.php``` lines ```544-547``` for your MySQL details. -* Edit ```class.php``` lines ```539-541``` for card order type. + +* **Only run ```update.sql``` if you have version 1.0 installed.** + +* Edit ```class.php``` lines ```13-16``` for your MySQL details. +* Edit ```class.php``` lines ```8-10``` for card order type. ## Notes @@ -69,10 +86,10 @@ or [![Screenshot1](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data.jpg) -[![screenshot2](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-MORE.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-MORE.jpg) +[![screenshot2](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-MORE-1.1.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-MORE-1.1.jpg) -[![screenshot3](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-EDIT.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-EDIT.jpg) +[![screenshot3](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-EDIT-1.1.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-EDIT-1.1.jpg) [![screenshot4](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-order-table.png)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-order-table.png) diff --git a/assets/css/style.css b/assets/css/style.css index 35b837a..f0c188b 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -57,6 +57,10 @@ body { .container { max-width: 960px } + + .modal-lg { + max-width: 800px; + } } @media (min-width: 1200px) { @@ -889,10 +893,6 @@ button.close { -webkit-appearance: none } -.modal-open { - overflow: hidden -} - .modal-open .modal { overflow-x: hidden; overflow-y: auto @@ -1314,7 +1314,7 @@ button.close { border-color: #3a73cf } -.btn-main:active { +.btn-main:active, .btn-second:active, .btn-third:active { background-image: none } @@ -1330,8 +1330,16 @@ button.close { border-color: #2ea69a } -.btn-second:active { - background-image: none +.btn-third { + color: #f7f7f7; + background-color: #f06f6f; + border-color: #df4b4b; +} + +.btn-third:hover, .btn-third:focus, .btn-third:active { + color: #f7f7f7; + background-color: #d05555; + border-color: #a62e2e; } .view-yabs-btn { @@ -1532,7 +1540,7 @@ input:checked + .slider:before { } .form-control:disabled, .form-control[readonly] { - background-color: #202125 + background-color: #f0f0f0; } .search-result { diff --git a/assets/js/scripts.min.js b/assets/js/scripts.min.js index 531e6c7..774a714 100644 --- a/assets/js/scripts.min.js +++ b/assets/js/scripts.min.js @@ -299,6 +299,8 @@ function modalServerEdit(id) { $("#me_ram_type").val(result["ram_type"]); $("#me_swap_type").val(result["swap_type"]); $("#me_virt").val(result["virt"]); + $("#me_ssh_port").val(result["ssh_port"]); + $("#me_notes").val(result["notes"]); } }); } @@ -350,7 +352,7 @@ function modalEditDomain(id) { function yabsModalView(hostname, id) { if ($('#yabsTextBox').length) { - $('#yabsTextBox').remove(); + $('#yabsTextBox').remove(); } $.ajax({ type: "GET", @@ -363,7 +365,16 @@ function yabsModalView(hostname, id) { }); } -$('#searchInput').keyup(function() { +//https://stackoverflow.com/a/1909508 +function delay(fn, ms) { + let timer = 0 + return function(...args) { + clearTimeout(timer) + timer = setTimeout(fn.bind(this, ...args), ms || 0) + } +} + +$('#searchInput').keyup(delay(function (e) { var search_term = this.value; $('#searchDivBody').empty(); $.ajax({ @@ -374,4 +385,4 @@ $('#searchInput').keyup(function() { $('#searchDivBody').append(result); } }); -}); \ No newline at end of file +}, 500)); \ No newline at end of file diff --git a/calls.php b/calls.php index 3ccaa9c..0b71e8d 100644 --- a/calls.php +++ b/calls.php @@ -62,6 +62,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } elseif ($_POST['type'] == 'server_modal_edit') {//Update the server info $update->updateServerFromModal(); $update->updateServerPricingFromModal(); + if (!is_null($_POST['me_yabs']) && !empty($_POST['me_yabs'])){ + $update->updateYabsData(); + } } elseif ($_POST['type'] == 'shared_hosting_modal_edit') {//Update the shared hosting info $update->updateSharedHostingFromModal(); $update->updateSharedHostingPricingFromModal(); diff --git a/class.php b/class.php index 258fa6f..db5d040 100644 --- a/class.php +++ b/class.php @@ -1,6 +1,22 @@ tagClose('div', 3); $this->outputString('