Details
diff --git a/ui/src/app/components/datakey-config-dialog.controller.js b/ui/src/app/components/datakey-config-dialog.controller.js
index a5e77a1..9bdaae2 100644
--- a/ui/src/app/components/datakey-config-dialog.controller.js
+++ b/ui/src/app/components/datakey-config-dialog.controller.js
@@ -38,9 +38,9 @@ function DatakeyConfigDialogController($scope, $mdDialog, deviceService, dataKey
};
vm.fetchDeviceKeys = function (deviceAliasId, query, type) {
- var deviceId = vm.deviceAliases[deviceAliasId];
- if (deviceId) {
- return deviceService.getDeviceKeys(deviceId, query, type);
+ var alias = vm.deviceAliases[deviceAliasId];
+ if (alias) {
+ return deviceService.getDeviceKeys(alias.deviceId, query, type);
} else {
return [];
}
diff --git a/ui/src/app/device/attribute/attribute-table.directive.js b/ui/src/app/device/attribute/attribute-table.directive.js
index bec99ea..d167928 100644
--- a/ui/src/app/device/attribute/attribute-table.directive.js
+++ b/ui/src/app/device/attribute/attribute-table.directive.js
@@ -112,6 +112,7 @@ export default function AttributeTableDirective($compile, $templateCache, $rootS
if (!update) {
scope.selectedAttributes = [];
}
+ scope.$digest();
}
scope.getDeviceAttributes = function(forceUpdate) {
diff --git a/ui/src/app/widget/lib/digital-gauge.js b/ui/src/app/widget/lib/digital-gauge.js
index 722f8a1..e31ee4e 100644
--- a/ui/src/app/widget/lib/digital-gauge.js
+++ b/ui/src/app/widget/lib/digital-gauge.js
@@ -314,8 +314,11 @@ export default class TbDigitalGauge {
gParams.maxY = gParams.barTop;
this.gauge.txtMin.attr({"text-anchor": "start", "x": gParams.minX, "y": gParams.minY });
this.gauge.txtMax.attr({"text-anchor": "start", "x": gParams.maxX, "y": gParams.maxY });
- maxW = Math.max(this.gauge.txtMin.node.getComputedTextLength(), this.gauge.txtMax.node.getComputedTextLength());
- gParams.prefWidth = gParams.strokeWidth + (maxW + this.localSettings.minMaxFont.size ) * 2;
+ gParams.prefWidth = gParams.strokeWidth;
+ if (!this.localSettings.hideMinMax) {
+ maxW = Math.max(this.gauge.txtMin.node.getComputedTextLength(), this.gauge.txtMax.node.getComputedTextLength());
+ gParams.prefWidth += (maxW + this.localSettings.minMaxFont.size ) * 2;
+ }
gParams.viewport.x = (gParams.canvasW - gParams.prefWidth)/2;
gParams.viewport.width = gParams.prefWidth;
}