63f3ad58d6
Change-Id: I1b9c7d4a7040e3fee66388b9744b553a6fb1da6e
27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
/*global jQuery */
|
|
|
|
'use strict';
|
|
|
|
angular.module('bansho.view.singleTable', ['ngRoute',
|
|
'bansho.tactical.status_overview',
|
|
'bansho.tactical.current_health',
|
|
'bansho.tactical.top_alert_producers',
|
|
'bansho.table'
|
|
])
|
|
|
|
.value('singleTableConfig', {})
|
|
|
|
.controller('SingleTableCtrl', ['$scope', '$routeParams', 'singleTableConfig', 'TableConfigObj', 'configManager',
|
|
function ($scope, $routeParams, singleTableConfig, TableConfigObj, configManager) {
|
|
var viewName = $scope.viewName;
|
|
|
|
if (jQuery.isEmptyObject(singleTableConfig)) {
|
|
configManager.loadByTemplate('single_table', singleTableConfig);
|
|
}
|
|
|
|
$scope.tableConfig = new TableConfigObj(singleTableConfig[viewName].components[0].config);
|
|
|
|
$scope.singleTableTitle = singleTableConfig[viewName].title;
|
|
$scope.singleTableRefreshInterval = singleTableConfig[viewName].refreshInterval;
|
|
}]);
|