Dashboards & Visualizations

Modify table in html dashboard

jdcain
Engager

I need to be able to link to files on a network file share from a field in a splunk dashboard. Currently using the link drilldown does not work for \servername\folder\file.name or even file://servername/folder/file.name.

I've converted the dashboard to html and have been trying to use jquery to modify the column I need. Changes on the page it's self are not a problem however I don't understand how to wait for the table to load before applying a javascript.

I've attempted to follow other examples but I don't appear to be able to make any changes at all. this script does not change the count of the table for example:
// Get the table
var myEventsTable = mvc.Components.get('element1');
// Programmatically change a property
myEventsTable.getVisualization(function(eventsView) { eventsView.settings.set("count", 2);

How can I either use drilldown to link to a network share or modify the table in an html view to allow it?

0 Karma
1 Solution

niketn
Legend

@jdcain, as you have already found out, browser will not allow local directory drilldown. However, if you want to know how custom table renderer can be used you can refer to one of my previous answers which also has a link to Splunk Dahsboard Examples App with most these useful examples.

https://answers.splunk.com/answers/637615/why-is-the-table-cell-highlighting-not-reading-the.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@jdcain, as you have already found out, browser will not allow local directory drilldown. However, if you want to know how custom table renderer can be used you can refer to one of my previous answers which also has a link to Splunk Dahsboard Examples App with most these useful examples.

https://answers.splunk.com/answers/637615/why-is-the-table-cell-highlighting-not-reading-the.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

jdcain
Engager

I now realize that the local file links don't work due to being blocked by browsers and not anything with splunk. I still am curious though how to modify the table html after the table loads though.

0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...