diff options
Diffstat (limited to 'openo-portal')
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html | 499 | ||||
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js | 272 |
2 files changed, 430 insertions, 341 deletions
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 69a9a997..1760666b 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 @@ -1,4 +1,3 @@ -<!DOCTYPE html>
<!--
Copyright 2016, Huawei Technologies Co., Ltd.
@@ -17,243 +16,321 @@ -->
+<!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">
+<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
+ //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>
+ 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>
<body id="open_base_site_cotentBody" class="cotentBody ng-scope">
- <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 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"><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></div>
+ <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
+ 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">
+ <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>
+ </div>
+ </div>
</div>
</div>
- </div>
-
- <div class="row-fluid" data-name="table_zone">
- <div id='ict_virtualApplication_table_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="5" data-pagination-first-text="First" data-pagination-pre-text="Previous" data-pagination-next-text="Next" data-pagination-last-text="Last">
+ <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
- </span>
- </div>
- </th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="logicalType" 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
+ <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
</span>
- </div>
- </th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="layerRate" 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 Name
+ </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
</span>
- </div>
- </th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="aEnd" 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
+ </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
+ 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 ">
+ <span id="ctrler_type_sorticon"
+ 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="zEnd" 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
+ </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
</span>
- </div>
- </th>
-
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="aEndME" 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
- </span>
- </div>
- </th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="zEndME" 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
+ </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 ">
+ <span id="ctrler_version_sorticon"
+ 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="adminState" 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 Time
+ </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
</span>
- </div>
- </th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign" data-field="operState" 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
+ </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
+ 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 ">
+ <span id="ctrler_operation_sorticon"
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Operation
</span>
- </div>
- </th>
- </tr>
- </thead>
- <tbody>
- </tbody>
+ </div>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
</table>
</div>
</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
+ class="required">*</span>
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="name" name="name" class="form-control" />
+ </div>
+ </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>
+ </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>
+ </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>
+ </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>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>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>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>
+ </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>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>
+ </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 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="linkForm">
- <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>
- </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="logicalType"
- name="logicalType">
- <option value="fiberLink">Fiber Link</option>
- <option value="l2Link">L2 Link</option>
- <option value="ipLink">IP Link</option>
- <option value="electricalLink">Electrical Link</option>
- </select>
- </div>
- </div>
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label">
- <span>Layer Rate</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="layerRate" name="layerRate" class="form-control"/>
- </div>
- </div>
-
-
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label">
- <span>Source Port</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="aEnd" name="aEnd" class="form-control"/>
- </div>
- </div>
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label">
- <span>Sink Port</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="zEnd" name="zEnd" class="form-control"/>
- </div>
- </div>
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label">
- <span>Source NE</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="aEndMe" name="aEndME" class="form-control"/>
- </div>
- </div>
- <div class="form-group" ms-class="has-error:vmAppDialog.name==''">
- <label class="col-sm-3 control-label">
- <span>Sink NE</span>
- </label>
- <div class="col-sm-7">
- <input type="text" id="zEndMe" name="zEndME" class="form-control"/>
- </div>
- </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>
- </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>
+ </div>
+ </form>
+ </div>
+ </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>
</body>
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 476f2031..35da7296 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 @@ -12,148 +12,160 @@ * See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-$('.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);
- }
-});
+$('.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 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);
+ }
+ });
+}
-function deleteController(objectId){
- var requestUrl = "http://localhost:8080/org.openo.sdno.brs/openoapi/sdnobrs/v1/topological-links/"+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);
+ }
+ });
}
+$(function() {
+ $('.creat-btn').click(function() {
+ $('#vmAppDialog').addClass('in').css({
+ 'display' : 'block'
+ });
-function loadControllerData(){
- var requestUrl = "http://localhost:8080/org.openo.sdno.brs/openoapi/sdnobrs/v1/topological-links";
- $
- .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);
- }
- });
-}
+ });
+ $('.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');
+ });
-$(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');
+ $('.table tbody tr').click(
+ function() {
+ $(this).addClass('openoTable_row_selected').siblings()
+ .removeClass('openoTable_row_selected');
});
-
- $('.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');
+ $('.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});
+ 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(){
+ $('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_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;
- };
+ $.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 = "http://localhost:8080/org.openo.sdno.brs/openoapi/sdnobrs/v1/topological-links";
- $
- .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);
- }
- });
- });
-
- })
\ No newline at end of file + $('#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);
+ }
+ });
+ });
+
+})
\ No newline at end of file |