How to display dashboard title on a custom header


(Karan Sharma) #1

I need to make a header on kibana for branding purpose.

I use a plugin to make a custom header, using the hacks uiExports. I am able to display the HTML and less code. Now i wan't to retrieve the name of the current dash board and display it there too.(pics below for clarity)

Any idea how can i access the name of the current dashboard in hacks.js?


(Spencer Alger) #2

As the uiExport type suggests, you will need a bit of a hack.

Assuming your header is using an angular directive, you should be able to watch $route.current.locals and get information like the current dashboard, or visualization.


(Karan Sharma) #3

is undefined. that maybe because i'm not using a directive.

I using plain javascript in hack.js to do $('div.content').prepend(html_template)

Even if a create a directive how will i inject it on top of the page (basically what $('div.content').prepend is doing)? Where should i actually use the directive?

Thanks


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.