Dashboards & Visualizations

How can I add pagination to a Dashboard Panel?

atornes
Path Finder

I have a number of panels on a dashboard that contain data tables with a large number of results. For some reason the panels also vary in the number of results that appear in the panel (i.e. 1 panel has 10 (of 60), another has 50 (of 66)) but I have nothing in the report/query that would control this. Is there a way to set pagination on these panels with a certain # of results per page?

0 Karma
1 Solution

MHibbin
Influencer

Atornes,

You will need to edit the XML of your dashboard.

You can use the following documentation for editing you simple XML (I'm assuming you have not converted to advanced XML)...
http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddATable#Configure_the_table_panel
Specifically you will be looking at the table options "count" and "showPager"... i.e.

<table>
    <title>Example</title>
    <searchName>ExampleSearch</searchName>
    <fields>field1, field2, field3</fields>
    <option name="count">50</option>
    <option name="showPager">true</option>
</table>

If you have switched to advanced XML, you will need to reference the following docs...
http://docs.splunk.com/Documentation/Splunk/latest/Developer/AdvancedSearch#Add_pagination
...Specifically...

<module name="Paginator">
  <param name="entityName">events</param>
    <module name="EventsViewer"/>
</module>

Hope this helps,

Regards,

MHibbin

View solution in original post

rgcurry
Contributor

There is an error in the doc about this. What is posted by MHibbin above is correct. But in the doc section titled "Panel reference for Simplified XML" (http://docs.splunk.com/Documentation/Splunk/4.3/Developer/PanelReference]) has the following code which does NOT work:

  <showPager>(true|false)</showPager> 
0 Karma

MHibbin
Influencer

I think I see your confusion...

The syntax you have detailed above (i.e. <showPager>(true|false)</showPager>) is in the table of possible options, but if you look at the examples below the table(s) it shows the examples in the correct format (showpager is not shown here though).

Hope this helps,

MHibbin

0 Karma

MHibbin
Influencer

Atornes,

You will need to edit the XML of your dashboard.

You can use the following documentation for editing you simple XML (I'm assuming you have not converted to advanced XML)...
http://docs.splunk.com/Documentation/Splunk/latest/Developer/AddATable#Configure_the_table_panel
Specifically you will be looking at the table options "count" and "showPager"... i.e.

<table>
    <title>Example</title>
    <searchName>ExampleSearch</searchName>
    <fields>field1, field2, field3</fields>
    <option name="count">50</option>
    <option name="showPager">true</option>
</table>

If you have switched to advanced XML, you will need to reference the following docs...
http://docs.splunk.com/Documentation/Splunk/latest/Developer/AdvancedSearch#Add_pagination
...Specifically...

<module name="Paginator">
  <param name="entityName">events</param>
    <module name="EventsViewer"/>
</module>

Hope this helps,

Regards,

MHibbin

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...