summaryrefslogtreecommitdiffstats
path: root/src/etc/phpshellsessions
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-06-07 16:57:59 +0930
committerPhil Davis <phil.davis@inf.org>2016-06-07 16:57:59 +0930
commit9202151e8d80af3227a8196d743705ef16637a7b (patch)
tree228ea0d72829e751b88a92fd08b0aa0c33e84377 /src/etc/phpshellsessions
parent0771de32cd4a6cc1a24236fd924203b1adc91723 (diff)
downloadpfsense-9202151e8d80af3227a8196d743705ef16637a7b.zip
pfsense-9202151e8d80af3227a8196d743705ef16637a7b.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
Diffstat (limited to 'src/etc/phpshellsessions')
-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