bansho/app/templates/single_table/single_table.js
Vincent Fournier 63f3ad58d6 Improve jshint task and fix errors
Change-Id: I1b9c7d4a7040e3fee66388b9744b553a6fb1da6e
2015-05-20 15:46:08 -04:00

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;
}]);