2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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 * ===================================================================
36 function($scope, $rootScope, $resource, $http, $timeout, $location, $interval) {
37 console.log("//////////////DashboardCtrl");
38 $scope.autosaveInterval = 1800000;
39 $rootScope.isModel = false;
40 $rootScope.isPalette = false;
41 $rootScope.isTestSet = false;
42 $rootScope.isRequirementCoverage = false;
43 $rootScope.ispropertyExplorer = false;
44 $rootScope.parameters;
45 $scope.orientation = "horizontal";
46 $rootScope.ispropertyExplorer = false;
47 $rootScope.isActive = true;
48 $rootScope.models = [];
49 $scope.selectedParent = {};
50 $rootScope.utmModels = {};
51 $rootScope.selectedModelName;
52 $rootScope.dialogName = "";
53 $interval(function() {
54 console.log("interval");
55 }, $scope.autosaveInterval);
56 $rootScope.onSelectActivityModel = function(obj) {
57 console.log("onSelectActivityModel");
58 $rootScope.isPalette = true;
59 $rootScope.isTestSet = false;
60 $rootScope.isRequirementCoverage = false;
61 $rootScope.ispropertyExplorer = false;
62 $("#activity_modeler").prev().css("display", "block");
63 $('div').find('.k-expand-next').click();
64 if (obj == undefined) {
65 document.getElementById("modeler_name").textContent = "Activity Modeler";
68 document.getElementById("modeler_name").textContent = "Activity Modeler"
69 + " - " + selected_model;
71 $rootScope.modelName = selected_model;
72 $rootScope.modeltestset = list_model_test_sets[selected_model];
73 if (list_model_schema_extensions[selected_model] == null) {
74 if (list_model_schema_extensions[$rootScope.utmModels.name] != null) {
75 list_model_schema_extensions[selected_model] = jQuery.extend(
77 list_model_schema_extensions[$rootScope.utmModels.name]);
79 list_model_schema_extensions[selected_model] = {};
82 $rootScope.initProjectExplorer();
83 changecolor(selected_model);
85 $scope.selectActivityTestSet = function() {
86 console.log("selectActivityTestSet");
87 $rootScope.isPalette = false;
88 $rootScope.isRequirementCoverage = false;
89 $rootScope.isTestset = true;
90 document.getElementById("modeler_name").textContent = "UTM Test Set";
91 $('div').find('.k-collapse-next').click();
92 $rootScope.modeltestset = list_model_test_sets[selected_model];
95 $scope.showPalette = function() {
96 console.log("showPalette");
97 $rootScope.isModel = true;
99 $rootScope.filterRouter = 'partials/DashboardFilters.html';
100 $scope.isActivePROD = true;
101 $scope.isActiveQC = false;
102 $rootScope.reload = function(env) {
103 console.log("reload");
105 $scope.showTDSSView = true;
107 function changecolor(selected_model) {
108 console.log("changecolor");
110 // var modelNames =[];
111 $(".models").each(function(i) {
113 var model_value = $(this).text().trim();
114 // modelName.push(model_value);
115 if (model_value == selected_model || model_value == "") {
116 $(this).addClass("selectedcolor");
118 $(this).removeClass("selectedcolor");