aboutsummaryrefslogtreecommitdiffstats
path: root/gui/app/scripts/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'gui/app/scripts/controllers')
-rw-r--r--gui/app/scripts/controllers/container.controller.js5
-rw-r--r--gui/app/scripts/controllers/content.controller.js7
-rw-r--r--gui/app/scripts/controllers/sut.controller.js58
3 files changed, 70 insertions, 0 deletions
diff --git a/gui/app/scripts/controllers/container.controller.js b/gui/app/scripts/controllers/container.controller.js
index 3ad200a91..a7d5f0309 100644
--- a/gui/app/scripts/controllers/container.controller.js
+++ b/gui/app/scripts/controllers/container.controller.js
@@ -127,10 +127,15 @@ angular.module('yardStickGui2App')
function chooseResult(name) {
$scope.selectContainer = name;
}
+
$scope.goBack = function goBack() {
$state.go('app.projectList');
}
+ $scope.goNext = function goNext() {
+ $state.go('app.sut', {uuid: $scope.uuid});
+ }
+
$scope.openDeleteEnv = function openDeleteEnv(id, name) {
$scope.deleteName = name;
$scope.deleteId = id;
diff --git a/gui/app/scripts/controllers/content.controller.js b/gui/app/scripts/controllers/content.controller.js
index 0288fa540..90a3f1433 100644
--- a/gui/app/scripts/controllers/content.controller.js
+++ b/gui/app/scripts/controllers/content.controller.js
@@ -49,6 +49,7 @@ angular.module('yardStickGui2App')
$scope.gotoOpenrcPage = gotoOpenrcPage;
$scope.gotoPodPage = gotoPodPage;
$scope.gotoContainerPage = gotoContainerPage;
+ $scope.gotoSUTPage = gotoSUTPage;
$scope.gotoTestcase = gotoTestcase;
$scope.gotoEnviron = gotoEnviron;
$scope.gotoSuite = gotoSuite;
@@ -95,6 +96,12 @@ angular.module('yardStickGui2App')
$state.go('app.container', { uuid: $scope.uuid });
}
+ function gotoSUTPage() {
+ $scope.path = $location.path();
+ $scope.uuid = $scope.path.split('/').pop();
+ $state.go('app.sut', { uuid: $scope.uuid });
+ }
+
function gotoTestcase() {
$state.go('app.testcase');
}
diff --git a/gui/app/scripts/controllers/sut.controller.js b/gui/app/scripts/controllers/sut.controller.js
new file mode 100644
index 000000000..092aabc41
--- /dev/null
+++ b/gui/app/scripts/controllers/sut.controller.js
@@ -0,0 +1,58 @@
+'use strict';
+
+angular.module('yardStickGui2App')
+ .controller('SUTController', ['$scope', '$state', '$stateParams', 'mainFactory', 'Upload', 'toaster', '$location', 'ngDialog',
+ function($scope, $state, $stateParams, mainFactory, Upload, toaster, $location, ngDialog) {
+
+
+ init();
+ $scope.showloading = false;
+ $scope.loadingOPENrc = false;
+
+ function init() {
+
+
+ $scope.uuid = $stateParams.uuid;
+ $scope.sutInfo = {};
+ getItemIdDetail();
+ getSUTDetail();
+
+ }
+
+ function getItemIdDetail() {
+ mainFactory.ItemDetail().get({
+ 'envId': $scope.uuid
+ }).$promise.then(function(response) {
+ if (response.status == 1) {
+ $scope.envName = response.result.environment.name;
+ }else{
+ mainFactory.errorHandler1(response);
+ }
+ }, function(error) {
+ mainFactory.errorHandler2(error);
+ })
+ }
+
+ function getSUTDetail(){
+ mainFactory.SUTDetail().get({
+ 'envId': $scope.uuid
+ }).$promise.then(function(resp){
+ $scope.sutInfo = resp.result.sut;
+ console.log($scope.sutInfo);
+ }, function(error){
+ })
+ }
+
+ $scope.goBack = function goBack() {
+ $state.go('app.projectList');
+ }
+
+
+ $scope.goNext = function goNext() {
+ $scope.path = $location.path();
+ $scope.uuid = $scope.path.split('/').pop();
+ $state.go('app.container', { uuid: $scope.uuid });
+ }
+
+ }
+ ]);