summaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-resmgr/src
diff options
context:
space:
mode:
Diffstat (limited to 'openo-portal/portal-resmgr/src')
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json5
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js70
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/link.html9
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html36
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html9
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/resource.html23
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/site.html10
7 files changed, 82 insertions, 80 deletions
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json
index 87e36cfd..f7ee6178 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json
@@ -1,4 +1,5 @@
{
- "url": "http://localhost",
- "port": "8080"
+ "url": "http://127.0.0.1",
+ "port": "8080",
+ "context_name":"resmgr"
} \ No newline at end of file
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
index 2a27603e..27a70d02 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
@@ -12,12 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-var url = "";
-$.getJSON("./conf/dataconfig.json", function (jsonData){
- url = jsonData.url +":"+ jsonData.port;
- console.log("URL = " + url);
-});
-
$('.siteDeleteImg').click(function () {
var data = $(this).parent().parent().parent().find('td:last').find('div:last').html();
alert(data);
@@ -31,8 +25,12 @@ $('.siteDeleteImg').click(function () {
});
+function hideFirstCol() {
+ //$('table tr').find('th:eq(0)').hide();
+ //$('table tr').find('td:eq(0)').hide();
+}
function deleteSite(objectId) {
- var requestUrl = url+"/openoapi/sdnobrs/v1/sites/" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/sites/" + objectId;
$
.ajax({
type: "DELETE",
@@ -51,7 +49,7 @@ function deleteSite(objectId) {
});
}
function deleteLink(objectId) {
- var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links/" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/topological-links/" + objectId;
$
.ajax({
type: "DELETE",
@@ -71,7 +69,7 @@ function deleteLink(objectId) {
}
function deleteNe(objectId) {
- var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements/" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/managed-elements/" + objectId;
$
.ajax({
type: "DELETE",
@@ -91,7 +89,7 @@ function deleteNe(objectId) {
}
function deletePort(objectId) {
- var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points/" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points/" + objectId;
$
.ajax({
type: "DELETE",
@@ -110,7 +108,7 @@ function deletePort(objectId) {
});
}
function loadSiteData() {
- var requestUrl = url+"/openoapi/sdnobrs/v1/sites";
+ var requestUrl = "/openoapi/sdnobrs/v1/sites";
$
.ajax({
type: "GET",
@@ -127,7 +125,7 @@ function loadSiteData() {
});
}
function loadLinkData() {
- var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links";
+ var requestUrl = "/openoapi/sdnobrs/v1/topological-links";
$
.ajax({
type: "GET",
@@ -144,16 +142,21 @@ function loadLinkData() {
});
}
function loadNeData() {
- var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements";
+
+ var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
$
.ajax({
type: "GET",
url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
+ var nedata = jsonobj.managedElements;
$('#ne').bootstrapTable({
- data: jsonobj.managedElements
+ data: nedata
});
+ $('#ne').bootstrapTable('refresh');
+ hideFirstCol();
+
},
error: function (xhr, ajaxOptions, thrownError) {
alert("Error on getting ne data : " + xhr.responseText);
@@ -161,7 +164,7 @@ function loadNeData() {
});
}
function loadPortData() {
- var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points";
+ var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points";
$
.ajax({
type: "GET",
@@ -177,6 +180,34 @@ function loadPortData() {
}
});
}
+function loadControllerData() {
+ var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
+ $.ajax({
+ type: "GET",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ fillSelect(jsonobj);
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ alert("Error on getting controller data : " + xhr.responseText);
+ }
+ });
+}
+function fillSelect(str){
+ var json;
+ if(typeof str === 'object'){
+ json = str;
+ }
+ else{
+ json = eval('(' + str + ')');
+ }
+ var seleObj = $('#controller')
+ seleObj.find("option").remove();
+ for(var i=0;i < json.length;i++){
+ seleObj.append('<option value="'+json[i].name+'">'+json[i].name+'</option>');
+ }
+}
$(function () {
$('.creat-btn').click(function () {
$('#vmAppDialog').addClass('in').css({'display': 'block'});
@@ -206,6 +237,7 @@ $(function () {
});
$('.table tr:odd').addClass('active');
$('#false').click(function () {
+ loadControllerData();
$('#vmAppDialog').addClass('in').css({'display': 'block'});
});
$('.close,.button-previous').click(function () {
@@ -245,7 +277,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"site": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = url+"/openoapi/sdnobrs/v1/sites";
+ var requestUrl = "/openoapi/sdnobrs/v1/sites";
$
.ajax({
type: "POST",
@@ -270,7 +302,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"managedElement": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements";
+ var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
$
.ajax({
type: "POST",
@@ -296,7 +328,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"logicalTerminationPoint": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points";
+ var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points";
$
.ajax({
type: "POST",
@@ -323,7 +355,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"topologicalLink": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links";
+ var requestUrl = "/openoapi/sdnobrs/v1/topological-links";
$
.ajax({
type: "POST",
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/link.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/link.html
index 19dfa6dc..5110344a 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/link.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/link.html
@@ -32,14 +32,7 @@
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
-
-
- var jsondata = loadLinkData();
-
- $('#link').bootstrapTable({
- //Assigning data to table
- data: jsondata
- });
+ loadLinkData();
});
function operateFormatter(value, row, index) {
return [
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
index 4a1f9fdc..518da3ee 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
@@ -31,14 +31,10 @@
<script type="text/javascript" src="js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
+
$(document).ready(function () {
- var jsondata = [];
- jsondata = loadNeData();
- $('#ne').bootstrapTable({
- //Assigning data to table
- data: jsondata
- });
+ loadNeData();
});
function operateFormatter(value, row, index) {
return [
@@ -146,6 +142,15 @@
</div>
</th>
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="nativeID" data-sortable="true" data-filter-control="input">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <span id="native_Id"
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Native Id
+ </span>
+ </div>
+ </th>
+ <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="ipAddress" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -321,11 +326,20 @@
<span>Controller</span>&nbsp;&nbsp;&nbsp;
</label>
<div class="col-sm-7">
- <select class="form-control" style="padding-top: 0px;padding-bottom: 0px;"
- id="controller"
- name="controller">
- <option value="Type1">Type1</option>
- </select>
+ <select class="form-control" style="padding-top: 0px;padding-bottom: 0px;"
+ id="controller"
+ name="controller">
+ <option value="Type1">No controller</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">
+ <span>Native ID</span>&nbsp;&nbsp;&nbsp;
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="nativeID" name="nativeID" class="form-control"
+ placeholder="Native ID"/>
</div>
</div>
<div class="form-group">
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
index 70c25652..ba0d5ec2 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
@@ -32,14 +32,7 @@
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
-
- var jsondata = [];
- jsondata = loadPortData();
-
- $('#port').bootstrapTable({
- //Assigning data to table
- data: jsondata
- });
+ loadPortData();
});
function operateFormatter(value, row, index) {
return [
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/resource.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/resource.html
index 0e0f1ec3..0625f70c 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/resource.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/resource.html
@@ -69,16 +69,6 @@
$('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_3_brAppTlMenuID').click(function () {
$('#accordionContent').attr('src', 'link.html');
});
-
- $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_4_locationID').click(function () {
- $('#accordionContent').attr('src', '../resmgr-nfv/location.html');
- });
- $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_5_vimID').click(function () {
- $('#accordionContent').attr('src', '../resmgr-nfv/vim.html');
- });
- $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_6_datacenterID').click(function () {
- $('#accordionContent').attr('src', '../resmgr-nfv/datacenter.html');
- });
})
</script>
@@ -127,19 +117,6 @@
nodeid="brAppTlMenuID" style="display: list-item;">
<a title="Link" style="padding-left: 62px;">Link</a>
</li>
-
- <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_4_locationID"
- nodeid="brAppSiteMenuID" class="" style="display: list-item;">
- <a title="Click to visit location" class="" style="padding-left: 62px;">Location</a>
- </li>
- <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_5_vimID"
- nodeid="brAppMeMenuID" style="display: list-item;">
- <a title="Click to visit vim" style="padding-left: 62px;">Vim</a>
- </li>
- <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_6_datacenterID"
- nodeid="brAppTpMenuID" style="display: list-item;">
- <a title="Click to visit datacenter" style="padding-left: 62px;">DataCenter</a>
- </li>
</ul>
</li>
</ul>
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/site.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/site.html
index b0d6b54a..03604ff9 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/site.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/site.html
@@ -35,15 +35,7 @@
</style>
<script type="text/javascript">
$(document).ready(function () {
-
- var jsondata = [];
- jsondata = loadSiteData();
- $('#site').bootstrapTable({
- //Assigning data to table
- data: jsondata
- });
-
-
+ loadSiteData();
});
function operateFormatter(value, row, index) {