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
better name for the new component
Vincent725ba4ca5719
diff --git a/ui/app/main/package.json b/ui/app/main/package.jsonindex d0e2f4041..8f6c93bae 100644--- a/ui/app/main/package.json+++ b/ui/app/main/package.json@@ -16,7 +16,7 @@},"dependencies": {"@openremote/core": "^1.1.0",- "@openremote/or-asset-detail": "^1.0.0",+ "@openremote/or-attribute-card": "^1.0.0","@openremote/or-asset-tree": "^1.1.0","@openremote/or-asset-viewer": "^1.1.0","@openremote/or-header": "^1.1.0",diff --git a/ui/app/main/src/components/pages/page-insights.ts b/ui/app/main/src/components/pages/page-insights.tsindex 70a379a5a..ab0d22404 100644--- a/ui/app/main/src/components/pages/page-insights.ts+++ b/ui/app/main/src/components/pages/page-insights.ts@@ -5,7 +5,7 @@ import "@openremote/or-data-viewer";import {DataViewerConfig} from "@openremote/or-data-viewer";import {DefaultBoxShadow, DefaultColor1, DefaultColor2, DefaultColor3, DefaultColor5} from "@openremote/core";-import "@openremote/or-asset-detail";+import "@openremote/or-attribute-card";// language=CSSconst style = css`@@ -110,10 +110,10 @@ class PageInsights extends connect(store)(LitElement) {return html`<div id="wrapper"><div id="container">- <or-asset-detail></or-asset-detail>- <or-asset-detail></or-asset-detail>- <or-asset-detail></or-asset-detail>- <or-asset-detail></or-asset-detail>+ <or-attribute-card .assetId="${this._assetId}"></or-attribute-card>+ <or-attribute-card .assetId="${this._assetId}"></or-attribute-card>+ <or-attribute-card .assetId="${this._assetId}"></or-attribute-card>+ <or-attribute-card .assetId="${this._assetId}"></or-attribute-card><!--<div class="row">--><!-- <or-data-viewer .config="${viewerConfig}"></or-data-viewer>--><!--</div>-->diff --git a/ui/app/main/tsconfig.json b/ui/app/main/tsconfig.jsonindex d50f266b4..b8bc00ca6 100644--- a/ui/app/main/tsconfig.json+++ b/ui/app/main/tsconfig.json@@ -14,7 +14,7 @@{ "path": "../../component/or-header" },{ "path": "../../component/or-input" },{ "path": "../../component/or-map" },- { "path": "../../component/or-asset-detail" },+ { "path": "../../component/or-attribute-card" },{ "path": "../../component/or-asset-tree" },{ "path": "../../component/or-attribute-input" },{ "path": "../../component/or-chart" },diff --git a/ui/component/or-asset-detail/.npmignore b/ui/component/or-attribute-card/.npmignoresimilarity index 100%rename from ui/component/or-asset-detail/.npmignorerename to ui/component/or-attribute-card/.npmignorediff --git a/ui/component/or-asset-detail/README.md b/ui/component/or-attribute-card/README.mdsimilarity index 94%rename from ui/component/or-asset-detail/README.mdrename to ui/component/or-attribute-card/README.mdindex 734b6ef4a..f2c28d54a 100644--- a/ui/component/or-asset-detail/README.md+++ b/ui/component/or-attribute-card/README.md@@ -1,4 +1,4 @@-# @openremote/or-asset-detail \<or-asset-detail\>+# @openremote/or-attribute-card \<or-attribute-card\>[![NPM Version][npm-image]][npm-url][![Linux Build][travis-image]][travis-url][![Test Coverage][coveralls-image]][coveralls-url]diff --git a/ui/component/or-asset-detail/build.gradle b/ui/component/or-attribute-card/build.gradlesimilarity index 100%rename from ui/component/or-asset-detail/build.gradlerename to ui/component/or-attribute-card/build.gradlediff --git a/ui/component/or-asset-detail/package.json b/ui/component/or-attribute-card/package.jsonsimilarity index 92%rename from ui/component/or-asset-detail/package.jsonrename to ui/component/or-attribute-card/package.jsonindex efef20798..6764e7b94 100644--- a/ui/component/or-asset-detail/package.json+++ b/ui/component/or-attribute-card/package.json@@ -1,5 +1,5 @@{- "name": "@openremote/or-asset-detail",+ "name": "@openremote/or-attribute-card","version": "1.0.0","description": "OpenRemote asset detail","main": "dist/umd/index.bundle.js",diff --git a/ui/component/or-asset-detail/src/index.ts b/ui/component/or-attribute-card/src/index.tssimilarity index 69%rename from ui/component/or-asset-detail/src/index.tsrename to ui/component/or-attribute-card/src/index.tsindex 4d86f07d7..c8966963a 100644--- a/ui/component/or-asset-detail/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -1,4 +1,5 @@import {css, customElement, html, LitElement, property, PropertyValues} from "lit-element";+import {OrTranslate, translate} from "@openremote/or-translate";import {classMap} from "lit-html/directives/class-map";import i18next from "i18next";@@ -41,7 +42,7 @@ const style = css`}`;-@customElement("or-asset-detail")+@customElement("or-attribute-card")export class OrAssetDetail extends LitElement {static get styles() {@@ -50,7 +51,27 @@ export class OrAssetDetail extends LitElement {];}+ @property({type: String})+ public assetId?: string;+protected render() {+++ if (!this.assetId) {+ return html`+ <div class="panel">+ <div class="panel-content-wrapper">+ <div class="panel-title">+ <or-translate value="attributeDetail"></or-translate>+ </div>+ <div class="panel-content">+ <p>no attribute found</p>+ </div>+ </div>+ </div>+ `;+ }+return html`<div class="panel"><div class="panel-content-wrapper">diff --git a/ui/component/or-asset-detail/tsconfig.json b/ui/component/or-attribute-card/tsconfig.jsonsimilarity index 100%rename from ui/component/or-asset-detail/tsconfig.jsonrename to ui/component/or-attribute-card/tsconfig.jsondiff --git a/ui/component/or-asset-detail/webpack.config.js b/ui/component/or-attribute-card/webpack.config.jssimilarity index 100%rename from ui/component/or-asset-detail/webpack.config.jsrename to ui/component/or-attribute-card/webpack.config.js