Splunk Search

SimpleResultsTable page number

Ant1D
Motivator

When search results are displayed via a table, the following appears when the number of result rows exceeds the set limit:

alt text

This object always appears at the top of the table. Is it possible to add another page number object at the bottom of the table also? Or Can I move this object from the top of the table to the bottom?

If I am scrolling down a big results table, it would save having to scroll up to see the next set of results on the next page.

Thanks in advance for your help.

1 Solution

sideview
SplunkTrust
SplunkTrust

Yes you can.

What you do is you add a second Paginator module right after the SimpleResultsTable module, and as a direct sibling of that SimpleResultsTable (ie at the same nesting level).

Here's what it looks like:

<module name="Paginator">
  <param name="entityName">results</param> 

  <module name="SimpleResultsTable">
    <param name="entityName">results</param>
  </module>

  <module name="Paginator">
    <param name="entityName">results</param>
  </module>

</module>

Note that:

1) the first Paginator contains the table (so thus the table knows about the first Paginator's selected page number. If you dont understand what I'm talking about download the ui_examples app from splunkbase and read the first two intro pages that talk about the advanced XML),

2) the first Paginator contains the second paginator.

3) the second Paginator contains nothing.

Paginator is written so if it finds itself as the child of another paginator like this, it goes into a kind of slave mode where interaction with the second Paginator is just tied back to events on the first Paginator. It works very well. I think it went in around 4.1 or maybe a bit before.

View solution in original post

ifeldshteyn
Communicator

Is there a way show the page number only on the bottom of the table and not the top ?

like this?

TABLE ROW...
TABLE ROW...
TABLE ROW...
page 1 2 3

sideview
SplunkTrust
SplunkTrust

Yes you can.

What you do is you add a second Paginator module right after the SimpleResultsTable module, and as a direct sibling of that SimpleResultsTable (ie at the same nesting level).

Here's what it looks like:

<module name="Paginator">
  <param name="entityName">results</param> 

  <module name="SimpleResultsTable">
    <param name="entityName">results</param>
  </module>

  <module name="Paginator">
    <param name="entityName">results</param>
  </module>

</module>

Note that:

1) the first Paginator contains the table (so thus the table knows about the first Paginator's selected page number. If you dont understand what I'm talking about download the ui_examples app from splunkbase and read the first two intro pages that talk about the advanced XML),

2) the first Paginator contains the second paginator.

3) the second Paginator contains nothing.

Paginator is written so if it finds itself as the child of another paginator like this, it goes into a kind of slave mode where interaction with the second Paginator is just tied back to events on the first Paginator. It works very well. I think it went in around 4.1 or maybe a bit before.

sideview
SplunkTrust
SplunkTrust

Note that if you're up to date with using newer Sideview Utils stuff, this all applies to the Pager and Table modules, which are Sideview replacements for Paginator and SimpleResultsTable, respectively.

0 Karma
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, ...