Integrate new files for Resmgr to the Main Client
authorseshukm <seshu.kumar.m@huawei.com>
Tue, 28 Mar 2017 13:07:53 +0000 (18:37 +0530)
committerseshukm <seshu.kumar.m@huawei.com>
Tue, 28 Mar 2017 13:08:42 +0000 (18:38 +0530)
IssueId : CLIENT-46

Change-Id: I2210e5eb2b33e6ba7b5a37ae2f3822e2ff9be80b
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
resmgr/src/main/webapp/resmgr/js/DataService.js [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/templates/templateContainer.html [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/templates/templateFunctional.html [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/templates/templateNotification.html [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/templates/templateWidget.html [new file with mode: 0644]
resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html [new file with mode: 0644]

diff --git a/resmgr/src/main/webapp/resmgr/js/DataService.js b/resmgr/src/main/webapp/resmgr/js/DataService.js
new file mode 100644 (file)
index 0000000..f374bbd
--- /dev/null
@@ -0,0 +1,80 @@
+app.factory("DataService", function($http, $log) {
+    return {
+        /**
+         *
+         * @param url - url of the service
+         * @param data - data as an object (used as query string in url)
+         * @returns {*}
+         */
+        get: function (url, data) {
+            if(data) {
+                url += "?";
+                for(key in data){
+                    url += key+ "=" + data[key];
+                }
+            }
+            return $http({
+                url: url,
+                method: 'GET',
+                data: null,
+                headers: {'Content-Type': 'application/json'}
+            }).then(function (response) {
+                return response.data;
+            });
+        },
+        /**
+         *
+         * @param url - url of the service
+         * @param data - data as an object (used for post method)
+         * @returns {*}
+         */
+        post: function (url, data) {
+            return $http({
+                url: url,
+                method: 'POST',
+                data: data,
+                headers: {'Content-Type': 'application/json '}
+            }).then(function (response) {
+                console.log("Response : ");
+                $log.info(response.data);
+                return response.data;
+            });
+        },
+        /**
+         * TODO - To Check for Delete
+         * @param url
+         * @param data
+         * @returns {*}
+         */
+        delete: function (url) {
+            return $http({
+                url: url,
+                method: 'DELETE',
+                data: null,
+                headers: {'Content-Type': 'application/json '}
+            }).then(function (response) {
+                console.log("Response : ");
+                $log.info(response.data);
+                return response.data;
+            });
+        },
+        /**
+         *
+         * @param url
+         * @param data
+         */
+        put: function (url, data) {
+            return $http({
+                url: url,
+                method: 'PUT',
+                data: data,
+                headers: {'Content-Type': 'application/json '}
+            }).then(function (response) {
+                console.log("Response : ");
+                $log.info(response.data);
+                return response.data;
+            });
+        }
+
+    }
+})
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/templates/templateContainer.html b/resmgr/src/main/webapp/resmgr/templates/templateContainer.html
new file mode 100644 (file)
index 0000000..ef6f01c
--- /dev/null
@@ -0,0 +1,79 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+<!-- Accordion -->\r
+<script id="accordion" type="text/html">\r
+    {{#items}}\r
+    <div class="panel panel-default">\r
+        <h3 class="panel-title">\r
+            <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>\r
+        </h3>\r
+        <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">\r
+            <div class="panel-body"> {{msg}} </div>\r
+        </div>\r
+    </div>\r
+    {{/items}}\r
+</script>\r
+\r
+<!--Tabs-->\r
+<script id="tabs" type="text/html">\r
+    <ul class="nav nav-tabs">\r
+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}\r
+    </ul>\r
+    <div class="tab-content">\r
+        {{#items}}\r
+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">\r
+            <h3>{{tablabel}}</h3>\r
+            <p>{{msg}}</p>\r
+        </div>\r
+        {{/items}}\r
+    </div>\r
+</script>\r
+\r
+<!--Vertical Tabs-->\r
+<script id="vtabs" type="text/html">\r
+    <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">\r
+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}\r
+    </ul>\r
+    <div class="tab-content col-sm-8 col-md-8 col-lg-8">\r
+        {{#items}}\r
+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">\r
+            <h3>{{tablabel}}</h3>\r
+            <p>{{msg}}</p>\r
+        </div>\r
+        {{/items}}\r
+    </div>\r
+</script>\r
+\r
+<!--Table-->\r
+<script id="table" type="text/html">\r
+    {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}\r
+    <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">\r
+        <thead>\r
+        <tr>\r
+            {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}\r
+        </tr>\r
+        </thead>\r
+        <tbody>\r
+        {{#rowitem}}\r
+        <tr>\r
+            {{#values}}<td>{{.}}</td>{{/values}}\r
+        </tr>\r
+        {{/rowitem}}\r
+        </tbody>\r
+    </table>\r
+</script>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/templates/templateFunctional.html b/resmgr/src/main/webapp/resmgr/templates/templateFunctional.html
new file mode 100644 (file)
index 0000000..ff2f53f
--- /dev/null
@@ -0,0 +1,82 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<script id="functionalDialog" type="text/html">\r
+    <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">\r
+        <div class="modal-dialog modal-md">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <h4 class="modal-title titlestyle">{{title}}</h4>\r
+                </div>\r
+                <div class="modal-body">\r
+                    <div>\r
+                        <form class="form-horizontal" role="form">\r
+                            {{#labels}}\r
+                            <div class="form-group">\r
+                                <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>\r
+                                <div class="col-sm-7">\r
+                                    <input type={{type}} class="form-control" id={{input_id}}>\r
+                                </div>\r
+                            </div>\r
+                            {{/labels}}\r
+                        </form>\r
+                    </div>\r
+                </div>\r
+                <div class="modal-footer">\r
+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" >{{text}}</button> {{/buttons}}\r
+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}\r
+                    </div>\r
+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->\r
+                </div>\r
+            </div>\r
+\r
+        </div>\r
+    </div>\r
+</script>\r
+\r
+\r
+<script id="dialog" type="text/html">\r
+    <div id="uniModal" class="modal fade" role="dialog">\r
+        <div class="modal-dialog">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <div class="modalHeader"></div>\r
+                </div>\r
+                <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->\r
+                    <div class="modal-body">\r
+                        <div class="modalBodyContent">\r
+                        </div>\r
+                    </div>\r
+\r
+                    <div id="footerBtns" class="modal-footer">\r
+                    </div>\r
+\r
+                </form>\r
+            </div>\r
+\r
+\r
+        </div>\r
+    </div>\r
+\r
+</script>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/templates/templateNotification.html b/resmgr/src/main/webapp/resmgr/templates/templateNotification.html
new file mode 100644 (file)
index 0000000..97f26e3
--- /dev/null
@@ -0,0 +1,48 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<!--Dialog-->\r
+<script id="personDialog" type="text/html">\r
+    <div id="msgModal" class="modal fade" role="dialog">\r
+        <div class="modal-dialog modal-md">\r
+\r
+            <!-- Modal content-->\r
+            <div class="modal-content">\r
+                <div class="modal-header">\r
+                    <button type="button" class="close" data-dismiss="modal">&times;</button>\r
+                    <h4 class="modal-title titlestyle">{{title}}</h4>\r
+                </div>\r
+                <div class="modal-body">\r
+                    <div class="container center">\r
+                        <div class="row">\r
+                            <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>\r
+                            <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>\r
+                        </div>\r
+                    </div>\r
+                </div>\r
+                <div class="modal-footer">\r
+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" ng-click={{action}}>{{text}}</button> {{/buttons}}\r
+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}\r
+                    </div>\r
+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->\r
+                </div>\r
+            </div>\r
+\r
+        </div>\r
+    </div>\r
+</script>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/templates/templateWidget.html b/resmgr/src/main/webapp/resmgr/templates/templateWidget.html
new file mode 100644 (file)
index 0000000..bb8eef4
--- /dev/null
@@ -0,0 +1,222 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->\r
+<script id="defaultButtons" type="text/html">\r
+    <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>\r
+</script>\r
+\r
+<script id="defaultIconButtons" type="text/html">\r
+    <button id="iconBtn" type="button" class="btnDefault  btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}\r
+        <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!-- Visual Buttons -->\r
+<script id="visualButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Different sized Buttons -->\r
+<script id="sizeButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Icon Buttons -->\r
+<script id="iconButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}\r
+        <span class="glyphicon {{gType}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!--Dropdown template-->\r
+<script id="dropDown" type="text/html">\r
+    <div class="drop{{position}}">\r
+        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+            <span class="caret"></span>\r
+        </button>\r
+        <ul class="dropdown-menu">\r
+            {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}\r
+        </ul>\r
+    </div>\r
+</script>\r
+\r
+<script id="dropDownHeader" type="text/html">\r
+    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+        <span class="caret"></span>\r
+    </button>\r
+    <ul class="dropdown-menu">\r
+        {{#items}}\r
+        {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}\r
+        {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}\r
+        {{/items}}\r
+    </ul>\r
+</script>\r
+\r
+<script id="simpleDropdownTmpl" type="text/html">\r
+    <div class="dropdownplain">\r
+\r
+        <select class="inputfield form-control" ng-model="{{modalVar}}" ng-options="item.{{labelField}} for item in {{optionsValue}}">\r
+            <option style="display:none" value="">--select--</option>\r
+        </select>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Radio Buttons-->\r
+<script id="radioButtons" type="text/html">\r
+    <div>\r
+        <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>\r
+        <label for="radio{{id}}">{{label}}</label></br>\r
+    </div>\r
+</script>\r
+\r
+<!--Check boxes template-->\r
+<script id="checkBoxes" type="text/html">\r
+    <div class="funkyradio-{{type}}">\r
+        <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />\r
+        <label for="checkbox{{id}}">{{label}}</label>\r
+    </div>\r
+</script>\r
+\r
+<!--text-->\r
+<script id="textfield" type="text/html">\r
+    <div class="css-form">\r
+       <input id ="textbox" name="textbox" class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}> {{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--email-->\r
+<script id="email" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="email"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--url-->\r
+<script  id="url" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="url"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--password-->\r
+<script  id="password" type="text/html">\r
+    <div class="css-form">\r
+\r
+\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="password" pattern=".{3,}" maxlength="{{#maxLength}}{{maxLength}}{{/maxLength}}{{^maxLength}}9{{/maxLength}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--numeric-->\r
+<script id="numeric" type="text/html">\r
+    <div class="css-form">\r
+        <input  class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}/>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--dot-->\r
+<script  id="dot" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="datetime-local"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--date-->\r
+<script  id="dateinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="date" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--Month-->\r
+<script  id="monthinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="month"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Week-->\r
+<script   id="weekinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="week"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--time-->\r
+<script   id="timeinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="time"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv4-->\r
+<script   id="ipv4" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv6-->\r
+<script   id="ipv6" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"   placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="ipv6"  pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--textarea-->\r
+<script id="textarea" type="text/html">\r
+    <div class="css-form">\r
+        <textarea class="form-control inputfield"  rows="4" cols="50" placeholder="{{placeholder}}" ng-model="{{modalVar}}"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}></textarea>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--note-->\r
+<script id="note" type="text/html">\r
+\r
+    <a  id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">\r
+        <span class="glyphicon glyphicon-info-sign "></span></a>\r
+</script>\r
+\r
+<!-- list -->\r
+<script id="list" type="text/html">\r
+\r
+    {{#items}}\r
+\r
+    <div>\r
+        <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage('{{id}}', '{{level}}', '{{row}}')">{{title}}</button>\r
+    </div>\r
+\r
+    {{/items}}\r
+\r
+</script>\r
diff --git a/resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html b/resmgr/src/main/webapp/resmgr/templates/templateWidget_old.html
new file mode 100644 (file)
index 0000000..fb2528d
--- /dev/null
@@ -0,0 +1,226 @@
+<!--\r
+\r
+    Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
+\r
+    Licensed under the Apache License, Version 2.0 (the "License");\r
+    you may not use this file except in compliance with the License.\r
+    You may obtain a copy of the License at\r
+\r
+            http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+    Unless required by applicable law or agreed to in writing, software\r
+    distributed under the License is distributed on an "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+    See the License for the specific language governing permissions and\r
+    limitations under the License.\r
+\r
+-->\r
+\r
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->\r
+<script id="defaultButtons" type="text/html">\r
+    <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>\r
+</script>\r
+\r
+<script id="defaultIconButtons" type="text/html">\r
+    <button id="iconBtn" type="button" class="btnDefault  btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}\r
+        <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!-- Visual Buttons -->\r
+<script id="visualButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Different sized Buttons -->\r
+<script id="sizeButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>\r
+</script>\r
+\r
+<!-- Icon Buttons -->\r
+<script id="iconButtons" type="text/html">\r
+    <button type="button" class="btn btn-{{type}}">{{title}}\r
+        <span class="glyphicon {{gType}}"></span>\r
+    </button>\r
+</script>\r
+\r
+<!--Dropdown template-->\r
+<script id="dropDown" type="text/html">\r
+    <div class="drop{{position}}">\r
+        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+            <span class="caret"></span>\r
+        </button>\r
+        <ul class="dropdown-menu">\r
+            {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}\r
+        </ul>\r
+    </div>\r
+</script>\r
+\r
+<script id="dropDownHeader" type="text/html">\r
+    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}\r
+        <span class="caret"></span>\r
+    </button>\r
+    <ul class="dropdown-menu">\r
+        {{#items}}\r
+        {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}\r
+        {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}\r
+        {{/items}}\r
+    </ul>\r
+</script>\r
+\r
+<script id="simpleDropdownTmpl" type="text/html">\r
+    <div class="dropdownplain">\r
+        <ul class="nav navbar-nav">\r
+            <li>\r
+                <a class="dropdown-toggle" data-toggle="dropdown">{{title}} <span class="glyphicon glyphicon-chevron-down pull-right"></span></a>\r
+                <ul class="dropdown-menu">\r
+                    {{#items}}<li><a target="_blank">{{itemLabel}}</a></li>{{/items}}\r
+                </ul>\r
+            </li>\r
+        </ul>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Radio Buttons-->\r
+<script id="radioButtons" type="text/html">\r
+    <div>\r
+        <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>\r
+        <label for="radio{{id}}">{{label}}</label></br>\r
+    </div>\r
+</script>\r
+\r
+<!--Check boxes template-->\r
+<script id="checkBoxes" type="text/html">\r
+    <div class="funkyradio-{{type}}">\r
+        <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />\r
+        <label for="checkbox{{id}}">{{label}}</label>\r
+    </div>\r
+</script>\r
+\r
+<!--text-->\r
+<script id="textfield" type="text/html">\r
+    <div class="css-form">\r
+       <input id ="textbox" name="textbox" class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}> {{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--email-->\r
+<script id="email" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="email"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--url-->\r
+<script  id="url" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="url"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--password-->\r
+<script  id="password" type="text/html">\r
+    <div class="css-form">\r
+\r
+\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="password" pattern=".{3,}" maxlength="{{#maxLength}}{{maxLength}}{{/maxLength}}{{^maxLength}}9{{/maxLength}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--numeric-->\r
+<script id="numeric" type="text/html">\r
+    <div class="css-form">\r
+        <input  class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}/>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--dot-->\r
+<script  id="dot" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="datetime-local"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--date-->\r
+<script  id="dateinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="date" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--Month-->\r
+<script  id="monthinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="month"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+\r
+<!--Week-->\r
+<script   id="weekinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="week"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--time-->\r
+<script   id="timeinput" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"  placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="time"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv4-->\r
+<script   id="ipv4" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--ipv6-->\r
+<script   id="ipv6" type="text/html">\r
+    <div class="css-form">\r
+        <input class="form-control inputfield"   placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="ipv6"  pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--textarea-->\r
+<script id="textarea" type="text/html">\r
+    <div class="css-form">\r
+        <textarea class="form-control inputfield"  rows="4" cols="50" placeholder="{{placeholder}}" ng-model="{{modalVar}}"  ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}></textarea>{{#required}}<span class="staricon">*</span>{{/required}}\r
+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>\r
+    </div>\r
+</script>\r
+\r
+<!--note-->\r
+<script id="note" type="text/html">\r
+\r
+    <a  id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">\r
+        <span class="glyphicon glyphicon-info-sign "></span></a>\r
+</script>\r
+\r
+<!-- list -->\r
+<script id="list" type="text/html">\r
+\r
+    {{#items}}\r
+\r
+    <div>\r
+        <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage('{{id}}', '{{level}}', '{{row}}')">{{title}}</button>\r
+    </div>\r
+\r
+    {{/items}}\r
+\r
+</script>\r