<artifactId>openo-portal</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
- <groupId>oopeno-portal.catalog</groupId>
- <artifactId>catalog</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>portal-catalog</artifactId>
<packaging>pom</packaging>
</project>
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>openo-portal</groupId>
- <artifactId>openo-portal</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath/>
+ <groupId>org.openo.gso.gui</groupId>
+ <artifactId>openo-portal</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
-
- <groupId>openo-portal.module.extsys</groupId>
- <artifactId>module-extsys</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>portal-extsys</artifactId>
<packaging>pom</packaging>
</project>
+++ /dev/null
-/**\r
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-body {\r
- font-family: microsoft yahei !important;\r
-}\r
-\r
-/* blue pill (inspired by iTunes)\r
-*******************************************************************************/\r
-\r
-.grey {\r
- background-color: #e5e5e5;\r
- color: #333;\r
-}\r
-\r
-.blue {\r
-\r
- background-color: #5b9bd1;\r
- border-radius: 20px;\r
- color: #fff;\r
- font-weight: bold;\r
- padding: 8px 0;\r
- text-align: center;\r
- width: 100px;\r
-}\r
-\r
-.blue:hover {\r
- background-color: #e8f3fd;\r
- color: #5b9bd1;\r
-}\r
-\r
-.blue.selected {\r
- border: 0;\r
- background-color: #5b9bd1;\r
- color: #fff;\r
-}\r
-\r
-.blue.selected:hover {\r
- border: 0;\r
- background-color: #5b9bd1;\r
- color: #fff;\r
-}\r
-\r
-p {\r
- color: #444;\r
- font-size: 14px;\r
- font-weight: normal;\r
- line-height: 21px;\r
- margin: 0 0 12px 0;\r
-}\r
-\r
-p.credit {\r
- border-top: 1px solid #ccc;\r
- font-size: 14px;\r
- line-height: 140%;\r
- margin: 36px 0 12px 0;\r
- padding: 8px 0 0 0;\r
- text-align: center;\r
-}\r
-\r
-ul.column {\r
- float: left;\r
- list-style: none;\r
- width: 675px;\r
-}\r
-\r
-ul.column li {\r
- background: #eee;\r
- -webkit-border-radius: 5px;\r
- border-radius: 5px;\r
- -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;\r
- box-shadow: inset 0 1px 1px 0 #c7c7c7;\r
- float: left;\r
- margin: 10px 0 0 10px;\r
- display: block;\r
- height: 150px;\r
- text-align: center;\r
- width: 215px;\r
-}\r
-\r
-/* Clear Floated Elements\r
-------------------------------------------------------------------------------*/\r
-.column:after,.button-collection:after,.clearfix:after,div.project-info:after\r
- {\r
- clear: both;\r
- content: ' ';\r
- display: block;\r
- font-size: 0;\r
- line-height: 0;\r
- visibility: hidden;\r
- width: 0;\r
- height: 0;\r
-}\r
-\r
-.container-fluid {\r
- background-color:white !important;\r
- min-height:500px;\r
-}\r
-\r
-.nav-tabs {\r
- border: 0;\r
-}\r
-\r
-.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus\r
- {\r
- border: 0;\r
- border-top: 3px solid #F3565D;\r
-}\r
-\r
-.nav-tabs>li>a {\r
- border-radius: 0;\r
-}\r
-\r
-.nav-tabs>li>a:hover {\r
- background-color: #f1f3fa;\r
- border: 1Px solid #f1f3fa;\r
-}\r
-\r
-.c3 {\r
- margin-top: 120px;\r
-}\r
-\r
-.skills-chart-breadcrumb {\r
- \r
-}\r
-\r
-.blue:selected {\r
- border: 0;\r
- background-color: #5b9bd1;\r
-}\r
-\r
-.btn {\r
- /* border-width: 0; */\r
- /* padding: 7px 14px; */\r
- /* font-size: 14px; */\r
- /* outline: none !important; */\r
- /* background-image: none !important; */\r
- /* filter: none; */\r
- /* -webkit-box-shadow: none; */\r
- -moz-box-shadow: none;\r
- /* box-shadow: none; */\r
- /* text-shadow: none; */\r
-}\r
-\r
-select {\r
- border-width: 1px;\r
- padding: 4px 1px;\r
- border-radius: 4px;\r
-}\r
-\r
-.input-sm {\r
- padding: 4px 10px;\r
-}\r
-\r
-.btn-block {\r
- display: block;\r
- width: 100%;\r
- padding-left: 0;\r
- padding-right: 0;\r
-}\r
-\r
-/* Bootstrap buttons */\r
-\r
-\r
-.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active\r
- {\r
- color: #333;\r
- background-color: #ededed;\r
- border-color: #b3b3b3;\r
-}\r
-\r
-.open .btn-default.dropdown-toggle {\r
- color: #333;\r
- background-color: #ededed;\r
- border-color: #b3b3b3;\r
-}\r
-\r
-.btn-default:active,.btn-default.active {\r
- background-image: none;\r
- background-color: #e0e0e0;\r
- font-weight: bold;\r
-}\r
-\r
-.btn-default:active:hover,.btn-default.active:hover {\r
- background-color: #e6e6e6;\r
-}\r
-\r
-.open .btn-default.dropdown-toggle {\r
- background-image: none;\r
-}\r
-\r
-.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active\r
- {\r
- background-color: #fff;\r
- border-color: #ccc;\r
-}\r
-\r
-.btn-default .badge {\r
- color: #fff;\r
- background-color: #333;\r
-}\r
-\r
-\r
-.btn-default>i[class^="icon-"],.btn-default>i[class*="icon-"] {\r
- color: #8c8c8c;\r
-}\r
-\r
-div[data-name="tab_zone"] div {\r
- background-color: #f1f3fa;\r
- padding: 0px;\r
-}\r
-\r
-div[data-name="cond_zone"] div {\r
- background-color: #fff;\r
- margin-top: 15px;\r
- margin-bottom: 15px;\r
-}\r
-\r
-div[data-name="res-conds-zone"] {\r
- display: inline;\r
-}\r
-\r
-div[data-name="res-conds-zone"] select,div[data-name="res-conds-zone"] span\r
- {\r
- /**height:33px;*/\r
- margin-left: 15px;\r
- color: #5b9bd1;\r
- border-color: #ccc;\r
- font-weight: bold;\r
-}\r
-\r
-.input{\r
- width:250px;\r
- height: 34px;\r
- padding: 6px 12px;\r
- font-size: 14px;\r
- line-height: 1.42857143;\r
- color: #555;\r
- background-color: #fff;\r
- background-image: none;\r
- border: 1px solid #ccc;\r
- border-radius: 4px;\r
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);\r
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);\r
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;\r
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;\r
-}\r
-\r
-div.separator {\r
- margin: 20px;\r
-}\r
-\r
-div.separator div {\r
- text-align: center;\r
- line-height: 0;\r
-}\r
-\r
-div.separator-line {\r
- height: 1px !important;\r
- width: 100%;\r
- background: #ddd;\r
- overflow: hidden;\r
-}\r
-\r
-.dropdown-toggle {\r
- color: #5b9bd1;\r
-}\r
-\r
-.calendar-date {\r
- color: #5b9bd1;\r
-}\r
-\r
-.range_inputs {\r
- color: #5b9bd1;\r
-}\r
-\r
-.btn.dropdown-toggle,.btn-group .btn.dropdown-toggle,.btn:hover,.btn:disabled,.btn[disabled],.btn:focus,.btn:active,.btn.active\r
- {\r
- outline: none !important;\r
- background-image: none !important;\r
- filter: none;\r
- -webkit-box-shadow: none;\r
- -moz-box-shadow: none;\r
- box-shadow: none;\r
- text-shadow: none;\r
-}\r
-\r
-#skills-chart-breadcrumb {\r
- margin-bottom: 10px\r
-}\r
-\r
-/*增加daterangepicker的css*/\r
-input[name="daterange"] {\r
- width: 220px;\r
- line-height: 0;\r
- height: 31px;\r
- vertical-align: top;\r
- margin-top: 2px;\r
-}\r
-\r
-.daterangepicker .ranges {\r
- width: 205px;\r
-}\r
-\r
-.daterangepicker .ranges input {\r
- width: 95px !important;\r
-}\r
-\r
-td.details-control {\r
- background: url('../images/details_open.png') no-repeat center center;\r
- cursor: pointer;\r
-}\r
-\r
-tr.shown td.details-control {\r
- background: url('../images/details_close.png') no-repeat center center;\r
-}\r
-\r
-.details table td {\r
- word-wrap: break-word;\r
- word-break: normal;\r
- border-top: 1px solid #dddddd;\r
-}\r
-\r
-.details table tr:first-child td {\r
- border-top: none;\r
-}\r
-\r
-.details table {\r
- table-layout: fixed;\r
- width: 100%;\r
-}\r
-\r
-td.title {\r
- width: 10%;\r
-}\r
-\r
-table.dataTable tbody th,table.dataTable tbody td {\r
- padding: 8px 10px;\r
-}\r
-\r
-div.dataTables_length,div.dataTables_info {\r
- display: inline;\r
-}\r
-\r
-div.dataTables_paginate {\r
- display: inline;\r
- float: right;\r
-}\r
-\r
-div.pagination-panel {\r
- margin-right: 10px;\r
-}\r
-\r
-input.pagination-panel-input {\r
- width: 50px;\r
-}\r
-\r
-#ict_res_table_div {\r
- margin-top: 15px;\r
-}\r
-\r
-#ict_res_table_div label {\r
- font-weight: 100;\r
-}\r
-\r
-.daterangepicker .daterangepicker_start_input label,.daterangepicker .daterangepicker_end_input label\r
- {\r
- color: #5b9bd1;\r
-}\r
-\r
-.daterangepicker .ranges .input-mini {\r
- color: #5b9bd1;\r
-}\r
-\r
-.cancelBtn {\r
- padding: 5px 10px 5px 10px;\r
-}\r
-\r
-.btn:focus,.btn:active:focus,.btn.active:focus {\r
- outline: 0;\r
-}\r
-\r
-#ict_res_table_div table {\r
- width: 100% !important;\r
-}\r
-\r
-.control-label .required {\r
- color: #e02222;\r
- font-size: 12px;\r
- padding-left: 2px;\r
-}\r
-\r
-#ict_vim_table tbody tr{\r
- cursor:pointer;\r
-}\r
-\r
-\r
-/*卡片面板样式*/\r
-.animated-panel {\r
- -webkit-animation-duration: .5s;\r
- animation-duration: .5s;\r
- -webkit-animation-fill-mode: both;\r
- animation-fill-mode: both;\r
-}\r
-\r
-.hpanel {\r
- background-color: none;\r
- border: none;\r
- box-shadow: none;\r
- margin-bottom: 25px;\r
- \r
-}\r
-\r
-.hpanel .panel-body {\r
- border: 1px solid #e4e5e7;\r
- border-radius: 2px;\r
- padding: 20px;\r
- position: relative;\r
-}\r
-.h-200 {\r
- min-height: 220px;\r
-}\r
-\r
-.m-t-xl {\r
- margin-top: 40px;\r
-}\r
-\r
-.m-t-xl div {\r
- margin-bottom: 15px;\r
-}\r
-\r
-.text-success {\r
- color: #0d638f;\r
-}\r
-.hpanel > .panel-footer {\r
- color: inherit;\r
- border: 1px solid #e4e5e7;\r
- border-top: none;\r
- font-size: 90%;\r
- background: #f7f9fa;\r
- height:40px;\r
- padding: 5px 15px;\r
-}\r
-.color_cloud{\r
- color:#ccc;\r
-}\r
-.stats-title{\r
-\r
-}\r
-\r
-h3{\r
- margin-top: 10px;\r
- margin-bottom: 40px;\r
- font-weight: 200;\r
-}\r
-\r
-.blue-font{\r
- color:#428bca;\r
-}\r
-\r
-.hpanel > .panel-footer .pull-right a{\r
- margin-left: 5px;\r
-}\r
-\r
-.hpanel > .panel-footer .pull-right .btn{\r
- min-width: 30px !important;\r
-}\r
-\r
-.font-bold {\r
- font-weight: 600;\r
- margin-bottom: 15px;\r
-}\r
-\r
-.hpanel_show{\r
- background-color: #f7f9fa;\r
-}\r
-\r
-.sdn-padding {\r
- padding-left: 0;\r
-}
\ No newline at end of file
+++ /dev/null
-/*\r
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){\r
- jQuery.i18n.properties({\r
- language:lang,\r
- name:propertiesFileNamePrefix,\r
- path:propertiesFilePath,\r
- mode:'map',\r
- callback: function() {\r
- var i18nItems = $('[name_i18n=org_openo_nfv_roc_ui_i18n]');\r
- for(var i=0;i<i18nItems.length;i++){\r
- var $item = $(i18nItems.eq(i));\r
- var itemId = $item.attr('id');\r
- var itemTitle = $item.attr('title');\r
- if(typeof($item.attr("title")) == "string"){\r
- $item.attr("title", ($.i18n.prop(itemTitle)));\r
- }\r
- if(undefined != itemId && typeof($item.attr("placeholder"))=="undefined"){\r
- $item.text($.i18n.prop(itemId));\r
- }else if(undefined != itemId && typeof($item.attr("placeholder"))!="undefined"){\r
- $item.attr("placeholder", $.i18n.prop(itemId));\r
- }\r
- }\r
- }\r
- });\r
-}\r
-var lang = getLanguage();\r
-loadPropertiesSideMenu(lang, 'roc-sdn-iui-i18n', 'i18n/');\r
-\r
+++ /dev/null
-#\r
-# Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-\r
-roc-sdn-iui-common-tip=Tip:\r
-\r
-roc-sdn-iui-text-register=Register SDN controller info\r
-\r
-roc-sdn-iui-message-growl-msg-title=SDN controller info\r
-roc-sdn-iui-message-query-fail=Query SDN controller failed.\r
-roc-sdn-iui-message-save-success=Save successfully.\r
-roc-sdn-iui-message-save-fail=Save failed.\r
-roc-sdn-iui-message-update-success=Update successfully.\r
-roc-sdn-iui-message-update-fail=Update failed.\r
-roc-sdn-iui-message-delete-confirm=Do you want to delete the current SDN controller?\r
-roc-sdn-iui-message-delete-success=SDN controller deleted successfully.\r
-roc-sdn-iui-message-delete-fail=SDN controller deleted failed.\r
-\r
-roc-sdn-iui-text-update=Modify SDN controller info\r
-roc-sdn-iui-text-registerBtn=Register\r
-roc-sdn-iui-text-name=Name\r
-roc-sdn-iui-text-type=Type\r
-roc-sdn-iui-text-userName=Username\r
-roc-sdn-iui-text-password=Password\r
-roc-sdn-iui-text-cancelBtn=Cancel\r
-roc-sdn-iui-text-saveBtn=Save\r
-roc-sdn-iui-text-status-normal=Normal\r
-roc-sdn-iui-text-status-fail=Alarm\r
-roc-sdn-iui-text-total=Total\r
-roc-sdn-iui-text-total-sdn= of SDN Controller\r
-\r
-roc-sdn-iui-validate-name=Please enter a name\r
-roc-sdn-iui-validate-url-required=Please enter the right URL\r
-roc-sdn-iui-validate-url=Example: http://10.0.0.1:8181\r
-roc-sdn-iui-validate-username=Please enter a username\r
-roc-sdn-iui-validate-password=Please enter a password\r
-roc-sdn-iui-text-url-tip=Example: http://10.0.0.1:8181
\ No newline at end of file
+++ /dev/null
-#\r
-# Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-#\r
-\r
-roc-sdn-iui-common-tip=提示:\r
-\r
-roc-sdn-iui-text-register=注册SDN控制器信息\r
-\r
-roc-sdn-iui-message-growl-msg-title=SDN控制器信息\r
-roc-sdn-iui-message-query-fail=查询SDN控制器失败。\r
-roc-sdn-iui-message-save-success=保存成功。\r
-roc-sdn-iui-message-save-fail=保存失败。\r
-roc-sdn-iui-message-update-success=修改成功。\r
-roc-sdn-iui-message-update-fail=修改失败。\r
-roc-sdn-iui-message-delete-confirm=确定删除所选SDN控制器信息?\r
-roc-sdn-iui-message-delete-success=删除成功。\r
-roc-sdn-iui-message-delete-fail=删除失败。\r
-\r
-roc-sdn-iui-text-update=修改SDN控制器信息\r
-roc-sdn-iui-text-registerBtn=注册\r
-roc-sdn-iui-text-name=名称\r
-roc-sdn-iui-text-type=类型\r
-roc-sdn-iui-text-userName=用户名\r
-roc-sdn-iui-text-password=密码\r
-roc-sdn-iui-text-cancelBtn=取消\r
-roc-sdn-iui-text-saveBtn=保存\r
-roc-sdn-iui-text-status-normal=正常\r
-roc-sdn-iui-text-status-fail=报警\r
-roc-sdn-iui-text-total=共\r
-roc-sdn-iui-text-total-sdn= SDN控制器\r
-\r
-roc-sdn-iui-validate-name=请输入名称\r
-roc-sdn-iui-validate-url-required=请输入正确的URL\r
-roc-sdn-iui-validate-url=例如:http://10.0.0.1:8181\r
-roc-sdn-iui-validate-username=请输入用户名\r
-roc-sdn-iui-validate-password=请输入密码\r
-roc-sdn-iui-text-url-tip=例如:http://10.0.0.1:8181
\ No newline at end of file
+++ /dev/null
-$(function () {\r
- var form = $('#sdn_form');\r
- var error = $('.alert-danger', form);\r
- var success = $('.alert-success', form);\r
-\r
- form.validate({\r
- doNotHideMessage : true, //this option enables to show the error/success messages on tab switch.\r
- errorElement : 'span', //default input error message container\r
- errorClass : 'help-block', // default input error message class\r
- focusInvalid : false, // do not focus the last invalid input\r
- rules : {\r
- name : {\r
- required : true,\r
- maxlength : 20\r
- },\r
- url : {\r
- required : true,\r
- url : true\r
- },\r
- userName : {\r
- required : true,\r
- maxlength : 20\r
- },\r
- password : {\r
- required : true,\r
- maxlength : 20\r
- }\r
- },\r
- messages : {\r
- name : {\r
- required : $.i18n.prop("roc-sdn-iui-validate-name")\r
- },\r
- url : {\r
- required : $.i18n.prop("roc-sdn-iui-validate-url-required"),\r
- url : $.i18n.prop("roc-sdn-iui-validate-url")\r
- },\r
- userName : {\r
- required : $.i18n.prop('roc-sdn-iui-validate-username')\r
- },\r
- password : {\r
- required : $.i18n.prop('roc-sdn-iui-validate-password')\r
- }\r
- },\r
- errorPlacement : function (error, element) { // render error placement for each input type\r
- error.insertAfter(element); // for other inputs, just perform default behavior\r
- },\r
- invalidHandler : function (event, validator) { //display error alert on form submit\r
- success.hide();\r
- error.show();\r
- },\r
- highlight : function (element) { // hightlight error inputs\r
- $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group\r
- },\r
- unhighlight : function (element) { // revert the change done by hightlight\r
- $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group\r
- },\r
- success : function (label) {\r
- label.addClass('valid') // mark the current input as valid and display OK icon\r
- .closest('.form-group').removeClass('has-error'); // set success class to the control group\r
- },\r
- submitHandler : function (form) {\r
- success.show();\r
- error.hide();\r
- //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax\r
- }\r
- });\r
-});\r
+++ /dev/null
-/*\r
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-var vm = avalon\r
- .define({\r
- $id : "sdnController",\r
- sdnInfo : [],\r
- server_rtn : {\r
- info_block : false,\r
- warning_block : false,\r
- rtn_info : "",\r
- $RTN_SUCCESS : "RTN_SUCCESS",\r
- $RTN_FAILED : "RTN_FAILED"\r
- },\r
- $Status : {\r
- success : "active",\r
- failed : "inactive"\r
- },\r
- $restUrl : {\r
- querySdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',\r
- addSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',\r
- updateSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',\r
- delSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers'\r
- },\r
- $htmlText : {\r
- saveSuccess : $.i18n.prop("roc-sdn-iui-message-save-success"),\r
- saveFail : $.i18n.prop("roc-sdn-iui-message-save-fail"),\r
- updateSuccess : $.i18n.prop("roc-sdn-iui-message-update-success"),\r
- updateFail : $.i18n.prop("roc-sdn-iui-message-update-fail")\r
- },\r
- $initTable : function () {\r
- $.ajax({\r
- "type" : 'GET',\r
- "url" : vm.$restUrl.querySdnControllerInfoUrl,\r
- "dataType" : "json",\r
- "success" : function (resp) {\r
- if (resp.operationResult == "SUCCESS") {\r
- vm.sdnInfo = (resp == null) ? [] : resp.data;\r
- } else {\r
- vm.sdnInfo = [];\r
- bootbox.alert($.i18n.prop("roc-sdn-iui-message-query-fail"));\r
- return;\r
- }\r
- },\r
- error : function (XMLHttpRequest, textStatus, errorThrown) {\r
- bootbox.alert($.i18n.prop("roc-sdn-iui-message-query-fail") + ":" + textStatus + ":" + errorThrown);\r
- return;\r
- },\r
- complete : function () {\r
- sdnUtil.tooltipSdnStatus();\r
- }\r
- });\r
- },\r
- $sdnType : {\r
- condName : $.i18n.prop("roc-sdn-iui-text-type"),\r
- component_type : 'select',\r
- selectItems : [{\r
- cond_value : 'ODL',\r
- name : "ODL",\r
- value : true\r
- }, {\r
- cond_value : 'ONOS',\r
- name : "ONOS",\r
- value : true\r
- }\r
- ]\r
- },\r
- addSdn : {\r
- title : $.i18n.prop("roc-sdn-iui-text-register"),\r
- sdnId : "",\r
- name : "",\r
- type : "ODL",\r
- typeDisabled : false,\r
- url : "",\r
- urlTip : $.i18n.prop("roc-sdn-iui-text-url-tip"),\r
- userName : "",\r
- password : "",\r
- saveType : "add"\r
- },\r
- $showSdnTable : function () {\r
- vm.addSdn.title = $.i18n.prop("roc-sdn-iui-text-register"),\r
- vm.addSdn.sdnId = "";\r
- vm.addSdn.name = "";\r
- vm.addSdn.type = "ODL";\r
- vm.addSdn.typeDisabled = false;\r
- vm.addSdn.url = "";\r
- vm.addSdn.userName = "";\r
- vm.addSdn.password = "";\r
- vm.addSdn.saveType = "add";\r
- vm.server_rtn.warning_block = false;\r
- vm.server_rtn.info_block = false;\r
-\r
- $(".form-group").each(function () {\r
- $(this).removeClass('has-success');\r
- $(this).removeClass('has-error');\r
- $(this).find(".help-block[id]").remove();\r
- });\r
- $("#addSdnDlg").modal("show");\r
- },\r
- $saveSdn : function () {\r
- var form = $('#sdn_form');\r
- if (form.valid() == false) {\r
- return false;\r
- }\r
- vm.server_rtn.info_block = true;\r
- vm.server_rtn.warning_block = false;\r
- vm.addSdn.status = vm.$Status.success;\r
-\r
- var param = {\r
- name : vm.addSdn.name,\r
- controllerType : $("#type").val(),\r
- url : vm.addSdn.url,\r
- userName : vm.addSdn.userName,\r
- password : vm.addSdn.password\r
- }\r
- if (vm.addSdn.saveType == "add") {
- for( var i = 0; i < vm.sdnInfo.length; i ++ ){
- if(vm.addSdn.url == vm.sdnInfo[i].url){
- sdnUtil.growl($.i18n.prop("roc-sdn-iui-message-growl-msg-title") + 'already exist',"info");
- $('#addSdnDlg').modal('hide');
- return;
- }
- }\r
- $.ajax({\r
- type : "POST",\r
- url : vm.$restUrl.addSdnControllerInfoUrl,\r
- data : JSON.stringify(param),\r
- dataType : "json",\r
- contentType : "application/json",\r
- success : function (data) {\r
- vm.server_rtn.info_block = false;\r
- vm.server_rtn.warning_block = false;\r
- if (data) {\r
- vm.sdnInfo = [];\r
- vm.$initTable();\r
-\r
- $('#addSdnDlg').modal('hide');\r
- sdnUtil.showMessage(vm.$htmlText.saveSuccess, "success");\r
- } else {\r
- vm.server_rtn.warning_block = true;\r
- vm.server_rtn.rtn_info = vm.$htmlText.saveFail;\r
- sdnUtil.showMessage(vm.$htmlText.saveFail, "failed");\r
- }\r
- },\r
- error : function (XMLHttpRequest, textStatus, errorThrown) {\r
- vm.server_rtn.warning_block = true;\r
- vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;\r
- vm.server_rtn.info_block = false;\r
- }\r
- });\r
- } else {\r
- $.ajax({\r
- type : "PUT",\r
- url : vm.$restUrl.updateSdnControllerInfoUrl + vm.addSdn.sdnId,\r
- data : JSON.stringify(param),\r
- dataType : "json",\r
- contentType : "application/json",\r
- success : function (data) {\r
- vm.server_rtn.info_block = false;\r
- vm.server_rtn.warning_block = false;\r
- if (data) {\r
- for (var i = 0; i < vm.sdnInfo.length; i++) {\r
- if (vm.sdnInfo[i].sdnControllerInstanceId == vm.addSdn.sdnId) {\r
- vm.sdnInfo[i].name = vm.addSdn.name;\r
- vm.sdnInfo[i].type = $("#type").val();\r
- vm.sdnInfo[i].url = vm.addSdn.url;\r
- vm.sdnInfo[i].userName = vm.addSdn.userName;\r
- vm.sdnInfo[i].password = vm.addSdn.password;\r
- }\r
- }\r
- $('#addSdnDlg').modal('hide');\r
- sdnUtil.showMessage(vm.$htmlText.updateSuccess, "success");\r
- } else {\r
- vm.server_rtn.warning_block = true;\r
- vm.server_rtn.rtn_info = vm.$htmlText.updateFail;\r
- sdnUtil.showMessage(vm.$htmlText.updateFail, "failed");\r
- }\r
- },\r
- error : function (XMLHttpRequest, textStatus, errorThrown) {\r
- vm.server_rtn.warning_block = true;\r
- vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;\r
- vm.server_rtn.info_block = false;\r
- }\r
- });\r
- }\r
- },\r
- });\r
-avalon.scan();\r
-vm.$initTable();\r
+++ /dev/null
-/*\r
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-var sdnUtil = {};\r
-\r
-sdnUtil.delSdn = function (el) {\r
- bootbox.confirm($.i18n.prop("roc-sdn-iui-message-delete-confirm"), function (result) {\r
- if (result) {\r
- $.ajax({\r
- type : "DELETE",\r
- url : vm.$restUrl.delSdnControllerInfoUrl + el.sdnControllerInstanceId,\r
- dataType : "json",\r
- success : function (data) {\r
- if (data) {\r
- for (var i = 0; i < vm.sdnInfo.length; i++) {\r
- if (el.sdnControllerInstanceId == vm.sdnInfo[i].sdnControllerInstanceId) {\r
- vm.sdnInfo.splice(i, 1);\r
- break;\r
- }\r
- }\r
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-success"), "success");\r
- } else {\r
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-fail"), "warning");\r
- }\r
- },\r
- error : function () {\r
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-fail"), "warning");\r
- }\r
- });\r
- }\r
- });\r
-}\r
-\r
-sdnUtil.updateSdn = function (data) {\r
- vm.addSdn.sdnId = data.sdnControllerInstanceId;\r
- vm.addSdn.name = data.name;\r
- vm.addSdn.type = data.controllerType;\r
- vm.addSdn.typeDisabled = true;\r
- vm.addSdn.url = data.url;\r
- vm.addSdn.userName = data.userName;\r
- vm.addSdn.password = data.password;\r
- vm.addSdn.saveType = "update";\r
- vm.addSdn.title = $.i18n.prop("roc-sdn-iui-text-update");\r
- vm.server_rtn.info_block = false;\r
- vm.server_rtn.warning_block = false;\r
-\r
- $(".form-group").each(function () {\r
- $(this).removeClass('has-success');\r
- $(this).removeClass('has-error');\r
- $(this).find(".help-block[id]").remove();\r
- });\r
- $("#addSdnDlg").modal("show");\r
-}\r
-\r
-sdnUtil.tooltipSdnStatus = function () {\r
- $("[data-toggle='tooltip']").tooltip();\r
-}\r
-\r
-sdnUtil.growl = function (message, type) {\r
- $.growl({\r
- icon : "fa fa-envelope-o fa-lg",\r
- title : " Notice: ",\r
- message : message + " "\r
- }, {\r
- type : type\r
- });\r
-}\r
-\r
-sdnUtil.showMessage = function(message, type) {\r
- $.growl({\r
- icon: "fa fa-envelope-o fa-lg",\r
- title: " " + $.i18n.prop("roc-sdn-iui-common-tip"),\r
- message: message\r
- },{\r
- type: type\r
- });\r
-};\r
+++ /dev/null
-<!--\r
-\r
- Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)\r
-\r
- Licensed under the Apache License, Version 2.0 (the "License");\r
- you may not use this file except in compliance with the License.\r
- You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-\r
--->\r
-<!DOCTYPE html>\r
-<html>\r
-<head lang="en">\r
-<meta charset="UTF-8">\r
-<title></title>\r
-<link href="../component/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>\r
-<link href="../component/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>\r
-<link href="../component/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" type="text/css"/>\r
-<link href="../component/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css"/>\r
-<link href="../framework/css/ngict-component.css" rel="stylesheet" type="text/css"/>\r
-<link href="../vendor/animate/animate.min.css" rel="stylesheet" type="text/css"/>\r
-<link href="css/sdn.css" rel="stylesheet" type="text/css"/>\r
-<style>\r
-.ms-controller {\r
- visibility: hidden\r
-}\r
-</style>\r
-\r
-</head>\r
-<body>\r
- <div class="ms-controller container-fluid" ms-controller="sdnController" >\r
- <div id="addSdnDlg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >\r
- <div class="modal-dialog">\r
- <div class="modal-content Changepasswd">\r
- <div class="content">\r
- <div class="modal-header">\r
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>\r
- <h4 id="myModalLabel">{{addSdn.title}}</h4>\r
- </div>\r
- <div class="modal-body">\r
- <form class="form-horizontal" id="sdn_form" role="form">\r
- <input type="hidden" ms-duplex="addSdn.sdnId" name="sdnId" class="form-control" />\r
- <div class="form-group">\r
- <label class="control-label col-sm-3">\r
- <span id="roc-sdn-iui-text-name" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- <span class="required" aria-required="true">*</span>\r
- </label>\r
- <div class="col-sm-7">\r
- <input type="text" ms-duplex="addSdn.name" name="name" class="form-control"/>\r
- <span class="help-block"></span>\r
- </div>\r
- </div>\r
- <div class="form-group">\r
- <label class="control-label col-sm-3">\r
- <span id="roc-sdn-iui-text-type" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- <span class="required" aria-required="true">*</span>\r
- </label>\r
- <div class="col-sm-7">\r
- <select class="form-control" id="type" ms-each="$sdnType.selectItems" ms-duplex="addSdn.type" ms-attr-disabled="addSdn.typeDisabled">\r
- <option ms-attr-value='el.cond_value'>{{el.name}}</option>\r
- </select>\r
- <span class="help-block"></span>\r
- </div>\r
- </div>\r
- <div class="form-group">\r
- <label class="control-label col-sm-3">\r
- <span>URL</span>\r
- <span class="required" aria-required="true">*</span>\r
- </label>\r
- <div class="col-sm-7">\r
- <input type="text" ms-duplex="addSdn.url" name="url" class="form-control" \r
- ms-attr-placeholder="addSdn.urlTip"/> \r
- <span class="help-block"></span>\r
- </div>\r
- </div>\r
- <div class="form-group">\r
- <label class="control-label col-sm-3">\r
- <span id="roc-sdn-iui-text-userName" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- <span class="required" aria-required="true">*</span>\r
- </label>\r
- <div class="col-sm-7">\r
- <input type="text" ms-duplex="addSdn.userName" name="userName" class="form-control" /> \r
- <span class="help-block"></span>\r
- </div>\r
- </div>\r
- <div class="form-group">\r
- <label class="control-label col-sm-3">\r
- <span id="roc-sdn-iui-text-password" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- <span class="required" aria-required="true">*</span>\r
- </label>\r
- <div class="col-sm-7">\r
- <input type="password" ms-duplex="addSdn.password" name="password" class="form-control" /> \r
- <span class="help-block"></span>\r
- </div>\r
- </div>\r
- </form>\r
- </div>\r
- <div class="modal-footer">\r
- <button class="btn" data-dismiss="modal" aria-hidden="true" id="roc-sdn-iui-text-cancelBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></button>\r
- <button class="btn btn-primary" type="submit" ms-click="$saveSdn" id="roc-sdn-iui-text-saveBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></button>\r
- </div>\r
- </div>\r
- </div>\r
- </div>\r
- </div>\r
- <div class="row-fluid" data-name="cond_zone">\r
- <div class="col-md-12">\r
- <button class="btn white radius_l" id="app-new-btn" ms-click="$showSdnTable" >\r
- <i class="ict-new"></i> <span id="roc-sdn-iui-text-registerBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- </button>\r
- </div>\r
- </div>\r
-\r
- <div class="col-sm-12 sdn-padding" ms-each-el="sdnInfo">\r
-\r
- <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">\r
- <div class="hpanel stats" >\r
- <div class="panel-body h-200" ms-hover="hpanel_show" >\r
- <div class="pull-left">\r
- <span class="label label-success" id="roc-sdn-iui-text-status-normal" name_i18n="org_openo_nfv_roc_ui_i18n"></span>\r
- </div>\r
- <div class="stats-icon pull-right">\r
- <i class="fa fa-server fa-5x color_cloud"></i>\r
- </div>\r
- <div class="m-t-xl">\r
- <h3 ms-text="el.name"></h3> \r
- <div><span id="roc-sdn-iui-text-type" name_i18n="org_openo_nfv_roc_ui_i18n"></span> : <span ms-text="el.controllerType"></span></div>\r
- <div>URL : <span ms-text="el.url"></span></div>\r
- </div>\r
- </div>\r
- <div class="panel-footer">\r
- <div class="pull-right">\r
- <a class="btn btn-default btn-sm" ms-click="sdnUtil.updateSdn(el.$model)"><i class="fa fa-pencil-square-o fa-lg"></i></a>\r
- <a class="btn btn-default btn-sm" ms-click="sdnUtil.delSdn(el)"><i class="fa fa-trash-o fa-lg"> </i></a>\r
- </div>\r
- </div>\r
- </div> \r
- </div>\r
- </div>\r
- <div class="col-sm-12">\r
- <div class="pull-left text-muted">\r
- <small><span id="roc-sdn-iui-text-total" name_i18n="org_openo_nfv_roc_ui_i18n"></span> <span class="blue-font" ms-text="sdnInfo.size()"></span> <span id="roc-sdn-iui-text-total-sdn" name_i18n="org_openo_nfv_roc_ui_i18n"></span></small>\r
- </div> \r
- </div>\r
- </div>\r
- <script type="text/javascript" src="../component/thirdparty/jquery/jquery-1.10.2.min.js"></script>\r
- <script type="text/javascript" src="../component/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>\r
- <script type="text/javascript" src="../component/thirdparty/bootstrap/js/bootstrap.min.js"></script>\r
- <script type="text/javascript" src="../component/thirdparty/bootbox/bootbox.min.js"></script>\r
- <script type="text/javascript" src="../component/thirdparty/jquery-validation/js/jquery.validate.min.js"></script>\r
- <script type="text/javascript" src="../component/thirdparty/jquery-validation/js/additional-methods.min.js"></script>\r
- \r
- <script type="text/javascript" src="../vendor/bootstrap-growl/bootstrap-growl.min.js"></script>\r
- <script type="text/javascript" src="../vendor/cometd/cometd.js"></script>\r
- <script type="text/javascript" src="../vendor/cometd/jquery.cometd.js"></script>\r
- <script type="text/javascript" src="../vendor/avalon/avalon.js"></script>\r
-\r
- <script type="text/javascript" src="../framework/js/tools.js"></script>\r
- \r
- <script type="text/javascript" src="i18n/loadi18nApp.js"></script> \r
- \r
- <script type="text/javascript" src="js/sdn-validate.js"></script>\r
- <script type="text/javascript" src="js/sdnUtil.js"></script>\r
- <script type="text/javascript" src="js/sdnController.js"></script>\r
-</body>\r
-</html>
\ No newline at end of file