--- /dev/null
+{
+ "url": "http://127.0.0.1",
+ "port": "8080",
+ "context_name":"resmgr"
+}
\ No newline at end of file
<script type="text/javascript" src="js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="js/bootbox.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
-
+
+ <script type="text/javascript" src="js/gconf.js"></script>
<script type="text/javascript" src="js/datacenter.js"></script>
<style type="text/css">
}
function deleteDatacenter(objectId) {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters/" + objectId;
+ var requestUrl = app_url+ "/openoapi/resmgr/v1/datacenters/" + objectId;
$.ajax({
type: "DELETE",
url: requestUrl,
}
function loadDatacenterData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/datacenters";
$.ajax({
type: "GET",
url: requestUrl,
});
}
function loadNetWorkData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/networks";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/networks";
$.ajax({
type: "GET",
url: requestUrl,
});
}
function loadPortData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/ports";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/ports";
$.ajax({
type: "GET",
url: requestUrl,
});
}
function loadHostData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/hosts";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/hosts";
$.ajax({
type: "GET",
url: requestUrl,
function fillCountryData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/country";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations/country";
var htmlContent = "";
$.ajax({
type: "GET",
function fillVimNameData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/cloudservice";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations/cloudservice";
var htmlContent = "";
$.ajax({
type: "GET",
var formData = JSON.stringify($("#vmAppForm").serializeObject());
var jsonobj = JSON.parse(formData);
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/datacenters";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/datacenters";
$.ajax({
type: "POST",
url: requestUrl,
$('#country').change(function () {
var country = $(this).children('option:selected').val();
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/locationbycountry?country=" + country;
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations/locationbycountry?country=" + country;
var htmlContent = "<option value=''>--select--</option>";
$.ajax({
--- /dev/null
+/* Copyright 2016, Huawei Technologies Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var app_url;
+function getUrl(){
+ var url="";
+ $.ajax({
+ url:"./conf/globalconfig.json",
+ async:false,
+ dataType:"json",
+ success:function(jsonData) {
+ url = jsonData.url + ":" + jsonData.port +"/"+jsonData.context_name;
+ console.log("url = " + url);
+ }
+ });
+ return url;
+}
+app_url = getUrl();
// $('table tr').find('td:eq(0)').hide();
}
function deleteLocation(objectId) {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations/" + objectId;
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations/" + objectId;
$.ajax({
type: "DELETE",
url: requestUrl,
}
function loadLocationData() {
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations";
$.ajax({
type: "GET",
url: requestUrl,
function () {
var formData = JSON.stringify($("#vmAppForm").serializeObject());
var jsonobj = JSON.parse(formData);
- var requestUrl = "/resmgr/rest/openoapi/resmgr/v1/locations";
- var requestUrl_query = "/resmgr/rest/openoapi/resmgr/v1/locations";
+ var requestUrl = app_url+"/openoapi/resmgr/v1/locations";
+ var requestUrl_query = app_url+"/openoapi/resmgr/v1/locations";
if ($('#id').val().length === 0) {//create
function loadVimData() {
- var requestUrl = "/resmgr/rest/v1/resmanage/vim/vimInfo";
+ var requestUrl = app_url+"/v1/resmanage/vim/vimInfo";
$.ajax({
type: "GET",
url: requestUrl,
<script type="text/javascript" src="js/bootbox.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/validateset.js"></script>
-
+
+ <script type="text/javascript" src="js/gconf.js"></script>
<script type="text/javascript" src="js/resmgr.js"></script>
<style type="text/css">
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/chart.min.js"></script>
+ <script type="text/javascript" src="js/gconf.js"></script>
<script type="text/javascript" src="js/vim.js"></script>
<style type="text/css">
$('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_3_brAppTlMenuID').click(function () {\r
$('#accordionContent').attr('src', 'link.html');\r
});\r
+ \r
+ $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_4_locationID').click(function () {\r
+ $('#accordionContent').attr('src', '../resmgr-nfv/location.html');\r
+ });\r
+ $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_5_vimID').click(function () {\r
+ $('#accordionContent').attr('src', '../resmgr-nfv/vim.html');\r
+ });\r
+ $('#accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_6_datacenterID').click(function () {\r
+ $('#accordionContent').attr('src', '../resmgr-nfv/datacenter.html');\r
+ });\r
\r
})\r
</script>\r
nodeid="brAppTlMenuID" style="display: list-item;">\r
<a title="Link" style="padding-left: 62px;">Link</a>\r
</li>\r
+ \r
+ <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_4_locationID"\r
+ nodeid="brAppSiteMenuID" class="" style="display: list-item;">\r
+ <a title="Click to visit location" class="" style="padding-left: 62px;">Location</a>\r
+ </li>\r
+ <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_5_vimID"\r
+ nodeid="brAppMeMenuID" style="display: list-item;">\r
+ <a title="Click to visit vim" style="padding-left: 62px;">Vim</a>\r
+ </li>\r
+ <li id="accordionmenuid_ul_0_0_brAppTopMenuID_UL_1_6_datacenterID"\r
+ nodeid="brAppTpMenuID" style="display: list-item;">\r
+ <a title="Click to visit datacenter" style="padding-left: 62px;">DataCenter</a>\r
+ </li>\r
</ul>\r
</li>\r
</ul>\r