Dashboards & Visualizations

Renaming splunk HTML view

SplunkTrust
SplunkTrust

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

Motivator

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

View solution in original post

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

Motivator

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

View solution in original post

Motivator

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

0 Karma

SplunkTrust
SplunkTrust

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

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

SplunkTrust
SplunkTrust

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

Path Finder

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

0 Karma