Dashboards & Visualizations

How do I rename this fieldname on a row highlighting dashboard?

SridharS
Path Finder

Hi All,

I have created a row highlighting dashboard. Since the new dashboard is not picking my own .js and .css files (tried restarting Splunk, but no luck), I just used the same files available in the row_highlighting example dashboard instead.

Now I want to rename the active_realtime_searches field (having value as "1" or "2") as Values_found, but when I used rename command, all the rows are highlighting in only green color. IS there any other way that I can rename the field, so that I can get the perfect highlighting?

0 Karma
1 Solution

SridharS
Path Finder

Finally I found it!! unfortunately I have saved the dashboard.js file in my app path SPLUNK_HOME/etc/apps/my_own_app/appserver/static.
After deleting this file my dashboards are listening to my own .js and .css files. A silly mistake, but took couple of days.

View solution in original post

0 Karma

SridharS
Path Finder

Finally I found it!! unfortunately I have saved the dashboard.js file in my app path SPLUNK_HOME/etc/apps/my_own_app/appserver/static.
After deleting this file my dashboards are listening to my own .js and .css files. A silly mistake, but took couple of days.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The JavaScript for that example looks specifically for "active_realtime_searches". You changed the name correctly in the search, but doing so broke the JS. You'll have to modify the table_row_highlighting.js file to use your variable name. That brings us back to the real problem of Splunk not pickup up your custom JS and CSS files. Where did you put them? They should be in SPLUNK_HOME/etc/apps/my_app/appserver/static.

---
If this reply helps you, Karma would be appreciated.
0 Karma

SridharS
Path Finder

yeah!! this is my another problem. I just made some modification in table_row_highlighting.js and put it under the folder SPLUNK_HOME/etc/apps/myownapp/appserver/static as highlightingmytable.js and restart splunk. But that isn't working. My dashboards takes the files found only under SPLUNK_HOME/etc/apps/simple_xml_example/appserver/static. I am not sure why this happens... because of this I am unable to hide description/sourcecode too in my dasboard.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

When you renamed the file to highlightingmytable.js, did you also change the reference in the dashboard?
Could you have unintentionally saved your dashboards under the wrong app?

---
If this reply helps you, Karma would be appreciated.
0 Karma

SridharS
Path Finder

yes i changed the reference in the table name part mvc.Components.get('highlight').getVisualization(function(tableView) "highlight" as "newtable". Also called the same table in my xml. . IS there something else that I left out. Also i saved my dashboard in the right app.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I was referring to the (hopefully) more obvious step of changing the "script=" clause in the first line of the dashboard.

---
If this reply helps you, Karma would be appreciated.
0 Karma

SridharS
Path Finder

Yes!!! I changed the script and stylesheet perfect. But it didn't work out. This is the reason I was looking for a rename option 😞

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...