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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...