Dashboards & Visualizations

Renaming splunk HTML view

DavidHourani
Super Champion

Hello,

I converted an XML dashboard to HTML and I would like to rename it ( change the name that appears in the menu). Anybody knows how to do that ? I mean renaming an XML dashboard is simple but for HTML I can't seem to find out how its done.

Thanks,
David

0 Karma
1 Solution

aelliott
Motivator

You could clone it and type in a new view name for it. Within UserInterface -> views

View solution in original post

lquinn
Contributor

If anyone is still having problems with this and is unable to get the full dashboard name (i.e. with spaces not underscores) as the dashboard name. I found that whatever I put into the title tag at the top of my HTML (see below) would appear as the title in both the dashboard menu and also the app's navigation bar.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>Dashboard Title</title>
    <link rel="shortcut icon" href="{{SPLUNKWEB_URL_PREFIX}}/static/img/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="/en-US/static/@aaff59bb082c/css/build/bootstrap.min.css" />
        <link rel="stylesheet" type="text/css" href="/en-US/static/@aaff59bb082c/css/build/pages/dashboard-simple-bootstrap.min.css" />
    <style>
        ...

HOWEVER, Splunk is really picky about HTML errors, unclosed tags etc. so if there are any errors in your HTML, the title will default back to the filename of the dashboard.

I spent a long time trying to get this right and I couldn't work out why certain dashboards worked and some didn't! In the end, each dashboard that didn't work had a very small error that was not affecting the functionality of the page and so was not picked up.

0 Karma

aelliott
Motivator

You could clone it and type in a new view name for it. Within UserInterface -> views

aelliott
Motivator

Looks like there is a clone method within the Dashboards menu too, have you attempted that?

0 Karma

DavidHourani
Super Champion

Yes, I eventually ended up doing that.

The problem now is that on splunk's Launcher page the view's name (Title) isn't showing in the apps widget but instead the ID is. This makes it really ugly cause it has "_" instead of space in the view's title... any idea how to force enable the use of space bars or how to modify that ?

0 Karma

nekb1958
Path Finder

do you mean the name shown in dashboards-menu in the (search)app?

this is the filename of the view/dashboard.
depending on the local-dir in which your view reside rename it and refresh "data/ui/views" of your splunk

http://localhost:8000/en-GB/debug/refresh?entity=data/ui/views

DavidHourani
Super Champion

I think you're right, if i modify the name of the file the ID will indeed change but the problem is here that I need to (as for all XML views) display the 'title' of the view the launcher's home dashboard and not the ID of the HTML view...

0 Karma

rahul_jasrotia
Path Finder

Any pointers on the same would be welcome, even i have such a requirement.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...