Dashboards & Visualizations

How to add the description for dashboard in beginning which looks good

splunklearner
Communicator
<form version="1.1" theme="light">
<label>Dashboard</label>
<!-- Hidden base search for dropdowns -->
<search id="base_search">
<query>
index=$index$ ----------
</query>
<earliest>$time_tok.earliest$</earliest>
<latest>$time_tok.latest$</latest>
</search>
<fieldset submitButton="false"></fieldset>
<row>
<panel>
<html>
<p>⚠️ Kindly avoid running the Dashboard for extended time frames <b>(Last 30 days)</b> unless absolutely necessary, as it may impact performance.</p>
<p>To get started, Please make sure to select your <b>Index Name</b> - this is required to display the dashboard data </p>
</html>
</panel>
</row>

This is how I am writing the description. But I am not satisfied because it is not eye catchy. When the user opens the dashboard he should see this note first, i want in that way. I am not aware of HTML as well. Can some one help me. Copied icon from google and it seems small in dashboard.

splunklearner_0-1753973750622.png

 

Labels (2)
0 Karma

PrewinThomas
Builder

@splunklearner 

Can you try below, You can reduce font-size further if needed.

<dashboard version="1.1" theme="light">
<label>Your dashboard name</label>

<!-- ===== NOTICE PANEL ===== -->
<row>
<panel>
<html>
<style>
.compact-warning {
background-color: #fff3cd;
border-left: 4px solid #ffa500;
padding: 10px 15px;
font-family: Arial, sans-serif;
font-size: 13px;
margin-bottom: 5px;
border-radius: 4px;
max-width: 800px;
}
.compact-warning h3 {
color: #d9534f;
margin: 0 0 5px 0;
font-size: 12px;
}
.compact-warning p {
margin: 3px 0;
}
</style>

<div class="compact-warning">
<h3>⚠️ Performance Notice</h3>
<p><strong>Please avoid selecting long time ranges</strong> (e.g., <em>Last 30 days</em>) unless absolutely necessary, as it may impact dashboard performance.</p>
<p>Make sure to choose your <strong>Index Name</strong> to begin viewing data.</p>
</div>
</html>

</panel>
</row>

<!-- rest of your dashboard -->
</dashboard>

Regards,
Prewin
Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!

0 Karma

livehybrid
Ultra Champion

hi @splunklearner 

How about this?

livehybrid_0-1753974236629.png

 

