Merge "Add rule manager common component"
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/controller.html
index 5151238..144a9be 100644
--- a/extsys/src/main/webapp/extsys/sdncontroller/controller.html
+++ b/extsys/src/main/webapp/extsys/sdncontroller/controller.html
@@ -101,7 +101,7 @@
                             </th>
                             <th
                                     class="openo-table-state-default openo-table-th openo-table-disable-element  leftHeaderAlign"
-                                    data-field="productname" data-sortable="true" data-filter-control="input">
+                                    data-field="productName" data-sortable="true" data-filter-control="input">
                                 <div class="openo-table-th-border"></div>
                                 <div class="DataTables_sort_wrapper openo-ellipsis ">
                                             <span id="ctrler_productname_sorticon"
@@ -229,7 +229,7 @@
                                                     class="required">*</span>
                                             </label>
                                             <div class="col-sm-7">
-                                                <input type="text" id="username" name="username"
+                                                <input type="text" id="userName" name="userName"
                                                        class="form-control"/>
                                             </div>
                                         </div>
@@ -281,7 +281,7 @@
                                             <label class="col-sm-3 control-label"> <span>Product Name</span>
                                             </label>
                                             <div class="col-sm-7">
-                                                <input type="text" id="productname" name="productname"
+                                                <input type="text" id="productName" name="productName"
                                                        class="form-control"/>
                                             </div>
                                         </div>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/css/open-ostyle.css b/lifecyclemgr/src/main/webapp/lifecyclemgr/css/open-ostyle.css
index 52c3076..2aa348c 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/css/open-ostyle.css
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/css/open-ostyle.css
@@ -1,6 +1,6 @@
 /*

 

-    Copyright 2016-2017, Huawei Technologies Co., Ltd.

+    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.

@@ -223,7 +223,7 @@
 }

 

 .homecontent {

-    text-align: center;

+    /* text-align: center; */

     letter-spacing: 1.4px;

 }

 

@@ -315,7 +315,6 @@
     transform: translateY(-50%);

     padding-left: 70px;

     white-space: normal;

-    color:blue;

 }

 

 /* Functional */

@@ -562,6 +561,7 @@
 .modal-header {

 	/*background-color: #cccccc;*/

     background: linear-gradient(to bottom, #fbfbfb 0, #f6f6f6 70%, #f0f0f0 100%);

+    padding:0px;

 }

 

 /* Tree */

@@ -622,6 +622,10 @@
     font-size: 12px;

 }

 

+tr{

+	text-align:center;

+}

+

 /* Vertical Tab */

 .nav-stacked {

     margin-top: 20px;

@@ -640,9 +644,10 @@
     background-color: transparent;

 }

 .nav-stacked>li.active>a {

-    background-color: #ccc;

+    background-color: #fff;

     border: none;

     border-radius: 4px;

+    border-left: 3px solid #4ac9ff;

 }

 

 #vtabArea .tab-content .tab-pane {

@@ -767,10 +772,10 @@
     letter-spacing: 3px;

     width:100%;

 }

-#notifications h5, #functional h5{

+ #functional h5{

     padding : 0;

 }

-#notifications a, #functional a{

+ #functional a{

     padding: 12px 14px;

 }

 .tableAlign{

@@ -836,7 +841,7 @@
 }

 

 #menu_accordion .collapsed span {

-    background: url(../thirdparty/images/expand_arrow.png) 1px 3px no-repeat;

+    background: url(../../thirdparty/images/expand_arrow.png) 1px 3px no-repeat;

     display: block;

     float: left;

     margin-bottom: -1px;

@@ -845,7 +850,7 @@
     padding-left: 20px;

 }

 #menu_accordion span {

-    background: url(../thirdparty/images/collapse_arrow.png) 1px 3px no-repeat;

+    background: url(../../thirdparty/images/collapse_arrow.png) 1px 3px no-repeat;

     display: block;

     float: left;

     margin-bottom: -1px;

@@ -939,7 +944,8 @@
 

 .labelstyle{

     text-align:left;

-    font-size:12px;

+    font-size:14px;

+    font-weight: 700;

     font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;

 }

 

@@ -947,12 +953,68 @@
     font-size:14px !important;

     font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;

 }

+

+.header{

+    text-align:left;

+    font-size:14px;

+    font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;

+}

+

+.message{

+    font-size:12px;

+    font-family: "Microsoft Yahei",Arial,Tahoma,Verdana,SimSun;

+}

+

 .shortnoteHeader {

     color : blue;

 }

 .shortnoteText {

-    font-size : 12px;

+    font-size : 10px;

 }

-tr{

-    text-align:center;

+.form-group, .modal-header{

+    text-align: left;

 }

+

+.labelHeader, .labelTitle {

+    font-size: 28px;

+    font-weight: bold;

+    color: #333;

+    text-transform: capitalize;

+    border-top: 2px solid #f1f1f1;

+    border-bottom: 2px solid #f1f1f1;

+    padding: 13px 5px;

+    display: inline-block;

+    letter-spacing: 5px;

+}

+

+.labelTitle {

+    font-size: 24px;

+    font-weight: normal;

+    text-align: left;

+    border: none;

+}

+

+pre code {

+    white-space: pre-line;

+

+}

+.plus-icon {

+    background-image: url("../../thirdparty/images/add.png");

+}

+.edit-icon {

+    background-image: url("../../thirdparty/images/edit.png");

+}

+.delete-icon {

+    background-image: url("../../thirdparty/images/delete.png");

+}

+

+.staricon{

+    color: red;

+    float: right;

+}

+

+.inputfield{

+    width:95%;

+    display:inline-block;

+

+}
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/css/style.css b/lifecyclemgr/src/main/webapp/lifecyclemgr/css/style.css
index e551d23..e7de35c 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/css/style.css
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/css/style.css
@@ -1,3 +1,18 @@
+/* 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.

+ */

+ 

 .lcmanager{

     padding: 0 50px;

 }

@@ -38,6 +53,7 @@
 

 #lctabArea{

     margin-top:100px;

+    text-align: center;

 }

 #lctabArea .nav-tabs{

     border-bottom: 1px solid #4ac9ff;

@@ -119,10 +135,10 @@
 }

 

 .mT15 input {

-    margin-left: 10px;

+    /*margin-left: 10px;*/

     width: 100%;

     padding: 8px 12px;

-    background: #f1f1f1;

+    /*background: #f1f1f1;*/

     border: 1px solid #ccc;

     border-radius: 4px;

     font-size: 16px;

@@ -146,11 +162,30 @@
     margin-top:25px;

 }

 

-.nav>li>a:hover, .nav>li>a:focus {

+.nav>li>a:hover {

     text-decoration: none;

     background-color: #eee;

 }

 

 select {

     padding: 0 !important;

+}

+

+#myModal {

+    text-align: center;

+}

+#myModal .modal-content .modal-body .tab-content {

+    overflow-x: hidden;

+    overflow-y: auto;

+    max-height: 500px;

+}

+

+.row-content {

+    overflow: hidden;

+    margin-bottom: 7px;

+}

+

+.delete-icon {

+    background: url("../images/delete.png") no-repeat;

+    height: 16px;

 }
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt b/lifecyclemgr/src/main/webapp/lifecyclemgr/fonts/License.txt
similarity index 100%
copy from resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt
copy to lifecyclemgr/src/main/webapp/lifecyclemgr/fonts/License.txt
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/i18n/lcm-template-parameters-i18n-en-US.properties b/lifecyclemgr/src/main/webapp/lifecyclemgr/i18n/lcm-template-parameters-i18n-en-US.properties
new file mode 100644
index 0000000..f2128a0
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/i18n/lcm-template-parameters-i18n-en-US.properties
@@ -0,0 +1,110 @@
+ # 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.
+ #
+
+domainHost=Domain
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac1_ip=Left AC
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac1_peer_ip=Left CE IP
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac1_port=Left Port
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac1_route=Left Route
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac1_svlan=Left VLAN
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac2_ip=Right AC
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac2_peer_ip=Right CE IP
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac2_port=Right Port
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac2_route=Right Route
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.ac2_svlan=Right VLAN
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.description=Description
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.name=Service Name
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.pe1_ip=Left PE IP
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.pe2_ip=Right PE IP
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.serviceType=Service Type
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.technology=Technology
+tosca.nodes.sdn.ext.NS.ns_underlayervpn.topology=Topology
+tosca.nodes.sdn.ext.NS.enterprise2DC.dcFWIP=Firewall IP
+tosca.nodes.sdn.ext.NS.enterprise2DC.dcGWIP=Gateway IP
+tosca.nodes.sdn.ext.NS.enterprise2DC.dcLBIP=Load Balancer IP
+tosca.nodes.sdn.ext.NS.enterprise2DC.description=Description
+tosca.nodes.sdn.ext.NS.enterprise2DC.id=ID
+tosca.nodes.sdn.ext.NS.enterprise2DC.name=Service Name
+tosca.nodes.sdn.ext.NS.enterprise2DC.siteAccessPortVlan=ThinCPE VLAN
+tosca.nodes.sdn.ext.NS.enterprise2DC.siteCidr=Enterprise cidr
+tosca.nodes.sdn.ext.NS.enterprise2DC.siteThinCpeIP=ThinCPE IP
+tosca.nodes.sdn.ext.NS.enterprise2DC.siteVNI=ThinCPE VxLAN ID
+tosca.nodes.sdn.ext.NS.enterprise2DC.vCPE_MgrIp=vCPE IP
+tosca.nodes.sdn.ext.NS.enterprise2DC.vpcName=VPC Name
+tosca.nodes.sdn.ext.NS.enterprise2DC.vpcSubnetCidr=VPC cidr
+tosca.nodes.sdn.ext.NS.enterprise2DC.vpcSubnetName=VPC Subnet Name
+tosca.nodes.sdn.ext.NS.enterprise2DC.vpcVNI=VPC VxLAN ID
+tosca.nodes.nfv.NS.VBRAS_NS.externalDataNetworkName=External Data Network Name
+tosca.nodes.nfv.NS.VBRAS_NS.externalManageNetworkName=External Management Network Name
+tosca.nodes.nfv.NS.VCPE_NS.sfc_data_network=SFC Data Network Name
+tosca.nodes.nfv.NS.VCPE_NS.externalManageNetworkName=External Management Network Name
+tosca.nodes.nfv.NS.VCPE_NS.NatIpRange=Nat Ip Range
+tosca.nodes.nfv.NS.VCPE_NS.m6000_mng_ip=M6000 Mng IP
+tosca.nodes.nfv.NS.VCPE_NS.externalPluginManageNetworkName=External Plugin Management Network Name
+tosca.nodes.nfv.NS.VCPE_NS.externalDataNetworkName=External Data Network Name
+tosca.nodes.nfv.NS.POP_NS.sfc_data_network=SFC Data Network Name
+tosca.nodes.nfv.NS.POP_NS.externalManageNetworkName=External Management Network Name
+tosca.nodes.nfv.NS.POP_NS.NatIpRange=Nat Ip Range
+tosca.nodes.nfv.NS.POP_NS.m6000_mng_ip=M6000 Mng IP
+tosca.nodes.nfv.NS.POP_NS.externalPluginManageNetworkName=External Plugin Management Network Name
+tosca.nodes.nfv.NS.POP_NS.externalCompanyFtpDataNetworkName=External Company Ftp Data Network Name
+tosca.nodes.nfv.NS.POP_NS.externalDataNetworkName=External Data Network Name
+ac1_ip=Left AC
+ac1_peer_ip=Left CE IP
+ac1_port=Left Port
+ac1_route=Left Route
+ac1_svlan=Left VLAN
+ac2_ip=Right AC
+ac2_peer_ip=Right CE IP
+ac2_port=Right Port
+ac2_route=Right Route
+ac2_svlan=Right VLAN
+description=Description
+name=Service Name
+pe1_ip=Left PE IP
+pe2_ip=Right PE IP
+serviceType=Service Type
+technology=Technology
+topology=Topology
+dcFWIP=Firewall IP
+dcGWIP=Gateway IP
+dcLBIP=Load Balancer IP
+description=Description
+id=ID
+name=Service Name
+siteAccessPortVlan=ThinCPE VLAN
+siteCidr=Enterprise cidr
+siteThinCpeIP=ThinCPE IP
+siteVNI=ThinCPE VxLAN ID
+vCPE_MgrIp=vCPE IP
+vpcName=VPC Name
+vpcSubnetCidr=VPC cidr
+vpcSubnetName=VPC Subnet Name
+vpcVNI=VPC VxLAN ID
+externalDataNetworkName=External Data Network Name
+externalManageNetworkName=External Management Network Name
+sfc_data_network=SFC Data Network Name
+externalManageNetworkName=External Management Network Name
+NatIpRange=Nat Ip Range
+m6000_mng_ip=M6000 Mng IP
+externalPluginManageNetworkName=External Plugin Management Network Name
+externalDataNetworkName=External Data Network Name
+sfc_data_network=SFC Data Network Name
+externalManageNetworkName=External Management Network Name
+NatIpRange=Nat Ip Range
+m6000_mng_ip=M6000 Mng IP
+externalPluginManageNetworkName=External Plugin Management Network Name
+externalCompanyFtpDataNetworkName=External Company Ftp Data Network Name
+externalDataNetworkName=External Data Network Name
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt b/lifecyclemgr/src/main/webapp/lifecyclemgr/images/License.txt
similarity index 100%
copy from resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt
copy to lifecyclemgr/src/main/webapp/lifecyclemgr/images/License.txt
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
index d695eac..aec6be9 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
@@ -1,3 +1,21 @@
+<!--
+
+    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">
@@ -11,7 +29,6 @@
     <link rel="stylesheet" href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
     <link href="css/open-ostyle.css" rel="stylesheet"/>
     <link href="css/style.css" rel="stylesheet"/>
-
     <script src="js/angular.min.js"></script>
     <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script>
 	<script src="js/angular-ui-router.min.js"></script>
@@ -22,6 +39,8 @@
     <script src="js/app.js"></script>
     <script src="js/DataService.js"></script>
     <script src="js/mustache.js"></script>
