CLIENT GUI Framework
[vnfsdk/refrepo.git] / openo-portal / portal-resmgr / src / main / webapp / resmgr-nfv / js / gconf.js
1 /* Copyright 2016-2017, Huawei Technologies Co., Ltd.\r
2  *\r
3  * Licensed under the Apache License, Version 2.0 (the "License");\r
4  * you may not use this file except in compliance with the License.\r
5  * You may obtain a copy of the License at\r
6  *\r
7  *    http://www.apache.org/licenses/LICENSE-2.0\r
8  *\r
9  * Unless required by applicable law or agreed to in writing, software\r
10  * distributed under the License is distributed on an "AS IS" BASIS,\r
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12  * See the License for the specific language governing permissions and\r
13  * limitations under the License.\r
14  */\r
15 \r
16 \r
17 var app_url;\r
18 function getUrl(){\r
19         var url="";\r
20         $.ajax({\r
21                 url:"./conf/globalconfig.json",\r
22                 async:false,\r
23                 dataType:"json",\r
24                 success:function(jsonData) {\r
25                         url = jsonData.url + ":" + jsonData.port +"/"+jsonData.context_name;\r
26                         console.log("url = " + url);\r
27                 }\r
28         });\r
29         return url;\r
30 }\r
31 app_url = getUrl();\r