diff options
author | 2017-07-27 05:04:36 +0000 | |
---|---|---|
committer | 2017-07-27 05:04:37 +0000 | |
commit | d184d8714e543e4f2497db682154820f7eecf1de (patch) | |
tree | 0dd1709c01ff9f34b4d39dad4af50ff6b789234f /gui/app/scripts/controllers/testcasedetail.controller.js | |
parent | d9b9b8970312e13f798a367439cfc2c333c7fca4 (diff) | |
parent | edbe3568a052da8afd24b6877c4c6fdcc7627ba3 (diff) |
Merge "Yardstick GUI & GUI deployment"
Diffstat (limited to 'gui/app/scripts/controllers/testcasedetail.controller.js')
-rw-r--r-- | gui/app/scripts/controllers/testcasedetail.controller.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gui/app/scripts/controllers/testcasedetail.controller.js b/gui/app/scripts/controllers/testcasedetail.controller.js new file mode 100644 index 000000000..4e824ca85 --- /dev/null +++ b/gui/app/scripts/controllers/testcasedetail.controller.js @@ -0,0 +1,50 @@ +'use strict'; + +angular.module('yardStickGui2App') + .controller('testcaseDetailController', ['$scope', '$state', '$stateParams', 'mainFactory', 'Upload', 'toaster', + function($scope, $state, $stateParams, mainFactory, Upload, toaster) { + + + init(); + + + function init() { + + getTestcaseDetail(); + + + } + + function getTestcaseDetail() { + mainFactory.getTestcaseDetail().get({ + 'testcasename': $stateParams.name + + }).$promise.then(function(response) { + if (response.status == 1) { + $scope.testcaseInfo = response.result.testcase; + + } + }, function(error) { + toaster.pop({ + type: 'error', + title: 'fail', + body: 'unknow error', + timeout: 3000 + }); + }) + } + + $scope.goBack = function goBack() { + window.history.back(); + } + + + + + + + + + + } + ]);
\ No newline at end of file |