Dashboards & Visualizations

How do you display a blank panel?

zeespl
Explorer

if the query returns no result, I want to display a blank panel with no text or value.

Tags (1)
0 Karma

cmerriman
Super Champion

try a depends/rejects with a conditional token to replace the panel with an empty html panel. Here is just a random syntax you can pick apart for the xml.

<row>
    <panel rejects="$blankpanel$">
      <table>
        <title>title here</title>
        <search>
          <query>|makeresults|eval blank=""|fields - blank _time</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <progress>
          <condition match="'job.resultCount'=0">
            <set token="blankpanel"></set>
          </condition>
          </progress>
        </search>
        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
    <panel depends="$blankpanel$">
      <html>
        <b>title here</b>
        <br/>
      </html>
    </panel>
  </row>

pitmod
Explorer

@cmerriman works great. Thanks

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