diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php
index f24eb41c0..1cf1747e0 100644
--- a/html/includes/print-menubar.php
+++ b/html/includes/print-menubar.php
@@ -360,21 +360,32 @@ foreach (array_keys($menu_sensors) as $item) {
= '5' && ($app_count) > "0") {
+if ($_SESSION['userlevel'] >= '5' && count($app_list) > "0") {
?>
Apps
');
+ if (count($app_i_list) > 1) {
+ echo '';
+ }
+ else {
+ echo(' '.nicecase($app['app_type']).' ');
+ }
}
}
?>
@@ -383,26 +394,6 @@ if ($_SESSION['userlevel'] >= '5' && ($app_count) > "0") {
0) {
-?>
-
- Proxmox
- ');
- }
-?>
-
-
-
-Proxmox » ";
+
+unset($sep);
+
+foreach ($pmxcl as $pmxc) {
+ if (isset($sep)) { echo $sep; };
+
+ if (var_eq('instance', $pmxc['app_instance'])) {
+ echo "';
+ }
+
+ $sep = ' | ';
+}
+
+print_optionbar_end();
+
+if (!var_isset('instance')) {
+ echo 'Select a cluster:';
+ echo '';
+ foreach ($pmxcl as $pmxc) {
+ echo '- '.generate_link(nicecase($pmxc['app_instance']), array('page' => 'apps', 'app' => 'proxmox', 'instance' => $pmxc['app_instance'])).'
';
+ }
+ echo '
';
+} elseif (!var_isset('vmid')) {
+ echo '';
+ foreach (proxmox_cluster_vms(var_get('instance')) as $pmxvm) {
+ echo '- '.generate_link($pmxvm['vmid']." (".$pmxvm['description'].")", array('page' => 'apps', 'app' => 'proxmox', 'instance' => var_get('instance'), 'vmid' => $pmxvm['vmid'])).'
';
+ }
+ echo '
';
+} else {
+ include("pages/apps/proxmox/vm.inc.php");
+}
+
+$pagetitle[] = 'Proxmox';
diff --git a/html/pages/apps/proxmox/vm.inc.php b/html/pages/apps/proxmox/vm.inc.php
new file mode 100644
index 000000000..2e318789d
--- /dev/null
+++ b/html/pages/apps/proxmox/vm.inc.php
@@ -0,0 +1,35 @@
+ 'Traffic',
+);
+
+foreach ($vm['ports'] as $port) {
+ foreach ($graphs as $key => $text) {
+ $graph_type = 'proxmox_traffic';
+
+ $graph_array['height'] = '100';
+ $graph_array['width'] = '215';
+ $graph_array['to'] = $config['time']['now'];
+ $graph_array['id'] = $vm['app_id'];
+ $graph_array['device_id'] = $vm['device_id'];
+ $graph_array['type'] = 'application_'.$key;
+ $graph_array['port'] = $port['port'];
+ $graph_array['vmid'] = $vm['vmid'];
+ $graph_array['cluster'] = $vm['cluster'];
+ $graph_array['hostname'] = $vm['description'];
+
+ echo ''.$text.' '.$port['port'].'@'.$vm['description'].'
';
+
+ echo "| ";
+
+ include 'includes/print-graphrow.inc.php';
+
+ echo ' |
';
+ }
+}
diff --git a/html/pages/proxmox.inc.php b/html/pages/proxmox.inc.php
deleted file mode 100644
index e7ced1f88..000000000
--- a/html/pages/proxmox.inc.php
+++ /dev/null
@@ -1,65 +0,0 @@
-
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2 dated June,
- * 1991.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * See http://www.gnu.org/licenses/gpl.txt for the full license
- */
-
-include('includes/application/proxmox.inc.php');
-$graphs['proxmox'] = array(
- 'netif'
-);
-
-print_optionbar_start();
-
-echo "Proxmox » ";
-
-unset($sep);
-
-foreach ($pmxcl as $pmxc) {
- if (isset($sep)) { echo $sep; };
-
- if (var_eq('cluster', $pmxc['app_instance'])) {
- echo "';
- }
-
- $sep = ' | ';
-}
-
-print_optionbar_end();
-
-if (!var_isset('cluster')) {
- echo 'Select a cluster:';
- echo '';
- foreach ($pmxcl as $pmxc) {
- echo '- '.generate_link(nicecase($pmxc['app_instance']), array('page' => 'proxmox', 'cluster' => $pmxc['app_instance'])).'
';
- }
- echo '
';
-} elseif (!var_isset('vmid')) {
- echo '';
- foreach (proxmox_cluster_vms(var_get('cluster')) as $pmxvm) {
- echo '- '.generate_link($pmxvm['vmid']." (".$pmxvm['description'].")", array('page' => 'proxmox', 'cluster' => var_get('cluster'), 'vmid' => $pmxvm['vmid'])).'
';
- }
- echo '
';
-} else {
- include("pages/proxmox/vm.inc.php");
-}
-
-$pagetitle[] = 'Proxmox';
diff --git a/html/pages/proxmox/vm.inc.php b/html/pages/proxmox/vm.inc.php
deleted file mode 100644
index 1300bf951..000000000
--- a/html/pages/proxmox/vm.inc.php
+++ /dev/null
@@ -1,60 +0,0 @@
-
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2 dated June,
- * 1991.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * See http://www.gnu.org/licenses/gpl.txt for the full license
- */
-
-global $vars;
-
-$vm = proxmox_vm_info(var_get('vmid'), var_get('cluster'));
-
-$graphs = array(
- 'proxmox_traffic' => 'Traffic',
-);
-
-foreach ($vm['ports'] as $port) {
- foreach ($graphs as $key => $text) {
- $graph_type = 'proxmox_traffic';
-
- $graph_array['height'] = '100';
- $graph_array['width'] = '215';
- $graph_array['to'] = $config['time']['now'];
- $graph_array['id'] = $vm['app_id'];
- $graph_array['device_id'] = $vm['device_id'];
- $graph_array['type'] = 'application_'.$key;
- $graph_array['port'] = $port['port'];
- $graph_array['vmid'] = $vm['vmid'];
- $graph_array['cluster'] = $vm['cluster'];
- $graph_array['hostname'] = $vm['description'];
-
- echo ''.$text.' '.$port['port'].'@'.$vm['description'].'
';
-
- echo "| ";
-
- include 'includes/print-graphrow.inc.php';
-
- echo ' |
';
- }
-}
-
-
-#if (is_numeric($vars['id']) && ($auth || application_permitted($vars['id']))) {
-# $app = get_application_by_id($vars['id']);
-# $device = device_by_id_cache($app['device_id']);
-# $title = generate_device_link($device);
-# $title .= $graph_subtype;
-# $auth = true;
-#}
-