Dashboards & Visualizations

How to switch the dashboard after a regular interval in the app ?

Real_captain
Path Finder

Hi Team 

Is it possible to switch the dashboard after a regular interval in the same app ? 
I've around 15 dashboards in the same app and i want to switch to next dashboard after every 2 mins. 

Real_captain_0-1743604964762.png


In the above attached screenshot , i have around 15 dashboards and the home screen is always "ESES Hotline SUMMARY"  dashboard. 
Is it possible to move automatically to next dashboard "ESES Hotline" after 2 mins and then move automatically to next dashboard "EVIS Application" after 2 mins and so on. 

 

 

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

While that is doable with JS code in simpleXML dashboard it's worth considering what's the goal here.

I mean each load of the dashboard (unless it uses a scheduled report to power the widgets) will execute searches. If their results aren't supposed to change you might - instead of go for rotating dashboards, create one bigger dashboard and use JS to toggle visibility of panels - this will give you the same result carouseling the panels but will not stress the server by spawning the same searches repeatedly.

0 Karma

tomapatan
Communicator

Good point! My refresh interval would have definitely been set to more than 10 seconds, so good call on that. Unfortunately, I spoke too soon—this solution won’t work as it refreshes the dashboard for all users, which isn’t the intended behaviour. I still need something similar to looping through browser tabs, but without requiring the installation of an extension.

0 Karma

tomapatan
Communicator

Hi,

This is what did the trick for me - save it as "dashboard-carousel.js"

(function() {
    // List of dashboard URLs to cycle through
    const urls = [
        "http://10.......",
        "http://10.......",
        "http://10......."
    ];

    // Time interval for cycling (in milliseconds)
    const interval = 10000; // 10 seconds

    // Get the current index from the URL query parameter (default to 0)
    const urlParams = new URLSearchParams(window.location.search);
    let currentIndex = parseInt(urlParams.get("index")) || 0;

    // Function to redirect to the next dashboard
    function cycleDashboards() {
        // Increment the index for the next cycle
        currentIndex = (currentIndex + 1) % urls.length;

        // Redirect to the next URL with the updated index as a query parameter
        window.location.href = `${urls[currentIndex]}?index=${currentIndex}`;
    }

    // Start the cycling process after the specified interval
    setTimeout(cycleDashboards, interval);
})();

Then reference it like this in your dashboard XML

<dashboard version="1.0" hideChrome="true"  script="dashboard-carousel.js">

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

I don't think that you can do this with core splunk. But if you are using classic dashboards then maybe this is doable with javascript? And there is also react ui (see splunkui.splunk.com) which can help you with it? Maybe someone else who are more familiar with those and could help you?

Also this app maybe help you https://splunkbase.splunk.com/app/6859 ?

r. Ismo

0 Karma

livehybrid
Super Champion

Hi @Real_captain 

There isn't a built-in Splunk Web feature for this rotation. I would recommend using a browser extension such as "Tab Rotate" - these often have configurations like the amount of time and rate at which different tabs are rotated/reloaded.

Alternatively if you are using Classic dashboards you could write some custom javascript but I think you'll probably have better success, quicker, with an off-the-shelf browser extension.

 

🌟 Did this answer help you? If so, please consider:

  • Adding kudos to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing.

0 Karma
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...