Topic
  • 3 replies
  • Latest Post - ‏2013-08-05T13:45:07Z by JamesCole
rick_at_work
rick_at_work
48 Posts

Pinned topic Best way to create auto refresh of WQ dashboards

‏2013-07-30T17:58:26Z |

I have a client who wants to use a HDTV with PC input to display an auto-refreshing dashboard at a plant location. I have had some luck by designing an HTML page in Developer Workbench, adding a few charts / reports and then adding code to the Javascript function area to handle the refresh. The code I used looks like this (where the number is the time interval in microseconds. 100000=100 seconds, 30000=30 seconds, etc.). I've been placing the code after the //TODO line in the on window load function:

 



var 
timeout 
= 
setTimeout
(
"location.reload(true);"
,
100000
);  
function 
resetTimeout
() 
{ 
   clearTimeout
(
timeout
); 
   timeout 
= 
setTimeout
(
"location.reload(true);"
,
100000
);  
}

I find this doesn't always work when testing in the composer but generally works when executed from the portal resource area once saved. In the designer, I get a Microsoft IE9 message pop-up appearing when the page should have auto-refreshed. I am looking for suggestions about the best way to create auto refreshing pages that will work in any browser to display WQ data.  

I have also considered running the WQ reports or charts as scheduled items, creating output HTML, PDF, JPG or PNG files on a periodic basis in the IFS and then referencing them from a totally separate HTML page, leaving the PC running a browser without WQ being involved or not utilizing a WQ license for the PC attached to the TV. Anyone else doing this?  

Any thoughts or insights? Thank you. 

Regards,

Rick

 

  • GeneCobb
    GeneCobb
    371 Posts

    Re: Best way to create auto refresh of WQ dashboards

    ‏2013-07-30T20:34:34Z  

    Rick - A similar, yet easier way (than JavaScript) is a one line meta refresh tag in the <head> section of the HTML. So something like this will refresh the html dashboard every 30 seconds:

    <meta http-equiv="refresh" content="30">

    But it has similar limitations when running/testing from Composer: This message  is displayed when screen should be refreshed:
    No query information to decode.

    However, it seems to work just fine and refresh when run from the BI Portal and REST web services. The thing I don't like about it from an end user perspective is that it is not a background refresh - the whole screen disappears (goes blank) before redisplaying.

    If the end user has Excel, a nice alternative is to create a dashboard in an Excel spreadsheet - charts/reports that are based upon existing Web Query reports (using the Spreadsheet client plug-in) - one like we did in the new Redbook. The Excel graphics/charts are nice and there is a background refresh option with a timer. This has a much softer effect during the refresh because the screen never goes blank.

  • rick_at_work
    rick_at_work
    48 Posts

    Re: Best way to create auto refresh of WQ dashboards

    ‏2013-08-01T14:22:54Z  
    • GeneCobb
    • ‏2013-07-30T20:34:34Z

    Rick - A similar, yet easier way (than JavaScript) is a one line meta refresh tag in the <head> section of the HTML. So something like this will refresh the html dashboard every 30 seconds:

    <meta http-equiv="refresh" content="30">

    But it has similar limitations when running/testing from Composer: This message  is displayed when screen should be refreshed:
    No query information to decode.

    However, it seems to work just fine and refresh when run from the BI Portal and REST web services. The thing I don't like about it from an end user perspective is that it is not a background refresh - the whole screen disappears (goes blank) before redisplaying.

    If the end user has Excel, a nice alternative is to create a dashboard in an Excel spreadsheet - charts/reports that are based upon existing Web Query reports (using the Spreadsheet client plug-in) - one like we did in the new Redbook. The Excel graphics/charts are nice and there is a background refresh option with a timer. This has a much softer effect during the refresh because the screen never goes blank.

    Gene - thanks for your advice. I used the code I posted above because in Dev Workbench, I couldn't find the way to edit the HTML for the page to add the 1-line you referred to. How do you get to that? While edit in composer works great, my option to edit in text editor is greyed out. In the composer, I  can get to Javascript edit but couldn't locate a way to get to the HTML page code.  When you start the HTML, there is a one-time option to import code from somewhere so maybe that's it but I had that one-line in the paste buffer, not in a file waiting to import.  

    Also, in terms of performance. I typically use a MQT to hold the relevant metric data and refresh this in background job as needed. The query to pull the data into WQ is very fast and the refresh time is minimal. For some cases of metrics expressed as number or percents, a 10-row table will suffice with various rows powering  different graphics and the refresh of these is instantaneous but the crunching to create them is hidden in batch, rather than as part of the display job. 

    Rick

  • JamesCole
    JamesCole
    153 Posts

    Re: Best way to create auto refresh of WQ dashboards

    ‏2013-08-05T13:45:07Z  

    Gene - thanks for your advice. I used the code I posted above because in Dev Workbench, I couldn't find the way to edit the HTML for the page to add the 1-line you referred to. How do you get to that? While edit in composer works great, my option to edit in text editor is greyed out. In the composer, I  can get to Javascript edit but couldn't locate a way to get to the HTML page code.  When you start the HTML, there is a one-time option to import code from somewhere so maybe that's it but I had that one-line in the paste buffer, not in a file waiting to import.  

    Also, in terms of performance. I typically use a MQT to hold the relevant metric data and refresh this in background job as needed. The query to pull the data into WQ is very fast and the refresh time is minimal. For some cases of metrics expressed as number or percents, a 10-row table will suffice with various rows powering  different graphics and the refresh of these is instantaneous but the crunching to create them is hidden in batch, rather than as part of the display job. 

    Rick

    Hi Rick, 

    Relating to the edit in text - What web query roles do you have? 

    For example you might have developer workbench rights, but only developer for a domain. To get the text option I think you need to be in the WebQueryAdmin group as well as workbench, which means full access.

     

    However, please use caution when using the text editor if you now have access to it.

    Hope this helps

     

    Kind Regards

    James