Hi all,
Just notifying you I just added some options to further customize your HABPanel side drawer and dashboard headers - two of the remaining places where customization was not easily possible:
And for those of you who like to play with this stuff, you are now able to customize those per dashboard with custom widgets - meaning you can put whatever you want in those places (within reason)
There was already an ability to customize the dashboard tile in the main menu this way, I simply reused the concepts for the drawer menu and the header.
Obviously, there could be unintended consequences if youâre not careful so these options are labeled âexperimentalâ - nonetheless Iâm curious what youâll eventually come up with Youâll find them in the third tab of the dashboardâs settings dialog, accessible from the main menu in edit mode.
Itâs recommended to keep your widgets simple, without interactive features (like ng-click
or buttons, sliders etc), furthermore they might not look exactly like the preview in the widget designer because additional CSS classes are applied.
Here are a few possible uses of this feature:
Changing the side drawer menu entry for a dashboard
Tip: use ngModel.name
to get the dashboardâs name.
Example 1:
<span>{{ngModel.name}}</span> <span class="pull-right label label-primary">{{itemState(config.label_item)}}</span>
<dl style="padding: 0; margin: 0; font-size: 8pt; text-transform: none;">
<dd class="pull-right value">{{"%0.1f °C"|fmt:+itemState(config.first_details_item)}}</dd>
<dt>{{config.first_details_label}} </dt>
<dd class="pull-right value">{{"%0.1f °C"|fmt:+itemState(config.second_details_item)}}</dd>
<dt>{{config.second_details_label}} </dt>
</dl>
Config settings types: label_item: Item, first_details_label: String, first_details_item: Item, second_details_label: String, second_details_label: Item
Example 2:
<span>{{ngModel.name}}</span>
<span class="label label-danger pull-right">{{(itemsInGroup(config.group_name) | filter:{state:'ON'}).length}}</span>
Config settings types: group_name: String
Result (after setting and configuring the widgets):
Changing the dashboard header
Tip: use ngModel.name
to get the dashboardâs name.
Example 1
<h2 class="dashboard-title">
{{ngModel.name}}
<span class="badge">{{(itemsInGroup(config.label_group_name) | filter:{state:'ON'}).length}} / {{(itemsInGroup(config.label_group_name)).length}}</span>
<small class="header-clock">
<ds-widget-clock show-digital digital-format="'EEE dd HH:mm'"></ds-widget-clock>
</small>
<small class="header-clock">
{{'%0.1f °C' | fmt:+itemState(config.header_item)}} |
</small>
</h2>
<hr style="margin-top: 4px; margin-bottom: 0; border-top: 1px solid #777;" />
Config settings types: header_item: Item, label_group_name: String
Result (after setting and configuring the widget)
Again, use with caution, but hope it helps!
Cheers