KingCrab
(Markus)
August 15, 2018, 1:50pm
1
Is it possible to retrieve the name of the current dashboard and use it in code of a custom widget? I already found a solution using ngModel.name. but this only seems to work if the widget is placed as header replacement.
KingCrab
(Markus)
August 18, 2018, 6:04am
2
As an alternative, I would like to use my widget in the header bar. Can I somehow get rid of the hamburger icon, whitout using the kiosk mode?
ysc
(Yannick Schaus)
August 19, 2018, 5:34pm
3
There’s a dirty hack to get the dashboard’s name, but I wouldn’t rely on it, it might be changed one day…
$parent.$parent.$parent.$parent.vm.dashboard.id if you don’t mind the ugliness.
It’s basically walking up the scope hierarchy finding the controller for the dashboard - normally a big no-no but…
Could be something that could be added to the template widget’s scope though.
The hamburger menu isn’t supposed to be hidden but you can hide it anyway with CSS.
.header i.glyphicon.glyphicon-menu-hamburger {
display: none;
}
KingCrab
(Markus)
August 21, 2018, 2:31pm
4
Looks promising. I would prefer an answer to my first question but the hack will do it
Thanks!
ysc
(Yannick Schaus)
August 22, 2018, 2:52pm
5
Putting widgets in the header is possible as an experimental feature:
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:
[image]
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…