All Apps and Add-ons

Splunk 6.x Dashboard Examples: How to replicate inline icons or rangemaps in javascript?

dfalke
Engager

I have installed the "Splunk 6.x Dashboard Examples" App and I am trying to implement the use of "Inline icons" or "rangemap", both of which have an example in the app.

I have created a separate app for our development and have copied the following files from the example app to our app.

From:

...\Splunk\etc\apps\simple_xml_examples\appserver\static

table_decorations.css
table_icons_inline.js
table_iconds_rangemap.js

To:

...\Splunk\etc\apps\<ourapp>\appserver\static

table_decorations.css
table_icons_inline.js
table_iconds_rangemap.js

Then I attempted to recreate the dashboard in our application, using the source code xml in the example:

<dashboard script="table_icons_inline.js" stylesheet="table_decorations.css">
    <label>Table Icon Set (Inline)</label>
    <row>
        <table id="table1">
            <title>Render Icons based on rangemap result</title>
            <searchString>index=_internal | stats count by sourcetype,source,host</searchString>
            <earliestTime>-1h</earliestTime>
            <option name="drilldown">none</option>
        </table>
    </row>
</dashboard>

The issue is that the inline icons do not work. It seems the CSS and JS are not having an affect, but I am not sure why it's not working. How do I go about troubleshooting? Am I missing the icon files? Any help is appreciated.

Thanks,
David

1 Solution

jmallorquin
Builder

Hi,

Make sure tha you define the id in the table.

<row>
        <table id="table1">
            <title>Render Icons based on rangemap result</title>
            <searchString>index=_internal | stats count by sourcetype,source,host</searchString>
            <earliestTime>-1h</earliestTime>
            <option name="drilldown">none</option>
        </table>
    </row>

Reboot splunk to applie the changes.

Hope help you

View solution in original post

camillak
Path Finder

In my experience, using _bump and Ctrl+F5 to refresh the page, or a browser with caching disabled gives the smoothest experience when editing Splunk appserver files.

0 Karma

sjafferali
Explorer

Hi all,

I have the same issue. I replicated the same from dashboard examples and i also restarted the splunk. I could not see the icons.
Any inputs is much appreciated.

Thanks.

jmallorquin
Builder

Hi,

Make sure tha you define the id in the table.

<row>
        <table id="table1">
            <title>Render Icons based on rangemap result</title>
            <searchString>index=_internal | stats count by sourcetype,source,host</searchString>
            <earliestTime>-1h</earliestTime>
            <option name="drilldown">none</option>
        </table>
    </row>

Reboot splunk to applie the changes.

Hope help you

dfalke
Engager

Rebooting is what resolved the issue. Thank you!!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...