Commit bba3f300 by Torkel Ödegaard

Search: remove dashboard from search result after dashboard deletion, Closes #753

parent d40e21a7
......@@ -119,9 +119,10 @@ function (angular, _, config, $) {
$scope.searchDashboards($scope.query.query);
};
$scope.deleteDashboard = function(id, evt) {
$scope.deleteDashboard = function(dash, evt) {
evt.stopPropagation();
$scope.emitAppEvent('delete-dashboard', { id: id });
$scope.emitAppEvent('delete-dashboard', { id: dash.id });
$scope.results.dashboards = _.without($scope.results.dashboards, dash);
};
$scope.addMetricToCurrentDashboard = function (metricId) {
......
......@@ -54,7 +54,7 @@
<a ng-click="shareDashboard(row.id, row.id, $event)" config-modal="app/partials/dashLoaderShare.html">
<i class="icon-share"></i> share &nbsp;&nbsp;&nbsp;
</a>
<a ng-click="deleteDashboard(row.id, $event)">
<a ng-click="deleteDashboard(row, $event)">
<i class="icon-remove"></i> delete
</a>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment