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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...