6eb746e2259c9b752db43bd72f986b85ec4fd3bf
[vnfsdk/refrepo.git] /
1 /*\r
2  * Copyright 2017 Huawei Technologies Co., Ltd.\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 (function() {\r
17     'use strict';\r
18 \r
19     /**\r
20      * @ngdoc function\r
21      * @name app.controller:HomeCtrl\r
22      * @description\r
23      * # HomeCtrl\r
24      * Controller of the app\r
25      */\r
26 \r
27     angular\r
28         .module('vnfmarket')\r
29         .controller('validationOnboardingCtrl', validation);\r
30 \r
31     validation.$inject = [ 'vnfConfig', 'baseUrlConfig', '$mdDialog'];\r
32 \r
33     /*\r
34      * recommend\r
35      * Using function declarations\r
36      * and bindable members up top.\r
37      */\r
38 \r
39     function validation(vnfConfig, baseUrlConfig, $mdDialog) {\r
40         var vm = this;\r
41         console.log("functionalTest")\r
42         vm.filter = {\r
43             "search": '',\r
44             "name": 'step'\r
45         };\r
46 \r
47         vm.listViewActions = {\r
48             "search": ""\r
49         }\r
50 \r
51         vm.pagination = [5, 10, 15, {\r
52             label: 'All',\r
53             value: function() {\r
54                 return vm.validations.length ? vm.validations.length : 0;\r
55             }\r
56         }];\r
57 \r
58         vm.paginationQuery = {\r
59             order: "step",\r
60             limit: 10,\r
61             page: 1\r
62         };\r
63 \r
64         vm.paginationOptions = {\r
65             rowSelect: false,\r
66             multiSelect: false,\r
67             autoSelect: false,\r
68             autoSelect: false,\r
69             decapitate: false,\r
70             largeEditDialog: false,\r
71             boundaryLink: true,\r
72             limitSelect: true,\r
73             pageSelect: true\r
74         };\r
75         vm.getValidations = function(){\r
76             console.log(vm.validations)\r
77         }\r
78                 \r
79                 \r
80                 vm.hide = function(answer) {\r
81             $mdDialog.hide(answer);\r
82         };\r
83 \r
84         vm.cancel = function() {\r
85             $mdDialog.cancel();\r
86         };\r
87 \r
88         vm.validations =  [{\r
89                 "step" : "Validation step-1",\r
90                 "parameter" : "Validation Parameter1",\r
91                 "result" : "pass"\r
92             },\r
93             {\r
94                 "step" : "Validation step-2",\r
95                 "parameter" : "Validation Parameter2",\r
96                 "result" : "pass"\r
97             },{\r
98                 "step" : "Validation step-3",\r
99                 "parameter" : "Validation Parameter3",\r
100                 "result" : "pass"\r
101             }];\r
102     }\r
103 })();