Dashboards & Visualizations

Error in Splunk dashboard while loading

LogUx
Motivator

Hello Splunkers!!

I am getting below message populating while loading Splunk dashboard as I am using one javascript and css in the dashboard. Please help to fix this error so I will completely disappear.

Error while loading Splunk dashboard.

uagraw01_0-1722698631596.png


Error showing in developer console.

uagraw01_1-1722698654697.png

 

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Can you post your javascript?

0 Karma

LogUx
Motivator
require(["jquery", "splunkjs/mvc", "splunkjs/mvc/simplexml/ready!"], function($, mvc) {
  
    // Properties
    var earliest = 0;
    var latest = 0;
  
    // Update Lead Time to the correct format
    function setFormatLeadTime() {
        $("#lead_time svg text").each(function() {
            if(!$(this).text().match(":")) {
                $(this).text(secondsTimeSpanToDHM($(this).text()));
            }
        });
    }
    
    // Open a URL in a new window
    function setUrl(url) {
        window.open(url, "_blank");
        return false;
    }
  
    // Default Token Components
    var tokens = mvc.Components.get("default");
    
    // Set On-Click listeners
    $("#throughput .splunk-chart").click(function(){ setUrl("/app/customer_reports/throughput_report_-_0136_system?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#availability .splunk-chart").click(function(){ setUrl("/app/customer_reports/availability_report?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#completeness .splunk-chart").click(function(){ setUrl("/app/customer_reports/completeness_order?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#on_time .splunk-chart").click(function(){ setUrl ("/app/customer_reports/on-time_performance_report_customer?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#utilization .splunk-chart").click(function(){ setUrl("/app/customer_reports/load_forming_logic?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#partitioning .splunk-chart").click(function(){ setUrl("/app/customer_reports/load_forming_logic?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#group_coherence .splunk-chart").click(function(){ setUrl("/app/customer_reports/load_forming_logic?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#lead_time .splunk-chart").click(function(){ setUrl("/app/customer_reports/lead_time_report?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    $("#productivity .splunk-chart").click(function(){ setUrl("/app/customer_reports/productivity_total?form.time.earliest="+earliest+"&form.time.latest="+latest+"") });
    
    // Set Token listener for Lead Time
    tokens.on("change:lead_time", function(model, value, options) {
        setTimeout(function() { setFormatLeadTime() }, 500);
        setTimeout(function() { setFormatLeadTime() }, 1500);
    });
    
    // Set Token listener for earliest_epoch
    tokens.on("change:time.earliest_epoch", function(model, value, options) {
        earliest = value;
    }); 
    
    // Set Token listener for latest_epoch
    tokens.on("change:time.latest_epoch", function(model, value, options) {
        latest = value;
    }); 

    // Attribute listener for date time picker 
    $("#time div[data-test='time-range-dropdown'] button").attrchange({
        trackValues: true, /* Default to false, if set to true the event object is updated with old and new value.*/
        callback: function (event) { 
            //event               - event object
            //event.attributeName - Name of the attribute modified
            //event.oldValue      - Previous value of the modified attribute
            //event.newValue      - New value of the modified attribute
            //Triggered when the selected elements attribute is added/updated/removed
            if (event.attributeName == "aria-expanded" && event.newValue == "true") {
                $("div[data-test-panel-id='date'] > button[data-test='toggle']").click();
                $("div[data-test='range-type'] button").attrchange({
                    trackValues: true,
                    callback: function (event) { 
                        $("button[data-test-value='since']").click()
                    }
                });
                $("div[data-test-value='between'] > button[data-test='toggle']").click(); 
            }
        }
    });

});

 

@bowesmana Please check the above pasted script.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Have you looked at the chromestatus URL - that tells you the events were deprecated in July 2024 - you can re-enable them, but you may want to look at your script against that explanation.

 

LogUx
Motivator

@bowesmana Could you help me to understand what does it actually mean ?

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Unfortunately not - I don't understand it myself

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Mastering Threat Intelligence in ES 8.5, Splunk AI Assistant v2, and More from Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...