Dashboards & Visualizations

View not getting expected results...

DTERM
Contributor

I'm not getting the expected results from the following view code. The sample is directly from the "Sideview" app from Splunk. The problem is I've added my own code to the view. My code works as a standalone view. I want to integrate it into the following to get some additional HTML functionally. Why does my code not show up as part of the view?

<!-- Copyright (C) 2010-2011 Sideview LLC.  All Rights Reserved. -->
<view autoCancelInterval="90" isVisible="true" onunloadCancelJobs="true" template="dashboard.html" isSticky="False">
  <label>embedding static HTML</label>
  <module name="AccountBar" layoutPanel="appHeader" />
  <module name="AppBar" layoutPanel="appHeader" />
  <module name="SideviewUtils" layoutPanel="appHeader" />

  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="maxSize">2</param>
    <param name="clearOnJobDispatch">False</param>
  </module>


  <module name="HTML" layoutPanel="viewHeader">
    <param name="html"><![CDATA[
    <h1>Embedding static HTML</h1>
    ]]></param>
  </module>

  <module name="HTML" layoutPanel="panel_row1_col1">
    <param name="html"><![CDATA[
      <p>
        HTML can replace StaticContentSample, SingleValue, SimpleResultsHeader and much more...
      </p>
      <p>
        First though lets start with simple static HTML because we'll get to the other stuff in the next two examples.   For putting various static HTML into your views, Splunk ships with a couple modules called ServerSideInclude and StaticContentSample
.  
      </p>
      <p>
        ServerSideInclude requires you to create and maintain an HTML file in your app's appserver/static directory and although this is good for some cases it's usually clunkier than what you need.   And StaticContentSample does an OK job but the name 
is just too silly for primetime.
      </p>


    ]]></param>
  </module>

  <!--  ******************************************************************* -->

  <module name="HTML" layoutPanel="panel_row2_col1" group="Very simple static HTML example">
    <param name="html"><![CDATA[
      <p>
        If you've been following along in the XML source as you read, then you're already very familiar with this module, because every piece of embedded copy in this app has used an HTML module already.
      </p>
      <p>
        But yes, as long as you wrap the HTML in CDATA you can just jam any old HTML in here.  Be careful to close all your div tags.  Unless of course you want to do strange and subversive things to the page.
      </p>
      <table class="splTable">
        <tr>
          <th>Goodness</th>
          <th>Gracious</th>
        </tr>
        <tr>
          <td>plain old HTML ftw</td>
          <td>42</td>
        </tr>
      </table>

      ]]></param>
  </module>

  <module name="HTML" layoutPanel="panel_row2_col2">
    <param name="html"><![CDATA[
      <h3>Notes</h3>
      <ol class="notesList">
        <li>
          The next two pages are a LOT more exciting. If you're reading this then you have already tarried too long.
        </li>
        <li>
          read the specification for the Sideview module <a href="/modules#Splunk.Module.HTML" target="_blank">HTML and its params</a>
        </li>
      </ol>
      ]]></param>
  </module>

<!--  CODE FOLLOWS -->

  <module name="GenericHeader" layoutPanel="panel_row1_col1">
    <param name="label">Customer Activity (Most ACTIVE)</param>
      <param name="invervalInSeconds">300</param>
      <module name="HiddenSearch" autoRun="True" layoutPanel="panel_row1_col1_grp1">
  <param name="search"> 
          index="MyIndex" | timechart count by Customer 
  </param>
        <param name="earliest">-1h</param>
        <module name="HiddenChartFormatter">
          <param name="chart">line</param>
          <param name="chart.nullValueMode">connect</param>
          <param name="secondaryAxis.scale">log</param>
          <param name="primaryAxisTitle.text">Time</param>
          <param name="secondaryAxisTitle.text">Volume</param>
          <module name="FlashChart"/>
        </module>
      </module>
  </module>

<!-- CODE COMPLETE -->

</view>
Tags (1)
0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

It looks like you've taken the Sideview Utils view and then added a GenericHeader, a HiddenSearch, a HiddenChartFormatter and a FlashChart module to the first dashboard panel.

One problem is that there's a typo in your config -- you've given the GenericHeader module a param called 'invervalInSeconds' but I don't think it has anything like that.

But aside from that the added modules should render into the first dashboard panel just fine. If they are not, then I would check whether you've hit the 'refresh endpoint' to reload the view XML from disk. You can go to http://<your host and port>/app/sideview_utils/refresh_entities which makes this task a lot easier. Quite possibly the XML just hadn't been refreshed.

View solution in original post

sideview
SplunkTrust
SplunkTrust

It looks like you've taken the Sideview Utils view and then added a GenericHeader, a HiddenSearch, a HiddenChartFormatter and a FlashChart module to the first dashboard panel.

One problem is that there's a typo in your config -- you've given the GenericHeader module a param called 'invervalInSeconds' but I don't think it has anything like that.

But aside from that the added modules should render into the first dashboard panel just fine. If they are not, then I would check whether you've hit the 'refresh endpoint' to reload the view XML from disk. You can go to http://<your host and port>/app/sideview_utils/refresh_entities which makes this task a lot easier. Quite possibly the XML just hadn't been refreshed.

Get Updates on the Splunk Community!

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...

Alerting Best Practices: How to Create Good Detectors

At their best, detectors and the alerts they trigger notify teams when applications aren’t performing as ...

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...