summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/pages/app/scripts/controllers/case.controller.js
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-03-21 14:48:54 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-03-25 01:07:45 +0000
commit04ef201b1e8f5f3dcfde4319854b81c25240e63f (patch)
tree63668da7fd79ed0071710a5ed69a6c4f348aad7d /utils/test/reporting/pages/app/scripts/controllers/case.controller.js
parent33ad7e23e1d76011a574f709c0d2bb915983e6d1 (diff)
Create Catalogue page
JIRA: RELENG-193 1.create a page to list all project. 2.This page can get test case list of certain project. 3.This page can show information of certain test case. Change-Id: I79e0d3aafa99c054865a0d2948b99918802f32a7 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'utils/test/reporting/pages/app/scripts/controllers/case.controller.js')
-rw-r--r--utils/test/reporting/pages/app/scripts/controllers/case.controller.js70
1 files changed, 70 insertions, 0 deletions
diff --git a/utils/test/reporting/pages/app/scripts/controllers/case.controller.js b/utils/test/reporting/pages/app/scripts/controllers/case.controller.js
new file mode 100644
index 000000000..a4f165119
--- /dev/null
+++ b/utils/test/reporting/pages/app/scripts/controllers/case.controller.js
@@ -0,0 +1,70 @@
+'use strict';
+
+/**
+ * @ngdoc function
+ * @name opnfvdashBoardAngularApp.controller:CaseController
+ * @description
+ * # TableController
+ * Controller of the opnfvdashBoardAngularApp
+ */
+angular.module('opnfvApp')
+ .controller('CaseController', ['$scope', '$state', '$stateParams', 'TableFactory', function($scope, $state, $stateParams, TableFactory) {
+
+ init();
+ $scope.projectSelect = "";
+ $scope.funcTestCase = ['test1func', 'test2func', 'test3func', 'test4func'];
+ $scope.yardStickCase = ['test1yard', 'test2yard', 'test3yard', 'test4yard'];
+ $scope.bottleNeckCase = ['test1bottle', 'test2bottle', 'test3bottle', 'test4bottle',
+ 'test5bottle', 'test6bottle', 'test7bottle', 'test8bottle',
+ 'test9bottle', 'test10bottle', 'test11bottle', 'test12bottle',
+ 'test13bottle', 'test14bottle', 'test15bottle', 'test16bottle',
+ 'test17bottle', 'test18bottle', 'test19bottle', 'test20bottle'
+ ];
+ $scope.selectedFunc = ["test1func"];
+ $scope.selectBottle = ["test8bottle"];
+ $scope.versionlist = ["Colorado", "Master"];
+ $scope.VersionOption = [
+ { title: 'Colorado' },
+ { title: 'Master' }
+ ];
+ $scope.VersionConfig = {
+ create: true,
+ valueField: 'title',
+ labelField: 'title',
+ delimiter: '|',
+ maxItems: 1,
+ placeholder: 'Version',
+ onChange: function(value) {
+ checkElementArrayValue($scope.selection, $scope.VersionOption);
+ $scope.selection.push(value);
+ // console.log($scope.selection);
+
+ }
+ };
+
+
+ function init() {
+ $scope.toggleSelection = toggleSelection;
+ $scope.toggleSelectionMulti = toggleSelectionMulti;
+
+ }
+
+ function toggleSelection(status) {
+ // var idx = $scope.weekselection.indexOf(status);
+ $scope.projectSelect = status;
+
+ }
+
+ function toggleSelectionMulti(status) {
+ var idx = $scope.selection.indexOf(status);
+
+ if (idx > -1) {
+ $scope.selection.splice(idx, 1);
+ } else {
+ $scope.selection.push(status);
+ }
+ console.log($scope.selection);
+ }
+
+
+ }]); \ No newline at end of file