5 * @name opnfvdashBoardAngularApp.controller:testVisualController
8 * Controller of the opnfvdashBoardAngularApp
10 angular.module('opnfvApp')
11 .controller('testVisualController', ['$scope', '$state', '$stateParams', 'TableFactory', 'ngDialog', '$http', '$loading',
12 function($scope, $state, $stateParams, TableFactory, ngDialog, $http, $loading) {
13 $scope.dovet = "59,222,156,317";
14 $scope.functest = "203,163,334,365";
15 $scope.yardstick = "398,161,513,384";
16 $scope.vsperf = "567,163,673,350";
17 $scope.stor = "686,165,789,341";
18 $scope.qtip = "802,164,905,341";
19 $scope.bootleneck = "917,161,1022,338";
20 $scope.noPopArea1 = "30,11,1243,146";
21 $scope.noPopArea2 = "1041,157,1250,561";
22 $scope.noPopArea3 = "15,392,1027,561";
25 $scope.showSelectValue = 0;
26 $scope.scenarioList = ["os_nosdn_kvm_noha", "os_nosdn_kvm_no", "os_nosdn_kvm_"];
29 $scope.myTrigger = myTrigger;
30 $scope.openTestDetail = openTestDetail;
32 $scope.getDetail = getDetail;
39 function myTrigger(name) {
40 $loading.start('Key');
41 $scope.tableData = null;
42 $scope.modalName = name;
44 var url = PROJECT_URL + '/projects/' + name + '/cases';
48 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
51 $http.get(url, config).then(function(response) {
52 if (response.status == 200) {
53 $scope.tableData = response.data;
54 $loading.finish('Key');
61 function getDetail(casename) {
62 TableFactory.getProjectTestCaseDetail().get({
63 'project': $scope.modalName,
65 }).$promise.then(function(response) {
66 if (response != null) {
67 $scope.project_name_modal = response.project_name;
68 $scope.description_modal = response.description;
76 function openTestDetail() {
78 template: 'views/modal/testcasedetail.html',
79 className: 'ngdialog-theme-default',
86 TableFactory.getProjectUrl().get({
88 }).$promise.then(function(response) {
89 if (response != null) {
90 $scope.functesturl = response.functest;
91 $scope.yardstickurl = response.yardstick;
92 $scope.vsperfurl = response.vsperf;
93 $scope.storperfurl = response.storperf;
94 $scope.qtipurl = response.qtip;
95 $scope.bottlenecksurl = response.bottlenecks;
96 $scope.doveturl = null;