aviau 24f73d6e66 Prefixed cell names with 'status' + removes useles css
Change-Id: I83a190958149d15f273ee94217cc92cc0ef5db67
2015-05-21 13:39:39 -04:00

23 lines
771 B
JavaScript

'use strict';
angular.module('bansho.table.cell_status_host', ['bansho.table'])
.controller('CellStatusHostCtrl', ['$scope', function ($scope) {
$scope.cell_name = 'host';
if ($scope.entry.host_state === 'UP') {
$scope.state = 'state--ok';
} else if ($scope.entry.host_state === 'WARNING') {
$scope.state = 'state--warning';
} else if ($scope.entry.host_state === '') {
$scope.state = '';
} else {
$scope.state = 'state--error';
}
}])
.run(['tableGlobalConfig', function (tableGlobalConfig) {
tableGlobalConfig.cellToFieldsMap.status_host = ['host_state', 'host_name'];
tableGlobalConfig.cellWrappableField.status_host = 'host_name';
}]);