summaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-extsys
diff options
context:
space:
mode:
authoryuhao10 <yuhao10@huawei.com>2016-10-29 11:07:10 +0800
committeryuhao10 <yuhao10@huawei.com>2016-10-29 12:08:21 +0800
commit2b340a445aa07d38fcbd2eff8d7cdb6c3d7cf518 (patch)
tree8ac033e5942c595770a62587f778ef8c7aba107b /openo-portal/portal-extsys
parent34766df33b206e306365284193dd6d12aa3e2b44 (diff)
fix all bug in sdno resource page and controller page.
delete all the idea configuration files in source code. rewrite the storage and query function in controller page. fix wrong logic in ne, link, port, site page and brs.js. SDNO-805 Change-Id: I2fdecc186a5790a9b27c4cade8aa78c3d1575f6e Signed-off-by: yuhao10 <yuhao10@huawei.com>
Diffstat (limited to 'openo-portal/portal-extsys')
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html22
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js19
2 files changed, 17 insertions, 24 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 e933c786..635cfb2d 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
@@ -32,13 +32,7 @@
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
-
- var jsondata = loadControllerData();
-
- $('#controller').bootstrapTable({
- //Assigning data to table
- data: jsondata
- });
+ loadControllerData();
});
function operateFormatter(value, row, index) {
return ['<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />']
@@ -48,8 +42,7 @@
window.operateEvents = {
'click .siteDeleteImg': function (e, value, row, index) {
// TO DO ajex call for delete
- deleteLink(row.id);
- console.log(value, row, index);
+ deleteController(row.id, row);
}
};
</script>
@@ -177,6 +170,15 @@
</span>
</div>
</th>
+ <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ align="center" data-formatter="operateFormatter" data-events="operateEvents">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <span id="ctrler_nativeID_sorticon"
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Actions
+ </span>
+ </div>
+ </th>
</tr>
</thead>
<tbody>
@@ -299,7 +301,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn SDBtn" data-dismiss="modal" aria-hidden="true"
- id="createLink">
+ id="createController">
<span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span>
</button>
<button type="button" class="btn button-previous SDBtn">
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 04437df9..df0fef51 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
@@ -13,11 +13,6 @@
* limitations under the License.
*/
-var url = "";
-$.getJSON("./conf/dataconfig.json", function (jsonData){
- url = jsonData.url +":"+ jsonData.port;
- console.log("URL = " + url);
-});
$('.siteDeleteImg').click(
function () {
@@ -35,7 +30,7 @@ $('.siteDeleteImg').click(
});
function deleteController(objectId) {
- var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers/" + objectId;
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers/" + objectId;
$.ajax({
type: "DELETE",
url: requestUrl,
@@ -54,14 +49,14 @@ function deleteController(objectId) {
}
function loadControllerData() {
- var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers";
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "GET",
url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
$('#controller').bootstrapTable({
- data: jsonobj.topologicalControllers
+ data: jsonobj
});
},
error: function (xhr, ajaxOptions, thrownError) {
@@ -150,11 +145,7 @@ $(function () {
$('#createController').click(function () {
var formData = JSON.stringify($("#controllerForm").serializeObject());
var jsonobj = JSON.parse(formData);
- var newJson = {
- "topologicalController": jsonobj
- };
- formData = JSON.stringify(newJson);
- var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers";
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "POST",
url: requestUrl,
@@ -163,7 +154,7 @@ $(function () {
data: formData,
success: function (jsonResp) {
alert("Controller saved successfully!!!");
- jsonobj["id"] = jsonResp.topologicalController.id;
+ jsonobj["id"] = jsonResp.sdnControllerId;
$('#controller').bootstrapTable("append", jsonobj);
$('#vmAppDialog').removeClass('in').css('display', 'none');