Add toggling for silence form
This commit is contained in:
parent
83c4d596bc
commit
5f46042dd5
|
@ -226,6 +226,13 @@ angular.module('am.controllers').controller('SilencesCtrl',
|
|||
$scope.silences = [];
|
||||
$scope.order = "endsAt";
|
||||
|
||||
$scope.showForm = false;
|
||||
|
||||
$scope.toggleForm = function() {
|
||||
$scope.showForm = !$scope.showForm
|
||||
}
|
||||
|
||||
|
||||
$scope.refresh = function() {
|
||||
Silence.query({},
|
||||
function(data) {
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<silence-form sil="silence"></silence-form>
|
||||
|
||||
<hr>
|
||||
<div class="group">
|
||||
<div class="right">
|
||||
<button ng-hide="showForm" type="primary" ng-click="toggleForm()" small>New Silence</button>
|
||||
<button ng-show="showForm" type="primary" ng-click="toggleForm()" small>Hide Form</button>
|
||||
</div>
|
||||
<div ng-show="showForm">
|
||||
<silence-form sil="silence"></silence-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="silences-query" class="forms">
|
||||
<row>
|
||||
|
|
Loading…
Reference in New Issue