Security

static text above the appHeaderWrapper

hiddenkirby
Contributor

IF one wanted to add static highlighted text to the top of every page in their app... how would they go about doing this?

You can't add content with CSS...

I would want some static text centered just above the appHeaderWrapper... across the app.

thoughts?

TIA, Kirby

Tags (3)
1 Solution

sideview
SplunkTrust
SplunkTrust

Aside from the CSS answer given, the only way i know of is to convert your views to advanced XML, put a ServerSideInclude module at the top of each advanced XML view (right under the view tag).

global_message.html

and you put that file at $SPLUNK_HOME/etc/apps/<appname>/appserver/static/global_message.html

NOTE: the file extension is a little misleading but it doesnt have to be a full HTML document - the file can just be an HTML fragment like:

<b>System Downtime Upcoming: 5/19/2010 @8pm-9pm</b>

It might pretty easy for us to add something like this in a future release though.
Since we already have a global message queue on splunkd, and the UI already gets messages out of that stack, the hard parts are already done. Would it be acceptable for you if you set this message via the CLI? What kinds of things are you looking to put up there?

View solution in original post

sideview
SplunkTrust
SplunkTrust

Aside from the CSS answer given, the only way i know of is to convert your views to advanced XML, put a ServerSideInclude module at the top of each advanced XML view (right under the view tag).

global_message.html

and you put that file at $SPLUNK_HOME/etc/apps/<appname>/appserver/static/global_message.html

NOTE: the file extension is a little misleading but it doesnt have to be a full HTML document - the file can just be an HTML fragment like:

<b>System Downtime Upcoming: 5/19/2010 @8pm-9pm</b>

It might pretty easy for us to add something like this in a future release though.
Since we already have a global message queue on splunkd, and the UI already gets messages out of that stack, the hard parts are already done. Would it be acceptable for you if you set this message via the CLI? What kinds of things are you looking to put up there?

sideview
SplunkTrust
SplunkTrust

That's another quick way to do it. We generally dont recommend touching the actual template files because we'll blow them away when you upgrade. (And of course we're trying to get to where apps can package their own template files and have things still work out sensibly. )

0 Karma

hiddenkirby
Contributor

i created my own dashboard.html 🙂 feels like a stupid question now.

0 Karma

hiddenkirby
Contributor
.appHeaderWrapper:before {
    content: "My static text..";
}
0 Karma

hiddenkirby
Contributor

I don't think the CSS thing is the way to go. Is there some template that i could put in my app that would add this globally? something i could add a div to?

0 Karma

hiddenkirby
Contributor

it also seems to push down alignment. doing a #TitleBar_0_0_0:before will put it below the app header but doesn't show on every page ...

0 Karma

hiddenkirby
Contributor

i'd like to add that this is an accessibility bad practice. http://stackoverflow.com/questions/2851410/persistant-header-of-text-css-in-a-div

If anyone knows of a better way .. please do tell.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...