2 * Copyright 2016-2017 ZTE Corporation.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 var tmDetailUtil = {};
17 tmDetailUtil.timer = null;
19 tmDetailUtil.nameRender = function(obj) {
20 return '<a href="#" onclick="vm.nodesDetail.$showDetails('
21 + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\',\'' + vm.nodesTab.nodesList.tempId + '\')">' + obj.aData.name + '</a>';
24 tmDetailUtil.inputsRender = function(obj) {
25 var inputs = obj.aData.inputs;
27 //if(inputs && inputs.length) {
28 // var optionHtml = "";
29 // for(var i=0;i<inputs.length;i++) {
30 // optionHtml += '<option>' + inputs[i].name + '</option>';
32 // result = '<select>' + optionHtml + '</select>';
34 result = JSON.stringify(inputs);
38 tmDetailUtil.outputsRender = function(obj) {
39 var outputs = obj.aData.outputs;
41 //if(inputs && inputs.length) {
42 // var optionHtml = "";
43 // for(var i=0;i<inputs.length;i++) {
44 // optionHtml += '<option>' + inputs[i].name + '</option>';
46 // result = '<select>' + optionHtml + '</select>';
48 result = JSON.stringify(outputs);
52 tmDetailUtil.initSteps = function() {
55 url : vm.executionTab.$queryEventsInfoUrl,
57 success : function(data) {
58 console.log("initSteps");
60 var step = $(".step");
61 if (step.getStep().length == 0) {
62 vm.executionTab.steps = [{title : "start"}, {title : "install VM"}, {title : "execute"}, {title : "complete"}];
66 steps : vm.executionTab.steps