Dashboards & Visualizations

Why did my code break my dashboard? It's still stuck at "loading" after extensive troubleshooting.

samlinsongguo
Communicator

I created a new dashboard which has a few panels inside. Each panel only contain HTML code that displays a thumbnail of another dashboard using an iframe tag.
Everything works fine for creating the dashboard, but the dashboard can not be loaded by anyone else including me trying to open it in a different tab. It's just stuck at loading page and notice the banner not even loading alt text There is \n in the page in that page not sure why is there. It just stay in this page forever.

I already tried clearing my browser cookie, restarting my computer, using a different browser (IE and Chrome) and using different accounts. I even restarted the server. None of these methods can fix this problem.

Any one can give some suggestions please?
Code as below

Dashboard_Thumbnail

<panel>
  <title>Windows User Activities</title>
  <html>
    <head> <!--Define CSS to each thumbnail due to size different -->
      <style type="text/css">
        .thumbnail_WinUserActD iframe <!--control iframe setting-->
        {
        <!--this is iframe size since it is shunked so the pix is so large -->
          width: 1700px;
          height: 1100px;
          #border: 10px red solid;
        }
        .thumbnail_WinUserActD <!--control outside setting-->
        {
          #border: 2px black solid;
          width: 100%;
          height: 300px;
          -ms-zoom: 0.25;
          -moz-transform: scale(0.25);
          -webkit-transform: scale(0.25); <!--chrome -->
          -o-transform: scale(0.25);

          -o-transform-origin: 0 0;
          -webkit-transform-origin: 0 0;
          -moz-transform-origin: 0 0;
        }

      </style>
    </head>


    <div class="thumbnail_WinUserActD">
     <iframe src="url" frameborder="0"/>
    </div>
    <a href="url">View in New Tab</a>

Regards
Sam

0 Karma
1 Solution

niketn
Legend

@samlinsongguo, Have you tried browser inspector to see whether there is an error logged in console?

You do the following changes

1) Remove <head> and </head>. Since SimpleXML dashboard converts to HTML Dashbaord, The final dashboard that is opened in browser actually already has a <head> section.

2) For the style block type="text/css" is not required

<style>
    //CSS style goes here 
</style>

3) To clear cache restart, refresh or bump Splunk. Also clear your existing Broswer history and re-open your dashboard to test.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

markakirkland
Path Finder

Another consideration could be if Splunk is being redirected through a Gateway, Load Balancer, etc.

Busy Gateways can timeout depending on several variables...

For the purposes of this question, this possibility should be ruled out if it is not a factor.

If it is a factor, as mentioned above, switch to Developer mode in your browser (F12), and that should display all communications, good and bad, from client to server.

0 Karma

niketn
Legend

@samlinsongguo, Have you tried browser inspector to see whether there is an error logged in console?

You do the following changes

1) Remove <head> and </head>. Since SimpleXML dashboard converts to HTML Dashbaord, The final dashboard that is opened in browser actually already has a <head> section.

2) For the style block type="text/css" is not required

<style>
    //CSS style goes here 
</style>

3) To clear cache restart, refresh or bump Splunk. Also clear your existing Broswer history and re-open your dashboard to test.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

blachance_splun
Splunk Employee
Splunk Employee

Upvoting because this resolved a similar issue for me - when we copied XML from an earlier version of Splunk into the dashboard creation page it worked fine, but afterwards when navigating to the page it would not load the dashboard or nav bar. Removing the head and /head tags worked like a charm.

0 Karma

samlinsongguo
Communicator

Thank you very much Nicktnilay. that is solved the problem, you saved my day:). Thank you again

0 Karma

niketn
Legend

Anytime Sam. Helping each other is what we are all here for!!!

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