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: Various minor updates
Rich Turner04a5189de6f5
diff --git a/ui/app/console_loader/package.json b/ui/app/console_loader/package.jsonindex e6494f644..c8612762e 100644--- a/ui/app/console_loader/package.json+++ b/ui/app/console_loader/package.json@@ -13,7 +13,7 @@"modelBuild": "npx orutil build","modelWatch": "npx orutil watch","build": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --mode production",- "serve": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --host 0.0.0.0 --mode development",+ "serve": "npx orutil build && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --host 0.0.0.0 --mode development","test": "echo \"Error: no test specified\" && exit 1"},"dependencies": {diff --git a/ui/app/manager/package.json b/ui/app/manager/package.jsonindex 02de977fa..a625cd7c2 100644--- a/ui/app/manager/package.json+++ b/ui/app/manager/package.json@@ -20,7 +20,7 @@"modelBuild": "npx orutil build","modelWatch": "npx orutil watch","build": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --mode production",- "serve": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --mode development",+ "serve": "npx orutil build && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --mode development","test": "echo \"Error: no test specified\" && exit 1"},"dependencies": {diff --git a/ui/component/or-app/src/index.ts b/ui/component/or-app/src/index.tsindex 39b4dd32b..6bcae97fc 100644--- a/ui/component/or-app/src/index.ts+++ b/ui/component/or-app/src/index.ts@@ -30,6 +30,7 @@ const DefaultLogo = require("../images/logo.svg");const DefaultMobileLogo = require("../images/logo-mobile.svg");const DefaultFavIcon = require("../images/favicon.ico");+export {AnyAction};export * from "./app";export * from "./or-header";export * from "./types";@@ -365,7 +366,7 @@ export class OrApp<S extends AppStateKeyed> extends LitElement {showDialog(new OrMwcDialog().setHeading("language").setDismissAction(null)- .setActions(Object.entries(DEFAULT_LANGUAGES).map(([key, value]) => {+ .setActions(Object.entries(this.appConfig!.languages || DEFAULT_LANGUAGES).map(([key, value]) => {return {content: i18next.t(value),actionName: key,diff --git a/ui/component/or-app/src/types.ts b/ui/component/or-app/src/types.tsindex 98eacd6cd..fad20f298 100644--- a/ui/component/or-app/src/types.ts+++ b/ui/component/or-app/src/types.ts@@ -1,4 +1,4 @@-import {HeaderConfig} from "./or-header";+import {HeaderConfig, Languages} from "./or-header";import {AppStateKeyed} from "./app";import { TemplateResult, LitElement } from "lit";import i18next from "i18next";@@ -22,6 +22,7 @@ export interface RealmAppConfig {export interface AppConfig<S extends AppStateKeyed> {pages: PageProvider<S>[];+ languages?: Languages;superUserHeader?: HeaderConfig;realms?: {// @ts-ignorediff --git a/ui/util/webpack.util.js b/ui/util/webpack.util.jsindex 8df95b954..b8bf9d7a7 100644--- a/ui/util/webpack.util.js+++ b/ui/util/webpack.util.js@@ -126,17 +126,17 @@ function getAppConfig(mode, isDevServer, dirname, managerUrl, keycloakUrl) {];// Load source maps generated by typescript- config.devtool = 'inline-source-map';- // config.module.rules.push(- // {- // test: /\.js$/,- // use: ["source-map-loader"],- // enforce: "pre",- // exclude: [- // /node_modules/- // ]- // },- // );+ // config.devtool = 'inline-source-map';+ config.module.rules.push(+ {+ test: /\.js$/,+ use: ["source-map-loader"],+ enforce: "pre",+ exclude: [+ /node_modules/+ ]+ },+ );}// Build list of resources to copy