Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

UI updates: minor

Rich Turner581908037ea0
diff --git a/ui/component/core/src/index.ts b/ui/component/core/src/index.ts
index e554db502..57fa79c4c 100644
--- a/ui/component/core/src/index.ts
+++ b/ui/component/core/src/index.ts
@@ -277,8 +277,8 @@ export class AssetModelUtil {
}
public static getAttributeValueDescriptorFromAsset(name: string | undefined, assetType?: string, attributeName?: string): AttributeValueDescriptor | undefined {
- if (!name) {
- return;
+ if (name) {
+ return this.getAttributeValueDescriptor(name);
}
if (attributeName) {
@@ -287,8 +287,6 @@ export class AssetModelUtil {
return attributeDescriptor.valueDescriptor;
}
}
-
- return this.getAttributeValueDescriptor(name);
}
public static getMetaItemDescriptor(urn?: string): MetaItemDescriptor | undefined {
diff --git a/ui/component/or-attribute-history/src/index.ts b/ui/component/or-attribute-history/src/index.ts
index eae2656d2..77ccc4b63 100644
--- a/ui/component/or-attribute-history/src/index.ts
+++ b/ui/component/or-attribute-history/src/index.ts
@@ -520,6 +520,7 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {
} else {
config.columns.push({
type: "prop",
+ header: "value",
stringify: true,
numeric: typeof(dp.y) === "number"
});