summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/diag_smart.php
diff options
context:
space:
mode:
authork-paulius <k.dash.paulius@gmail.com>2016-02-14 00:20:05 -0600
committerk-paulius <k.dash.paulius@gmail.com>2016-02-14 00:20:05 -0600
commitd88908cfe135fc17479699d79927cc6e2e9c4a33 (patch)
tree3ea7d5a92f25c25cc6158dbcd0011c100cc05f69 /src/usr/local/www/diag_smart.php
parent550d7d8bdc12ca3028d1bfbd6ec012c64c9f45b5 (diff)
downloadpfsense-d88908cfe135fc17479699d79927cc6e2e9c4a33.zip
pfsense-d88908cfe135fc17479699d79927cc6e2e9c4a33.tar.gz
Add action to the breadcrumb. Rename 'Information/Tests' to 'Information & Tests' so it does not clash with breadcrumb separator.
Diffstat (limited to 'src/usr/local/www/diag_smart.php')
-rw-r--r--src/usr/local/www/diag_smart.php16
1 files changed, 11 insertions, 5 deletions
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);
OpenPOWER on IntegriCloud