<dashboard version="1.1" theme="light">
  <label>Your dashboard name</label>

  <!-- ===== NOTICE PANEL ===== -->
  <row>
    <panel>
      <html>
        <div style="
            background: linear-gradient(120deg,#fff5f5 0%,#fff 100%);
            border-left: 6px solid #ff9800;
            box-shadow: 0 2px 6px rgba(0,0,0,.12);
            border-radius: 6px;
            padding: 18px 24px;
            font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
            font-size: 15px;
            line-height: 1.45;">
          <h3 style="color:#d84315; margin:0 0 8px 0; display:flex; align-items:center;">
            <!-- unicode icon (search engine–friendly, scales with text size) -->
            <span style="font-size:32px; margin-right:12px;">⚠️</span>
            Performance notice
          </h3>
          <p style="margin:0 0 10px 0; color:#424242;">
            Avoid running the dashboard for long date ranges
            <strong>(Last 30 days)</strong> unless strictly needed – it may
            impact performance.
          </p>
          <p style="margin:0; color:#424242;">
            Before you continue, please select the <strong>Index Name</strong>
            above. The dashboard will remain empty until an index is chosen.
          </p>
        </div>
      </html>
    </panel>
  </row>

  <!-- rest of your dashboard -->
</dashboard>

:glowing_star: Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

splunklearner
Communicator

Performance notice text seems not aligned and want this box to be bit small (may be length wise) because I have nearly 10 Dropdowns and below that there is again text and panels. Because of this note which is bigger, panels are not visible initially. Users need to scroll down. Felt bit awkward for me

0 Karma

livehybrid
Ultra Champion

Hi @splunklearner 

Without your full dashboard code its going to be hard for me to make these changes blind, however if you have a look at the CSS within the code I provided there are a number of settings you can update, such as font-size which is currently 15px but could be changed down to 10px for much smaller text.

If this has been helpful please consider adding karma to the relevant posts.

Many thanks

Will

splunklearner
Communicator

splunklearner_0-1753974932070.png

This is how it is showing. Can you please format more the performance notice..

splunklearner_1-1753974996523.png

We have this as well below dropdowns. Any chance can we club all these all in one note...confused

0 Karma

livehybrid
Ultra Champion

Hi @splunklearner 

Sorry Im not following what you're asking for here, please could you clarify?

You can edit the HTML to say whatever you need, just apply the same styling as in the example.

:glowing_star: Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

splunklearner
Communicator

I have one more problem here.. I want importance notice to be on the top. But here dropdowns are o n top. Tried to create a role and panel for dropdowns so that they will come below notice message but I am not able to give submit button clearly. Can someone help me with this?

splunklearner_0-1754024061260.png

 

0 Karma

PrewinThomas
Builder

try below,

<form version="1.1" theme="light">
  <label>Dashboard</label>

  <!-- NOTICE PANEL FIRST -->
  <row>
    <panel>
      <html>
        <style>
          .notice-box {
            background-color: #fff3cd;
            border-left: 4px solid #ffa500;
            padding: 10px 15px;
            font-family: Arial, sans-serif;
            font-size: 13px;
            margin-bottom: 10px;
            border-radius: 4px;
          }
          .notice-box h3 {
            color: #d9534f;
            margin: 0 0 5px 0;
            font-size: 12px;
          }
        </style>
        <div class="notice-box">
          <h3>⚠️ Performance Notice</h3>
<p><strong>Please avoid selecting long time ranges</strong> (e.g., <em>Last 30 days</em>) unless absolutely necessary, as it may impact dashboard performance.</p>
<p>Make sure to choose your <strong>Index Name</strong> to begin viewing data.</p>
        </div>
      </html>
    </panel>
  </row>

  <!-- DROPDOWNS IN SEPARATE ROW -->
  <row>
    <panel>
      <input type="dropdown" token="index_tok" searchWhenChanged="false">
        <label>Select Index</label>
        <choice value="main">main</choice>
        <choice value="other">other</choice>
      </input>

      <input type="time" token="time_tok" searchWhenChanged="false">
        <label>Select Time Range</label>
        <default>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </default>
      </input>
    </panel>
  </row>

  <!-- SUBMIT BUTTON IN ITS OWN ROW -->
  <row>
    <panel>
      <fieldset submitButton="true" autoRun="false"/>
    </panel>
  </row>

  <!-- SEARCH AND RESULTS -->
  <search id="base_search">
    <query>index=$index_tok$ ...</query>
    <earliest>$time_tok.earliest$</earliest>
    <latest>$time_tok.latest$</latest>
  </search>

  <!-- Add your result panels here -->
</form>

Regards,
Prewin
Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!

splunklearner
Communicator

splunklearner_0-1754024889323.png

@PrewinThomas  this is the error

0 Karma

PrewinThomas
Builder

@splunklearner 
Your XML contains empty sections which is throwing warnings.
try below to highlight message and drop down samples.

<form version="1.1" theme="light">
  <label>Dashboard</label>

  <!-- NOTICE PANEL FIRST -->
  <row>
    <panel>
      <html>
        <style>
          .notice-box {
            background-color: #fff3cd;
            border-left: 4px solid #ffa500;
            padding: 10px 15px;
            font-family: Arial, sans-serif;
            font-size: 13px;
            margin-bottom: 10px;
            border-radius: 4px;
          }
          .notice-box h3 {
            color: #d9534f;
            margin: 0 0 5px 0;
            font-size: 12px;
          }
        </style>
        <div class="notice-box">
          <h3>⚠️ Performance Notice</h3>
<p><strong>Please avoid selecting long time ranges</strong> (e.g., <em>Last 30 days</em>) unless absolutely necessary, as it may impact dashboard performance.</p>
<p>Make sure to choose your <strong>Index Name</strong> to begin viewing data.</p>
        </div>
      </html>
    </panel>
  </row>

  <!-- DROPDOWNS IN SEPARATE ROW -->
  <row>
    <panel>
      <input type="dropdown" token="index_tok" searchWhenChanged="false">
        <label>Select Index</label>
        <choice value="main">main</choice>
        <choice value="other">other</choice>
      </input>

      <input type="time" token="time_tok" searchWhenChanged="false">
        <label>Select Time Range</label>
        <default>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </default>
      </input>
    </panel>
  </row>

 

  <!-- SEARCH AND RESULTS -->
  <search id="base_search">
    <query>index=$index_tok$ ...</query>
    <earliest>$time_tok.earliest$</earliest>
    <latest>$time_tok.latest$</latest>
  </search>

  <!-- Add your result panels here -->
</form>



0 Karma

splunklearner
Communicator

but I can't see the submit button in this XML

0 Karma

livehybrid
Ultra Champion

Hi @splunklearner 

Unfortunately its not possible to natively move the Submit button to anywhere other than the top of the screen and there can only be a single submit button per dashboard. See https://community.splunk.com/t5/Dashboards-Visualizations/Submit-button-per-panel-in-Simple-XML/td-p... for more info on this including workarounds - do you want me to see if we can make this approach work with your dashboard?

The only other alternative would be to have the message displayed below your input fields as per the original example, let me know!

:glowing_star: Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

splunklearner
Communicator

splunklearner_0-1754031764843.png

But when we use notice in here this notice is slightly overlapping with dropdowns which feels bad. Can you do something to maintain some space between them? 

<form version="1.1" theme="light">
  <label>Dashboard</label>
<fieldset submitButton="true" autoRun="false">
     <html>
        <div style="
            background: linear-gradient(120deg,#fff5f5 0%,#fff 100%);
            border-left: 6px solid #ff9800;
            box-shadow: 0 2px 6px rgba(0,0,0,.12);
            border-radius: 6px;
            padding: 18px 24px;
            font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
            font-size: 15px;
            line-height: 1.45;">
          <h3 style="color:#d84315; margin:0 0 8px 0; display:flex; align-items:center;">
            <!-- unicode icon (search engine–friendly, scales with text size) -->
            <span style="font-size:32px; margin-right:12px;">⚠️</span>
            Important Notice
          </h3>
          <p style="margin:0 0 10px 0; color:#424242;">
            Avoid running the dashboard for long date ranges
            <strong>(Last 30 days)</strong> unless strictly needed – it may
            impact performance. Use shorter ranges for faster results.
          </p>
          <p style="margin:0; color:#424242;">
            Please ensure an <strong>Index Name</strong> is selected - this is required to load dashboard data.
          </p>
        </div>
      </html>
    <input type="dropdown" token="index">
      <label>Enter your Index Name</label>
      <fieldForLabel>index</fieldForLabel>
      <fieldForValue>index</fieldForValue>
      <search>

This is the XML currently using for this.... 

0 Karma

PrewinThomas
Builder

@splunklearner 
You can add <div> block for that,

<form version="1.1" theme="light">
  <label>Dashboard</label>

  <fieldset submitButton="true" autoRun="false">
    <html>
      <div style="
          background: linear-gradient(120deg,#fff5f5 0%,#fff 100%);
          border-left: 6px solid #ff9800;
          box-shadow: 0 2px 6px rgba(0,0,0,.12);
          border-radius: 6px;
          padding: 18px 24px;
          font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
          font-size: 15px;
          line-height: 1.45;
          margin-bottom: 24px;"> <!-- 👈 spacing between notice and dropdown -->
        <h3 style="color:#d84315; margin:0 0 8px 0; display:flex; align-items:center;">
          <span style="font-size:32px; margin-right:12px;">⚠️</span>
          Important Notice
        </h3>
        <p style="margin:0 0 10px 0; color:#424242;">
          Avoid running the dashboard for long date ranges
          <strong>(Last 30 days)</strong> unless strictly needed – it may
          impact performance. Use shorter ranges for faster results.
        </p>
        <p style="margin:0; color:#424242;">
          Please ensure an <strong>Index Name</strong> is selected - this is required to load dashboard data.
        </p>
      </div>
    </html>

Regards,
Prewin
Splunk Enthusiast | Always happy to help! If this answer helped you, please consider marking it as the solution or giving a Karma. Thanks!

splunklearner
Communicator

splunklearner_0-1754033911183.png

Looks good but it look bit bad for dark mode. Can you help me with the good colors? sorry I am asking more

0 Karma

splunklearner
Communicator

one more thing, if I enter this html, the dashboard theme automatically going to light theme, even if I select dark theme... is there any limitation for HTML or alert symbol that it cannot use dark mode? any work around for this? because I want one of the 3 dashboards to be in dark mode.

0 Karma

splunklearner
Communicator

https://community.splunk.com/t5/Dashboards-Visualizations/Why-does-dark-theme-switch-fail-when-using...

This is expected it seems. Any workaround we have to overcome this?

0 Karma

PrewinThomas
Builder

try this,

<div style="
    background: linear-gradient(120deg, #2e2e2e 0%, #1a1a1a 100%);
    border-left: 6px solid #ffb74d;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 18px 24px;
    font-family: -apple-system,BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 24px;">
  <h3 style="color: #ffa726; margin: 0 0 8px 0; display: flex; align-items: center;">
    <span style="font-size: 32px; margin-right: 12px;">⚠️</span>
    Important Notice
  </h3>
  <p style="margin: 0 0 10px 0; color: #e0e0e0;">
    Avoid running the dashboard for long date ranges <strong>(Last 30 days)</strong> unless strictly needed –
    it may impact performance. Use shorter ranges for faster results.
  </p>
  <p style="margin: 0; color: #e0e0e0;">
    Please ensure an <strong>Index Name</strong> is selected – this is required to load dashboard data.
  </p>
</div>

splunklearner
Communicator
<form version="1.1" theme="light">
  <!-- Dashboard Name -->
  <label>Dashboard</label>
  <!-- Search Panel BEGIN -->
  <!-- Search Panel END -->
  <!-- Table BEGIN -->
  <row>
    <panel>
      <html>
        <div style="
            background: linear-gradient(120deg,#fff5f5 0%,#fff 100%);
            border-left: 6px solid #ff9800;
            box-shadow: 0 2px 6px rgba(0,0,0,.12);
            border-radius: 6px;
            padding: 18px 24px;
            font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;
            font-size: 15px;
            line-height: 1.45;">
          <h3 style="color:#d84315; margin:0 0 8px 0; display:flex; align-items:center;">
            <!-- unicode icon (search engine–friendly, scales with text size) -->
            <span style="font-size:32px; margin-right:12px;">⚠️</span>
            Important Notice
          </h3>
          <p style="margin:0 0 10px 0; color:#424242;">
            Avoid running the dashboard for long date ranges
            <strong>(Last 30 days)</strong> unless strictly needed – it may
            impact performance. Use shorter ranges for faster results.
          </p>
          <p style="margin:0; color:#424242;">
            Please ensure an <strong>Index Name</strong> is selected - this is required to load dashboard data.
          </p>
        </div>
      </html>
    </panel>
  </row>
  <fieldset submitButton="true" autoRun="false">
      <input type="dropdown" token="index">
        <label>Enter your Index Name</label>
        <fieldForLabel>index</fieldForLabel>
        <fieldForValue>index</fieldForValue>
        <search>
          <query> ------ |stats count by index</query>
          <earliest>$time_range.earliest$</earliest>
          <latest>$time_range.latest$</latest>
        </search>
      </input>
      <input type="text" token="support_id_tok" searchWhenChanged="false">
        <label>Enter support_id</label>
      </input>
      <input type="time" token="time_range" searchWhenChanged="false">
        <label>Select time range</label>
        <default>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </default>
      </input>
      </fieldset>
  <row>
    <panel>
      <html>
        <a class="btn btn-primary pull-left" href="/app/search/------">Reset</a>
      </html>
    </panel>
  </row>
  <row depends="$support_id_tok$">
    <panel>
      <html>
<div style="display: flex; justify-content: space-between; border-bottom: 1px solid #ccc; padding-bottom: 5px; padding-right: 150px; margin-bottom: 10px;">
-------------Rest of the dashboard------------------
0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...