Dashboards & Visualizations

How to force rerendering TableView from Javascript?

lmichalski_2
Explorer

I have tried tableView.render(), but it doesn't call render anymore.

I need to feed table visualisation with my own custom data, grabbed from the JS level

How to force to refresh it?

My part of code, called after I got some external results:

  mvc.Components.get("incidents").getVisualization(function(tableView) {
        tableView.addRowExpansionRenderer(new IncidentRowRenderer());
        tableView.addCellRenderer(new IncidentCellRenderer());
        tableView.render();
    });

tableView.render() doesn't refresh table, if it was previously renderered.

1 Solution

bowesmana
SplunkTrust
SplunkTrust

Not sure if this is too late to help you, but I found a way to do this. Within my search that populates the table, I am doing this

eval Update=$update_table$

where the token value is 0 to start with. I am not showing this field in the table. Prior to calling render() do this

var submittedTokens = mvc.Components.get('submitted');
update_table++;
submittedTokens.set('update_table', update_table);

where update_table is also a var in your script. This appears to work for me

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Not sure if this is too late to help you, but I found a way to do this. Within my search that populates the table, I am doing this

eval Update=$update_table$

where the token value is 0 to start with. I am not showing this field in the table. Prior to calling render() do this

var submittedTokens = mvc.Components.get('submitted');
update_table++;
submittedTokens.set('update_table', update_table);

where update_table is also a var in your script. This appears to work for me

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...