Skip to content

Commit

Permalink
Bring back browser notifications (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Dec 7, 2013
1 parent cc86cb5 commit 7e73b30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 5 additions & 2 deletions rd_ui/app/scripts/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
Expand Down Expand Up @@ -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);
}
});
Expand Down Expand Up @@ -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]);
})();
3 changes: 0 additions & 3 deletions rd_ui/app/scripts/query_fiddle/renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
});
}]
Expand Down

0 comments on commit 7e73b30

Please sign in to comment.