All Apps and Add-ons

How to decrease the Size of a single value panel?

theouhuios
Motivator

Hello

I am trying to decrease the size of the single value panel in a view to utilize the space more efficiently using Sideview

alt text

I want to place the single value in the 2nd row in 1st row itself. Can we have 4 panels in a row? If we decrease the space occupied by single value in row 1 can we have the value in row 2 move to row 1?

1 Solution

sideview
SplunkTrust
SplunkTrust

Sure. To be honest if you're using Sideview Utils the best thing to do with SingleValue is to not use it.

In the simplest form, you can use the HTML module to write out a single value like so:

<module name="HTML">
  <param name="html"><![CDATA[
    <b>total KB = $results[0].sumKB$</b>
  ]]></param>
</module>

To more closely approximate the look and feel of the grey SingleValue elements:

<module name="HTML">
  <param name="html"><![CDATA[
    <div class="valueDisplay">
      <div class="inner"><b>total KB = $results[0].sumKB$</b></div>
    </div>
    <br clear="all">
  ]]></param>
</module>

And there's a whole docs page in Sideview Utils specifically about using the HTML module instead of SingleValue.

In the app itself navigate to "Module Documentation > the HTML Module > Using HTML instead of the SingleValue Module."

I'm not sure where exactly you want to have the two values displayed. One thing I can say is that you cannot have 4 panels in a row.

However you can sneak the HTML modules into the same panels as your charts - just have them render into those panels after the JSCharts and they'll be in the same panel but underneath.

And if you put the HTML module together with a standalone search module to run it, here's what it looks like:

<module name="Search" layoutPanel="panel_row2_col1" >
  <param name="search">index=_internal source=*metrics.log group=per_sourcetype_thruput | stats sum(kb) as sumKB avg(eps) as avgEPS by series | sort - sumKB | head 1</param>
  <param name="earliest">-15min</param>

  <module name="HTML">
    <param name="html"><![CDATA[
      <div class="valueDisplay">
        <div class="inner"><b>total KB = $results[0].sumKB$</b></div>
      </div>
      <br clear="all">
    ]]></param>
  </module>
</module>

Also If you need to do the fancy background-coloring stuff that SingleValue can do keyed off the rangemap command, there are examples of that too in the docs.

View solution in original post

sideview
SplunkTrust
SplunkTrust

Sure. To be honest if you're using Sideview Utils the best thing to do with SingleValue is to not use it.

In the simplest form, you can use the HTML module to write out a single value like so:

<module name="HTML">
  <param name="html"><![CDATA[
    <b>total KB = $results[0].sumKB$</b>
  ]]></param>
</module>

To more closely approximate the look and feel of the grey SingleValue elements:

<module name="HTML">
  <param name="html"><![CDATA[
    <div class="valueDisplay">
      <div class="inner"><b>total KB = $results[0].sumKB$</b></div>
    </div>
    <br clear="all">
  ]]></param>
</module>

And there's a whole docs page in Sideview Utils specifically about using the HTML module instead of SingleValue.

In the app itself navigate to "Module Documentation > the HTML Module > Using HTML instead of the SingleValue Module."

I'm not sure where exactly you want to have the two values displayed. One thing I can say is that you cannot have 4 panels in a row.

However you can sneak the HTML modules into the same panels as your charts - just have them render into those panels after the JSCharts and they'll be in the same panel but underneath.

And if you put the HTML module together with a standalone search module to run it, here's what it looks like:

<module name="Search" layoutPanel="panel_row2_col1" >
  <param name="search">index=_internal source=*metrics.log group=per_sourcetype_thruput | stats sum(kb) as sumKB avg(eps) as avgEPS by series | sort - sumKB | head 1</param>
  <param name="earliest">-15min</param>

  <module name="HTML">
    <param name="html"><![CDATA[
      <div class="valueDisplay">
        <div class="inner"><b>total KB = $results[0].sumKB$</b></div>
      </div>
      <br clear="all">
    ]]></param>
  </module>
</module>

Also If you need to do the fancy background-coloring stuff that SingleValue can do keyed off the rangemap command, there are examples of that too in the docs.

theouhuios
Motivator

That worked. Thanks 🙂

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...