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
Fix rules editor, update language, save kpi period
Robin Dekkers36fb056680bd
diff --git a/deployment/manager/shared/locales/de/or.json b/deployment/manager/shared/locales/de/or.jsonindex 429282651..27ed7f35e 100644--- a/deployment/manager/shared/locales/de/or.json+++ b/deployment/manager/shared/locales/de/or.json@@ -183,7 +183,7 @@"NUMBER": "%.0f","TEMPERATURE": "%.1f","POWER": "%.1f",- "CURRENCY": "%.1f",+ "CURRENCY": "%.3f","SPEED": "%.1f","CHARGE": "%.1f","ENERGY": "%.3f",diff --git a/deployment/manager/shared/locales/en/or.json b/deployment/manager/shared/locales/en/or.jsonindex 05084da6a..0e0452e8b 100644--- a/deployment/manager/shared/locales/en/or.json+++ b/deployment/manager/shared/locales/en/or.json@@ -198,7 +198,7 @@"NUMBER": "%.0f","TEMPERATURE": "%.1f","POWER": "%.1f",- "CURRENCY": "%.1f",+ "CURRENCY": "%.3f","SPEED": "%.1f","CHARGE": "%.1f","ENERGY": "%.3f",diff --git a/deployment/manager/shared/locales/es/or.json b/deployment/manager/shared/locales/es/or.jsonindex 731ae2025..6d0e52062 100644--- a/deployment/manager/shared/locales/es/or.json+++ b/deployment/manager/shared/locales/es/or.json@@ -184,7 +184,7 @@"NUMBER": "%.0f","TEMPERATURE": "%.1f","POWER": "%.1f",- "CURRENCY": "%.1f",+ "CURRENCY": "%.3f","SPEED": "%.1f","CHARGE": "%.1f","ENERGY": "%.3f",diff --git a/deployment/manager/shared/locales/fr/or.json b/deployment/manager/shared/locales/fr/or.jsonindex 2945654a0..bf939f2aa 100644--- a/deployment/manager/shared/locales/fr/or.json+++ b/deployment/manager/shared/locales/fr/or.json@@ -117,7 +117,7 @@"NUMBER": "%.0f","TEMPERATURE": "%.1f","POWER": "%.1f",- "CURRENCY": "%.1f",+ "CURRENCY": "%.3f","SPEED": "%.1f","CHARGE": "%.1f","ENERGY": "%.3f",diff --git a/deployment/manager/shared/locales/nl/or.json b/deployment/manager/shared/locales/nl/or.jsonindex 03010f2b9..7c2f5cd65 100644--- a/deployment/manager/shared/locales/nl/or.json+++ b/deployment/manager/shared/locales/nl/or.json@@ -198,7 +198,7 @@"NUMBER": "%.0f","TEMPERATURE": "%.1f","POWER": "%.1f",- "CURRENCY": "%.1f",+ "CURRENCY": "%.3f","SPEED": "%.1f","CHARGE": "%.1f","ENERGY": "%.3f",diff --git a/profile/dev-testing.yml b/profile/dev-testing.ymlindex ddfc28371..437ad4cf6 100644--- a/profile/dev-testing.yml+++ b/profile/dev-testing.yml@@ -16,7 +16,7 @@ services:file: deploy.ymlservice: keycloakvolumes:- - ../ui/keycloak/themes:/deployment/keycloak/themes+ - ../../deployment/build/keycloak/themes:/deployment/keycloak/themes# Access directly if needed on localhostports:- "8081:8080"diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.tsindex 3a981c0d7..0970644d4 100644--- a/ui/component/or-asset-viewer/src/index.ts+++ b/ui/component/or-asset-viewer/src/index.ts@@ -154,14 +154,6 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElemtype: "history",panelStyles: {}- },- chart: {- type: "chart",- hideOnMobile: true,- panelStyles: {- gridColumn: "1 / -1",- gridRowStart: "1"- }}}};diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex 9ca44fea4..0929aa4cc 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -437,6 +437,7 @@ export class OrAttributeCard extends LitElement {this.assetAttributes = view.attributes.map((attr: string, index: number) => Util.getAssetAttribute(assets[index], attr));if(this.assetAttributes && this.assetAttributes.length > 0) {this.assetId = assets[0].id;+ this.period = view.period;this.attributeName = this.assetAttributes[0].name;this.getData();}@@ -561,7 +562,7 @@ export class OrAttributeCard extends LitElement {<div class="period-selector-wrapper">${getContentWithMenuTemplate(html`<or-input class="period-selector" .type="${InputType.BUTTON}" .label="${i18next.t(this.period ? this.period : "-")}"></or-input>`,- [{value: "hour", text: ""}, {value: "day", text: ""}, {value: "week", text: ""}, {value: "month", text: ""}, {value: "year", text: ""}]+ [{value: "hour", text: "hour"}, {value: "day", text: "day"}, {value: "week", text: "week"}, {value: "month", text: "month"}, {value: "year", text: "year"}].map((option) => {option.text = i18next.t(option.value);return option;@@ -731,6 +732,7 @@ export class OrAttributeCard extends LitElement {protected _setPeriodOption(value: any) {this.period = value;+ this.saveSettings();this.getData();this.requestUpdate();}diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.tsindex 7f40db18f..8c7e7b56b 100644--- a/ui/component/or-chart/src/index.ts+++ b/ui/component/or-chart/src/index.ts@@ -853,23 +853,23 @@ export class OrChart extends translate(i18next)(LitElement) {protected _getPeriodOptions() {return [{- text: i18next.t(DatapointInterval.HOUR),+ text: "hour",value: "hour"},{- text: i18next.t(DatapointInterval.DAY),+ text: "day",value: "day"},{- text: i18next.t(DatapointInterval.WEEK),+ text: "week",value: "week"},{- text: i18next.t(DatapointInterval.MONTH),+ text: "month",value: "month"},{- text: i18next.t(DatapointInterval.YEAR),+ text: "year",value: "year"}];diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.tsindex df0e34823..9359795d1 100644--- a/ui/component/or-mwc-components/src/or-mwc-dialog.ts+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts@@ -69,7 +69,7 @@ const style = css`}.mdc-dialog .mdc-dialog__surface {- min-width: 600px;+ width: 600px;height: calc(100vh - 50%);}diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.tsindex 938273a70..103a36a01 100644--- a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts@@ -91,15 +91,21 @@ export class OrRuleActionNotification extends LitElement {if(this._listItems) this._listItems.forEach((user: User) => idOptions.push([user.id!, user.username ? user.username : user.email] as [string, string]));}-- if(targetTypes.length > 0){+ if(this.type){targetTypeTemplate = html`<or-input type="${InputType.SELECT}".options="${targetTypes}"- value="${this.type ? this.type : targetTypes[0]}"+ value="${this.type}"label="${i18next.t("recipients")}"@or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationType(e.detail.value)}"?readonly="${this.readonly}"></or-input>`;+ } else if(targetTypes.length > 0 ){+ targetTypeTemplate = html`<or-input type="${InputType.SELECT}"+ .options="${targetTypes}"+ label="${i18next.t("recipients")}"+ @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationType(e.detail.value)}"+ ?readonly="${this.readonly}"></or-input>+ `;}if(idOptions.length > 0 && this._listItems) {@@ -321,7 +327,9 @@ export class OrRuleActionNotification extends LitElement {}protected loadUsers() {- manager.rest.api.UserResource.getAll(manager.displayRealm).then((response) => this._listItems = response.data);+ manager.rest.api.UserResource.getAll(manager.displayRealm).then((response) => this._listItems = response.data).then(() => {+ this.requestUpdate();+ });}protected loadAssets(query: object) {