diff --git a/src/library/Server/Manager/Hestia.php b/src/library/Server/Manager/Hestia.php index c0ae31f79..d757136b6 100644 --- a/src/library/Server/Manager/Hestia.php +++ b/src/library/Server/Manager/Hestia.php @@ -27,11 +27,7 @@ class Server_Manager_Hestia extends Server_Manager public function _getPort() { - if ($this->_config['port']) { - return $this->_config['port']; - } else { - return '8083'; - } + return is_numeric($this->_config['port']) ? $this->_config['port'] : '8083'; } /** @@ -42,7 +38,27 @@ class Server_Manager_Hestia extends Server_Manager public static function getForm() { return [ - 'label' => 'Hestia', + 'label' => 'Hestia Control Panel', + 'form' => [ + 'credentials' => [ + 'fields' => [ + [ + 'name' => 'username', + 'type' => 'text', + 'label' => 'Username', + 'placeholder' => 'Username to connect to the server', + 'required' => true, + ], + [ + 'name' => 'accesshash', + 'type' => 'text', + 'label' => 'Access hash', + 'placeholder' => 'Access hash to connect to the server', + 'required' => true, + ], + ], + ], + ] ]; } @@ -53,9 +69,7 @@ class Server_Manager_Hestia extends Server_Manager */ public function getLoginUrl() { - $host = 'https://'.$this->_config['host'].':'.$this->_getPort().'/'; - - return $host; + return 'https://'.$this->_config['host'].':'.$this->_getPort().'/'; } /** @@ -65,7 +79,7 @@ class Server_Manager_Hestia extends Server_Manager */ public function getResellerLoginUrl() { - return 'https://hestiacp.com'; + return $this->getLoginUrl(); } private function _makeRequest($params) @@ -361,4 +375,4 @@ class Server_Manager_Hestia extends Server_Manager { throw new Server_Exception('Server Manager Hestia CP Error: Not Supported'); } -} +} \ No newline at end of file diff --git a/src/library/Server/Manager/Plesk.php b/src/library/Server/Manager/Plesk.php index 03197bae2..3dbdf9659 100644 --- a/src/library/Server/Manager/Plesk.php +++ b/src/library/Server/Manager/Plesk.php @@ -22,9 +22,9 @@ class Server_Manager_Plesk extends Server_Manager public static function getForm() { - return array( + return [ 'label' => 'Plesk', - ); + ]; } public function getLoginUrl() @@ -516,4 +516,4 @@ class Server_Manager_Plesk extends Server_Manager return $props; } -} +} \ No newline at end of file diff --git a/src/library/Server/Manager/Vesta.php b/src/library/Server/Manager/Vesta.php index 499993109..2cc18fdcd 100644 --- a/src/library/Server/Manager/Vesta.php +++ b/src/library/Server/Manager/Vesta.php @@ -27,11 +27,7 @@ class Server_Manager_Vesta extends Server_Manager public function _getPort() { - if (is_numeric($this->_config['port'])) { - return $this->_config['port']; - } else { - return '8083'; - } + return is_numeric($this->_config['port']) ? $this->_config['port'] : '8083'; } /** @@ -53,9 +49,7 @@ class Server_Manager_Vesta extends Server_Manager */ public function getLoginUrl() { - $host = 'https://'.$this->_config['host'].':'.$this->_getPort().'/'; - - return $host; + return 'https://'.$this->_config['host'].':'.$this->_getPort().'/'; } /** @@ -65,7 +59,7 @@ class Server_Manager_Vesta extends Server_Manager */ public function getResellerLoginUrl() { - return 'https://vestacp.com'; + return $this->getLoginUrl(); } private function _makeRequest($params) @@ -369,4 +363,4 @@ class Server_Manager_Vesta extends Server_Manager { throw new Server_Exception('Server Manager Vesta CP Error: Not Supported'); } -} +} \ No newline at end of file diff --git a/src/library/Server/Manager/Whm.php b/src/library/Server/Manager/Whm.php index 02da9d5e7..ef106830f 100644 --- a/src/library/Server/Manager/Whm.php +++ b/src/library/Server/Manager/Whm.php @@ -77,7 +77,27 @@ class Server_Manager_Whm extends Server_Manager public static function getForm() { return array( - 'label' => 'cPanel WHM', + 'label' => 'WHM (cPanel)', + 'form' => [ + 'credentials' => [ + 'fields' => [ + [ + 'name' => 'username', + 'type' => 'text', + 'label' => 'Username', + 'placeholder' => 'Username to connect to the server', + 'required' => true, + ], + [ + 'name' => 'accesshash', + 'type' => 'text', + 'label' => 'Access hash', + 'placeholder' => 'Access hash to connect to the server', + 'required' => true, + ], + ], + ], + ] ); } @@ -2683,7 +2703,5 @@ class xmlapi { $values['display'] = substr($args, 0, -1); } return $this->api2_query($username, 'StatsBar', 'stat', $values); - } - - + } } \ No newline at end of file diff --git a/src/modules/Servicehosting/html_admin/mod_servicehosting_index.html.twig b/src/modules/Servicehosting/html_admin/mod_servicehosting_index.html.twig index f68f0504d..4d6db8cce 100644 --- a/src/modules/Servicehosting/html_admin/mod_servicehosting_index.html.twig +++ b/src/modules/Servicehosting/html_admin/mod_servicehosting_index.html.twig @@ -205,31 +205,14 @@
| {{ 'Status'|trans }}: | -{{ mf.status_name(order.status) }} | -
| {{ 'Domain'|trans }}: | -- {{ service.domain }} - | -
| {{ 'Server Name'|trans }}: | -{{ server.name }} | -
| {{ 'Hosting plan'|trans }}: | -{{ hp.name }} | -
| {{ 'Server IP'|trans }}: | -{{ server.ip }} | -
| {{ 'Account IP'|trans }}: | -{{ service.ip }} | -
| {{ 'Username'|trans }}: | -{{ service.username }} | -
| {{ 'Nameserver 1'|trans }}: | -{{ server.ns1 }} | -
| {{ 'Nameserver 2'|trans }}: | -{{ server.ns2 }} | -
| {{ 'Nameserver 3'|trans }}: | -{{ server.ns3 }} | -
| {{ 'Nameserver 4'|trans }}: | -{{ server.ns4 }} | -
| {{ 'Bandwidth'|trans }}: | -{{ hp.bandwidth }} MB / {{ 'per month'|trans }} | -
| {{ 'Disk quota'|trans }}: | -{{ hp.quota }} MB | -