diff options
author | Simon Rettberg | 2013-11-16 16:32:43 +0100 |
---|---|---|
committer | Simon Rettberg | 2013-11-16 16:32:43 +0100 |
commit | 8102576e930a839540c0e8b2c9e18fdf37d30b24 (patch) | |
tree | 60248ead9b0221c38232ae1928f87595ae04cbf8 /modules | |
parent | Fixed two stupid messups (diff) | |
download | slx-admin-8102576e930a839540c0e8b2c9e18fdf37d30b24.tar.gz slx-admin-8102576e930a839540c0e8b2c9e18fdf37d30b24.tar.xz slx-admin-8102576e930a839540c0e8b2c9e18fdf37d30b24.zip |
Notify about missing options/files/actions on dashboard
Diffstat (limited to 'modules')
-rw-r--r-- | modules/main.inc.php | 4 | ||||
-rw-r--r-- | modules/sysconfig.inc.php | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/modules/main.inc.php b/modules/main.inc.php index 31aef55e..24f519c6 100644 --- a/modules/main.inc.php +++ b/modules/main.inc.php @@ -20,6 +20,8 @@ function render_module() if (preg_match("#inet $last/\d+.*scope#", $ip)) $ipxe = false; } } - Render::addTemplate('page-main', array('user' => User::getName(), 'ipxe' => $ipxe)); + $sysconfig = !file_exists(CONFIG_HTTP_DIR . '/default/config.tgz'); + $minilinux = !file_exists(CONFIG_HTTP_DIR . '/default/kernel') || !file_exists(CONFIG_HTTP_DIR . '/default/initramfs-stage31') || !file_exists(CONFIG_HTTP_DIR . '/default/stage32.sqfs'); + Render::addTemplate('page-main', array('user' => User::getName(), 'ipxe' => $ipxe, 'sysconfig' => $sysconfig, 'minilinux' => $minilinux)); } diff --git a/modules/sysconfig.inc.php b/modules/sysconfig.inc.php index 1a171a40..063ae65d 100644 --- a/modules/sysconfig.inc.php +++ b/modules/sysconfig.inc.php @@ -76,10 +76,13 @@ function list_configs() Message::addError('no-permission'); return; } + $current = '<none>'; + if (file_exists(CONFIG_HTTP_DIR . '/default/config.tgz')) $current = realpath(CONFIG_HTTP_DIR . '/default/config.tgz'); $files = array(); foreach (glob(CONFIG_TGZ_LIST_DIR . '/*.tgz') as $file) { $files[] = array( - 'file' => basename($file) + 'file' => basename($file), + 'current' => ($current === realpath($file)) ); } Render::addTemplate('page-tgz-list', array('files' => $files, 'token' => Session::get('token'))); |