formatting the code, removing unnecessary imports and URL patterns correction
Change-Id: Id160a255d4acb4b901ca33965080b76d38810be1
Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
diff --git a/openo-portal/portal-extsys/pom.xml b/openo-portal/portal-extsys/pom.xml
index 8832e0d..3b6c5e5 100644
--- a/openo-portal/portal-extsys/pom.xml
+++ b/openo-portal/portal-extsys/pom.xml
@@ -16,8 +16,9 @@
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">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+ 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>org.openo.gso.gui</groupId>
<artifactId>openo-portal</artifactId>
@@ -34,7 +35,7 @@
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
- </plugin>
- </plugins>
- </build>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
index 1760666..8be93ad 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
@@ -19,318 +19,319 @@
<!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/controller.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">
- $(document).ready(function() {
+ <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/controller.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">
+ $(document).ready(function () {
- var jsondata = loadControllerData();
+ var jsondata = loadControllerData();
- $('#controller').bootstrapTable({
- //Assigning data to table
- data : jsondata
- });
- });
- function operateFormatter(value, row, index) {
- return [ '<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />' ]
- .join('');
+ $('#controller').bootstrapTable({
+ //Assigning data to table
+ data: jsondata
+ });
+ });
+ function operateFormatter(value, row, index) {
+ return ['<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />']
+ .join('');
- }
- window.operateEvents = {
- 'click .siteDeleteImg' : function(e, value, row, index) {
- // TO DO ajex call for delete
- deleteLink(row.id);
- console.log(value, row, index);
- }
- };
-</script>
-</head>
+ }
+ window.operateEvents = {
+ 'click .siteDeleteImg': function (e, value, row, index) {
+ // TO DO ajex call for delete
+ deleteLink(row.id);
+ console.log(value, row, index);
+ }
+ };
+ </script>
+ </head>
<body id="open_base_site_cotentBody" class="cotentBody ng-scope">
- <div class="container-fluid ms-controller">
+<div class="container-fluid ms-controller">
- <div class="uploadBtn">
- <div id="open_base_tpL_userHeader" class="userHeader">
- <div id="open_base_tpL_buttonGroup" class="openoButton_buttonGroupClass">
- <div
+ <div class="uploadBtn">
+ <div id="open_base_tpL_userHeader" class="userHeader">
+ <div id="open_base_tpL_buttonGroup" class="openoButton_buttonGroupClass">
+ <div
class="openo openo-widget-button openoButton_buttonClass_parent ng-isolate-scope openoButton_buttonClass defaultbutton openoButton_button_default"
tabindex="0" id="false" text="res.brApp_ui_res_btn_create" icon-url="./images/add.png"
cls="defaultbutton" click="clickAdd"
style="display: inline-block; padding-left: 0px; padding-right: 0px;">
- <div class="openoButton_buttonInnerClass openo-corner-all openoButton_Image" id="false_button">
+ <div class="openoButton_buttonInnerClass openo-corner-all openoButton_Image" id="false_button">
<span class="openo-widget-button-image openoButton_buttonLeftImg"
- style="background-image: url(images/add.png);"></span><span
- class="openoButton_buttonCenterText openoButton_buttonCenterTextFont">Create</span><span
- class="openo-widget-button-image openoButton_buttonImgDefault"></span>
- </div>
+ style="background-image: url(images/add.png);"></span><span
+ class="openoButton_buttonCenterText openoButton_buttonCenterTextFont">Create</span><span
+ class="openo-widget-button-image openoButton_buttonImgDefault"></span>
</div>
-
</div>
+
</div>
</div>
+ </div>
- <div class="row-fluid" data-name="table_zone">
- <div id='ict_virtualApplication_table_div'>
- <div>
- <div class="top">
- <table id="controller" data-pagination="true" data-page-size="10"
- data-pagination-first-text="First" data-pagination-pre-text="Previous"
- data-pagination-next-text="Next" data-pagination-last-text="Last">
- <thead id="controller" class="openo-table-thead">
- <tr class="active">
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="name" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <div class="row-fluid" data-name="table_zone">
+ <div id='ict_virtualApplication_table_div'>
+ <div>
+ <div class="top">
+ <table id="controller" data-pagination="true" data-page-size="10"
+ data-pagination-first-text="First" data-pagination-pre-text="Previous"
+ data-pagination-next-text="Next" data-pagination-last-text="Last">
+ <thead id="controller" class="openo-table-thead">
+ <tr class="active">
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="name" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_name_sorticon"
- class="openo-table-th-sorticon overflow_elip openoTable_sortable leftHeaderAlign openo-table-disable-element ">Name
+ class="openo-table-th-sorticon overflow_elip openoTable_sortable leftHeaderAlign openo-table-disable-element ">Name
</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="protocol" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="protocol" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_protocol_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Protocol
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Protocol
</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="productname" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="productname" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_productname_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Product
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Product
Name</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="type" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="type" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_type_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Type
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Type
</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="vendor" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="vendor" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_vendor_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Vendor
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Vendor
</span>
- </div>
- </th>
+ </div>
+ </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="version" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="version" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_version_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Version
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Version
</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="description" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="description" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_description_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Description
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Description
</span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="createtime" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="createtime" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_createtime_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Create
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Create
Time </span>
- </div>
- </th>
- <th
- class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
- data-field="operation" data-sortable="true">
- <div class="openo-table-th-border"></div>
- <div class="DataTables_sort_wrapper openo-ellipsis ">
+ </div>
+ </th>
+ <th
+ class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="operation" data-sortable="true">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
<span id="ctrler_operation_sorticon"
- class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Operation
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Operation
</span>
- </div>
- </th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
+ </div>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
</div>
</div>
</div>
- <!-- <div id="tpListopenotable_pagination_wrapper" class="openo-table-pagination-wrapper" style="display: block;"><div class="pagination-container openo-pagination-theme openo-pagination"><div class="openoPagination_openoPaginationLengthOptions" id="tpListopenotable_wrapper_div"><input readonly="true" class="openo-pagination-select openopaginationselect" value="" id="tpListopenotable_wrapper_input" actualval="20" style="width: 32px;"><span class="openo-pagination-selectspan openopaginationselectspan" id="tpListopenotable_wrapper_trigger"></span></div><label style="display: block;float:left;">Total records: 23</label><li class="active"><span class="current prev openo-disabled" id="tpListopenotable_wrapper_prev"> </span></li><ul><li class="active"><span class="current" id="tpListopenotable_wrapper_page_link_1">1</span></li><li><a class="page-link" id="tpListopenotable_wrapper_page_link_2">2</a></li><li><a class="page-link" id="tpListopenotable_wrapper_page_link_3">3</a></li><li><a class="page-link next" id="tpListopenotable_wrapper_next"> </a></li></ul></div></div> -->
+ </div>
+ <!-- <div id="tpListopenotable_pagination_wrapper" class="openo-table-pagination-wrapper" style="display: block;"><div class="pagination-container openo-pagination-theme openo-pagination"><div class="openoPagination_openoPaginationLengthOptions" id="tpListopenotable_wrapper_div"><input readonly="true" class="openo-pagination-select openopaginationselect" value="" id="tpListopenotable_wrapper_input" actualval="20" style="width: 32px;"><span class="openo-pagination-selectspan openopaginationselectspan" id="tpListopenotable_wrapper_trigger"></span></div><label style="display: block;float:left;">Total records: 23</label><li class="active"><span class="current prev openo-disabled" id="tpListopenotable_wrapper_prev"> </span></li><ul><li class="active"><span class="current" id="tpListopenotable_wrapper_page_link_1">1</span></li><li><a class="page-link" id="tpListopenotable_wrapper_page_link_2">2</a></li><li><a class="page-link" id="tpListopenotable_wrapper_page_link_3">3</a></li><li><a class="page-link next" id="tpListopenotable_wrapper_next"> </a></li></ul></div></div> -->
- <div id="vmAppDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
- aria-hidden="false">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="myModalLabel">
- <span>Create</span>
- </h4>
- </div>
- <form class="form-horizontal" role="form" id="controllerForm">
- <div id="wizard">
- <div class="modal-body">
- <ul class="nav nav-pills nav-justified vmapp-margin">
- </ul>
- <div class="tab-content">
- <div class="tab-pane active" id="basicTab">
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label"> <span>Name</span> <span
+ <div id="vmAppDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
+ aria-hidden="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="myModalLabel">
+ <span>Create</span>
+ </h4>
+ </div>
+ <form class="form-horizontal" role="form" id="controllerForm">
+ <div id="wizard">
+ <div class="modal-body">
+ <ul class="nav nav-pills nav-justified vmapp-margin">
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="basicTab">
+ <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
+ <label class="col-sm-3 control-label"> <span>Name</span> <span
class="required">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="name" name="name" class="form-control" />
- </div>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="name" name="name" class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>URL</span> <span
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>URL</span> <span
class="required">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="url" name="url" class="form-control" />
- </div>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="url" name="url" class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>User Name</span> <span
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>User Name</span> <span
class="required">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="username" name="username"
- class="form-control" />
- </div>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="username" name="username"
+ class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Password</span> <span
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Password</span> <span
class="required">*</span>
- </label>
- <div class="col-sm-7">
- <input type="password" id="password" name="password"
- class="form-control" />
- </div>
+ </label>
+ <div class="col-sm-7">
+ <input type="password" id="password" name="password"
+ class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Version</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="version" name="version" class="form-control" />
- </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Version</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="version" name="version" class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Vendor</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="vendor" name="vendor" class="form-control" />
- </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Vendor</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="vendor" name="vendor" class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Description</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="description" name="description"
- class="form-control" />
- </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Description</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="description" name="description"
+ class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Protocol</span>
- </label>
- <div class="col-sm-7">
- <select class="form-control"
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Protocol</span>
+ </label>
+ <div class="col-sm-7">
+ <select class="form-control"
style="padding-top: 0px; padding-bottom: 0px;" id="protocol"
name="protocol">
- <option value="netconf">netconf</option>
- <option value="snmp">snmp</option>
- </select>
- </div>
+ <option value="netconf">netconf</option>
+ <option value="snmp">snmp</option>
+ </select>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Product Name</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="productname" name="productname"
- class="form-control" />
- </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Product Name</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="productname" name="productname"
+ class="form-control"/>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label"> <span>Type</span>
- </label>
- <div class="col-sm-7">
- <select class="form-control"
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label"> <span>Type</span>
+ </label>
+ <div class="col-sm-7">
+ <select class="form-control"
style="padding-top: 0px; padding-bottom: 0px;" id="type"
name="type">
- <option value="odl">ODL</option>
- <option value="onos">ONOS</option>
- </select>
- </div>
+ <option value="odl">ODL</option>
+ <option value="onos">ONOS</option>
+ </select>
</div>
</div>
</div>
</div>
- <div class="modal-footer">
- <button type="button" class="btn SDBtn" data-dismiss="modal" aria-hidden="true"
- id="createLink">
- <span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span>
- </button>
- <button type="button" class="btn button-previous SDBtn">
- <span id="nfv-virtualApplication-iui-text-previousBtn">Cancel</span>
- </button>
-
- </div>
</div>
- </form>
- </div>
+ <div class="modal-footer">
+ <button type="button" class="btn SDBtn" data-dismiss="modal" aria-hidden="true"
+ id="createLink">
+ <span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span>
+ </button>
+ <button type="button" class="btn button-previous SDBtn">
+ <span id="nfv-virtualApplication-iui-text-previousBtn">Cancel</span>
+ </button>
+
+ </div>
+ </div>
+ </form>
</div>
</div>
</div>
</div>
- <div id="filterTpLogicalType_select_popupcontainer" class="openo openo-select-popup-container openo-hide"
- style="width: 155px; max-height: 130px; left: 628px; top: 104px; z-index: 1761;">
- <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_0">
- <label class="openo-ellipsis openo-select-blank-item" style="width: 100%; display: block; height: 20px;"></label>
- </div>
- <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_1">
- <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">ETH</label>
- </div>
- <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_2">
- <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;" title="POS">POS</label>
- </div>
- <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_3">
- <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Trunk</label>
- </div>
- <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_4">
- <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Loopback</label>
- </div>
+</div>
+<div id="filterTpLogicalType_select_popupcontainer" class="openo openo-select-popup-container openo-hide"
+ style="width: 155px; max-height: 130px; left: 628px; top: 104px; z-index: 1761;">
+ <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_0">
+ <label class="openo-ellipsis openo-select-blank-item"
+ style="width: 100%; display: block; height: 20px;"></label>
</div>
+ <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_1">
+ <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">ETH</label>
+ </div>
+ <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_2">
+ <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;" title="POS">POS</label>
+ </div>
+ <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_3">
+ <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Trunk</label>
+ </div>
+ <div class="openo-select-item openo-ellipsis " id="filterTpLogicalType_openo-select-id_4">
+ <label class="openo-ellipsis " style="width: 100%; display: block; height: 20px;">Loopback</label>
+ </div>
+</div>
</body>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css
index 1b8488a..0a74032 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/RMain.css
@@ -13,199 +13,227 @@
* limitations under the License.
*/
-
#iemp_layout_container {
- padding: 0px;
- margin: 1px auto;
- width: 100%;
- height: 100%;
+ padding: 0px;
+ margin: 1px auto;
+ width: 100%;
+ height: 100%;
}
+
#iemp_layout_container .three-cols-layout {
- width: 100%;
- height: 100%;
- border-collapse: collapse;
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
+ width: 100%;
+ height: 100%;
+ border-collapse: collapse;
+ margin-left: 0px;
+ margin-top: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
}
+
#iemp_layout_container .three-cols-layout {
- width: 100%;
- height: 100%;
- border-collapse: collapse;
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
+ width: 100%;
+ height: 100%;
+ border-collapse: collapse;
+ margin-left: 0px;
+ margin-top: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
}
+
#iemp_layout_container .three-cols-column.three-cols-left {
- width: 215px;
- background-color: #f5f5f5;
+ width: 215px;
+ background-color: #f5f5f5;
}
+
.accordion_parent {
- position: relative;
- width: 220px;
- background-color: #f5f5f5;
+ position: relative;
+ width: 220px;
+ background-color: #f5f5f5;
}
+
.openo-accordion-resizable-handle {
- z-index: 1!important;
- cursor: e-resize;
- width: 7px;
- right: -5px;
- top: 0;
- height: 100%;
- position: absolute;
- font-size: .1px;
- display: block;
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
}
+
.openoAccordian_accordionmenu {
- width: 100%;
- margin: 0;
- padding: 0;
- list-style-type: none;
- line-height: 17px;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ line-height: 17px;
}
+
.openoAccordian_accordionmenu li {
- min-width: 75px;
- margin: 0;
- padding: 0;
- list-style-type: none;
- color: #000;
- clear: both;
+ min-width: 75px;
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ color: #000;
+ clear: both;
}
+
.openo_accordion_ui-icon-collapse, .openo_accordion_ui-icon-expand {
- display: block;
- float: left;
- margin-bottom: -1px;
- border-bottom: 1px solid #e5e5e5;
- cursor: pointer;
- width: 13px;
- padding-top: 26px;
+ display: block;
+ float: left;
+ margin-bottom: -1px;
+ border-bottom: 1px solid #e5e5e5;
+ cursor: pointer;
+ width: 13px;
+ padding-top: 26px;
}
+
.openo_accordion_ui-icon-expand {
- background: url(../images/collapse_arrow.png) right 20px no-repeat;
- margin-top: 8px;
+ background: url(../images/collapse_arrow.png) right 20px no-repeat;
+ margin-top: 8px;
}
-.openo_accordion_ui-icon-expand.current{
- background: url(../images/expand_arrow.png) right 20px no-repeat;
+
+.openo_accordion_ui-icon-expand.current {
+ background: url(../images/expand_arrow.png) right 20px no-repeat;
}
+
.openoAccordian_showHideArrow_hide, .openoAccordian_showHideArrow_show {
- display: block;
- position: absolute;
- right: 0;
- top: 4px;
- width: 18px;
- height: 41px;
- cursor: pointer;
- background-color: #f5f5f5;
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 4px;
+ width: 18px;
+ height: 41px;
+ cursor: pointer;
+ background-color: #f5f5f5;
}
+
.openoAccordian_showHideArrow_hide {
- background-image: url(../images/openo.png);
- background-position: -7px 0!important;
- border-collapse: separate;
- /*box-shadow: inset -1px 0 0 #e5e5e5;*/
+ background-image: url(../images/openo.png);
+ background-position: -7px 0 !important;
+ border-collapse: separate;
+ /*box-shadow: inset -1px 0 0 #e5e5e5;*/
}
+
a.header.opened, a.header.closed {
- font-size: 16px;
- padding-top: 24px;
- padding-bottom: 25px;
- color: #999999;
+ font-size: 16px;
+ padding-top: 24px;
+ padding-bottom: 25px;
+ color: #999999;
}
+
.openoAccordian_accordionmenu .closed, .openoAccordian_accordionmenu .opened {
- padding-right: 10px;
- background-position: 98% 50%;
- background-repeat: no-repeat;
+ padding-right: 10px;
+ background-position: 98% 50%;
+ background-repeat: no-repeat;
}
+
.openoAccordian_accordionmenu li a {
- padding: 11px 10px 12px;
- color: #333333;
- margin-right: 1px;
- margin-top: -1px;
- text-align: left!important;
- font-family: "Microsoft Yahei",SimSun,Arial,Tahoma;
- font-size: 14px;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- border-top: 1px solid #e5e5e5;
- border-bottom: 1px solid #e5e5e5;
- /*height: 19px;*/
+ padding: 11px 10px 12px;
+ color: #333333;
+ margin-right: 1px;
+ margin-top: -1px;
+ text-align: left !important;
+ font-family: "Microsoft Yahei", SimSun, Arial, Tahoma;
+ font-size: 14px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #e5e5e5;
+ /*height: 19px;*/
}
+
.openoAccordian_accordionmenu ul {
- margin: 0;
- padding: 0;
- overflow: hidden;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
}
+
.openoAccordian_accordionmenu a {
- display: block;
- text-decoration: none;
+ display: block;
+ text-decoration: none;
}
+
a {
- color: #428bca;
- text-decoration: none;
- background: 0 0;
+ color: #428bca;
+ text-decoration: none;
+ background: 0 0;
}
-.bar{
+
+.bar {
height: 834px;
width: 18px;
background: #f8f8f8;
display: none;
}
-.bar span{
+
+.bar span {
width: 13px;
height: 34px;
background-image: url(../images/openo.png);
- background-position: -39px 0!important;
- display: block;
- /*margin-top: -430px;*/
+ background-position: -39px 0 !important;
+ display: block;
+ /*margin-top: -430px;*/
}
-#accordionmenuid_ul_0_0_brAppTopMenuID_UL li{
+
+#accordionmenuid_ul_0_0_brAppTopMenuID_UL li {
cursor: pointer;
}
-#puer_base_openo{
+
+#puer_base_openo {
border: 1px solid #ddd;
}
+
.openo_accordion_selected {
- margin-left: 0;
- margin-right: 0;
- background: #fafafa;
- border-left: 3px solid #4ac9ff!important;
- box-shadow: none;
- position: relative;
+ margin-left: 0;
+ margin-right: 0;
+ background: #fafafa;
+ border-left: 3px solid #4ac9ff !important;
+ box-shadow: none;
+ position: relative;
}
-a:hover{
- color: #4ac9ff!important;
+
+a:hover {
+ color: #4ac9ff !important;
}
+
.openoAccordian_accordionmenu li.openo_accordion_selected a {
- position: relative;
- left: -3px;
- color: #009ae7;
+ position: relative;
+ left: -3px;
+ color: #009ae7;
}
+
.openo-accordion-resizable-handle {
- z-index: 1!important;
- cursor: e-resize;
- width: 7px;
- right: -5px;
- top: 0;
- height: 100%;
- position: absolute;
- font-size: .1px;
- display: block;
+ z-index: 1 !important;
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0;
+ height: 100%;
+ position: absolute;
+ font-size: .1px;
+ display: block;
}
+
#iframeContainer iframe {
- width: 100%;
- height: 100%;
- border: 0;
+ width: 100%;
+ height: 100%;
+ border: 0;
}
+
#accordionContent, #iframeContainer {
- margin: 0;
- padding: 0;
- border: 0;
- width: 100%;
- height: 100%;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ width: 100%;
+ height: 100%;
}
+
.openoAccordian_showHideArrow_show {
- background-image: url(../images/openo.png);
- background-position: -39px 0!important;
- box-shadow: inset 1px 0 0 #e5e5e5,inset -1px 0 0 #e5e5e5;
+ background-image: url(../images/openo.png);
+ background-position: -39px 0 !important;
+ box-shadow: inset 1px 0 0 #e5e5e5, inset -1px 0 0 #e5e5e5;
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css
index e625e90..a1c0866 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/css/VMMain.css
@@ -13,60 +13,68 @@
* limitations under the License.
*/
-
-body{
+body {
font-family: '微软雅黑';
font-size: 12px;
color: #333;
background: #fafafa;
}
-button{
+
+button {
outline: none;
}
-ul,li{
+
+ul, li {
list-style: none;
- padding:0;
- margin:0;
+ padding: 0;
+ margin: 0;
}
-.titleFont{
+
+.titleFont {
font-size: 16px;
}
-.separator-line{
+
+.separator-line {
height: 1px;
width: 100%;
- border:1px solid #ddd;
+ border: 1px solid #ddd;
margin: 6px 0 15px 0;
}
-.uploadBtn{
+
+.uploadBtn {
overflow: hidden;
}
+
.creat-btn {
- padding: 0 14px;
- height: 24px;
+ padding: 0 14px;
+ height: 24px;
float: left;
cursor: pointer;
text-decoration: none;
outline: 0;
border: 1px solid #d3d3d3;
text-align: center;
- box-shadow: 0 1px 1px rgba(0,0,0,.05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
background: #fafafa;
- background: -moz-linear-gradient(top,#fff,#fafafa);
- background: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#fafafa));
- background: -webkit-linear-gradient(top,#fff,#fafafa);
- background: linear-gradient(to bottom,#fff,#fafafa);
+ background: -moz-linear-gradient(top, #fff, #fafafa);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa));
+ background: -webkit-linear-gradient(top, #fff, #fafafa);
+ background: linear-gradient(to bottom, #fff, #fafafa);
border-radius: 6px;
background: #fff url(../images/add.png) no-repeat 5px center;
padding-left: 20px;
}
+
.creat-btn:hover {
- color: #009ae7;
- border: 1px solid #4AC9FF
+ color: #009ae7;
+ border: 1px solid #4AC9FF
}
+
.creat-btn:active {
- color: #000;
- border: 1px solid #4AC9FF
+ color: #000;
+ border: 1px solid #4AC9FF
}
+
/*.creat-btn{
background: #fff url(../image/add.png) no-repeat 5px center;
border: 1px solid #ddd;
@@ -77,110 +85,130 @@
color: #fff;
border:1px solid #428bca;
}*/
-.search{
+.search {
width: 310px;
height: 30px;
- float:right;
+ float: right;
}
-.search-text{
+
+.search-text {
width: 250px;
float: left;
margin-right: 6px;
}
-.search-btn{
+
+.search-btn {
height: 30px;
background: #fff;
border: 1px solid #ddd;
float: left;
}
-#ict_virtualApplication_table_div{
+
+#ict_virtualApplication_table_div {
margin-top: 15px;
}
-.table>thead>tr.active>th{
- border: 1px solid #ddd!important;
+
+.table > thead > tr.active > th {
+ border: 1px solid #ddd !important;
border-bottom: 0;
background: #f0f0f0;
}
+
/*.table tbody tr:hover{
background: #e6fbe0!important;
}*/
-.table tbody tr:last-child{
+.table tbody tr:last-child {
border-bottom: 1px solid #ddd;
}
-.table-btn{
+
+.table-btn {
border: 1px solid #ccc;
border-radius: 3px;
}
-.delete-btn{
+
+.delete-btn {
background: url(../image/delete.png) no-repeat;
width: 16px;
height: 16px;
border: none;
}
-.detail-btn{
+
+.detail-btn {
background: url(../image/openo.png) no-repeat -343px -283px;
width: 16px;
height: 16px;
border: none;
}
-.detail-btn.current{
- background-position: -7px -314px;
+
+.detail-btn.current {
+ background-position: -7px -314px;
}
-.detail{
+
+.detail {
height: 200px;
border: 1px solid #ddd;
margin-top: 60px;
}
-.detail-top ul{
+.detail-top ul {
height: 50px;
line-height: 50px;
border-bottom: 1px solid #ddd;
padding-left: 0px;
- background: #fafafa;
+ background: #fafafa;
}
-.detail-top ul li{
- float:left;
+
+.detail-top ul li {
+ float: left;
width: 120px;
text-align: center;
border-right: 1px solid #ddd;
cursor: pointer;
}
-.detail-top ul li.current{
+
+.detail-top ul li.current {
background: #fff;
}
-.vmapp-margin{
+
+.vmapp-margin {
margin-bottom: 10px;
}
-.control-label .required{
+
+.control-label .required {
color: #e02222;
font-size: 12px;
padding-left: 2px;
}
-.form-group .control-label{
+
+.form-group .control-label {
font-size: 12px;
font-weight: 400;
}
-legend{
+
+legend {
font-size: 12px;
font-weight: bold;
}
-.pageGro{
+
+.pageGro {
width: 250px;
float: right;
}
-.pageUp,.pageDown,.pageList,.pageList li{
+
+.pageUp, .pageDown, .pageList, .pageList li {
float: left;
cursor: pointer;
}
-.pageUp,.pageDown{
+
+.pageUp, .pageDown {
width: 60px;
height: 30px;
border: 1px solid #ddd;
text-align: center;
line-height: 30px;
}
-.pageList li{
+
+.pageList li {
width: 30px;
height: 30px;
border: 1px solid #ddd;
@@ -188,466 +216,543 @@
line-height: 30px;
border-left: none;
}
-.pageList li.active{
+
+.pageList li.active {
background: #428bca;
color: #fff;
border-color: #428bca;
}
-.pageDown{
+
+.pageDown {
border-left: none;
}
-.headerLinkP{
+
+.headerLinkP {
padding-top: 17px;
}
-.headerLinkP span{
+
+.headerLinkP span {
font-size: 12px;
color: #666;
- font-weight: normal!important;
+ font-weight: normal !important;
}
-label{
- font-weight: normal!important;
+
+label {
+ font-weight: normal !important;
}
+
table.userform tbody tr td {
- display: table-cell;
- padding-right: 10px;
- padding-top: 10px;
- font-size: 12px;
- color: #333;
+ display: table-cell;
+ padding-right: 10px;
+ padding-top: 10px;
+ font-size: 12px;
+ color: #333;
}
-.table th,.table td{
- padding-top: 3px!important;
- padding-bottom: 3px!important;
+
+.table th, .table td {
+ padding-top: 3px !important;
+ padding-bottom: 3px !important;
}
+
.openoBrowseButton_element {
- display: table;
+ display: table;
}
+
.openo {
- font-family: "Microsoft Yahei",SimSun,Arial,Tahoma;
- font-size: 12px;
- color: #000;
+ font-family: "Microsoft Yahei", SimSun, Arial, Tahoma;
+ font-size: 12px;
+ color: #000;
}
+
.openoBrowseButton_input {
- width: 198px;
- position: relative;
- border: 1px solid #c3c3c3!important;
- height: 26px;
- background-color: #f3f3f3;
- border-radius: 4px 0 0 4px;
- border-right: none;
- padding: 0;
+ width: 198px;
+ position: relative;
+ border: 1px solid #c3c3c3 !important;
+ height: 26px;
+ background-color: #f3f3f3;
+ border-radius: 4px 0 0 4px;
+ border-right: none;
+ padding: 0;
}
+
.buttonClassDefault, .buttonClassDefault:active {
- cursor: pointer;
- background-image: url(../images/openo.png);
- background-position: -154px -7px!important;
+ cursor: pointer;
+ background-image: url(../images/openo.png);
+ background-position: -154px -7px !important;
}
+
.openoBrowseButton_button {
- width: 27px;
- border: 0;
- float: right;
- position: relative;
- height: 26px;
- right: 0;
- top: 0;
- border-radius: 0 4px 4px 0;
- border-right: 1px solid #c3c3c3;
- border-left: none;
+ width: 27px;
+ border: 0;
+ float: right;
+ position: relative;
+ height: 26px;
+ right: 0;
+ top: 0;
+ border-radius: 0 4px 4px 0;
+ border-right: 1px solid #c3c3c3;
+ border-left: none;
}
+
.openo .openo-input, .openo.openo-input {
- outline: 0;
- border: 1px solid #c3c3c3;
- box-shadow: 1px 1px #f6f6f6 inset;
- background-color: #fff;
- height: 26px;
+ outline: 0;
+ border: 1px solid #c3c3c3;
+ box-shadow: 1px 1px #f6f6f6 inset;
+ background-color: #fff;
+ height: 26px;
}
+
.openoInput_openoDefaultText {
- padding: 0 0 0 6px;
- border-radius: 4px;
- color: #000;
- display: inline-block;
- outline: 0;
- box-shadow: 1px 1px #f6f6f6 inset;
- font-size: 12px;
- background: #fff;
+ padding: 0 0 0 6px;
+ border-radius: 4px;
+ color: #000;
+ display: inline-block;
+ outline: 0;
+ box-shadow: 1px 1px #f6f6f6 inset;
+ font-size: 12px;
+ background: #fff;
}
+
div.openo-select {
- border: 1px solid #c3c3c3;
- border-radius: 4px;
- background: url(../images/arrow-down-enable.png) right no-repeat #fff;
- line-height: 24px;
- padding-left: 3px;
- display: block;
+ border: 1px solid #c3c3c3;
+ border-radius: 4px;
+ background: url(../images/arrow-down-enable.png) right no-repeat #fff;
+ line-height: 24px;
+ padding-left: 3px;
+ display: block;
}
-div.openo-select>input.openo-select-input {
- border: none;
- outline: 0;
- line-height: 21px;
- height: 21px;
- padding-left: 3px;
- border-right: solid 1px #c3c3c3;
+
+div.openo-select > input.openo-select-input {
+ border: none;
+ outline: 0;
+ line-height: 21px;
+ height: 21px;
+ padding-left: 3px;
+ border-right: solid 1px #c3c3c3;
}
+
.openo .openo-ellipsis, .openo.openo-ellipsis {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
+
a.openoButton_buttonClass, a.openoButton_buttonDisableClass, div.openoButton_buttonClass, div.openoButton_buttonDisableClass {
- height: 26px;
- float: left;
- cursor: pointer;
- text-decoration: none;
- outline: 0;
- border: 1px solid #d3d3d3;
- text-align: center;
- box-shadow: 0 1px 1px rgba(0,0,0,.05);
- background: #fafafa;
- background: -moz-linear-gradient(top,#fff,#fafafa);
- background: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#fafafa));
- background: -webkit-linear-gradient(top,#fff,#fafafa);
- background: linear-gradient(to bottom,#fff,#fafafa);
- border-radius: 6px;
+ height: 26px;
+ float: left;
+ cursor: pointer;
+ text-decoration: none;
+ outline: 0;
+ border: 1px solid #d3d3d3;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ background: #fafafa;
+ background: -moz-linear-gradient(top, #fff, #fafafa);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(100%, #fafafa));
+ background: -webkit-linear-gradient(top, #fff, #fafafa);
+ background: linear-gradient(to bottom, #fff, #fafafa);
+ border-radius: 6px;
}
-.openoButton_buttonInnerClass{
- padding: 0 19px;
- border-radius: 6px;
+
+.openoButton_buttonInnerClass {
+ padding: 0 19px;
+ border-radius: 6px;
}
+
.openoButton_buttonCenterText {
- color: #000;
- line-height: 24px;
- white-space: nowrap;
- width: auto!important;
+ color: #000;
+ line-height: 24px;
+ white-space: nowrap;
+ width: auto !important;
}
+
.userHeader {
- clear: left;
- overflow: hidden;
- margin-bottom: 10px;
- padding: 10px 10px 0px 0px;
+ clear: left;
+ overflow: hidden;
+ margin-bottom: 10px;
+ padding: 10px 10px 0px 0px;
}
+
.openoButton_buttonGroupClass {
- display: inline;
+ display: inline;
}
+
.openoButton_buttonGroupClass div.openoButton_buttonClass_parent:first-child {
- margin-left: 0;
+ margin-left: 0;
}
+
.openoButton_buttonLeftImg {
- margin-right: 5px;
+ margin-right: 5px;
}
+
.openoButton_buttonLeftImg, .openoButton_buttonRightImg {
- display: inline-block;
- vertical-align: top;
- width: 16px;
- height: 16px;
- margin-top: 4px;
+ display: inline-block;
+ vertical-align: top;
+ width: 16px;
+ height: 16px;
+ margin-top: 4px;
}
+
.openo-table-pagination-wrapper {
- height: 37px;
+ height: 37px;
}
+
.openo-pagination {
- display: block;
- float: left;
- overflow: hidden;
- padding: 5px 0 0;
- margin-top: 8px;
+ display: block;
+ float: left;
+ overflow: hidden;
+ padding: 5px 0 0;
+ margin-top: 8px;
}
+
.openoPagination_openoPaginationLengthOptions:not(msie8) {
- line-height: 24px;
+ line-height: 24px;
}
+
.openoPagination_openoPaginationLengthOptions {
- white-space: normal;
- height: 24px;
- float: left;
- outline: 0;
- line-height: 20px;
- margin: 0 5px;
+ white-space: normal;
+ height: 24px;
+ float: left;
+ outline: 0;
+ line-height: 20px;
+ margin: 0 5px;
}
+
.openo-pagination-select {
- height: 26px;
- line-height: 22px;
- text-align: center;
- margin-right: -2px;
- border: 1px solid #e0e0e0;
- border-radius: 5px 0 0 5px;
- padding: 1px;
+ height: 26px;
+ line-height: 22px;
+ text-align: center;
+ margin-right: -2px;
+ border: 1px solid #e0e0e0;
+ border-radius: 5px 0 0 5px;
+ padding: 1px;
}
+
.openoPagination_openoPaginationLengthOptions span {
- background-color: #fff!important;
+ background-color: #fff !important;
}
+
.openo-pagination-theme a, .openo-pagination-theme span {
- float: left;
- color: #666;
- font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif;
- line-height: 24px;
- font-weight: 400;
- text-align: center;
- border: 1px solid #e0e0e0;
- text-decoration: none!important;
- padding: 0 7px;
- border-radius: 3px;
- background: #fff;
+ float: left;
+ color: #666;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+ line-height: 24px;
+ font-weight: 400;
+ text-align: center;
+ border: 1px solid #e0e0e0;
+ text-decoration: none !important;
+ padding: 0 7px;
+ border-radius: 3px;
+ background: #fff;
}
+
.openo-pagination-selectspan {
- background: url(../images/ideo_default_select.png) left no-repeat!important;
- float: right!important;
- width: 26px;
- height: 26px;
- cursor: pointer;
+ background: url(../images/ideo_default_select.png) left no-repeat !important;
+ float: right !important;
+ width: 26px;
+ height: 26px;
+ cursor: pointer;
}
+
.openo-pagination-theme label {
- padding-top: 6px;
- vertical-align: middle;
- margin-right: 20px;
- margin-top: -1px;
- float: left;
- display: inline-block;
- height: 20px;
- font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif;
+ padding-top: 6px;
+ vertical-align: middle;
+ margin-right: 20px;
+ margin-top: -1px;
+ float: left;
+ display: inline-block;
+ height: 20px;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
}
+
.openo-pagination li, .openo-pagination ul {
- list-style: none;
- padding: 0;
- margin: 0;
- float: left;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
}
+
dd, dl, dt, li {
- color: #000;
+ color: #000;
}
+
.openo-pagination-theme a, .openo-pagination-theme span.current {
- margin: 0 5px 0 0;
+ margin: 0 5px 0 0;
}
+
.openo .openo-disabled, .openo.openo-disabled {
- border-color: #c3c3c3!important;
- color: #666!important;
- opacity: .3;
- filter: alpha(opacity=30);
+ border-color: #c3c3c3 !important;
+ color: #666 !important;
+ opacity: .3;
+ filter: alpha(opacity=30);
}
+
.openo-pagination-theme .prev {
- background: 0 0;
- float: left;
+ background: 0 0;
+ float: left;
}
+
.openo-pagination-theme .current {
- text-decoration: none!important;
- float: left;
- padding-left: 6px;
- height: 24px;
- color: #fff;
- display: inline;
- border-color: #00adf5;
- background: #4ad2ff;
+ text-decoration: none !important;
+ float: left;
+ padding-left: 6px;
+ height: 24px;
+ color: #fff;
+ display: inline;
+ border-color: #00adf5;
+ background: #4ad2ff;
}
+
.openo-pagination-theme a, .openo-pagination-theme span {
- float: left;
- color: #666;
- font: 12px Lucida Grande,Verdana,Arial,Helvetica,sans-serif;
- line-height: 24px;
- font-weight: 400;
- text-align: center;
- border: 1px solid #e0e0e0;
- text-decoration: none!important;
- padding: 0 7px;
- border-radius: 3px;
- background: #fff;
+ float: left;
+ color: #666;
+ font: 12px Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+ line-height: 24px;
+ font-weight: 400;
+ text-align: center;
+ border: 1px solid #e0e0e0;
+ text-decoration: none !important;
+ padding: 0 7px;
+ border-radius: 3px;
+ background: #fff;
}
+
.openo-pagination-theme .prev.openo-disabled:before {
- background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
+ background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
}
+
.openo-pagination-theme .prev.openo-disabled:before {
- background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
+ background: url(../images/page_left_disabled.png) 50% 45% no-repeat;
}
+
.openo-pagination-theme .prev:before {
- background: url(../images/page_l.png) 50% 45% no-repeat;
+ background: url(../images/page_l.png) 50% 45% no-repeat;
}
+
.openo-pagination-theme .next:after, .openo-pagination-theme .prev:before {
- display: inline-block;
- content: "";
- vertical-align: middle;
- width: 10px;
- height: 24px;
+ display: inline-block;
+ content: "";
+ vertical-align: middle;
+ width: 10px;
+ height: 24px;
}
+
.openo-pagination-theme .prev:before {
- background: url(../images/page_l.png) 50% 45% no-repeat;
+ background: url(../images/page_l.png) 50% 45% no-repeat;
}
+
.openo-pagination-theme .next:after, .openo-pagination-theme .prev:before {
- display: inline-block;
- content: "";
- vertical-align: middle;
- width: 10px;
- height: 24px;
+ display: inline-block;
+ content: "";
+ vertical-align: middle;
+ width: 10px;
+ height: 24px;
}
+
pagination ul {
- list-style: none;
- padding: 0;
- margin: 0;
- float: left;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
}
+
.openo-pagination li, .openo-pagination ul {
- list-style: none;
- padding: 0;
- margin: 0;
- float: left;
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ float: left;
}
+
.openoPagination_gototext {
- background: #FFF;
- outline: 0;
- width: 29px;
- float: left;
- height: 26px;
- line-height: 24px;
- border-radius: 4px;
- border: 1px solid #c3c3c3;
- padding: 0 0 0 5px;
- margin: 0;
- color: #666;
- min-width: 50px;
+ background: #FFF;
+ outline: 0;
+ width: 29px;
+ float: left;
+ height: 26px;
+ line-height: 24px;
+ border-radius: 4px;
+ border: 1px solid #c3c3c3;
+ padding: 0 0 0 5px;
+ margin: 0;
+ color: #666;
+ min-width: 50px;
}
+
.openoPagination_gotoimage {
- width: 29px;
- height: 26px;
- line-height: 26px;
- background-color: #FFF;
- background-image: url(/portal/themes/default/components/openo/images/openo.png);
- padding-left: 21px;
- float: left;
- margin-left: 5px;
- border: 1px solid #e0e0e0;
- border-radius: 4px;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- background-position: -184px -181px!important;
+ width: 29px;
+ height: 26px;
+ line-height: 26px;
+ background-color: #FFF;
+ background-image: url(/portal/themes/default/components/openo/images/openo.png);
+ padding-left: 21px;
+ float: left;
+ margin-left: 5px;
+ border: 1px solid #e0e0e0;
+ border-radius: 4px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ background-position: -184px -181px !important;
}
+
.openo-pagination-theme .ellipse {
- float: left;
- margin-left: -8px;
- margin-right: -4px;
- background: 0 0;
- border: none;
- border-radius: 0;
- box-shadow: none;
- font-weight: 700;
- cursor: default;
+ float: left;
+ margin-left: -8px;
+ margin-right: -4px;
+ background: 0 0;
+ border: none;
+ border-radius: 0;
+ box-shadow: none;
+ font-weight: 700;
+ cursor: default;
}
+
.openo.openo-disabled {
- border-color: #c3c3c3!important;
- color: #666!important;
- opacity: .3;
- filter: alpha(opacity=30);
+ border-color: #c3c3c3 !important;
+ color: #666 !important;
+ opacity: .3;
+ filter: alpha(opacity=30);
}
+
.openo-pagination-theme .prev {
- background: 0 0;
- float: left;
+ background: 0 0;
+ float: left;
}
+
.openo-pagination-theme .current {
- text-decoration: none!important;
- float: left;
- padding-left: 6px;
- height: 26px;
- color: #fff;
- display: inline;
- /*border-color: #00adf5;
- background: #4ad2ff;*/
+ text-decoration: none !important;
+ float: left;
+ padding-left: 6px;
+ height: 26px;
+ color: #fff;
+ display: inline;
+ /*border-color: #00adf5;
+ background: #4ad2ff;*/
border: 1px solid #e0e0e0;
}
+
.openo-pagination-theme .next:after {
- background: url(../images/page_r.png) 50% 45% no-repeat;
+ background: url(../images/page_r.png) 50% 45% no-repeat;
}
+
.openoButton_buttonGroupClass div.openoButton_buttonClass_parent, .openoButton_buttonRightImg {
- margin-left: 5px;
+ margin-left: 5px;
}
html, body {
- height: 99%;
- width: 98%;
+ height: 99%;
+ width: 98%;
}
+
.cotentBody {
- padding: 0px 20px 0px 20px;
+ padding: 0px 20px 0px 20px;
}
div.openoButton_buttonClass:hover {
- border: 1px solid #4ac9ff;
+ border: 1px solid #4ac9ff;
}
+
div.openoButton_button_default:hover .openoButton_buttonCenterText {
- color: #009ae7;
+ color: #009ae7;
}
+
.header_lineimg {
- height: 1px;
- width: 100%;
- margin-top: 17px;
+ height: 1px;
+ width: 100%;
+ margin-top: 17px;
}
+
.openo.openo-hide {
- display: none;
+ display: none;
}
+
div.openo-select-popup-container {
- position: absolute;
- border: 1px solid #4ac9ff;
- border-top: none;
- border-radius: 0 0 4px 4px;
- max-height: 202px;
- overflow-y: auto;
- background-color: #fff;
- z-index: 880;
+ position: absolute;
+ border: 1px solid #4ac9ff;
+ border-top: none;
+ border-radius: 0 0 4px 4px;
+ max-height: 202px;
+ overflow-y: auto;
+ background-color: #fff;
+ z-index: 880;
}
-div.openo-select-popup-container>div.openo-select-item {
- display: block;
+
+div.openo-select-popup-container > div.openo-select-item {
+ display: block;
}
+
.openo .openo-ellipsis, .openo.openo-ellipsis {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
-div.openo-select-popup-container>div.openo-select-item>label {
- padding-top: 3px;
- padding-bottom: 3px;
- line-height: 20px;
+
+div.openo-select-popup-container > div.openo-select-item > label {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ line-height: 20px;
}
+
.openo .openo-ellipsis, .openo.openo-ellipsis {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
+
.openo-select-item label {
- margin-left: 4px;
- margin-right: 4px;
- white-space: nowrap;
+ margin-left: 4px;
+ margin-right: 4px;
+ white-space: nowrap;
}
-div.openo-select-popup-container>div.openo-select-item.openo-item-selected, div.openo-select-popup-container>div.openo-select-item:hover {
- background-color: #f1f1f1;
- color: #008fd6;
+
+div.openo-select-popup-container > div.openo-select-item.openo-item-selected, div.openo-select-popup-container > div.openo-select-item:hover {
+ background-color: #f1f1f1;
+ color: #008fd6;
}
+
div.openo-select.openo-focus {
- border: 1px solid #4ac9ff;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
- border-bottom-color: #ddd;
+ border: 1px solid #4ac9ff;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-color: #ddd;
}
+
.openo-pagination-theme a:hover {
- border-color: #4ac9ff;
- cursor: pointer;
+ border-color: #4ac9ff;
+ cursor: pointer;
}
-.SDBtn{
- background: #fff;
- color: #333;
- border: 1px solid #ddd;
+
+.SDBtn {
+ background: #fff;
+ color: #333;
+ border: 1px solid #ddd;
}
-.SDBtn:hover{
- color: #009ae7;
- border: 1px solid #4AC9FF
+
+.SDBtn:hover {
+ color: #009ae7;
+ border: 1px solid #4AC9FF
}
+
table tbody tr.even:hover td, table tbody tr.odd:hover td {
- background-color: #e6fbe0;
+ background-color: #e6fbe0;
}
+
table tr.openoTable_row_selected td {
- background: #e8f8fe!important;
- border-bottom: 1px solid #e8e8e8!important;
+ background: #e8f8fe !important;
+ border-bottom: 1px solid #e8e8e8 !important;
}
-.modal-body{
- padding: 0!important;
+
+.modal-body {
+ padding: 0 !important;
}
-.form-control{
- height: 26px!important;
+
+.form-control {
+ height: 26px !important;
}
+
.form-group .control-label {
- margin-left: 20px;
+ margin-left: 20px;
}
.form-horizontal .control-label {
- text-align: left;
+ text-align: left;
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
index 35da729..fa2f88f 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
@@ -14,158 +14,158 @@
*/
$('.siteDeleteImg').click(
- function() {
- var data = $(this).parent().parent().parent().find('td:last').find(
- 'div:last').html();
- alert(data);
- var jsonObj = JSON.parse(data);
- for (var i = 0; i < jsonObj.length; i++) {
- var obj = jsonObj[i];
- var rowData = [ obj.tpName, obj.peName, obj.vlanId,
- obj.siteCidr, obj.ip ];
- $('#underlayTpDataTable').DataTable();
- $('#underlayTpDataTable').dataTable().fnAddData(rowData);
- }
- });
+ function () {
+ var data = $(this).parent().parent().parent().find('td:last').find(
+ 'div:last').html();
+ alert(data);
+ var jsonObj = JSON.parse(data);
+ for (var i = 0; i < jsonObj.length; i++) {
+ var obj = jsonObj[i];
+ var rowData = [obj.tpName, obj.peName, obj.vlanId,
+ obj.siteCidr, obj.ip];
+ $('#underlayTpDataTable').DataTable();
+ $('#underlayTpDataTable').dataTable().fnAddData(rowData);
+ }
+ });
function deleteController(objectId) {
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers/" + objectId;
- $.ajax({
- type : "DELETE",
- url : requestUrl,
- contentType : "application/json",
- success : function(jsonobj) {
- $('#controller').bootstrapTable('remove', {
- field : 'id',
- values : [ objectId ]
- });
- alert("Delete Controller successfull !!!");
- },
- error : function(xhr, ajaxOptions, thrownError) {
- alert("Error on deleting controller : " + xhr.responseText);
- }
- });
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers/" + objectId;
+ $.ajax({
+ type: "DELETE",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ $('#controller').bootstrapTable('remove', {
+ field: 'id',
+ values: [objectId]
+ });
+ alert("Delete Controller successfull !!!");
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ alert("Error on deleting controller : " + xhr.responseText);
+ }
+ });
}
function loadControllerData() {
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
- $.ajax({
- type : "GET",
- url : requestUrl,
- contentType : "application/json",
- success : function(jsonobj) {
- $('#controller').bootstrapTable({
- data : jsonobj.topologicalControllers
- });
- },
- error : function(xhr, ajaxOptions, thrownError) {
- alert("Error on getting controller data : " + xhr.responseText);
- }
- });
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
+ $.ajax({
+ type: "GET",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ $('#controller').bootstrapTable({
+ data: jsonobj.topologicalControllers
+ });
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ alert("Error on getting controller data : " + xhr.responseText);
+ }
+ });
}
-$(function() {
- $('.creat-btn').click(function() {
- $('#vmAppDialog').addClass('in').css({
- 'display' : 'block'
- });
+$(function () {
+ $('.creat-btn').click(function () {
+ $('#vmAppDialog').addClass('in').css({
+ 'display': 'block'
+ });
- });
- $('.close,.button-previous').click(function() {
- $('#vmAppDialog').removeClass('in').css('display', 'none');
- });
- $('.detail-top ul li').click(function() {
- $(this).addClass('current').siblings().removeClass('current');
- });
- $('.para').click(function() {
- if ($('#serviceTemplateName').val() == '') {
- alert('Please choose the service templet!');
- $('#flavorTab').css('display', 'none');
- } else {
- $('#flavorTab').css('display', 'block');
- }
- $('#basicTab').css('display', 'block');
- });
- $('.basic').click(function() {
- $('#flavorTab').css('display', 'none');
- });
+ });
+ $('.close,.button-previous').click(function () {
+ $('#vmAppDialog').removeClass('in').css('display', 'none');
+ });
+ $('.detail-top ul li').click(function () {
+ $(this).addClass('current').siblings().removeClass('current');
+ });
+ $('.para').click(function () {
+ if ($('#serviceTemplateName').val() == '') {
+ alert('Please choose the service templet!');
+ $('#flavorTab').css('display', 'none');
+ } else {
+ $('#flavorTab').css('display', 'block');
+ }
+ $('#basicTab').css('display', 'block');
+ });
+ $('.basic').click(function () {
+ $('#flavorTab').css('display', 'none');
+ });
- $('.table tbody tr').click(
- function() {
- $(this).addClass('openoTable_row_selected').siblings()
- .removeClass('openoTable_row_selected');
- });
- $('.table tr:odd').addClass('active');
- $('#false').click(function() {
- $('#vmAppDialog').addClass('in').css({
- 'display' : 'block'
- });
- });
- $('.close,.button-previous').click(function() {
- $('#vmAppDialog').removeClass('in').css('display', 'none');
- });
- $('#filterTpLogicalType').click(
- function() {
- $('#filterTpLogicalType_select_popupcontainer').toggleClass(
- 'openo-hide');
- $('#filterTpLogicalType').toggleClass('openo-focus');
- var oLeft = $('#open_base_tpL_td6').offset().left;
- var oTop = $('#open_base_tpL_td6').offset().top;
- var oHeight = $('#open_base_tpL_td6').height();
- $('#filterTpLogicalType_select_popupcontainer').css({
- 'left' : oLeft,
- 'top' : oTop + oHeight + 10
- });
- });
- $('div.openo-select-popup-container>div.openo-select-item>label').click(
- function() {
- var Lvalue = $(this).html();
- $('#filterTpLogicalType_select_input').attr('value', Lvalue);
- $('#filterTpLogicalType_select_popupcontainer').addClass(
- 'openo-hide');
- $('#filterTpLogicalType').removeClass('openo-focus');
- });
- $.fn.serializeObject = function() {
- var o = {};
- var a = this.serializeArray();
- $.each(a, function() {
- if (o[this.name] !== undefined) {
- if (!o[this.name].push) {
- o[this.name] = [ o[this.name] ];
- }
- o[this.name].push(this.value || '');
- } else {
- o[this.name] = this.value || '';
- }
- });
- return o;
- };
+ $('.table tbody tr').click(
+ function () {
+ $(this).addClass('openoTable_row_selected').siblings()
+ .removeClass('openoTable_row_selected');
+ });
+ $('.table tr:odd').addClass('active');
+ $('#false').click(function () {
+ $('#vmAppDialog').addClass('in').css({
+ 'display': 'block'
+ });
+ });
+ $('.close,.button-previous').click(function () {
+ $('#vmAppDialog').removeClass('in').css('display', 'none');
+ });
+ $('#filterTpLogicalType').click(
+ function () {
+ $('#filterTpLogicalType_select_popupcontainer').toggleClass(
+ 'openo-hide');
+ $('#filterTpLogicalType').toggleClass('openo-focus');
+ var oLeft = $('#open_base_tpL_td6').offset().left;
+ var oTop = $('#open_base_tpL_td6').offset().top;
+ var oHeight = $('#open_base_tpL_td6').height();
+ $('#filterTpLogicalType_select_popupcontainer').css({
+ 'left': oLeft,
+ 'top': oTop + oHeight + 10
+ });
+ });
+ $('div.openo-select-popup-container>div.openo-select-item>label').click(
+ function () {
+ var Lvalue = $(this).html();
+ $('#filterTpLogicalType_select_input').attr('value', Lvalue);
+ $('#filterTpLogicalType_select_popupcontainer').addClass(
+ 'openo-hide');
+ $('#filterTpLogicalType').removeClass('openo-focus');
+ });
+ $.fn.serializeObject = function () {
+ var o = {};
+ var a = this.serializeArray();
+ $.each(a, function () {
+ if (o[this.name] !== undefined) {
+ if (!o[this.name].push) {
+ o[this.name] = [o[this.name]];
+ }
+ o[this.name].push(this.value || '');
+ } else {
+ o[this.name] = this.value || '';
+ }
+ });
+ return o;
+ };
- $('#createController').click(function() {
- var formData = JSON.stringify($("#controllerForm").serializeObject());
- var jsonobj = JSON.parse(formData);
- var newJson = {
- "topologicalController" : jsonobj
- };
- formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
- $.ajax({
- type : "POST",
- url : requestUrl,
- contentType : "application/json",
- dataType : "json",
- data : formData,
- success : function(jsonResp) {
- alert("Controller saved successfully!!!");
- jsonobj["id"] = jsonResp.topologicalController.id;
- $('#controller').bootstrapTable("append", jsonobj);
- $('#vmAppDialog').removeClass('in').css('display', 'none');
+ $('#createController').click(function () {
+ var formData = JSON.stringify($("#controllerForm").serializeObject());
+ var jsonobj = JSON.parse(formData);
+ var newJson = {
+ "topologicalController": jsonobj
+ };
+ formData = JSON.stringify(newJson);
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
+ $.ajax({
+ type: "POST",
+ url: requestUrl,
+ contentType: "application/json",
+ dataType: "json",
+ data: formData,
+ success: function (jsonResp) {
+ alert("Controller saved successfully!!!");
+ jsonobj["id"] = jsonResp.topologicalController.id;
+ $('#controller').bootstrapTable("append", jsonobj);
+ $('#vmAppDialog').removeClass('in').css('display', 'none');
- },
- error : function(xhr, ajaxOptions, thrownError) {
- alert("Error on page : " + xhr.responseText);
- }
- });
- });
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ alert("Error on page : " + xhr.responseText);
+ }
+ });
+ });
})
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/bootstrap.css b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/bootstrap.css
index 6e70054..dbebe62 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/bootstrap.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/bootstrap.css
Binary files differ
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/skill.css b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/skill.css
index f188265..d24a268 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/skill.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/skill.css
@@ -14,76 +14,84 @@
* limitations under the License.
*/
body {
- font-family: 'Open Sans', sans-serif;
- /*background-color: #f1f3fa;*/
- width: '100%';
- height: '100%';
- margin-top: 10px;
+ font-family: 'Open Sans', sans-serif;
+ /*background-color: #f1f3fa;*/
+ width: '100%';
+ height: '100%';
+ margin-top: 10px;
}
-div.skills-sunburst{
- font-size: 12px;
- font-weight: 400;
- text-align:center;
+
+div.skills-sunburst {
+ font-size: 12px;
+ font-weight: 400;
+ text-align: center;
}
#skillmap .skills-wrapper {
- margin-top: 10px;
- overflow: auto;
+ margin-top: 10px;
+ overflow: auto;
}
+
#skillmap .skills-sunburst {
- float: left;
- width: 500px;
- margin-left: -80px;
+ float: left;
+ width: 500px;
+ margin-left: -80px;
}
+
#skillmap .skills-sunburst svg {
- font: 11px 'Source Sans Pro', sans-serif;
- font-weight: 900;
-
- cursor: pointer;
+ font: 11px 'Source Sans Pro', sans-serif;
+ font-weight: 900;
+
+ cursor: pointer;
}
+
#skillmap .skills-chart {
- float: right;
- font-family: 'Source Sans Pro', sans-serif;
- font-size: 15px;
- margin: 80px 20px 0 0;
+ float: right;
+ font-family: 'Source Sans Pro', sans-serif;
+ font-size: 15px;
+ margin: 80px 20px 0 0;
}
+
#skillmap .skills-chart .breadcumb-text {
- font-size: 13px;
- font-weight: 700;
+ font-size: 13px;
+ font-weight: 700;
}
+
#skillmap .skills-chart #skills-chart-line {
- fill: none;
- stroke-width: 3.5px;
+ fill: none;
+ stroke-width: 3.5px;
}
+
#skillmap .skills-chart .axis path,
#skillmap .skills-chart .axis line {
- fill: none;
+ fill: none;
}
+
#skillmap .skills-chart .x-axis path,
#skillmap .skills-chart .y-axis path {
- stroke: #444;
- stroke-width: 1px;
- shape-rendering: geometricPrecision;
+ stroke: #444;
+ stroke-width: 1px;
+ shape-rendering: geometricPrecision;
}
#explanation {
- position: absolute;
- top: 165px;
- left: 170px;
- width: 140px;
- text-align: center;
- color: #666;
- margin-top:30px;
+ position: absolute;
+ top: 165px;
+ left: 170px;
+ width: 140px;
+ text-align: center;
+ color: #666;
+ margin-top: 30px;
}
#percentage {
- font-size: 2em;
+ font-size: 2em;
}
-#endlabel{
- font-sizte:1.5em;
+#endlabel {
+ font-sizte: 1.5em;
}
-div.skills-sunburst text{
- text-anchor: middle;
+div.skills-sunburst text {
+ text-anchor: middle;
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vim.css b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vim.css
index ab7b875..680919b 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vim.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vim.css
@@ -14,469 +14,463 @@
* limitations under the License.
*/
body {
- font-family: microsoft yahei !important;
+ font-family: microsoft yahei !important;
}
/* blue pill (inspired by iTunes)
*******************************************************************************/
.grey {
- background-color: #e5e5e5;
- color: #333;
+ background-color: #e5e5e5;
+ color: #333;
}
.blue {
- background-color: #5b9bd1;
- border-radius: 20px;
- color: #fff;
- font-weight: bold;
- padding: 8px 0;
- text-align: center;
- width: 100px;
+ background-color: #5b9bd1;
+ border-radius: 20px;
+ color: #fff;
+ font-weight: bold;
+ padding: 8px 0;
+ text-align: center;
+ width: 100px;
}
.blue:hover {
- background-color: #e8f3fd;
- color: #5b9bd1;
+ background-color: #e8f3fd;
+ color: #5b9bd1;
}
.blue.selected {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
+ border: 0;
+ background-color: #5b9bd1;
+ color: #fff;
}
.blue.selected:hover {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
+ border: 0;
+ background-color: #5b9bd1;
+ color: #fff;
}
a {
- font-weight: bold;
- text-decoration: none;
+ font-weight: bold;
+ text-decoration: none;
}
p {
- color: #444;
- font-size: 14px;
- font-weight: normal;
- line-height: 21px;
- margin: 0 0 12px 0;
+ color: #444;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 21px;
+ margin: 0 0 12px 0;
}
p.credit {
- border-top: 1px solid #ccc;
- font-size: 14px;
- line-height: 140%;
- margin: 36px 0 12px 0;
- padding: 8px 0 0 0;
- text-align: center;
+ border-top: 1px solid #ccc;
+ font-size: 14px;
+ line-height: 140%;
+ margin: 36px 0 12px 0;
+ padding: 8px 0 0 0;
+ text-align: center;
}
ul.column {
- float: left;
- list-style: none;
- width: 675px;
+ float: left;
+ list-style: none;
+ width: 675px;
}
ul.column li {
- background: #eee;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;
- box-shadow: inset 0 1px 1px 0 #c7c7c7;
- float: left;
- margin: 10px 0 0 10px;
- display: block;
- height: 150px;
- text-align: center;
- width: 215px;
+ background: #eee;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;
+ box-shadow: inset 0 1px 1px 0 #c7c7c7;
+ float: left;
+ margin: 10px 0 0 10px;
+ display: block;
+ height: 150px;
+ text-align: center;
+ width: 215px;
}
/* Clear Floated Elements
------------------------------------------------------------------------------*/
-.column:after,.button-collection:after,.clearfix:after,div.project-info:after
- {
- clear: both;
- content: ' ';
- display: block;
- font-size: 0;
- line-height: 0;
- visibility: hidden;
- width: 0;
- height: 0;
+.column:after, .button-collection:after, .clearfix:after, div.project-info:after {
+ clear: both;
+ content: ' ';
+ display: block;
+ font-size: 0;
+ line-height: 0;
+ visibility: hidden;
+ width: 0;
+ height: 0;
}
.container-fluid {
- background-color: white !important;
- min-height: 500px;
+ background-color: white !important;
+ min-height: 500px;
}
.nav-tabs {
- border: 0;
+ border: 0;
}
-.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus
- {
- border: 0;
- border-top: 3px solid #F3565D;
+.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
+ border: 0;
+ border-top: 3px solid #F3565D;
}
-.nav-tabs>li>a {
- border-radius: 0;
+.nav-tabs > li > a {
+ border-radius: 0;
}
-.nav-tabs>li>a:hover {
- background-color: #f1f3fa;
- border: 1Px solid #f1f3fa;
+.nav-tabs > li > a:hover {
+ background-color: #f1f3fa;
+ border: 1Px solid #f1f3fa;
}
.c3 {
- margin-top: 120px;
+ margin-top: 120px;
}
.skills-chart-breadcrumb {
-
+
}
.blue:selected {
- border: 0;
- background-color: #5b9bd1;
+ border: 0;
+ background-color: #5b9bd1;
}
.btn {
- /* border-width: 0; */
- /* padding: 7px 14px; */
- /* font-size: 14px; */
- /* outline: none !important; */
- /* background-image: none !important; */
- /* filter: none; */
- /* -webkit-box-shadow: none; */
- -moz-box-shadow: none;
- /* box-shadow: none; */
- /* text-shadow: none; */
+ /* border-width: 0; */
+ /* padding: 7px 14px; */
+ /* font-size: 14px; */
+ /* outline: none !important; */
+ /* background-image: none !important; */
+ /* filter: none; */
+ /* -webkit-box-shadow: none; */
+ -moz-box-shadow: none;
+ /* box-shadow: none; */
+ /* text-shadow: none; */
}
select {
- border-width: 1px;
- padding: 4px 1px;
- border-radius: 4px;
+ border-width: 1px;
+ padding: 4px 1px;
+ border-radius: 4px;
}
.input-sm {
- padding: 4px 10px;
+ padding: 4px 10px;
}
.btn-block {
- display: block;
- width: 100%;
- padding-left: 0;
- padding-right: 0;
+ display: block;
+ width: 100%;
+ padding-left: 0;
+ padding-right: 0;
}
/* Bootstrap buttons */
-
-.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active
- {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
+.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active {
+ color: #333;
+ background-color: #ededed;
+ border-color: #b3b3b3;
}
.open .btn-default.dropdown-toggle {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
+ color: #333;
+ background-color: #ededed;
+ border-color: #b3b3b3;
}
-.btn-default:active,.btn-default.active {
- background-image: none;
- background-color: #e0e0e0;
- font-weight: bold;
+.btn-default:active, .btn-default.active {
+ background-image: none;
+ background-color: #e0e0e0;
+ font-weight: bold;
}
-.btn-default:active:hover,.btn-default.active:hover {
- background-color: #e6e6e6;
+.btn-default:active:hover, .btn-default.active:hover {
+ background-color: #e6e6e6;
}
.open .btn-default.dropdown-toggle {
- background-image: none;
+ background-image: none;
}
-.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
- {
- background-color: #fff;
- border-color: #ccc;
+.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 {
+ background-color: #fff;
+ border-color: #ccc;
}
.btn-default .badge {
- color: #fff;
- background-color: #333;
+ color: #fff;
+ background-color: #333;
}
-
-.btn-default>i[class^="icon-"],.btn-default>i[class*="icon-"] {
- color: #8c8c8c;
+.btn-default > i[class^="icon-"], .btn-default > i[class*="icon-"] {
+ color: #8c8c8c;
}
div[data-name="tab_zone"] div {
- background-color: #f1f3fa;
- padding: 0px;
+ background-color: #f1f3fa;
+ padding: 0px;
}
div[data-name="cond_zone"] div {
- background-color: #fff;
- margin-top: 15px;
- margin-bottom: 15px;
+ background-color: #fff;
+ margin-top: 15px;
+ margin-bottom: 15px;
}
-
-
-
-.input{
- width:250px;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+.input {
+ width: 250px;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
div.separator {
- margin: 20px;
+ margin: 20px;
}
div.separator div {
- text-align: center;
- line-height: 0;
+ text-align: center;
+ line-height: 0;
}
div.separator-line {
- height: 1px !important;
- width: 100%;
- background: #ddd;
- overflow: hidden;
+ height: 1px !important;
+ width: 100%;
+ background: #ddd;
+ overflow: hidden;
}
.dropdown-toggle {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.calendar-date {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.range_inputs {
- color: #5b9bd1;
+ color: #5b9bd1;
}
-.btn.dropdown-toggle,.btn-group .btn.dropdown-toggle,.btn:hover,.btn:disabled,.btn[disabled],.btn:focus,.btn:active,.btn.active
- {
- outline: none !important;
- background-image: none !important;
- filter: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- text-shadow: none;
+.btn.dropdown-toggle, .btn-group .btn.dropdown-toggle, .btn:hover, .btn:disabled, .btn[disabled], .btn:focus, .btn:active, .btn.active {
+ outline: none !important;
+ background-image: none !important;
+ filter: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ text-shadow: none;
}
#skills-chart-breadcrumb {
- margin-bottom: 10px
+ margin-bottom: 10px
}
/*增加daterangepicker的css*/
input[name="daterange"] {
- width: 220px;
- line-height: 0;
- height: 31px;
- vertical-align: top;
- margin-top: 2px;
+ width: 220px;
+ line-height: 0;
+ height: 31px;
+ vertical-align: top;
+ margin-top: 2px;
}
.daterangepicker .ranges {
- width: 205px;
+ width: 205px;
}
.daterangepicker .ranges input {
- width: 95px !important;
+ width: 95px !important;
}
td.details-control {
- background: url('../images/details_open.png') no-repeat center center;
- cursor: pointer;
+ background: url('../images/details_open.png') no-repeat center center;
+ cursor: pointer;
}
tr.shown td.details-control {
- background: url('../images/details_close.png') no-repeat center center;
+ background: url('../images/details_close.png') no-repeat center center;
}
.details table td {
- word-wrap: break-word;
- word-break: normal;
- border-top: 1px solid #dddddd;
+ word-wrap: break-word;
+ word-break: normal;
+ border-top: 1px solid #dddddd;
}
-.details table tr:first-child td {
- border-top: none;
+.details table tr:first-child td {
+ border-top: none;
}
.details table {
- table-layout: fixed;
- width: 100%;
+ table-layout: fixed;
+ width: 100%;
}
td.title {
- width: 10%;
+ width: 10%;
}
-table.dataTable tbody th,table.dataTable tbody td {
- padding: 8px 10px;
+table.dataTable tbody th, table.dataTable tbody td {
+ padding: 8px 10px;
}
-div.dataTables_length,div.dataTables_info {
- display: inline;
+div.dataTables_length, div.dataTables_info {
+ display: inline;
}
div.dataTables_paginate {
- display: inline;
- float: right;
+ display: inline;
+ float: right;
}
div.pagination-panel {
- margin-right: 10px;
+ margin-right: 10px;
}
input.pagination-panel-input {
- width: 50px;
+ width: 50px;
}
#ict_res_table_div {
- margin-top: 15px;
+ margin-top: 15px;
}
#ict_res_table_div label {
- font-weight: 100;
+ font-weight: 100;
}
-.daterangepicker .daterangepicker_start_input label,.daterangepicker .daterangepicker_end_input label
- {
- color: #5b9bd1;
+.daterangepicker .daterangepicker_start_input label, .daterangepicker .daterangepicker_end_input label {
+ color: #5b9bd1;
}
.daterangepicker .ranges .input-mini {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.cancelBtn {
- padding: 5px 10px 5px 10px;
+ padding: 5px 10px 5px 10px;
}
-.btn:focus,.btn:active:focus,.btn.active:focus {
- outline: 0;
+.btn:focus, .btn:active:focus, .btn.active:focus {
+ outline: 0;
}
-#ict_res_table_div table {
- width: 100% !important;
+#ict_res_table_div table {
+ width: 100% !important;
}
.control-label .required {
- color: #e02222;
- font-size: 12px;
- padding-left: 2px;
+ color: #e02222;
+ font-size: 12px;
+ padding-left: 2px;
}
-#ict_vim_table tbody tr{
- cursor:pointer;
+#ict_vim_table tbody tr {
+ cursor: pointer;
}
-
/*卡片面板样式*/
.animated-panel {
- -webkit-animation-duration: .5s;
- animation-duration: .5s;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
+ -webkit-animation-duration: .5s;
+ animation-duration: .5s;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
}
.hpanel {
- background-color: none;
- border: none;
- box-shadow: none;
- margin-bottom: 25px;
-
+ background-color: none;
+ border: none;
+ box-shadow: none;
+ margin-bottom: 25px;
+
}
.hpanel .panel-body {
- border: 1px solid #e4e5e7;
- border-radius: 2px;
- padding: 20px;
- position: relative;
+ border: 1px solid #e4e5e7;
+ border-radius: 2px;
+ padding: 20px;
+ position: relative;
}
+
.h-200 {
- min-height: 220px;
+ min-height: 220px;
}
+
.m-t-xl {
- margin-top: 40px;
+ margin-top: 40px;
}
+
.text-success {
- color: #0d638f;
+ color: #0d638f;
}
+
.hpanel > .panel-footer {
- color: inherit;
- border: 1px solid #e4e5e7;
- border-top: none;
- font-size: 90%;
- background: #f7f9fa;
- height:40px;
- padding: 5px 15px;
+ color: inherit;
+ border: 1px solid #e4e5e7;
+ border-top: none;
+ font-size: 90%;
+ background: #f7f9fa;
+ height: 40px;
+ padding: 5px 15px;
}
-.color_cloud{
- color:#ccc;
+
+.color_cloud {
+ color: #ccc;
}
-.stats-title{
+
+.stats-title {
}
-h3{
- margin-top: 10px;
- margin-bottom: 40px;
- font-weight: 200;
+h3 {
+ margin-top: 10px;
+ margin-bottom: 40px;
+ font-weight: 200;
}
-.blue-font{
- color:#428bca;
+.blue-font {
+ color: #428bca;
}
-.hpanel > .panel-footer .pull-right a{
- margin-left: 5px;
+.hpanel > .panel-footer .pull-right a {
+ margin-left: 5px;
}
-.hpanel > .panel-footer .pull-right .btn{
+.hpanel > .panel-footer .pull-right .btn {
min-width: 30px !important;
}
-.refresh-status-text{
- float: right;
+.refresh-status-text {
+ float: right;
}
.font {
- margin-bottom: 15px;
+ margin-bottom: 15px;
}
-.hpanel_show{
- cursor: pointer;
- background-color: #f7f9fa;
+.hpanel_show {
+ cursor: pointer;
+ background-color: #f7f9fa;
}
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vimChart.css b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vimChart.css
index 0af68c5..bb79d8e 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vimChart.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/css/vimChart.css
@@ -14,33 +14,32 @@
* limitations under the License.
*/
body {
- color: #333;
- font-family: "Microsoft yahei", Verdana, Arial, Helvetica, sans-serif !important;
- padding: 0px !important;
- margin: 0px !important;
- direction: ltr;
- background-color: #f1f3fa !important;
+ color: #333;
+ font-family: "Microsoft yahei", Verdana, Arial, Helvetica, sans-serif !important;
+ padding: 0px !important;
+ margin: 0px !important;
+ direction: ltr;
+ background-color: #f1f3fa !important;
}
-.row{
- margin-left: 0px;
- margin-right: 0px;
+.row {
+ margin-left: 0px;
+ margin-right: 0px;
}
select {
- border-width: 1px;
- padding: 4px 1px;
- border-radius: 4px;
+ border-width: 1px;
+ padding: 4px 1px;
+ border-radius: 4px;
}
.container-fluid {
- background-color: #fff;
+ background-color: #fff;
}
-
.titlefont {
- font-size: 16px;
- margin-left: 10px;
+ font-size: 16px;
+ margin-left: 10px;
}
.separator-line {
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js
index 5549e5b..e37a048 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js
@@ -13,25 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
+function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath) {
jQuery.i18n.properties({
- language:lang,
- name:propertiesFileNamePrefix,
- path:propertiesFilePath, // 资源文件路径
- mode:'map', // 用 Map 的方式使用资源文件中的值
- callback: function() {// 加载成功后设置显示内容
+ language: lang,
+ name: propertiesFileNamePrefix,
+ path: propertiesFilePath, // 资源文件路径
+ mode: 'map', // 用 Map 的方式使用资源文件中的值
+ callback: function () {// 加载成功后设置显示内容
var i18nItems = $('[name_i18n=com_zte_conductor_ui_i18n]');
- for(var i=0;i<i18nItems.length;i++){
+ for (var i = 0; i < i18nItems.length; i++) {
var $item = $(i18nItems.eq(i));
var itemId = $item.attr('id_i18n');
var itemTitle = $item.attr('title');
/** id存在时元素内容需要国际化,title存在时元素title需要国际化 */
- if(typeof($item.attr("title")) == "string"){
+ if (typeof($item.attr("title")) == "string") {
$item.attr("title", ($.i18n.prop(itemTitle)));
}
- if(undefined != itemId && typeof($item.attr("placeholder"))=="undefined"){
+ if (undefined != itemId && typeof($item.attr("placeholder")) == "undefined") {
$item.text($.i18n.prop(itemId));
- }else if(undefined != itemId && typeof($item.attr("placeholder"))!="undefined"){
+ } else if (undefined != itemId && typeof($item.attr("placeholder")) != "undefined") {
$item.attr("placeholder", $.i18n.prop(itemId));
}
}
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/client-cometd.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/client-cometd.js
index 5f9a5dc..d737366 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/client-cometd.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/client-cometd.js
@@ -16,48 +16,48 @@
/**
* Created by 10184303 on 15-11-17.
*/
-
-$(function(){
- var registerCometdMessage = function(url, callback) {
- var cometd = new $.Cometd();
+
+$(function () {
+ var registerCometdMessage = function (url, callback) {
+ var cometd = new $.Cometd();
var cometdURL = location.protocol + "//" + location.host + "/api/nsocnotification/v1";
cometd.configure({
- url : cometdURL,
- logLevel : "debug"
+ url: cometdURL,
+ logLevel: "debug"
});
- cometd.addListener("/meta/handshake", function(handshake){
- if(handshake.successful === true) {
- cometd.batch(function(){
- cometd.subscribe(url, function(message){
+ cometd.addListener("/meta/handshake", function (handshake) {
+ if (handshake.successful === true) {
+ cometd.batch(function () {
+ cometd.subscribe(url, function (message) {
callback.call(this, message.data);
});
});
}
});
cometd.handshake();
-}
- registerCometdMessage("/VIMstatus", function(data){
- var alarmArray= JSON.parse(data.greeting);
- console.log(data.greeting);
- for(var i=0;i<alarmArray.length;i++){
- vm.vimStatusTime = alarmArray[i].checkTime;
- for(var n=0;n<vm.vimInfo.length;n++){
- if(alarmArray[i].id==vm.vimInfo[n].oid && alarmArray[i].hostStorageInfo == ""){
- vm.vimInfo[n].status=alarmArray[i].status;
- vm.vimInfo[n].errorInfo=alarmArray[i].alarmContent;
- break;
- }
- if(alarmArray[i].id==vm.vimInfo[n].oid && alarmArray[i].hostStorageInfo.length != ""){
- vm.vimInfo[n].status= "inactive";
- vm.vimInfo[n].errorInfo = alarmArray[i].hostStorageInfo;
- break;
- }
+ }
+ registerCometdMessage("/VIMstatus", function (data) {
+ var alarmArray = JSON.parse(data.greeting);
+ console.log(data.greeting);
+ for (var i = 0; i < alarmArray.length; i++) {
+ vm.vimStatusTime = alarmArray[i].checkTime;
+ for (var n = 0; n < vm.vimInfo.length; n++) {
+ if (alarmArray[i].id == vm.vimInfo[n].oid && alarmArray[i].hostStorageInfo == "") {
+ vm.vimInfo[n].status = alarmArray[i].status;
+ vm.vimInfo[n].errorInfo = alarmArray[i].alarmContent;
+ break;
+ }
+ if (alarmArray[i].id == vm.vimInfo[n].oid && alarmArray[i].hostStorageInfo.length != "") {
+ vm.vimInfo[n].status = "inactive";
+ vm.vimInfo[n].errorInfo = alarmArray[i].hostStorageInfo;
+ break;
+ }
- }
- }
+ }
+ }
- setTimeout('resUtil.tooltipVimStatus()',5000);
- });
+ setTimeout('resUtil.tooltipVimStatus()', 5000);
+ });
});
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/jqBootstrapValidation.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/jqBootstrapValidation.js
index d57e07d..7efebf8 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/jqBootstrapValidation.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/jqBootstrapValidation.js
@@ -23,905 +23,903 @@
* http://ReactiveRaven.github.com/jqBootstrapValidation/
*/
-(function( $ ){
+(function ($) {
- var createdElements = [];
+ var createdElements = [];
- var defaults = {
- options: {
- prependExistingHelpBlock: false,
- sniffHtml: true, // sniff for 'required', 'maxlength', etc
- preventSubmit: true, // stop the form submit event from firing if validation fails
- submitError: false, // function called if there is an error when trying to submit
- submitSuccess: false, // function called just before a successful submit event is sent to the server
+ var defaults = {
+ options: {
+ prependExistingHelpBlock: false,
+ sniffHtml: true, // sniff for 'required', 'maxlength', etc
+ preventSubmit: true, // stop the form submit event from firing if validation fails
+ submitError: false, // function called if there is an error when trying to submit
+ submitSuccess: false, // function called just before a successful submit event is sent to the server
semanticallyStrict: false, // set to true to tidy up generated HTML output
- autoAdd: {
- helpBlocks: true
- },
+ autoAdd: {
+ helpBlocks: true
+ },
filter: function () {
// return $(this).is(":visible"); // only validate elements you can see
return true; // validate everything
}
- },
- methods: {
- init : function( options ) {
+ },
+ methods: {
+ init: function (options) {
- var settings = $.extend(true, {}, defaults);
+ var settings = $.extend(true, {}, defaults);
- settings.options = $.extend(true, settings.options, options);
+ settings.options = $.extend(true, settings.options, options);
- var $siblingElements = this;
+ var $siblingElements = this;
- var uniqueForms = $.unique(
- $siblingElements.map( function () {
- return $(this).parents("form")[0];
- }).toArray()
- );
-
- $(uniqueForms).bind("submit", function (e) {
- var $form = $(this);
- var warningsFound = 0;
- var $inputs = $form.find("input,textarea,select").not("[type=submit],[type=image]").filter(settings.options.filter);
- $inputs.trigger("submit.validation").trigger("validationLostFocus.validation");
-
- $inputs.each(function (i, el) {
- var $this = $(el),
- $controlGroup = $this.parents(".control-group").first();
- if (
- $controlGroup.hasClass("warning")
- ) {
- $controlGroup.removeClass("warning").addClass("error");
- warningsFound++;
- }
- });
-
- $inputs.trigger("validationLostFocus.validation");
-
- if (warningsFound) {
- if (settings.options.preventSubmit) {
- e.preventDefault();
- }
- $form.addClass("error");
- if ($.isFunction(settings.options.submitError)) {
- settings.options.submitError($form, e, $inputs.jqBootstrapValidation("collectErrors", true));
- }
- } else {
- $form.removeClass("error");
- if ($.isFunction(settings.options.submitSuccess)) {
- settings.options.submitSuccess($form, e);
- }
- }
- });
-
- return this.each(function(){
-
- // Get references to everything we're interested in
- var $this = $(this),
- $controlGroup = $this.parents(".control-group").first(),
- $helpBlock = $controlGroup.find(".help-block").first(),
- $form = $this.parents("form").first(),
- validatorNames = [];
-
- // create message container if not exists
- if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) {
- $helpBlock = $('<div class="help-block" />');
- $controlGroup.find('.controls').append($helpBlock);
- createdElements.push($helpBlock[0]);
- }
-
- // =============================================================
- // SNIFF HTML FOR VALIDATORS
- // =============================================================
-
- // *snort sniff snuffle*
-
- if (settings.options.sniffHtml) {
- var message = "";
- // ---------------------------------------------------------
- // PATTERN
- // ---------------------------------------------------------
- if ($this.attr("pattern") !== undefined) {
- message = "Not in the expected format<!-- data-validation-pattern-message to override -->";
- if ($this.data("validationPatternMessage")) {
- message = $this.data("validationPatternMessage");
- }
- $this.data("validationPatternMessage", message);
- $this.data("validationPatternRegex", $this.attr("pattern"));
- }
- // ---------------------------------------------------------
- // MAX
- // ---------------------------------------------------------
- if ($this.attr("max") !== undefined || $this.attr("aria-valuemax") !== undefined) {
- var max = ($this.attr("max") !== undefined ? $this.attr("max") : $this.attr("aria-valuemax"));
- message = "Too high: Maximum of '" + max + "'<!-- data-validation-max-message to override -->";
- if ($this.data("validationMaxMessage")) {
- message = $this.data("validationMaxMessage");
- }
- $this.data("validationMaxMessage", message);
- $this.data("validationMaxMax", max);
- }
- // ---------------------------------------------------------
- // MIN
- // ---------------------------------------------------------
- if ($this.attr("min") !== undefined || $this.attr("aria-valuemin") !== undefined) {
- var min = ($this.attr("min") !== undefined ? $this.attr("min") : $this.attr("aria-valuemin"));
- message = "Too low: Minimum of '" + min + "'<!-- data-validation-min-message to override -->";
- if ($this.data("validationMinMessage")) {
- message = $this.data("validationMinMessage");
- }
- $this.data("validationMinMessage", message);
- $this.data("validationMinMin", min);
- }
- // ---------------------------------------------------------
- // MAXLENGTH
- // ---------------------------------------------------------
- if ($this.attr("maxlength") !== undefined) {
- message = "Too long: Maximum of '" + $this.attr("maxlength") + "' characters<!-- data-validation-maxlength-message to override -->";
- if ($this.data("validationMaxlengthMessage")) {
- message = $this.data("validationMaxlengthMessage");
- }
- $this.data("validationMaxlengthMessage", message);
- $this.data("validationMaxlengthMaxlength", $this.attr("maxlength"));
- }
- // ---------------------------------------------------------
- // MINLENGTH
- // ---------------------------------------------------------
- if ($this.attr("minlength") !== undefined) {
- message = "Too short: Minimum of '" + $this.attr("minlength") + "' characters<!-- data-validation-minlength-message to override -->";
- if ($this.data("validationMinlengthMessage")) {
- message = $this.data("validationMinlengthMessage");
- }
- $this.data("validationMinlengthMessage", message);
- $this.data("validationMinlengthMinlength", $this.attr("minlength"));
- }
- // ---------------------------------------------------------
- // REQUIRED
- // ---------------------------------------------------------
- if ($this.attr("required") !== undefined || $this.attr("aria-required") !== undefined) {
- message = settings.builtInValidators.required.message;
- if ($this.data("validationRequiredMessage")) {
- message = $this.data("validationRequiredMessage");
- }
- $this.data("validationRequiredMessage", message);
- }
- // ---------------------------------------------------------
- // NUMBER
- // ---------------------------------------------------------
- if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "number") {
- message = settings.builtInValidators.number.message;
- if ($this.data("validationNumberMessage")) {
- message = $this.data("validationNumberMessage");
- }
- $this.data("validationNumberMessage", message);
- }
- // ---------------------------------------------------------
- // EMAIL
- // ---------------------------------------------------------
- if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "email") {
- message = "Not a valid email address<!-- data-validator-validemail-message to override -->";
- if ($this.data("validationValidemailMessage")) {
- message = $this.data("validationValidemailMessage");
- } else if ($this.data("validationEmailMessage")) {
- message = $this.data("validationEmailMessage");
- }
- $this.data("validationValidemailMessage", message);
- }
- // ---------------------------------------------------------
- // MINCHECKED
- // ---------------------------------------------------------
- if ($this.attr("minchecked") !== undefined) {
- message = "Not enough options checked; Minimum of '" + $this.attr("minchecked") + "' required<!-- data-validation-minchecked-message to override -->";
- if ($this.data("validationMincheckedMessage")) {
- message = $this.data("validationMincheckedMessage");
- }
- $this.data("validationMincheckedMessage", message);
- $this.data("validationMincheckedMinchecked", $this.attr("minchecked"));
- }
- // ---------------------------------------------------------
- // MAXCHECKED
- // ---------------------------------------------------------
- if ($this.attr("maxchecked") !== undefined) {
- message = "Too many options checked; Maximum of '" + $this.attr("maxchecked") + "' required<!-- data-validation-maxchecked-message to override -->";
- if ($this.data("validationMaxcheckedMessage")) {
- message = $this.data("validationMaxcheckedMessage");
- }
- $this.data("validationMaxcheckedMessage", message);
- $this.data("validationMaxcheckedMaxchecked", $this.attr("maxchecked"));
- }
- }
-
- // =============================================================
- // COLLECT VALIDATOR NAMES
- // =============================================================
-
- // Get named validators
- if ($this.data("validation") !== undefined) {
- validatorNames = $this.data("validation").split(",");
- }
-
- // Get extra ones defined on the element's data attributes
- $.each($this.data(), function (i, el) {
- var parts = i.replace(/([A-Z])/g, ",$1").split(",");
- if (parts[0] === "validation" && parts[1]) {
- validatorNames.push(parts[1]);
- }
- });
-
- // =============================================================
- // NORMALISE VALIDATOR NAMES
- // =============================================================
-
- var validatorNamesToInspect = validatorNames;
- var newValidatorNamesToInspect = [];
-
- do // repeatedly expand 'shortcut' validators into their real validators
- {
- // Uppercase only the first letter of each name
- $.each(validatorNames, function (i, el) {
- validatorNames[i] = formatValidatorName(el);
- });
-
- // Remove duplicate validator names
- validatorNames = $.unique(validatorNames);
-
- // Pull out the new validator names from each shortcut
- newValidatorNamesToInspect = [];
- $.each(validatorNamesToInspect, function(i, el) {
- if ($this.data("validation" + el + "Shortcut") !== undefined) {
- // Are these custom validators?
- // Pull them out!
- $.each($this.data("validation" + el + "Shortcut").split(","), function(i2, el2) {
- newValidatorNamesToInspect.push(el2);
- });
- } else if (settings.builtInValidators[el.toLowerCase()]) {
- // Is this a recognised built-in?
- // Pull it out!
- var validator = settings.builtInValidators[el.toLowerCase()];
- if (validator.type.toLowerCase() === "shortcut") {
- $.each(validator.shortcut.split(","), function (i, el) {
- el = formatValidatorName(el);
- newValidatorNamesToInspect.push(el);
- validatorNames.push(el);
- });
- }
- }
- });
-
- validatorNamesToInspect = newValidatorNamesToInspect;
-
- } while (validatorNamesToInspect.length > 0)
-
- // =============================================================
- // SET UP VALIDATOR ARRAYS
- // =============================================================
-
- var validators = {};
-
- $.each(validatorNames, function (i, el) {
- // Set up the 'override' message
- var message = $this.data("validation" + el + "Message");
- var hasOverrideMessage = (message !== undefined);
- var foundValidator = false;
- message =
- (
- message
- ? message
- : "'" + el + "' validation failed <!-- Add attribute 'data-validation-" + el.toLowerCase() + "-message' to input to change this message -->"
- )
- ;
-
- $.each(
- settings.validatorTypes,
- function (validatorType, validatorTemplate) {
- if (validators[validatorType] === undefined) {
- validators[validatorType] = [];
- }
- if (!foundValidator && $this.data("validation" + el + formatValidatorName(validatorTemplate.name)) !== undefined) {
- validators[validatorType].push(
- $.extend(
- true,
- {
- name: formatValidatorName(validatorTemplate.name),
- message: message
- },
- validatorTemplate.init($this, el)
- )
- );
- foundValidator = true;
- }
- }
- );
-
- if (!foundValidator && settings.builtInValidators[el.toLowerCase()]) {
-
- var validator = $.extend(true, {}, settings.builtInValidators[el.toLowerCase()]);
- if (hasOverrideMessage) {
- validator.message = message;
- }
- var validatorType = validator.type.toLowerCase();
-
- if (validatorType === "shortcut") {
- foundValidator = true;
- } else {
- $.each(
- settings.validatorTypes,
- function (validatorTemplateType, validatorTemplate) {
- if (validators[validatorTemplateType] === undefined) {
- validators[validatorTemplateType] = [];
- }
- if (!foundValidator && validatorType === validatorTemplateType.toLowerCase()) {
- $this.data("validation" + el + formatValidatorName(validatorTemplate.name), validator[validatorTemplate.name.toLowerCase()]);
- validators[validatorType].push(
- $.extend(
- validator,
- validatorTemplate.init($this, el)
- )
- );
- foundValidator = true;
- }
- }
+ var uniqueForms = $.unique(
+ $siblingElements.map(function () {
+ return $(this).parents("form")[0];
+ }).toArray()
);
- }
- }
- if (! foundValidator) {
- $.error("Cannot find validation info for '" + el + "'");
- }
- });
+ $(uniqueForms).bind("submit", function (e) {
+ var $form = $(this);
+ var warningsFound = 0;
+ var $inputs = $form.find("input,textarea,select").not("[type=submit],[type=image]").filter(settings.options.filter);
+ $inputs.trigger("submit.validation").trigger("validationLostFocus.validation");
- // =============================================================
- // STORE FALLBACK VALUES
- // =============================================================
+ $inputs.each(function (i, el) {
+ var $this = $(el),
+ $controlGroup = $this.parents(".control-group").first();
+ if (
+ $controlGroup.hasClass("warning")
+ ) {
+ $controlGroup.removeClass("warning").addClass("error");
+ warningsFound++;
+ }
+ });
- $helpBlock.data(
- "original-contents",
- (
- $helpBlock.data("original-contents")
- ? $helpBlock.data("original-contents")
- : $helpBlock.html()
- )
- );
+ $inputs.trigger("validationLostFocus.validation");
- $helpBlock.data(
- "original-role",
- (
- $helpBlock.data("original-role")
- ? $helpBlock.data("original-role")
- : $helpBlock.attr("role")
- )
- );
-
- $controlGroup.data(
- "original-classes",
- (
- $controlGroup.data("original-clases")
- ? $controlGroup.data("original-classes")
- : $controlGroup.attr("class")
- )
- );
-
- $this.data(
- "original-aria-invalid",
- (
- $this.data("original-aria-invalid")
- ? $this.data("original-aria-invalid")
- : $this.attr("aria-invalid")
- )
- );
-
- // =============================================================
- // VALIDATION
- // =============================================================
-
- $this.bind(
- "validation.validation",
- function (event, params) {
-
- var value = getValue($this);
-
- // Get a list of the errors to apply
- var errorsFound = [];
-
- $.each(validators, function (validatorType, validatorTypeArray) {
- if (value || value.length || (params && params.includeEmpty) || (!!settings.validatorTypes[validatorType].blockSubmit && params && !!params.submitting)) {
- $.each(validatorTypeArray, function (i, validator) {
- if (settings.validatorTypes[validatorType].validate($this, value, validator)) {
- errorsFound.push(validator.message);
+ if (warningsFound) {
+ if (settings.options.preventSubmit) {
+ e.preventDefault();
+ }
+ $form.addClass("error");
+ if ($.isFunction(settings.options.submitError)) {
+ settings.options.submitError($form, e, $inputs.jqBootstrapValidation("collectErrors", true));
+ }
+ } else {
+ $form.removeClass("error");
+ if ($.isFunction(settings.options.submitSuccess)) {
+ settings.options.submitSuccess($form, e);
+ }
}
- });
- }
- });
-
- return errorsFound;
- }
- );
-
- $this.bind(
- "getValidators.validation",
- function () {
- return validators;
- }
- );
-
- // =============================================================
- // WATCH FOR CHANGES
- // =============================================================
- $this.bind(
- "submit.validation",
- function () {
- return $this.triggerHandler("change.validation", {submitting: true});
- }
- );
- $this.bind(
- [
- "keyup",
- "focus",
- "blur",
- "click",
- "keydown",
- "keypress",
- "change"
- ].join(".validation ") + ".validation",
- function (e, params) {
-
- var value = getValue($this);
-
- var errorsFound = [];
-
- $controlGroup.find("input,textarea,select").each(function (i, el) {
- var oldCount = errorsFound.length;
- $.each($(el).triggerHandler("validation.validation", params), function (j, message) {
- errorsFound.push(message);
});
- if (errorsFound.length > oldCount) {
- $(el).attr("aria-invalid", "true");
- } else {
- var original = $this.data("original-aria-invalid");
- $(el).attr("aria-invalid", (original !== undefined ? original : false));
- }
- });
- $form.find("input,select,textarea").not($this).not("[name=\"" + $this.attr("name") + "\"]").trigger("validationLostFocus.validation");
+ return this.each(function () {
- errorsFound = $.unique(errorsFound.sort());
+ // Get references to everything we're interested in
+ var $this = $(this),
+ $controlGroup = $this.parents(".control-group").first(),
+ $helpBlock = $controlGroup.find(".help-block").first(),
+ $form = $this.parents("form").first(),
+ validatorNames = [];
- // Were there any errors?
- if (errorsFound.length) {
- // Better flag it up as a warning.
- $controlGroup.removeClass("success error").addClass("warning");
+ // create message container if not exists
+ if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) {
+ $helpBlock = $('<div class="help-block" />');
+ $controlGroup.find('.controls').append($helpBlock);
+ createdElements.push($helpBlock[0]);
+ }
- // How many errors did we find?
- if (settings.options.semanticallyStrict && errorsFound.length === 1) {
- // Only one? Being strict? Just output it.
- $helpBlock.html(errorsFound[0] +
- ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
- } else {
- // Multiple? Being sloppy? Glue them together into an UL.
- $helpBlock.html("<ul role=\"alert\"><li>" + errorsFound.join("</li><li>") + "</li></ul>" +
- ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
- }
- } else {
- $controlGroup.removeClass("warning error success");
- if (value.length > 0) {
- $controlGroup.addClass("success");
- }
- $helpBlock.html($helpBlock.data("original-contents"));
- }
+ // =============================================================
+ // SNIFF HTML FOR VALIDATORS
+ // =============================================================
- if (e.type === "blur") {
- $controlGroup.removeClass("success");
- }
+ // *snort sniff snuffle*
+
+ if (settings.options.sniffHtml) {
+ var message = "";
+ // ---------------------------------------------------------
+ // PATTERN
+ // ---------------------------------------------------------
+ if ($this.attr("pattern") !== undefined) {
+ message = "Not in the expected format<!-- data-validation-pattern-message to override -->";
+ if ($this.data("validationPatternMessage")) {
+ message = $this.data("validationPatternMessage");
+ }
+ $this.data("validationPatternMessage", message);
+ $this.data("validationPatternRegex", $this.attr("pattern"));
+ }
+ // ---------------------------------------------------------
+ // MAX
+ // ---------------------------------------------------------
+ if ($this.attr("max") !== undefined || $this.attr("aria-valuemax") !== undefined) {
+ var max = ($this.attr("max") !== undefined ? $this.attr("max") : $this.attr("aria-valuemax"));
+ message = "Too high: Maximum of '" + max + "'<!-- data-validation-max-message to override -->";
+ if ($this.data("validationMaxMessage")) {
+ message = $this.data("validationMaxMessage");
+ }
+ $this.data("validationMaxMessage", message);
+ $this.data("validationMaxMax", max);
+ }
+ // ---------------------------------------------------------
+ // MIN
+ // ---------------------------------------------------------
+ if ($this.attr("min") !== undefined || $this.attr("aria-valuemin") !== undefined) {
+ var min = ($this.attr("min") !== undefined ? $this.attr("min") : $this.attr("aria-valuemin"));
+ message = "Too low: Minimum of '" + min + "'<!-- data-validation-min-message to override -->";
+ if ($this.data("validationMinMessage")) {
+ message = $this.data("validationMinMessage");
+ }
+ $this.data("validationMinMessage", message);
+ $this.data("validationMinMin", min);
+ }
+ // ---------------------------------------------------------
+ // MAXLENGTH
+ // ---------------------------------------------------------
+ if ($this.attr("maxlength") !== undefined) {
+ message = "Too long: Maximum of '" + $this.attr("maxlength") + "' characters<!-- data-validation-maxlength-message to override -->";
+ if ($this.data("validationMaxlengthMessage")) {
+ message = $this.data("validationMaxlengthMessage");
+ }
+ $this.data("validationMaxlengthMessage", message);
+ $this.data("validationMaxlengthMaxlength", $this.attr("maxlength"));
+ }
+ // ---------------------------------------------------------
+ // MINLENGTH
+ // ---------------------------------------------------------
+ if ($this.attr("minlength") !== undefined) {
+ message = "Too short: Minimum of '" + $this.attr("minlength") + "' characters<!-- data-validation-minlength-message to override -->";
+ if ($this.data("validationMinlengthMessage")) {
+ message = $this.data("validationMinlengthMessage");
+ }
+ $this.data("validationMinlengthMessage", message);
+ $this.data("validationMinlengthMinlength", $this.attr("minlength"));
+ }
+ // ---------------------------------------------------------
+ // REQUIRED
+ // ---------------------------------------------------------
+ if ($this.attr("required") !== undefined || $this.attr("aria-required") !== undefined) {
+ message = settings.builtInValidators.required.message;
+ if ($this.data("validationRequiredMessage")) {
+ message = $this.data("validationRequiredMessage");
+ }
+ $this.data("validationRequiredMessage", message);
+ }
+ // ---------------------------------------------------------
+ // NUMBER
+ // ---------------------------------------------------------
+ if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "number") {
+ message = settings.builtInValidators.number.message;
+ if ($this.data("validationNumberMessage")) {
+ message = $this.data("validationNumberMessage");
+ }
+ $this.data("validationNumberMessage", message);
+ }
+ // ---------------------------------------------------------
+ // EMAIL
+ // ---------------------------------------------------------
+ if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "email") {
+ message = "Not a valid email address<!-- data-validator-validemail-message to override -->";
+ if ($this.data("validationValidemailMessage")) {
+ message = $this.data("validationValidemailMessage");
+ } else if ($this.data("validationEmailMessage")) {
+ message = $this.data("validationEmailMessage");
+ }
+ $this.data("validationValidemailMessage", message);
+ }
+ // ---------------------------------------------------------
+ // MINCHECKED
+ // ---------------------------------------------------------
+ if ($this.attr("minchecked") !== undefined) {
+ message = "Not enough options checked; Minimum of '" + $this.attr("minchecked") + "' required<!-- data-validation-minchecked-message to override -->";
+ if ($this.data("validationMincheckedMessage")) {
+ message = $this.data("validationMincheckedMessage");
+ }
+ $this.data("validationMincheckedMessage", message);
+ $this.data("validationMincheckedMinchecked", $this.attr("minchecked"));
+ }
+ // ---------------------------------------------------------
+ // MAXCHECKED
+ // ---------------------------------------------------------
+ if ($this.attr("maxchecked") !== undefined) {
+ message = "Too many options checked; Maximum of '" + $this.attr("maxchecked") + "' required<!-- data-validation-maxchecked-message to override -->";
+ if ($this.data("validationMaxcheckedMessage")) {
+ message = $this.data("validationMaxcheckedMessage");
+ }
+ $this.data("validationMaxcheckedMessage", message);
+ $this.data("validationMaxcheckedMaxchecked", $this.attr("maxchecked"));
+ }
+ }
+
+ // =============================================================
+ // COLLECT VALIDATOR NAMES
+ // =============================================================
+
+ // Get named validators
+ if ($this.data("validation") !== undefined) {
+ validatorNames = $this.data("validation").split(",");
+ }
+
+ // Get extra ones defined on the element's data attributes
+ $.each($this.data(), function (i, el) {
+ var parts = i.replace(/([A-Z])/g, ",$1").split(",");
+ if (parts[0] === "validation" && parts[1]) {
+ validatorNames.push(parts[1]);
+ }
+ });
+
+ // =============================================================
+ // NORMALISE VALIDATOR NAMES
+ // =============================================================
+
+ var validatorNamesToInspect = validatorNames;
+ var newValidatorNamesToInspect = [];
+
+ do // repeatedly expand 'shortcut' validators into their real validators
+ {
+ // Uppercase only the first letter of each name
+ $.each(validatorNames, function (i, el) {
+ validatorNames[i] = formatValidatorName(el);
+ });
+
+ // Remove duplicate validator names
+ validatorNames = $.unique(validatorNames);
+
+ // Pull out the new validator names from each shortcut
+ newValidatorNamesToInspect = [];
+ $.each(validatorNamesToInspect, function (i, el) {
+ if ($this.data("validation" + el + "Shortcut") !== undefined) {
+ // Are these custom validators?
+ // Pull them out!
+ $.each($this.data("validation" + el + "Shortcut").split(","), function (i2, el2) {
+ newValidatorNamesToInspect.push(el2);
+ });
+ } else if (settings.builtInValidators[el.toLowerCase()]) {
+ // Is this a recognised built-in?
+ // Pull it out!
+ var validator = settings.builtInValidators[el.toLowerCase()];
+ if (validator.type.toLowerCase() === "shortcut") {
+ $.each(validator.shortcut.split(","), function (i, el) {
+ el = formatValidatorName(el);
+ newValidatorNamesToInspect.push(el);
+ validatorNames.push(el);
+ });
+ }
+ }
+ });
+
+ validatorNamesToInspect = newValidatorNamesToInspect;
+
+ } while (validatorNamesToInspect.length > 0)
+
+ // =============================================================
+ // SET UP VALIDATOR ARRAYS
+ // =============================================================
+
+ var validators = {};
+
+ $.each(validatorNames, function (i, el) {
+ // Set up the 'override' message
+ var message = $this.data("validation" + el + "Message");
+ var hasOverrideMessage = (message !== undefined);
+ var foundValidator = false;
+ message =
+ (
+ message
+ ? message
+ : "'" + el + "' validation failed <!-- Add attribute 'data-validation-" + el.toLowerCase() + "-message' to input to change this message -->"
+ )
+ ;
+
+ $.each(
+ settings.validatorTypes,
+ function (validatorType, validatorTemplate) {
+ if (validators[validatorType] === undefined) {
+ validators[validatorType] = [];
+ }
+ if (!foundValidator && $this.data("validation" + el + formatValidatorName(validatorTemplate.name)) !== undefined) {
+ validators[validatorType].push(
+ $.extend(
+ true,
+ {
+ name: formatValidatorName(validatorTemplate.name),
+ message: message
+ },
+ validatorTemplate.init($this, el)
+ )
+ );
+ foundValidator = true;
+ }
+ }
+ );
+
+ if (!foundValidator && settings.builtInValidators[el.toLowerCase()]) {
+
+ var validator = $.extend(true, {}, settings.builtInValidators[el.toLowerCase()]);
+ if (hasOverrideMessage) {
+ validator.message = message;
+ }
+ var validatorType = validator.type.toLowerCase();
+
+ if (validatorType === "shortcut") {
+ foundValidator = true;
+ } else {
+ $.each(
+ settings.validatorTypes,
+ function (validatorTemplateType, validatorTemplate) {
+ if (validators[validatorTemplateType] === undefined) {
+ validators[validatorTemplateType] = [];
+ }
+ if (!foundValidator && validatorType === validatorTemplateType.toLowerCase()) {
+ $this.data("validation" + el + formatValidatorName(validatorTemplate.name), validator[validatorTemplate.name.toLowerCase()]);
+ validators[validatorType].push(
+ $.extend(
+ validator,
+ validatorTemplate.init($this, el)
+ )
+ );
+ foundValidator = true;
+ }
+ }
+ );
+ }
+ }
+
+ if (!foundValidator) {
+ $.error("Cannot find validation info for '" + el + "'");
+ }
+ });
+
+ // =============================================================
+ // STORE FALLBACK VALUES
+ // =============================================================
+
+ $helpBlock.data(
+ "original-contents",
+ (
+ $helpBlock.data("original-contents")
+ ? $helpBlock.data("original-contents")
+ : $helpBlock.html()
+ )
+ );
+
+ $helpBlock.data(
+ "original-role",
+ (
+ $helpBlock.data("original-role")
+ ? $helpBlock.data("original-role")
+ : $helpBlock.attr("role")
+ )
+ );
+
+ $controlGroup.data(
+ "original-classes",
+ (
+ $controlGroup.data("original-clases")
+ ? $controlGroup.data("original-classes")
+ : $controlGroup.attr("class")
+ )
+ );
+
+ $this.data(
+ "original-aria-invalid",
+ (
+ $this.data("original-aria-invalid")
+ ? $this.data("original-aria-invalid")
+ : $this.attr("aria-invalid")
+ )
+ );
+
+ // =============================================================
+ // VALIDATION
+ // =============================================================
+
+ $this.bind(
+ "validation.validation",
+ function (event, params) {
+
+ var value = getValue($this);
+
+ // Get a list of the errors to apply
+ var errorsFound = [];
+
+ $.each(validators, function (validatorType, validatorTypeArray) {
+ if (value || value.length || (params && params.includeEmpty) || (!!settings.validatorTypes[validatorType].blockSubmit && params && !!params.submitting)) {
+ $.each(validatorTypeArray, function (i, validator) {
+ if (settings.validatorTypes[validatorType].validate($this, value, validator)) {
+ errorsFound.push(validator.message);
+ }
+ });
+ }
+ });
+
+ return errorsFound;
+ }
+ );
+
+ $this.bind(
+ "getValidators.validation",
+ function () {
+ return validators;
+ }
+ );
+
+ // =============================================================
+ // WATCH FOR CHANGES
+ // =============================================================
+ $this.bind(
+ "submit.validation",
+ function () {
+ return $this.triggerHandler("change.validation", {submitting: true});
+ }
+ );
+ $this.bind(
+ [
+ "keyup",
+ "focus",
+ "blur",
+ "click",
+ "keydown",
+ "keypress",
+ "change"
+ ].join(".validation ") + ".validation",
+ function (e, params) {
+
+ var value = getValue($this);
+
+ var errorsFound = [];
+
+ $controlGroup.find("input,textarea,select").each(function (i, el) {
+ var oldCount = errorsFound.length;
+ $.each($(el).triggerHandler("validation.validation", params), function (j, message) {
+ errorsFound.push(message);
+ });
+ if (errorsFound.length > oldCount) {
+ $(el).attr("aria-invalid", "true");
+ } else {
+ var original = $this.data("original-aria-invalid");
+ $(el).attr("aria-invalid", (original !== undefined ? original : false));
+ }
+ });
+
+ $form.find("input,select,textarea").not($this).not("[name=\"" + $this.attr("name") + "\"]").trigger("validationLostFocus.validation");
+
+ errorsFound = $.unique(errorsFound.sort());
+
+ // Were there any errors?
+ if (errorsFound.length) {
+ // Better flag it up as a warning.
+ $controlGroup.removeClass("success error").addClass("warning");
+
+ // How many errors did we find?
+ if (settings.options.semanticallyStrict && errorsFound.length === 1) {
+ // Only one? Being strict? Just output it.
+ $helpBlock.html(errorsFound[0] +
+ ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
+ } else {
+ // Multiple? Being sloppy? Glue them together into an UL.
+ $helpBlock.html("<ul role=\"alert\"><li>" + errorsFound.join("</li><li>") + "</li></ul>" +
+ ( settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : "" ));
+ }
+ } else {
+ $controlGroup.removeClass("warning error success");
+ if (value.length > 0) {
+ $controlGroup.addClass("success");
+ }
+ $helpBlock.html($helpBlock.data("original-contents"));
+ }
+
+ if (e.type === "blur") {
+ $controlGroup.removeClass("success");
+ }
+ }
+ );
+ $this.bind("validationLostFocus.validation", function () {
+ $controlGroup.removeClass("success");
+ });
+ });
+ },
+ destroy: function () {
+
+ return this.each(
+ function () {
+
+ var
+ $this = $(this),
+ $controlGroup = $this.parents(".control-group").first(),
+ $helpBlock = $controlGroup.find(".help-block").first();
+
+ // remove our events
+ $this.unbind('.validation'); // events are namespaced.
+ // reset help text
+ $helpBlock.html($helpBlock.data("original-contents"));
+ // reset classes
+ $controlGroup.attr("class", $controlGroup.data("original-classes"));
+ // reset aria
+ $this.attr("aria-invalid", $this.data("original-aria-invalid"));
+ // reset role
+ $helpBlock.attr("role", $this.data("original-role"));
+ // remove all elements we created
+ if (createdElements.indexOf($helpBlock[0]) > -1) {
+ $helpBlock.remove();
+ }
+
+ }
+ );
+
+ },
+ collectErrors: function (includeEmpty) {
+
+ var errorMessages = {};
+ this.each(function (i, el) {
+ var $el = $(el);
+ var name = $el.attr("name");
+ var errors = $el.triggerHandler("validation.validation", {includeEmpty: true});
+ errorMessages[name] = $.extend(true, errors, errorMessages[name]);
+ });
+
+ $.each(errorMessages, function (i, el) {
+ if (el.length === 0) {
+ delete errorMessages[i];
+ }
+ });
+
+ return errorMessages;
+
+ },
+ hasErrors: function () {
+
+ var errorMessages = [];
+
+ this.each(function (i, el) {
+ errorMessages = errorMessages.concat(
+ $(el).triggerHandler("getValidators.validation") ? $(el).triggerHandler("validation.validation", {submitting: true}) : []
+ );
+ });
+
+ return (errorMessages.length > 0);
+ },
+ override: function (newDefaults) {
+ defaults = $.extend(true, defaults, newDefaults);
}
- );
- $this.bind("validationLostFocus.validation", function () {
- $controlGroup.removeClass("success");
- });
- });
- },
- destroy : function( ) {
-
- return this.each(
- function() {
-
- var
- $this = $(this),
- $controlGroup = $this.parents(".control-group").first(),
- $helpBlock = $controlGroup.find(".help-block").first();
-
- // remove our events
- $this.unbind('.validation'); // events are namespaced.
- // reset help text
- $helpBlock.html($helpBlock.data("original-contents"));
- // reset classes
- $controlGroup.attr("class", $controlGroup.data("original-classes"));
- // reset aria
- $this.attr("aria-invalid", $this.data("original-aria-invalid"));
- // reset role
- $helpBlock.attr("role", $this.data("original-role"));
- // remove all elements we created
- if (createdElements.indexOf($helpBlock[0]) > -1) {
- $helpBlock.remove();
- }
-
- }
- );
-
- },
- collectErrors : function(includeEmpty) {
-
- var errorMessages = {};
- this.each(function (i, el) {
- var $el = $(el);
- var name = $el.attr("name");
- var errors = $el.triggerHandler("validation.validation", {includeEmpty: true});
- errorMessages[name] = $.extend(true, errors, errorMessages[name]);
- });
-
- $.each(errorMessages, function (i, el) {
- if (el.length === 0) {
- delete errorMessages[i];
- }
- });
-
- return errorMessages;
-
- },
- hasErrors: function() {
-
- var errorMessages = [];
-
- this.each(function (i, el) {
- errorMessages = errorMessages.concat(
- $(el).triggerHandler("getValidators.validation") ? $(el).triggerHandler("validation.validation", {submitting: true}) : []
- );
- });
-
- return (errorMessages.length > 0);
- },
- override : function (newDefaults) {
- defaults = $.extend(true, defaults, newDefaults);
- }
- },
- validatorTypes: {
- callback: {
- name: "callback",
- init: function ($this, name) {
- return {
- validatorName: name,
- callback: $this.data("validation" + name + "Callback"),
- lastValue: $this.val(),
- lastValid: true,
- lastFinished: true
- };
},
- validate: function ($this, value, validator) {
- if (validator.lastValue === value && validator.lastFinished) {
- return !validator.lastValid;
- }
+ validatorTypes: {
+ callback: {
+ name: "callback",
+ init: function ($this, name) {
+ return {
+ validatorName: name,
+ callback: $this.data("validation" + name + "Callback"),
+ lastValue: $this.val(),
+ lastValid: true,
+ lastFinished: true
+ };
+ },
+ validate: function ($this, value, validator) {
+ if (validator.lastValue === value && validator.lastFinished) {
+ return !validator.lastValid;
+ }
- if (validator.lastFinished === true)
- {
- validator.lastValue = value;
- validator.lastValid = true;
- validator.lastFinished = false;
+ if (validator.lastFinished === true) {
+ validator.lastValue = value;
+ validator.lastValid = true;
+ validator.lastFinished = false;
- var rrjqbvValidator = validator;
- var rrjqbvThis = $this;
- executeFunctionByName(
- validator.callback,
- window,
- $this,
- value,
- function (data) {
- if (rrjqbvValidator.lastValue === data.value) {
- rrjqbvValidator.lastValid = data.valid;
- if (data.message) {
- rrjqbvValidator.message = data.message;
- }
- rrjqbvValidator.lastFinished = true;
- rrjqbvThis.data("validation" + rrjqbvValidator.validatorName + "Message", rrjqbvValidator.message);
- // Timeout is set to avoid problems with the events being considered 'already fired'
- setTimeout(function () {
- rrjqbvThis.trigger("change.validation");
- }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
+ var rrjqbvValidator = validator;
+ var rrjqbvThis = $this;
+ executeFunctionByName(
+ validator.callback,
+ window,
+ $this,
+ value,
+ function (data) {
+ if (rrjqbvValidator.lastValue === data.value) {
+ rrjqbvValidator.lastValid = data.valid;
+ if (data.message) {
+ rrjqbvValidator.message = data.message;
+ }
+ rrjqbvValidator.lastFinished = true;
+ rrjqbvThis.data("validation" + rrjqbvValidator.validatorName + "Message", rrjqbvValidator.message);
+ // Timeout is set to avoid problems with the events being considered 'already fired'
+ setTimeout(function () {
+ rrjqbvThis.trigger("change.validation");
+ }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
+ }
+ }
+ );
+ }
+
+ return false;
+
}
- }
- );
- }
+ },
+ ajax: {
+ name: "ajax",
+ init: function ($this, name) {
+ return {
+ validatorName: name,
+ url: $this.data("validation" + name + "Ajax"),
+ lastValue: $this.val(),
+ lastValid: true,
+ lastFinished: true
+ };
+ },
+ validate: function ($this, value, validator) {
+ if ("" + validator.lastValue === "" + value && validator.lastFinished === true) {
+ return validator.lastValid === false;
+ }
- return false;
+ if (validator.lastFinished === true) {
+ validator.lastValue = value;
+ validator.lastValid = true;
+ validator.lastFinished = false;
+ $.ajax({
+ url: validator.url,
+ data: "value=" + value + "&field=" + $this.attr("name"),
+ dataType: "json",
+ success: function (data) {
+ if ("" + validator.lastValue === "" + data.value) {
+ validator.lastValid = !!(data.valid);
+ if (data.message) {
+ validator.message = data.message;
+ }
+ validator.lastFinished = true;
+ $this.data("validation" + validator.validatorName + "Message", validator.message);
+ // Timeout is set to avoid problems with the events being considered 'already fired'
+ setTimeout(function () {
+ $this.trigger("change.validation");
+ }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
+ }
+ },
+ failure: function () {
+ validator.lastValid = true;
+ validator.message = "ajax call failed";
+ validator.lastFinished = true;
+ $this.data("validation" + validator.validatorName + "Message", validator.message);
+ // Timeout is set to avoid problems with the events being considered 'already fired'
+ setTimeout(function () {
+ $this.trigger("change.validation");
+ }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
+ }
+ });
+ }
- }
- },
- ajax: {
- name: "ajax",
- init: function ($this, name) {
- return {
- validatorName: name,
- url: $this.data("validation" + name + "Ajax"),
- lastValue: $this.val(),
- lastValid: true,
- lastFinished: true
- };
+ return false;
+
+ }
+ },
+ regex: {
+ name: "regex",
+ init: function ($this, name) {
+ return {regex: regexFromString($this.data("validation" + name + "Regex"))};
+ },
+ validate: function ($this, value, validator) {
+ return (!validator.regex.test(value) && !validator.negative)
+ || (validator.regex.test(value) && validator.negative);
+ }
+ },
+ required: {
+ name: "required",
+ init: function ($this, name) {
+ return {};
+ },
+ validate: function ($this, value, validator) {
+ return !!(value.length === 0 && !validator.negative)
+ || !!(value.length > 0 && validator.negative);
+ },
+ blockSubmit: true
+ },
+ match: {
+ name: "match",
+ init: function ($this, name) {
+ var element = $this.parents("form").first().find("[name=\"" + $this.data("validation" + name + "Match") + "\"]").first();
+ element.bind("validation.validation", function () {
+ $this.trigger("change.validation", {submitting: true});
+ });
+ return {"element": element};
+ },
+ validate: function ($this, value, validator) {
+ return (value !== validator.element.val() && !validator.negative)
+ || (value === validator.element.val() && validator.negative);
+ },
+ blockSubmit: true
+ },
+ max: {
+ name: "max",
+ init: function ($this, name) {
+ return {max: $this.data("validation" + name + "Max")};
+ },
+ validate: function ($this, value, validator) {
+ return (parseFloat(value, 10) > parseFloat(validator.max, 10) && !validator.negative)
+ || (parseFloat(value, 10) <= parseFloat(validator.max, 10) && validator.negative);
+ }
+ },
+ min: {
+ name: "min",
+ init: function ($this, name) {
+ return {min: $this.data("validation" + name + "Min")};
+ },
+ validate: function ($this, value, validator) {
+ return (parseFloat(value) < parseFloat(validator.min) && !validator.negative)
+ || (parseFloat(value) >= parseFloat(validator.min) && validator.negative);
+ }
+ },
+ maxlength: {
+ name: "maxlength",
+ init: function ($this, name) {
+ return {maxlength: $this.data("validation" + name + "Maxlength")};
+ },
+ validate: function ($this, value, validator) {
+ return ((value.length > validator.maxlength) && !validator.negative)
+ || ((value.length <= validator.maxlength) && validator.negative);
+ }
+ },
+ minlength: {
+ name: "minlength",
+ init: function ($this, name) {
+ return {minlength: $this.data("validation" + name + "Minlength")};
+ },
+ validate: function ($this, value, validator) {
+ return ((value.length < validator.minlength) && !validator.negative)
+ || ((value.length >= validator.minlength) && validator.negative);
+ }
+ },
+ maxchecked: {
+ name: "maxchecked",
+ init: function ($this, name) {
+ var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
+ elements.bind("click.validation", function () {
+ $this.trigger("change.validation", {includeEmpty: true});
+ });
+ return {maxchecked: $this.data("validation" + name + "Maxchecked"), elements: elements};
+ },
+ validate: function ($this, value, validator) {
+ return (validator.elements.filter(":checked").length > validator.maxchecked && !validator.negative)
+ || (validator.elements.filter(":checked").length <= validator.maxchecked && validator.negative);
+ },
+ blockSubmit: true
+ },
+ minchecked: {
+ name: "minchecked",
+ init: function ($this, name) {
+ var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
+ elements.bind("click.validation", function () {
+ $this.trigger("change.validation", {includeEmpty: true});
+ });
+ return {minchecked: $this.data("validation" + name + "Minchecked"), elements: elements};
+ },
+ validate: function ($this, value, validator) {
+ return (validator.elements.filter(":checked").length < validator.minchecked && !validator.negative)
+ || (validator.elements.filter(":checked").length >= validator.minchecked && validator.negative);
+ },
+ blockSubmit: true
+ }
},
- validate: function ($this, value, validator) {
- if (""+validator.lastValue === ""+value && validator.lastFinished === true) {
- return validator.lastValid === false;
- }
-
- if (validator.lastFinished === true)
- {
- validator.lastValue = value;
- validator.lastValid = true;
- validator.lastFinished = false;
- $.ajax({
- url: validator.url,
- data: "value=" + value + "&field=" + $this.attr("name"),
- dataType: "json",
- success: function (data) {
- if (""+validator.lastValue === ""+data.value) {
- validator.lastValid = !!(data.valid);
- if (data.message) {
- validator.message = data.message;
- }
- validator.lastFinished = true;
- $this.data("validation" + validator.validatorName + "Message", validator.message);
- // Timeout is set to avoid problems with the events being considered 'already fired'
- setTimeout(function () {
- $this.trigger("change.validation");
- }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
- }
- },
- failure: function () {
- validator.lastValid = true;
- validator.message = "ajax call failed";
- validator.lastFinished = true;
- $this.data("validation" + validator.validatorName + "Message", validator.message);
- // Timeout is set to avoid problems with the events being considered 'already fired'
- setTimeout(function () {
- $this.trigger("change.validation");
- }, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
- }
- });
- }
-
- return false;
-
+ builtInValidators: {
+ email: {
+ name: "Email",
+ type: "shortcut",
+ shortcut: "validemail"
+ },
+ validemail: {
+ name: "Validemail",
+ type: "regex",
+ regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
+ message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
+ },
+ passwordagain: {
+ name: "Passwordagain",
+ type: "match",
+ match: "password",
+ message: "Does not match the given password<!-- data-validator-paswordagain-message to override -->"
+ },
+ positive: {
+ name: "Positive",
+ type: "shortcut",
+ shortcut: "number,positivenumber"
+ },
+ negative: {
+ name: "Negative",
+ type: "shortcut",
+ shortcut: "number,negativenumber"
+ },
+ number: {
+ name: "Number",
+ type: "regex",
+ regex: "([+-]?\\\d+(\\\.\\\d*)?([eE][+-]?[0-9]+)?)?",
+ message: "Must be a number<!-- data-validator-number-message to override -->"
+ },
+ integer: {
+ name: "Integer",
+ type: "regex",
+ regex: "[+-]?\\\d+",
+ message: "No decimal places allowed<!-- data-validator-integer-message to override -->"
+ },
+ positivenumber: {
+ name: "Positivenumber",
+ type: "min",
+ min: 0,
+ message: "Must be a positive number<!-- data-validator-positivenumber-message to override -->"
+ },
+ negativenumber: {
+ name: "Negativenumber",
+ type: "max",
+ max: 0,
+ message: "Must be a negative number<!-- data-validator-negativenumber-message to override -->"
+ },
+ required: {
+ name: "Required",
+ type: "required",
+ message: "This is required<!-- data-validator-required-message to override -->"
+ },
+ checkone: {
+ name: "Checkone",
+ type: "minchecked",
+ minchecked: 1,
+ message: "Check at least one option<!-- data-validation-checkone-message to override -->"
+ }
}
- },
- regex: {
- name: "regex",
- init: function ($this, name) {
- return {regex: regexFromString($this.data("validation" + name + "Regex"))};
- },
- validate: function ($this, value, validator) {
- return (!validator.regex.test(value) && ! validator.negative)
- || (validator.regex.test(value) && validator.negative);
- }
- },
- required: {
- name: "required",
- init: function ($this, name) {
- return {};
- },
- validate: function ($this, value, validator) {
- return !!(value.length === 0 && ! validator.negative)
- || !!(value.length > 0 && validator.negative);
- },
- blockSubmit: true
- },
- match: {
- name: "match",
- init: function ($this, name) {
- var element = $this.parents("form").first().find("[name=\"" + $this.data("validation" + name + "Match") + "\"]").first();
- element.bind("validation.validation", function () {
- $this.trigger("change.validation", {submitting: true});
- });
- return {"element": element};
- },
- validate: function ($this, value, validator) {
- return (value !== validator.element.val() && ! validator.negative)
- || (value === validator.element.val() && validator.negative);
- },
- blockSubmit: true
- },
- max: {
- name: "max",
- init: function ($this, name) {
- return {max: $this.data("validation" + name + "Max")};
- },
- validate: function ($this, value, validator) {
- return (parseFloat(value, 10) > parseFloat(validator.max, 10) && ! validator.negative)
- || (parseFloat(value, 10) <= parseFloat(validator.max, 10) && validator.negative);
- }
- },
- min: {
- name: "min",
- init: function ($this, name) {
- return {min: $this.data("validation" + name + "Min")};
- },
- validate: function ($this, value, validator) {
- return (parseFloat(value) < parseFloat(validator.min) && ! validator.negative)
- || (parseFloat(value) >= parseFloat(validator.min) && validator.negative);
- }
- },
- maxlength: {
- name: "maxlength",
- init: function ($this, name) {
- return {maxlength: $this.data("validation" + name + "Maxlength")};
- },
- validate: function ($this, value, validator) {
- return ((value.length > validator.maxlength) && ! validator.negative)
- || ((value.length <= validator.maxlength) && validator.negative);
- }
- },
- minlength: {
- name: "minlength",
- init: function ($this, name) {
- return {minlength: $this.data("validation" + name + "Minlength")};
- },
- validate: function ($this, value, validator) {
- return ((value.length < validator.minlength) && ! validator.negative)
- || ((value.length >= validator.minlength) && validator.negative);
- }
- },
- maxchecked: {
- name: "maxchecked",
- init: function ($this, name) {
- var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
- elements.bind("click.validation", function () {
- $this.trigger("change.validation", {includeEmpty: true});
- });
- return {maxchecked: $this.data("validation" + name + "Maxchecked"), elements: elements};
- },
- validate: function ($this, value, validator) {
- return (validator.elements.filter(":checked").length > validator.maxchecked && ! validator.negative)
- || (validator.elements.filter(":checked").length <= validator.maxchecked && validator.negative);
- },
- blockSubmit: true
- },
- minchecked: {
- name: "minchecked",
- init: function ($this, name) {
- var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
- elements.bind("click.validation", function () {
- $this.trigger("change.validation", {includeEmpty: true});
- });
- return {minchecked: $this.data("validation" + name + "Minchecked"), elements: elements};
- },
- validate: function ($this, value, validator) {
- return (validator.elements.filter(":checked").length < validator.minchecked && ! validator.negative)
- || (validator.elements.filter(":checked").length >= validator.minchecked && validator.negative);
- },
- blockSubmit: true
- }
- },
- builtInValidators: {
- email: {
- name: "Email",
- type: "shortcut",
- shortcut: "validemail"
- },
- validemail: {
- name: "Validemail",
- type: "regex",
- regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
- message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
- },
- passwordagain: {
- name: "Passwordagain",
- type: "match",
- match: "password",
- message: "Does not match the given password<!-- data-validator-paswordagain-message to override -->"
- },
- positive: {
- name: "Positive",
- type: "shortcut",
- shortcut: "number,positivenumber"
- },
- negative: {
- name: "Negative",
- type: "shortcut",
- shortcut: "number,negativenumber"
- },
- number: {
- name: "Number",
- type: "regex",
- regex: "([+-]?\\\d+(\\\.\\\d*)?([eE][+-]?[0-9]+)?)?",
- message: "Must be a number<!-- data-validator-number-message to override -->"
- },
- integer: {
- name: "Integer",
- type: "regex",
- regex: "[+-]?\\\d+",
- message: "No decimal places allowed<!-- data-validator-integer-message to override -->"
- },
- positivenumber: {
- name: "Positivenumber",
- type: "min",
- min: 0,
- message: "Must be a positive number<!-- data-validator-positivenumber-message to override -->"
- },
- negativenumber: {
- name: "Negativenumber",
- type: "max",
- max: 0,
- message: "Must be a negative number<!-- data-validator-negativenumber-message to override -->"
- },
- required: {
- name: "Required",
- type: "required",
- message: "This is required<!-- data-validator-required-message to override -->"
- },
- checkone: {
- name: "Checkone",
- type: "minchecked",
- minchecked: 1,
- message: "Check at least one option<!-- data-validation-checkone-message to override -->"
- }
- }
- };
+ };
- var formatValidatorName = function (name) {
- return name
- .toLowerCase()
- .replace(
- /(^|\s)([a-z])/g ,
- function(m,p1,p2) {
- return p1+p2.toUpperCase();
- }
- )
- ;
- };
+ var formatValidatorName = function (name) {
+ return name
+ .toLowerCase()
+ .replace(
+ /(^|\s)([a-z])/g,
+ function (m, p1, p2) {
+ return p1 + p2.toUpperCase();
+ }
+ )
+ ;
+ };
- var getValue = function ($this) {
- // Extract the value we're talking about
- var value = $this.val();
- var type = $this.attr("type");
- if (type === "checkbox") {
- value = ($this.is(":checked") ? value : "");
- }
- if (type === "radio") {
- value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? value : "");
- }
- return value;
- };
+ var getValue = function ($this) {
+ // Extract the value we're talking about
+ var value = $this.val();
+ var type = $this.attr("type");
+ if (type === "checkbox") {
+ value = ($this.is(":checked") ? value : "");
+ }
+ if (type === "radio") {
+ value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? value : "");
+ }
+ return value;
+ };
- function regexFromString(inputstring) {
- return new RegExp("^" + inputstring + "$");
- }
-
- /**
- * Thanks to Jason Bunting via StackOverflow.com
- *
- * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string#answer-359910
- * Short link: http://tinyurl.com/executeFunctionByName
- **/
- function executeFunctionByName(functionName, context /*, args*/) {
- var args = Array.prototype.slice.call(arguments).splice(2);
- var namespaces = functionName.split(".");
- var func = namespaces.pop();
- for(var i = 0; i < namespaces.length; i++) {
- context = context[namespaces[i]];
+ function regexFromString(inputstring) {
+ return new RegExp("^" + inputstring + "$");
}
- return context[func].apply(this, args);
- }
- $.fn.jqBootstrapValidation = function( method ) {
+ /**
+ * Thanks to Jason Bunting via StackOverflow.com
+ *
+ * http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string#answer-359910
+ * Short link: http://tinyurl.com/executeFunctionByName
+ **/
+ function executeFunctionByName(functionName, context /*, args*/) {
+ var args = Array.prototype.slice.call(arguments).splice(2);
+ var namespaces = functionName.split(".");
+ var func = namespaces.pop();
+ for (var i = 0; i < namespaces.length; i++) {
+ context = context[namespaces[i]];
+ }
+ return context[func].apply(this, args);
+ }
- if ( defaults.methods[method] ) {
- return defaults.methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
- } else if ( typeof method === 'object' || ! method ) {
- return defaults.methods.init.apply( this, arguments );
- } else {
- $.error( 'Method ' + method + ' does not exist on jQuery.jqBootstrapValidation' );
- return null;
- }
+ $.fn.jqBootstrapValidation = function (method) {
- };
+ if (defaults.methods[method]) {
+ return defaults.methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else if (typeof method === 'object' || !method) {
+ return defaults.methods.init.apply(this, arguments);
+ } else {
+ $.error('Method ' + method + ' does not exist on jQuery.jqBootstrapValidation');
+ return null;
+ }
- $.jqBootstrapValidation = function (options) {
- $(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this,arguments);
- };
+ };
-})( jQuery );
+ $.jqBootstrapValidation = function (options) {
+ $(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this, arguments);
+ };
+
+})(jQuery);
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vim-validate.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vim-validate.js
index 0ffa6d3..e62cc10 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vim-validate.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vim-validate.js
@@ -27,33 +27,33 @@
rules: {
url: {
required: true,
- url:true,
- maxlength:50
+ url: true,
+ maxlength: 50
//,repeatedName: true
},
- vimName:{
+ vimName: {
required: true,
- maxlength:20
+ maxlength: 20
},
- version:{
+ version: {
required: true,
- maxlength:20
+ maxlength: 20
},
- vendor:{
+ vendor: {
required: true,
- maxlength:20
+ maxlength: 20
},
- userName:{
+ userName: {
required: true,
- maxlength:20
+ maxlength: 20
},
- password:{
+ password: {
required: true,
- maxlength:20
+ maxlength: 20
},
- tenant:{
+ tenant: {
required: true,
- maxlength:20
+ maxlength: 20
}
},
messages: {
@@ -62,22 +62,22 @@
required: $.i18n.prop('com_zte_ums_eco_roc_vim_auth_url_require_message'),
url: $.i18n.prop('com_zte_ums_eco_roc_vim_auth_url_alarm_message')
},
- vimName:{
+ vimName: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_name_alarm_message')
},
- userName:{
+ userName: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_username_alarm_message')
},
- password:{
+ password: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_password_alarm_message')
},
- version:{
+ version: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_version_alarm_message')
},
- vendor:{
+ vendor: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_vendor_alarm_message')
},
- tenant:{
+ tenant: {
required: $.i18n.prop('com_zte_ums_eco_roc_vim_tenant_alarm_message')
}
},
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js
index 284c143..0a2b097 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js
@@ -16,57 +16,56 @@
var vimChart = {};
-
- var labelTop = {
- normal : {
- label : {
- show : true,
- position : 'outer',
- formatter :function (params){
- var total=params.series.data[1].value+params.series.data[0].value;
- var util=params.series.data[0].util;
+var labelTop = {
+ normal: {
+ label: {
+ show: true,
+ position: 'outer',
+ formatter: function (params) {
+ var total = params.series.data[1].value + params.series.data[0].value;
+ var util = params.series.data[0].util;
// return total+util+"中的"+"\n"+params.value+util+"已使用" ;
- return $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_used')+params.value+util+"\n"+
- $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_total')+ total+util;
- },
+ return $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_used') + params.value + util + "\n" +
+ $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_total') + total + util;
+ },
textStyle: {
- baseline : 'bottom',
- fontWeight:'normal'
+ baseline: 'bottom',
+ fontWeight: 'normal'
}
},
- labelLine : {
- show : true
+ labelLine: {
+ show: true
}
}
};
var labelFromatter = {
- normal : {
- label : {
- formatter :function (params){
- return params.series.data[0].name+"\n"+(100-params.percent).toFixed(0) + '%'
- },
+ normal: {
+ label: {
+ formatter: function (params) {
+ return params.series.data[0].name + "\n" + (100 - params.percent).toFixed(0) + '%'
+ },
textStyle: {
- baseline : 'center',
- color:"#000",
- fontWeight:'bold'
+ baseline: 'center',
+ color: "#000",
+ fontWeight: 'bold'
-
+
}
}
}
}
var labelBottom = {
- normal : {
+ normal: {
color: '#ccc',
- label : {
- show : true,
- position : 'center'
+ label: {
+ show: true,
+ position: 'center'
},
- labelLine : {
- show : false
+ labelLine: {
+ show: false
}
},
emphasis: {
@@ -76,92 +75,107 @@
var radius = [40, 55];
- var vimPieChart;
+var vimPieChart;
-vimChart.vimPieChartInit = function(){
- vimPieChart = echarts.init(document.getElementById('vimPieChartDiv'));
- vimPieChart.showLoading({
- text : "Loading",
- effect :"whirling",
- textStyle : {
- fontSize : 20
- }
-});
+vimChart.vimPieChartInit = function () {
+ vimPieChart = echarts.init(document.getElementById('vimPieChartDiv'));
+ vimPieChart.showLoading({
+ text: "Loading",
+ effect: "whirling",
+ textStyle: {
+ fontSize: 20
+ }
+ });
}
-vimChart.vimPieChart = function(data){
-
-var option = {
- animation:true,
- legend: {
- x : 'left',
- y:"top",
- data:[
- $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_cpu'),
- $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_memory'),
- $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_disk')
- ],
- orient: 'vertical'
- },
- color:["#578ebe","#44b6ae","#DABA36"],
- title : {
- text: '',
- subtext: '',
- x: 'center'
- },
- toolbox: {
- show : true,
+vimChart.vimPieChart = function (data) {
- feature : {
- saveAsImage : {
- show : true,
- title : $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_save_picture'),
- type : 'png',
- lang : [$.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_click_save')]
+ var option = {
+ animation: true,
+ legend: {
+ x: 'left',
+ y: "top",
+ data: [
+ $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_cpu'),
+ $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_memory'),
+ $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_disk')
+ ],
+ orient: 'vertical'
+ },
+ color: ["#578ebe", "#44b6ae", "#DABA36"],
+ title: {
+ text: '',
+ subtext: '',
+ x: 'center'
+ },
+ toolbox: {
+ show: true,
+
+ feature: {
+ saveAsImage: {
+ show: true,
+ title: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_save_picture'),
+ type: 'png',
+ lang: [$.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_click_save')]
+ }
}
- }
- },
- series : [
- {
- type : 'pie',
- center : ['15%', '55%'],
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_cpu'), value:data.usage.cpu,itemStyle : labelTop,util:''},
- {name:'other', value:data.resource.cpu -data.usage.cpu, itemStyle : labelBottom}
-
- ]
},
- {
- type : 'pie',
- center : ['40%', '55%'],
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_memory'), value:data.usage.memoryMb,itemStyle : labelTop,util:'MB' },
- {name:'other', value:data.resource.memoryMb - data.usage.memoryMb,itemStyle : labelBottom}
-
- ]
- },
- {
- type : 'pie',
- center : ['65%', '55%'],
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_disk'), value:data.usage.diskGb,itemStyle : labelTop,util:'GB'},
- {name:'other', value:data.resource.diskGb -data.usage.diskGb, itemStyle : labelBottom}
-
- ]
- }
-
- ]
-};
-
+ series: [
+ {
+ type: 'pie',
+ center: ['15%', '55%'],
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_cpu'),
+ value: data.usage.cpu,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.resource.cpu - data.usage.cpu, itemStyle: labelBottom}
- // 为echarts对象加载数据
+ ]
+ },
+ {
+ type: 'pie',
+ center: ['40%', '55%'],
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_memory'),
+ value: data.usage.memoryMb,
+ itemStyle: labelTop,
+ util: 'MB'
+ },
+ {name: 'other', value: data.resource.memoryMb - data.usage.memoryMb, itemStyle: labelBottom}
+
+ ]
+ },
+ {
+ type: 'pie',
+ center: ['65%', '55%'],
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_vim_disk'),
+ value: data.usage.diskGb,
+ itemStyle: labelTop,
+ util: 'GB'
+ },
+ {name: 'other', value: data.resource.diskGb - data.usage.diskGb, itemStyle: labelBottom}
+
+ ]
+ }
+
+ ]
+ };
+
+
+ // 为echarts对象加载数据
vimPieChart.hideLoading();
vimPieChart.setOption(option);
window.onresize = vimPieChart.resize;
@@ -169,215 +183,249 @@
}
-vimChart.getPieCenter=function(n){
+vimChart.getPieCenter = function (n) {
var center;
- switch(n)
- {
- case 1:
- center=['15%', '30%'];
- break;
- case 2:
- center=['40%', '30%'];
- break;
- case 3:
- center=['65%', '30%'];
- break;
- case 4:
- center=['15%', '80%'];
- break;
- case 5:
- center=['40%', '80%'];
- break;
- case 6:
- center=['65%', '80%'];
- break;
- case 7:
- center=['90%', '80%'];
- break;
+ switch (n) {
+ case 1:
+ center = ['15%', '30%'];
+ break;
+ case 2:
+ center = ['40%', '30%'];
+ break;
+ case 3:
+ center = ['65%', '30%'];
+ break;
+ case 4:
+ center = ['15%', '80%'];
+ break;
+ case 5:
+ center = ['40%', '80%'];
+ break;
+ case 6:
+ center = ['65%', '80%'];
+ break;
+ case 7:
+ center = ['90%', '80%'];
+ break;
}
return center;
}
- var tenantPieChart;
-vimChart.tenantPieChartInit = function(){
- tenantPieChart= echarts.init(document.getElementById('tenantPieChartDiv'));
+var tenantPieChart;
+vimChart.tenantPieChartInit = function () {
+ tenantPieChart = echarts.init(document.getElementById('tenantPieChartDiv'));
- tenantPieChart.showLoading({
- text : "Loading",
- effect :"whirling",
- textStyle : {
- fontSize : 20
- }
-});
-}
-vimChart.tenantPieChart = function(data){
-
-var legend_data=new Array();
-var series=new Array();
-var n=0;
-
-if(data.quota.instances!=-1){
- n++;
-
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_instances'));
-var instances_series={
- type : 'pie',
- center : vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_instances'), value:data.usage.instances,itemStyle : labelTop,util:''},
- {name:'other', value:data.quota.instances -data.usage.instances, itemStyle : labelBottom}
-
- ]
- };
- series.push(instances_series);
-
-}
-if(data.quota.cpu!=-1){
-n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_cpu'));
-var cpu_series={
- type : 'pie',
- center : vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_cpu'), value:data.usage.cpu,itemStyle : labelTop,util:'' },
- {name:'other', value:data.quota.cpu -data.usage.cpu,itemStyle : labelBottom}
-
- ]
- };
- series.push(cpu_series);
-}
-if(data.quota.memoryMb!=-1){
- n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_memoryMb'));
-var memoryMb_series={
- type : 'pie',
- center : vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_memoryMb'), value:data.usage.memoryMb,itemStyle : labelTop,util:'MB'},
- {name:'other', value:data.quota.memoryMb -data.usage.memoryMb, itemStyle : labelBottom}
-
- ]
- };
- series.push(memoryMb_series);
-}
-if(data.quota.floatingIps!=-1){
- n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_floatingIps'));
-var floatingIps_series={
- type : 'pie',
- center :vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_floatingIps'), value:data.usage.floatingIps,itemStyle : labelTop,util:''},
- {name:'other', value:data.quota.floatingIps -data.usage.floatingIps, itemStyle : labelBottom}
-
- ]
- };
- series.push(floatingIps_series);
-}
-if(data.quota.securityGroups!=-1){
- n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_securityGroups'));
-var securityGroups_series={
- type : 'pie',
- center :vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_securityGroups'), value:data.usage.securityGroups,itemStyle : labelTop,util:''},
- {name:'other', value:data.quota.securityGroups -data.usage.securityGroups, itemStyle : labelBottom}
-
- ]
- };
- series.push(securityGroups_series);
-}
-if(data.quota.volumes!=-1){
- n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumes'));
-var volumes_series={
- type : 'pie',
- center :vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumes'), value:data.usage.volumes,itemStyle : labelTop,util:''},
- {name:'other', value:data.quota.volumes -data.usage.volumes, itemStyle : labelBottom}
-
- ]
- };
- series.push(volumes_series);
-}
-if(data.quota.volumeStorage!=-1){
- n++;
-legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumeStorage'));
-var volumeStorage_series={
- type : 'pie',
- center :vimChart.getPieCenter(n),
- radius : radius,
- itemStyle : labelFromatter,
- data : [
- {name:$.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumeStorage'), value:data.usage.volumeStorage,itemStyle : labelTop,util:'GB'},
- {name:'other', value:data.quota.volumeStorage -data.usage.volumeStorage, itemStyle : labelBottom}
-
- ]
- };
- series.push(volumeStorage_series);
-}
-
-
-var option = {
- animation:true,
- legend: {
- x : 'left',
- y:"top",
- data:legend_data,
- orient: 'vertical'
- },
- color:["#578ebe","#44b6ae","#DABA36","#F79695","#9699e0","#57b5e3","#48c79c"],
- title : {
- text: '',
- subtext: '',
- x: 'center'
- },
- toolbox: {
- show : true,
- feature : {
- saveAsImage : {
- show : true,
- title : $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_save_picture'),
- type : 'png',
- lang : [$.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_click_save')]
- }
+ tenantPieChart.showLoading({
+ text: "Loading",
+ effect: "whirling",
+ textStyle: {
+ fontSize: 20
}
- },
- series : series
-};
-
-
- // 为echarts对象加载数据
- tenantPieChart.hideLoading();
- tenantPieChart.setOption(option);
- window.onresize = tenantPieChart.resize;
+ });
+}
+vimChart.tenantPieChart = function (data) {
+
+ var legend_data = new Array();
+ var series = new Array();
+ var n = 0;
+
+ if (data.quota.instances != -1) {
+ n++;
+
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_instances'));
+ var instances_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_instances'),
+ value: data.usage.instances,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.quota.instances - data.usage.instances, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(instances_series);
+
+ }
+ if (data.quota.cpu != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_cpu'));
+ var cpu_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_cpu'),
+ value: data.usage.cpu,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.quota.cpu - data.usage.cpu, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(cpu_series);
+ }
+ if (data.quota.memoryMb != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_memoryMb'));
+ var memoryMb_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_memoryMb'),
+ value: data.usage.memoryMb,
+ itemStyle: labelTop,
+ util: 'MB'
+ },
+ {name: 'other', value: data.quota.memoryMb - data.usage.memoryMb, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(memoryMb_series);
+ }
+ if (data.quota.floatingIps != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_floatingIps'));
+ var floatingIps_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_floatingIps'),
+ value: data.usage.floatingIps,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.quota.floatingIps - data.usage.floatingIps, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(floatingIps_series);
+ }
+ if (data.quota.securityGroups != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_securityGroups'));
+ var securityGroups_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_securityGroups'),
+ value: data.usage.securityGroups,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.quota.securityGroups - data.usage.securityGroups, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(securityGroups_series);
+ }
+ if (data.quota.volumes != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumes'));
+ var volumes_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumes'),
+ value: data.usage.volumes,
+ itemStyle: labelTop,
+ util: ''
+ },
+ {name: 'other', value: data.quota.volumes - data.usage.volumes, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(volumes_series);
+ }
+ if (data.quota.volumeStorage != -1) {
+ n++;
+ legend_data.push($.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumeStorage'));
+ var volumeStorage_series = {
+ type: 'pie',
+ center: vimChart.getPieCenter(n),
+ radius: radius,
+ itemStyle: labelFromatter,
+ data: [
+ {
+ name: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_tenant_volumeStorage'),
+ value: data.usage.volumeStorage,
+ itemStyle: labelTop,
+ util: 'GB'
+ },
+ {name: 'other', value: data.quota.volumeStorage - data.usage.volumeStorage, itemStyle: labelBottom}
+
+ ]
+ };
+ series.push(volumeStorage_series);
+ }
+
+
+ var option = {
+ animation: true,
+ legend: {
+ x: 'left',
+ y: "top",
+ data: legend_data,
+ orient: 'vertical'
+ },
+ color: ["#578ebe", "#44b6ae", "#DABA36", "#F79695", "#9699e0", "#57b5e3", "#48c79c"],
+ title: {
+ text: '',
+ subtext: '',
+ x: 'center'
+ },
+ toolbox: {
+ show: true,
+ feature: {
+ saveAsImage: {
+ show: true,
+ title: $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_save_picture'),
+ type: 'png',
+ lang: [$.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_click_save')]
+ }
+ }
+ },
+ series: series
+ };
+
+
+ // 为echarts对象加载数据
+ tenantPieChart.hideLoading();
+ tenantPieChart.setOption(option);
+ window.onresize = tenantPieChart.resize;
}
-vimChart.growl=function(message,type){
- $.growl({
+vimChart.growl = function (message, type) {
+ $.growl({
icon: "fa fa-envelope-o fa-lg",
title: " " + $.i18n.prop('com_zte_ums_eco_roc_vim_title_notice'),
- message: message+" "
- },{
- type: type,
- delay:0
- });
+ message: message + " "
+ }, {
+ type: type,
+ delay: 0
+ });
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js
index 417815d..17f8e05 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js
@@ -14,149 +14,147 @@
* limitations under the License.
*/
var vm = avalon
- .define({
- $id : "vimChartController",
- $vimChartUrl : '../../api/vim/v1/{vim_id}/resource',
- $tenantChartUrl : '../../api/vim/v1/{vim_id}/resource/{tenant_name}',
- $tenantListUrl : '../../api/vim/v1/{vim_id}/tenants',
- $tenantRoleUrl : '../../api/vim/v1/{vim_id}/roles',
- vimInfo:{
- name:name,
- id:id,
- tenant:tenant,
- isAdmin:true
- },
- tenantSelectList: {
- condName : $.i18n.prop("com_zte_ums_eco_roc_vim_type"),
- component_type : 'select',
- selectItems : []
- },
- initChart : function() {
+ .define({
+ $id: "vimChartController",
+ $vimChartUrl: '../../api/vim/v1/{vim_id}/resource',
+ $tenantChartUrl: '../../api/vim/v1/{vim_id}/resource/{tenant_name}',
+ $tenantListUrl: '../../api/vim/v1/{vim_id}/tenants',
+ $tenantRoleUrl: '../../api/vim/v1/{vim_id}/roles',
+ vimInfo: {
+ name: name,
+ id: id,
+ tenant: tenant,
+ isAdmin: true
+ },
+ tenantSelectList: {
+ condName: $.i18n.prop("com_zte_ums_eco_roc_vim_type"),
+ component_type: 'select',
+ selectItems: []
+ },
+ initChart: function () {
- //判断租户是否有admin权限
- var tenantRoleUrl=vm.$tenantRoleUrl.replace("{vim_id}",vm.vimInfo.id);
- $.ajax({
- "type": 'get',
- "url": tenantRoleUrl,
- "dataType": "json",
- success: function (resp) {
- vm.vimInfo.isAdmin= (resp==null)?false:resp.isAdminRole;
-
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vimChart.growl("get [tenant Role] is error :"+textStatus+":"+errorThrown,"danger");
- },
- complete: function() {
- if(vm.vimInfo.isAdmin==true){
+ //判断租户是否有admin权限
+ var tenantRoleUrl = vm.$tenantRoleUrl.replace("{vim_id}", vm.vimInfo.id);
+ $.ajax({
+ "type": 'get',
+ "url": tenantRoleUrl,
+ "dataType": "json",
+ success: function (resp) {
+ vm.vimInfo.isAdmin = (resp == null) ? false : resp.isAdminRole;
- //获取全部资源使用情况
- vm.vimChartLoad();
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vimChart.growl("get [tenant Role] is error :" + textStatus + ":" + errorThrown, "danger");
+ },
+ complete: function () {
+ if (vm.vimInfo.isAdmin == true) {
- //获取租户列表
- vm.vimListLoad();
- }
+ //获取全部资源使用情况
+ vm.vimChartLoad();
- }
- });
- //获取租户资源使用情况
- vm.tenantChartLoad();
- },
- gotoVimPage:function(){
- window.parent.ZteFrameWork.goToURLByIDAndNewAction('eco_roc_vimmgr');
- },
- vimListLoad:function(){
- var tenantListUrl=vm.$tenantListUrl.replace("{vim_id}",vm.vimInfo.id);
- $.ajax({
- "type": 'get',
- "url": tenantListUrl,
- "dataType": "json",
- success: function (resp) {
- vm.tenantSelectList.selectItems= (resp==null)?[]:resp;
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vimChart.growl("get [tenant List] is error :"+textStatus+":"+errorThrown,"danger");
- }
- });
- },
- vimChartLoad:function(){
- var viminitData={
- "resource": {
- "cpu": 0,
- "memoryMb": 503,
- "diskGb": 9.8
- },
- "usage": {
- "cpu": 0,
- "memoryMb": 0,
- "diskGb": 0
- }
- }
+ //获取租户列表
+ vm.vimListLoad();
+ }
- vimChart.vimPieChartInit();
+ }
+ });
+ //获取租户资源使用情况
+ vm.tenantChartLoad();
+ },
+ gotoVimPage: function () {
+ window.parent.ZteFrameWork.goToURLByIDAndNewAction('eco_roc_vimmgr');
+ },
+ vimListLoad: function () {
+ var tenantListUrl = vm.$tenantListUrl.replace("{vim_id}", vm.vimInfo.id);
+ $.ajax({
+ "type": 'get',
+ "url": tenantListUrl,
+ "dataType": "json",
+ success: function (resp) {
+ vm.tenantSelectList.selectItems = (resp == null) ? [] : resp;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vimChart.growl("get [tenant List] is error :" + textStatus + ":" + errorThrown, "danger");
+ }
+ });
+ },
+ vimChartLoad: function () {
+ var viminitData = {
+ "resource": {
+ "cpu": 0,
+ "memoryMb": 503,
+ "diskGb": 9.8
+ },
+ "usage": {
+ "cpu": 0,
+ "memoryMb": 0,
+ "diskGb": 0
+ }
+ }
- var vimChartUrl=vm.$vimChartUrl.replace("{vim_id}",vm.vimInfo.id);
-
+ vimChart.vimPieChartInit();
-
- $.ajax({
- "type": 'get',
- "url": vimChartUrl,
- "dataType": "json",
- success: function (resp) {
- var vimData= (resp==null)?viminitData:resp;
- vimChart.vimPieChart(vimData);
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vimChart.growl("get [virtual machine manager resource using status] is error :"+textStatus+":"+errorThrown,"danger");
- }
- });
-
- },
- tenantChartLoad:function(){
- var tenantChartUrl=vm.$tenantChartUrl.replace("{vim_id}",vm.vimInfo.id).replace("{tenant_name}",vm.vimInfo.tenant);
+ var vimChartUrl = vm.$vimChartUrl.replace("{vim_id}", vm.vimInfo.id);
- var tenantinitData={
- "tenant_name": "",
- "errormsg":"",
- "quota": {
- "cpu": 0,
- "memoryMb": 0,
- "instances": 0,
- "floatingIps": 0,
- "securityGroups": 0,
- "volumeStorage": 0,
- "volumes": 0
- },
- "usage": {
- "cpu": 0,
- "memoryMb": 0,
- "instances": 0,
- "floatingIps": 0,
- "securityGroups": 0,
- "volumeStorage": 0,
- "volumes": 0
- }
- };
- vimChart.tenantPieChartInit();
- $.ajax({
- "type": 'get',
- "url": tenantChartUrl,
- "dataType": "json",
- success: function (resp) {
- var tenantData= (resp==null)?tenantinitData:resp;
- if(tenantData.errormsg!=null)
- {
- vimChart.growl(tenantData.errormsg,"danger");
- }
- vimChart.tenantPieChart(tenantData);
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vimChart.growl("get [tenant quota using status] occur error :"+textStatus+":"+errorThrown,"danger");
- }
- });
- }
+ $.ajax({
+ "type": 'get',
+ "url": vimChartUrl,
+ "dataType": "json",
+ success: function (resp) {
+ var vimData = (resp == null) ? viminitData : resp;
+ vimChart.vimPieChart(vimData);
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vimChart.growl("get [virtual machine manager resource using status] is error :" + textStatus + ":" + errorThrown, "danger");
+ }
+ });
-});
+ },
+ tenantChartLoad: function () {
+ var tenantChartUrl = vm.$tenantChartUrl.replace("{vim_id}", vm.vimInfo.id).replace("{tenant_name}", vm.vimInfo.tenant);
+
+ var tenantinitData = {
+ "tenant_name": "",
+ "errormsg": "",
+ "quota": {
+ "cpu": 0,
+ "memoryMb": 0,
+ "instances": 0,
+ "floatingIps": 0,
+ "securityGroups": 0,
+ "volumeStorage": 0,
+ "volumes": 0
+ },
+ "usage": {
+ "cpu": 0,
+ "memoryMb": 0,
+ "instances": 0,
+ "floatingIps": 0,
+ "securityGroups": 0,
+ "volumeStorage": 0,
+ "volumes": 0
+ }
+ };
+ vimChart.tenantPieChartInit();
+ $.ajax({
+ "type": 'get',
+ "url": tenantChartUrl,
+ "dataType": "json",
+ success: function (resp) {
+ var tenantData = (resp == null) ? tenantinitData : resp;
+ if (tenantData.errormsg != null) {
+ vimChart.growl(tenantData.errormsg, "danger");
+ }
+ vimChart.tenantPieChart(tenantData);
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vimChart.growl("get [tenant quota using status] occur error :" + textStatus + ":" + errorThrown, "danger");
+ }
+ });
+
+ }
+
+ });
avalon.scan();
vm.initChart();
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js
index e854a61..967eb1c 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js
@@ -14,92 +14,91 @@
* limitations under the License.
*/
var vm = avalon
- .define({
- $id : "vimController",
- vimInfo : [],
- //vimStatusTime:$.i18n.prop('com_zte_ums_eco_roc_vim_getting_info'),
- // ifSearch : 0,
- // server_rtn:{
- // info_block:false,
- // warning_block:false,
- // rtn_info:"",
- // $RTN_SUCCESS:"RTN_SUCCESS",
- // $RTN_FAILED:"RTN_FAILED",
- // wait : $.i18n.prop('com_zte_ums_eco_roc_vim_checking_status')
- // },
- executeWait : {clazz : 'alert-info', visible : true, text : $.i18n.prop('com_zte_ums_eco_roc_vim_checking_status')},
- executeError : {clazz : 'alert-danger', visible : true, text : 'error'},
- $Status :{
- success:"active",
- failed:"inactive",
- displayActive: $.i18n.prop('com_zte_ums_eco_roc_vim_normal'),
- displayInactive: $.i18n.prop('com_zte_ums_eco_roc_vim_abnormal')
- },
- isSave : true,
- action : {ADD : 'add', UPDATE : 'update'},
- $queryVimInfoUrl : '../../openoapi/extsys/v1/vims',
- $addVimInfoUrl : '../../openoapi/extsys/v1/vims/',
- $updateVimInfoUrl : '../../openoapi/extsys/v1/vims/',
- $delVimInfoUrl : '../../openoapi/extsys/v1/vims/{vim_id}',
- $initTable : function() {
- $.ajax({
- "type": 'get',
- "url": vm.$queryVimInfoUrl,
- //"dataType": "json",
- "success": function (resp,statusText,jqXHR) {
- if(jqXHR.status=="200")
- {
- vm.vimInfo = resp;
- }
- else{
- vm.vimInfo=[];
+ .define({
+ $id: "vimController",
+ vimInfo: [],
+ //vimStatusTime:$.i18n.prop('com_zte_ums_eco_roc_vim_getting_info'),
+ // ifSearch : 0,
+ // server_rtn:{
+ // info_block:false,
+ // warning_block:false,
+ // rtn_info:"",
+ // $RTN_SUCCESS:"RTN_SUCCESS",
+ // $RTN_FAILED:"RTN_FAILED",
+ // wait : $.i18n.prop('com_zte_ums_eco_roc_vim_checking_status')
+ // },
+ executeWait: {clazz: 'alert-info', visible: true, text: $.i18n.prop('com_zte_ums_eco_roc_vim_checking_status')},
+ executeError: {clazz: 'alert-danger', visible: true, text: 'error'},
+ $Status: {
+ success: "active",
+ failed: "inactive",
+ displayActive: $.i18n.prop('com_zte_ums_eco_roc_vim_normal'),
+ displayInactive: $.i18n.prop('com_zte_ums_eco_roc_vim_abnormal')
+ },
+ isSave: true,
+ action: {ADD: 'add', UPDATE: 'update'},
+ $queryVimInfoUrl: '../../openoapi/extsys/v1/vims',
+ $addVimInfoUrl: '../../openoapi/extsys/v1/vims/',
+ $updateVimInfoUrl: '../../openoapi/extsys/v1/vims/',
+ $delVimInfoUrl: '../../openoapi/extsys/v1/vims/{vim_id}',
+ $initTable: function () {
+ $.ajax({
+ "type": 'get',
+ "url": vm.$queryVimInfoUrl,
+ //"dataType": "json",
+ "success": function (resp, statusText, jqXHR) {
+ if (jqXHR.status == "200") {
+ vm.vimInfo = resp;
+ }
+ else {
+ vm.vimInfo = [];
bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_failed"));
return;
- }
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_failed") + textStatus+":"+errorThrown);
- return;
- },
- complete: function() {
- resUtil.tooltipVimStatus();
- }
- });
-
- },
- $vimType: {
- condName : $.i18n.prop("com_zte_ums_eco_roc_vim_type"),
- component_type : 'select',
- selectItems : [
- {
- cond_value : 'vmware',
- name : "vmware",
- value : true
- },
- {
- cond_value : 'openstack',
- name :"openstack",
- value : true
- }
- ]
- },
- addVim : {
- titleName: $.i18n.prop("com_zte_ums_eco_roc_vim_register_info"),
- vimId : "",
- vimName : "",
- domain : '',
- userName : "",
- tenant : "",
- password : "",
- url : "",
- saveType :"add",
- description : "",
- vimType :"openstack",
- vendor :""
- },
- $showVimTable : function(el, action) {
+ }
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_failed") + textStatus + ":" + errorThrown);
+ return;
+ },
+ complete: function () {
+ resUtil.tooltipVimStatus();
+ }
+ });
+
+ },
+ $vimType: {
+ condName: $.i18n.prop("com_zte_ums_eco_roc_vim_type"),
+ component_type: 'select',
+ selectItems: [
+ {
+ cond_value: 'vmware',
+ name: "vmware",
+ value: true
+ },
+ {
+ cond_value: 'openstack',
+ name: "openstack",
+ value: true
+ }
+ ]
+ },
+ addVim: {
+ titleName: $.i18n.prop("com_zte_ums_eco_roc_vim_register_info"),
+ vimId: "",
+ vimName: "",
+ domain: '',
+ userName: "",
+ tenant: "",
+ password: "",
+ url: "",
+ saveType: "add",
+ description: "",
+ vimType: "openstack",
+ vendor: ""
+ },
+ $showVimTable: function (el, action) {
vm.isSave = false;
- if(vm.action.ADD == action){
+ if (vm.action.ADD == action) {
vm.addVim.vimId = "";
vm.addVim.vimName = "";
vm.addVim.userName = "";
@@ -127,17 +126,17 @@
vm.addVim.vimType = el.type;
vm.addVim.vendor = el.vendor;
}
- vm.executeError.visible=false;
- vm.executeWait.visible=false;
+ vm.executeError.visible = false;
+ vm.executeWait.visible = false;
$(".form-group").each(function () {
$(this).removeClass('has-success');
$(this).removeClass('has-error');
$(this).find(".help-block[id]").remove();
});
$("#addVimDlg").modal("show");
- },
+ },
- $saveVimTable : function() {
+ $saveVimTable: function () {
vm.isSave = true;
success.hide();
error.hide();
@@ -147,153 +146,151 @@
}
vm.executeWait.visible = true;
vm.executeError.visible = false;
- if(vm.addVim.saveType=="add") {
+ if (vm.addVim.saveType == "add") {
//不能重复添加
- /*
- for( var i = 0; i < vm.vimInfo.length; i ++ ){
- if(vm.addVim.url == vm.vimInfo[i].url){
- resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + 'already exists',"info");
- $('#addVimDlg').modal('hide');
- return;
- }
- }
- */
+ /*
+ for( var i = 0; i < vm.vimInfo.length; i ++ ){
+ if(vm.addVim.url == vm.vimInfo[i].url){
+ resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + 'already exists',"info");
+ $('#addVimDlg').modal('hide');
+ return;
+ }
+ }
+ */
vm.persistVim();
- } else if( vm.addVim.saveType == "update" ){
+ } else if (vm.addVim.saveType == "update") {
vm.updateVim();
}
},
//新增vim
- persistVim : function(){
+ persistVim: function () {
$.ajax({
- type : "Post",
- url : vm.$addVimInfoUrl,
- data : JSON.stringify({
- name : vm.addVim.vimName,
- url : vm.addVim.url,
- userName : vm.addVim.userName,
- password : vm.addVim.password,
- tenant : vm.addVim.tenant,
- domain : vm.addVim.domain,
- vendor : vm.addVim.vendor,
- version : vm.addVim.version,
- description: vm.addVim.description,
- type : vm.addVim.vimType,
+ type: "Post",
+ url: vm.$addVimInfoUrl,
+ data: JSON.stringify({
+ name: vm.addVim.vimName,
+ url: vm.addVim.url,
+ userName: vm.addVim.userName,
+ password: vm.addVim.password,
+ tenant: vm.addVim.tenant,
+ domain: vm.addVim.domain,
+ vendor: vm.addVim.vendor,
+ version: vm.addVim.version,
+ description: vm.addVim.description,
+ type: vm.addVim.vimType,
}),
- async : false,
- dataType : "json",
- contentType : 'application/json',
- success : function(data,statusText,jqXHR) {
- vm.executeWait.visible=false;
- vm.executeError.visible=false;
- if ( jqXHR.status=="201" ) {
- vm.addVim.vimId = data.vimId;
+ async: false,
+ dataType: "json",
+ contentType: 'application/json',
+ success: function (data, statusText, jqXHR) {
+ vm.executeWait.visible = false;
+ vm.executeError.visible = false;
+ if (jqXHR.status == "201") {
+ vm.addVim.vimId = data.vimId;
vm.addVim.name = data.name;
vm.addVim.tenant = data.tenant;
vm.addVim.type = data.type;
- var newVim=jQuery.extend({}, vm.addVim);
+ var newVim = jQuery.extend({}, vm.addVim);
vm.vimInfo.push(newVim);
$('#addVimDlg').modal('hide');
- resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + $.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_save_success"),"success");
- } else{
- vm.executeError.visible=true;
- vm.executeError.text = $.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_save_failed");
+ resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + $.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_save_success"), "success");
+ } else {
+ vm.executeError.visible = true;
+ vm.executeError.text = $.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_save_failed");
}
},
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vm.executeError.visible = true;
- vm.executeError.text = textStatus+":"+errorThrown;
- vm.executeWait.visible = false;
- vm.isSave = false;
- }
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vm.executeError.visible = true;
+ vm.executeError.text = textStatus + ":" + errorThrown;
+ vm.executeWait.visible = false;
+ vm.isSave = false;
+ }
});
},
//更新vim
- updateVim : function(){
+ updateVim: function () {
$.ajax({
- type : "Put",
- url : vm.$updateVimInfoUrl+vm.addVim.vimId,
- contentType : 'application/json',
- data : JSON.stringify({
- name : vm.addVim.vimName,
- userName : vm.addVim.userName,
- password : vm.addVim.password,
- domain : vm.addVim.domain,
- version : vm.addVim.version,
- description : vm.addVim.description,
- url : vm.addVim.url,
- tenant:vm.addVim.tenant,
- type : vm.addVim.vimType,
- vendor : vm.addVim.vendor,
+ type: "Put",
+ url: vm.$updateVimInfoUrl + vm.addVim.vimId,
+ contentType: 'application/json',
+ data: JSON.stringify({
+ name: vm.addVim.vimName,
+ userName: vm.addVim.userName,
+ password: vm.addVim.password,
+ domain: vm.addVim.domain,
+ version: vm.addVim.version,
+ description: vm.addVim.description,
+ url: vm.addVim.url,
+ tenant: vm.addVim.tenant,
+ type: vm.addVim.vimType,
+ vendor: vm.addVim.vendor,
}),
- dataType : "json",
- async : false,
- success : function(data,statusText,jqXHR) {
- vm.executeWait.visible=false;
- vm.executeError.visible=false;
- if (jqXHR.status=="200") {
- for(var i=0;i<vm.vimInfo.length;i++){
- if(vm.vimInfo[i].vimId == vm.addVim.vimId)
- {
+ dataType: "json",
+ async: false,
+ success: function (data, statusText, jqXHR) {
+ vm.executeWait.visible = false;
+ vm.executeError.visible = false;
+ if (jqXHR.status == "200") {
+ for (var i = 0; i < vm.vimInfo.length; i++) {
+ if (vm.vimInfo[i].vimId == vm.addVim.vimId) {
vm.vimInfo[i].name = vm.addVim.vimName;
vm.vimInfo[i].userName = vm.addVim.userName;
vm.vimInfo[i].password = vm.addVim.password;
vm.vimInfo[i].url = vm.addVim.url;
vm.vimInfo[i].tenant = vm.addVim.tenant;
vm.vimInfo[i].domain = vm.addVim.domain;
- vm.vimInfo[i].description = vm.addVim.description;
- vm.vimInfo[i].type=vm.addVim.vimType;
+ vm.vimInfo[i].description = vm.addVim.description;
+ vm.vimInfo[i].type = vm.addVim.vimType;
}
- }
+ }
$('#addVimDlg').modal('hide');
- resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_save_success'),"success");
+ resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_save_success'), "success");
}
- else{
+ else {
vm.executeError.visible = true;
vm.executeError.text = $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_save_failed');
}
},
- error: function(XMLHttpRequest, textStatus, errorThrown) {
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
vm.isSave = false;
- vm.executeError.visible=true;
- vm.executeError.text = textStatus+":"+errorThrown;
+ vm.executeError.visible = true;
+ vm.executeError.text = textStatus + ":" + errorThrown;
vm.executeWait.visible = false;
- }
+ }
});
},
- delVim : function(el){
- bootbox.confirm($.i18n.prop('com_zte_ums_eco_roc_vim_confirm_delete_vim_record'),function(result){
- if(result){
+ delVim: function (el) {
+ bootbox.confirm($.i18n.prop('com_zte_ums_eco_roc_vim_confirm_delete_vim_record'), function (result) {
+ if (result) {
$.ajax({
- type : "DELETE",
- url : vm.$delVimInfoUrl.replace('{vim_id}', el.vimId),
- success : function(data,statusText,jqXHR) {
- if( jqXHR.status=="204")
- {
- for(var i=0;i<vm.vimInfo.length;i++){
- if(el.vimId == vm.vimInfo[i].vimId){
+ type: "DELETE",
+ url: vm.$delVimInfoUrl.replace('{vim_id}', el.vimId),
+ success: function (data, statusText, jqXHR) {
+ if (jqXHR.status == "204") {
+ for (var i = 0; i < vm.vimInfo.length; i++) {
+ if (el.vimId == vm.vimInfo[i].vimId) {
vm.vimInfo.splice(i, 1);
break;
}
}
- resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_remove_success'),"success");
+ resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_remove_success'), "success");
}
- else{
- resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_remove_failed'),"warning");
+ else {
+ resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_remove_failed'), "warning");
}
},
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + errorThrown, "danger");
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + errorThrown, "danger");
}
});
}
});
},
- gotoChartPage:function(oid,name,tenant){
- window.location.href = "vimChart.html?"+oid+"&"+name+"&"+tenant;
+ gotoChartPage: function (oid, name, tenant) {
+ window.location.href = "vimChart.html?" + oid + "&" + name + "&" + tenant;
}
-});
+ });
avalon.scan();
vm.$initTable();
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimUtil.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimUtil.js
index 103482f..5def310 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimUtil.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimUtil.js
@@ -15,31 +15,31 @@
*/
var resUtil = {};
-resUtil.tooltipVimStatus=function(){
- $("[data-toggle='tooltip']").tooltip();
+resUtil.tooltipVimStatus = function () {
+ $("[data-toggle='tooltip']").tooltip();
}
-resUtil.growl=function(message,type){
+resUtil.growl = function (message, type) {
$.growl({
icon: "fa fa-envelope-o fa-lg",
title: " Notice: ",
- message: message+" "
- },{
+ message: message + " "
+ }, {
type: type
});
/*
- $.bootstrapGrowl(message, {
- ele: 'body', // which element to append to
- type: type, // (null, 'info', 'danger', 'success')
- offset: {from: 'bottom', amount: 20}, // 'top', or 'bottom'
- align: 'right', // ('left', 'right', or 'center')
- width: 'auto', // (integer, or 'auto')
- delay: 3000, // Time while the message will be displayed. It's not equivalent to the *demo* timeOut!
- allow_dismiss: false, // If true then will display a cross to close the popup.
- stackup_spacing: 10 // spacing between consecutively stacked growls.
- });
- */
+ $.bootstrapGrowl(message, {
+ ele: 'body', // which element to append to
+ type: type, // (null, 'info', 'danger', 'success')
+ offset: {from: 'bottom', amount: 20}, // 'top', or 'bottom'
+ align: 'right', // ('left', 'right', or 'center')
+ width: 'auto', // (integer, or 'auto')
+ delay: 3000, // Time while the message will be displayed. It's not equivalent to the *demo* timeOut!
+ allow_dismiss: false, // If true then will display a cross to close the popup.
+ stackup_spacing: 10 // spacing between consecutively stacked growls.
+ });
+ */
}
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimChart.html b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimChart.html
index e94066f..c39cc40 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimChart.html
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimChart.html
@@ -18,82 +18,87 @@
-->
<html>
<head lang="en">
-<meta charset="UTF-8">
-<title></title>
-<link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
-<link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
-<link href="../../common/css/ngict-component.css" rel="stylesheet" type="text/css">
-<link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css">
-<link href="../../common/thirdparty/animate/animate.min.css" rel="stylesheet" type="text/css" />
-<link href="css/vimChart.css" rel="stylesheet" type="text/css"/>
-<style>
-.ms-controller {
- visibility: hidden
-}
-</style>
-<script>
-var id,name,tenant;
- if (window.location.search && window.location.search.length > 1) {
- var arr=window.location.search.split("&");
- id = arr[0].replace("?","");
- name = arr[1];
- tenant = arr[2];
- }
-</script>
+ <meta charset="UTF-8">
+ <title></title>
+ <link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
+ <link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
+ <link href="../../common/css/ngict-component.css" rel="stylesheet" type="text/css">
+ <link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css">
+ <link href="../../common/thirdparty/animate/animate.min.css" rel="stylesheet" type="text/css"/>
+ <link href="css/vimChart.css" rel="stylesheet" type="text/css"/>
+ <style>
+ .ms-controller {
+ visibility: hidden
+ }
+ </style>
+ <script>
+ var id, name, tenant;
+ if (window.location.search && window.location.search.length > 1) {
+ var arr = window.location.search.split("&");
+ id = arr[0].replace("?", "");
+ name = arr[1];
+ tenant = arr[2];
+ }
+ </script>
</head>
<body>
<div class="ms-controller" ms-controller="vimChartController">
- <div class="container-fluid">
+ <div class="container-fluid">
- <div class="row" style=" margin-top: 15px;">
- <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 titlefont">
- {{vimInfo.name}}<span id_i18n="com_zte_ums_eco_roc_vim_resource_use" name_i18n="com_zte_conductor_ui_i18n"></span>
- </div>
- <div class="pull-right">
- <a href="#" ms-click="gotoVimPage()" id_i18n="com_zte_ums_eco_roc_vim_resource_chart_return" name_i18n="com_zte_conductor_ui_i18n"></a>
+ <div class="row" style=" margin-top: 15px;">
+ <div class="col-xs-6 col-md-6 col-sm-6 col-lg-6 titlefont">
+ {{vimInfo.name}}<span id_i18n="com_zte_ums_eco_roc_vim_resource_use"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ </div>
+ <div class="pull-right">
+ <a href="#" ms-click="gotoVimPage()" id_i18n="com_zte_ums_eco_roc_vim_resource_chart_return"
+ name_i18n="com_zte_conductor_ui_i18n"></a>
- </div>
- </div>
- <div class="separator-line"></div>
+ </div>
+ </div>
+ <div class="separator-line"></div>
- <div class="row row-fluid">
+ <div class="row row-fluid">
- <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 " ms-if="vimInfo.isAdmin==true" >
+ <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 " ms-if="vimInfo.isAdmin==true">
- <div class="form-body">
- <div class="form-title">
- <span id_i18n="com_zte_ums_eco_roc_vim_resource_vim_use" name_i18n="com_zte_conductor_ui_i18n"></span>
- </div>
- <div id="vimPieChartDiv" style="width:100%;height:200px" class="main"></div>
-
- </div>
- </div>
+ <div class="form-body">
+ <div class="form-title">
+ <span id_i18n="com_zte_ums_eco_roc_vim_resource_vim_use"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ </div>
+ <div id="vimPieChartDiv" style="width:100%;height:200px" class="main"></div>
-
+ </div>
+ </div>
- <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 " >
- <div class="form-body">
- <div class="form-title">
- {{vimInfo.tenant}}<span id_i18n="com_zte_ums_eco_roc_vim_resource_tenant_use" name_i18n="com_zte_conductor_ui_i18n"></span>
- <div class="pull-right">
- <select class="form-control m-b" ms-if="vimInfo.isAdmin==true" ms-each="tenantSelectList.selectItems" ms-duplex="vimInfo.tenant" ms-change="tenantChartLoad()">
- <option ms-attr-value='el.name'>{{el.name}}</option>
- </select>
-
- </div>
- </div>
-
- <div id="tenantPieChartDiv" style="width:100%;height:400px" class="main"></div>
-
- </div>
-
- </div>
+ <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
+ <div class="form-body">
+ <div class="form-title">
+ {{vimInfo.tenant}}<span id_i18n="com_zte_ums_eco_roc_vim_resource_tenant_use"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <div class="pull-right">
+ <select class="form-control m-b" ms-if="vimInfo.isAdmin==true"
+ ms-each="tenantSelectList.selectItems" ms-duplex="vimInfo.tenant"
+ ms-change="tenantChartLoad()">
+ <option ms-attr-value='el.name'>{{el.name}}</option>
+ </select>
+
+
+ </div>
+ </div>
+
+ <div id="tenantPieChartDiv" style="width:100%;height:400px" class="main"></div>
+
+ </div>
+
+ </div>
+
+ </div>
</div>
- </div>
-
</div>
@@ -102,12 +107,12 @@
<script type="text/javascript" src="../../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
<script type="text/javascript" src="../../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
<script src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
-<script type="text/javascript" src="./i18n/loadi18nApp.js"></script>
+<script type="text/javascript" src="./i18n/loadi18nApp.js"></script>
<script src="../../common/thirdparty/echarts/echarts-all.js"></script>
<script type="text/javascript" src="../../common/thirdparty/bootbox/bootbox.min.js"></script>
<script src="../../common/thirdparty/avalon/avalon.js"></script>
<script type="text/javascript" src="js/vimChart.js"></script>
<script type="text/javascript" src="js/vimChartController.js"></script>
-<script type="text/javascript" src="../../common/js/core/hk.min.js" ></script>
+<script type="text/javascript" src="../../common/js/core/hk.min.js"></script>
</body>
</html>
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html
index 858d6d5..5198724 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html
@@ -18,208 +18,233 @@
-->
<html>
<head lang="en">
-<meta charset="UTF-8">
-<title></title>
-<link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
-<link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
-<link href="../../common/thirdparty/uniform/css/uniform.default.css" rel="stylesheet"/>
-<link href="../../common/css/ngict-component.css" rel="stylesheet" type="text/css">
-<link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css">
-<link href="css/vim.css" rel="stylesheet" type="text/css"/>
-<link href="css/skill.css" rel="stylesheet" type="text/css"/>
-<link href="../../common/thirdparty/animate/animate.min.css" rel="stylesheet" type="text/css"/>
+ <meta charset="UTF-8">
+ <title></title>
+ <link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
+ <link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
+ <link href="../../common/thirdparty/uniform/css/uniform.default.css" rel="stylesheet"/>
+ <link href="../../common/css/ngict-component.css" rel="stylesheet" type="text/css">
+ <link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css">
+ <link href="css/vim.css" rel="stylesheet" type="text/css"/>
+ <link href="css/skill.css" rel="stylesheet" type="text/css"/>
+ <link href="../../common/thirdparty/animate/animate.min.css" rel="stylesheet" type="text/css"/>
-<style>
-.ms-controller {
- visibility: hidden
-}
-</style>
+ <style>
+ .ms-controller {
+ visibility: hidden
+ }
+ </style>
</head>
<body>
<div class="ms-controller container-fluid" ms-controller="vimController">
-<div id="addVimDlg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
- <div class="modal-dialog">
- <div class="modal-content Changepasswd">
- <div class="content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 id="myModalLabel" ms-text="addVim.titleName"></h4>
- </div>
+ <div id="addVimDlg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
+ aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content Changepasswd">
+ <div class="content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 id="myModalLabel" ms-text="addVim.titleName"></h4>
+ </div>
<!-- modal body begin-->
- <div class="modal-body">
- <div class="alert alert-info" ms-visible="executeWait.visible">{{executeWait.text}}</div>
- <div class="alert alert-danger " ms-visible="executeError.visible">{{executeError.text}}</div>
+ <div class="modal-body">
+ <div class="alert alert-info" ms-visible="executeWait.visible">{{executeWait.text}}</div>
+ <div class="alert alert-danger " ms-visible="executeError.visible">{{executeError.text}}</div>
- <form class="form-horizontal" id="vim_form" role="form">
- <input type="hidden" ms-duplex="addVim.vimId" name="vimId" class="form-control"/>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_name" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.vimName" name="vimName" class="form-control"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_auth_url" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.url" placeholder="http://xx.xx.xx.xx:5000/v2.0" name="url" class="form-control"/>
- <span class="help-block"></span>
- </div>
-
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_username" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.userName" name="userName" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
+ <form class="form-horizontal" id="vim_form" role="form">
+ <input type="hidden" ms-duplex="addVim.vimId" name="vimId" class="form-control"/>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_name"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.vimName" name="vimName" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_auth_url"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.url" placeholder="http://xx.xx.xx.xx:5000/v2.0"
+ name="url" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_password" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="password" ms-duplex="addVim.password" name="password" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_tenant" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.tenant" name="tenant" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_version" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.version" name="version" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_vendor" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.vendor" name="vendor" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_domain" name_i18n="com_zte_conductor_ui_i18n"></span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVim.domain" name="domain" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_type" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <select id="vimTypeSelect" ms-each="$vimType.selectItems" ms-duplex="addVim.vimType" >
- <option ms-attr-value='el.cond_value'>{{el.name}}</option>
- </select>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id_i18n="com_zte_ums_eco_roc_vim_description" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="" aria-required="" style="visibility: hidden;">*</span>
- </label>
- <div class="col-sm-7">
- <textarea class="form-control" rows="3" ms-duplex="addVim.description" name="description"></textarea>
- <span class="help-block"></span>
- </div>
- </div>
- </form>
- </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_username"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.userName" name="userName"
+ class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_password"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="password" ms-duplex="addVim.password" name="password"
+ class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_tenant"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.tenant" name="tenant" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_version"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.version" name="version" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_vendor"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.vendor" name="vendor" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_domain"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVim.domain" name="domain" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_type"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <select id="vimTypeSelect" ms-each="$vimType.selectItems"
+ ms-duplex="addVim.vimType">
+ <option ms-attr-value='el.cond_value'>{{el.name}}</option>
+ </select>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id_i18n="com_zte_ums_eco_roc_vim_description"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="" aria-required="" style="visibility: hidden;">*</span>
+ </label>
+ <div class="col-sm-7">
+ <textarea class="form-control" rows="3" ms-duplex="addVim.description"
+ name="description"></textarea>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ </form>
+ </div>
<!-- modal body end-->
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true"><span id_i18n="com_zte_ums_eco_roc_vim_cancel" name_i18n="com_zte_conductor_ui_i18n"></span></button>
- <button class="btn btn-primary" type="submit" ms-disabled="isSave" ms-click="$saveVimTable()"><span id_i18n="com_zte_ums_eco_roc_vim_save" name_i18n="com_zte_conductor_ui_i18n"></span></button>
- </div>
- </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true"><span
+ id_i18n="com_zte_ums_eco_roc_vim_cancel" name_i18n="com_zte_conductor_ui_i18n"></span>
+ </button>
+ <button class="btn btn-primary" type="submit" ms-disabled="isSave" ms-click="$saveVimTable()">
+ <span id_i18n="com_zte_ums_eco_roc_vim_save" name_i18n="com_zte_conductor_ui_i18n"></span>
+ </button>
+ </div>
+ </div>
- </div>
- </div>
- </div>
-
- <div class="row-fluid col-sm-12" data-name="cond_zone">
- <div class="col-sm-4">
- <button class= "btn white radius_l" id="app-new-btn" ms-click="$showVimTable('', 'add')">
- <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register" name_i18n="com_zte_conductor_ui_i18n"></span>
- </button>
</div>
- <!-- <div class="fa fa-refresh text-muted refresh-status-text"><small><span id_i18n="com_zte_ums_eco_roc_vim_status_update_time" name_i18n="com_zte_conductor_ui_i18n"></span></small><small ms-text="vimStatusTime"></small></div>-->
</div>
+ </div>
+
+ <div class="row-fluid col-sm-12" data-name="cond_zone">
+ <div class="col-sm-4">
+ <button class="btn white radius_l" id="app-new-btn" ms-click="$showVimTable('', 'add')">
+ <i class="ict-new"></i> <span id_i18n="com_zte_ums_eco_roc_vim_register"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ </button>
+ </div>
+ <!-- <div class="fa fa-refresh text-muted refresh-status-text"><small><span id_i18n="com_zte_ums_eco_roc_vim_status_update_time" name_i18n="com_zte_conductor_ui_i18n"></span></small><small ms-text="vimStatusTime"></small></div>-->
+ </div>
<div class="row-fluid col-sm-12 " ms-each-el="vimInfo">
- <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">
- <div class="hpanel stats" >
-
- <div class="panel-body h-200" ms-hover="hpanel_show">
- <div class="pull-left">
- <span class="label label-success" ms-text="$Status.displayActive"></span>
+ <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">
+ <div class="hpanel stats">
+
+ <div class="panel-body h-200" ms-hover="hpanel_show">
+ <div class="pull-left">
+ <span class="label label-success" ms-text="$Status.displayActive"></span>
+ </div>
+ <div class="stats-icon pull-right">
+ <i class="fa fa-cloud fa-5x color_cloud"></i>
+ </div>
+ <div class="m-t-xl">
+ <h3 ms-text="el.name"></h3>
+ <div class="font">
+ <span id_i18n="com_zte_ums_eco_roc_vim_display_type"
+ name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span ms-text="el.type"></span>
</div>
- <div class="stats-icon pull-right">
- <i class="fa fa-cloud fa-5x color_cloud"></i>
- </div>
- <div class="m-t-xl">
- <h3 ms-text="el.name"></h3>
- <div class="font">
- <span id_i18n="com_zte_ums_eco_roc_vim_display_type" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span ms-text="el.type"></span>
- </div>
- <div ms-text="el.url"></div>
- </div>
- </div>
- <div class="panel-footer">
- <div class="pull-right">
- <a class="btn btn-default btn-sm" ms-click="$showVimTable(el, 'update')"><i class="fa fa-pencil-square-o fa-lg"></i></a>
- <a class="btn btn-default btn-sm" ms-click="delVim(el)"><i class="fa fa-trash-o fa-lg"> </i></a>
- <!--<a class="btn btn-default btn-sm" ms-click="gotoChartPage(el.oid,el.name,el.user)"><i class="fa fa-pie-chart fa-lg"> </i></a>-->
- </div>
+ <div ms-text="el.url"></div>
+ </div>
+ </div>
+ <div class="panel-footer">
+ <div class="pull-right">
+ <a class="btn btn-default btn-sm" ms-click="$showVimTable(el, 'update')"><i
+ class="fa fa-pencil-square-o fa-lg"></i></a>
+ <a class="btn btn-default btn-sm" ms-click="delVim(el)"><i class="fa fa-trash-o fa-lg"> </i></a>
+ <!--<a class="btn btn-default btn-sm" ms-click="gotoChartPage(el.oid,el.name,el.user)"><i class="fa fa-pie-chart fa-lg"> </i></a>-->
</div>
</div>
</div>
-
+ </div>
+
</div>
<div class="row-fluid">
- <div class="col-md-12">
- <div class="pull-left text-muted"><small><span id_i18n="com_zte_ums_eco_roc_vim_total" name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="blue-font" ms-text="vimInfo.size()"></span>
- <span id_i18n="com_zte_ums_eco_roc_vim_metric" name_i18n="com_zte_conductor_ui_i18n"></span></small></div>
- </div>
- </div>
-
- </div>
+ <div class="col-md-12">
+ <div class="pull-left text-muted">
+ <small><span id_i18n="com_zte_ums_eco_roc_vim_total" name_i18n="com_zte_conductor_ui_i18n"></span>
+ <span class="blue-font" ms-text="vimInfo.size()"></span>
+ <span id_i18n="com_zte_ums_eco_roc_vim_metric" name_i18n="com_zte_conductor_ui_i18n"></span></small>
+ </div>
+ </div>
+ </div>
+
+</div>
<script type="text/javascript" src="../../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../common/js/tools.js"></script>
<script type="text/javascript" src="../../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
@@ -230,13 +255,13 @@
<script type="text/javascript" src="../../common/thirdparty/bootbox/bootbox.min.js"></script>
<!--<script type="text/javascript" src="../component/thirdparty/cometd/cometd.js"></script>-->
<!--<script type="text/javascript" src="../component/thirdparty/cometd/jquery/jquery.cometd.js"></script>-->
-<script type="text/javascript" src="js/loadi18nApp.js"></script>
+<script type="text/javascript" src="js/loadi18nApp.js"></script>
<script type="text/javascript" src="js/vim-validate.js"></script>
<!--<script type="text/javascript" src="./js/client-cometd.js"></script>-->
<script src="../vendor/avalon/avalon.js"></script>
<script type="text/javascript" src="js/vimUtil.js"></script>
<script type="text/javascript" src="js/vimController.js"></script>
<script src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
-<script type="text/javascript" src="../../common/js/core/hk.min.js" ></script>
+<script type="text/javascript" src="../../common/js/core/hk.min.js"></script>
</body>
</html>
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/css/vnfm.css b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/css/vnfm.css
index 14254aa..cd23bc7 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/css/vnfm.css
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/css/vnfm.css
@@ -14,479 +14,473 @@
* limitations under the License.
*/
body {
- font-family: microsoft yahei !important;
+ font-family: microsoft yahei !important;
}
/* blue pill (inspired by iTunes)
*******************************************************************************/
.grey {
- background-color: #e5e5e5;
- color: #333;
+ background-color: #e5e5e5;
+ color: #333;
}
.blue {
- background-color: #5b9bd1;
- border-radius: 20px;
- color: #fff;
- font-weight: bold;
- padding: 8px 0;
- text-align: center;
- width: 100px;
+ background-color: #5b9bd1;
+ border-radius: 20px;
+ color: #fff;
+ font-weight: bold;
+ padding: 8px 0;
+ text-align: center;
+ width: 100px;
}
.blue:hover {
- background-color: #e8f3fd;
- color: #5b9bd1;
+ background-color: #e8f3fd;
+ color: #5b9bd1;
}
.blue.selected {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
+ border: 0;
+ background-color: #5b9bd1;
+ color: #fff;
}
.blue.selected:hover {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
+ border: 0;
+ background-color: #5b9bd1;
+ color: #fff;
}
p {
- color: #444;
- font-size: 14px;
- font-weight: normal;
- line-height: 21px;
- margin: 0 0 12px 0;
+ color: #444;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 21px;
+ margin: 0 0 12px 0;
}
p.credit {
- border-top: 1px solid #ccc;
- font-size: 14px;
- line-height: 140%;
- margin: 36px 0 12px 0;
- padding: 8px 0 0 0;
- text-align: center;
+ border-top: 1px solid #ccc;
+ font-size: 14px;
+ line-height: 140%;
+ margin: 36px 0 12px 0;
+ padding: 8px 0 0 0;
+ text-align: center;
}
ul.column {
- float: left;
- list-style: none;
- width: 675px;
+ float: left;
+ list-style: none;
+ width: 675px;
}
ul.column li {
- background: #eee;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;
- box-shadow: inset 0 1px 1px 0 #c7c7c7;
- float: left;
- margin: 10px 0 0 10px;
- display: block;
- height: 150px;
- text-align: center;
- width: 215px;
+ background: #eee;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;
+ box-shadow: inset 0 1px 1px 0 #c7c7c7;
+ float: left;
+ margin: 10px 0 0 10px;
+ display: block;
+ height: 150px;
+ text-align: center;
+ width: 215px;
}
/* Clear Floated Elements
------------------------------------------------------------------------------*/
-.column:after,.button-collection:after,.clearfix:after,div.project-info:after
- {
- clear: both;
- content: ' ';
- display: block;
- font-size: 0;
- line-height: 0;
- visibility: hidden;
- width: 0;
- height: 0;
+.column:after, .button-collection:after, .clearfix:after, div.project-info:after {
+ clear: both;
+ content: ' ';
+ display: block;
+ font-size: 0;
+ line-height: 0;
+ visibility: hidden;
+ width: 0;
+ height: 0;
}
.container-fluid {
- background-color:white !important;
- min-height:500px;
+ background-color: white !important;
+ min-height: 500px;
}
.nav-tabs {
- border: 0;
+ border: 0;
}
-.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus
- {
- border: 0;
- border-top: 3px solid #F3565D;
+.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
+ border: 0;
+ border-top: 3px solid #F3565D;
}
-.nav-tabs>li>a {
- border-radius: 0;
+.nav-tabs > li > a {
+ border-radius: 0;
}
-.nav-tabs>li>a:hover {
- background-color: #f1f3fa;
- border: 1Px solid #f1f3fa;
+.nav-tabs > li > a:hover {
+ background-color: #f1f3fa;
+ border: 1Px solid #f1f3fa;
}
.c3 {
- margin-top: 120px;
+ margin-top: 120px;
}
.skills-chart-breadcrumb {
-
+
}
.blue:selected {
- border: 0;
- background-color: #5b9bd1;
+ border: 0;
+ background-color: #5b9bd1;
}
.btn {
- /* border-width: 0; */
- /* padding: 7px 14px; */
- /* font-size: 14px; */
- /* outline: none !important; */
- /* background-image: none !important; */
- /* filter: none; */
- /* -webkit-box-shadow: none; */
- -moz-box-shadow: none;
- /* box-shadow: none; */
- /* text-shadow: none; */
+ /* border-width: 0; */
+ /* padding: 7px 14px; */
+ /* font-size: 14px; */
+ /* outline: none !important; */
+ /* background-image: none !important; */
+ /* filter: none; */
+ /* -webkit-box-shadow: none; */
+ -moz-box-shadow: none;
+ /* box-shadow: none; */
+ /* text-shadow: none; */
}
select {
- border-width: 1px;
- padding: 4px 1px;
- border-radius: 4px;
+ border-width: 1px;
+ padding: 4px 1px;
+ border-radius: 4px;
}
.input-sm {
- padding: 4px 10px;
+ padding: 4px 10px;
}
.btn-block {
- display: block;
- width: 100%;
- padding-left: 0;
- padding-right: 0;
+ display: block;
+ width: 100%;
+ padding-left: 0;
+ padding-right: 0;
}
/* Bootstrap buttons */
-
-.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active
- {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
+.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active {
+ color: #333;
+ background-color: #ededed;
+ border-color: #b3b3b3;
}
.open .btn-default.dropdown-toggle {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
+ color: #333;
+ background-color: #ededed;
+ border-color: #b3b3b3;
}
-.btn-default:active,.btn-default.active {
- background-image: none;
- background-color: #e0e0e0;
- font-weight: bold;
+.btn-default:active, .btn-default.active {
+ background-image: none;
+ background-color: #e0e0e0;
+ font-weight: bold;
}
-.btn-default:active:hover,.btn-default.active:hover {
- background-color: #e6e6e6;
+.btn-default:active:hover, .btn-default.active:hover {
+ background-color: #e6e6e6;
}
.open .btn-default.dropdown-toggle {
- background-image: none;
+ background-image: none;
}
-.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
- {
- background-color: #fff;
- border-color: #ccc;
+.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 {
+ background-color: #fff;
+ border-color: #ccc;
}
.btn-default .badge {
- color: #fff;
- background-color: #333;
+ color: #fff;
+ background-color: #333;
}
-
-.btn-default>i[class^="icon-"],.btn-default>i[class*="icon-"] {
- color: #8c8c8c;
+.btn-default > i[class^="icon-"], .btn-default > i[class*="icon-"] {
+ color: #8c8c8c;
}
div[data-name="tab_zone"] div {
- background-color: #f1f3fa;
- padding: 0px;
+ background-color: #f1f3fa;
+ padding: 0px;
}
div[data-name="cond_zone"] div {
- background-color: #fff;
- margin-top: 15px;
- margin-bottom: 15px;
+ background-color: #fff;
+ margin-top: 15px;
+ margin-bottom: 15px;
}
div[data-name="res-conds-zone"] {
- display: inline;
+ display: inline;
}
-div[data-name="res-conds-zone"] select,div[data-name="res-conds-zone"] span
- {
- /**height:33px;*/
- margin-left: 15px;
- color: #5b9bd1;
- border-color: #ccc;
- font-weight: bold;
+div[data-name="res-conds-zone"] select, div[data-name="res-conds-zone"] span {
+ /**height:33px;*/
+ margin-left: 15px;
+ color: #5b9bd1;
+ border-color: #ccc;
+ font-weight: bold;
}
-.input{
- width:250px;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+.input {
+ width: 250px;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
div.separator {
- margin: 20px;
+ margin: 20px;
}
div.separator div {
- text-align: center;
- line-height: 0;
+ text-align: center;
+ line-height: 0;
}
div.separator-line {
- height: 1px !important;
- width: 100%;
- background: #ddd;
- overflow: hidden;
+ height: 1px !important;
+ width: 100%;
+ background: #ddd;
+ overflow: hidden;
}
.dropdown-toggle {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.calendar-date {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.range_inputs {
- color: #5b9bd1;
+ color: #5b9bd1;
}
-.btn.dropdown-toggle,.btn-group .btn.dropdown-toggle,.btn:hover,.btn:disabled,.btn[disabled],.btn:focus,.btn:active,.btn.active
- {
- outline: none !important;
- background-image: none !important;
- filter: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- text-shadow: none;
+.btn.dropdown-toggle, .btn-group .btn.dropdown-toggle, .btn:hover, .btn:disabled, .btn[disabled], .btn:focus, .btn:active, .btn.active {
+ outline: none !important;
+ background-image: none !important;
+ filter: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ text-shadow: none;
}
#skills-chart-breadcrumb {
- margin-bottom: 10px
+ margin-bottom: 10px
}
/*增加daterangepicker的css*/
input[name="daterange"] {
- width: 220px;
- line-height: 0;
- height: 31px;
- vertical-align: top;
- margin-top: 2px;
+ width: 220px;
+ line-height: 0;
+ height: 31px;
+ vertical-align: top;
+ margin-top: 2px;
}
.daterangepicker .ranges {
- width: 205px;
+ width: 205px;
}
.daterangepicker .ranges input {
- width: 95px !important;
+ width: 95px !important;
}
td.details-control {
- background: url('../images/details_open.png') no-repeat center center;
- cursor: pointer;
+ background: url('../images/details_open.png') no-repeat center center;
+ cursor: pointer;
}
tr.shown td.details-control {
- background: url('../images/details_close.png') no-repeat center center;
+ background: url('../images/details_close.png') no-repeat center center;
}
.details table td {
- word-wrap: break-word;
- word-break: normal;
- border-top: 1px solid #dddddd;
+ word-wrap: break-word;
+ word-break: normal;
+ border-top: 1px solid #dddddd;
}
-.details table tr:first-child td {
- border-top: none;
+.details table tr:first-child td {
+ border-top: none;
}
.details table {
- table-layout: fixed;
- width: 100%;
+ table-layout: fixed;
+ width: 100%;
}
td.title {
- width: 10%;
+ width: 10%;
}
-table.dataTable tbody th,table.dataTable tbody td {
- padding: 8px 10px;
+table.dataTable tbody th, table.dataTable tbody td {
+ padding: 8px 10px;
}
-div.dataTables_length,div.dataTables_info {
- display: inline;
+div.dataTables_length, div.dataTables_info {
+ display: inline;
}
div.dataTables_paginate {
- display: inline;
- float: right;
+ display: inline;
+ float: right;
}
div.pagination-panel {
- margin-right: 10px;
+ margin-right: 10px;
}
input.pagination-panel-input {
- width: 50px;
+ width: 50px;
}
#ict_res_table_div {
- margin-top: 15px;
+ margin-top: 15px;
}
#ict_res_table_div label {
- font-weight: 100;
+ font-weight: 100;
}
-.daterangepicker .daterangepicker_start_input label,.daterangepicker .daterangepicker_end_input label
- {
- color: #5b9bd1;
+.daterangepicker .daterangepicker_start_input label, .daterangepicker .daterangepicker_end_input label {
+ color: #5b9bd1;
}
.daterangepicker .ranges .input-mini {
- color: #5b9bd1;
+ color: #5b9bd1;
}
.cancelBtn {
- padding: 5px 10px 5px 10px;
+ padding: 5px 10px 5px 10px;
}
-.btn:focus,.btn:active:focus,.btn.active:focus {
- outline: 0;
+.btn:focus, .btn:active:focus, .btn.active:focus {
+ outline: 0;
}
-#ict_res_table_div table {
- width: 100% !important;
+#ict_res_table_div table {
+ width: 100% !important;
}
.control-label .required {
- color: #e02222;
- font-size: 12px;
- padding-left: 2px;
+ color: #e02222;
+ font-size: 12px;
+ padding-left: 2px;
}
-#ict_vim_table tbody tr{
- cursor:pointer;
+#ict_vim_table tbody tr {
+ cursor: pointer;
}
-
/*卡片面板样式*/
.animated-panel {
- -webkit-animation-duration: .5s;
- animation-duration: .5s;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
+ -webkit-animation-duration: .5s;
+ animation-duration: .5s;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
}
.hpanel {
- background-color: none;
- border: none;
- box-shadow: none;
- margin-bottom: 25px;
-
+ background-color: none;
+ border: none;
+ box-shadow: none;
+ margin-bottom: 25px;
+
}
.hpanel .panel-body {
- border: 1px solid #e4e5e7;
- border-radius: 2px;
- padding: 20px;
- position: relative;
+ border: 1px solid #e4e5e7;
+ border-radius: 2px;
+ padding: 20px;
+ position: relative;
}
+
.h-200 {
- min-height: 220px;
+ min-height: 220px;
}
.m-t-xl {
- margin-top: 40px;
+ margin-top: 40px;
}
.m-t-xl div {
- margin-bottom: 15px;
+ margin-bottom: 15px;
}
.text-success {
- color: #0d638f;
+ color: #0d638f;
}
+
.hpanel > .panel-footer {
- color: inherit;
- border: 1px solid #e4e5e7;
- border-top: none;
- font-size: 90%;
- background: #f7f9fa;
- height:40px;
- padding: 5px 15px;
+ color: inherit;
+ border: 1px solid #e4e5e7;
+ border-top: none;
+ font-size: 90%;
+ background: #f7f9fa;
+ height: 40px;
+ padding: 5px 15px;
}
-.color_cloud{
- color:#ccc;
+
+.color_cloud {
+ color: #ccc;
}
-.stats-title{
+
+.stats-title {
}
-h3{
- margin-top: 10px;
- margin-bottom: 40px;
- font-weight: 200;
+h3 {
+ margin-top: 10px;
+ margin-bottom: 40px;
+ font-weight: 200;
}
-.blue-font{
- color:#428bca;
+.blue-font {
+ color: #428bca;
}
-.hpanel > .panel-footer .pull-right a{
- margin-left: 5px;
+.hpanel > .panel-footer .pull-right a {
+ margin-left: 5px;
}
-.hpanel > .panel-footer .pull-right .btn{
- min-width: 30px !important;
+.hpanel > .panel-footer .pull-right .btn {
+ min-width: 30px !important;
}
.font-bold {
- font-weight: 600;
- margin-bottom: 15px;
+ font-weight: 600;
+ margin-bottom: 15px;
}
-.hpanel_show{
- background-color: #f7f9fa;
+.hpanel_show {
+ background-color: #f7f9fa;
}
.vnfm-padding {
- padding-left: 0;
+ padding-left: 0;
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/commonUtil.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/commonUtil.js
index 2e3dffd..b8be1b7 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/commonUtil.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/commonUtil.js
@@ -14,69 +14,69 @@
* limitations under the License.
*/
var commonUtil = {};
-commonUtil.arrayRemove = function( aryInstance , index ){
- if(aryInstance == undefined || aryInstance == null){
+commonUtil.arrayRemove = function (aryInstance, index) {
+ if (aryInstance == undefined || aryInstance == null) {
return;
}
- for(var i=0,n=0;i<aryInstance.length;i++) {
- if(aryInstance[i]!=aryInstance[dx]) {
- aryInstance[n++]=aryInstance[i];
+ for (var i = 0, n = 0; i < aryInstance.length; i++) {
+ if (aryInstance[i] != aryInstance[dx]) {
+ aryInstance[n++] = aryInstance[i];
}
}
- aryInstance.length-=1;
+ aryInstance.length -= 1;
};
//For the expansion of the Date, convert the Date to specify the format String
// examples:
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
-commonUtil.parseDate = function( dateObj , format){
+commonUtil.parseDate = function (dateObj, format) {
var o = {
- "M+" : dateObj.getMonth()+1, //month
- "d+" : dateObj.getDate(), //day
- "h+" : dateObj.getHours(), //hour
- "m+" : dateObj.getMinutes(), //minute
- "s+" : dateObj.getSeconds(), //second
- "q+" : Math.floor((dateObj.getMonth()+3)/3), //quarter
- "S" : dateObj.getMilliseconds() //millisecond
+ "M+": dateObj.getMonth() + 1, //month
+ "d+": dateObj.getDate(), //day
+ "h+": dateObj.getHours(), //hour
+ "m+": dateObj.getMinutes(), //minute
+ "s+": dateObj.getSeconds(), //second
+ "q+": Math.floor((dateObj.getMonth() + 3) / 3), //quarter
+ "S": dateObj.getMilliseconds() //millisecond
}
- if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
- (dateObj.getFullYear()+"").substr(4 - RegExp.$1.length));
- for(var k in o)
- if(new RegExp("("+ k +")").test(format))
- format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] :
- ("00"+ o[k]).substr((""+ o[k]).length));
+ if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
+ (dateObj.getFullYear() + "").substr(4 - RegExp.$1.length));
+ for (var k in o)
+ if (new RegExp("(" + k + ")").test(format))
+ format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] :
+ ("00" + o[k]).substr(("" + o[k]).length));
return format;
};
//tooltip
-commonUtil.showMessage = function(message, type) {
+commonUtil.showMessage = function (message, type) {
$.growl({
icon: "fa fa-envelope-o fa-lg",
title: " " + $.i18n.prop("nfv-nso-iui-common-tip"),
message: message
- },{
+ }, {
type: type
});
};
-commonUtil.registerCometdMessage = function(url, channel, callback) {
+commonUtil.registerCometdMessage = function (url, channel, callback) {
var cometd = new $.Cometd();
var cometdURL = location.protocol + "//" + location.host + url;
cometd.configure({
- url : cometdURL,
- logLevel : "info"
+ url: cometdURL,
+ logLevel: "info"
});
// unregister websocket transport, use long-polling transport
cometd.unregisterTransport('websocket');
// store channel object parameters(this object include channel and callback function), start from arguments[1]
- var _args = arguments;
+ var _args = arguments;
- cometd.addListener("/meta/handshake", function(handshake){
- if(handshake.successful === true) {
- cometd.batch(function() {
+ cometd.addListener("/meta/handshake", function (handshake) {
+ if (handshake.successful === true) {
+ cometd.batch(function () {
//subscribe channel
- cometd.subscribe(channel, function(message){
+ cometd.subscribe(channel, function (message) {
callback.call(this, message.data);
});
});
@@ -85,44 +85,44 @@
cometd.handshake();
}
-commonUtil.format = function() {
- if(arguments.length == 0) {
+commonUtil.format = function () {
+ if (arguments.length == 0) {
return null;
}
var str = arguments[0];
- for(var i=0; i<arguments.length; i++) {
- var reg = new RegExp("\\{" + (i - 1) + "\\}" , "gm");
+ for (var i = 0; i < arguments.length; i++) {
+ var reg = new RegExp("\\{" + (i - 1) + "\\}", "gm");
str = str.replace(reg, arguments[i]);
}
return str;
}
-commonUtil.get = function(url, params, callback) {
+commonUtil.get = function (url, params, callback) {
$.ajax({
- type : "GET",
- url : url,
+ type: "GET",
+ url: url,
//contentType : contentType || "application/x-www-form-urlencoded; charset=UTF-8",
- dataType : "json",
- data : params || {},
- success : callback
+ dataType: "json",
+ data: params || {},
+ success: callback
});
}
-commonUtil.post = function(url, params, callback, contentType) {
+commonUtil.post = function (url, params, callback, contentType) {
$.ajax({
- type : "POST",
- url : url,
- contentType : contentType || "application/x-www-form-urlencoded; charset=UTF-8",
- data : params || {},
- success : callback
+ type: "POST",
+ url: url,
+ contentType: contentType || "application/x-www-form-urlencoded; charset=UTF-8",
+ data: params || {},
+ success: callback
});
}
-commonUtil.delete = function(url, callback, contentType) {
+commonUtil.delete = function (url, callback, contentType) {
$.ajax({
- type : "DELETE",
- url : url,
- contentType : contentType || "application/x-www-form-urlencoded; charset=UTF-8",
- success : callback
+ type: "DELETE",
+ url: url,
+ contentType: contentType || "application/x-www-form-urlencoded; charset=UTF-8",
+ success: callback
});
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/loadi18n_nsoc.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/loadi18n_nsoc.js
index 198960c..aed34c3 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/loadi18n_nsoc.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/loadi18n_nsoc.js
@@ -13,26 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-function loadPropertiesSideMenu(lang, fileNamePrefix, filePath){
- jQuery.i18n.properties({
- language:lang,
- name:fileNamePrefix,
- path:filePath,
- mode:'map',
- callback: function() {
- var i18nItems = $("[name_i18n=com_zte_nfv_nsoc_i18n]");
- for(var i=0;i<i18nItems.length;i++) {
- var $item = $(i18nItems.eq(i));
- var itemId = $item.attr("id");
- var itemTitle = $item.attr("title");
- if(typeof(itemTitle) != "undefined") {
- $item.attr("title", $.i18n.prop(itemId));
- } else {
- $item.text($.i18n.prop(itemId));
- }
- }
- }
- });
+function loadPropertiesSideMenu(lang, fileNamePrefix, filePath) {
+ jQuery.i18n.properties({
+ language: lang,
+ name: fileNamePrefix,
+ path: filePath,
+ mode: 'map',
+ callback: function () {
+ var i18nItems = $("[name_i18n=com_zte_nfv_nsoc_i18n]");
+ for (var i = 0; i < i18nItems.length; i++) {
+ var $item = $(i18nItems.eq(i));
+ var itemId = $item.attr("id");
+ var itemTitle = $item.attr("title");
+ if (typeof(itemTitle) != "undefined") {
+ $item.attr("title", $.i18n.prop(itemId));
+ } else {
+ $item.text($.i18n.prop(itemId));
+ }
+ }
+ }
+ });
}
var lang = getLanguage();
loadPropertiesSideMenu(lang, 'nfv-nso-iui-i18n', 'i18n/');
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfm-validate.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfm-validate.js
index 0412101..b656d4d 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfm-validate.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfm-validate.js
@@ -13,77 +13,77 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-$(function(){
- var form = $('#vnfm_form');
- var error = $('.alert-danger', form);
- var success = $('.alert-success', form);
+$(function () {
+ var form = $('#vnfm_form');
+ var error = $('.alert-danger', form);
+ var success = $('.alert-success', form);
- form.validate({
- doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
- errorElement: 'span', //default input error message container
- errorClass: 'help-block', // default input error message class
- focusInvalid: false, // do not focus the last invalid input
- rules: {
- name:{
- required: true,
- maxlength:20
- },
- type:{
- required: true,
- maxlength:20
- },
- version:{
- required: true,
- maxlength:20
- },
- vendor:{
- required: true,
- maxlength:20
- },
- url:{
- required: true,
- url: true
- }
- },
- messages: {
- name:{
- required: $.i18n.prop("nfv-vnfm-iui-validate-name")
- },
- type:{
- required: $.i18n.prop("nfv-vnfm-iui-validate-type")
- },
- version:{
- required: $.i18n.prop("nfv-vnfm-iui-validate-version")
- },
- vendor:{
- required: $.i18n.prop("nfv-vnfm-iui-validate-vendor")
- },
- url:{
- required: $.i18n.prop("nfv-vnfm-iui-validate-url-required"),
- url: $.i18n.prop("nfv-vnfm-iui-validate-url")
- }
- },
- errorPlacement: function (error, element) { // render error placement for each input type
- error.insertAfter(element); // for other inputs, just perform default behavior
- },
- invalidHandler: function (event, validator) { //display error alert on form submit
- success.hide();
- error.show();
- },
- highlight: function (element) { // hightlight error inputs
- $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
- },
- unhighlight: function (element) { // revert the change done by hightlight
- $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group
- },
- success: function (label) {
- label.addClass('valid') // mark the current input as valid and display OK icon
- .closest('.form-group').removeClass('has-error'); // set success class to the control group
- },
- submitHandler: function (form) {
- success.show();
- error.hide();
- //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
- }
- });
+ form.validate({
+ doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
+ errorElement: 'span', //default input error message container
+ errorClass: 'help-block', // default input error message class
+ focusInvalid: false, // do not focus the last invalid input
+ rules: {
+ name: {
+ required: true,
+ maxlength: 20
+ },
+ type: {
+ required: true,
+ maxlength: 20
+ },
+ version: {
+ required: true,
+ maxlength: 20
+ },
+ vendor: {
+ required: true,
+ maxlength: 20
+ },
+ url: {
+ required: true,
+ url: true
+ }
+ },
+ messages: {
+ name: {
+ required: $.i18n.prop("nfv-vnfm-iui-validate-name")
+ },
+ type: {
+ required: $.i18n.prop("nfv-vnfm-iui-validate-type")
+ },
+ version: {
+ required: $.i18n.prop("nfv-vnfm-iui-validate-version")
+ },
+ vendor: {
+ required: $.i18n.prop("nfv-vnfm-iui-validate-vendor")
+ },
+ url: {
+ required: $.i18n.prop("nfv-vnfm-iui-validate-url-required"),
+ url: $.i18n.prop("nfv-vnfm-iui-validate-url")
+ }
+ },
+ errorPlacement: function (error, element) { // render error placement for each input type
+ error.insertAfter(element); // for other inputs, just perform default behavior
+ },
+ invalidHandler: function (event, validator) { //display error alert on form submit
+ success.hide();
+ error.show();
+ },
+ highlight: function (element) { // hightlight error inputs
+ $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
+ },
+ unhighlight: function (element) { // revert the change done by hightlight
+ $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group
+ },
+ success: function (label) {
+ label.addClass('valid') // mark the current input as valid and display OK icon
+ .closest('.form-group').removeClass('has-error'); // set success class to the control group
+ },
+ submitHandler: function (form) {
+ success.show();
+ error.hide();
+ //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
+ }
+ });
});
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmController.js
index fcc95a6..df3166c 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmController.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmController.js
@@ -15,279 +15,279 @@
*/
var vm = avalon
- .define({
- $id : "vnfmController",
- vnfmInfo : [],
- //mocSelectItems : [],
- vimSelectItems : [],
- server_rtn:{
- info_block:false,
- warning_block:false,
- rtn_info:"",
- $RTN_SUCCESS:"RTN_SUCCESS",
- $RTN_FAILED:"RTN_FAILED"
- },
- $Status :{
- success:"active",
- failed:"inactive"
- },
- $restUrl : {
- queryVnfmInfoUrl : '/openoapi/extsys/v1/vnfms',
- addVnfmInfoUrl : '/openoapi/extsys/v1/vnfms',
- updateVnfmInfoUrl : '/openoapi/extsys/v1/vnfms/',
- delVnfmInfoUrl : '/openoapi/extsys/v1/vnfms/',
- queryMocUrl : '',
- queryVimUrl : '/openoapi/extsys/v1/vims'
- },
- $htmlText:{
- saveSuccess:$.i18n.prop("nfv-vnfm-iui-message-save-success"),
- saveFail:$.i18n.prop("nfv-vnfm-iui-message-save-fail"),
- updateSuccess:$.i18n.prop("nfv-vnfm-iui-message-update-success"),
- updateFail:$.i18n.prop("nfv-vnfm-iui-message-update-fail")
- },
- $initTable : function() {
- $.ajax({
- "type": 'GET',
- "url": vm.$restUrl.queryVnfmInfoUrl,
- //"dataType": "json",
- "success": function (resp) {
- for(var i=0;i<resp.length;i++){
- resp[i].status = vm.$Status.success;
- }
- vm.vnfmInfo = resp;
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- bootbox.alert($.i18n.prop("nfv-vnfm-iui-message-query-fail") + ":"+textStatus+":"+errorThrown);
- return;
- },
- complete: function() {
- vnfmUtil.tooltipVnfmStatus();
- }
- });
- },
- // $initMoc : function() {
- // /*var url = vm.$restUrl.queryMocUrl;
- // commonUtil.get(url, null, function(resp) {
- // if (resp) {
- // vm.addVnfm.moc = resp.data;
- // }
- // });*/
- // var resp = [
- // { id : "nfv.vnfm.eco", name : "VNFM(ECO)"},
- // { id : "nfv.vnfm.tacker", name : "VNFM(Tacker)"},
- // { id : "nfv.vnfm.cmcc", name : "VNFM(CMCC)"},
- // { id : "nfv.vnfm.etsi", name : "VNFM(ETSI)"}
- // ]
- // vm.mocSelectItems = resp;
- // },
- $initVim : function() {
- $.ajax({
- type : 'get',
- url : vm.$restUrl.queryVimUrl,
- dataType : 'json',
- success : function(resp) {
- if(resp) {
- vm.vimSelectItems = resp;
- }
- vm.vimSelectItems.push({"vimId":"","name":""});
- }
- });
- },
- addVnfm : {
- title : $.i18n.prop("nfv-vnfm-iui-text-register"),
- vnfmId : "",
- name : "",
- type :"",
- //moc : "",
- //mocDisabled : false,
- vimId : "",
- //vimVisiable : false,
- vendor : "",
- version :"",
- description:"",
- certificateUrl:"",
- url : "",
- urlTip : $.i18n.prop("nfv-vnfm-iui-text-url-tip"),
- userName : "",
- password : "",
- saveType :"add",
- status: ""
- },
- $showVnfmTable : function() {
- vm.addVnfm.title = $.i18n.prop("nfv-vnfm-iui-text-register"),
- vm.addVnfm.vnfmId = "";
- vm.addVnfm.name = "";
- vm.addVnfm.type = "";
- //vm.addVnfm.moc = "";
- //vm.addVnfm.mocDisabled = false;
- vm.addVnfm.vimId = "";
- //vm.addVnfm.vimVisiable = false;
- vm.addVnfm.vendor = "";
- vm.addVnfm.version = "";
- vm.addVnfm.description = "";
- vm.addVnfm.certificateUrl = "";
- vm.addVnfm.url = "";
- vm.addVnfm.userName = "";
- vm.addVnfm.password = "";
- vm.addVnfm.saveType = "add";
- vm.server_rtn.warning_block=false;
- vm.server_rtn.info_block=false;
- //vm.$initMoc();
- vm.$initVim();
- //vm.$mocChange();
-
- $(".form-group").each(function () {
- $(this).removeClass('has-success');
- $(this).removeClass('has-error');
- $(this).find(".help-block[id]").remove();
- });
- $("#addVnfmDlg").modal("show");
- },
- // $getMocName : function(mocId) {
- // var items = vm.mocSelectItems;
- // for(var i=0;i<items.length;i++) {
- // if(items[i].id == mocId) {
- // return items[i].name;
- // }
- // }
- // return "";
- // },
- $saveVnfm : function() {
- var form = $('#vnfm_form');
- if (form.valid() == false) {
- return false;
- }
- vm.server_rtn.info_block=true;
- vm.server_rtn.warning_block=false;
- vm.addVnfm.status=vm.$Status.success;
+ .define({
+ $id: "vnfmController",
+ vnfmInfo: [],
+ //mocSelectItems : [],
+ vimSelectItems: [],
+ server_rtn: {
+ info_block: false,
+ warning_block: false,
+ rtn_info: "",
+ $RTN_SUCCESS: "RTN_SUCCESS",
+ $RTN_FAILED: "RTN_FAILED"
+ },
+ $Status: {
+ success: "active",
+ failed: "inactive"
+ },
+ $restUrl: {
+ queryVnfmInfoUrl: '/openoapi/extsys/v1/vnfms',
+ addVnfmInfoUrl: '/openoapi/extsys/v1/vnfms',
+ updateVnfmInfoUrl: '/openoapi/extsys/v1/vnfms/',
+ delVnfmInfoUrl: '/openoapi/extsys/v1/vnfms/',
+ queryMocUrl: '',
+ queryVimUrl: '/openoapi/extsys/v1/vims'
+ },
+ $htmlText: {
+ saveSuccess: $.i18n.prop("nfv-vnfm-iui-message-save-success"),
+ saveFail: $.i18n.prop("nfv-vnfm-iui-message-save-fail"),
+ updateSuccess: $.i18n.prop("nfv-vnfm-iui-message-update-success"),
+ updateFail: $.i18n.prop("nfv-vnfm-iui-message-update-fail")
+ },
+ $initTable: function () {
+ $.ajax({
+ "type": 'GET',
+ "url": vm.$restUrl.queryVnfmInfoUrl,
+ //"dataType": "json",
+ "success": function (resp) {
+ for (var i = 0; i < resp.length; i++) {
+ resp[i].status = vm.$Status.success;
+ }
+ vm.vnfmInfo = resp;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ bootbox.alert($.i18n.prop("nfv-vnfm-iui-message-query-fail") + ":" + textStatus + ":" + errorThrown);
+ return;
+ },
+ complete: function () {
+ vnfmUtil.tooltipVnfmStatus();
+ }
+ });
+ },
+ // $initMoc : function() {
+ // /*var url = vm.$restUrl.queryMocUrl;
+ // commonUtil.get(url, null, function(resp) {
+ // if (resp) {
+ // vm.addVnfm.moc = resp.data;
+ // }
+ // });*/
+ // var resp = [
+ // { id : "nfv.vnfm.eco", name : "VNFM(ECO)"},
+ // { id : "nfv.vnfm.tacker", name : "VNFM(Tacker)"},
+ // { id : "nfv.vnfm.cmcc", name : "VNFM(CMCC)"},
+ // { id : "nfv.vnfm.etsi", name : "VNFM(ETSI)"}
+ // ]
+ // vm.mocSelectItems = resp;
+ // },
+ $initVim: function () {
+ $.ajax({
+ type: 'get',
+ url: vm.$restUrl.queryVimUrl,
+ dataType: 'json',
+ success: function (resp) {
+ if (resp) {
+ vm.vimSelectItems = resp;
+ }
+ vm.vimSelectItems.push({"vimId": "", "name": ""});
+ }
+ });
+ },
+ addVnfm: {
+ title: $.i18n.prop("nfv-vnfm-iui-text-register"),
+ vnfmId: "",
+ name: "",
+ type: "",
+ //moc : "",
+ //mocDisabled : false,
+ vimId: "",
+ //vimVisiable : false,
+ vendor: "",
+ version: "",
+ description: "",
+ certificateUrl: "",
+ url: "",
+ urlTip: $.i18n.prop("nfv-vnfm-iui-text-url-tip"),
+ userName: "",
+ password: "",
+ saveType: "add",
+ status: ""
+ },
+ $showVnfmTable: function () {
+ vm.addVnfm.title = $.i18n.prop("nfv-vnfm-iui-text-register"),
+ vm.addVnfm.vnfmId = "";
+ vm.addVnfm.name = "";
+ vm.addVnfm.type = "";
+ //vm.addVnfm.moc = "";
+ //vm.addVnfm.mocDisabled = false;
+ vm.addVnfm.vimId = "";
+ //vm.addVnfm.vimVisiable = false;
+ vm.addVnfm.vendor = "";
+ vm.addVnfm.version = "";
+ vm.addVnfm.description = "";
+ vm.addVnfm.certificateUrl = "";
+ vm.addVnfm.url = "";
+ vm.addVnfm.userName = "";
+ vm.addVnfm.password = "";
+ vm.addVnfm.saveType = "add";
+ vm.server_rtn.warning_block = false;
+ vm.server_rtn.info_block = false;
+ //vm.$initMoc();
+ vm.$initVim();
+ //vm.$mocChange();
- var param = {
- name : vm.addVnfm.name,
- //status : vm.addVnfm.status,
- //moc : $("#moc").val(),
- //vimId : vm.$getVimId($("#moc").val()),
- vimId : $("#vimId").val(),
- vendor : vm.addVnfm.vendor,
- version : vm.addVnfm.version,
- type : vm.addVnfm.type,
- description : vm.addVnfm.description,
- certificateUrl : vm.addVnfm.certificateUrl,
- url : vm.addVnfm.url,
- userName : vm.addVnfm.userName,
- password : vm.addVnfm.password
- }
- //save VIM info
- if(vm.addVnfm.saveType == "add") {
- $.ajax({
- type : "POST",
- url : vm.$restUrl.addVnfmInfoUrl,
- data : JSON.stringify(param),
- dataType : "json",
- contentType : "application/json",
- success : function(data) {
- vm.server_rtn.info_block=false;
- vm.server_rtn.warning_block=false;
- if (data) {
- vm.vnfmInfo = [];
- vm.$initTable();
+ $(".form-group").each(function () {
+ $(this).removeClass('has-success');
+ $(this).removeClass('has-error');
+ $(this).find(".help-block[id]").remove();
+ });
+ $("#addVnfmDlg").modal("show");
+ },
+ // $getMocName : function(mocId) {
+ // var items = vm.mocSelectItems;
+ // for(var i=0;i<items.length;i++) {
+ // if(items[i].id == mocId) {
+ // return items[i].name;
+ // }
+ // }
+ // return "";
+ // },
+ $saveVnfm: function () {
+ var form = $('#vnfm_form');
+ if (form.valid() == false) {
+ return false;
+ }
+ vm.server_rtn.info_block = true;
+ vm.server_rtn.warning_block = false;
+ vm.addVnfm.status = vm.$Status.success;
- $('#addVnfmDlg').modal('hide');
- commonUtil.showMessage(vm.$htmlText.saveSuccess, "success");
- } else {
- vm.server_rtn.warning_block=true;
- vm.server_rtn.rtn_info=vm.$htmlText.saveFail;
- commonUtil.showMessage(vm.$htmlText.saveFail, "failed");
- }
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vm.server_rtn.warning_block=true;
- vm.server_rtn.rtn_info=textStatus+":"+errorThrown;
- vm.server_rtn.info_block=false;
+ var param = {
+ name: vm.addVnfm.name,
+ //status : vm.addVnfm.status,
+ //moc : $("#moc").val(),
+ //vimId : vm.$getVimId($("#moc").val()),
+ vimId: $("#vimId").val(),
+ vendor: vm.addVnfm.vendor,
+ version: vm.addVnfm.version,
+ type: vm.addVnfm.type,
+ description: vm.addVnfm.description,
+ certificateUrl: vm.addVnfm.certificateUrl,
+ url: vm.addVnfm.url,
+ userName: vm.addVnfm.userName,
+ password: vm.addVnfm.password
+ }
+ //save VIM info
+ if (vm.addVnfm.saveType == "add") {
+ $.ajax({
+ type: "POST",
+ url: vm.$restUrl.addVnfmInfoUrl,
+ data: JSON.stringify(param),
+ dataType: "json",
+ contentType: "application/json",
+ success: function (data) {
+ vm.server_rtn.info_block = false;
+ vm.server_rtn.warning_block = false;
+ if (data) {
+ vm.vnfmInfo = [];
+ vm.$initTable();
+
+ $('#addVnfmDlg').modal('hide');
+ commonUtil.showMessage(vm.$htmlText.saveSuccess, "success");
+ } else {
+ vm.server_rtn.warning_block = true;
+ vm.server_rtn.rtn_info = vm.$htmlText.saveFail;
+ commonUtil.showMessage(vm.$htmlText.saveFail, "failed");
}
- });
- } else {
- $.ajax({
- type : "PUT",
- url : vm.$restUrl.updateVnfmInfoUrl+vm.addVnfm.vnfmId,
- data : JSON.stringify(param),
- dataType : "json",
- contentType : "application/json",
- success : function(data) {
- vm.server_rtn.info_block=false;
- vm.server_rtn.warning_block=false;
- if (data) {
- for(var i=0;i<vm.vnfmInfo.length;i++){
- if(vm.vnfmInfo[i].vnfmId == vm.addVnfm.vnfmId) {
- vm.vnfmInfo[i].name = vm.addVnfm.name;
- vm.vnfmInfo[i].vimId = $("#vimId").val();
- vm.vnfmInfo[i].vendor = vm.addVnfm.vendor;
- vm.vnfmInfo[i].version = vm.addVnfm.version;
- vm.vnfmInfo[i].certificateUrl = vm.addVnfm.certificateUrl;
- vm.vnfmInfo[i].description = vm.addVnfm.description;
- vm.vnfmInfo[i].url = vm.addVnfm.url;
- vm.vnfmInfo[i].userName = vm.addVnfm.userName;
- vm.vnfmInfo[i].password = vm.addVnfm.password;
- }
- }
- $('#addVnfmDlg').modal('hide');
- commonUtil.showMessage(vm.$htmlText.updateSuccess,"success");
- } else {
- vm.server_rtn.warning_block=true;
- vm.server_rtn.rtn_info=vm.$htmlText.updateFail;
- commonUtil.showMessage(vm.$htmlText.updateFail, "failed");
- }
- },
- error: function(XMLHttpRequest, textStatus, errorThrown) {
- vm.server_rtn.warning_block=true;
- vm.server_rtn.rtn_info=textStatus+":"+errorThrown;
- vm.server_rtn.info_block=false;
- }
- });
- }
- },
- // mocRendered : function(action) {
- // if(vm.addVnfm.saveType === "update" && vm.addVnfm.moc) {
- // var items = vm.mocSelectItems;
- // for(var i=0;i<items.length;i++) {
- // if(items[i].id == vm.addVnfm.moc) {
- // $("#moc")[0].selectedIndex = i;
- // vm.$mocChange();
- // break;
- // }
- // }
- // } else {
- // $("#moc")[0].selectedIndex = 0;
- // }
- // },
- vimRendered : function(action) {
- var items = vm.vimSelectItems;
- if(vm.addVnfm.saveType === "update") {
- for(var i=0;i<items.length;i++) {
- if(items[i].vimId == vm.addVnfm.vimId) {
- $("#vimId")[0].selectedIndex = i;
- break;
- }
- }
- } else {
- $("#vimId")[0].selectedIndex = items.length-1;
- }
- },
- // $mocChange : function() {
- // var mocId = $('#moc').val();
- // if(mocId == "nfv.vnfm.tacker") {
- // vm.addVnfm.vimVisiable = true;
- // } else {
- // vm.addVnfm.vimVisiable = false;
- // }
- // },
- // $getVimId : function(mocId) {
- // if(vm.addVnfm.vimVisiable) {
- // return $("#vimId").val();
- // } else {
- // return "";
- // }
- // }
- });
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vm.server_rtn.warning_block = true;
+ vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;
+ vm.server_rtn.info_block = false;
+ }
+ });
+ } else {
+ $.ajax({
+ type: "PUT",
+ url: vm.$restUrl.updateVnfmInfoUrl + vm.addVnfm.vnfmId,
+ data: JSON.stringify(param),
+ dataType: "json",
+ contentType: "application/json",
+ success: function (data) {
+ vm.server_rtn.info_block = false;
+ vm.server_rtn.warning_block = false;
+ if (data) {
+ for (var i = 0; i < vm.vnfmInfo.length; i++) {
+ if (vm.vnfmInfo[i].vnfmId == vm.addVnfm.vnfmId) {
+ vm.vnfmInfo[i].name = vm.addVnfm.name;
+ vm.vnfmInfo[i].vimId = $("#vimId").val();
+ vm.vnfmInfo[i].vendor = vm.addVnfm.vendor;
+ vm.vnfmInfo[i].version = vm.addVnfm.version;
+ vm.vnfmInfo[i].certificateUrl = vm.addVnfm.certificateUrl;
+ vm.vnfmInfo[i].description = vm.addVnfm.description;
+ vm.vnfmInfo[i].url = vm.addVnfm.url;
+ vm.vnfmInfo[i].userName = vm.addVnfm.userName;
+ vm.vnfmInfo[i].password = vm.addVnfm.password;
+ }
+ }
+ $('#addVnfmDlg').modal('hide');
+ commonUtil.showMessage(vm.$htmlText.updateSuccess, "success");
+ } else {
+ vm.server_rtn.warning_block = true;
+ vm.server_rtn.rtn_info = vm.$htmlText.updateFail;
+ commonUtil.showMessage(vm.$htmlText.updateFail, "failed");
+ }
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ vm.server_rtn.warning_block = true;
+ vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;
+ vm.server_rtn.info_block = false;
+ }
+ });
+ }
+ },
+ // mocRendered : function(action) {
+ // if(vm.addVnfm.saveType === "update" && vm.addVnfm.moc) {
+ // var items = vm.mocSelectItems;
+ // for(var i=0;i<items.length;i++) {
+ // if(items[i].id == vm.addVnfm.moc) {
+ // $("#moc")[0].selectedIndex = i;
+ // vm.$mocChange();
+ // break;
+ // }
+ // }
+ // } else {
+ // $("#moc")[0].selectedIndex = 0;
+ // }
+ // },
+ vimRendered: function (action) {
+ var items = vm.vimSelectItems;
+ if (vm.addVnfm.saveType === "update") {
+ for (var i = 0; i < items.length; i++) {
+ if (items[i].vimId == vm.addVnfm.vimId) {
+ $("#vimId")[0].selectedIndex = i;
+ break;
+ }
+ }
+ } else {
+ $("#vimId")[0].selectedIndex = items.length - 1;
+ }
+ },
+ // $mocChange : function() {
+ // var mocId = $('#moc').val();
+ // if(mocId == "nfv.vnfm.tacker") {
+ // vm.addVnfm.vimVisiable = true;
+ // } else {
+ // vm.addVnfm.vimVisiable = false;
+ // }
+ // },
+ // $getVimId : function(mocId) {
+ // if(vm.addVnfm.vimVisiable) {
+ // return $("#vimId").val();
+ // } else {
+ // return "";
+ // }
+ // }
+ });
avalon.scan();
vm.$initTable();
//vm.$initMoc();
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmUtil.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmUtil.js
index 7438cf1..d4420b3 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmUtil.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/js/vnfmUtil.js
@@ -15,63 +15,63 @@
*/
var vnfmUtil = {};
-vnfmUtil.delVnfm = function(vnfmId) {
- bootbox.confirm($.i18n.prop("nfv-vnfm-iui-message-delete-confirm"), function(result){
- if(result){
- $.ajax({
- type : "DELETE",
- url : vm.$restUrl.delVnfmInfoUrl + vnfmId,
- dataType : "json",
- success : function(data,statusText,jqXHR) {
- if(jqXHR.status=="204") {
- for(var i=0;i<vm.vnfmInfo.length;i++){
- if(vnfmId == vm.vnfmInfo[i].vnfmId){
- //delete the vnfm object from vnfm array
- vm.vnfmInfo.splice(i, 1);
- break;
- }
- }
- commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-success"), "success");
- } else {
- commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-fail"), "warning");
- }
- },
- error : function() {
- commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-fail"), "warning");
- }
- });
- }
- });
+vnfmUtil.delVnfm = function (vnfmId) {
+ bootbox.confirm($.i18n.prop("nfv-vnfm-iui-message-delete-confirm"), function (result) {
+ if (result) {
+ $.ajax({
+ type: "DELETE",
+ url: vm.$restUrl.delVnfmInfoUrl + vnfmId,
+ dataType: "json",
+ success: function (data, statusText, jqXHR) {
+ if (jqXHR.status == "204") {
+ for (var i = 0; i < vm.vnfmInfo.length; i++) {
+ if (vnfmId == vm.vnfmInfo[i].vnfmId) {
+ //delete the vnfm object from vnfm array
+ vm.vnfmInfo.splice(i, 1);
+ break;
+ }
+ }
+ commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-success"), "success");
+ } else {
+ commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-fail"), "warning");
+ }
+ },
+ error: function () {
+ commonUtil.showMessage($.i18n.prop("nfv-vnfm-iui-message-delete-fail"), "warning");
+ }
+ });
+ }
+ });
}
-vnfmUtil.updateVnfm = function(data) {
- vm.addVnfm.vnfmId = data.vnfmId;
- vm.addVnfm.name = data.name;
- //vm.addVnfm.moc = data.moc;
- //vm.addVnfm.mocDisabled = true;
- vm.addVnfm.vendor = data.vendor;
- vm.addVnfm.version = data.version;
- vm.addVnfm.description = data.description;
- vm.addVnfm.type = data.type;
- vm.addVnfm.vimId = data.vimId;
- vm.addVnfm.url = data.url;
- vm.addVnfm.userName = data.userName;
- vm.addVnfm.password = data.password;
- vm.addVnfm.saveType = "update";
- vm.addVnfm.title = $.i18n.prop("nfv-vnfm-iui-test-update");
- vm.server_rtn.info_block=false;
- vm.server_rtn.warning_block=false;
- //vm.$initMoc();
- vm.$initVim();
+vnfmUtil.updateVnfm = function (data) {
+ vm.addVnfm.vnfmId = data.vnfmId;
+ vm.addVnfm.name = data.name;
+ //vm.addVnfm.moc = data.moc;
+ //vm.addVnfm.mocDisabled = true;
+ vm.addVnfm.vendor = data.vendor;
+ vm.addVnfm.version = data.version;
+ vm.addVnfm.description = data.description;
+ vm.addVnfm.type = data.type;
+ vm.addVnfm.vimId = data.vimId;
+ vm.addVnfm.url = data.url;
+ vm.addVnfm.userName = data.userName;
+ vm.addVnfm.password = data.password;
+ vm.addVnfm.saveType = "update";
+ vm.addVnfm.title = $.i18n.prop("nfv-vnfm-iui-test-update");
+ vm.server_rtn.info_block = false;
+ vm.server_rtn.warning_block = false;
+ //vm.$initMoc();
+ vm.$initVim();
- $(".form-group").each(function () {
- $(this).removeClass('has-success');
- $(this).removeClass('has-error');
- $(this).find(".help-block[id]").remove();
- });
- $("#addVnfmDlg").modal("show");
+ $(".form-group").each(function () {
+ $(this).removeClass('has-success');
+ $(this).removeClass('has-error');
+ $(this).find(".help-block[id]").remove();
+ });
+ $("#addVnfmDlg").modal("show");
}
-vnfmUtil.tooltipVnfmStatus = function() {
- $("[data-toggle='tooltip']").tooltip();
+vnfmUtil.tooltipVnfmStatus = function () {
+ $("[data-toggle='tooltip']").tooltip();
}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html
index 6256a8d..1a8053e 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html
@@ -18,205 +18,224 @@
<!DOCTYPE html>
<html>
<head lang="en">
-<meta charset="UTF-8">
-<title></title>
-<link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
-<link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
-<link href="../../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" />
-<link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet"/>
-<link href="../../common/css/ngict-component.css" rel="stylesheet"/>
-<link href="css/animate.min.css" rel="stylesheet"/>
-<link href="css/vnfm.css" rel="stylesheet" />
-<style>
-.ms-controller {
- visibility: hidden
-}
-</style>
+ <meta charset="UTF-8">
+ <title></title>
+ <link href="../../common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
+ <link href="../../common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
+ <link href="../../common/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet"/>
+ <link href="../../common/css/ZteIctIcons/style.css" rel="stylesheet"/>
+ <link href="../../common/css/ngict-component.css" rel="stylesheet"/>
+ <link href="css/animate.min.css" rel="stylesheet"/>
+ <link href="css/vnfm.css" rel="stylesheet"/>
+ <style>
+ .ms-controller {
+ visibility: hidden
+ }
+ </style>
</head>
<body>
- <div ms-controller="vnfmController" class="container-fluid ms-controller">
- <div id="addVnfmDlg" class="modal fade" tabindex="-1" role="dialog"
- aria-labelledby="myModalLabel" aria-hidden="true" >
- <div class="modal-dialog">
- <div class="modal-content Changepasswd">
- <div class="content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"
- aria-hidden="true">×</button>
- <h4 id="myModalLabel">{{addVnfm.title}}</h4>
- </div>
- <div class="modal-body">
- <form class="form-horizontal" id="vnfm_form" role="form">
- <input type="hidden" ms-duplex="addVnfm.vnfmId" name="vnfmId" class="form-control" />
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-name" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.name" name="name" class="form-control"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-type" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.type" name="type" class="form-control"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-vendor" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.vendor" name="vendor" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-version" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.version" name="version" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span>URL</span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.url" name="url" class="form-control"
- ms-attr-placeholder="addVnfm.urlTip"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-3 control-label">VIM
- <span></span>
- </label>
- <div class="col-sm-7">
- <select class="form-control" id="vimId" name="vimId">
- <option ms-repeat-vim="vimSelectItems" ms-attr-value="vim.vimId" data-repeat-rendered="vimRendered">{{vim.name}}</option>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-certificateUrl" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.certificateUrl" name="certificateUrl" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-userName" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addVnfm.userName" name="userName" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text-password" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- </label>
- <div class="col-sm-7">
- <input type="password" ms-duplex="addVnfm.password" name="password" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="nfv-vnfm-iui-text_description" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="" aria-required="" style="visibility: hidden;">*</span>
- </label>
- <div class="col-sm-7">
- <textarea class="form-control" rows="3" ms-duplex="addVnfm.description" name="description"></textarea>
- <span class="help-block"></span>
- </div>
- </div>
- </form>
+<div ms-controller="vnfmController" class="container-fluid ms-controller">
+ <div id="addVnfmDlg" class="modal fade" tabindex="-1" role="dialog"
+ aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content Changepasswd">
+ <div class="content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"
+ aria-hidden="true">×
+ </button>
+ <h4 id="myModalLabel">{{addVnfm.title}}</h4>
+ </div>
+ <div class="modal-body">
+ <form class="form-horizontal" id="vnfm_form" role="form">
+ <input type="hidden" ms-duplex="addVnfm.vnfmId" name="vnfmId" class="form-control"/>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-name" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.name" name="name" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-type" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.type" name="type" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-vendor" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.vendor" name="vendor" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-version" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.version" name="version" class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span>URL</span>
+ <span class="required" aria-required="true">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.url" name="url" class="form-control"
+ ms-attr-placeholder="addVnfm.urlTip"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">VIM
+ <span></span>
+ </label>
+ <div class="col-sm-7">
+ <select class="form-control" id="vimId" name="vimId">
+ <option ms-repeat-vim="vimSelectItems" ms-attr-value="vim.vimId"
+ data-repeat-rendered="vimRendered">{{vim.name}}
+ </option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-certificateUrl"
+ name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.certificateUrl" name="certificateUrl"
+ class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-userName" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" ms-duplex="addVnfm.userName" name="userName"
+ class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text-password" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </label>
+ <div class="col-sm-7">
+ <input type="password" ms-duplex="addVnfm.password" name="password"
+ class="form-control"/>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="control-label col-sm-3">
+ <span id="nfv-vnfm-iui-text_description" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="" aria-required="" style="visibility: hidden;">*</span>
+ </label>
+ <div class="col-sm-7">
+ <textarea class="form-control" rows="3" ms-duplex="addVnfm.description"
+ name="description"></textarea>
+ <span class="help-block"></span>
+ </div>
+ </div>
+ </form>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true" id="nfv-vnfm-iui-text-cancelBtn" name_i18n="com_zte_nfv_nsoc_i18n"></button>
- <button class="btn btn-primary" type="submit" ms-click="$saveVnfm" id="nfv-vnfm-iui-text-saveBtn" name_i18n="com_zte_nfv_nsoc_i18n"></button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row-fluid" data-name="cond_zone">
- <div class="col-md-12">
- <button class="btn white radius_l" id="app-new-btn" ms-click="$showVnfmTable" >
- <i class="ict-new"></i> <span id="nfv-vnfm-iui-text-registerBtn" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- </button>
- </div>
- </div>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true" id="nfv-vnfm-iui-text-cancelBtn"
+ name_i18n="com_zte_nfv_nsoc_i18n"></button>
+ <button class="btn btn-primary" type="submit" ms-click="$saveVnfm"
+ id="nfv-vnfm-iui-text-saveBtn" name_i18n="com_zte_nfv_nsoc_i18n"></button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row-fluid" data-name="cond_zone">
+ <div class="col-md-12">
+ <button class="btn white radius_l" id="app-new-btn" ms-click="$showVnfmTable">
+ <i class="ict-new"></i> <span id="nfv-vnfm-iui-text-registerBtn"
+ name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ </button>
+ </div>
+ </div>
- <div class="col-sm-12 vnfm-padding" ms-each-el="vnfmInfo">
- <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">
- <div class="hpanel stats" >
- <div class="panel-body h-200" ms-hover="hpanel_show" >
+ <div class="col-sm-12 vnfm-padding" ms-each-el="vnfmInfo">
+ <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">
+ <div class="hpanel stats">
+ <div class="panel-body h-200" ms-hover="hpanel_show">
<div class="pull-left">
- <span class="label label-success" ms-if="el.status === $Status.success" id="nfv-vnfm-iui-text-status-normal" name_i18n="com_zte_nfv_nsoc_i18n"></span>
- <span class="label label-danger" ms-attr-title="el.errorInfo" data-toggle="tooltip" ms-if="el.status === $Status.failed" id="nfv-vnfm-iui-text-status-fail" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="label label-success" ms-if="el.status === $Status.success"
+ id="nfv-vnfm-iui-text-status-normal" name_i18n="com_zte_nfv_nsoc_i18n"></span>
+ <span class="label label-danger" ms-attr-title="el.errorInfo" data-toggle="tooltip"
+ ms-if="el.status === $Status.failed" id="nfv-vnfm-iui-text-status-fail"
+ name_i18n="com_zte_nfv_nsoc_i18n"></span>
</div>
<div class="stats-icon pull-right">
<i class="fa fa-server fa-5x color_cloud"></i>
</div>
<div class="m-t-xl">
- <h3 ms-text="el.name"></h3>
- <div><span id="nfv-vnfm-iui-text-type" name_i18n="com_zte_nfv_nsoc_i18n"></span>:<span ms-text="el.type"></span></div>
+ <h3 ms-text="el.name"></h3>
+ <div><span id="nfv-vnfm-iui-text-type" name_i18n="com_zte_nfv_nsoc_i18n"></span>:<span
+ ms-text="el.type"></span></div>
<div>URL:<span ms-text="el.url"></span></div>
</div>
</div>
<div class="panel-footer">
- <div class="pull-right">
- <a class="btn btn-default btn-sm" ms-click="vnfmUtil.updateVnfm(el.$model)"><i class="fa fa-pencil-square-o fa-lg"></i></a>
- <a class="btn btn-default btn-sm" ms-click="vnfmUtil.delVnfm(el.vnfmId)"><i class="fa fa-trash-o fa-lg"> </i></a>
+ <div class="pull-right">
+ <a class="btn btn-default btn-sm" ms-click="vnfmUtil.updateVnfm(el.$model)"><i
+ class="fa fa-pencil-square-o fa-lg"></i></a>
+ <a class="btn btn-default btn-sm" ms-click="vnfmUtil.delVnfm(el.vnfmId)"><i
+ class="fa fa-trash-o fa-lg"> </i></a>
</div>
</div>
</div>
- </div>
+ </div>
</div>
<div class="col-sm-12">
<div class="pull-left text-muted">
- <small><span id="nfv-vnfm-iui-text-total" name_i18n="com_zte_nfv_nsoc_i18n"></span> <span class="blue-font" ms-text="vnfmInfo.size()"></span> <span id="nfv-vnfm-iui-text-total-vnfm" name_i18n="com_zte_nfv_nsoc_i18n"></span></small>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="../../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/bootbox/bootbox.min.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/jquery.validate.min.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
-
- <script type="text/javascript" src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/cometd/cometd.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/cometd/jquery.cometd.js"></script>
- <script type="text/javascript" src="../../common/thirdparty/avalon/avalon.js"></script>
+ <small><span id="nfv-vnfm-iui-text-total" name_i18n="com_zte_nfv_nsoc_i18n"></span> <span class="blue-font"
+ ms-text="vnfmInfo.size()"></span>
+ <span id="nfv-vnfm-iui-text-total-vnfm" name_i18n="com_zte_nfv_nsoc_i18n"></span></small>
+ </div>
+ </div>
+</div>
+<script type="text/javascript" src="../../common/thirdparty/jquery/jquery-1.10.2.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/bootbox/bootbox.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/jquery.validate.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
- <script type="text/javascript" src="../../common/js/tools.js"></script>
-
- <script type="text/javascript" src="js/commonUtil.js"></script>
- <script type="text/javascript" src="js/loadi18n_nsoc.js"></script>
-
- <script type="text/javascript" src="js/vnfm-validate.js"></script>
- <script type="text/javascript" src="js/vnfmUtil.js"></script>
- <script type="text/javascript" src="js/vnfmController.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/cometd/cometd.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/cometd/jquery.cometd.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/avalon/avalon.js"></script>
+
+<script type="text/javascript" src="../../common/js/tools.js"></script>
+
+<script type="text/javascript" src="js/commonUtil.js"></script>
+<script type="text/javascript" src="js/loadi18n_nsoc.js"></script>
+
+<script type="text/javascript" src="js/vnfm-validate.js"></script>
+<script type="text/javascript" src="js/vnfmUtil.js"></script>
+<script type="text/javascript" src="js/vnfmController.js"></script>
</body>
</html>
\ No newline at end of file