Reporting

schedule pdf disabled for timerangepicker?

caphrim007
Path Finder

I have 2 views. The only difference between the two, that I can tell, is that one of the views has a timerange picker around it's saved search.

Here's the skinny

<module name="TimeRangePicker" layoutPanel="panel_row1_col1" group="Disclosed Credentials, By User">
<param name="searchWhenChanged">True</param>
<param name="default">Last 30 days</param>
<module name="HiddenSavedSearch" autoRun="True">
  <param name="savedSearch">Disclosed Credentials By User</param>
  <param name="groupLabel">Disclosed Credentials By User</param>
  <module name="ViewstateAdapter">
    <param name="savedSearch">Disclosed Credentials By User</param>
    <module name="HiddenFieldPicker">
      <param name="strictMode">True</param>
      <module name="JobProgressIndicator">
        <module name="EnablePreview">
          <param name="enable">True</param>
          <param name="display">False</param>
          <module name="HiddenChartFormatter">
            <param name="charting.chart.stackMode">stacked</param>
            <param name="charting.secondaryAxisTitle.text">Number of Disclosed Credentials</param>
            <param name="charting.chart">column</param>
            <param name="charting.primaryAxisTitle.text">Time</param>
            <module name="FlashChart">
              <param name="width">100%</param>
            </module>
          </module>
        </module>
      </module>
    </module>
  </module>
</module>

That code makes the "Schedule for PDF delivery" grayed out. My other view removed the TimeRangePicker and the 2 params after it and it's PDF delivery is not grayed out.

Is it the case that the TimeRangePicker is causing the PDF delivery menu item to be grayed out? Or is there something else I should be looking at.

Edit

After taking Nick's suggestions to heart, I modified the XML to clean up the cruft. Still no luck with the "Schedule for PDF delivery" though, so here's the whole view.

<view autoCancelInterval="90" isVisible="true" onunloadCancelJobs="true" refresh="-1" template="dashboard.html">
<label>Mail credentials</label>
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="clearOnJobDispatch">False</param>
    <param name="maxSize">1</param>
  </module>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">splunk.search.job</param>
    <param name="clearOnJobDispatch">True</param>
    <param name="maxSize">1</param>
  </module>
  <module name="TitleBar" layoutPanel="viewHeader">
    <param name="actionsMenuFilter">dashboard</param>
  </module>

  <module name="TimeRangePicker" layoutPanel="panel_row1_col1" group="Disclosed Credentials, By User">
    <param name="searchWhenChanged">True</param>
    <param name="default">Last 30 days</param>
    <module name="HiddenSavedSearch" autoRun="True">
      <param name="savedSearch">Disclosed Credentials By User</param>
      <module name="JobProgressIndicator" />
      <module name="EnablePreview">
        <param name="enable">True</param>
        <param name="display">False</param>
      </module>
      <module name="HiddenChartFormatter">
        <param name="charting.chart.stackMode">stacked</param>
        <param name="charting.secondaryAxisTitle.text">Number of Disclosed Credentials</param>
        <param name="charting.chart">column</param>
        <param name="charting.primaryAxisTitle.text">Time</param>
        <module name="FlashChart">
          <param name="width">100%</param>
        </module>
      </module>
    </module>
  </module>

  <module name="TimeRangePicker" layoutPanel="panel_row2_col1" group="Disclosed Credentials By Domain">
    <param name="searchWhenChanged">True</param>
    <param name="default">Last 30 days</param>
    <module name="HiddenSavedSearch" autoRun="True">
      <param name="savedSearch">Disclosed Credentials By Domain</param>
      <module name="JobProgressIndicator" />
      <module name="EnablePreview">
        <param name="enable">True</param>
        <param name="display">False</param>
      </module>
      <module name="HiddenChartFormatter">
        <param name="charting.chart">pie</param>
        <module name="FlashChart">
          <param name="width">100%</param>
        </module>
      </module>
    </module>
  </module>

  <module name="TimeRangePicker" layoutPanel="panel_row2_col2" group="Disclosed Credentials Per Day">
    <param name="searchWhenChanged">True</param>
    <param name="default">Last 30 days</param>
    <module name="HiddenSavedSearch" autoRun="True">
      <param name="savedSearch">Disclosed Credentials Per Day</param>
      <module name="JobProgressIndicator" />
      <module name="EnablePreview">
        <param name="enable">True</param>
        <param name="display">False</param>
      </module>
      <module name="HiddenChartFormatter">
        <param name="charting.secondaryAxisTitle.text">Number of Disclosed Credentials</param>
        <param name="charting.chart">column</param>
        <param name="charting.legend">none</param>
        <param name="charting.primaryAxisTitle.text">Time</param>
        <module name="FlashChart">
          <param name="width">100%</param>
        </module>
      </module>
    </module>
  </module>

  <module name="TimeRangePicker" layoutPanel="panel_row3_col1" group="Disclosed Credentials, By User in Domain">
    <param name="searchWhenChanged">True</param>
    <param name="default">Last 30 days</param>
    <module name="HiddenSavedSearch" autoRun="True">
      <param name="savedSearch">Disclosed Credentials, By User in Domain</param>
      <module name="JobProgressIndicator" />
      <module name="EnablePreview">
        <param name="enable">True</param>
        <param name="display">False</param>
      </module>
      <module name="DataOverlay">
        <param name="default">none</param>
        <module name="SimpleResultsTable"></module>
      </module>
    </module>
  </module>
