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
solve errors for now
Vincent62d7753073b0
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.tsindex 292e10661..2c47d7308 100644--- a/ui/component/or-asset-viewer/src/index.ts+++ b/ui/component/or-asset-viewer/src/index.ts@@ -329,6 +329,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem}public static getPanelContent(panelName: string, asset: Asset, attributes: AssetAttribute[], viewerConfig: AssetViewerConfig, panelConfig: PanelConfig, shadowRoot: ShadowRoot | null): TemplateResult | undefined {+ console.log(panelConfig);if (panelConfig.hide || attributes.length === 0) {return;}@@ -336,7 +337,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElemif (viewerConfig.panelViewProvider) {const template = viewerConfig.panelViewProvider(attributes, panelName, viewerConfig, panelConfig);if (template) {- return template;+ return template;}}@@ -365,7 +366,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem// return prop === "attributes" ? `` : OrAssetViewer.getField(prop, true, style, OrAssetViewer.getPropertyTemplate(prop, (asset as { [index: string]: any })[prop], viewerConfig, panelConfig, shadowRoot));// })}// `;- // } else+ // } elseif (panelConfig && panelConfig.type === "history") {// Special handling for history panel which shows an attribute selector and a graph/data table of historical valuesconst historyAttrs = attrs.filter((attr) => Util.getFirstMetaItem(attr, MetaItemType.STORE_DATA_POINTS.urn!));@@ -387,15 +388,15 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem}}};--++const options = historyAttrs.map((attr) => {const attributeDescriptor = AssetModelUtil.getAttributeDescriptorFromAsset(attr.name!);let label = Util.getAttributeLabel(attr, attributeDescriptor);let unit = Util.getMetaValue(MetaItemType.UNIT_TYPE, attr, attributeDescriptor);if(unit) {label = label + " ("+i18next.t(unit)+")";- }+ }return [attr.name, label]});const attrName: string = historyAttrs[0].name!;@@ -472,7 +473,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElemif (shadowRoot) {if (attribute) {-+if(asset.id && asset.attributes && asset.attributes.location){const showOnMapMeta = Util.getFirstMetaItem(attribute, MetaItemType.SHOW_ON_DASHBOARD.urn!);@@ -494,7 +495,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElemif (response.status !== 200) {}}-+}}@@ -521,6 +522,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem}} else if (panelConfig && panelConfig.type === "group") {+ console.log(panelConfig);content = html`test<or-table></or-table>diff --git a/ui/component/or-table/src/index.ts b/ui/component/or-table/src/index.tsindex f07f6cdcd..64f1e5fe5 100644--- a/ui/component/or-table/src/index.ts+++ b/ui/component/or-table/src/index.ts@@ -1,7 +1,6 @@import {css, customElement, html, LitElement, property, PropertyValues, TemplateResult, unsafeCSS, query} from "lit-element";import {classMap} from "lit-html/directives/class-map";import {ifDefined} from "lit-html/directives/if-defined";-import {MDCComponent} from "@material/base";import {MDCDataTable } from "@material/data-table";import {DefaultColor1, DefaultColor4, DefaultColor8} from "@openremote/core";@@ -141,24 +140,8 @@ export class OrTable extends LitElement {//// @property({type: String})// public label?: string;-- /* TEXT INPUT STYLES END */-- protected _mdcComponent?: MDCComponent<any>;- protected _mdcField?: MDCComponent<any>;- protected _selectedIndex = -1;-- disconnectedCallback(): void {- super.disconnectedCallback();- if (this._mdcComponent) {- this._mdcComponent.destroy();- this._mdcComponent = undefined;- }- if (this._mdcField) {- this._mdcField.destroy();- this._mdcField = undefined;- }- }+ //+ // /* TEXT INPUT STYLES END */protected render() {