diff options
Diffstat (limited to 'openo-portal/portal-extsys/src')
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json | 4 | ||||
-rw-r--r-- | openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json new file mode 100644 index 00000000..87e36cfd --- /dev/null +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/conf/dataconfig.json @@ -0,0 +1,4 @@ +{
+ "url": "http://localhost",
+ "port": "8080"
+}
\ 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 fa2f88f1..04437df9 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,6 +13,12 @@ * 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(
@@ -29,7 +35,7 @@ $('.siteDeleteImg').click( });
function deleteController(objectId) {
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers/" + objectId;
+ var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers/" + objectId;
$.ajax({
type: "DELETE",
url: requestUrl,
@@ -48,7 +54,7 @@ function deleteController(objectId) { }
function loadControllerData() {
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
+ var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "GET",
url: requestUrl,
@@ -148,7 +154,7 @@ $(function () { "topologicalController": jsonobj
};
formData = JSON.stringify(newJson);
- var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
+ var requestUrl = url + "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "POST",
url: requestUrl,
|