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
rename a few vars and put them in DOM
Vincent877e6cc3f788
diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex 49bc84d18..29f27212b 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -62,6 +62,8 @@ export class OrAttributeCard extends LitElement {@property()private data: ValueDatapoint<any>[] = [];+ @property()+ private mainValue?: number;@property()private mainValueLastPeriod?: number;@@ -69,7 +71,8 @@ export class OrAttributeCard extends LitElement {private fromTimestamp?: Date = new Date();private asset: Asset = {};- private mainValue?: string;+ private formattedMainValue?: string;+ private delta?: number;@query("#chart")private _chartElem!: HTMLCanvasElement;@@ -167,7 +170,8 @@ export class OrAttributeCard extends LitElement {</div><div class="panel-content"><canvas id="chart"></canvas>- <span>total: ${this.mainValue}</span>+ <span>total: ${this.formattedMainValue}</span>+ <span>delta: ${this.delta}</span>${getContentWithMenuTemplate(html`<or-input .type="${InputType.BUTTON}" .label="${i18next.t(this.period ? this.period : "-")}"></or-input>`,this._getPeriodOptions(),