Dashboards & Visualizations

How to only change style through html to just one panel and not entire dashboard

MeMilo09
Path Finder

Hi Splunk Community,

How can I get the style from html to only apply to just one panel and not the entire dashboard. I wish to decrease the size to just one panel, but it applies the style to the entire dashboard. Below is my code only for the panel I would like to style. Any advise is helpful. 

 

 
</fieldset>
  <row >
    <panel>
      <html>
 <style>

          td {

           line-height: 10px !important;

           font-size: 5px !important;

          }

        </style>

      </html>

      <table>

        <title>Last Updated</title>

        <search>

          <query>| rest /servicesNS/-/-/data/lookup-table-files search="*_Sports_Report.csv"

| eval updated=strptime(updated,"%FT%T%:z")

| eval desired_time=strftime(updated, "%B %d, %Y")

| rename desired_time as "Last Updated" title as Team

| table "Last Updated", Team
</query>

          <earliest>-15m</earliest>

          <latest>now</latest>

        </search>

        <option name="drilldown">none</option>

      </table>

    </panel>

  </row>

 

 

Labels (3)
Tags (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Give your panel/table an id and use that as a qualifier in your style

</fieldset>
  <row >
    <panel>
      <html>
 <style>
          #smaller td {
           line-height: 10px !important;
           font-size: 5px !important;
          }
        </style>
      </html>
      <table id="smaller">
        <title>Last Updated</title>
        <search>
          <query>| rest /servicesNS/-/-/data/lookup-table-files search="*_Sports_Report.csv"
| eval updated=strptime(updated,"%FT%T%:z")
| eval desired_time=strftime(updated, "%B %d, %Y")
| rename desired_time as "Last Updated" title as Team
| table "Last Updated", Team
</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Give your panel/table an id and use that as a qualifier in your style

</fieldset>
  <row >
    <panel>
      <html>
 <style>
          #smaller td {
           line-height: 10px !important;
           font-size: 5px !important;
          }
        </style>
      </html>
      <table id="smaller">
        <title>Last Updated</title>
        <search>
          <query>| rest /servicesNS/-/-/data/lookup-table-files search="*_Sports_Report.csv"
| eval updated=strptime(updated,"%FT%T%:z")
| eval desired_time=strftime(updated, "%B %d, %Y")
| rename desired_time as "Last Updated" title as Team
| table "Last Updated", Team
</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>

MeMilo09
Path Finder

@ITWhisperer  Awesome, thanks!

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...