Dashboards & Visualizations

Is there a way to put single value panel in a table using in-line css without referencing it to a css and js file?

Jhanzkie
Path Finder

Hello Good Day,

Sorry for this very noob question,

Is there a way that I can put to single value panel in a table using in-line css 
without referencing it to a css and  js file ?


For example:

Jhanzkie_0-1649202114740.png

 

makeresults will do to give me an idea. Thanks 🙂

Labels (4)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Is this what you want?

<dashboard>
  <label>Example</label>
  <row>
    <panel>
      <html>
        <h1 style="text-align:center">Panel title</h1>
      </html>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>
            | makeresults
            | eval value = random() % 10000
          </query>
          <earliest>-24h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
    <panel>
      <single>
        <search>
          <query>
            | makeresults
            | eval value = random() % 10000
          </query>
          <earliest>-24h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
  </row>
</dashboard>

Jhanzkie
Path Finder

It's in the same panel and row sir 🙂
and more like of a table style
but i think it's not possible without splunkjs 

anyways thank you for your time.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

@Jhanzkie 

The world is your oyster with inline CSS

See this - single row - single panel

<dashboard>
  <label>Example</label>
  <row>
    <panel depends="$CSS$">
      <html>
        <style>
          #single_value h2.panel-title {
            text-align: center !important;
            font-size: 24px !important;
            border: double !important;
            color: #ff0000 !important;
          }
        </style>
      </html>
    </panel>
    <panel id="single_value">
      <title>Here is a nice panel title in red</title>
      <single>
        <search>
          <query>
            | makeresults
            | eval value = random() % 10000
          </query>
          <earliest>-24h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
      </single>
      <single>
        <search>
          <query>
            | makeresults
            | eval value = random() % 10000
          </query>
          <earliest>-24h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
      </single>
    </panel>
  </row>
</dashboard>

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The single viz has a trellis option - would that give you what you need?

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You can add CSS to a dashboard, e.g.

<row depends="$CSSOnly$">
  <panel>
    <html>
define CSS here
    </html>
  </panel>
</row>
<row>
  <panel>
    <table id="xx">
...
    </table>
  </panel>
</row>

there are lots of examples in this forum

 

0 Karma

Jhanzkie
Path Finder

Hello, thank you for your reply .

What i want is two single value chart in a table if it is possible.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...