summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-06-07 16:57:59 +0930
committerChris Buechler <cmb@pfsense.org>2016-06-08 19:15:55 -0400
commitbee62d273f77053b794df4dfab0bfadfbd974ff9 (patch)
treed30d3970dcc0d6017365d1054b64712f80ab8c4e
parentf4ede22769baab85577ff95da98f544d1b67a9f1 (diff)
downloadpfsense-bee62d273f77053b794df4dfab0bfadfbd974ff9.zip
pfsense-bee62d273f77053b794df4dfab0bfadfbd974ff9.tar.gz
Add resetwebgui to developer shell
This might be helpful to people if they have set the theme to something that they are having trouble displaying, reading... or enabled some widget that is not good or... It allows them to get back to a known-working dashboard state, from where they can try again with customizations. Having something like this was suggested by stilez in amongst discussion of features for https://github.com/pfsense/pfsense/pull/2989
-rw-r--r--src/etc/phpshellsessions/resetwebgui26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/etc/phpshellsessions/resetwebgui b/src/etc/phpshellsessions/resetwebgui
new file mode 100644
index 0000000..ab7ee0d
--- /dev/null
+++ b/src/etc/phpshellsessions/resetwebgui
@@ -0,0 +1,26 @@
+global $config;
+
+$config = parse_config(true);
+$default_theme = "pfSense.css";
+$default_columns = 2;
+$default_widgets = "system_information:col1:show,interfaces:col2:show";
+
+echo "Resetting webGUI:\n";
+echo " Theme to " . $default_theme . "\n";
+echo " Dashboard columns to " . $default_columns . "\n";
+echo " Top navigation to scroll\n";
+echo " Widgets to System Information and Interfaces\n";
+echo "...";
+
+$config['system']['webgui']['webguicss'] = $default_theme;
+$config['system']['webgui']['dashboardcolumns'] = $default_columns;
+
+if (isset($config['system']['webgui']['webguifixedmenu'])) {
+ unset($config['system']['webgui']['webguifixedmenu']);
+}
+
+$config['widgets']['sequence'] = $default_widgets;
+
+write_config("pfSsh.php reset webGUI");
+
+echo "done.\n"; \ No newline at end of file
OpenPOWER on IntegriCloud