diff --git a/client/app/pages/dashboards/widget.js b/client/app/pages/dashboards/widget.js
index a6c714ad30..2f474073af 100644
--- a/client/app/pages/dashboards/widget.js
+++ b/client/app/pages/dashboards/widget.js
@@ -36,6 +36,13 @@ function DashboardWidgetCtrl($location, $uibModal, $window, Events, currentUser)
});
};
+ this.localParametersDefs = () => {
+ if (!this.localParameters) {
+ this.localParameters = this.widget.query.getParametersDefs().filter(p => !p.global);
+ }
+ return this.localParameters;
+ };
+
this.deleteWidget = () => {
if (!$window.confirm(`Are you sure you want to remove "${this.widget.getName()}" from the dashboard?`)) {
return;
@@ -51,6 +58,10 @@ function DashboardWidgetCtrl($location, $uibModal, $window, Events, currentUser)
this.dashboard.layout = response.layout;
this.dashboard.version = response.version;
+
+ if (this.deleted) {
+ this.deleted({});
+ }
});
};
@@ -88,6 +99,7 @@ export default function (ngModule) {
widget: '<',
public: '<',
dashboard: '<',
+ deleted: '&onDelete',
},
});
}
diff --git a/client/app/services/query.js b/client/app/services/query.js
index 13b84716ce..2e98abb375 100644
--- a/client/app/services/query.js
+++ b/client/app/services/query.js
@@ -78,6 +78,7 @@ class Parameters {
name: param,
type: 'text',
value: null,
+ global: false,
});
}
});