All Apps and Add-ons

Pager displaying before Table module with a Button to show results

spencerbrett
Path Finder

I have a panel that displays a count of results, but in order to save space, I included a button to display the results in the table when clicked.

This currently works fine, but if I have enough results that the Pager will display, it shows up before I click the button.

Is it possible to have the Pager display after the button click like with the table?


<module name="Button" layoutPanel="panel_row2_col1">
<param name="label">Show Assets</param>
<param name="allowSoftSubmit">False</param>
<param name="allowAutoSubmit">False</param>
<module name="PostProcess" layoutPanel="panel_row2_col1">
<param name="search">eval View="PLACEHOLDER" | eval WindowStart=strftime(_time-86400,"%Y/%m/%d") | eval earliest=strptime(WindowStart, "%Y/%m/%d") | eval WindowEnd=strftime(_time+432000,"%Y/%m/%d") | eval latest=strptime(WindowEnd, "%Y/%m/%d") | table _time, host, Id, WindowStart, WindowEnd,earliest,latest, View</param>
<module name="Pager" layoutPanel="panel_row2_col1">
<module name="Table" layoutPanel="panel_row2_col1">
<param name="hiddenFields">WindowStart WindowEnd earliest latest</param>
<module name="Button" group="row.fields.View">
<param name="allowSoftSubmit">False</param>
<param name="allowAutoSubmit">False</param>
<param name="label">View</param>
<module name="Redirector">
<param name="url">Lookup-Id</param>
<param name="arg.id">$row.fields.Id$</param>
<param name="arg.WindowStart">$row.fields.WindowStart$</param>
<param name="arg.WindowEnd">$row.fields.WindowEnd$</param>
</module>
</module>
</module>
</module>
</module>
</module>

spencerbrett
Path Finder

The ad hoc JavaScript fix has worked without any side effects as of yet. Thanks.

0 Karma

sideview
SplunkTrust
SplunkTrust

I'm afraid I cannot reproduce the problem.

My first thought was there was a redundant autoRun="True" in there downstream from the Button, but there isn't one in your posted code.

I slightly modified your example by just putting it in a Search module, and it seems to work as designed - both Pager and Table are hidden until the Button is clicked:

<module name="Search" layoutPanel="panel_row1_col1" autoRun="True">
  <param name="search">index=_internal source="*metrics.log" group="*_thruput" | head 10000 </param>
  <param name="earliest">-1h</param>
  <param name="latest">now</param>

  <module name="Button" layoutPanel="panel_row2_col1">
    <param name="label">Show Assets</param>
    <param name="allowSoftSubmit">False</param> 
    <param name="allowAutoSubmit">False</param>

    <module name="PostProcess" layoutPanel="panel_row2_col1">
      <param name="search">eval View="PLACEHOLDER" | eval WindowStart=strftime(_time-86400,"%Y/%m/%d") | eval earliest=strptime(WindowStart, "%Y/%m/%d") | eval WindowEnd=strftime(_time+432000,"%Y/%m/%d") | eval latest=strptime(WindowEnd, "%Y/%m/%d") | table _time, host, Id, WindowStart, WindowEnd,earliest,latest, View</param>

      <module name="Pager" layoutPanel="panel_row2_col1">

        <module name="Table" layoutPanel="panel_row2_col1">
          <param name="hiddenFields">WindowStart WindowEnd earliest latest</param>

          <module name="Button" group="row.fields.View">
            <param name="allowSoftSubmit">False</param>
            <param name="allowAutoSubmit">False</param>
            <param name="label">View</param>
            <module name="Redirector">
              <param name="url">Lookup-Id</param>
              <param name="arg.id">$row.fields.Id$</param>
              <param name="arg.WindowStart">$row.fields.WindowStart$</param>
              <param name="arg.WindowEnd">$row.fields.WindowEnd$</param>
            </module>
          </module>
        </module>
      </module>
    </module>
  </module>
</module>

Can you maybe try upgrading to latest Sideview Utils? Or test the XML I posted above, and if it does work, and yours doesn't, email the whole xml file to me... nick [at] sideviewapps.com

UPDATE: I was later able to reproduce this bug quite easily, it's been fixed and the fix will ship in the next release of sideview Utils. I described to @spencerbrett how to make the one-line change to the Pager module himself until 2.6.5 releases and it sounds like it has worked.

0 Karma

spencerbrett
Path Finder

The ad hoc JavaScript fix has worked without any side effects as of yet. Thanks.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

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

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...