Directive
This commit is contained in:
parent
afcf64a384
commit
81df96c208
@ -358,7 +358,15 @@ angular.module('bansho.live', [])
|
||||
}).error(function () {
|
||||
throw new Error('acknowledge : POST Request failed');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var downtime = function (host_name, service_description, attrs) {
|
||||
var data = {};
|
||||
|
||||
angular.forEach(attrs, function (key, value) {
|
||||
console.log(key + "; " + value);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
getHost: getHost,
|
||||
@ -373,7 +381,7 @@ angular.module('bansho.live', [])
|
||||
getHostProblems: getHostProblems,
|
||||
getTableData: getTableData,
|
||||
getTotalHosts: getTotalHosts,
|
||||
getTotalServices: getTotalServices
|
||||
|
||||
}
|
||||
getTotalServices: getTotalServices,
|
||||
downtime: downtime
|
||||
};
|
||||
}]);
|
||||
|
@ -134,5 +134,8 @@
|
||||
<button type="button" ng-click="ackFormIsOpen = !ackFormIsOpen">Close</button>
|
||||
<button type="button" ng-click="acknowledgeProblems()">Send</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<bansho-downtime_form data-ng-show="isDowntimeShown" is-shown="isDowntimeShown" selected-hosts="selected"></bansho-downtime_form>
|
||||
</menu>
|
||||
|
@ -66,6 +66,8 @@ angular.module('bansho.table.actionbar', ['bansho.table',
|
||||
$scope.activateFilter = function (item) {
|
||||
$scope.actionbarFilters.activeFilter = $scope.actionbarFilters.possibleFilters[item];
|
||||
};
|
||||
|
||||
$scope.isDowntimeShown = true;
|
||||
}])
|
||||
|
||||
.filter('actionbarSelectFilter', function () {
|
||||
@ -105,4 +107,18 @@ angular.module('bansho.table.actionbar', ['bansho.table',
|
||||
restrict: 'E',
|
||||
templateUrl: 'components/table/actionbar/actionbar.html'
|
||||
};
|
||||
})
|
||||
|
||||
.directive('banshoDowntimeForm', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'components/table/actionbar/downtime_form.html',
|
||||
scope: {
|
||||
isShown: '=',
|
||||
selectedHosts: '='
|
||||
},
|
||||
controller: function ($scope) {
|
||||
console.log($scope.isShown)
|
||||
}
|
||||
};
|
||||
});
|
||||
|
10
app/components/table/actionbar/downtime_form.html
Normal file
10
app/components/table/actionbar/downtime_form.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div>
|
||||
<h1>Downtime form {{isShown}} </h1>
|
||||
<form>
|
||||
<div>
|
||||
<label for="author">Author :</label>
|
||||
<input type="text" id="acknowledge-author" ng-model="acknowledgeData.author">
|
||||
</div>
|
||||
<button type="button" ng-click="sendDowntime()">Send</button>
|
||||
</form>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user