</view>
1 Solution

sideview
SplunkTrust
SplunkTrust

2 things affect whether the 'Enable for PDF Delivery' option is available.

1) the 'actionsMenuFilter' on the TitleBar module. if the value is set to any of 'search', 'dashboard', 'dashboard-SimpleDashboard', then the link will show. I dont think this is your problem because I think it literally hides the menu option rather than simply greying it out. Worth double checking though.

2) whether or not the view contains an 'autoRun="True"' attribute. If it thinks that the view does NOT have one, then it will indeed disable the link. (when the pdfserver loads the view, there is no user to start things moving, so it requires at least one autoRun somewhere) I'm a bit confused because of course your view does contain an autoRun="True". Maybe if you post the whole view we can see what the deal is.


UPDATE: taking a look at your full view posted in your update, I've figured it out. Apparently there's a bug in the python that goes and looks for autoRun attributes. It only looks at the top level modules. So move at least one of the autoRun="True" attributes up a level to a TimeRangePicker module and it'll start working.
I'm surprised that it took this long to find that bug, since it's pretty common for people to have autoRun="True" at a level other than the top level.


Note: I know you didnt ask about this, but a bunch of lines in your XML are only there because they get carried over when you convert from the Simplified XML. If you're in the advanced XML to stay, it can make things easier to read if you remove this cruft.

  1. ViewStateAdapter. 9 times out of 10 that ViewStateAdapter module and it's 'savedSearch' param can be removed (and it's child modules de-nested). In this case, because you're manually specifying the charting settings so you can definitely throw away ViewStateAdapter. It probably wasnt doing anything anyway and if it was just put the keys back in HiddenChartFormatter.

  2. HiddenFieldPicker. 99 times out of 100 that HiddenFieldPicker module and it's 'strictMode' param can be removed (and it's child modules de-nested).

  3. groupLabel. the 'groupLabel' param is a useless artifact of the conversion from simplified XML. Go ahead and remove them all.

  4. EnablePreview. the EnablePreview module doesnt need to contain any nested modules. It has no ill effect but it makes things hard to read. Leave it where it is, but pull it's downstream modules up one level, such that the HiddenChartFormatter is it's sibling, not it's child.

  5. JobProgressIndicator. The JobProgressIndicator module doesnt need to contain any nested modules. Again, it has no ill effects but it makes things hard to read. Pull it's child modules up so that they are its siblings.

  6. Autorun. This isnt caused by the simplified XML, but it's best to keep autoRun="True" ata the highest level where you want things kicked off. The reason is that it's very important to never have more than one autoRun="True" for any particular subbranch in the hierarchy. So if you let them live lower then it's easier for them to multiply through copy-and-pasting.

here's the result of these changes. You can see it's not a big difference but it's significantly less nested:

<module name="TimeRangePicker" layoutPanel="panel_row1_col1" group="Disclosed Credentials, By User" autoRun="True">
  <param name="searchWhenChanged">True</param>
  <param name="default">Last 30 days</param>
  <module name="HiddenSavedSearch">
    <param name="savedSearch">Disclosed Credentials By User</param>
    <module name="JobProgressIndicator" />
    <module name="EnablePreview">
      <param name="enable">True</param>
      <param name="display">False</param>
    </module>
    <module name="HiddenChartFormatter">
      <param name="charting.chart.stackMode">stacked</param>
      <param name="charting.secondaryAxisTitle.text">Number of Disclosed Credentials</param>
      <param name="charting.chart">column</param>
      <param name="charting.primaryAxisTitle.text">Time</param>
      <module name="FlashChart">
        <param name="width">100%</param>
      </module>
    </module>
  </module>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

