2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
26 function DashboardCtrl($scope, $rootScope, $resource, $http, $timeout,
27 $location, $interval, $q, Datafactory) {
28 console.log("//////////////DashboardCtrl");
29 $scope.autosaveInterval = 1800000;
30 $rootScope.isModel = false;
31 $rootScope.isPalette = false;
32 $rootScope.isTestSet = false;
33 $rootScope.isRequirementCoverage = false;
34 $rootScope.ispropertyExplorer = false;
35 $rootScope.parameters;
36 $scope.orientation = "horizontal";
37 $rootScope.ispropertyExplorer = false;
38 $rootScope.isActive = true;
39 $rootScope.models = [];
40 $scope.selectedParent = {};
41 $rootScope.utmModels = {};
42 $rootScope.selectedModelName;
43 $rootScope.dialogName = "";
45 $interval(function() {
46 console.log("interval");
48 * AutosaveProject($scope,$rootScope,$resource, $http, $timeout,
49 * $location, $interval, $q, Datafactory);
51 }, $scope.autosaveInterval);
53 $rootScope.onSelectActivityModel = function(obj) {
54 console.log("onSelectActivityModel");
56 $rootScope.isPalette = true;
57 $rootScope.isTestSet = false;
58 $rootScope.isRequirementCoverage = false;
59 $rootScope.ispropertyExplorer = false;
60 // document.getElementById('propertyExplorer').classList.remove('visible');
62 // $( "#propertyExplorer" ).prev().css( "display" ,"block");
63 $("#activity_modeler").prev().css("display", "block");
64 $('div').find('.k-expand-next').click();
66 if (obj == undefined) {
67 document.getElementById("modeler_name").textContent = "Activity Modeler";
70 document.getElementById("modeler_name").textContent = "Activity Modeler"
71 + " - " + selected_model;
74 $rootScope.modelName = selected_model;
76 $rootScope.modeltestset = list_model_test_sets[selected_model];
77 if (list_model_schema_extensions[selected_model] == null) {
78 if (list_model_schema_extensions[$rootScope.utmModels.name] != null) {
79 list_model_schema_extensions[selected_model] = jQuery
83 list_model_schema_extensions[$rootScope.utmModels.name]);
85 list_model_schema_extensions[selected_model] = {};
89 $rootScope.initProjectExplorer();
92 changecolor(selected_model);
95 $scope.selectActivityTestSet = function() {
96 console.log("selectActivityTestSet");
97 $rootScope.isPalette = false;
98 $rootScope.isRequirementCoverage = false;
99 $rootScope.isTestset = true;
100 document.getElementById("modeler_name").textContent = "UTM Test Set";
101 // document.getElementById('propertyExplorer').classList.add('visible');
102 // $( "#propertyExplorer" ).prev().css( "display" ,"none");
103 $('div').find('.k-collapse-next').click();
104 $rootScope.modeltestset = list_model_test_sets[selected_model];
108 $scope.showPalette = function() {
109 console.log("showPalette");
110 // alert("showPalette()");
111 $rootScope.isModel = true;
112 // $rootScope.isPalette = true;
116 $rootScope.filterRouter = 'partials/DashboardFilters.html';
117 $scope.isActivePROD = true;
118 $scope.isActiveQC = false;
119 $rootScope.reload = function(env) {
120 console.log("reload");
123 $scope.showTDSSView = true;
126 function changecolor(selected_model) {
127 console.log("changecolor");
130 // var modelNames =[];
132 $(".models").each(function(i) {
134 var model_value = $(this).text().trim();
135 // modelName.push(model_value);
136 if (model_value == selected_model || model_value == "") {
137 $(this).addClass("selectedcolor");
139 $(this).removeClass("selectedcolor");