[Dashboard] Added refresh check for backwards compatibility when loading dashboard, nested mapping for a saved dashboard

This commit is contained in:
Khalah Jones Golden 2016-06-10 09:56:15 -04:00
parent 4c584a6816
commit 8357f25853
2 changed files with 12 additions and 2 deletions

View file

@ -68,7 +68,9 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,
if (dash.timeRestore && dash.timeTo && dash.timeFrom && !getAppState.previouslyStored()) {
timefilter.time.to = dash.timeTo;
timefilter.time.from = dash.timeFrom;
timefilter.refreshInterval = dash.refreshInterval;
if (dash.refreshInterval) {
timefilter.refreshInterval = dash.refreshInterval;
}
}
$scope.$on('$destroy', dash.destroy);

View file

@ -57,7 +57,15 @@ module.factory('SavedDashboard', function (courier, config) {
timeRestore: 'boolean',
timeTo: 'string',
timeFrom: 'string',
refreshInterval: 'object'
refreshInterval: {
type: 'object',
properties: {
display: {type: 'string'},
pause: { type: 'boolean'},
section: { type: 'integer'},
value: { type: 'integer'}
}
}
};
SavedDashboard.searchsource = true;