summaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-resmgr
diff options
context:
space:
mode:
authorSeshu-Kumar-M <seshu.kumar.m@huawei.com>2016-10-05 19:21:44 +0800
committerSeshu-Kumar-M <seshu.kumar.m@huawei.com>2016-10-05 19:21:44 +0800
commit98b946a9dc5db166cc6d0c74fd074f3a92fc580a (patch)
tree8aedfb5c47e8bb84b6ceec554a3f46e32c283e80 /openo-portal/portal-resmgr
parent95bee9808a212126c886f603d6b64351825d58ba (diff)
Dynamic config for the server IP and port
Change-Id: I40cacf0cff624411196760fa5d284f3bf9bc2ec2 Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
Diffstat (limited to 'openo-portal/portal-resmgr')
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json4
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js29
2 files changed, 21 insertions, 12 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
new file mode 100644
index 00000000..87e36cfd
--- /dev/null
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/conf/dataconfig.json
@@ -0,0 +1,4 @@
+{
+ "url": "http://localhost",
+ "port": "8080"
+} \ 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 90489c5b..df28de3f 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,6 +12,11 @@
* 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 + "/org.openo.sdno.brs";
+ console.log("URL = " + url);
+});
$('.siteDeleteImg').click(function () {
var data = $(this).parent().parent().parent().find('td:last').find('div:last').html();
@@ -27,7 +32,7 @@ $('.siteDeleteImg').click(function () {
function deleteSite(objectId) {
- var requestUrl = "/openoapi/sdnobrs/v1/sites/" + objectId;
+ var requestUrl = url+"/openoapi/sdnobrs/v1/sites/" + objectId;
$
.ajax({
type: "DELETE",
@@ -46,7 +51,7 @@ function deleteSite(objectId) {
});
}
function deleteLink(objectId) {
- var requestUrl = "/openoapi/sdnobrs/v1/topological-links/" + objectId;
+ var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links/" + objectId;
$
.ajax({
type: "DELETE",
@@ -66,7 +71,7 @@ function deleteLink(objectId) {
}
function deleteNe(objectId) {
- var requestUrl = "/openoapi/sdnobrs/v1/managed-elements/" + objectId;
+ var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements/" + objectId;
$
.ajax({
type: "DELETE",
@@ -86,7 +91,7 @@ function deleteNe(objectId) {
}
function deletePort(objectId) {
- var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points/" + objectId;
+ var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points/" + objectId;
$
.ajax({
type: "DELETE",
@@ -105,7 +110,7 @@ function deletePort(objectId) {
});
}
function loadSiteData() {
- var requestUrl = "/openoapi/sdnobrs/v1/sites";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/sites";
$
.ajax({
type: "GET",
@@ -122,7 +127,7 @@ function loadSiteData() {
});
}
function loadLinkData() {
- var requestUrl = "/openoapi/sdnobrs/v1/topological-links";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links";
$
.ajax({
type: "GET",
@@ -139,7 +144,7 @@ function loadLinkData() {
});
}
function loadNeData() {
- var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements";
$
.ajax({
type: "GET",
@@ -156,7 +161,7 @@ function loadNeData() {
});
}
function loadPortData() {
- var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points";
$
.ajax({
type: "GET",
@@ -240,7 +245,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"site": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/sdnobrs/v1/sites";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/sites";
$
.ajax({
type: "POST",
@@ -265,7 +270,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"managedElement": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/managed-elements";
$
.ajax({
type: "POST",
@@ -291,7 +296,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"logicalTerminationPoint": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/logical-termination-points";
$
.ajax({
type: "POST",
@@ -318,7 +323,7 @@ $(function () {
var jsonobj = JSON.parse(formData);
var newJson = {"topologicalLink": jsonobj};
formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/sdnobrs/v1/topological-links";
+ var requestUrl = url+"/openoapi/sdnobrs/v1/topological-links";
$
.ajax({
type: "POST",