+    <script src="js/bootbox.min.js"></script>
+    <script type="text/javascript" src="js/jquery.i18n.properties-1.0.9.js"></script>
 </head>
 
 <body ng-app="lcApp" onload="loadTemplate()">
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
index fd3e3d9..8cc47b0 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
@@ -1,11 +1,37 @@
+/*
+
+    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("DataService", function($http, $log){
     var lcData = null;
+    var createParamJsonObj = {
+        templateId:'',
+        parameters: {}
+    };
+    
     return {
+        getCreateParamJsonObj: function(){
+            return createParamJsonObj;
+        },
         loadGetServiceData : function() {
 
             //load main Table
             return $http({
-                url: '/openoapi/inventory/v1/services',
+                url: '/openoapi/servicegateway/v1/services',
                 //url: 'http://localhost:5000/api/getLCData',
                 method: 'GET',
                 headers: {'Content-Type': 'application/json'}
@@ -20,15 +46,15 @@
                  'serviceId': ""})*/
             }).then(function(response){
                 //$log.info(response);
-                lcData = response.data.lcData;
-                return response.data;
+                lcData = response.data;
+                return response;
             });
         },
         getSavedLCData : function(id){
             var returnData = null;
             if(lcData) {
                 for (var i = 0; i < lcData.length; i++) {
-                    if(lcData[i].id == id) {
+                    if(lcData[i].serviceId == id) {
                         returnData = lcData[i].inputParameters;
                         break;
                     }
@@ -71,44 +97,663 @@
                 headers: {'Content-Type': 'application/json'}
             }).then(function(response){
                 //$log.info(response);
-                return response.data.templateData;
-            });
-        },
-	
-	fetchCreateParameters : function(templateId) {
-            //For Template parameters tab in popup
-            return $http({
-                url: '/openoapi/catalog/v1/servicetemplates/'+templateId,
-               // url: 'http://localhost:5000/api/getTemplateParameter',
-                method: 'GET',
-                headers: {'Content-Type': 'application/json'}
-            }).then(function(response){
-                //$log.info(response);
                 return response.data;
             });
         },
+	
+        generateCreateParameters : function(template) {
+            // For Template parameters tab in popup
+            return $.when(fetchCreateParameters(template.serviceTemplateId))
+            .then(function(createParam) {
+                // set the create param object
+                createParamJsonObj = createParam;
+                // convert the create param to UI.
+                return convertCreateParamsToUI('create', createParam.parameters);
 
-        createServiceInstance : function(lifecycleData, sengMsgObj) {
-            ///For submit of OK button
-            var parameter = {
-                'service' : {
-                    'name' :  lifecycleData.name,
-                    'description' : lifecycleData.desc,
-                    'serviceDefId' : '', //no need now, reserved
-                    'templateId' :  lifecycleData.optSelect,
-                    'parameters' : sengMsgObj
-                }
-            };
-            return $http({
-                url: '/openoapi/servicegateway/v1/services',
-                //url: 'http://localhost:5000/api/getTemplateData',
-                method: 'POST',
-                headers: {'Content-Type': 'application/json'},
-                data : JSON.stringify(parameter)
-            }).then(function(response){
-                //$log.info(response);
-                return response.data.templateData;
             });
+        },
+
+        createService : function(serviceBaseInfo) {
+            if (!checkInputs('create', createParamJsonObj.parameters)) {
+                return {status:'checkfailed'};
+            }
+            var sengMsgObj = collectCreateParamfromUI('', 'create', createParamJsonObj.parameters);
+            var gatewayService = '/openoapi/servicegateway/v1/services';
+            return createServiceInstance(serviceBaseInfo, sengMsgObj);            
+        },
+        
+        deleteService : function(serviceId) {
+            return deleteServiceInstance(serviceId);    
+        }   
+    }
+});
+
+/**
+ * init parameter tab
+ * @returns
+ */
+function initParameterTab() {
+    // Service template was not changed. Do not re-initiate the parameter tab.
+    if (!templateParameters.changed) {
+        return;
+    }
+    var templateId = $("#svcTempl").val();
+    if ('select' === templateId) {
+        document.getElementById("templateParameterTab").innerHTML = '';
+        return;
+    }
+    $.when(fetchCreateParameters(templateId))
+    .then(function(createParam) {
+        // set the create param object
+        templateParameters.paramJsonObj = createParam.parameters;
+        // convert the create param to UI.
+        var components = convertCreateParamsToUI('create', createParam.parameters);
+        document.getElementById("templateParameterTab").innerHTML = components;
+        templateParameters.changed = false;
+    });
+}
+
+/**
+ * generate the template to create parameters object
+ * 
+ * @param templateId
+ *            the template id
+ * @returns
+ */
+function fetchCreateParameters(templateId) {
+    //return $.getJSON("./conf/queryCreateParams.json");
+    var uri = '/openoapi/servicegateway/v1/createparameters/' + templateId;
+    return $.ajax({
+        type : "GET",
+        url : uri,
+        error : function(xhr, ajaxOptions, thrownError) {
+            showErrorMessage("Generate parameters failed.", xhr.responseText);
+        } 
+    });
+}
+
+/**
+ * convert the template params obj to html UI string
+ * 
+ * @param identify the object identify, it should be '' when called
+ * @return the html component string
+ */
+function convertCreateParamsToUI(identify, createParam) {
+    var components = '';
+    // convert host to UI
+    if (undefined !=  createParam.domainHost && 'enum' === createParam.domainHost.type) {
+        components = components
+                + generateParamComponent(createParam.nodeType, identify,
+                        createParam.domainHost, false);
+    }
+    // convert own locationConstraints to UI
+    if(undefined != createParam.nsParameters.locationConstraints){
+        createParam.nsParameters.locationConstraints.forEach(function(param) {
+            components = components
+                    + generateParamComponent(createParam.nodeType,
+                            identify, param.locationConstraints.vimId, false);
+        });
+    }
+    
+    // convert own param to UI
+    createParam.nsParameters.additionalParamForNs
+            .forEach(function(param) {
+                components = components
+                        + generateParamComponent(createParam.nodeType,
+                                identify, param, false);
+            });
+    // convert segments to UI
+    createParam.segments.forEach(function(segment) {
+        // each segment in a field set.
+        components = components + '<fieldset style="margin-left:25px;"><legend>'
+                + segment.nodeTemplateName + '</legend>';
+        // the identify for segment
+        var segmentIdentify = '' == identify ? segment.nodeTemplateName
+                : identify + '_' + segment.nodeTemplateName;
+        // convert segment to UI
+        components = components
+                + convertCreateParamsToUI(segmentIdentify, segment);
+        components = components + '</fieldset>';
+    });
+    return components;
+}
+
+
+/**
+ * for each required parameter it could not be empty
+ * @param identify the identify of a segment
+ * @param createParam the create param object 
+ * @returns the check result
+ */
+function checkInputs(identify, createParam) {
+    //check domain host
+    if (undefined !=  createParam.domainHost && 'enum' === createParam.domainHost.type) {
+        var value = collectParamValue(identify, createParam.domainHost);
+        if ('select' == value) {
+            var name = getParamLabel(createParam.nodeType, createParam.domainHost);
+            alert( name + ' is required.')
+            return false;
         }
     }
-});
\ No newline at end of file
+    //check location constraints
+    if(undefined != createParam.nsParameters.locationConstraints){
+        for(var i= 0; i < createParam.nsParameters.locationConstraints.length; i++){    
+            var param = createParam.nsParameters.locationConstraints[i].locationConstraints.vimId;
+            var value = collectParamValue(identify, param);
+            if('true' === param.required && ('' === value || ('enum' == param.type && 'select' == value))){
+                // the param resource key is nodeType.paramName
+                var name = getParamLabel(createParam.nodeType, param);
+                alert(name + ' is required.')
+                return false;
+            }
+        }
+    }
+
+    // check parameters
+    for(var i= 0; i < createParam.nsParameters.additionalParamForNs.length; i++){    
+        var param = createParam.nsParameters.additionalParamForNs[i];
+        var value = collectParamValue(identify, param);
+        if('true' === param.required && ('' === value || ('enum' == param.type && 'select' == value))){
+            // the param resource key is nodeType.paramName
+            var name = getParamLabel(createParam.nodeType, param);
+            alert(name + ' is required.')
+            return false;
+        }
+    }
+    // get segments param value from UI
+    var segmentcheckResult = true;
+    for(var i= 0; i < createParam.segments.length; i++){
+        var segment = createParam.segments[i];
+        // the identify for segment
+        var segmentIdentify = '' == identify ? segment.nodeTemplateName
+                : identify + '_' + segment.nodeTemplateName;
+        segmentcheckResult = checkInputs(segmentIdentify, segment);
+        if (!segmentcheckResult) {
+            break;
+        }
+    }
+    return segmentcheckResult;
+}
+
+
+/**
+ * convert the template params obj to html UI string
+ * 
+ * @param identify the object identify, it should be different every time
+ * @return the html component string
+ */
+function collectCreateParamfromUI(parentHost,identify, createParam) {
+    // the create params used for create msg
+    var paramSentObj = {
+            domainHost:'',
+            nodeTemplateName:'',
+            nodeType:'',
+            segments:[],
+            nsParameters:{}
+    };  
+    // get the domain value
+    if (undefined !=  createParam.domainHost && 'enum' === createParam.domainHost.type) {
+        var domain = collectParamValue(identify, createParam.domainHost);
+        paramSentObj.domainHost = collectParamValue(identify, createParam.domainHost)
+    }
+    //if parent domainHost is not '' and local domain host is'', it should be setted as parent
+    if('' != parentHost && '' == paramSentObj.domainHost){
+        paramSentObj.domainHost = parentHost;
+    }
+    paramSentObj.nodeTemplateName = createParam.nodeTemplateName;
+    paramSentObj.nodeType = createParam.nodeType;
+
+    //get location constraints
+    if(undefined != createParam.nsParameters.locationConstraints){
+        paramSentObj.nsParameters['locationConstraints'] = [];
+        createParam.nsParameters.locationConstraints.forEach(function(param) {
+            var locationConstraints = {};
+            locationConstraints['vnfProfileId'] = param.vnfProfileId;
+            locationConstraints['locationConstraints'] = {};
+            locationConstraints.locationConstraints['vimId'] = collectParamValue(identify, param.locationConstraints.vimId);
+            paramSentObj.nsParameters.locationConstraints.push(locationConstraints);
+        });
+    }
+
+    paramSentObj.nsParameters['additionalParamForNs'] = {};
+    // get own param value from UI
+    createParam.nsParameters.additionalParamForNs.forEach(function(param) {
+        paramSentObj.nsParameters.additionalParamForNs[param.name] = collectParamValue(identify, param);
+    });
+    // get segments param value from UI
+    createParam.segments.forEach(function(segment) {
+        // the identify for segment
+        var segmentIdentify = '' == identify ? segment.nodeTemplateName
+                : identify + '_' + segment.nodeTemplateName;
+        var segmentObj = collectCreateParamfromUI(paramSentObj.domainHost, segmentIdentify, segment);
+        paramSentObj.segments.push(segmentObj);
+    });
+    return paramSentObj;
+}
+
+/**
+ * get a param value
+ * @param identify the identify of a segment
+ * @param param the param object 
+ * @returns the value of the param
+ */
+function collectParamValue(identify, param) {
+    var value = $('#' + getParamId(identify, param)).val();
+    return value;
+}
+
+/**
+ * get the param id in ui
+ * @param identify
+ * @param param
+ * @returns
+ */
+function getParamId(identify, param) {
+    return '' ===identify ? param.name : identify + '_' + param.name;
+}
+
+/**
+ * get the resource string of a param.
+ * @param nodeType node type
+ * @param param param object
+ * @returns resource string
+ */
+function getParamLabel(nodeType, param) {
+    var name = $.i18n.prop(nodeType + '.' + param.name);
+    if (name.length === 0 || name.slice(0, 1) === '[') {
+        name = param.name;
+    }
+    return name;
+}
+/**
+ * convert combox component
+ * 
+ * @param inputPara
+ * @param items
+ * @param stringReadOnly
+ * @returns
+ */
+function generateParamComponent(nodeType, identify, param, strReadOnly) {
+    // the param resource key is nodeType.paramName
+    var name = getParamLabel(nodeType, param);
+    var id = getParamId(identify,param);
+    var component = '';
+    if (param.type === 'string') {
+        component = '<div class="mT15 form-group row-content" style="margin-left:0px;">'
+                + '<label class="col-sm-6 control-label labelstyle">'
+                + '<span>' + name + '</span>' + generateRequiredLabel(param)
+                + '</label>' 
+                + '<div class="col-sm-6"><input type="text" id="' + id
+                + '" name="parameter description" class="form-control" placeholder="'
+                + '"value="' + param.defaultValue;
+        if(strReadOnly){
+            component = component + '" readonly="' + strReadOnly + '"/>'+ '</div></div>';
+        }else{
+            component = component + '"/>'+ '</div></div>';
+        }
+                
+    } else if (param.type === 'enum') {
+        component = '<div class="form-group row-content" style="margin-left:0px;margin-bottom:5px;">'
+                + '<label class="col-sm-6 control-label labelstyle">'
+                + '<span>' + name + '</span>'
+                + '<span class="required">*</span>'
+                + '</label>'
+                + '<div class="col-sm-6">'
+                + '<select class="form-control" style ="padding-top: 0px;padding-bottom: 0px;"'
+                + ' id="' + id + '" name="' + param.name + '" value="' + param.defaultValue 
+                + '">'
+                + this.transformToOptions(param.range)
+                + '</select></div></div>';
+    }
+    return component;
+}
+
+/**
+ * transfer the enum range to html body
+ * @param items the map of the range
+ * @returns the html string
+ */
+function transformToOptions(items) {
+    var options = '<option value="select">--select--</option>';
+    var i;
+    for ( var key in items) {
+        var option = '<option value="' + key + '">' + items[key] + '</option>';
+        options = options + option;
+    }
+    return options;
+}
+
+/**
+ * generate required identify to html string
+ * @param parameter the parameter object
+ * @returns the html string 
+ */
+function generateRequiredLabel(parameter) {
+    var requiredLabel = '';
+    if (parameter.required === 'true') {
+        requiredLabel = '<span class="required">*</span>';
+    }
+    return requiredLabel;
+}
+
+/**
+ * create service
+ * @param sengMsgObj the parameters
+ * @returns 
+ */
+function createServiceInstance(serviceBaseInfo, sengMsgObj) {
+    var defer = $.Deferred();
+    var parameter = {
+        'service' : {
+            'name' :  serviceBaseInfo.name,
+            'description' : serviceBaseInfo.description,
+            'serviceDefId' : '', //no need now, reserved
+            'templateId' :  serviceBaseInfo.templateId,
+            'parameters' : sengMsgObj
+        }
+    };
+    var serviceGatewayUri = '/openoapi/servicegateway/v1/services';
+    $.when($.ajax({
+        type : "POST",
+        url : serviceGatewayUri,
+        contentType : "application/json",
+        dataType : "json",
+        data : JSON.stringify(parameter),
+        error : function(xhr, ajaxOptions, thrownError) {
+            showErrorMessage("Create service failed.", xhr.responseText);
+        }
+    }))
+    .then(function(response) {
+        return queryProgress('create service', response.service.serviceId,response.service.operationId);
+    }).then(function(result){
+        defer.resolve(result);
+    });
+    return defer;
+}
+
+/**
+ * sent delete instance msg
+ * @param serviceId the service id
+ * @returns
+ */
+function deleteServiceInstance(serviceId) {
+    var defer = $.Deferred();
+    var deleteUrl = '/openoapi/servicegateway/v1/services/' + serviceId;
+    var parameter = {};
+    $.when($.ajax({
+        type : "DELETE",
+        url : deleteUrl,
+        contentType : "application/json",
+        dataType : "json",
+        data : JSON.stringify(parameter),
+        error : function(xhr, ajaxOptions, thrownError) {
+            showErrorMessage("Delete service failed.", xhr.responseText);
+        }        
+    }))
+    .then(function(response) {
+        return queryProgress('delete service', serviceId,response.operationId);
+    }).then(function(result){
+        defer.resolve(result);
+    });
+    return defer;
+}
+
+/**
+ * query progress of the operation 
+ * @param operation the operation string
+ * @param serviceId the service id
+ * @param operationId the operation id
+ * @returns
+ */
+function queryProgress(operation, serviceId, operationId) {
+    //show the progress dialog
+    $( "#idProgressTitle" ).text(operation);
+    $( "#progressContent" ).text('status:');            
+    $( "#progressbar" ).attr("style","width: 0%");
+    $( "#progressDialog" ).modal({backdrop:'static', keyboard:false});    
+    //set a timer for query operation
+    var defer = $.Deferred();
+    var queryProgressUril = '/openoapi/servicegateway/v1/services/' + serviceId + '/operations/' + operationId;
+    var timerDefer = $.Deferred();
+    var timeout = 3600000;
+    var fun = function() {
+        if (timeout === 0) {
+            timerDefer.resolve({
+                status : 'error',
+                reason : operation + ' timeout!',
+            });
+            return;
+        }
+        timeout = timeout - 1000;
+        $.when($.ajax({
+            type : "GET",
+            url : queryProgressUril,
+            error : function(xhr, ajaxOptions, thrownError) {
+                showErrorMessage("Query progress failed.", xhr.responseText);
+            } 
+        }))
+        .then(function(response) {
+            //update progress
+            $( "#progressbar" ).attr("style","width: " + response.operation.progress.toString() + "%");
+            $( "#progressValue" ).text(response.operation.progress.toString() + '%');
+            $( "#progressContent" ).text('status: ' + response.operation.operationContent);            
+            if (response.operation.result == 'finished' || response.operation.result == 'error') {
+                timerDefer.resolve({
+                    status : response.operation.result ,
+                    reason : response.operation.reason
+                });
+            }
+        });
+    };
+    var timerId = setInterval(fun, 1000);
+    $.when(timerDefer)
+    .then(function(responseDesc) {
+        clearInterval(timerId);
+        $('#progressDialog').modal('hide');
+        defer.resolve({
+            status : responseDesc.status,
+            reason : responseDesc.reason,
+            serviceId:serviceId
+        });
+
+    });
+    return defer; 
+}
+
+
+/**
+ * convert the input parameters to ui
+ * @param identify the identify of a segment
+ * @param createParam the create param object 
+ * @returns the check result
+ */
+function convertInputsToUI(parentHost, identify, serviceParam) {
+    var components = '';
+    // convert host to UI
+    if (undefined !=  serviceParam.domainHost && '' != serviceParam.domainHost && parentHost != serviceParam.domainHost) {
+        var param ={
+            name:'domainHost',
+            type:'string',
+            defaultValue:getShowVal('domainHost', serviceParam.domainHost),
+            required:false            
+        }
+        components = components + generateParamComponent(serviceParam.nodeType, identify,
+                param, true);
+    }
+    //convert location constraints to UI
+    if(undefined != serviceParam.nsParameters.locationConstraints){        
+        serviceParam.nsParameters.locationConstraints.forEach(function(param) {
+            var showValue = getShowVal('location', param.locationConstraints.vimId)
+            var param ={
+                    name: param.vnfProfileId + '_Location',
+                    type:'string',
+                    defaultValue:showValue,
+                    required:false            
+                }
+            components = components + generateParamComponent(serviceParam.nodeType,
+                            identify, param, true);
+        });
+    }
+
+    // convert own param to UI
+    for(var key in serviceParam.nsParameters.additionalParamForNs ){
+        var param ={
+                name: key,
+                type:'string',
+                defaultValue:getShowVal(key, serviceParam.nsParameters.additionalParamForNs[key]),
+                required:false            
+            }
+        components = components + generateParamComponent(serviceParam.nodeType,
+                        identify, param, true);
+    }
+    // convert segments to UI
+    serviceParam.segments.forEach(function(segment) {
+        // each segment in a field set.
+        components = components + '<div class="mT15 form-group"><fieldset style="margin-left:25px;"><legend>'
+                + segment.nodeTemplateName + '</legend>';
+        // the identify for segment
+        var segmentIdentify = '' == identify ? segment.nodeTemplateName
+                : identify + '_' + segment.nodeTemplateName;
+        // convert segment to UI
+        components = components
+                + convertInputsToUI(serviceParam.domainHost, segmentIdentify, segment);
+        components = components + '</fieldset></div>';
+    });
+    return components;
+}
+
+function getShowVal(paramName, paramValue){
+    if(paramName == 'domainHost'){
+        return getHostNameByVal(paramValue);
+    }
+    else if(paramName == 'location'){
+        return getVimNameById(paramValue);
+    }
+    else if(paramName == 'sdncontroller'){
+        return getSdnControllerNameById(paramValue);
+    }
+    else{
+        return paramValue;
+    }
+}
+
+function getHostNameByVal(hostDomain){
+     var requestUrl ="/openoapi/servicegateway/v1/domains";
+      var returnObj = '';
+      $.ajax({
+              type : "GET",
+              async: false,
+              url : requestUrl,
+              contentType : "application/json",
+              success : function(jsonobj) {
+                jsonobj.forEach(function(host){
+                    if(host.host == hostDomain){
+                          returnObj = host.name;
+                    }
+                });
+              },
+              error : function(xhr, ajaxOptions, thrownError) {
+                 showErrorMessage("Query host failed.", xhr.responseText);
+              }
+          });
+      return returnObj;
+}
+
+//get the vim name by id.
+function getVimNameById(vimId){
+  var requestUrl ="/openoapi/extsys/v1/vims/" + vimId;
+  var returnObj;
+  $
+      .ajax({
+          type : "GET",
+          async: false,
+          url : requestUrl,
+          contentType : "application/json",
+          success : function(jsonobj) {
+              // TODO return according to the json data received.
+              returnObj = jsonobj.name;
+          },
+          error : function(xhr, ajaxOptions, thrownError) {
+              showErrorMessage("Query vims failed.", xhr.responseText);
+          }
+      });
+  return returnObj;
+}
+
+//get the sdn controller name by id.
+function getSdnControllerNameById(sdnControllerId){
+  var requestUrl ="/openoapi/extsys/v1/sdncontrollers/" + sdnControllerId;
+  var returnObj;
+  $
+      .ajax({
+          type : "GET",
+          async: false,
+          url : requestUrl,
+          contentType : "application/json",
+          success : function(jsonobj) {
+              // TODO return according to the json data received.
+              returnObj = jsonobj.name;
+          },
+          error : function(xhr, ajaxOptions, thrownError) {
+              showErrorMessage("Query sdn controllers failed.", xhr.responseText);
+          }
+      });
+  return returnObj;
+}
+
+
+
+/**
+ * show error dialog
+ * @param title the title 
+ * @param result the result
+ * @returns
+ */
+function showErrorMessage(title, result) {
+    //show the error dialog
+    $( "#errorDialogTitle" ).text(title);
+    if(undefined != result.reason){
+        $( "#errorDialogReason" ).text(result.reason);     
+    }
+    else{
+        $( "#errorDialogReason" ).text(result);     
+    }
+    $( "#errorDialog" ).modal({backdrop:'static', keyboard:false});    
+}
+
+/**
+ * generate the template to create parameters object
+ * 
+ * @param templateId the template id
+ * @returns
+ */
+function queryService(serviceId) {
+    var uri = '/openoapi/servicegateway/v1/services/' + serviceId;
+    return $.ajax({
+        type : "GET",
+        url : uri,
+        error : function(xhr, ajaxOptions, thrownError) {
+            showErrorMessage("Query service failed.", xhr.responseText);
+        } 
+    });
+}
+
+function queryServiceData(){
+    var returnVal = [];
+    var requestUrl = "/openoapi/servicegateway/v1/services";
+    $
+        .ajax({
+            type : "GET",
+            url : requestUrl,
+            async: false,
+            contentType : "application/json",
+            success : function(jsonobj) {
+                // TODO return according to the json data received.
+                returnVal =  jsonobj;
+            },
+            error : function(xhr, ajaxOptions, thrownError) {
+                showErrorMessage("Query services fail",xhr.responseText);
+            }
+        });
+    return returnVal;
+}
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
index 7293f0d..593c6a3 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
@@ -95,13 +95,18 @@
 

     .controller('homeCtrl', function($scope, $compile, $state, $log, DataService, NgTableParams) {

         $scope.param="lctableData";

-

         $scope.init = function() {

+            jQuery.i18n.properties({

+                language : 'en-US',

+                name : 'lcm-template-parameters-i18n',

+                path : 'i18n/',

+                mode : 'map'

+            });

             DataService.loadGetServiceData()

                 .then(function (data) {

                     if (data) {

-                        $scope.tableData = data.lcData;

-                        var tableData = data.lcData;

+                        $scope.tableData = data.data;

+                        var tableData = data.data;

                         loadTableData();

                     }

                     else {

@@ -158,7 +163,7 @@
             var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);

             var deletehtml = Mustache.to_html(def_button_tpl, delete_data);

             $('#lcTableAction').html($compile(addhtml)($scope));

-            $('#lcTableAction').append($compile(deletehtml)($scope));

+            //$('#lcTableAction').append($compile(deletehtml)($scope));

 

             $scope.checkboxes = { 'checked': false, items: {} };

 

@@ -191,11 +196,13 @@
             var number = $(modelTemplate).filter('#numeric').html();

             var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();

 

-            var dataText = {"ErrMsg" :     {"textboxErr" : "Service name is required.", "modalVar":"lifecycleData.name", "placeholder":"Service Name"}};

+            var dataText = {"ErrMsg" :     {"errmsg" : "Service name is required.", "modalVar":"lifecycleData.serviceName", "placeholder":"", "errtag":"lcnameErr", "errfunc":"validatename", "required":true}};

+    

             $('#myModal .serviceName').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));

 

-            var TempNameText = {"ErrMsg" :     {"textboxErr" : "Template name is required.", "modalVar":"lifecycleData.template", "placeholder":"Template Name"}};

-            $('#myModal .templateName').html($compile(Mustache.to_html(text, TempNameText.ErrMsg))($scope));

+            var serviceDescriptionText = {"ErrMsg" :     {"errmsg" : "Description is required.", "modalVar":"lifecycleData.description", "placeholder":"", "errtag":"lctemplateErr", "errfunc":"validatetemplate", "required":true}};

+

+            $('#myModal .serviceDescription').html($compile(Mustache.to_html(text, serviceDescriptionText.ErrMsg))($scope));

 

             //var creatorText = {"ErrMsg" :     {"textboxErr" : "Creator is required.", "modalVar":"lifecycleData.creator", "placeholder":"Creator"}};

             /*$scope.data = {

@@ -215,24 +222,31 @@
                    // var templatesInfo = translateToTemplatesInfo(tmplatesResponse);

                   //  document.getElementById("svcTempl").innerHTML = templatesInfo;

                     $scope.optionsValue = tmplatesResponse;

-                    //$scope.someOptions = [{serviceTemplateId:"1",templateName:"1.1"}, {serviceTemplateId:"2",templateName:"1.2"}];

-                    // $scope.someOptions = [{"serviceTemplateId": '1', "templateName": "1.1"},{"serviceTemplateId": '2', "templateName": "1.2"}]

-                    // console.log(":: " + JSON.stringify($scope.optionsValue));

+                    var dropSimple_data = {

+                        "errmsg" : "Service template is required.",

+                        "modalVar" : "lifecycleData.optSelect",

+                        "labelField" : "templateName",

+                        "optionsValue" : JSON.stringify(tmplatesResponse),

+                        "errtag":"lcdropdownErr",

+                        "errfunc":"validatedropdown",

+                        "required":true

+                    }

+		    $('#myModal #plainDropDown').html($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));

                 }, function (reason) {

                     $scope.error = "Error ! " + reason;

                 });

-

-

-

+		

+		

             //$('#myModal .creator').html($compile(Mustache.to_html(text, creatorText.ErrMsg))($scope));

 

-            var modelSubmit_data = {"title":"Submit", "clickAction":"saveData(lifecycleData.id)"};

+            var modelSubmit_data = {"title":"Submit", "clickAction":"saveData()"};

             var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);

             $('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));

 

             var modelDelete_data = {"title":"Close", "clickAction":"closeModal()"};

             var modelDelete_html = Mustache.to_html(def_button_tpl, modelDelete_data);

             $('#myModal #footerBtns').append($compile(modelDelete_html)($scope));

+	    

         }

 

 

@@ -273,17 +287,49 @@
             $state.go('home.lcTabs.detailInfo', {'id': id});

 

         }

+	

+	$scope.validatename = function (value){

+                if($scope.lifecycleData.serviceName) {

+                    $scope.lcnameErr = false;

+                }

+                else

+                    $scope.lcnameErr = true;

+            }

+

+

+

+            $scope.validatetemplate = function (value){

+                if($scope.lifecycleData.description) {

+                    $scope.lctemplateErr = false;

+                }

+                else

+                    $scope.lctemplateErr = true;

+            }

+            $scope.validatedropdown = function (value){

+                if($scope.lifecycleData.optSelect) {

+                    $scope.lcdropdownErr = false;

+                }

+                else

+                    $scope.lcdropdownErr = true;

+            }

 

         $scope.templateParam = function() {

-            //$scope.lifecycleData.optSelect = 1.2;

-            //$log.info($scope.lifecycleData);

-

-            DataService.fetchCreateParameters($scope.lifecycleData.optSelect)

+            

+            var template = $scope.lifecycleData.optSelect;

+            var lastSelTempCreateParam = DataService.getCreateParamJsonObj();

+            if(template == undefined){

+                document.getElementById("templateParameters").innerHTML = "";

+                return;

+            }            

+            //if the template not changed, no need to update the page.

+            if(lastSelTempCreateParam.templateId == template.serviceTemplateId &&  document.getElementById("templateParameters").innerHTML != ""){

+                return;

+            }

+            $.when(DataService.generateCreateParameters(template))

                 .then(function (tmplatesParamResponse) {

                     console.log("Data Param Template :: ");

                     $log.info(tmplatesParamResponse);

-                    $scope.paramJsonObj= tmplatesParamResponse.templateName;

-

+                    document.getElementById("templateParameters").innerHTML = tmplatesParamResponse;

                 }, function (reason) {

                     $scope.error = "Error ! " + reason;

                 });

@@ -295,15 +341,15 @@
 

         $scope.showAddModal = function() {

             console.log("Showing Modal to Add data");

-            $scope.lifecycleData = {};

-            $scope.textboxErr = false;

-

+            //$scope.lifecycleData = {};

+            //$scope.textboxErr = false;

             //$("#myModal").modal();

             $("#myModal").modal({}).draggable();

         }

         $scope.closeModal = function() {

             console.log("Closing Modal...");

             $('#myModal').modal('hide');

+            //$state.reload();

         }

 

         $scope.editData = function(id) {

@@ -329,61 +375,58 @@
         }

 

         $scope.saveData = function() {

-            //TODO

-            var sengMsgObj = {};//collectCreateParamfromUI('', 'create', $scope.templateParameters.paramJsonObj);

-            //createServiceInstance(sengMsgObj)

-            DataService.createServiceInstance(lifecycleData, sengMsgObj)

+            //collect service  base info

+            var serviceBaseInfo = {

+                 'name' :  $scope.lifecycleData.serviceName,

+                 'description' : $scope.lifecycleData.description,

+                 'templateId' :  $scope.lifecycleData.optSelect.serviceTemplateId,

+            };

+            //send message

+            $.when(DataService.createService(serviceBaseInfo))

                 .then(function (response) {

                     $log.info(response);

-                    //TODO

-                }, function (reason) {

-                    $scope.error = "Error ! " + reason;

+                    if(response.status === 'checkfailed'){

+                        return;

+                    }else if (response.status === 'finished') {

+                        $.when(queryService(response.serviceId)).then(function(serviceInstance){  

+                            $scope.tableData.push(serviceInstance);

+                            $scope.$apply();

+                            $scope.tableParams.reload();

+                            $('#myModal').modal('hide');

+                        });

+                    } else{

+                        showErrorMessage('Create service failed',response);

+                    }

                 });

         }

-

-        /**

-         * convert the template params obj to html UI string

-         *

-         * @param identify the object identify, it should be different every time

-         * @return the html component string

-         */

-        function collectCreateParamfromUI(parentHost,identify, createParam) {

-            // the create params used for create msg

-            var paramSentObj = {

-                domainHost:'',

-                nodeTemplateName:'',

-                nodeType:'',

-                segments:[],

-                additionalParamForNs:{}

+        $scope.deleteIndividualData = function(id){

+            var deleteHandle = function(result) {

+                if (result) {

+                    var remove = function() {

+                        var pos = 0;

+                        for(var i= 0; i < $scope.tableData.length; i++){    

+                            if($scope.tableData[i].serviceId === id){

+                                pos = i;

+                                break;

+                            }

+                        }

+                        $scope.tableData.splice(pos, 1);

+                        $scope.$apply();

+                        $scope.tableParams.reload();

+                    };

+                    $.when(DataService.deleteService(id))

+                    .then(function(response) {

+                        if (response.status === 'finished') {

+                            remove();

+                        } else {

+                            showErrorMessage('Delete service failed',response);

+                        }

+                    });

+                }

             };

-            // get the domain value

-            if (undefined !=  createParam.domainHost && 'enum' === createParam.domainHost.type) {

-                var domain = collectParamValue(identify, createParam.domainHost);

-                paramSentObj.domainHost = collectParamValue(identify, createParam.domainHost)

-            }

-            //if parent domainHost is not '' and local domain host is'', it should be setted as parent

-            if('' != parentHost && '' == paramSentObj.domainHost){

-                paramSentObj.domainHost = parentHost;

-            }

-            paramSentObj.nodeTemplateName = createParam.nodeTemplateName;

-            paramSentObj.nodeType = createParam.nodeType;

-

-            // get own param value from UI

-            createParam.additionalParamForNs.forEach(function(param) {

-                paramSentObj.additionalParamForNs[param.name] = collectParamValue(identify, param);

-            });

-            // get segments param value from UI

-            createParam.segments.forEach(function(segment) {

-                // the identify for segment

-                var segmentIdentify = '' == identify ? segment.nodeTemplateName

-                    : identify + '_' + segment.nodeTemplateName;

-                var segmentObj = collectCreateParamfromUI(paramSentObj.domainHost, segmentIdentify, segment);

-                paramSentObj.segments.push(segmentObj);

-            });

-            return paramSentObj;

+            bootbox.confirm("Do you confirm to delete service?", deleteHandle);     

         }

 

-

     })

 

     .controller('lcTabsCtrl', function($scope, $state, $stateParams) {

@@ -552,25 +595,27 @@
         console.log("inputDataCtrl --> $stateParams.id:: " + $stateParams.id);

         $scope.inputData = DataService.getSavedLCData($stateParams.id);

         $log.info($scope.inputData);

-        /*for(var i = 0; i < $scope.inputData.length; i++) {

-            //var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();

-            $("#inputDataElements").appendChild("<span>Shahid</span>");

-

-        }*/

-

         $("div.inputDataElements").html("");

-        for (var prop in $scope.inputData) {

-            //console.log('obj.' + prop, '=', $scope.inputData[prop]);

-            //$("#inputDataElements").append("<div><span>"+prop+": </span><span>"+$scope.inputData[prop]+"</span></div>");

-            $("div.inputDataElements").append('<div class="mT15 form-group row" style="margin-top:35px;"><div class="col-md-2 col-xs-2 col-lg-2 col-sm-2" align="left"><label class="control-label"><span style="font-size:16px;">'+ prop + ':</span></label></div><div class="col-md-3 col-xs-3 col-lg-3 col-sm-3"><input  type="text" name="" maxlength="256" data-toggle="tooltip" data-placement="top" title="'+ $scope.inputData[prop] + '" value="'+ $scope.inputData[prop] + '" readonly disabled/></div></div>');

-        }

+        $("div.inputDataElements").append(convertInputsToUI('', 'show', $scope.inputData));

+

     })

 

 

-var modelTemplate;

+var modelTemplate = "";

 function loadTemplate() {

-    $.get('template.html', function(template) {

-        modelTemplate = template;

+

+    $.get('templateContainer.html', function (template) {

+        modelTemplate += template;

+    });

+    $.get('templateWidget.html', function (template) {

+        //console.log("Template is : "+template);

+        modelTemplate += template;

+    });

+    $.get('templateNotification.html', function (template) {

+        modelTemplate += template;

+    });

+    $.get('templateFunctional.html', function (template) {

+        modelTemplate += template;

     });

 }

 

diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/bootbox.min.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/bootbox.min.js
similarity index 100%
copy from resmgr/src/main/webapp/bak/resmgr-nfv/js/bootbox.min.js
copy to lifecyclemgr/src/main/webapp/lifecyclemgr/js/bootbox.min.js
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.i18n.properties-1.0.9.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.i18n.properties-1.0.9.js
new file mode 100644
index 0000000..5f9b195
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.i18n.properties-1.0.9.js
@@ -0,0 +1,479 @@
+/******************************************************************************
+ * jquery.i18n.properties
+ * 
+ * Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
+ * MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
+ * 
+ * @version     1.0.x
+ * @author      Nuno Fernandes
+ * @url         www.codingwithcoffee.com
+ * @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
+ *              by Keith Wood (kbwood{at}iinet.com.au) June 2007
+ * 
+ *****************************************************************************/
+
+(function($) {
+$.i18n = {};
+
+/** Map holding bundle keys (if mode: 'map') */
+$.i18n.map = {};
+    
+/**
+ * Load and parse message bundle files (.properties),
+ * making bundles keys available as javascript variables.
+ * 
+ * i18n files are named <name>.js, or <name>_<language>.js or <name>_<language>_<country>.js
+ * Where:
+ *      The <language> argument is a valid ISO Language Code. These codes are the lower-case, 
+ *      two-letter codes as defined by ISO-639. You can find a full list of these codes at a 
+ *      number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
+ *      The <country> argument is a valid ISO Country Code. These codes are the upper-case,
+ *      two-letter codes as defined by ISO-3166. You can find a full list of these codes at a
+ *      number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
+ * 
+ * Sample usage for a bundles/Messages.properties bundle:
+ * $.i18n.properties({
+ *      name:      'Messages', 
+ *      language:  'en_US',
+ *      path:      'bundles'
+ * });
+ * @param  name			(string/string[], optional) names of file to load (eg, 'Messages' or ['Msg1','Msg2']). Defaults to "Messages"
+ * @param  language		(string, optional) language/country code (eg, 'en', 'en_US', 'pt_PT'). if not specified, language reported by the browser will be used instead.
+ * @param  path			(string, optional) path of directory that contains file to load
+ * @param  mode			(string, optional) whether bundles keys are available as JavaScript variables/functions or as a map (eg, 'vars' or 'map')
+ * @param  cache        (boolean, optional) whether bundles should be cached by the browser, or forcibly reloaded on each page load. Defaults to false (i.e. forcibly reloaded)
+ * @param  encoding 	(string, optional) the encoding to request for bundles. Property file resource bundles are specified to be in ISO-8859-1 format. Defaults to UTF-8 for backward compatibility.
+ * @param  callback     (function, optional) callback function to be called after script is terminated
+ */
+$.i18n.properties = function(settings) {
+	// set up settings
+    var defaults = {
+        name:           'Messages',
+        language:       '',
+        path:           '',  
+        mode:           'vars',
+        cache:			false,
+        encoding:       'UTF-8',
+        callback:       null
+    };
+    settings = $.extend(defaults, settings);    
+    if(settings.language === null || settings.language == '') {
+	   settings.language = $.i18n.browserLang();
+	}
+	if(settings.language === null) {settings.language='';}
+	
+	// load and parse bundle files
+	var files = getFiles(settings.name);
+	for(i=0; i<files.length; i++) {
+		// 1. load base (eg, Messages.properties)
+		//loadAndParseFile(settings.path + files[i] + '.properties', settings);
+        // 2. with language code (eg, Messages_pt.properties)
+		//if(settings.language.length >= 2) {
+        //    loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 2) +'.properties', settings);
+		//}
+		// 3. with language code and country code (eg, Messages_pt_PT.properties)
+		// 将寻找资源文件的顺序倒置
+        if(settings.language.length >= 5) {
+            loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 5) +'.properties', settings);
+        } else if(settings.language.length >= 2) {
+            loadAndParseFile(settings.path + files[i] + '-' + settings.language.substring(0, 2) +'.properties', settings);
+		} else {
+			loadAndParseFile(settings.path + files[i] + '.properties', settings);
+		}
+	}
+	
+	// call callback
+	if(settings.callback){ settings.callback(); }
+};
+
+
+/**
+ * When configured with mode: 'map', allows access to bundle values by specifying its key.
+ * Eg, jQuery.i18n.prop('com.company.bundles.menu_add')
+ */
+$.i18n.prop = function(key /* Add parameters as function arguments as necessary  */) {
+	var value = $.i18n.map[key];
+	if (value == null)
+		return '[' + key + ']';
+	
+//	if(arguments.length < 2) // No arguments.
+//    //if(key == 'spv.lbl.modified') {alert(value);}
+//		return value;
+	
+//	if (!$.isArray(placeHolderValues)) {
+//		// If placeHolderValues is not an array, make it into one.
+//		placeHolderValues = [placeHolderValues];
+//		for (var i=2; i<arguments.length; i++)
+//			placeHolderValues.push(arguments[i]);
+//	}
+
+	// Place holder replacement
+	/**
+	 * Tested with:
+	 *   test.t1=asdf ''{0}''
+	 *   test.t2=asdf '{0}' '{1}'{1}'zxcv
+	 *   test.t3=This is \"a quote" 'a''{0}''s'd{fgh{ij'
+	 *   test.t4="'''{'0}''" {0}{a}
+	 *   test.t5="'''{0}'''" {1}
+	 *   test.t6=a {1} b {0} c
+	 *   test.t7=a 'quoted \\ s\ttringy' \t\t x
+	 *
+	 * Produces:
+	 *   test.t1, p1 ==> asdf 'p1'
+	 *   test.t2, p1 ==> asdf {0} {1}{1}zxcv
+	 *   test.t3, p1 ==> This is "a quote" a'{0}'sd{fgh{ij
+	 *   test.t4, p1 ==> "'{0}'" p1{a}
+	 *   test.t5, p1 ==> "'{0}'" {1}
+	 *   test.t6, p1 ==> a {1} b p1 c
+	 *   test.t6, p1, p2 ==> a p2 b p1 c
+	 *   test.t6, p1, p2, p3 ==> a p2 b p1 c
+	 *   test.t7 ==> a quoted \ s	tringy 		 x
+	 */
+	
+	var i;
+	if (typeof(value) == 'string') {
+        // Handle escape characters. Done separately from the tokenizing loop below because escape characters are 
+		// active in quoted strings.
+        i = 0;
+        while ((i = value.indexOf('\\', i)) != -1) {
+ 		   if (value[i+1] == 't')
+ 			   value = value.substring(0, i) + '\t' + value.substring((i++) + 2); // tab
+ 		   else if (value[i+1] == 'r')
+ 			   value = value.substring(0, i) + '\r' + value.substring((i++) + 2); // return
+ 		   else if (value[i+1] == 'n')
+ 			   value = value.substring(0, i) + '\n' + value.substring((i++) + 2); // line feed
+ 		   else if (value[i+1] == 'f')
+ 			   value = value.substring(0, i) + '\f' + value.substring((i++) + 2); // form feed
+ 		   else if (value[i+1] == '\\')
+ 			   value = value.substring(0, i) + '\\' + value.substring((i++) + 2); // \
+ 		   else
+ 			   value = value.substring(0, i) + value.substring(i+1); // Quietly drop the character
+        }
+		
+		// Lazily convert the string to a list of tokens.
+		var arr = [], j, index;
+		i = 0;
+		while (i < value.length) {
+			if (value[i] == '\'') {
+				// Handle quotes
+				if (i == value.length-1)
+					value = value.substring(0, i); // Silently drop the trailing quote
+				else if (value[i+1] == '\'')
+					value = value.substring(0, i) + value.substring(++i); // Escaped quote
+				else {
+					// Quoted string
+					j = i + 2;
+					while ((j = value.indexOf('\'', j)) != -1) {
+						if (j == value.length-1 || value[j+1] != '\'') {
+							// Found start and end quotes. Remove them
+							value = value.substring(0,i) + value.substring(i+1, j) + value.substring(j+1);
+							i = j - 1;
+							break;
+						}
+						else {
+							// Found a double quote, reduce to a single quote.
+							value = value.substring(0,j) + value.substring(++j);
+						}
+					}
+					
+					if (j == -1) {
+						// There is no end quote. Drop the start quote
+						value = value.substring(0,i) + value.substring(i+1);
+					}
+				}
+			}
+			else if (value[i] == '{') {
+				// Beginning of an unquoted place holder.
+				j = value.indexOf('}', i+1);
+				if (j == -1)
+					i++; // No end. Process the rest of the line. Java would throw an exception
+				else {
+					// Add 1 to the index so that it aligns with the function arguments.
+					index = parseInt(value.substring(i+1, j));
+					if (!isNaN(index) && index >= 0) {
+						// Put the line thus far (if it isn't empty) into the array
+						var s = value.substring(0, i);
+						if (s != "")
+							arr.push(s);
+						// Put the parameter reference into the array
+						arr.push(index);
+						// Start the processing over again starting from the rest of the line.
+						i = 0;
+						value = value.substring(j+1);
+					}
+					else
+						i = j + 1; // Invalid parameter. Leave as is.
+				}
+			}
+			else
+				i++;
+		}
+		
+		// Put the remainder of the no-empty line into the array.
+		if (value != "")
+			arr.push(value);
+		value = arr;
+		
+		// Make the array the value for the entry.
+		$.i18n.map[key] = arr;
+	}
+	
+	if (value.length == 0)
+		return "";
+	if (value.lengh == 1 && typeof(value[0]) == "string")
+		return value[0];
+	
+	var s = "";
+	for (i=0; i<value.length; i++) {
+		if (typeof(value[i]) == "string")
+			s += value[i];
+		// Must be a number
+		else if (value[i] + 1 < arguments.length)
+			s += arguments[value[i] + 1];
+		else
+			s += "{"+ value[i] +"}";
+	}
+	
+	return s;
+};
+
+/** Language reported by browser, normalized code */
+$.i18n.browserLang = function() {
+	return normaliseLanguageCode(navigator.language /* Mozilla */ || navigator.userLanguage /* IE */);
+}
+
+
+/** Load and parse .properties files */
+function loadAndParseFile(filename, settings) {
+	$.ajax({
+        url:        filename,
+        async:      false,
+        cache:		settings.cache,
+        contentType:'text/plain;charset='+ settings.encoding,
+        dataType:   'text',
+        success:    function(data, status) {
+        				parseData(data, settings.mode); 
+					}
+    });
+}
+
+/** Parse .properties files */
+function parseData(data, mode) {
+   var parsed = '';
+   var parameters = data.split( /\n/ );
+   var regPlaceHolder = /(\{\d+\})/g;
+   var regRepPlaceHolder = /\{(\d+)\}/g;
+   var unicodeRE = /(\\u.{4})/ig;
+   for(var i=0; i<parameters.length; i++ ) {
+       parameters[i] = parameters[i].replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+       if(parameters[i].length > 0 && parameters[i].match("^#")!="#") { // skip comments
+           var pair = parameters[i].split('=');
+           if(pair.length > 0) {
+               /** Process key & value */
+               var name = unescape(pair[0]).replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+               var value = pair.length == 1 ? "" : pair[1];
+               // process multi-line values
+               while(value.match(/\\$/)=="\\") {
+               		value = value.substring(0, value.length - 1);
+               		value += parameters[++i].replace( /\s\s*$/, '' ); // right trim
+               }               
+               // Put values with embedded '='s back together
+               for(var s=2;s<pair.length;s++){ value +='=' + pair[s]; }
+               value = value.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+               
+               /** Mode: bundle keys in a map */
+               if(mode == 'map' || mode == 'both') {
+                   // handle unicode chars possibly left out
+                   var unicodeMatches = value.match(unicodeRE);
+                   if(unicodeMatches) {
+                     for(var u=0; u<unicodeMatches.length; u++) {
+                        value = value.replace( unicodeMatches[u], unescapeUnicode(unicodeMatches[u]));
+                     }
+                   }
+                   // add to map
+                   $.i18n.map[name] = value;
+               }
+               
+               /** Mode: bundle keys as vars/functions */
+               if(mode == 'vars' || mode == 'both') {
+                   value = value.replace( /"/g, '\\"' ); // escape quotation mark (")
+                   
+                   // make sure namespaced key exists (eg, 'some.key') 
+                   checkKeyNamespace(name);
+                   
+                   // value with variable substitutions
+                   if(regPlaceHolder.test(value)) {
+                       var parts = value.split(regPlaceHolder);
+                       // process function args
+                       var first = true;
+                       var fnArgs = '';
+                       var usedArgs = [];
+                       for(var p=0; p<parts.length; p++) {
+                           if(regPlaceHolder.test(parts[p]) && (usedArgs.length == 0 || usedArgs.indexOf(parts[p]) == -1)) {
+                               if(!first) {fnArgs += ',';}
+                               fnArgs += parts[p].replace(regRepPlaceHolder, 'v$1');
+                               usedArgs.push(parts[p]);
+                               first = false;
+                           }
+                       }
+                       parsed += name + '=function(' + fnArgs + '){';
+                       // process function body
+                       var fnExpr = '"' + value.replace(regRepPlaceHolder, '"+v$1+"') + '"';
+                       parsed += 'return ' + fnExpr + ';' + '};';
+                       
+                   // simple value
+                   }else{
+                       parsed += name+'="'+value+'";';
+                   }
+               } // END: Mode: bundle keys as vars/functions
+           } // END: if(pair.length > 0)
+       } // END: skip comments
+   }
+   eval(parsed);
+}
+
+/** Make sure namespace exists (for keys with dots in name) */
+// TODO key parts that start with numbers quietly fail. i.e. month.short.1=Jan
+function checkKeyNamespace(key) {
+	var regDot = /\./;
+	if(regDot.test(key)) {
+		var fullname = '';
+		var names = key.split( /\./ );
+		for(var i=0; i<names.length; i++) {
+			if(i>0) {fullname += '.';}
+			fullname += names[i];
+			if(eval('typeof '+fullname+' == "undefined"')) {
+				eval(fullname + '={};');
+			}
+		}
+	}
+}
+
+/** Make sure filename is an array */
+function getFiles(names) {
+	return (names && names.constructor == Array) ? names : [names];
+}
+
+/** Ensure language code is in the format aa_AA. */
+function normaliseLanguageCode(lang) {
+    lang = lang.toLowerCase();
+    if(lang.length > 3) {
+        lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
+    }
+    return lang;
+}
+
+/** Unescape unicode chars ('\u00e3') */
+function unescapeUnicode(str) {
+  // unescape unicode codes
+  var codes = [];
+  var code = parseInt(str.substr(2), 16);
+  if (code >= 0 && code < Math.pow(2, 16)) {
+     codes.push(code);
+  }
+  // convert codes to text
+  var unescaped = '';
+  for (var i = 0; i < codes.length; ++i) {
+    unescaped += String.fromCharCode(codes[i]);
+  }
+  return unescaped;
+}
+
+/* Cross-Browser Split 1.0.1
+(c) Steven Levithan <stevenlevithan.com>; MIT License
+An ECMA-compliant, uniform cross-browser split method */
+var cbSplit;
+// avoid running twice, which would break `cbSplit._nativeSplit`'s reference to the native `split`
+if (!cbSplit) {    
+  cbSplit = function(str, separator, limit) {
+      // if `separator` is not a regex, use the native `split`
+      if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
+        if(typeof cbSplit._nativeSplit == "undefined")
+          return str.split(separator, limit);
+        else
+          return cbSplit._nativeSplit.call(str, separator, limit);
+      }
+  
+      var output = [],
+          lastLastIndex = 0,
+          flags = (separator.ignoreCase ? "i" : "") +
+                  (separator.multiline  ? "m" : "") +
+                  (separator.sticky     ? "y" : ""),
+          separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
+          separator2, match, lastIndex, lastLength;
+  
+      str = str + ""; // type conversion
+      if (!cbSplit._compliantExecNpcg) {
+          separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
+      }
+  
+      /* behavior for `limit`: if it's...
+      - `undefined`: no limit.
+      - `NaN` or zero: return an empty array.
+      - a positive number: use `Math.floor(limit)`.
+      - a negative number: no limit.
+      - other: type-convert, then use the above rules. */
+      if (limit === undefined || +limit < 0) {
+          limit = Infinity;
+      } else {
+          limit = Math.floor(+limit);
+          if (!limit) {
+              return [];
+          }
+      }
+  
+      while (match = separator.exec(str)) {
+          lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
+  
+          if (lastIndex > lastLastIndex) {
+              output.push(str.slice(lastLastIndex, match.index));
+  
+              // fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
+              if (!cbSplit._compliantExecNpcg && match.length > 1) {
+                  match[0].replace(separator2, function () {
+                      for (var i = 1; i < arguments.length - 2; i++) {
+                          if (arguments[i] === undefined) {
+                              match[i] = undefined;
+                          }
+                      }
+                  });
+              }
+  
+              if (match.length > 1 && match.index < str.length) {
+                  Array.prototype.push.apply(output, match.slice(1));
+              }
+  
+              lastLength = match[0].length;
+              lastLastIndex = lastIndex;
+  
+              if (output.length >= limit) {
+                  break;
+              }
+          }
+  
+          if (separator.lastIndex === match.index) {
+              separator.lastIndex++; // avoid an infinite loop
+          }
+      }
+  
+      if (lastLastIndex === str.length) {
+          if (lastLength || !separator.test("")) {
+              output.push("");
+          }
+      } else {
+          output.push(str.slice(lastLastIndex));
+      }
+  
+      return output.length > limit ? output.slice(0, limit) : output;
+  };
+  
+  cbSplit._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
+  cbSplit._nativeSplit = String.prototype.split;
+
+} // end `if (!cbSplit)`
+String.prototype.split = function (separator, limit) {
+    return cbSplit(this, separator, limit);
+};
+
+})(jQuery);
+                
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/template.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/template.html
index b4671cf..681bd4d 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/template.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/template.html
@@ -1,3 +1,21 @@
+<!--

+

+    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.

+

+-->

+

 <script id="dialogTpl" type="text/html">

     <h3>{{name}}</h3> <div>Skills are:{{#skills}}<div>{{.}}</div>{{/skills}}</div></div>

 </script>

diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templateContainer.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateContainer.html
new file mode 100644
index 0000000..5d583b0
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateContainer.html
@@ -0,0 +1,79 @@
+<!--

+

+    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.

+

+-->

+<!-- Accordion -->

+<script id="accordion" type="text/html">

+    {{#items}}

+    <div class="panel panel-default">

+        <h3 class="panel-title">

+            <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>

+        </h3>

+        <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">

+            <div class="panel-body"> {{msg}} </div>

+        </div>

+    </div>

+    {{/items}}

+</script>

+

+<!--Tabs-->

+<script id="tabs" type="text/html">

+    <ul class="nav nav-tabs">

+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}

+    </ul>

+    <div class="tab-content">

+        {{#items}}

+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">

+            <h3>{{tablabel}}</h3>

+            <p>{{msg}}</p>

+        </div>

+        {{/items}}

+    </div>

+</script>

+

+<!--Vertical Tabs-->

+<script id="vtabs" type="text/html">

+    <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">

+        {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}

+    </ul>

+    <div class="tab-content col-sm-8 col-md-8 col-lg-8">

+        {{#items}}

+        <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">

+            <h3>{{tablabel}}</h3>

+            <p>{{msg}}</p>

+        </div>

+        {{/items}}

+    </div>

+</script>

+

+<!--Table-->

+<script id="table" type="text/html">

+    {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}

+    <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">

+        <thead>

+        <tr>

+            {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}

+        </tr>

+        </thead>

+        <tbody>

+        {{#rowitem}}

+        <tr>

+            {{#values}}<td>{{.}}</td>{{/values}}

+        </tr>

+        {{/rowitem}}

+        </tbody>

+    </table>

+</script>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templateFunctional.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateFunctional.html
new file mode 100644
index 0000000..318903a
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateFunctional.html
@@ -0,0 +1,82 @@
+<!--

+

+    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.

+

+-->

+

+<script id="functionalDialog" type="text/html">

+    <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">

+        <div class="modal-dialog modal-md">

+

+            <!-- Modal content-->

+            <div class="modal-content">

+                <div class="modal-header">

+                    <button type="button" class="close" data-dismiss="modal">&times;</button>

+                    <h4 class="modal-title titlestyle">{{title}}</h4>

+                </div>

+                <div class="modal-body">

+                    <div>

+                        <form class="form-horizontal" role="form">

+                            {{#labels}}

+                            <div class="form-group">

+                                <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>

+                                <div class="col-sm-7">

+                                    <input type={{type}} class="form-control" id={{input_id}}>

+                                </div>

+                            </div>

+                            {{/labels}}

+                        </form>

+                    </div>

+                </div>

+                <div class="modal-footer">

+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" >{{text}}</button> {{/buttons}}

+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}

+                    </div>

+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->

+                </div>

+            </div>

+

+        </div>

+    </div>

+</script>

+

+

+<script id="dialog" type="text/html">

+    <div id="uniModal" 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">&times;</button>

+                    <div class="modalHeader"></div>

+                </div>

+                <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->

+                    <div class="modal-body">

+                        <div class="modalBodyContent">

+                        </div>

+                    </div>

+

+                    <div id="footerBtns" class="modal-footer">

+                    </div>

+

+                </form>

+            </div>

+

+

+        </div>

+    </div>

+

+</script>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templateNotification.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateNotification.html
new file mode 100644
index 0000000..e212b9a
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateNotification.html
@@ -0,0 +1,48 @@
+<!--

+

+    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.

+

+-->

+

+<!--Dialog-->

+<script id="personDialog" type="text/html">

+    <div id="msgModal" class="modal fade" role="dialog">

+        <div class="modal-dialog modal-md">

+

+            <!-- Modal content-->

+            <div class="modal-content">

+                <div class="modal-header">

+                    <button type="button" class="close" data-dismiss="modal">&times;</button>

+                    <h4 class="modal-title titlestyle">{{title}}</h4>

+                </div>

+                <div class="modal-body">

+                    <div class="container center">

+                        <div class="row">

+                            <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>

+                            <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>

+                        </div>

+                    </div>

+                </div>

+                <div class="modal-footer">

+                    <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" ng-click={{action}}>{{text}}</button> {{/buttons}}

+                        {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}

+                    </div>

+                    <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->

+                </div>

+            </div>

+

+        </div>

+    </div>

+</script>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templateWidget.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateWidget.html
new file mode 100644
index 0000000..c66c9b4
--- /dev/null
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templateWidget.html
@@ -0,0 +1,226 @@
+<!--

+

+    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.

+

+-->

+

+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->

+<script id="defaultButtons" type="text/html">

+    <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>

+</script>

+

+<script id="defaultIconButtons" type="text/html">

+    <button id="iconBtn" type="button" class="btnDefault  btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}

+        <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>

+    </button>

+</script>

+

+<!-- Visual Buttons -->

+<script id="visualButtons" type="text/html">

+    <button type="button" class="btn btn-{{type}}">{{title}}</button>

+</script>

+

+<!-- Different sized Buttons -->

+<script id="sizeButtons" type="text/html">

+    <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>

+</script>

+

+<!-- Icon Buttons -->

+<script id="iconButtons" type="text/html">

+    <button type="button" class="btn btn-{{type}}">{{title}}

+        <span class="glyphicon {{gType}}"></span>

+    </button>

+</script>

+

+<!--Dropdown template-->

+<script id="dropDown" type="text/html">

+    <div class="drop{{position}}">

+        <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}

+            <span class="caret"></span>

+        </button>

+        <ul class="dropdown-menu">

+            {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}

+        </ul>

+    </div>

+</script>

+

+<script id="dropDownHeader" type="text/html">

+    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}

+        <span class="caret"></span>

+    </button>

+    <ul class="dropdown-menu">

+        {{#items}}

+        {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}

+        {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}

+        {{/items}}

+    </ul>

+</script>

+

+<script id="simpleDropdownTmpl" type="text/html">

+    <div class="dropdownplain">

+

+        <select class="inputfield form-control" ng-model="{{modalVar}}" ng-options="item.{{labelField}} for item in {{optionsValue}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>

+            <option value="">--select--</option>

+        </select>

+        {{#required}}

+            <span class="staricon">*</span>

+            <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+        {{/required}}

+    </div>

+</script>

+

+

+<!--Radio Buttons-->

+<script id="radioButtons" type="text/html">

+    <div>

+        <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>

+        <label for="radio{{id}}">{{label}}</label></br>

+    </div>

+</script>

+

+<!--Check boxes template-->

+<script id="checkBoxes" type="text/html">

+    <div class="funkyradio-{{type}}">

+        <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />

+        <label for="checkbox{{id}}">{{label}}</label>

+    </div>

+</script>

+

+<!--text-->

+<script id="textfield" type="text/html">

+    <div class="css-form">

+       <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--email-->

+<script id="email" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--url-->

+<script  id="url" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--password-->

+<script  id="password" type="text/html">

+    <div class="css-form">

+

+

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--numeric-->

+<script id="numeric" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--dot-->

+<script  id="dot" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--date-->

+<script  id="dateinput" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--Month-->

+<script  id="monthinput" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+

+<!--Week-->

+<script   id="weekinput" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--time-->

+<script   id="timeinput" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--ipv4-->

+<script   id="ipv4" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--ipv6-->

+<script   id="ipv6" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--textarea-->

+<script id="textarea" type="text/html">

+    <div class="css-form">

+        <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}}

+        <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>

+    </div>

+</script>

+

+<!--note-->

+<script id="note" type="text/html">

+

+    <a  id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">

+        <span class="glyphicon glyphicon-info-sign "></span></a>

+</script>

+

+<!-- list -->

+<script id="list" type="text/html">

+

+    {{#items}}

+

+    <div>

+        <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage('{{id}}', '{{level}}', '{{row}}')">{{title}}</button>

+    </div>

+

+    {{/items}}

+

+</script>

diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/detailInfo.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/detailInfo.html
index c3355ad..ad2c6a6 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/detailInfo.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/detailInfo.html
@@ -1,4 +1,22 @@
 <!--

+

+    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.

+

+-->

+

+<!--

 <h3>hi1</h3>

 <h4>{{currentId}}</h4>

 

diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
index 6496561..c2e4917 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/home.html
@@ -1,3 +1,21 @@
+<!--
+
+    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="col-md-12 col-sm-12 col-lg-12" ng-init="init()">
 
     <div id="lcTableAction">
@@ -7,25 +25,25 @@
     <br>
     <div class="panel panel-default">
     <table ng-table="tableParams" class="table table table-striped table-hover table-bordered lctable" show-filter="true">
-        <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.id})" ui-sref-active="selected-row" ui-sref-opts="{reload: true}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" -->
+        <tr ng-repeat="lcData in $data" ui-sref=".lcTabs({id: lcData.serviceId})" ui-sref-active="selected-row" ui-sref-opts="{reload: false}"><!--target="_self" ng-click="setClickedRow($index, lcData.id)" -->
             <td header="'ng-table/headers/checkbox.html'">
-                <input type="checkbox" ng-model="checkboxes.items[lcData.id]" />
+                <input type="checkbox" ng-model="checkboxes.items[lcData.serviceId]" />
             </td>
             <td  title="'Service Name'" filter="{ name: 'text'}" sortable="'name'">
                 <!--<a data-toggle="modal" class="srvname" ng-click="callModal(lcData.id)">{{lcData.name}}</a>-->
-                <a data-toggle="modal" ng-click="test(lcData.id)" href="#popupModal" class="srvname">{{lcData.name}}</a>
+                <a data-toggle="modal" ng-click="test(lcData.id)" href="#popupModal" class="srvname">{{lcData.serviceName}}</a>
                 <!--<a data-toggle="modal" ng-href="#popupModal" class="srvname">{{lcData.name}}</a>--><!-- ui-sref=".modal1"-->
             </td>
             <td title="'Template Name'" filter="{ template: 'text'}" sortable="'template'">
-                {{lcData.template}}</td>
+                {{lcData.templateName}}</td>
             <td title="'Create time'" filter="{ createtime: 'text'}" sortable="'createtime'">
-                {{lcData.createtime}}</td>
+                {{lcData.createTime}}</td>
             <td title="'Creator'" filter="{ creator: 'text'}" sortable="'creator'">
                 {{lcData.creator}}</td>
             <td title="'Action'">
                 <!--<img src="../images/delete.png" ng-click="editData(lcData.id)" style="cursor: pointer"></img>-->
-                <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(lcData.id)" style="cursor: pointer;margin: 0 5px"></span>
-                <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(lcData.id)" style="cursor: pointer;margin: 0 5px"></span>
+                <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>
+                <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteIndividualData(lcData.serviceId)" style="cursor: pointer;margin: 0 5px"></span>
             </td>
         </tr>
     </table>
@@ -66,8 +84,8 @@
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-xs-4 col-form-label labelstyle">Template Name</label>
-                            <div class="col-xs-8 templateName" >
+                            <label class="col-xs-4 col-form-label labelstyle">Service Description</label>
+                            <div class="col-xs-8 serviceDescription" >
                                 <!--<input class="form-control" ng-model="province.ip" type="ipv4" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" value="" placeholder="IP Address" id="ipaddress" required><br>-->
                             </div>
                         </div>
@@ -83,10 +101,6 @@
                         </div>
                     </div>
                     <div id="templateParameters" class="tab-pane fade">
-                        <div class="form-group row">
-                            <label class="col-xs-4 col-form-label labelstyle">Template version</label>
-                            <div  class="col-xs-8" > {{paramJsonObj}}</div>
-                        </div>
 
                     </div>
                 </div>
@@ -94,4 +108,37 @@
             </div>
         </div>
     </div>
-</div>
\ No newline at end of file
+</div>
+<div class="modal fade" id="progressDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header" style="margin-left:10px;margin-bottom:5px;">
+                <h4 class="modal-title" id="idProgressTitle" style="text-align:center;"></h4>
+            </div>
+            <div class="modal-body" style="margin-left:10px;margin-bottom:5px;margin-right:10px;">
+                <div class="progress">
+                    <div id="progressbar" class="progress-bar" role="progressbar" style="width: 10%;">
+                        <span id ="progressValue">0%</span>       
+                    </div>
+                </div>
+               <div id="progressContent"></div>
+            </div>
+        </div>
+    </div>
+</div>
+<div class="modal fade" id="errorDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" 
+                        aria-hidden="true">¡Á
+                </button>
+                <h4 class="modal-title" id="errorDialogTitle"  style="text-align:center;"></h4>
+            </div>
+            <div class="modal-body" id = "errorDialogReason" style="margin-left:20px;margin-bottom:5px;margin-right:10px;"></div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal">close</button>
+            </div>
+        </div>
+    </div>
+</div>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/inputData.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/inputData.html
index a99614a..a762cc8 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/inputData.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/inputData.html
@@ -1,2 +1,19 @@
+<!--

+

+    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="inputDataElements" style="text-align: left">Hello</div>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
index a712cff..72a229a 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
@@ -1,3 +1,21 @@
+<!--

+

+    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 id="lctabArea" ng-init="init()"></div>-->

 

 

diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
index ce59a9d..8f13edc 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/overlayVPN.html
@@ -1,3 +1,20 @@
+<!--

+

+    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="headerTitle">{{message}}</div>

 <br>

diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/topo.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/topo.html
index 561cfc6..eb6ff18 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/topo.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/topo.html
@@ -1 +1,19 @@
+<!--

+

+    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.

+

+-->

+

 <h3>hi2</h3>
\ No newline at end of file
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
index 3fe8bca..3489c61 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/underlayVPN.html
@@ -1,3 +1,20 @@
+<!--

+

+    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="headerTitle">{{message}}</div>

 <br>

diff --git a/provincemgr/pom.xml b/provincemgr/pom.xml
new file mode 100644
index 0000000..768d623
--- /dev/null
+++ b/provincemgr/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2016-2017, CMCC 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.openo.client.gui</groupId>
+    <artifactId>client-gui</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>performancemgr</artifactId>
+  <version>1.1.0-SNAPSHOT</version>
+  <packaging>war</packaging>
+  <name>client-gui/performancemgr</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/provincemgr/src/main/webapp/provincemgr/index.html b/provincemgr/src/main/webapp/provincemgr/index.html
new file mode 100644
index 0000000..8e4d9b0
--- /dev/null
+++ b/provincemgr/src/main/webapp/provincemgr/index.html
@@ -0,0 +1,52 @@
+<!--
+
+    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>Province Management</title>
+    <link href="thirdparty/css/bootstrap.min.css" rel="stylesheet"/>
+    <!--Pulling Awesome Font -->
+    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
+
+    <link href="thirdparty/css/zTreeStyle.css" rel="stylesheet"/>
+    <link href="thirdparty/css/magic-check.css" rel="stylesheet"/>
+    <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
+    <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
+
+    <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/jquery_1.12.4.min.js"></script>
+    <script src="https://code.jquery.com/ui/1.12.1/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>
+    <script src="thirdparty/js/jquery.ztree.core-3.5.js"></script>
+
+</head>
+
+<body ng-app="ProvinceManagementApp" onload="loadTemplate()">
+<ui-view></ui-view>
+</body>
+</html>
\ No newline at end of file
diff --git a/provincemgr/src/main/webapp/provincemgr/js/app.js b/provincemgr/src/main/webapp/provincemgr/js/app.js
new file mode 100644
index 0000000..1af3d53
--- /dev/null
+++ b/provincemgr/src/main/webapp/provincemgr/js/app.js
@@ -0,0 +1,294 @@
+/*

+

+ 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("ProvinceManagementApp", ["ui.router", "ngTable"])

+

+    .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider){

+

+        $urlMatcherFactoryProvider.caseInsensitive(true);

+        $urlRouterProvider.otherwise('/provinceMgmt');

+        $stateProvider

+            .state("" +

+                "provinceMgmt", {

+                url: "/provinceMgmt",

+                templateUrl : "templates/management.html",

+                controller : "managementCtrl"

+            })

+    })

+

+

+    .controller("managementCtrl", function($scope, $log, provinceDataService, $state, $compile, NgTableParams){

+        $scope.message = "Management";

+

+        $scope.init = function() {

+            provinceDataService.getAllProvinceData()

+                .then(function(data){

+                    $scope.provinceData = data.provinceData;

+                    console.log("Data: ");

+                    loadButtons();

+                    $log.info(data.provinceData);

+                }, function(reason){

+                    $scope.message = "Error is :" + JSON.stringify(reason);

+                });

+

+            /*DataService.post("http://localhost:4000/api/getAllJSONData", {"wdgtType":$scope.provinceTip})

+                .then(function(data){

+                    $scope.provinceTipData = data.data.provinceTip;

+                });*/

+        }

+

+        function loadButtons() {

+

+            console.log("modelTemplate issss"+modelTemplate);

+            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);

+            $('#provinceAction').html($compile(addhtml)($scope));

+

+

+

+            $('#provinceAction').append($compile(deletehtml)($scope));

+

+            $('#managementDialog').html($compile(dialog)($scope));

+

+            $scope.checkboxes = { 'checked': false, items: {} };

+

+            $scope.tableParams = new NgTableParams({count: 5, sorting: {province_name: 'asc'}    //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}

+            }, { counts:[5, 10, 20, 50], dataset: $scope.provinceData});

+

+            $scope.$watch('checkboxes.checked', function(value) {

+                angular.forEach($scope.provinceData, function(item) {

+                    if (angular.isDefined(item.id)) {

+                        $scope.checkboxes.items[item.id] = value;

+                    }

+                });

+            });

+

+            var text = $(modelTemplate).filter('#textfield').html();

+            var ipv4 = $(modelTemplate).filter('#ipv4').html();

+            var number = $(modelTemplate).filter('#numeric').html();

+

+            $('#managementDialog .modalHeader').html('<h5 class="modal-title titlestyle">Modal Header</h5>');

+            $('#managementDialog .modalBodyContent').html('<div class="form-group row"> <label class="col-xs-4 col-form-label labelstyle">Name</label> <div class="col-xs-8 provinceName" > </div> </div>');

+            $('#managementDialog .modalBodyContent').append('<div class="form-group row"> <label class="col-xs-4 col-form-label labelstyle">IP Address</label> <div class="col-xs-8 ipAddress" > </div> </div>');

+            $('#managementDialog .modalBodyContent').append(' <div class="form-group row"> <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label> <div class="col-xs-8 port" > </div> </div>');

+            $('#managementDialog .modalBodyContent').append(' <div class="form-group row"> <label for="desc" class="col-xs-4 col-form-label labelstyle">Description</label> <div class="col-xs-8 desc" > </div> </div>');

+

+

+

+            var dataText = {"ErrMsg" :     {"errmsg" : "Please input Name.", "modalVar":"province.province_name", "placeholder":"Name", "errtag":"ptextboxErr", "errfunc":"validatetextbox", "required":true}};

+            $('#managementDialog .provinceName').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));

+

+            var dataIP = {"ErrMsg" :     {"errmsg" : "Please input IP Address.", "modalVar":"province.ip", "placeholder":"IP Address"}};

+            $('#managementDialog .ipAddress').html($compile(Mustache.to_html(ipv4, dataIP.ErrMsg))($scope));

+

+            var dataNum = {"ErrMsg" :     {"errmsg" : "Please input port.", "modalVar":"province.port", "placeholder":"Port"}};

+            $('#managementDialog .port').html($compile(Mustache.to_html(number, dataNum.ErrMsg))($scope));

+

+            var dataText = {"ErrMsg" :     {"errmsg" : "Please input description.", "modalVar":"province.desc", "placeholder":"Description"}};

+            $('#managementDialog .desc').html($compile(Mustache.to_html(text, dataText.ErrMsg))($scope));

+

+            var modelSubmit_data = {"title":"OK", "clickAction":"saveData(province.id)"};

+            var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);

+            $('#managementDialog #footerBtns').html($compile(modelSubmit_html)($scope));

+

+            var modelBtn_data = {"title":"Cancel", "clickAction":"closeModal()"};

+            var modelBtn_html = Mustache.to_html(def_button_tpl, modelBtn_data);

+            $('#managementDialog #footerBtns').append($compile(modelBtn_html)($scope));

+        }

+

+        $scope.validatetextbox = function (value){

+            if($scope.province.province_name) {

+                $scope.ptextboxErr = false;

+            }

+            else

+                $scope.ptextboxErr = true;

+        }

+

+        $scope.checkAll = function() {

+            console.log("Checked ..");

+            angular.forEach($scope.provinceData, function(data) {

+                $scope.checkboxes.items[user.id]

+            });

+        };

+

+        $scope.closeModal = function() {

+            console.log("Closing Modal...");

+            $('#managementDialog').modal('hide');

+        }

+

+        $scope.showAddModal = function() {

+            console.log("Showing Modal to Add data");

+            $scope.province = {};

+            $scope.textboxErr = false;

+            $scope.ipv4Err = false;

+            $scope.numericErr = false;

+            //$("#myModal").modal();

+            $("#uniModal").modal({}).draggable();

+        }

+        $scope.saveData = function(id) {

+            if(id) {

+                //edit data

+                console.log("Editing data.." + JSON.stringify($scope.province));

+                provinceDataService.editProvinceData($scope.province)

+                    .then(function (data) {

+                            $scope.message = "Success :-)";

+                            $state.reload();

+                        },

+                        function (reason) {

+                            $scope.message = reason.status + " " + reason.statusText;

+                        });

+            }

+            else {

+                console.log("Adding data.." + JSON.stringify($scope.province));

+                provinceDataService.addProvinceData($scope.province)

+                    .then(function (data) {

+                            $scope.message = "Success :-)";

+                            $state.reload();

+                        },

+                        function (reason) {

+                            $scope.message = reason.status + " " + reason.statusText;

+                        });

+            }

+            $('#uniModal').modal('hide');

+        }

+

+        /*$scope.deleteIndividualData = function(id) {

+            var deleteArr = [];

+            //$log.info($scope.checkboxes);

+            deleteArr.push(id);

+

+            console.log("To be deleted : "+deleteArr);

+            //$log.info(deleteArr);

+

+

+            provinceDataService.post("http://localhost:4000/api/deleteProvinceData", {'idList':deleteArr})

+                .then(function(data){

+                        $scope.message = "Successfully deleted :-)";

+                        $state.reload();

+                    },

+                    function(reason){

+                        //$log.info(reason);

+                        $scope.message = reason.status + " " + reason.statusText;

+                    });

+        }*/

+        $scope.deleteData = function(id) {

+            var confirmation=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+")"

+                    }]

+            }};

+            var html = Mustache.to_html(dialog_tpl, error.err_data);

+            $($compile(html)($scope)).modal({backdrop: "static"});

+        }

+

+        $scope.deleteConfirmation = function(id) {

+            console.log("data in province data is :");

+            $log.info($scope.provinceData);

+            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("To be deleted : " + deleteArr);

+

+            for(var i = 0; i < deleteArr.length; i++) {

+                console.log("To be deleted : "+deleteArr[i]);

+                provinceDataService.deleteProvinceData(deleteArr[i])

+                    .then(function(data){

+                            $scope.message = "Successfully deleted :-)";

+                            $state.reload();

+                        },

+                        function(reason){

+                            $scope.message = reason.status + " " + reason.statusText;

+                        });

+            }

+

+           /* provinceDataService.post("http://localhost:4000/api/deleteProvinceData", {'idList':deleteArr})

+                .then(function (data) {

+                        $scope.message = "Successfully deleted :-)";

+                        $state.reload();

+                    },

+                    function (reason) {

+                        $scope.message = reason.status + " " + reason.statusText;

+                    });*/

+        }

+

+        $scope.editData = function(id) {

+            $scope.textboxErr = false;

+            $scope.ipv4Err = false;

+            $scope.numericErr = false;

+            console.log("To be edited : " + id);

+            var dataFound = false;

+            angular.forEach($scope.provinceData, function(data) {

+                if(!dataFound) {

+                    if (data.id == id) {

+                        console.log("Found : " + data.id);

+                        $scope.province = data;

+

+                        $("#uniModal").modal();

+                        dataFound = true;

+                    }

+                }

+            });

+        }

+

+    })

+

+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;

+    });

+}
\ No newline at end of file
diff --git a/provincemgr/src/main/webapp/provincemgr/js/rest.js b/provincemgr/src/main/webapp/provincemgr/js/rest.js
new file mode 100644
index 0000000..1192c84
--- /dev/null
+++ b/provincemgr/src/main/webapp/provincemgr/js/rest.js
@@ -0,0 +1,94 @@
+/*

+

+ 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("provinceDataService", function($http,DataService, $log){

+    var uri = 'http://192.168.9.13:18008';

+    return {

+        getAllProvinceData : function() {

+            /*return $http({

+                url: 'http://localhost:4000/api/getAllProvinceData',

+                method: 'GET',

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                //$log.info(response);

+                return response.data;

+            });*/

+            return DataService.get(uri+'/api/getAllProvinceData')

+                .then(function(response){

+                    $log.info("in get data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        addProvinceData : function(provinceDetail) {

+            /*return $http({

+                url: 'http://localhost:4000/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+'/api/addProvinceData', provinceDetail)

+                .then(function(response){

+                    console.log("Successfully added.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        },

+        deleteProvinceData : function(id) {

+            /*return $http({

+                url: 'http://localhost:4000/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+'/api/deleteProvinceData'+"/"+id)

+                .then(function(response){

+                    $log.info("in delete data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        editProvinceData : function(provinceDetail) {

+            /*return $http({

+                url: 'http://localhost:4000/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+'/api/editProvinceData', provinceDetail)

+                .then(function(response){

+                    console.log("Successfully edited.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        }

+    }

+});

diff --git a/provincemgr/src/main/webapp/provincemgr/templates/management.html b/provincemgr/src/main/webapp/provincemgr/templates/management.html
new file mode 100644
index 0000000..819c153
--- /dev/null
+++ b/provincemgr/src/main/webapp/provincemgr/templates/management.html
@@ -0,0 +1,112 @@
+<!--

+

+    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>{{message}}</h4>

+    <br><br>

+    <div id="provinceAction" ng-init="init()">

+

+    </div>

+    <br>

+    <br>

+

+    <table ng-table="tableParams" class="table table-bordered table-striped customtable" show-filter="true">

+        <tr ng-repeat="provinceData in $data">

+            <td header="'ng-table/headers/checkbox.html'">

+                <input type="checkbox" ng-model="checkboxes.items[provinceData.id]" />

+            </td>

+            <td title="'Name'" filter="{ province_name: 'text'}" sortable="'province_name'">

+                {{provinceData.province_name}}

+            </td>

+            <td title="'IP Address'" filter="{ ip: 'text'}" sortable="'ip'">

+                {{provinceData.ip}}

+            </td>

+            <td title="'Port'" filter="{ port: 'number'}" sortable="'port'">

+                {{provinceData.port}}

+            </td>

+            <td title="'Description'" filter="{ port: 'text'}" sortable="'desc'">

+                {{provinceData.desc}}

+            </td>

+            <td title="'Action'">

+                <span  ng-click="editData(provinceData.id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>

+                <span  ng-click="deleteData(provinceData.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">

+

+            &lt;!&ndash; Modal content&ndash;&gt;

+            <div class="modal-content">

+                <div class="modal-header">

+                    <button type="button" class="close" data-dismiss="modal">&times;</button>

+                    <h5 class="modal-title titlestyle">Modal Header</h5>

+                </div>

+                <form name="provinceForm" method="post">&lt;!&ndash; ng-submit="saveData(province.id)"&ndash;&gt;

+                    <div class="modal-body">

+

+                        <div class="form-group row">

+                            <label class="col-xs-4 col-form-label labelstyle">Name</label>

+                            <div class="col-xs-8 provinceName" >

+                                &lt;!&ndash;<input class="form-control" ng-model="province.province_name" type="text" value="" placeholder="Province Name" id="pname" required><br>&ndash;&gt;

+                            </div>

+                        </div>

+                        <div class="form-group row">

+                            <label class="col-xs-4 col-form-label labelstyle">IP Address</label>

+                            <div class="col-xs-8 ipAddress" >

+                                &lt;!&ndash;<input class="form-control" ng-model="province.ip" type="ipv4" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" value="" placeholder="IP Address" id="ipaddress" required><br>&ndash;&gt;

+                            </div>

+                        </div>

+                        <div class="form-group row">

+                            <label for="port" class="col-xs-4 col-form-label labelstyle">Port</label>

+                            <div class="col-xs-8 port" >

+                                &lt;!&ndash;<input class="form-control" ng-model="province.port" type="number" value="" placeholder="Port" id="port"  required>&ndash;&gt;

+

+                            </div>

+                        </div>

+

+                        &lt;!&ndash;<input type="submit" class="btn btn-default" value="validate"/>&ndash;&gt;

+

+                    </div>

+

+                    <div id="footerBtns" class="modal-footer">

+                        &lt;!&ndash;<button type="button" class="btn btn-default" ng-click="addData(province._id)" data-dismiss="modal" ng-disabled="provinceForm.$invalid">OK</button>&ndash;&gt;

+                        &lt;!&ndash;<input type="submit" class="btn btn-default" value="Submit"/>&ndash;&gt;

+                        &lt;!&ndash;<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>&ndash;&gt;

+                    </div>

+                </form>

+            </div>

+

+

+        </div>

+    </div>-->

+    <!--<div id="myModal" class="modal-header">-->

+    <div id="managementDialog"></div>

+    <!--</div>-->

+</div>

+</div>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/conf/License.txt b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/conf/License.txt
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/conf/License.txt
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/conf/License.txt
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/conf/globalconfig.json b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/conf/globalconfig.json
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/conf/globalconfig.json
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/conf/globalconfig.json
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/RMain.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/RMain.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/RMain.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/RMain.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/VMMain.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/VMMain.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/VMMain.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/VMMain.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/bootstrap-table.min.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/bootstrap-table.min.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/bootstrap-table.min.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/bootstrap-table.min.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/bootstrap.min.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/bootstrap.min.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/bootstrap.min.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/bootstrap.min.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/jquery.dataTables.min.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/jquery.dataTables.min.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/jquery.dataTables.min.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/jquery.dataTables.min.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/css/resmgr.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/resmgr.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/css/resmgr.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/css/resmgr.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/datacenter.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/datacenter.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/datacenter.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/datacenter.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/html/index.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/html/index.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/html/index.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/html/index.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/License.txt
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/License.txt
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/License.txt
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/add.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/add.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/add.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/add.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/arrow-down-enable.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/arrow-down-enable.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/arrow-down-enable.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/arrow-down-enable.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/collapse_arrow.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/collapse_arrow.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/collapse_arrow.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/collapse_arrow.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/delete.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/delete.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/delete.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/delete.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/edit.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/edit.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/edit.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/edit.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/expand_arrow.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/expand_arrow.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/expand_arrow.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/expand_arrow.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/ideo_default_select.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/ideo_default_select.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/ideo_default_select.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/ideo_default_select.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/import.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/import.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/import.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/import.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/line.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/line.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/line.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/line.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/loading-spinner-grey.gif b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/loading-spinner-grey.gif
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/loading-spinner-grey.gif
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/loading-spinner-grey.gif
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/openo.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/openo.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/openo.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/openo.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/page_l.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_l.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/page_l.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_l.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/page_left_disabled.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_left_disabled.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/page_left_disabled.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_left_disabled.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/page_r.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_r.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/page_r.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/page_r.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_asc.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_asc.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_asc.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_asc.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_both.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_both.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_both.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_both.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_desc.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_desc.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/images/sort_desc.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/images/sort_desc.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/SendMsg.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/SendMsg.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/SendMsg.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/SendMsg.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/bootbox.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootbox.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/bootbox.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootbox.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/bootstrap-table.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootstrap-table.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/bootstrap-table.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootstrap-table.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/bootstrap.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootstrap.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/bootstrap.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/bootstrap.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/chart.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/chart.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/chart.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/chart.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/datacenter.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/datacenter.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/datacenter.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/datacenter.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/gconf.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/gconf.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/gconf.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/gconf.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery-1.11.2.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery-1.11.2.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery-1.11.2.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery-1.11.2.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery.dataTables.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery.dataTables.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery.dataTables.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery.dataTables.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery.validate.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery.validate.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/jquery.validate.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/jquery.validate.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/resmgr.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/resmgr.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/resmgr.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/resmgr.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/validateset.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/validateset.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/validateset.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/validateset.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/js/vim.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/vim.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/js/vim.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/js/vim.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/location.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/location.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/location.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/location.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/resource.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/resource.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/resource.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/resource.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-nfv/vim.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/vim.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-nfv/vim.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-nfv/vim.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn.rar b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn.rar
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn.rar
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn.rar
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/conf/License.txt b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/conf/License.txt
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/conf/License.txt
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/conf/License.txt
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/conf/dataconfig.json b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/conf/dataconfig.json
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/conf/dataconfig.json
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/conf/dataconfig.json
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/css/RMain.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/RMain.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/css/RMain.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/RMain.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/css/VMMain.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/VMMain.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/css/VMMain.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/VMMain.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/css/bootstrap-table.min.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/bootstrap-table.min.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/css/bootstrap-table.min.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/bootstrap-table.min.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/css/bootstrap.min.css b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/bootstrap.min.css
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/css/bootstrap.min.css
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/css/bootstrap.min.css
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/License.txt b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/License.txt
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/License.txt
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/License.txt
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/add.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/add.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/add.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/add.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/arrow-down-enable.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/arrow-down-enable.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/arrow-down-enable.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/arrow-down-enable.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/collapse_arrow.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/collapse_arrow.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/collapse_arrow.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/collapse_arrow.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/delete.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/delete.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/delete.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/delete.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/edit.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/edit.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/edit.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/edit.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/expand_arrow.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/expand_arrow.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/expand_arrow.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/expand_arrow.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/ideo_default_select.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/ideo_default_select.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/ideo_default_select.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/ideo_default_select.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/import.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/import.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/import.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/import.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/line.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/line.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/line.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/line.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/loading-spinner-grey.gif b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/loading-spinner-grey.gif
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/loading-spinner-grey.gif
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/loading-spinner-grey.gif
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/openo.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/openo.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/openo.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/openo.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/page_l.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_l.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/page_l.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_l.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/page_left_disabled.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_left_disabled.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/page_left_disabled.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_left_disabled.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/page_r.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_r.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/page_r.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/page_r.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_asc.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_asc.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_asc.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_asc.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_both.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_both.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_both.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_both.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_desc.png b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_desc.png
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/images/sort_desc.png
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/images/sort_desc.png
Binary files differ
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap-table-filter-control.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap-table-filter-control.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap-table-filter-control.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap-table-filter-control.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap-table.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap-table.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap-table.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap-table.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/js/bootstrap.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/bootstrap.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/js/brs.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/brs.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/js/brs.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/brs.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/js/jquery-1.11.2.min.js b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/jquery-1.11.2.min.js
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/js/jquery-1.11.2.min.js
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/js/jquery-1.11.2.min.js
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/link.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/link.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/link.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/link.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/ne.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/ne.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/ne.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/ne.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/port.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/port.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/port.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/port.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/resource.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/resource.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/resource.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/resource.html
diff --git a/resmgr/src/main/webapp/bak/resmgr-sdn/site.html b/resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/site.html
similarity index 100%
rename from resmgr/src/main/webapp/bak/resmgr-sdn/site.html
rename to resmgr/src/main/webapp/resmgr/bak/resmgr-sdn/site.html
diff --git a/resmgr/src/main/webapp/index.html b/resmgr/src/main/webapp/resmgr/index.html
similarity index 97%
rename from resmgr/src/main/webapp/index.html
rename to resmgr/src/main/webapp/resmgr/index.html
index a715202..9a2300f 100644
--- a/resmgr/src/main/webapp/index.html
+++ b/resmgr/src/main/webapp/resmgr/index.html
@@ -26,7 +26,7 @@
     <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
     <link href="thirdparty/css/magic-check.css" rel="stylesheet"/>
     <link rel="stylesheet"; href="https://unpkg.com/ng-table@2.0.2/bundles/ng-table.min.css">
-    <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
+    <!--<link href="framework/css/open-ostyle.css" rel="stylesheet"/>-->
     <!--<link rel="stylesheet" href="framework/css/RMain.css">
     <link rel="stylesheet" href="framework/css/VMMain.css">-->
     <link href="framework/css/open-ostyle.css" rel="stylesheet"/>
diff --git a/resmgr/src/main/webapp/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
similarity index 89%
rename from resmgr/src/main/webapp/js/app.js
rename to resmgr/src/main/webapp/resmgr/js/app.js
index 6c2ef29..149739a 100644
--- a/resmgr/src/main/webapp/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -139,41 +139,49 @@
             var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();

 

 

-            var portName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.name", "errtag":"textboxErr", "errfunc":"validatetextbox", "required":true}};

+            var portName = {"ErrMsg" :     {"errmsg" : "Name is required.", "modalVar":"port.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};

             $('#myModal #name').append($compile(Mustache.to_html(text, portName.ErrMsg))($scope));

 

-            var portMe = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.me", "errtag":"textboxErr", "errfunc":"validatetextbox", "required":true}};

+            var portMe = {"ErrMsg" :     {"errmsg" : "ME is required.", "modalVar":"port.me", "errtag":"textboxErrMe", "errfunc":"validatetextboxMe", "required":true}};

             $('#myModal #me').append($compile(Mustache.to_html(text, portMe.ErrMsg))($scope));

 

             //var portType = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"port.type"}};

             $('#myModal #type').append($compile(Mustache.to_html(dropDown, $scope.data.dropdowntypeData))($scope));

 

-            var portLayerRate = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"port.layerrate"}};

+            var portLayerRate = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.layerrate"}};

             $('#myModal #layerrate').append($compile(Mustache.to_html(text, portLayerRate.ErrMsg))($scope));

 

             //var portEdgePoint = {"ErrMsg" :     {"ipv4Err" : "IP Address is required.", "modalVar":"port.Edgepoint"}};

             $('#myModal #Edgepoint').append($compile(Mustache.to_html(dropDown, $scope.data.dropdownEdgeData))($scope));

 

-            var portIndex = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"port.portindex"}};

+            var portIndex = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.portindex"}};

             $('#myModal #portindex').append($compile(Mustache.to_html(text, portIndex.ErrMsg))($scope));

 

-            var portIp = {"ErrMsg" :     {"textboxErr" : "The ip is required.", "modalVar":"port.ipaddress"}};

+            var portIp = {"ErrMsg" :     {"errmsg" : "The ip is required.", "modalVar":"port.ipaddress"}};

             $('#myModal #ipaddress').append($compile(Mustache.to_html(text, portIp.ErrMsg))($scope));

 

-            var portAdmin = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"port.adminState"}};

+            var portAdmin = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.adminState"}};

             $('#myModal #adminState').append($compile(Mustache.to_html(text, portAdmin.ErrMsg))($scope));

 

-            var portOperatingState = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"port.operatingState"}};

+            var portOperatingState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"port.operatingState"}};

             $('#myModal #operatingState').append($compile(Mustache.to_html(text, portOperatingState.ErrMsg))($scope));

 

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxName = function (value){

             if($scope.port.name) {

-                $scope.textboxErr = false;

+                $scope.textboxErrName = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrName = true;

+        }

+

+        $scope.validatetextboxMe = function (value){

+            if($scope.port.me) {

+                $scope.textboxErrMe = false;

+            }

+            else

+                $scope.textboxErrMe = true;

         }

 

         $scope.validateipv4 = function (value){

@@ -219,7 +227,8 @@
             $scope.port = {};

             //$("#myModal").modal();

             $("#myModal").modal({}).draggable();

-            $scope.textboxErr = false;

+            $scope.textboxErrName = false;

+            $scope.textboxErrMe = false;

             $scope.ipv4Err = false;

             $scope.numericErr = false;

         }

@@ -367,29 +376,29 @@
             var text = $(modelTemplate).filter('#textfield').html();

             var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();

 

-            var siteName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"site.name", "errtag":"textboxErr", "errfunc":"validatetextbox", "required":true}};

+            var siteName = {"ErrMsg" :     {"errmsg" : "Name is required.", "modalVar":"site.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};

             $('#myModal #name').append($compile(Mustache.to_html(text, siteName.ErrMsg))($scope));

 

             $('#myModal #type').append($compile(Mustache.to_html(dropDown, $scope.data.dropdownsiteData))($scope));

 

-            var siteTenantName = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"site.tenatname"}};

+            var siteTenantName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"site.tenatname"}};

             $('#myModal #tenantname').append($compile(Mustache.to_html(text, siteTenantName.ErrMsg))($scope));

 

-            var siteTenantType = {"ErrMsg" :     {"textboxErr" : "The tenanttype is required.", "modalVar":"site.tenanttype"}};

+            var siteTenantType = {"ErrMsg" :     {"errmsg" : "The tenanttype is required.", "modalVar":"site.tenanttype"}};

             $('#myModal #tenanttype').append($compile(Mustache.to_html(text, siteTenantType.ErrMsg))($scope));

 

-            var siteLocation = {"ErrMsg" :     {"textboxErr" : "Location is required.", "modalVar":"site.location", "placeholder":"Location"}};

+            var siteLocation = {"ErrMsg" :     {"errmsg" : "Location is required.", "modalVar":"site.location", "placeholder":"Location"}};

             $('#myModal #location').append($compile(Mustache.to_html(text, siteLocation.ErrMsg))($scope));

 

 

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxName = function (value){

             if($scope.site.name) {

-                $scope.textboxErr = false;

+                $scope.textboxErrName = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrName = true;

         }

 

 

@@ -409,7 +418,7 @@
             $scope.site = {};

             //$("#myModal").modal();

             $("#myModal").modal({}).draggable();

-            $scope.textboxErr = false;

+            $scope.textboxErrName = false;

         }

         $scope.saveData = function(id) {

             if(id) {

@@ -558,82 +567,57 @@
             var ipv4 = $(modelTemplate).filter('#ipv4').html();

             var number = $(modelTemplate).filter('#numeric').html();

 

-            var locId = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"loc.Id", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Country", "placeholder":"Id"}};

+            var locId = {"ErrMsg" :     {"errmsg" : "Name is required.", "modalVar":"loc.Id", "errtag":"textboxErrId", "errfunc":"validatetextboxId", "placeholder":"Country", "placeholder":"Id"}};

             $('#myModal #Name').append($compile(Mustache.to_html(text, locId.ErrMsg))($scope));

 

-            var locCountry = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"loc.Country", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Country","required":true}};

+            var locCountry = {"ErrMsg" :     {"errmsg" : "Country is required.", "modalVar":"loc.Country", "errtag":"textboxErrCountry", "errfunc":"validatetextboxCountry", "placeholder":"Country","required":true}};

             $('#myModal #Country').append($compile(Mustache.to_html(text, locCountry.ErrMsg))($scope));

 

-            var locLocation = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"loc.Location", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Location","required":true}};

+            var locLocation = {"ErrMsg" :     {"errmsg" : "Location is required.", "modalVar":"loc.Location", "errtag":"textboxErrLocation", "errfunc":"validatetextboxLocation", "placeholder":"Location","required":true}};

             $('#myModal #Location').append($compile(Mustache.to_html(text, locLocation.ErrMsg))($scope));

 

             var locDescription = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"loc.Description", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Description "}};

             $('#myModal #Description').append($compile(Mustache.to_html(text, locDescription.ErrMsg))($scope));

 

-            var locLatitude = {"ErrMsg" :     {"ipv4Err" : "IP Address is required.", "modalVar":"loc.Latitude", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Latitude","required":true}};

+            var locLatitude = {"ErrMsg" :     {"errmsg" : "Latitude is required.", "modalVar":"loc.Latitude", "errtag":"textboxErrLatitude", "errfunc":"validatetextboxLatitude", "placeholder":"Latitude","required":true}};

             $('#myModal #Latitude').append($compile(Mustache.to_html(text, locLatitude.ErrMsg))($scope));

 

-            var locLongitude = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"loc.Longitude", "errtag":"textboxErr", "errfunc":"validatetextbox", "placeholder":"Longitude","required":true}};

+            var locLongitude = {"ErrMsg" :     {"errmsg" : "Longitude is required.", "modalVar":"loc.Longitude", "errtag":"textboxErrLongitude", "errfunc":"validatetextboxLongitude", "placeholder":"Longitude","required":true}};

             $('#myModal #Longitude').append($compile(Mustache.to_html(text, locLongitude.ErrMsg))($scope));

         }

 

-        $scope.validatetextbox = function (value){

-            if($scope.loc.Id) {

-                $scope.textboxErr = false;

-            }

-            else

-                $scope.textboxErr = true;

-        }

-

-        $scope.validatetextbox = function (value){

-            if($scope.loc.Country) {

-                $scope.textboxErr = false;

-            }

-            else

-                $scope.textboxErr = true;

-        }

-

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxLocation = function (value){

             if($scope.loc.Location) {

-                $scope.textboxErr = false;

+                $scope.textboxErrLocation = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrLocation = true;

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxCountry = function (value){

+            if($scope.loc.Country) {

+                $scope.textboxErrCountry = false;

+            }

+            else

+                $scope.textboxErrCountry = true;

+        }

+

+        $scope.validatetextboxLatitude = function (value){

             if($scope.loc.Latitude) {

-                $scope.textboxErr = false;

+                $scope.textboxErrLatitude = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrLatitude = true;

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxLongitude = function (value){

             if($scope.loc.Longitude) {

-                $scope.textboxErr = false;

+                $scope.textboxErrLongitude = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrLongitude = true;

         }

 

-        $scope.validatenumeric = function (value){

-            if($scope.loc.Latitude) {

-                $scope.numericErr = false;

-            }

-            else

-                $scope.numericErr = true;

-        }

-

-        $scope.validatenumeric = function (value){

-            if($scope.loc.Longitude) {

-                $scope.numericErr = false;

-            }

-            else

-                $scope.numericErr = true;

-        }

-

-

         $scope.closeModal = function() {

             console.log("Closing Modal...");

             $('#myModal').modal('hide');

@@ -651,8 +635,10 @@
             $scope.location = {};

             //$("#myModal").modal();

             $("#myModal").modal({}).draggable();

-            $scope.textboxErr = false;

-            $scope.numericErr = false;

+            $scope.textboxErrLocation = false;

+            $scope.textboxErrCountry = false;

+            $scope.textboxErrLatitude = false;

+            $scope.textboxErrLongitude = false;

         }

         $scope.saveData = function(id) {

             if(id) {

@@ -806,25 +792,25 @@
             //var linkType = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.type"}};

             $('#myModal #type').append($compile(Mustache.to_html(dropDown, $scope.data.dropdownlinkData))($scope));

 

-            var linkLayerRate = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.layerRate"}};

+            var linkLayerRate = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.layerRate"}};

             $('#myModal #layerRate').append($compile(Mustache.to_html(text, linkLayerRate.ErrMsg))($scope));

 

-            var linkSourcePort = {"ErrMsg" :     {"numericErr" : "The name is required.", "modalVar":"link.sourcePort"}};

+            var linkSourcePort = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.sourcePort"}};

             $('#myModal #sourcePort').append($compile(Mustache.to_html(text, linkSourcePort.ErrMsg))($scope));

 

-            var linkSinkPort = {"ErrMsg" :     {"numericErr" : "IP Address is required.", "modalVar":"link.sinkPort"}};

+            var linkSinkPort = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"link.sinkPort"}};

             $('#myModal #sinkPort').append($compile(Mustache.to_html(text, linkSinkPort.ErrMsg))($scope));

 

-            var linkSourceNe = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.sourceNE"}};

+            var linkSourceNe = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.sourceNE"}};

             $('#myModal #sourceNE').append($compile(Mustache.to_html(text, linkSourceNe.ErrMsg))($scope));

 

-            var linkSinkNe = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.sinkNE"}};

+            var linkSinkNe = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.sinkNE"}};

             $('#myModal #sinkNE').append($compile(Mustache.to_html(text, linkSinkNe.ErrMsg))($scope));

 

-            var linkAdminState = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.adminState"}};

+            var linkAdminState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.adminState"}};

             $('#myModal #adminState').append($compile(Mustache.to_html(text, linkAdminState.ErrMsg))($scope));

 

-            var linkOperatingState = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"link.operatingState"}};

+            var linkOperatingState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"link.operatingState"}};

             $('#myModal #operatingState').append($compile(Mustache.to_html(text, linkOperatingState.ErrMsg))($scope));

 

         }

@@ -1018,58 +1004,51 @@
             var number = $(modelTemplate).filter('#numeric').html();

             var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();

 

-            var neName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.name", "errtag":"textboxErr", "errfunc":"validatetextbox","required":true}};

+            var neName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName","required":true}};

             $('#myModal #name').append($compile(Mustache.to_html(text, neName.ErrMsg))($scope));

 

-            var neVersion = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.version","errtag":"textboxErr", "errfunc":"validatetextbox","required":true}};

+            var neVersion = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.version","errtag":"textboxErrVersion", "errfunc":"validatetextboxVersion","required":true}};

             $('#myModal #version').append($compile(Mustache.to_html(text, neVersion.ErrMsg))($scope));

 

-            var neProductName = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ne.productname" }};

+            var neProductName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.productname" }};

             $('#myModal #productname').append($compile(Mustache.to_html(text, neProductName.ErrMsg))($scope));

 

             $('#myModal #controller').append($compile(Mustache.to_html(dropDown, $scope.data.dropdownneData))($scope));

 

-            var neIPAddress = {"ErrMsg" :     {"ipv4Err" : "IP Address is required.", "modalVar":"ne.ipaddress"}};

+            var neIPAddress = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"ne.ipaddress"}};

             $('#myModal #ipaddress').append($compile(Mustache.to_html(text, neIPAddress.ErrMsg))($scope));

 

-            var neNERole = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ne.nerole"}};

+            var neNERole = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.nerole"}};

             $('#myModal #nerole').append($compile(Mustache.to_html(text, neNERole.ErrMsg))($scope));

 

-            var neAdminState = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ne.adminState"}};

+            var neAdminState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.adminState"}};

             $('#myModal #adminState').append($compile(Mustache.to_html(text, neAdminState.ErrMsg))($scope));

 

-            var neOperatingState = {"ErrMsg" :     {"textboxErr" : "The name is required.", "modalVar":"ne.operatingState"}};

+            var neOperatingState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.operatingState"}};

             $('#myModal #operatingState').append($compile(Mustache.to_html(text, neOperatingState.ErrMsg))($scope));

 

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxName = function (value){

             if($scope.ne.name) {

-                $scope.textboxErr = false;

+                $scope.textboxErrName = false;

             }

             else

-                $scope.textboxErr = true;

+                $scope.textboxErrName = true;

         }

 

-        $scope.validatetextbox = function (value){

+        $scope.validatetextboxVersion = function (value){

             if($scope.ne.version) {

-                $scope.textboxErr = false;

+                $scope.textboxErrVersion = false;

             }

             else

-                $scope.textboxErr = true;

-        }

-

-        $scope.validateipv4 = function (value){

-            if($scope.ne.ipaddress) {

-                $scope.ipv4Err = false;

-            }

-            else

-                $scope.ipv4Err = true;

+                $scope.textboxErrVersion = true;

         }

 

         $scope.closeModal = function() {

             console.log("Closing Modal...");

             $('#myModal').modal('hide');

+            $scope.textboxErrName = false;

         }

 

 

@@ -1083,9 +1062,8 @@
         $scope.showAddModal = function() {

             console.log("Showing Modal to Add data");

             $scope.ne = {};

-            $scope.textboxErr = false;

-            $scope.ipv4Err = false;

-            $scope.numericErr = false;

+            $scope.textboxErrName = false;

+            $scope.textboxErrVersion = false;

             //$("#myModal").modal();

             $("#myModal").modal({}).draggable();

         }

diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html
new file mode 100644
index 0000000..91a1c19
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html
@@ -0,0 +1,134 @@
+<!--/* 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.

+*/-->

+

+<h4>{{title}}</h4>

+<br>

+<br>

+<div id="datacenterAction" ng-init="init()">

+

+</div>

+<br><br>

+

+<table ng-table="neTableParams" class="table table-bordered table-striped" show-filter="true">

+    <tr ng-repeat="datacenterData in $data">

+        <td header="'ng-table/headers/checkbox.html'">

+            <input type="checkbox" ng-model="checkboxes.items[datacenterData.Id]" />

+        </td>

+        <td title="'Id'" filter="{ Id: 'text'}" sortable="'Id'">

+            {{datacenterData.Id}}

+        </td>

+        <td title="'Name'" filter="{ Name: 'number'}" sortable="'Name'">

+            {{datacenterData.Name}}

+        </td>

+        <td title="'Status'" filter="{ Status: 'text'}" sortable="'Status'">

+            {{datacenterData.Status}}

+        </td>

+        </td>

+        <td title="'Country'" filter="{ Country: 'text'}" sortable="'Country'">

+            {{datacenterData.Country}}

+        </td>

+        <td title="'Location'" filter="{ Location: 'text'}" sortable="'Location'">

+            {{datacenterData.Location}}

+        </td>

+        <td title="'Service Name'" filter="{ ServiceName: 'text'}" sortable="'ServiceName'">

+            {{datacenterData.ServiceName}}

+        </td>

+        <td title="'Cpu(Cores)'" filter="{ Cpu: 'number'}" sortable="'Cpu'">

+            {{datacenterData.Cpu}}

+        </td>

+        <td title="'Memory(MB)'" filter="{ Memory: 'number'}" sortable="'Memory'">

+            {{datacenterData.Memory}}

+        </td>

+        <td title="'HardDisk(GB)'" filter="{ HardDisk: 'number'}" sortable="'HardDisk'">

+            {{datacenterData.HardDisk}}

+        </td>

+        <td title="'Action'">

+            <span  ng-click="editData(datacenterData.Id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>

+            <span  ng-click="deleteData(datacenterData.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">&times;</button>

+                <h5 class="modal-title labelstyle">Modal Header</h5>

+            </div>

+            <form ng-submit="saveData(province.id)" name="provinceForm" 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">Country</label>

+                        <div id="Country" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Status</label>

+                        <div id="Status" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Location</label>

+                        <div id="Location" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">ServiceName</label>

+                        <div id="ServiceName" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">CPU(Cores)</label>

+                        <div id="Cpu" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">Memory</label>

+                        <div id="Memory" class="col-xs-8" >

+                        </div>

+                    </div>

+                    <div class="form-group row">

+                        <label class="col-xs-4 col-form-label">HardDisk</label>

+                        <div id="HardDisk" class="col-xs-8" >

+                        </div>

+                    </div>

+

+                </div>

+

+                <div id="footerBtns" class="modal-footer">

+

+                </div>

+            </form>

+        </div>

+

+

+    </div>

+</div>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js
new file mode 100644
index 0000000..3424afe
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js
@@ -0,0 +1,72 @@
+/* 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("datacenterDataService", function($http,DataService, $log){

+    var uri = 'http://192.168.9.13:18008';

+    uri += "/openoapi/resmgr/v1/datacenters/";

+    return {

+        getDatacenterData : function() {

+            /*console.log("hi in dataservice");

+            return $http({

+                url: 'http://localhost:3000/datacenterAPI/getDatacenterData',

+                method: 'GET',

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                //$log.info(response);

+                return response.data;

+            });*/

+            return DataService.get(uri)

+                .then(function(response){

+                    $log.info("in get data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        deleteDatacenterData : function(id) {

+            /*return $http({

+                url: 'http://localhost:3000/datacenterAPI/deleteDatacenterData',

+                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+"/"+id)

+                .then(function(response){

+                    $log.info("in delete data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        editDatacenterData : function(datacenterData) {

+            return DataService.put(uri, datacenterData)

+                .then(function(response){

+                    console.log("Successfully edited.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        },

+        addDatacenterData : function(datacenterData) {

+            return DataService.post(uri, datacenterData)

+                .then(function(response){

+                    console.log("Successfully added.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        }

+    }

+});
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html
new file mode 100644
index 0000000..22e1813
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html
@@ -0,0 +1,109 @@
+<!--/* 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.

+*/-->

+

+<h4>{{title}}</h4>

+<br><br>

+<div id="locationAction" ng-init="init()">

+

+</div>

+<br><br>

+

+<table ng-table="neTableParams" class="table table-bordered table-striped customtable" show-filter="true">

+    <tr ng-repeat="locationData in $data">

+        <td header="'ng-table/headers/checkbox.html'">

+            <input type="checkbox" ng-model="checkboxes.items[locationData.Id]" />

+        </td>

+        <td title="'Id'" filter="{ Id: 'text'}" sortable="'Id'">

+            {{locationData.Id}}

+        </td>

+        <td title="'Country'" filter="{ Country: 'text'}" sortable="'Country'">

+            {{locationData.Country}}

+        </td>

+        <td title="'Location'" filter="{ Location: 'text'}" sortable="'Location'">

+            {{locationData.Location}}

+        </td>

+        </td>

+        <td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">

+            {{locationData.Description}}

+        </td>

+        <td title="'Latitude'" filter="{ Latitude: 'text'}" sortable="'Latitude'">

+            {{locationData.Latitude}}

+        </td>

+        <td title="'Longitude'" filter="{ Longitude: 'text'}" sortable="'Longitude'">

+            {{locationData.Longitude}}

+        </td>

+        <td title="'Action'">

+            <!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(locationData.Id)" style="cursor: pointer;margin: 0 5px"></span>

+            <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteData(locationData.Id)" style="cursor: pointer;margin: 0 5px"></span>-->

+            <span  ng-click="editData(locationData.Id)" style="cursor: pointer;margin: 0 5px"> <img src="framework/images/edit.png" height="15" align="left"/></span>

+            <span  ng-click="deleteData(locationData.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">&times;</button>

+                <h5 class="modal-title">Modal Header</h5>

+            </div>

+            <form  name="locationForm" method="post">  <!--ng-submit="saveData(province.id)"-->

+                <div class="modal-body">

+

+                <div class="form-group row">

+                    <label class="col-xs-4 col-form-label">Country</label>

+                    <div id="Country" class="col-xs-8" >

+                    </div>

+                </div>

+                <div class="form-group row">

+                    <label class="col-xs-4 col-form-label">Location</label>

+                    <div id="Location" class="col-xs-8" >

+                    </div>

+                </div>

+                <div class="form-group row">

+                    <label class="col-xs-4 col-form-label">Latitude</label>

+                    <div id="Latitude" class="col-xs-8" >

+                    </div>

+                </div>

+                <div class="form-group row">

+                    <label class="col-xs-4 col-form-label">Longitude</label>

+                    <div id="Longitude" 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 id="footerBtns" class="modal-footer">

+                </div>

+            </form>

+        </div>

+

+

+    </div>

+</div>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js
new file mode 100644
index 0000000..512bf77
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js
@@ -0,0 +1,72 @@
+/* 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("locationDataService", function($http,DataService, $log){

+    var uri = 'http://192.168.9.13:18008';

+    uri += "/openoapi/resmgr/v1/locations/";

+    return {

+        getLocationData : function() {

+            /*console.log("hi in dataservice");

+            return $http({

+                url: 'http://localhost:3000/locationAPI/getLocationData',

+                method: 'GET',

+                headers: {'Content-Type': 'application/json'}

+            }).then(function(response){

+                //$log.info(response);

+                return response.data;

+            });*/

+            return DataService.get(uri)

+                .then(function(response){

+                    $log.info("in get data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        deleteLocationData : function(id) {

+            /*return $http({

+                url: 'http://localhost:3000/locationAPI/deleteLocationData',

+                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+"/"+id)

+                .then(function(response){

+                    $log.info("in delete data service data is  :"+response);

+                    console.log(response);

+                    return response;

+                });

+        },

+        editLocationData : function(locationData) {

+            return DataService.put(uri, locationData)

+                .then(function(response){

+                    console.log("Successfully edited.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        },

+        addLocationData : function(locationData) {

+            return DataService.post(uri, locationData)

+                .then(function(response){

+                    console.log("Successfully added.. Data returned in DataService is");

+                    console.log(response);

+                    return response;

+                });

+        }

+    }

+});
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.html
new file mode 100644
index 0000000..9985552
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.html
@@ -0,0 +1,69 @@
+<!--
+    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>
+    <head lang="en">
+        <meta charset="UTF-8">
+        <title></title>
+        <link href="css/bootstrap.min.css" rel="stylesheet"/>
+        <link href="css/VMMain.css" rel="stylesheet"/>
+        <link href="css/bootstrap-table.min.css" rel="stylesheet"/>
+
+        <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
+        <script type="text/javascript" src="js/bootstrap.min.js"></script>
+        <script type="text/javascript" src="js/bootstrap-table.min.js"></script>
+        <script type="text/javascript" src="js/bootbox.min.js"></script>
+        <script type="text/javascript" src="js/jquery.validate.min.js"></script>
+        <script type="text/javascript" src="js/chart.min.js"></script>
+
+		<script type="text/javascript" src="js/gconf.js"></script>
+        <script type="text/javascript" src="js/vim.js"></script>
+
+        <style type="text/css">
+        </style>
+
+    </head>
+<body id="open_base_site_cotentBody" class="cotentBody ng-scope">
+
+<div class="container-fluid ms-controller">
+    <br>
+    <div style="font-size:18px">resource using status:</div>
+    <hr>
+    <!-- chart area -->
+    <div style="width:30%;float: left;text-align:center;display: inline">
+        <canvas id="cpuChart"></canvas>
+        <br>
+        <label style="font-size:14px;">Cpu status</label>
+    </div>
+    <div style="width:30%;float: left;text-align:center;display: inline">
+        <canvas id="memoryChart"></canvas>
+        <br>
+        <label style="font-size:14px;">Memory status</label>
+    </div>
+    <div style="width:30%;float: left;text-align:center;display: inline">
+        <canvas id="diskChart"></canvas>
+        <br>
+        <label style="font-size:14px;">Disk status</label>
+    </div>
+    <script type="text/javascript">
+
+
+    </script>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.js b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.js
new file mode 100644
index 0000000..ec5fb46
--- /dev/null
+++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/vim/vim.js
@@ -0,0 +1,93 @@
+/* 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.
+ */
+function loadVimData() {
+    var requestUrl = app_url+"/v1/resmanage/vim/vimInfo";
+    $.ajax({
+        type: "GET",
+        url: requestUrl,
+        contentType: "application/json",
+        success: function (jsonobj) {
+            printCharts(jsonobj.data[0].used.cpu,
+                jsonobj.data[0].total.cpu, jsonobj.data[0].used.memory, jsonobj.data[0].total.memory, jsonobj.data[0].used.disk, jsonobj.data[0].total.disk);
+
+        },
+        error: function (xhr, ajaxOptions, thrownError) {
+            bootbox.alert("Error on getting data (here display the test data) : " + xhr.responseText);
+            printCharts(11, 12, 21, 22, 31, 32);
+        }
+    });
+}
+function printCharts(v11, v12, v21, v22, v31, v32) {
+    var cpuChart = new Chart($("#cpuChart"), {
+        type: 'doughnut',
+        data: {
+            labels: ["used", "available"],
+            datasets: [{
+                data: [v11, v12],
+                backgroundColor: ["#FFCE56", "#36A2EB"],
+                hoverBackgroundColor: ["#FFCE56", "#36A2EB"]
+            }]
+        },
+        options: {
+            animation: {
+                animateScale: true,
+                animateRotate: true
+
+            }
+        }
+    });
+    var memoryChart = new Chart($("#memoryChart"), {
+        type: 'doughnut',
+        data: {
+            labels: ["used", "available"],
+            datasets: [{
+                data: [v21, v22],
+                backgroundColor: ["#FF6384", "#36A2EB"],
+                hoverBackgroundColor: ["#FF6384", "#36A2EB"]
+            }]
+        },
+        options: {
+
+            animation: {
+                animateScale: true,
+                animateRotate: true
+
+            }
+        }
+    });
+    var diskChart = new Chart($("#diskChart"), {
+        type: 'doughnut',
+        data: {
+            labels: ["used", "available"],
+            datasets: [{
+                data: [v31, v32],
+                backgroundColor: ["#FF6384", "green"],
+                hoverBackgroundColor: ["#FF6384", "green"]
+            }]
+        },
+        options: {
+            animation: {
+                animateScale: true,
+                animateRotate: true
+
+            }
+        }
+    });
+}
+
+$(function () {
+    loadVimData();
+
+})
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/sdn-resmgr/link/link.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/link/link.html
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/link/link.html
diff --git a/resmgr/src/main/webapp/sdn-resmgr/link/linkRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/link/linkRest.js
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/link/linkRest.js
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/link/linkRest.js
diff --git a/resmgr/src/main/webapp/sdn-resmgr/ne/ne.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/ne/ne.html
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/ne.html
diff --git a/resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/ne/neRest.js
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js
diff --git a/resmgr/src/main/webapp/sdn-resmgr/port/port.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/port/port.html
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html
diff --git a/resmgr/src/main/webapp/sdn-resmgr/port/portRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/port/portRest.js
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js
diff --git a/resmgr/src/main/webapp/sdn-resmgr/site/site.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/site/site.html
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/site/site.html
diff --git a/resmgr/src/main/webapp/sdn-resmgr/site/siteRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js
similarity index 100%
rename from resmgr/src/main/webapp/sdn-resmgr/site/siteRest.js
rename to resmgr/src/main/webapp/resmgr/sdn-resmgr/site/siteRest.js
diff --git a/resmgr/src/main/webapp/templates/resource.html b/resmgr/src/main/webapp/resmgr/templates/resource.html
similarity index 100%
rename from resmgr/src/main/webapp/templates/resource.html
rename to resmgr/src/main/webapp/resmgr/templates/resource.html