mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Ask for notification permissions only on query execution
This commit is contained in:
parent
ffe23fc59c
commit
f5abb47d89
@ -150,7 +150,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
var MainCtrl = function ($scope, $location, Dashboard, notifications) {
|
||||
var MainCtrl = function ($scope, $location, Dashboard) {
|
||||
$scope.$on("$routeChangeSuccess", function (event, current, previous, rejection) {
|
||||
if ($scope.showPermissionError) {
|
||||
$scope.showPermissionError = false;
|
||||
@ -171,10 +171,6 @@
|
||||
'name': null,
|
||||
'layout': null
|
||||
}
|
||||
|
||||
$(window).click(function () {
|
||||
notifications.getPermissions();
|
||||
});
|
||||
};
|
||||
|
||||
var IndexCtrl = function ($scope, Events, Dashboard, Query) {
|
||||
@ -188,6 +184,6 @@
|
||||
angular.module('redash.controllers', [])
|
||||
.controller('QueriesCtrl', ['$scope', '$http', '$location', '$filter', 'Query', QueriesCtrl])
|
||||
.controller('IndexCtrl', ['$scope', 'Events', 'Dashboard', 'Query', IndexCtrl])
|
||||
.controller('MainCtrl', ['$scope', '$location', 'Dashboard', 'notifications', MainCtrl])
|
||||
.controller('MainCtrl', ['$scope', '$location', 'Dashboard', MainCtrl])
|
||||
.controller('QuerySearchCtrl', ['$scope', '$location', '$filter', 'Events', 'Query', QuerySearchCtrl]);
|
||||
})();
|
||||
|
@ -168,6 +168,8 @@
|
||||
$scope.lockButton(true);
|
||||
$scope.cancelling = false;
|
||||
Events.record(currentUser, 'execute', 'query', $scope.query.id);
|
||||
|
||||
notifications.getPermissions();
|
||||
};
|
||||
|
||||
$scope.cancelExecution = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user