diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2017-04-04 17:17:55 +0530 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2017-04-04 17:17:55 +0530 |
commit | bd1c287e725d5cabb8aa787d52c796a64ae6c782 (patch) | |
tree | f35988c09d35674eb7a5ae547a3aef19299c8213 /extsys | |
parent | 3791136dcea7146c0290d47a0b5ee58ec81c5522 (diff) |
Integration issues
Integration of the Client pages to Main GUI
IssueId : CLIENT-189
Change-Id: Ifda97e420f5e83ee9c299e5a1dbb2d1e94b3d1b5
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'extsys')
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/conf/License.txt (renamed from extsys/src/main/webapp/extsys/sdncontroller/conf/License.txt) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/conf/dataconfig.json (renamed from extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html (renamed from extsys/src/main/webapp/extsys/sdncontroller/controller.html) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/css/RMain.css (renamed from extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/css/VMMain.css (renamed from extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap-table.min.css (renamed from extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap-table.min.css) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap.min.css (renamed from extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap.min.css) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/License.txt (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/License.txt) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/add.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/add.png) | bin | 1104 -> 1104 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/arrow-down-enable.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/arrow-down-enable.png) | bin | 1035 -> 1035 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/collapse_arrow.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/collapse_arrow.png) | bin | 1174 -> 1174 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/delete.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/delete.png) | bin | 1100 -> 1100 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/edit.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/edit.png) | bin | 3045 -> 3045 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/expand_arrow.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/expand_arrow.png) | bin | 1182 -> 1182 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/ideo_default_select.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/ideo_default_select.png) | bin | 1035 -> 1035 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/import.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/import.png) | bin | 1250 -> 1250 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/line.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/line.png) | bin | 139 -> 139 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/loading-spinner-grey.gif (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/loading-spinner-grey.gif) | bin | 5203 -> 5203 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/openo.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/openo.png) | bin | 49007 -> 49007 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_l.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/page_l.png) | bin | 1066 -> 1066 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_left_disabled.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/page_left_disabled.png) | bin | 1066 -> 1066 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_r.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/page_r.png) | bin | 1070 -> 1070 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_asc.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/sort_asc.png) | bin | 1118 -> 1118 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_both.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/sort_both.png) | bin | 1136 -> 1136 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_desc.png (renamed from extsys/src/main/webapp/extsys/sdncontroller/images/sort_desc.png) | bin | 1127 -> 1127 bytes | |||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js (renamed from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table-filter-control.min.js) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table.min.js (renamed from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table.min.js) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap.min.js (renamed from extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap.min.js) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/js/controller.js (renamed from extsys/src/main/webapp/extsys/sdncontroller/js/controller.js) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js (renamed from extsys/src/main/webapp/extsys/sdncontroller/js/jquery-1.11.2.min.js) | 0 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/index.html | 47 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/js/app.js | 359 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/js/rest.js | 95 | ||||
-rw-r--r-- | extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html | 162 |
34 files changed, 663 insertions, 0 deletions
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/conf/License.txt b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/License.txt index 8e698ecb..8e698ecb 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/conf/License.txt +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/License.txt diff --git a/extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/dataconfig.json index b39c904e..b39c904e 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/conf/dataconfig.json diff --git a/extsys/src/main/webapp/extsys/sdncontroller/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html index 144a9bec..144a9bec 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/controller.html +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/RMain.css index 12aa5066..12aa5066 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/RMain.css diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/VMMain.css index 048d814a..048d814a 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/VMMain.css diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap-table.min.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap-table.min.css index d72d0655..d72d0655 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap-table.min.css +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap-table.min.css diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap.min.css b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap.min.css index 679272d2..679272d2 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/css/bootstrap.min.css +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/css/bootstrap.min.css diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/License.txt b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/License.txt index 8e698ecb..8e698ecb 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/License.txt +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/License.txt diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/add.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/add.png Binary files differindex d1f82993..d1f82993 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/add.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/add.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/arrow-down-enable.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/arrow-down-enable.png Binary files differindex dc8ddbe6..dc8ddbe6 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/arrow-down-enable.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/arrow-down-enable.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/collapse_arrow.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/collapse_arrow.png Binary files differindex 8830741a..8830741a 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/collapse_arrow.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/collapse_arrow.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/delete.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/delete.png Binary files differindex 737f8797..737f8797 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/delete.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/delete.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/edit.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/edit.png Binary files differindex 68d76257..68d76257 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/edit.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/edit.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/expand_arrow.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/expand_arrow.png Binary files differindex f8935e1f..f8935e1f 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/expand_arrow.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/expand_arrow.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/ideo_default_select.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/ideo_default_select.png Binary files differindex 50c3a251..50c3a251 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/ideo_default_select.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/ideo_default_select.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/import.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/import.png Binary files differindex 8cfc5256..8cfc5256 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/import.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/import.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/line.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/line.png Binary files differindex 9d340a8d..9d340a8d 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/line.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/line.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/loading-spinner-grey.gif b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/loading-spinner-grey.gif Binary files differindex 6d614d3d..6d614d3d 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/loading-spinner-grey.gif +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/loading-spinner-grey.gif diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/openo.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/openo.png Binary files differindex 328b7353..328b7353 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/openo.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/openo.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_l.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_l.png Binary files differindex e8b98c7c..e8b98c7c 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/page_l.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_l.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_left_disabled.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_left_disabled.png Binary files differindex f72a90bd..f72a90bd 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/page_left_disabled.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_left_disabled.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/page_r.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_r.png Binary files differindex 2e637eee..2e637eee 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/page_r.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/page_r.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_asc.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_asc.png Binary files differindex a88d7975..a88d7975 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_asc.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_asc.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_both.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_both.png Binary files differindex 18670406..18670406 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_both.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_both.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_desc.png b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_desc.png Binary files differindex def071ed..def071ed 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/images/sort_desc.png +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/images/sort_desc.png diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table-filter-control.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js index d321a08e..d321a08e 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table-filter-control.min.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table.min.js index aa8e6854..aa8e6854 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap-table.min.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap-table.min.js diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap.min.js index b04a0e82..b04a0e82 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/bootstrap.min.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/bootstrap.min.js diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/controller.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/controller.js index c2ff0c84..c2ff0c84 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/controller.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/controller.js diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/jquery-1.11.2.min.js b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js index e6a051d0..e6a051d0 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/jquery-1.11.2.min.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js diff --git a/extsys/src/main/webapp/extsys/sdncontroller/index.html b/extsys/src/main/webapp/extsys/sdncontroller/index.html new file mode 100644 index 00000000..bb8e3cb9 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/index.html @@ -0,0 +1,47 @@ +<!--
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!DOCTYPE html>
+<html>
+<head lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Controller</title>
+ <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
+ <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
+ <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
+ <script src="thirdparty/js/angular.min.js"></script>
+ <script src="thirdparty/js/angular-ui-router.min.js"></script>
+ <!--<script src="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.js"></script>-->
+ <script src="thirdparty/js/ng-table.min.js"></script>
+ <script src="thirdparty/js/jquery_1.12.4.min.js"></script>
+ <!--<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>-->
+ <script src="thirdparty/js/jquery-ui.js"></script>
+ <script type="text/javascript" src="thirdparty/js/bootstrap.min.js"></script>
+ <script src="js/app.js"></script>
+ <script src="js/rest.js"></script>
+ <script src="framework/js/DataService.js"></script>
+ <script src="thirdparty/js/mustache.js"></script>
+
+
+</head>
+
+<body ng-app="ControllerApp" onload="loadTemplate()">
+ <ui-view></ui-view>
+</body>
+</html>
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js new file mode 100644 index 00000000..c6f601c2 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js @@ -0,0 +1,359 @@ +/*
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+
+var app = angular.module("ControllerApp", ["ui.router", "ngTable"])
+
+ /*.run(function($rootScope, $location, $state, LoginService) {
+ $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){
+ if (toState.authenticate && !LoginService.isAuthenticated()){
+ // User isn’t authenticated
+ $state.transitionTo("login");
+ event.preventDefault();
+ }
+ });
+ })*/
+ .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) {
+ //$routeProvider.caseInsensitiveMatch = true;
+ $urlMatcherFactoryProvider.caseInsensitive(true);
+ $urlRouterProvider.otherwise('/controller');
+ //$locationProvider.html5Mode(true).hashPrefix('!');
+ $stateProvider
+
+
+ .state("controller", {
+ url: "/controller",
+ templateUrl: "templates/controller.html",
+ controller: "controllerCtrl"
+ })
+ })
+
+ /*-------------------------------------------------------------------------------Controller---------------------------------------------------------------------*/
+ .controller("controllerCtrl", function ($scope, controllerDataService, $log, $compile,NgTableParams, $state) {
+
+ $scope.title = "Controller";
+ $scope.init = function() {
+ controllerDataService.getControllerData()
+ .then(function (data) {
+ $scope.data = data;
+ console.log("Data: ");
+ $log.info(data);
+ loadButtons();
+ }, function (reason) {
+
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
+ }
+
+ function loadButtons() {
+ var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+ var dialog = $(modelTemplate).filter('#dialog').html();
+ var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};
+ // var delete_data = {"title":"Delete Selected", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"deleteData()"};
+ var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);
+ //var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);
+ $('#extsysAction').html($compile(addhtml)($scope));
+ //$('#extsysAction').append($compile(deletehtml)($scope));
+
+ $scope.checkboxes = { 'checked': false, items: {} };
+
+ //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];
+ $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.data.controllerData});
+
+ /*$scope.$watch('checkboxes.checked', function(value) {
+ angular.forEach($scope.data.controllerData, function(item) {
+ console.log("#######"+item.id);
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
+ }
+ });
+ });*/
+
+ var modelSubmit_data = {"title":"OK", "clickAction":"saveData(ext.id)"};
+ var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
+ $('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));
+
+ var modelBtn_data = {"title":"Close", "clickAction":"closeModal()"};
+ var modelBtn_html = Mustache.to_html(def_button_tpl, modelBtn_data);
+ $('#myModal #footerBtns').append($compile(modelBtn_html)($scope));
+
+ var text = $(modelTemplate).filter('#textfield').html();
+ var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+
+ var extName = {"ErrMsg" : {"errmsg" : "Name is required.", "modalVar":"ext.Name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};
+ $('#myModal #name').append($compile(Mustache.to_html(text, extName.ErrMsg))($scope));
+
+ var extURL = {"ErrMsg" : {"errmsg" : "URL is required.", "modalVar":"ext.url", "errtag":"textboxErrURL", "errfunc":"validatetextboxURL", "required":true}};
+ $('#myModal #url').append($compile(Mustache.to_html(text, extURL.ErrMsg))($scope));
+
+ var extUserName = {"ErrMsg" : {"errmsg" : "UserName is required.", "modalVar":"ext.userName", "errtag":"textboxErrUserName", "errfunc":"validatetextboxUserName", "required":true}};
+ $('#myModal #username').append($compile(Mustache.to_html(text, extUserName.ErrMsg))($scope));
+
+ var extPassword = {"ErrMsg" : {"errmsg" : "Password is required.", "modalVar":"ext.Password", "errtag":"textboxErrPassword", "errfunc":"validatetextboxPassword", "required":true}};
+ $('#myModal #password').append($compile(Mustache.to_html(text, extPassword.ErrMsg))($scope));
+
+ var extVersion = {"ErrMsg" : {"errmsg" : "Version is required.", "modalVar":"ext.Version"}};
+ $('#myModal #version').append($compile(Mustache.to_html(text, extVersion.ErrMsg))($scope));
+
+ var extVendor = {"ErrMsg" : {"errmsg" : "Vendor is required.", "modalVar":"ext.Vendor"}};
+ $('#myModal #vendor').append($compile(Mustache.to_html(text, extVendor.ErrMsg))($scope));
+
+ var extDescription = {"ErrMsg" : {"textboxErr" : "Description is required.", "modalVar":"ext.Description"}};
+ $('#myModal #description').append($compile(Mustache.to_html(text, extDescription.ErrMsg))($scope));
+
+ /*var extProtocol = {"ErrMsg" : {"textboxErr" : "Protocol is required.", "modalVar":"ext.protocol"}};
+ $('#myModal #protocol').append($compile(Mustache.to_html(text, extProtocol.ErrMsg))($scope));*/
+
+ var dropdowndata_protocol = {
+ "modalVar" : "ext.Protocol",
+ "labelField" : "itemLabel",
+ "optionsValue" : JSON.stringify($scope.data.dropdownProtocolData.item)
+ };
+
+ console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);
+
+ $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));
+
+ var extProductName = {"ErrMsg" : {"textboxErr" : "ProductName is required.", "modalVar":"ext.productName"}};
+ $('#myModal #ProductName').append($compile(Mustache.to_html(text, extProductName.ErrMsg))($scope));
+
+ /*var extType = {"ErrMsg" : {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};
+ $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));*/
+
+ var dropdowndata_type = {
+ "modalVar" : "ext.Type",
+ "labelField" : "itemLabel",
+ "optionsValue" : JSON.stringify($scope.data.dropdownTypeData.item)
+ };
+
+ $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));
+
+
+
+ /*
+ var extType = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"ext.type", "placeholder":"Country"}};
+ $('#myModal #Type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));
+
+ var extCreate = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"ext.createTime", "placeholder":"memory"}};
+ $('#myModal #CreateTime').append($compile(Mustache.to_html(number, extCreate.ErrMsg))($scope));
+
+ var extOperation = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"ext.operation", "placeholder":"Hard Disk"}};
+ $('#myModal #Operation').append($compile(Mustache.to_html(text, extOperation.ErrMsg))($scope));*/
+
+
+
+ }
+
+ $scope.validatetextboxName = function (value){
+ if($scope.ext.Name) {
+ $scope.textboxErrName = false;
+ }
+ else
+ $scope.textboxErrName = true;
+ }
+
+ $scope.validatetextboxURL = function (value){
+ if($scope.ext.url) {
+ $scope.textboxErrURL = false;
+ }
+ else
+ $scope.textboxErrURL = true;
+ }
+
+ $scope.validatetextboxUserName = function (value){
+ if($scope.ext.userName) {
+ $scope.textboxErrUserName = false;
+ }
+ else
+ $scope.textboxErrUserName = true;
+ }
+
+ $scope.validatetextboxPassword = function (value){
+ if($scope.ext.Password) {
+ $scope.textboxErrPassword = false;
+ }
+ else
+ $scope.textboxErrPassword = true;
+ }
+
+
+ $scope.closeModal = function() {
+ console.log("Closing Modal...");
+ $('#myModal').modal('hide');
+ $state.reload();
+ }
+
+
+
+ /*$scope.checkAll = function () {
+ angular.forEach($scope.data, function (data) {
+ data.select = $scope.selectAll;
+ });
+ };*/
+
+ $scope.showAddModal = function () {
+ console.log("Showing Modal to Add data");
+ $scope.ext = {};
+ //$("#myModal").modal();
+ $("#myModal").modal({}).draggable();
+ $scope.textboxErrName = false;
+ $scope.textboxErrURL = false;
+ $scope.textboxErrUserName = false;
+ $scope.textboxErrPassword = false;
+ }
+ $scope.saveData = function (id) {
+ if (!$scope.textboxErrName && !$scope.textboxErrURL && !$scope.textboxErrUserName && !$scope.textboxErrPassword) {
+ if (id) {
+ //edit data
+ console.log("Editing data.." + JSON.stringify($scope.ext));
+ controllerDataService.editControllerData($scope.ext)
+ .then(function (data) {
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ else {
+ console.log("Adding data.." + JSON.stringify($scope.ext));
+ controllerDataService.addControllerData($scope.ext)
+ .then(function (data) {
+
+ $scope.message = "Success :-)";
+ $state.reload();
+ //$state.go($state.current.name, {}, {reload: true})
+ },
+ function (reason) {
+ //$log.info(reason);
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ $('#myModal').modal('hide');
+ }
+ }
+
+ $scope.deleteData = function (id) {
+ var confirmation=false;
+ var checkbox = false;
+ var dialog_tpl = $(modelTemplate).filter('#personDialog').html();
+ var error = {"err_data" : { "title": "Error",
+ "showClose": "true",
+ "closeBtnTxt": "Cancel",
+ "icon": "glyphicon glyphicon-exclamation-sign",
+ "iconColor": "icon_error",
+ "msg": "Do you really wanted to Delete?.",
+ "buttons": [
+ {
+ "text": "Ok", "action": "deleteConfirmation("+id+")"
+ }]
+ }};
+ angular.forEach($scope.checkboxes.items, function(value) {
+ if(value) {
+ checkbox = true;
+ }
+ });
+ if (checkbox || (typeof id !== "undefined")) {
+ var html = Mustache.to_html(dialog_tpl, error.err_data);
+ $($compile(html)($scope)).modal({backdrop: "static"});
+ }
+ }
+
+ $scope.deleteConfirmation = function(id) {
+ console.log("data in controller is :");
+ //$log.info($scope.data.controllerData);
+ var deleteArr = [];
+ if (typeof id !== "undefined"){
+
+ deleteArr.push(id);
+ }
+ else {
+ angular.forEach($scope.checkboxes.items, function(value , key) {
+ if(value) {
+ console.log("deleting name is :"+key);
+ deleteArr.push(key);
+ }
+ });
+ }
+ console.log("deleteArr: "+deleteArr);
+ for(var i = 0; i < deleteArr.length; i++) {
+ console.log("To be deleted : "+deleteArr[i]);
+ controllerDataService.deleteControllerData(deleteArr[i])
+ .then(function(data){
+ $scope.message = "Successfully deleted :-)";
+ $state.reload();
+ },
+ function(reason){
+ $scope.message = reason.status + " " + reason.statusText;
+ });
+ }
+ }
+
+ $scope.editData = function (id) {
+ console.log("To be edited : " + id);
+ var dataFound = false;
+ angular.forEach($scope.data.controllerData, function (data) {
+ if (!dataFound) {
+ if (data.id == id) {
+ console.log("Found : " + data.Name);
+ console.log("Data is sssss :"+data);
+ $scope.ext = data;
+ $("#myModal").modal();
+ dataFound = true;
+ }
+ }
+ });
+ }
+
+
+ })
+
+
+/*var modelTemplate;
+
+function loadTemplate() {
+ $.get('template.html', function (template) {
+ modelTemplate = template;
+ });
+}*/
+
+var modelTemplate = "";
+function loadTemplate() {
+ $.get('framework/template.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('framework/templateContainer.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('framework/templateWidget.html', function (template) {
+ //console.log("Template is : "+template);
+ modelTemplate += template;
+ });
+ $.get('framework/templateNotification.html', function (template) {
+ modelTemplate += template;
+ });
+ $.get('framework/templateFunctional.html', function (template) {
+ modelTemplate += template;
+ });
+}
+
+
+
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js new file mode 100644 index 00000000..47b94c64 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js @@ -0,0 +1,95 @@ +/*
+
+ Copyright 2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ */
+
+
+app.factory("controllerDataService", function($http, DataService, $log){
+ var uri = 'http://192.168.9.13:18008';
+ return {
+ getControllerData : function() {
+ /*return $http({
+ url: 'http://localhost:3000/api/getControllerData',
+ method: 'GET',
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ //$log.info(response);
+ return response.data;
+ });*/
+ return DataService.get(uri+'/openoapi/extsys/v1/sdncontrollers')
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
+ addControllerData : function(controllerData) {
+ /*return $http({
+ url: 'http://localhost:3000/api/addProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json '}
+ }).then(function(response){
+ console.log("Response : ");
+ $log.info(response.data);
+ return response.data;
+ });*/
+ return DataService.post(uri+'/openoapi/extsys/v1/sdncontrollers', controllerData)
+ .then(function(response){
+ console.log("Successfully added.. Data returned in DataService is");
+ console.log(response.data);
+ return response.data;
+ });
+ },
+ deleteControllerData : function(id) {
+ /*return $http({
+ url: 'http://localhost:3000/api/deleteProvinceData',
+ method: 'POST',
+ data: {'idList':idList},
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Deleted..");
+ $log.info(response);
+ return response.data;
+ });*/
+ return DataService.delete(uri+'/openoapi/extsys/v1/sdncontrollers/'+id)
+ .then(function(response){
+ $log.info("in delete data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
+ editControllerData : function(controllerData) {
+ /*return $http({
+ url: 'http://localhost:3000/api/editProvinceData',
+ method: 'POST',
+ data: provinceDetail,
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ console.log("Successfully Edited...");
+ $log.info(response);
+ return response.data;
+ });*/
+
+ return DataService.put(uri+'/openoapi/extsys/v1/sdncontrollers', controllerData)
+ .then(function(response){
+ console.log("Successfully edited.. Data returned in DataService is");
+ console.log(response.data);
+ return response.data;
+ });
+ }
+ }
+});
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html new file mode 100644 index 00000000..faa336d1 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html @@ -0,0 +1,162 @@ +<!--/* Copyright 2017, Huawei Technologies Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/-->
+
+<div class="homecontent center">
+ <div class="col-md-12 col-sm-12 col-lg-12">
+<h4>{{title}}</h4>
+<br>
+<br>
+
+<div id="extsysAction" ng-init="init()">
+
+</div>
+<br><br>
+
+<table ng-table="controllerTableParams" class="table table-bordered table-striped customtable" show-filter="true">
+ <tr ng-repeat="controllerData in $data">
+ <!--<td header="'ng-table/headers/checkbox.html'">
+ <input type="checkbox" ng-model="checkboxes.items[controllerData.id]" />
+ </td>-->
+ <td title="'Name'" filter="{ Name: 'text'}" sortable="'Name'">
+ {{controllerData.Name}}
+ </td>
+ <td title="'Protocol'" filter="{ Protocol: 'text'}" sortable="'Protocol'">
+ {{controllerData.Protocol}}
+ </td>
+ <td title="'Product Name'" filter="{ productName: 'text'}" sortable="'productName'">
+ {{controllerData.productName}}
+ </td>
+ </td>
+ <td title="'Type'" filter="{ Type: 'text'}" sortable="'Type'">
+ {{controllerData.Type}}
+ </td>
+ <td title="'Vendor'" filter="{ Vendor: 'text'}" sortable="'Vendor'">
+ {{controllerData.Vendor}}
+ </td>
+ <td title="'Version'" filter="{ Version: 'number'}" sortable="'Version'">
+ {{controllerData.Version}}
+ </td>
+ <td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">
+ {{controllerData.Description}}
+ </td>
+ <td title="'Create Time'" filter="{ createTime: 'number'}" sortable="'createTime'">
+ {{controllerData.createTime}}
+ </td>
+ <td title="'Operation'" filter="{ Operation: 'text'}" sortable="'Operation'">
+ {{controllerData.Operation}}
+ </td>
+ <td title="'Action'">
+ <!-- <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(controllerData.name)" style="cursor: pointer;margin: 0 5px"></span>
+ <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(controllerData.name)" style="cursor: pointer;margin: 0 5px"></span>-->
+ <span ng-click="editData(controllerData.id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteData(controllerData.id)" style="cursor: pointer;margin: 0 5px"><img src="framework/images/delete.png" height="15" align="middle"/></span>
+ </td>
+ </tr>
+</table>
+
+<!--<script type="text/ng-template" id="ng-table/headers/checkbox.html">
+ <input type="checkbox" ng-model="checkboxes.checked" name="filter-checkbox" value="" />
+</script>-->
+
+<div id="myTable"></div>
+
+<!-- Modal -->
+<div id="myModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h5 class="modal-title">Modal Header</h5>
+ </div>
+ <form name="extsysForm" method="post">
+ <div class="modal-body">
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Name</label>
+ <div id="name" class="col-xs-8">
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">URL</label>
+ <div id="url" class="col-xs-8">
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">User Name</label>
+ <div id="username" class="col-xs-8">
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Password</label>
+ <div id="password" class="col-xs-8">
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Version</label>
+ <div id="version" class="col-xs-8" >
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Vendor</label>
+ <div id="vendor" class="col-xs-8" >
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Description</label>
+ <div id="description" class="col-xs-8" >
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Protocol</label>
+ <div id="protocol" class="col-xs-8" >
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Product Name</label>
+ <div id="ProductName" class="col-xs-8" >
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label class="col-xs-4 col-form-label">Type</label>
+ <div id="type" class="col-xs-8" >
+ </div>
+ </div>
+
+ </div>
+
+ <div id="footerBtns" class="modal-footer">
+ <!--<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>-->
+ <!--<input type="submit" class="btn btn-default" value="Submit"/>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </form>
+ </div>
+
+
+ </div>
+</div>
+ </div>
+ </div>
\ No newline at end of file |