From d88908cfe135fc17479699d79927cc6e2e9c4a33 Mon Sep 17 00:00:00 2001 From: k-paulius Date: Sun, 14 Feb 2016 00:20:05 -0600 Subject: Add action to the breadcrumb. Rename 'Information/Tests' to 'Information & Tests' so it does not clash with breadcrumb separator. --- src/usr/local/www/diag_smart.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/usr/local/www/diag_smart.php') diff --git a/src/usr/local/www/diag_smart.php b/src/usr/local/www/diag_smart.php index 812c674..91f18f1 100644 --- a/src/usr/local/www/diag_smart.php +++ b/src/usr/local/www/diag_smart.php @@ -63,7 +63,17 @@ require("guiconfig.inc"); +// What page, aka. action is being wanted +// If they "get" a page but don't pass all arguments, smartctl will throw an error +$action = (isset($_POST['action']) ? $_POST['action'] : $_GET['action']); + $pgtitle = array(gettext("Diagnostics"), gettext("S.M.A.R.T. Status")); + +if ($action != 'config') { + $pgtitle[] = gettext('Information & Tests'); +} else { + $pgtitle[] = gettext('Config'); +} $smartctl = "/usr/local/sbin/smartctl"; $smartd = "/usr/local/sbin/smartd"; $start_script = "/usr/local/etc/rc.d/smartd.sh"; @@ -104,10 +114,6 @@ function smartmonctl($action) { global $start_script; shell_exec($start_script . escapeshellarg($action)); } - -// What page, aka. action is being wanted -// If they "get" a page but don't pass all arguments, smartctl will throw an error -$action = (isset($_POST['action']) ? $_POST['action'] : $_GET['action']); $targetdev = basename($_POST['device']); if (!file_exists('/dev/' . $targetdev)) { @@ -116,7 +122,7 @@ if (!file_exists('/dev/' . $targetdev)) { } $tab_array = array(); -$tab_array[0] = array(gettext("Information/Tests"), ($action != 'config'), $_SERVER['PHP_SELF'] . "?action=default"); +$tab_array[0] = array(gettext("Information & Tests"), ($action != 'config'), $_SERVER['PHP_SELF'] . "?action=default"); $tab_array[1] = array(gettext("Config"), ($action == 'config'), $_SERVER['PHP_SELF'] . "?action=config"); display_top_tabs($tab_array); -- cgit v1.1