diff --git a/rd_ui/app/scripts/controllers/alerts.js b/rd_ui/app/scripts/controllers/alerts.js index 4a811ef5..ec6acf87 100644 --- a/rd_ui/app/scripts/controllers/alerts.js +++ b/rd_ui/app/scripts/controllers/alerts.js @@ -178,13 +178,13 @@ return { restrict: 'E', replace: true, - template: '', + template: '', controller: function ($scope) { - var updateClass = function() { + var updateMessage = function() { if ($scope.subscription) { - $scope.class = "fa fa-eye-slash"; + $scope.message = "Unsubscribe"; } else { - $scope.class = "fa fa-eye"; + $scope.message = "Subscribe"; } } @@ -193,7 +193,7 @@ return (subscription.user.email == currentUser.email); }); - updateClass(); + updateMessage(); }); $scope.toggleSubscription = function() { @@ -201,7 +201,7 @@ $scope.subscription.$delete(function() { $scope.subscribers = _.without($scope.subscribers, $scope.subscription); $scope.subscription = undefined; - updateClass(); + updateMessage(); }, function() { growl.addErrorMessage("Failed saving subscription."); }); @@ -209,7 +209,7 @@ $scope.subscription = new AlertSubscription({alert_id: $scope.alertId}); $scope.subscription.$save(function() { $scope.subscribers.push($scope.subscription); - updateClass(); + updateMessage(); }, function() { growl.addErrorMessage("Unsubscription failed."); }); diff --git a/rd_ui/app/styles/redash.css b/rd_ui/app/styles/redash.css index 9e237935..8078cebb 100644 --- a/rd_ui/app/styles/redash.css +++ b/rd_ui/app/styles/redash.css @@ -581,3 +581,8 @@ div.table-name { padding-left: 5px; padding-right: 5px; } + +hr.subscription { + height: 2px; + background: #333; +} diff --git a/rd_ui/app/views/alerts/destinationsubscribers.html b/rd_ui/app/views/alerts/destinationsubscribers.html index 11d3df6f..f7f61786 100644 --- a/rd_ui/app/views/alerts/destinationsubscribers.html +++ b/rd_ui/app/views/alerts/destinationsubscribers.html @@ -1,25 +1,27 @@
- Destination subscriptions -

Destination subscriptions will send a notification to the configured destination

-
-
- - - {{$select.selected.name}} - - - - -
-
- -
-
-
- -
- - +
+ Destination subscriptions +

Destination subscriptions will send a notification to the configured destination

+
+

Add a destination subscription

+
+ + {{$select.selected.name}} + + + + +
+
+ +
+
+
+ +
+ + +
diff --git a/rd_ui/app/views/alerts/edit.html b/rd_ui/app/views/alerts/edit.html index ae910613..b33c395c 100644 --- a/rd_ui/app/views/alerts/edit.html +++ b/rd_ui/app/views/alerts/edit.html @@ -62,6 +62,7 @@

Subscriptions

+
diff --git a/rd_ui/app/views/alerts/usersubscribers.html b/rd_ui/app/views/alerts/usersubscribers.html index 9583b2d3..5722d2af 100644 --- a/rd_ui/app/views/alerts/usersubscribers.html +++ b/rd_ui/app/views/alerts/usersubscribers.html @@ -1,5 +1,7 @@ -
- User subscriptions
+
+
+

+

User subscriptions will send a notification to your email

{{s.id}}