diff --git a/frontend/locales/english.lng b/frontend/locales/english.lng index e786ab6..27573b0 100644 --- a/frontend/locales/english.lng +++ b/frontend/locales/english.lng @@ -30,6 +30,7 @@ title-password; Set new root password title-console; Out-of-band console title-admin-userlist; User overview title-admin-containerlist; Container overview +title-admin-nodelist; Node overview title-admin-userinfo; User lookup title-admin-overview; Administrative overview title-admin-vps-suspend; Suspend container @@ -70,6 +71,7 @@ menu-password; Root Password menu-admin-overview; Overview menu-admin-users; Users menu-admin-containers; Containers +menu-admin-nodes; Nodes login-username; Username login-password; Password @@ -103,6 +105,7 @@ list-column-node; Node list-column-disk; Disk space list-column-ram; RAM list-column-template; Template +list-column-location; Physical location list-status-running; Running list-status-stopped; Stopped list-status-suspended; Suspended diff --git a/frontend/module.admin.nodes.php b/frontend/module.admin.nodes.php new file mode 100644 index 0000000..a7a2d2a --- /dev/null +++ b/frontend/module.admin.nodes.php @@ -0,0 +1,34 @@ +data as $row) + { + $sNode = new Node($row); + + $sNodeList[] = array( + 'id' => $sNode->sId, + 'hostname' => $sNode->sHostname, + 'location' => $sNode->sPhysicalLocation + ); + } +} + +$sPageContents = Templater::AdvancedParse("admin.nodes", $locale->strings, array( + 'nodes' => $sNodeList +)); diff --git a/frontend/rewrite.php b/frontend/rewrite.php index f0a18b6..100049b 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -123,6 +123,12 @@ try 'auth_error' => "error.access.php", '_menu' => "admin" ), + '^/admin/nodes/?$' => array( + 'target' => "module.admin.nodes.php", + 'authenticator' => "authenticator.admin.php", + 'auth_error' => "error.access.php", + '_menu' => "admin" + ), '^/admin/container/([0-9]+)/suspend/?$' => array( 'target' => "module.admin.container.suspend.php", 'authenticator' => "authenticator.admin.php", diff --git a/frontend/templates/admin.nodes.tpl b/frontend/templates/admin.nodes.tpl new file mode 100644 index 0000000..3b27a4b --- /dev/null +++ b/frontend/templates/admin.nodes.tpl @@ -0,0 +1,20 @@ +
{%!list-column-hostname} | +{%!list-column-location} | +
---|---|
+ + {%?node[hostname]} + + | ++ {%?node[location]} + | +