mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(adhoc filters): good progress on ad hoc filters and sync from to url, #6038
This commit is contained in:
@@ -34,10 +34,6 @@ function (angular, _, $) {
|
||||
$location.search(urlParams);
|
||||
});
|
||||
|
||||
$scope.onAppEvent('template-variable-value-updated', function() {
|
||||
self.updateUrlParamsWithCurrentVariables();
|
||||
});
|
||||
|
||||
$scope.onAppEvent('$routeUpdate', function() {
|
||||
var urlState = self.getQueryStringState();
|
||||
if (self.needsSync(urlState)) {
|
||||
@@ -57,22 +53,6 @@ function (angular, _, $) {
|
||||
this.expandRowForPanel();
|
||||
}
|
||||
|
||||
DashboardViewState.prototype.updateUrlParamsWithCurrentVariables = function() {
|
||||
// update url
|
||||
var params = $location.search();
|
||||
// remove variable params
|
||||
_.each(params, function(value, key) {
|
||||
if (key.indexOf('var-') === 0) {
|
||||
delete params[key];
|
||||
}
|
||||
});
|
||||
|
||||
// add new values
|
||||
templateSrv.fillVariableValuesForUrl(params);
|
||||
// update url
|
||||
$location.search(params);
|
||||
};
|
||||
|
||||
DashboardViewState.prototype.expandRowForPanel = function() {
|
||||
if (!this.state.panelId) { return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user