aboutsummaryrefslogtreecommitdiffstats
path: root/gui-pdp-monitoring/src/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'gui-pdp-monitoring/src/webapp')
-rw-r--r--gui-pdp-monitoring/src/webapp/js/MonitoringConfig.js5
-rw-r--r--gui-pdp-monitoring/src/webapp/js/MonitoringMain.js8
-rw-r--r--gui-pdp-monitoring/src/webapp/webpack.config.js5
3 files changed, 10 insertions, 8 deletions
diff --git a/gui-pdp-monitoring/src/webapp/js/MonitoringConfig.js b/gui-pdp-monitoring/src/webapp/js/MonitoringConfig.js
index f929282..6e5200e 100644
--- a/gui-pdp-monitoring/src/webapp/js/MonitoringConfig.js
+++ b/gui-pdp-monitoring/src/webapp/js/MonitoringConfig.js
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@
// Configuration used for page layout and charts
const config = {
refresh: 5000,
- restPort: 17999,
engineService: {
parent: "engineService",
tableId: "engineServicesTable",
@@ -124,4 +123,4 @@ const config = {
}
};
-export { config, }; \ No newline at end of file
+export { config, };
diff --git a/gui-pdp-monitoring/src/webapp/js/MonitoringMain.js b/gui-pdp-monitoring/src/webapp/js/MonitoringMain.js
index 9198d63..48aa96c 100644
--- a/gui-pdp-monitoring/src/webapp/js/MonitoringMain.js
+++ b/gui-pdp-monitoring/src/webapp/js/MonitoringMain.js
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,8 +68,8 @@ function readyCallback() {
window.restRootURL = location.protocol
+ "//"
+ window.location.hostname
- + ':' + config.restPort
- + (location.pathname.endsWith("/monitoring/") ? location.pathname.substring(0, location.pathname.indexOf("monitoring/")) : location.pathname)
+ + ':' + window.location.port
+ + window.location.pathname
+ "papservices/monitoring/";
// Initialize tooltip for the charts
initTooltip();
@@ -108,4 +108,4 @@ function readyCallback() {
$(document).ready(readyCallback);
// Export for unit testing
-export { readyCallback, servicesCallback }; \ No newline at end of file
+export { readyCallback, servicesCallback };
diff --git a/gui-pdp-monitoring/src/webapp/webpack.config.js b/gui-pdp-monitoring/src/webapp/webpack.config.js
index f387ebe..4b1c179 100644
--- a/gui-pdp-monitoring/src/webapp/webpack.config.js
+++ b/gui-pdp-monitoring/src/webapp/webpack.config.js
@@ -10,6 +10,9 @@ module.exports = {
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
- port: 9000
+ port: 9000,
+ proxy: {
+ "/papservices/monitoring": "http://localhost:17999",
+ }
}
};