• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Display Charts on a Large Screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display Charts on a Large Screen

    I'm trying to display a NAB Chart application on a screen in our warehouses. The app has several chart widgets.
    I want to:
    1. Have a simple URL to hit the screen without a login prompt, and
    2. Have the all the screens refresh every 5 minutes

    I was able to get the app opening using a URL shortcut:
    https://oursystemname:8060/build/production/Runner/index.html?autoLogout=false&app=1042&autoLock=true &portal=false&user=valenceuser&password=goofypassw ord

    I created the user/password in Valence Admin - I'm good with it showing in the URL if this doesn't pose a security risk. I can't quite follow the documentation on calling VVLOGIN to create a session ID to use instead of the user/password. Where would this take place?

    Secondly, I know a refresh interval can be set at the widget level. But is there a way to set an app-level auto refresh interval? Script?

    TIA,
    Greg

  • #2
    Hi Greg,

    If you're attempting to create a session ID on-the-fly, you could make a call to VVLOGIN in a separate program, then use the "customSid" token it returns in your URL, as described in Method 2 here:
    Sometimes the best way to get a business point across to someone, or get them to look at something at all, is to make it insanely easy for them to get where they need to go with a single click. The Valence 5 portal makes it possible to do this with…


    This might be more trouble than it's worth if you already have a URL with an embedded, low-authority user/password that's getting you what you need.


    To mass-set the refresh interval on every widget in your app, you could try this:
    • Create a single app variable named "reloadWidgets" or similar.
    • Link the "refresh" property of each widget to this app variable.
    • Place the following in Behaviors > Startup > Execute Script:
    Code:
    [COLOR=#222222][FONT=Arial][FONT=monospace]setInterval(function() {
    setAppVar('reloadWidgets', true);
    }, 90 * 1000); // 90 seconds in milliseconds
    
    success();[/FONT][/FONT][/COLOR]

    Comment


    • #3
      Thanks Rob!

      I guess the piece I'm missing is how to invoke the program call to generate the customSid value, then get that into the URL.
      The PC that drives our screens simply load the browser at startup with the predetermined URL.

      I'm good with having the user/password in the URL since we can create a low-authority user in the Valence portal that is not an IBM i user. It can't be used to log on to the IBM i.

      This is EXCELLENT!
      Last edited by gwilburn; 07-25-2024, 09:30 AM.

      Comment


      • #4
        So I had some trouble with the above suggestion. After some period of time, the screen would revert to a Valence login. This was SOMETIMES the "lock" screen.

        My URL is
        Code:
        https://tbfpwr9.totalbiz.local:8060/build/production/Runner/index.html?[B]autoLogout=false[/B]&app=1076&user=myuser &password=mypassword&autoLock=true&portal=false
        I cleared the browser cache, but that didn't seem to help.

        So I changed my script to also reload the entire app every hour.

        Code:
        // Refresh the Widgets every 2 minutes
        setInterval(function() {
        setAppVar('reloadAll', true);
        }, 120 * 1000); // 2 minutes in milliseconds
        
        // Reload the App/Screen every 60 minutes
        setInterval(function() {
        location.reload();
        }, 3600 * 1000); // 60 minutes in milliseconds
        success();
        Last edited by gwilburn; 07-30-2024, 03:41 PM.

        Comment

        Working...
        X