Try to use the "Template" (node-red-dashboard : ui_template) to display status/error messages.
To get different outlines (eg. change color) I come up with this code:
<!-- <div id="{{'my_'+$id}}" style="font-size:small"></div> -->
<div id="{{'my_'+$id}}"></div>
<script>
(function(scope) {
scope.$watch('msg', function(msg) {
if (msg) {
// Do something when msg arrives
$("#my_"+scope.$id).html(msg.payload);
$("#my_"+scope.$id).css("style","font-size:small");
}
});
})(scope);
</script>
Obviously it doesn't do what I expect, see first line. How to change the “div” statement and the jq call for it?