Add list of all other data for events
Change-Id: I2265b515a6be4934ea2f5b0c778eb79f5f4172df
This commit is contained in:
parent
5a1d1eb218
commit
cc30bbca57
@ -275,14 +275,16 @@
|
||||
"Output",
|
||||
"Host name",
|
||||
"Service",
|
||||
"Time"
|
||||
"Time",
|
||||
"Complete data"
|
||||
],
|
||||
"name": [
|
||||
"status_event_event_type",
|
||||
"status_event_output",
|
||||
"status_event_host_name",
|
||||
"status_event_service",
|
||||
"status_event_time"
|
||||
"status_event_time",
|
||||
"status_event"
|
||||
]
|
||||
},
|
||||
"inputSource": {
|
||||
|
@ -0,0 +1,9 @@
|
||||
<td data-ng-click="toggleExpansion()" class="data-table__event" data-ng-controller="CellStatusEventCtrl">
|
||||
<p class="data-table__data">
|
||||
<i data-ng-class="{'ico-down-dir': isExpanded, 'ico-right-dir': !isExpanded}"></i>
|
||||
<span data-ng-repeat="(k, e) in filter(entry)">
|
||||
<b>{{k}}</b>: {{e}}
|
||||
<span data-ng-show="isExpanded"><br></span>
|
||||
</span>
|
||||
</p>
|
||||
</td>
|
40
app/components/table/cell_status_event/cell_status_event.js
Normal file
40
app/components/table/cell_status_event/cell_status_event.js
Normal file
@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('bansho.table.cell_status_event', ['bansho.table'])
|
||||
|
||||
.controller('CellStatusEventCtrl', ['$scope', function ($scope) {
|
||||
$scope.isExpanded = false;
|
||||
$scope.toggleExpansion = function () {
|
||||
$scope.isExpanded = !$scope.isExpanded;
|
||||
};
|
||||
|
||||
var shownOutput = {
|
||||
'attempts': true,
|
||||
'contact': true,
|
||||
'notification_method': true,
|
||||
'notification_type': true,
|
||||
'state': true,
|
||||
'state_type': true
|
||||
};
|
||||
|
||||
$scope.filter = function (entry) {
|
||||
var result = {};
|
||||
angular.forEach(entry, function(value, key) {
|
||||
if (shownOutput[key]) {
|
||||
result[key] = value;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
}])
|
||||
|
||||
.run(['tableGlobalConfig', function (tableGlobalConfig) {
|
||||
tableGlobalConfig.cellToFieldsMap.status_output = [
|
||||
'attempts',
|
||||
'contact',
|
||||
'notification_method',
|
||||
'notification_type',
|
||||
'state',
|
||||
'state_type'
|
||||
];
|
||||
}]);
|
@ -5,6 +5,7 @@ angular.module('bansho.table', ['bansho.surveil',
|
||||
'bansho.table.actionbar',
|
||||
'bansho.filters',
|
||||
'bansho.table.cell_status_host',
|
||||
'bansho.table.cell_status_event',
|
||||
'bansho.table.cell_status_event_event_type',
|
||||
'bansho.table.cell_status_event_output',
|
||||
'bansho.table.cell_status_event_host_name',
|
||||
|
@ -70,6 +70,7 @@
|
||||
<script src="components/table/table.js"></script>
|
||||
<script src="components/table/cell_status_duration/cell_status_duration.js"></script>
|
||||
|
||||
<script src="components/table/cell_status_event/cell_status_event.js"></script>
|
||||
<script src="components/table/cell_status_event_event_type/cell_status_event_event_type.js"></script>
|
||||
<script src="components/table/cell_status_event_output/cell_status_event_output.js"></script>
|
||||
<script src="components/table/cell_status_event_host_name/cell_status_event_host_name.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user