Bring back browser notifications (#1)

This commit is contained in:
Arik Fraimovich 2013-12-07 14:18:39 +02:00
parent cc86cb5ffa
commit 7e73b307f0
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@
$scope.updateTime = '';
}
var QueryFiddleCtrl = function ($scope, $routeParams, $http, $location, growl, Query) {
var QueryFiddleCtrl = function ($scope, $routeParams, $http, $location, growl, notifications, Query) {
$scope.$parent.pageTitle = "Query Fiddle";
$scope.tabs = [{'key': 'table', 'name': 'Table'}, {'key': 'chart', 'name': 'Chart'},
@ -134,6 +134,9 @@
Query.save({'id': $scope.query.id, 'latest_query_data_id': $scope.queryResult.getId()})
}
$scope.query.latest_query_data_id = $scope.queryResult.getId();
notifications.showNotification("re:dash", $scope.query.name + " updated.");
$scope.lockButton(false);
}
});
@ -236,7 +239,7 @@
.controller('DashboardCtrl', ['$scope', '$routeParams', '$http', 'Dashboard', DashboardCtrl])
.controller('WidgetCtrl', ['$scope', '$http', 'Query', WidgetCtrl])
.controller('QueriesCtrl', ['$scope', '$http', '$location', 'Query', QueriesCtrl])
.controller('QueryFiddleCtrl', ['$scope', '$routeParams', '$http', '$location', 'growl', 'Query', QueryFiddleCtrl])
.controller('QueryFiddleCtrl', ['$scope', '$routeParams', '$http', '$location', 'growl', 'notifications', 'Query', QueryFiddleCtrl])
.controller('IndexCtrl', ['$scope', 'Dashboard', IndexCtrl])
.controller('MainCtrl', ['$scope', 'Dashboard', 'notifications', MainCtrl]);
})();

View File

@ -106,9 +106,6 @@ renderers.directive('chartRenderer', function () {
_.each($scope.queryResult.getChartData(), function (s) {
$scope.chartSeries.push(_.extend(s, {'stacking': stacking}));
});
// TODO: move this to the parent controller
// notifications.showNotification("RedDash", $scope.query.name + " updated.");
}
});
}]