1 | /* HeuristicLab
|
---|
2 | * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
3 | *
|
---|
4 | * This file is part of HeuristicLab.
|
---|
5 | *
|
---|
6 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation, either version 3 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
11 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
18 | */
|
---|
19 |
|
---|
20 | angular.module('wjmokbmanager', ['ngDialog']).
|
---|
21 | controller('okbmanangerCtrl', function ($rootScope, $scope, ngDialog, $timeout, $filter) {
|
---|
22 | var vm = $scope;
|
---|
23 | var hubber = $.connection.okbManagerHub;
|
---|
24 | vm.currentData = {'name' : '', 'data' : null}
|
---|
25 |
|
---|
26 | vm.init = function () {
|
---|
27 |
|
---|
28 | var uid = document.getElementById("userId").innerHTML;
|
---|
29 | $.connection.hub.qs = { 'userid': uid };
|
---|
30 | //Connection string set to identify the unique session ID for the user
|
---|
31 | $.connection.hub.start().done(function () {
|
---|
32 | // hubber.server.requestInfo();//initial data request
|
---|
33 | });
|
---|
34 | hubber.client.processData = function (filters) {
|
---|
35 |
|
---|
36 | };
|
---|
37 |
|
---|
38 | }
|
---|
39 |
|
---|
40 | vm.initData= function(coll, name) {
|
---|
41 | switch (name) {
|
---|
42 | case "platforms":
|
---|
43 | vm.platforms = {'selected' : null, 'arr' : coll}
|
---|
44 | break;
|
---|
45 | case "algoclass":
|
---|
46 | vm.algoclass = { 'selected': null, 'arr': coll }
|
---|
47 | break;
|
---|
48 | case "algos":
|
---|
49 | vm.algos = { 'selected': null, 'arr': coll }
|
---|
50 | break;
|
---|
51 | case "probclass":
|
---|
52 | vm.probclass = { 'selected': null, 'arr': coll }
|
---|
53 | break;
|
---|
54 | case "problems":
|
---|
55 | vm.problems = { 'selected': null, 'arr': coll }
|
---|
56 | break;
|
---|
57 |
|
---|
58 | }
|
---|
59 |
|
---|
60 | }
|
---|
61 | vm.selectDataCat = function (name) {
|
---|
62 | switch (name) {
|
---|
63 | case "platforms":
|
---|
64 | vm.currentData.name = "Platforms";
|
---|
65 | vm.currentData.data = vm.platforms;
|
---|
66 | break;
|
---|
67 | case "algoclass":
|
---|
68 | vm.currentData.name = "Algorithm classes";
|
---|
69 | vm.currentData.data = vm.algoclass;
|
---|
70 | break;
|
---|
71 | case "algos":
|
---|
72 | vm.currentData.name = "Algorithms";
|
---|
73 | vm.currentData.data = vm.algos;
|
---|
74 | break;
|
---|
75 | case "probclass":
|
---|
76 | vm.currentData.name = "Problem classes";
|
---|
77 | vm.currentData.data = vm.probclass;
|
---|
78 | break;
|
---|
79 | case "problems":
|
---|
80 | vm.currentData.name = "Problems";
|
---|
81 | vm.currentData.data = vm.problems;
|
---|
82 | break;
|
---|
83 |
|
---|
84 | }
|
---|
85 | }
|
---|
86 | }); |
---|