mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixes #912, URL parameters are lost when switching to fullscreen/edit mode
This commit is contained in:
parent
4edb89eeb9
commit
74e0309241
@ -47,19 +47,12 @@ function (angular, _, $) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DashboardViewState.prototype.getQueryStringState = function() {
|
DashboardViewState.prototype.getQueryStringState = function() {
|
||||||
var queryParams = $location.search();
|
var state = $location.search();
|
||||||
var urlState = {
|
state.panelId = parseInt(state.panelId) || null;
|
||||||
panelId: parseInt(queryParams.panelId) || null,
|
state.fullscreen = state.fullscreen ? true : false;
|
||||||
fullscreen: queryParams.fullscreen ? true : false,
|
state.edit = state.edit ? true : false;
|
||||||
edit: queryParams.edit ? true : false,
|
|
||||||
};
|
|
||||||
|
|
||||||
_.each(queryParams, function(value, key) {
|
return state;
|
||||||
if (key.indexOf('var-') !== 0) { return; }
|
|
||||||
urlState[key] = value;
|
|
||||||
});
|
|
||||||
|
|
||||||
return urlState;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DashboardViewState.prototype.serializeToUrl = function() {
|
DashboardViewState.prototype.serializeToUrl = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user