diff --git a/ui/app/css/main.css b/ui/app/css/main.css index c5fa8244..ae1b2d8d 100644 --- a/ui/app/css/main.css +++ b/ui/app/css/main.css @@ -40,6 +40,8 @@ header #logo { #silence-create { background: #fff; + width: 100%; + min-width: 400px; } .silence-matchers { diff --git a/ui/app/js/app.js b/ui/app/js/app.js index 742fc141..3902b568 100644 --- a/ui/app/js/app.js +++ b/ui/app/js/app.js @@ -206,9 +206,7 @@ angular.module('am.controllers').controller('AlertsCtrl', $scope.refresh = function() { Route.query({}, function(data) { - console.log(data); $scope.route = data.data; - console.log($scope.route) }, function(data) { @@ -231,17 +229,17 @@ angular.module('am.controllers').controller('SilencesCtrl', $scope.silences = data.data || []; }, function(data) { - + $scope.error = data.data; } ); - } + }; $scope.delete = function(sil) { Silence.delete({ id: sil.id }) $scope.refresh() - } + }; $scope.refresh(); } @@ -263,12 +261,12 @@ angular.module('am.controllers').controller('SilenceCreateCtrl', $scope.error = null; - $scope.newMatcher = function() { + $scope.addMatcher = function() { $scope.silence.matchers.push({}); - } + }; $scope.delMatcher = function(i) { $scope.silence.matchers.splice(i, 1); - } + }; $scope.reset = function() { var now = new Date(); var end = new Date(); @@ -285,10 +283,13 @@ angular.module('am.controllers').controller('SilenceCreateCtrl', $scope.silence.startsAt = now; $scope.silence.endsAt = end; + $scope.silence.comment = ""; + $scope.silence.createdBy = ""; + if (!$scope.silence.matchers) { - $scope.silence.matchers = [{}]; + $scope.silence.matchers = [{}, {}]; } - } + }; $scope.reset(); } diff --git a/ui/app/partials/alert.html b/ui/app/partials/alert.html index 4cbca11a..440e5e77 100644 --- a/ui/app/partials/alert.html +++ b/ui/app/partials/alert.html @@ -17,23 +17,24 @@
-
- Details: -
-
- - - - - - - -
{{ name }}{{ val }}
-
-
+
+ +
+ + Details: +
+ + + + + + + +
{{ name }}{{ val }}
+
\ No newline at end of file