diff --git a/README.md b/README.md index f8441f9..b8847d2 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,24 @@ 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.1-blue.svg)](https://shields.io/) +[![Generic badge](https://img.shields.io/badge/version-1.2-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 +## 1.2 changes: +**If you have version 1.1 or less already installed please run ```update.sql```** +* Added table view type (use switcher icon to change to this view) +* Added auto get IPv4/IPv6 based on hostname (Click icon at hostname input) +* Added up/down status (Click OS icon) +* Updated the order by table for better formatting +* Removed unused buttons from the CSS +* Updated Minor style changes +* Updated `update.sql` for pre-existing installations only. +* Updated when type DEDI selected "is_dedi" will be toggled +* Updated IPv4 no longer required field +* Fixed no location and/or provider causing uneven cards +* Updated delete labels +* Updated domain terms to be annual and longer only +* Fixed error when all speedtests are "busy" * 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 @@ -32,8 +35,11 @@ By using a [YABs](https://github.com/masonr/yet-another-bench-script) output you * Add domains * [Auto suggest locations](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-location.gif) * [Auto suggest providers](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-provider.gif) +* [Auto get IP's from hostname](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif) +* [Check up/down status](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif) * Get YABs data from output * Save & view YABs output +* Update YABs disk & network results * Next due date system * Multi currency compatibility * Multi payment-term compatibility @@ -51,7 +57,7 @@ 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. -* **Only run ```update.sql``` if you have version 1.0 installed.** +* **Only run ```update.sql``` if you have version 1.1 or less already installed.** * Edit ```class.php``` lines ```13-16``` for your MySQL details. * Edit ```class.php``` lines ```8-10``` for card order type. @@ -97,9 +103,20 @@ or [![screenshot5](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-tally-card.png)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-tally-card.png) +[![screenshot6](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-table-view.png)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-data-table-view.png) + [![Auto complete location](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-location.gif)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-location.gif) [![Auto complete provider](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-provider.gif)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-auto-provider.gif) + +[![Auto complete IP's](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif) + + +[![Get up/down status](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif) + + +[![Table scrolling x](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-table-view.gif)](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-table-view.gif) + diff --git a/assets/css/all.min.css b/assets/css/all.min.css index 18e53d6..084eda0 100644 --- a/assets/css/all.min.css +++ b/assets/css/all.min.css @@ -2,4 +2,4 @@ * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ -.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-centos:before{content:"\f789"}.fa-box:before{content:"\f466"}.fa-compact-disc:before{content:"\f51f"}.fa-fedora:before{content:"\f798"}.fa-hdd:before{content:"\f0a0"}.fa-linux:before{content:"\f17c"}.fa-memory:before{content:"\f538"}.fa-microchip:before{content:"\f2db"}.fa-ubuntu:before{content:"\f7df"}.fa-windows:before{content:"\f17a"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:'Font Awesome 5 Brands';font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url("../webfonts/fa-brands-400.svg#fontawesome") format("svg")}.fab{font-family:'Font Awesome 5 Brands';font-weight:400}@font-face{font-family:'Font Awesome 5 Free';font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url("../webfonts/fa-regular-400.svg#fontawesome") format("svg")}.far{font-family:'Font Awesome 5 Free';font-weight:400}@font-face{font-family:'Font Awesome 5 Free';font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url("../webfonts/fa-solid-900.svg#fontawesome") format("svg")}.fa,.fas{font-family:'Font Awesome 5 Free';font-weight:900;margin-right: 0.15rem;} \ No newline at end of file +.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-centos:before{content:"\f789"}.fa-box:before{content:"\f466"}.fa-compact-disc:before{content:"\f51f"}.fa-fedora:before{content:"\f798"}.fa-hdd:before{content:"\f0a0"}.fa-linux:before{content:"\f17c"}.fa-memory:before{content:"\f538"}.fa-microchip:before{content:"\f2db"}.fa-search:before{content:"\f002"}.fa-table:before{content:"\f0ce"}.fa-th:before{content:"\f00a"}.fa-ubuntu:before{content:"\f7df"}.fa-windows:before{content:"\f17a"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:'Font Awesome 5 Brands';font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url("../webfonts/fa-brands-400.svg#fontawesome") format("svg")}.fab{font-family:'Font Awesome 5 Brands';font-weight:400}@font-face{font-family:'Font Awesome 5 Free';font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url("../webfonts/fa-regular-400.svg#fontawesome") format("svg")}.far{font-family:'Font Awesome 5 Free';font-weight:400}@font-face{font-family:'Font Awesome 5 Free';font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url("../webfonts/fa-solid-900.svg#fontawesome") format("svg")}.fa,.fas{font-family:'Font Awesome 5 Free';font-weight:900;margin-right: 0.15rem;} \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index f0c188b..5e657ee 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -331,13 +331,13 @@ textarea { .table td, .table th { padding: .75rem; - vertical-align: top; border-top: 1px solid #dee2e6 } .table thead th { vertical-align: bottom; - border-bottom: 2px solid #dee2e6 + border-bottom: 2px solid #dee2e6; + font-weight: 600; } .table-sm td, .table-sm th { @@ -492,7 +492,7 @@ textarea.form-control { padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; - border-radius: .25rem; + border-radius: 0.2rem; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out } @@ -519,166 +519,6 @@ textarea.form-control { cursor: pointer } -.btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #0062cc; - border-color: #005cbf -} - -.btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5) -} - -.btn-secondary:not(:disabled):not(.disabled).active, .btn-secondary:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #545b62; - border-color: #4e555b -} - -.btn-secondary:not(:disabled):not(.disabled).active:focus, .btn-secondary:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .5) -} - -.btn-success:not(:disabled):not(.disabled).active, .btn-success:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #1e7e34; - border-color: #1c7430 -} - -.btn-success:not(:disabled):not(.disabled).active:focus, .btn-success:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5) -} - -.btn-info:not(:disabled):not(.disabled).active, .btn-info:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #117a8b; - border-color: #10707f -} - -.btn-info:not(:disabled):not(.disabled).active:focus, .btn-info:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .5) -} - -.btn-warning:not(:disabled):not(.disabled).active, .btn-warning:not(:disabled):not(.disabled):active { - color: #212529; - background-color: #d39e00; - border-color: #c69500 -} - -.btn-warning:not(:disabled):not(.disabled).active:focus, .btn-warning:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .5) -} - -.btn-danger:not(:disabled):not(.disabled).active, .btn-danger:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #bd2130; - border-color: #b21f2d -} - -.btn-danger:not(:disabled):not(.disabled).active:focus, .btn-danger:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5) -} - -.btn-light:not(:disabled):not(.disabled).active, .btn-light:not(:disabled):not(.disabled):active { - color: #212529; - background-color: #dae0e5; - border-color: #d3d9df -} - -.btn-light:not(:disabled):not(.disabled).active:focus, .btn-light:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(248, 249, 250, .5) -} - -.btn-dark:not(:disabled):not(.disabled).active, .btn-dark:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #1d2124; - border-color: #171a1d -} - -.btn-dark:not(:disabled):not(.disabled).active:focus, .btn-dark:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(52, 58, 64, .5) -} - -.btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #007bff; - border-color: #007bff -} - -.btn-outline-primary:not(:disabled):not(.disabled).active:focus, .btn-outline-primary:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5) -} - -.btn-outline-secondary:not(:disabled):not(.disabled).active, .btn-outline-secondary:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #6c757d; - border-color: #6c757d -} - -.btn-outline-secondary:not(:disabled):not(.disabled).active:focus, .btn-outline-secondary:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .5) -} - -.btn-outline-success:not(:disabled):not(.disabled).active, .btn-outline-success:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #28a745; - border-color: #28a745 -} - -.btn-outline-success:not(:disabled):not(.disabled).active:focus, .btn-outline-success:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(40, 167, 69, .5) -} - -.btn-outline-info:not(:disabled):not(.disabled).active, .btn-outline-info:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #17a2b8; - border-color: #17a2b8 -} - -.btn-outline-info:not(:disabled):not(.disabled).active:focus, .btn-outline-info:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(23, 162, 184, .5) -} - -.btn-outline-warning:not(:disabled):not(.disabled).active, .btn-outline-warning:not(:disabled):not(.disabled):active { - color: #212529; - background-color: #ffc107; - border-color: #ffc107 -} - -.btn-outline-warning:not(:disabled):not(.disabled).active:focus, .btn-outline-warning:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .5) -} - -.btn-outline-danger:not(:disabled):not(.disabled).active, .btn-outline-danger:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #dc3545; - border-color: #dc3545 -} - -.btn-outline-danger:not(:disabled):not(.disabled).active:focus, .btn-outline-danger:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .5) -} - -.btn-outline-light:not(:disabled):not(.disabled).active, .btn-outline-light:not(:disabled):not(.disabled):active { - color: #212529; - background-color: #f8f9fa; - border-color: #f8f9fa -} - -.btn-outline-light:not(:disabled):not(.disabled).active:focus, .btn-outline-light:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(248, 249, 250, .5) -} - -.btn-outline-dark:not(:disabled):not(.disabled).active, .btn-outline-dark:not(:disabled):not(.disabled):active { - color: #fff; - background-color: #343a40; - border-color: #343a40 -} - -.btn-outline-dark:not(:disabled):not(.disabled).active:focus, .btn-outline-dark:not(:disabled):not(.disabled):active:focus { - box-shadow: 0 0 0 .2rem rgba(52, 58, 64, .5) -} - .btn-block { display: block; width: 100% @@ -1110,6 +950,10 @@ button.close { visibility: hidden } +.no-loc, .no-prov { + visibility: hidden +} + .form-control:focus { color: #495057; background-color: #fff; @@ -1120,7 +964,8 @@ button.close { .value { display: inline; - margin-bottom: .4rem + margin-bottom: .4rem; + font-size: 0.91rem; } .price { @@ -1281,10 +1126,87 @@ button.close { color: #00000096 } +.fa-search { + color: #537cf7; +} + +.os-icon { + color: #6f6b6b; +} + +.green-fa { + color: #51bf51; +} + +.red-fa { + color: #bf5151; +} + +.fa-th, .fa-table { + color: #8787ff; + font-size: 1.2rem; +} + +.os-td { + text-align: center; + vertical-align: middle; +} + +.objects-table td, .objects-table th { + padding: 0.6rem 0.4rem; +} + +.objects-table tr { + transition: ease-in-out 0.4s; +} + +.objects-table tr:hover { + background: #f2f7fb; +} + +.td-text-sml { + font-size: 86%; +} + +.td-text-med { + font-size: 90%; +} + +.td-special-price { + background: #ffd70014; +} + +.td-due-soon { + background: #ff00000f; +} + +.td-not-due-soon { + background: #00ff340f; +} + +.objects-table th:first-child, .objects-table td:first-child { + position: sticky; + left: 0; + background-color: #f6f6f6; +} + +.table-btn { + font-size: 0.8rem; + padding: .01rem 0.6rem; +} + +.td-nowrap { + white-space: nowrap; +} + .tab-pane { margin-top: .8rem } +.mt-1 { + margin-top: 1rem; +} + .input-group-text { color: #2d3032; background-color: #dbe4ee; @@ -1305,7 +1227,7 @@ button.close { .btn-main { color: #f7f7f7; background-color: #5a95f5; - border-color: #3a73cf + border-color: #3a73cf6b } .btn-main:hover, .btn-main:focus, .btn-main:active { @@ -1321,25 +1243,25 @@ button.close { .btn-second { color: #f7f7f7; background-color: #30cfc0; - border-color: #2ea69a + border-color: #2ea69a75 } .btn-second:hover, .btn-second:focus, .btn-second:active { color: #f7f7f7; background-color: #26bdae; - border-color: #2ea69a + border-color: #2ea69a; } .btn-third { color: #f7f7f7; background-color: #f06f6f; - border-color: #df4b4b; + border-color: #df4b4b66; } .btn-third:hover, .btn-third:focus, .btn-third:active { color: #f7f7f7; - background-color: #d05555; - border-color: #a62e2e; + background-color: #e95656; + border-color: #a62e2e8f; } .view-yabs-btn { diff --git a/assets/js/scripts.min.js b/assets/js/scripts.min.js index 774a714..9d5d267 100644 --- a/assets/js/scripts.min.js +++ b/assets/js/scripts.min.js @@ -265,6 +265,93 @@ $(document).on("click", "#addDomainBTN", function () { $("#addSharedHosting").removeClass("show"); }); +$(document).on("click", "#fillIpv4", function () { + var host_name = $('#hostname').val(); + if (host_name) { + $.ajax({ + type: "GET", + url: "get_ip.php", + data: {"type" : "dns_search", "hostname": host_name, "type": "A"}, + success: function (result) { + $('#ipv4').val(result); + } + }); + //Now wait 3 seconds before checking AAAA + setTimeout(function(){ + $.ajax({ + type: "GET", + url: "get_ip.php", + data: {"type" : "dns_search", "hostname": host_name, "type": "AAAA"}, + success: function (result) { + if (result != ''){ + $('#ipv6').val(result); + } else { + $('#ipv6').val(''); + } + } + }); + }, 3000); + } +}); + +$(document).on("click", "#checkUpStatus", function () { + var host_name = $(this).attr('value'); + var icon = $(this).children().first(); + if (host_name) { + $.ajax({ + type: "GET", + url: "check_up.php", + data: {"type": "check_up", "host": host_name}, + success: function (result) { + if (result == 1) { + icon.addClass("green-fa"); + } else { + icon.addClass("red-fa"); + } + } + }); + } +}); + +$(document).on("click", "#viewSwitcherIcon", function () { + var icon = $(this).children().first(); + if ($("#serversTable").children().length == 0){ + $.ajax({ + type: "GET", + url: "calls.php", + data: {"type": "object_tables"}, + success: function (result) { + $("#tableViewDiv").append(result); + } + }); + icon.removeClass("fa-table"); + icon.addClass("fa-th"); + $("#cardsViewDiv" ).hide(); + $("#tableViewDiv" ).show(); + $('#viewSwitchIcon').prop('title', 'Switch to cards'); + } else { + if (icon.hasClass("fa-table")) { + icon.removeClass("fa-table"); + icon.addClass("fa-th"); + $( "#cardsViewDiv" ).hide(); + $( "#tableViewDiv" ).show(); + $('#viewSwitchIcon').prop('title', 'Switch to cards'); + } else if (icon.hasClass("fa-th")) { + icon.removeClass("fa-th"); + icon.addClass("fa-table"); + $( "#tableViewDiv" ).hide(); + $( "#cardsViewDiv" ).show(); + $('#viewSwitchIcon').prop('title', 'Switch to table'); + } + } +}); + +$('#virt').change(function(){ + if($(this).val() == 'DEDI'){ + $('#dedi_cpu').prop("checked", true); + } +}); + function modalServerEdit(id) { $.ajax({ type: "GET", diff --git a/calls.php b/calls.php index 0b71e8d..e3f0dbf 100644 --- a/calls.php +++ b/calls.php @@ -36,6 +36,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { } elseif ($_GET['value'] == 'domain') { $idle->viewMoreDomainModal($_GET['id']);//View more details modal } + } elseif ($_GET['type'] == 'dns_search') { + $idle->getIpForDomain($_GET['hostname'], $_GET['type']); + } elseif ($_GET['type'] == 'check_up') { + echo $idle->checkIsUp($_GET['host']); + } elseif ($_GET['type'] == 'object_tables') { + header('Content-Type: text/html; charset=utf-8'); + echo $idle->objectTables(); } } } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -62,7 +69,7 @@ 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'])){ + if (!is_null($_POST['me_yabs']) && !empty($_POST['me_yabs'])) { $update->updateYabsData(); } } elseif ($_POST['type'] == 'shared_hosting_modal_edit') {//Update the shared hosting info diff --git a/class.php b/class.php index db5d040..302fb62 100644 --- a/class.php +++ b/class.php @@ -14,6 +14,9 @@ class idlersConfig const DB_NAME = 'idlers'; const DB_USERNAME = 'root'; const DB_PASSWORD = ''; + + //Have slight background color for server table values: was special price and due soon + const COLOR_TABLE = true; } class elementHelpers extends idlersConfig @@ -153,10 +156,10 @@ class elementHelpers extends idlersConfig $this->tagClose("ul"); } - protected function tableHeader(array $headers) + protected function tableHeader(array $headers, string $class = 'table table-striped table-bordered table-sm', string $id = 'orderTable') { $this->tagOpen('div', 'table-responsive'); - $this->outputString("
' . $data['ns1'] . '');
+ $this->tableTd('td-nowrap', '' . $data['ns2'] . '');
+ $this->tableTd('td-nowrap', $data['price'] . ' ' . $data['currency'] . ' ' . $this->paymentTerm($data['term']) . '');
+ $this->tableTd('td-nowrap td-text-med', '' . $data['provider'] . '');
+ $this->tableTd('td-nowrap td-text-sml ' . $ds_class . '', '' . $this->processDueDate($data['id'], $data['term'], $data['next_dd']) . ' days');
+ $this->tableTd('td-nowrap', $data['dt']);
+ $this->tagClose('tr');
+ }
+
+ protected function sharedHostingTableRow(string $id)
+ {
+ $select = $this->dbConnect()->prepare("
+ SELECT shared_hosting.id,shared_hosting.domain,shared_hosting.type,shared_hosting.was_special,shared_hosting.disk,shared_hosting.disk_type,shared_hosting.bandwidth,shared_hosting.domains_limit,shared_hosting.emails,
+ shared_hosting.ftp,shared_hosting.db,DATE_FORMAT(`owned_since`, '%d %b %Y') as dt,locations.name as location,providers.name as provider,pricing.price,pricing.currency,pricing.term,pricing.next_dd
+ FROM shared_hosting INNER JOIN locations on shared_hosting.location = locations.id INNER JOIN providers on shared_hosting.provider = providers.id
+ INNER JOIN pricing on shared_hosting.id = pricing.server_id WHERE shared_hosting.id = ? LIMIT 1;");
+ $select->execute([$id]);
+ $data = $select->fetchAll(PDO::FETCH_ASSOC)[0];
+ if (self::COLOR_TABLE) {
+ ($data['was_special'] == 1) ? $special_class = 'td-special-price' : $special_class = '';
+ if ($this->processDueDate($data['id'], $data['term'], $data['next_dd']) < 7) {
+ $ds_class = 'td-due-soon';
+ } elseif ($this->processDueDate($data['id'], $data['term'], $data['next_dd']) > 300) {
+ $ds_class = 'td-not-due-soon';
+ } else {
+ $ds_class = '';
+ }
+ } else {
+ $special_class = $ds_class = '';
+ }
+ $this->tagOpen('tr');
+ $this->tableTd('td-nowrap', $data['domain']);
+ $this->tableTd('', 'More');
+ $this->tableTd('', 'Edit');
+ $this->tableTd('td-nowrap td-text-sml', $data['type']);
+ $this->tableTd('td-nowrap', $data['disk'] . '' . $data['disk_type'] . '');
+ $this->tableTd('td-nowrap ' . $special_class . '', $data['price'] . ' ' . $data['currency'] . ' ' . $this->paymentTerm($data['term']) . '');
+ $this->tableTd('td-nowrap td-text-med', '' . $this->locationForTable($data['location']) . '');
+ $this->tableTd('td-nowrap td-text-med', '' . $data['provider'] . '');
+ $this->tableTd('td-nowrap td-text-sml ' . $ds_class . '', '' . $this->processDueDate($data['id'], $data['term'], $data['next_dd']) . ' days');
+ $this->tableTd('td-nowrap', $data['bandwidth'] . 'TB');
+ $this->tableTd('td-nowrap', $data['domains_limit']);
+ $this->tableTd('td-nowrap', $data['emails']);
+ $this->tableTd('td-nowrap', $data['ftp']);
+ $this->tableTd('td-nowrap', $data['db']);
+ $this->tableTd('td-nowrap', $data['dt']);
+ $this->tagClose('tr');
+ }
+
protected function SharedHostingCard(string $id)
{
$select = $this->dbConnect()->prepare("
@@ -1168,7 +1445,7 @@ class idlers extends helperFunctions
$this->outputString('