100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
UI updates: webpack console output to explain how to customise paths in development
Rich Turner87b5933a1875
diff --git a/ui/app/manager/webpack.config.js b/ui/app/manager/webpack.config.jsindex 46db4f72e..8577939a7 100644--- a/ui/app/manager/webpack.config.js+++ b/ui/app/manager/webpack.config.js@@ -8,20 +8,24 @@ module.exports = (env, argv) => {const managerUrl = env.managerUrl;const keycloakUrl = env.keycloakUrl;const IS_DEV_SERVER = !!process.argv.find(arg => arg.includes("serve"));++ if (IS_DEV_SERVER) {+ console.log("");+ console.log("To set a path to a custom manager_config.json use the config environment argument with a path");+ console.log("relative to this app e.g: ");+ console.log("");+ console.log("npm run serve -- --env config=../../../manager_config.json");+ console.log("");+ }+const config = util.getAppConfig(argv.mode, IS_DEV_SERVER, __dirname, managerUrl, keycloakUrl);if (IS_DEV_SERVER) {- console.log("")- console.log("To set a path to a custom manager_config.json use the config environment argument with a path")- console.log("relative to this app e.g: ")- console.log("")- console.log("npm run serve -- --env config=../../../manager_config.json")- console.log("")+ console.log("CUSTOM_CONFIG_DIR: " + customConfigDir || "");+ console.log("");}if (IS_DEV_SERVER && customConfigDir) {- console.log("CUSTOM_CONFIG_DIR: " + customConfigDir);-// Try and include the static files in the specified config dir if we're in dev server modeconfig.plugins.push(new CopyWebpackPlugin({patterns: [diff --git a/ui/util/webpack.util.js b/ui/util/webpack.util.jsindex 3898ea88a..975f013cf 100644--- a/ui/util/webpack.util.js+++ b/ui/util/webpack.util.js@@ -47,6 +47,19 @@ function getAppConfig(mode, isDevServer, dirname, managerUrl, keycloakUrl) {managerUrl = managerUrl || (production && !isDevServer ? undefined : "http://localhost:8080");const OUTPUT_PATH = isDevServer ? 'src' : 'dist';+ if (isDevServer) {+ console.log("");+ console.log("To customise the URL of the manager and/or keycloak use the managerUrl and/or keycloakUrl");+ console.log(" environment arguments e.g: ");+ console.log("");+ console.log("npm run serve -- --env managerUrl=https://localhost");+ console.log("npm run serve -- --env keycloakUrl=https://localhost/auth");+ console.log("");+ console.log("MANAGER URL: " + managerUrl || "");+ console.log("KEYCLOAK URL: " + keycloakUrl || (managerUrl + "/auth"));+ console.log("");+ }+const config = {entry: {'bundle': './src/index.ts'