bansho/app/components/table/cell_service_check/cell_service_check.js
aviau 990f60c8cd Adapt to new live API
Change-Id: I59a1027a60f7d40c1a6db34e3b2c5588ed608540
2015-05-12 17:39:20 -04:00

18 lines
597 B
JavaScript

'use strict';
angular.module('bansho.table.cell_service_check', ['bansho.table'])
.controller('CellServiceCheckCtrl', ['$scope', function ($scope) {
if ($scope.entry.state === 'OK') {
$scope.state = 'state--ok';
} else if ($scope.entry.state === 'WARNING') {
$scope.state = 'state--warning';
} else {
$scope.state = 'state--error';
}
}])
.run(['tableGlobalConfig', function (tableGlobalConfig) {
tableGlobalConfig.cellToFieldsMap.service_check = ['state', 'service_description', 'plugin_output'];
}]);