summaryrefslogtreecommitdiffstats
path: root/gui/app/scripts/controllers/testcasedetail.controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui/app/scripts/controllers/testcasedetail.controller.js')
-rw-r--r--gui/app/scripts/controllers/testcasedetail.controller.js50
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