diff --git a/platform/features/layout/res/templates/elements/telemetry.html b/platform/features/layout/res/templates/elements/telemetry.html index 6857d8282a..1ff2aefe48 100644 --- a/platform/features/layout/res/templates/elements/telemetry.html +++ b/platform/features/layout/res/templates/elements/telemetry.html @@ -20,26 +20,25 @@ at runtime from the About dialog for additional information. -->
-
- {{ngModel.name}} -
-
- - - {{ngModel.value}} - -
-
\ No newline at end of file + class="l-fixed-position-text l-telemetry" + ng-style="{ background: ngModel.fill(), 'border-color': ngModel.stroke(), color: ngModel.color() }" + > +
+ {{ngModel.name}} +
+
+ + + {{ngModel.value}} + +
+ diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index b87a6cb9d2..c190170505 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -123,7 +123,13 @@ define( // Update the displayed value for this object function updateValue(telemetryObject) { - var id = telemetryObject && telemetryObject.getId(); + var id = telemetryObject && telemetryObject.getId(), + limit = telemetryObject && + telemetryObject.getCapability('limit'), + datum = telemetryObject && + subscription.getDatum(telemetryObject), + alarm = limit && datum && limit.evaluate(datum); + if (id) { (elementProxiesById[id] || []).forEach(function (element) { names[id] = telemetryObject.getModel().name; @@ -132,6 +138,7 @@ define( ); element.name = names[id]; element.value = values[id]; + element.cssClass = alarm && alarm.cssClass; }); } } @@ -372,4 +379,4 @@ define( return FixedController; } -); \ No newline at end of file +);