Dashboards & Visualizations

Dynamic Single Value Panels Java Script

davesplunk01
Path Finder

Need help on building dynamic single value panel using Java Script / Python, any ideas or sample script will help more.

0 Karma
1 Solution

niketn
Legend

@davesplunk01, If you want to create Single Value through SplunkJS stack you can refer to SingleView documentation on WebFramework: http://docs.splunk.com/Documentation/WebFramework

Following is an example of JS script.

require([
    "splunkjs/mvc/singleview",
    "splunkjs/mvc/simplexml/ready!"
], function(SingleView) {

    // Instantiate components
    new SingleView({
        id: "example-single",
        managerid: "example-search",
        beforeLabel: "Event count:",
        el: $("#mysingleview")
    }).render();
});
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@davesplunk01, If you want to create Single Value through SplunkJS stack you can refer to SingleView documentation on WebFramework: http://docs.splunk.com/Documentation/WebFramework

Following is an example of JS script.

require([
    "splunkjs/mvc/singleview",
    "splunkjs/mvc/simplexml/ready!"
], function(SingleView) {

    // Instantiate components
    new SingleView({
        id: "example-single",
        managerid: "example-search",
        beforeLabel: "Event count:",
        el: $("#mysingleview")
    }).render();
});
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@davesplunk01, I have converted my comment to answer. Please accept if this is what you were looking for.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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 ...