Dashboards & Visualizations

About dynamic drilldown in 5.0

lzhang_soliton
Path Finder

Hi, I have two questions about the dynamic drilldown.

Firstly, I tried to pass some Japanese characters in to another views. But the characters were encoded in UTF-16 and the target view cannot work correctly. I have tried ViewRedirector module in Advance XML and I found ViewRedirector module encodes the same character in UTF-8 and it works. Would you give me some ideas on encoding.

Secondly, how to popup the target view?

<dashboard>
<row>
<table>
<searchString>
sourcetype=mylog username="ユ" | table username
</searchString>
<title>Table Drilldown</title>
<drilldown>
<link>
/app/myApp/newView?q=search username=$row.username$
</link>
</drilldown>
</table>
</row>
</dashboard>

UTF-16 of ユ: %u30E6 (NG)
UTF-8 of ユ:%E3%83%A6 (OK)

0 Karma
1 Solution

Leo
Splunk Employee
Splunk Employee

Unfortunately, there's no encoding capabilities in simple xml drilldown in 5.0, but as a workaround it might be possible to create a custom search command that would encode the username value to UTF-8 and use in the search.

Drilldown doesn't support opening target views in a popup at this moment.

We will investigate these issue for one of the future releases.

View solution in original post

sideview
SplunkTrust
SplunkTrust

If it works in the advanced XML, then you might try using the latest Sideview Utils. Even though it's advanced XML, Sideview Utils makes things a lot simpler so it's not that much harder to read than the Simple XML quite frankly.

Here's an example using the Sideview Redirector module. As well as Search, Pager and Table modules.

And I went ahead and added the "popup" arg to the Redirector, so the drilldown launches in a new window.

<view autoCancelInterval="90" isVisible="true" onunloadCancelJobs="true" template="dashboard.html" isSticky="False">
  <label>Simple table drilldown view</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>Simple table drilldown view</h1>
    ]]></param>
  </module>


  <module name="Search">
    <param name="search">sourcetype=mylog username="X" | table username</param>
    <param name="earliest">-4h</param>

    <module name="JobProgressIndicator"></module>

    <module name="Pager">

      <module name="Table">
        <module name="Redirector">
          <param name="url">newView</param>
          <param name="arg.q">search username="$row.username$"</param>
          <param name="popup">True</param>
        </module>
      </module>
    </module>
  </module>
</view>

Also, if you want to customize attributes of that popup window you can use the "windowFeatures" param, and if you want to send it to a window with a specific windowName, you can use the "target" param. However with just "popup" set to True, it will give you a pretty standard little popup window.

Make sure to get the latest Sideview Utils from the Sideview site at http://sideviewapps.com/apps/sideview-utils. If you only have the version of Sideview Utils from Splunkbase then this example wont work because that copy of the app is really old at this point. In particular you'll need a recent version for the windowFeatures and target param and also for the Table module - none of that is in the old Splunkbase version.

Leo
Splunk Employee
Splunk Employee

Unfortunately, there's no encoding capabilities in simple xml drilldown in 5.0, but as a workaround it might be possible to create a custom search command that would encode the username value to UTF-8 and use in the search.

Drilldown doesn't support opening target views in a popup at this moment.

We will investigate these issue for one of the future releases.

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...