X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Freporting%2Fpages%2Fapp%2Fscripts%2Fcontrollers%2Fcase.controller.js;fp=utils%2Ftest%2Freporting%2Fpages%2Fapp%2Fscripts%2Fcontrollers%2Fcase.controller.js;h=a4f165119fa05fcff07c1c7a5d439ef85aa658b8;hb=04ef201b1e8f5f3dcfde4319854b81c25240e63f;hp=0000000000000000000000000000000000000000;hpb=33ad7e23e1d76011a574f709c0d2bb915983e6d1;p=releng.git 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