4 angular.module(
'myAppControllers', [])
5 .controller(
'settingsController',
8 function($scope, $translate) {
9 $scope.langs = [
'en',
'pl'];
10 $scope.changeLanguage =
function (lang) {
14 .controller(
'versionController',
17 function($scope, srvInfo) {
20 $scope.server_ver = data;
24 $scope.cpp_get = data;
26 $scope.client_ver = client_ver_major.toString() +
'.' + client_ver_minor.toString() +
'.' + client_ver_compilation.toString();
28 .controller(
'commandController',
31 function($scope, srvCommands) {
32 $scope.getCppCommandsNo =
function() {
33 srvCommands.getCppCommands(
35 $scope.cpp_commands_no = Object.keys(data).length;
38 $scope.clickNewCommand =
function() {
39 srvCommands.startCommand(
41 $scope.getCppCommandsNo();
44 $scope.getCppCommandsNo();
46 .controller(
'currentController',
51 function($scope, $timeout, srvInfo, srvCommands) {
52 var REFRESH_INTERVAL = 1000;
54 var call =
function() {
55 $scope.getCppCommands =
function() {
56 srvCommands.getCppCommands(
58 $scope.cpp_commands = data;
64 $scope.current = data;
65 $scope.getCppCommands();
66 $timeout(call, REFRESH_INTERVAL);