2 things affect whether the 'Enable for PDF Delivery' option is available.

1) the 'actionsMenuFilter' on the TitleBar module. if the value is set to any of 'search', 'dashboard', 'dashboard-SimpleDashboard', then the link will show. I dont think this is your problem because I think it literally hides the menu option rather than simply greying it out. Worth double checking though.

2) whether or not the view contains an 'autoRun="True"' attribute. If it thinks that the view does NOT have one, then it will indeed disable the link. (when the pdfserver loads the view, there is no user to start things moving, so it requires at least one autoRun somewhere) I'm a bit confused because of course your view does contain an autoRun="True". Maybe if you post the whole view we can see what the deal is.


UPDATE: taking a look at your full view posted in your update, I've figured it out. Apparently there's a bug in the python that goes and looks for autoRun attributes. It only looks at the top level modules. So move at least one of the autoRun="True" attributes up a level to a TimeRangePicker module and it'll start working.
I'm surprised that it took this long to find that bug, since it's pretty common for people to have autoRun="True" at a level other than the top level.


Note: I know you didnt ask about this, but a bunch of lines in your XML are only there because they get carried over when you convert from the Simplified XML. If you're in the advanced XML to stay, it can make things easier to read if you remove this cruft.

  1. ViewStateAdapter. 9 times out of 10 that ViewStateAdapter module and it's 'savedSearch' param can be removed (and it's child modules de-nested). In this case, because you're manually specifying the charting settings so you can definitely throw away ViewStateAdapter. It probably wasnt doing anything anyway and if it was just put the keys back in HiddenChartFormatter.

  2. HiddenFieldPicker. 99 times out of 100 that HiddenFieldPicker module and it's 'strictMode' param can be removed (and it's child modules de-nested).

  3. groupLabel. the 'groupLabel' param is a useless artifact of the conversion from simplified XML. Go ahead and remove them all.

  4. EnablePreview. the EnablePreview module doesnt need to contain any nested modules. It has no ill effect but it makes things hard to read. Leave it where it is, but pull it's downstream modules up one level, such that the HiddenChartFormatter is it's sibling, not it's child.

  5. JobProgressIndicator. The JobProgressIndicator module doesnt need to contain any nested modules. Again, it has no ill effects but it makes things hard to read. Pull it's child modules up so that they are its siblings.

  6. Autorun. This isnt caused by the simplified XML, but it's best to keep autoRun="True" ata the highest level where you want things kicked off. The reason is that it's very important to never have more than one autoRun="True" for any particular subbranch in the hierarchy. So if you let them live lower then it's easier for them to multiply through copy-and-pasting.

here's the result of these changes. You can see it's not a big difference but it's significantly less nested:

<module name="TimeRangePicker" layoutPanel="panel_row1_col1" group="Disclosed Credentials, By User" autoRun="True">
  <param name="searchWhenChanged">True</param>
  <param name="default">Last 30 days</param>
  <module name="HiddenSavedSearch">
    <param name="savedSearch">Disclosed Credentials By User</param>
    <module name="JobProgressIndicator" />
    <module name="EnablePreview">
      <param name="enable">True</param>
      <param name="display">False</param>
    </module>
    <module name="HiddenChartFormatter">
      <param name="charting.chart.stackMode">stacked</param>
      <param name="charting.secondaryAxisTitle.text">Number of Disclosed Credentials</param>
      <param name="charting.chart">column</param>
      <param name="charting.primaryAxisTitle.text">Time</param>
      <module name="FlashChart">
        <param name="width">100%</param>
      </module>
    </module>
  </module>
</module>

helge
Builder

Apparently the autorun bug is still present in 5.0.1. Thanks, Nick!

0 Karma

caphrim007
Path Finder

Awesome. That did the trick. Thanks Nick!

0 Karma

sideview
SplunkTrust
SplunkTrust

Looks like there is a bug in the Python where it only checks top level modules for autoRun="True". Kind of lame but easy to workaround. See updated text above.

caphrim007
Path Finder

I wish I had my own little Nick here on my desk that I could ask splunk questions to. Thanks a TON for all those clarifications. Still no luck with the PDF link, so I've pasted the full view that I have. As you guessed, it was originally based off of a simple dashboard that was exported to advanced XML.

0 Karma
Get Updates on the Splunk Community!

New Case Study Shows the Value of Partnering with Splunk Academic Alliance

The University of Nevada, Las Vegas (UNLV) is another premier research institution helping to shape the next ...

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

October 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...