mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Remove dark theme when leaving the Dashboard app.
This commit is contained in:
parent
60e62c7ad2
commit
700f7508de
1 changed files with 9 additions and 3 deletions
|
@ -75,8 +75,6 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
|
|||
}
|
||||
}
|
||||
|
||||
$scope.$on('$destroy', dash.destroy);
|
||||
|
||||
const matchQueryFilter = function (filter) {
|
||||
return filter.query && filter.query.query_string && !filter.meta;
|
||||
};
|
||||
|
@ -103,6 +101,7 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
|
|||
$scope.$watchCollection('state.options', function (newVal, oldVal) {
|
||||
if (!angular.equals(newVal, oldVal)) $state.save();
|
||||
});
|
||||
|
||||
$scope.$watch('state.options.darkTheme', setDarkTheme);
|
||||
|
||||
$scope.topNavMenu = [{
|
||||
|
@ -154,7 +153,14 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
|
|||
stateMonitor.onChange((status) => {
|
||||
$appStatus.dirty = status.dirty;
|
||||
});
|
||||
$scope.$on('$destroy', () => stateMonitor.destroy());
|
||||
|
||||
$scope.$on('$destroy', () => {
|
||||
stateMonitor.destroy();
|
||||
dash.destroy();
|
||||
|
||||
// Remove dark theme to keep it from affecting the appearance of other apps.
|
||||
setDarkTheme(false);
|
||||
});
|
||||
|
||||
$scope.$emit('application.load');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue