Skip to content

Commit

Permalink
Merge pull request #764 from Security-Onion-Solutions/cogburn/persist…
Browse files Browse the repository at this point in the history
…-advanced-toggle

Advanced Still Toggled After Reload
  • Loading branch information
coreyogburn authored Mar 5, 2025
2 parents cac051d + 3952f7f commit 3d88471
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const i18n = {
addObservable: 'Add as new observable...',
addSuccessful: 'Added successfully!',
address: 'Address',
advanced: 'Temporarily enable advanced interface features',
advanced: 'Enable advanced interface features',
ago: 'ago',
aiGenSummary: 'AI-Generated Summary',
aiSummaryStale: 'This AI summary was generated for a previous version of the detection and may not be accurate.',
Expand Down
3 changes: 3 additions & 0 deletions html/js/routes/hunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ const huntComponent = {
'autohunt': 'saveLocalSettings',
'autoRefreshInterval': 'resetRefreshTimer',
'showDetailsPanel': 'saveLocalSettings',
'advanced': 'saveLocalSettings',
},
methods: {
moment: moment,
Expand Down Expand Up @@ -2204,6 +2205,7 @@ const huntComponent = {
this.saveSetting('relativeTimeUnit', this.relativeTimeUnit, this.params['relativeTimeUnit']);
this.saveSetting('autohunt', this.autohunt, true);
this.saveSetting('showDetailsPanel', this.showDetailsPanel, this.isCategory('alerts'));
this.saveSetting('advanced', this.advanced, false);
},
loadLocalSettings() {
// Global settings
Expand All @@ -2224,6 +2226,7 @@ const huntComponent = {
if (localStorage[prefix + '.relativeTimeUnit']) this.relativeTimeUnit = parseInt(localStorage[prefix + '.relativeTimeUnit']);
if (localStorage[prefix + '.autohunt']) this.autohunt = localStorage[prefix + '.autohunt'] == 'true';
if (localStorage[prefix + '.showDetailsPanel']) this.showDetailsPanel = localStorage[prefix + '.showDetailsPanel'] == 'true';
if (localStorage[prefix + '.advanced']) this.advanced = localStorage[prefix + '.advanced'] == 'true';

if (localStorage['settings.case.mruCases']) this.mruCases = JSON.parse(localStorage['settings.case.mruCases']);
},
Expand Down

0 comments on commit 3d88471

Please sign in to comment.