Facility Control

 View Only
  • 1.  Password protect on ultritouch panel

    Posted 08-05-2019 21:30

    I was curious if there was a way to have a certain panel on the Ultritouch grid protected by a password - this particular panel would be used to reboot production servers, and we don't want anyone accidentally doing so. Can it be done?

    To clarify, I don't mean the unit itself. I just want a password-protected panel on the grid itself, while the rest remains unlocked.



  • 2.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 19:51

    Hi Rob.

    There is not presently any password protection built into PanelBuilder for using a CustomPanel. One common approach employed by panel developers is to create a semi-transparent overlay as the top layer of their panel and put a text field on it - if the user types the correct value into the text field, the overlay is hidden and the panel is usable.

    <abs contexttype="opengear" gridaspect="false" gridheight="203" gridwidth="1304" touch="true" virtualheight="203" virtualwidth="1304">
    <meta>
    <params>
    <param access="1" maxlength="0" name="password" oid="password" type="STRING" value="" widget="password"/>
    </params>
    <ogscript handles="onload">ogscript.toTop('overlay');</ogscript>
    </meta>
    <abs bottom="0" id="overlay" left="0" right="0" style="bg#00000065;" top="0" virtualheight="203" virtualwidth="1304">
    <param expand="true" height="48" left="380" oid="password" top="77" width="303"/>
    <button buttontype="push" height="55" left="688" name="Go!" top="73" width="63">
    <task tasktype="ogscript">if (params.getValue('password', 0) == 'password')
    {
    ogscript.hide('overlay');
    }
    params.setValue('password', 0, '');</task>
    </button>
    </abs>
    <button buttontype="push" height="141" left="62" name="PUSH ME!" top="34" width="326"/>
    <button bottom="7" buttontype="push" height="63" name="Logout" right="7" width="217">
    <task tasktype="ogscript">ogscript.reveal('overlay');</task>
    </button>
    </abs>

    #DashBoard


  • 3.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 19:51

    Note: In this case, the password is "password"


    #DashBoard


  • 4.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 19:54

    James, thank you for the reply. I've been experimenting with using a conditional check on a text entry field to allow a command to proceed, which seems to be working too. I've made the text entry field very narrow and transparent so the password isn't visible; is there a way to hash out the entry?

     

    Thanks again.


    #DashBoard


  • 5.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 19:55

    Hi Rob.

    The example code I posted does just this - change the widget hint associated with the text field to "password" and you'll get "*" instead of the typed characters.


    #DashBoard


  • 6.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 20:01

    Excellent - thank you! I changed the widget hint manually to that and it works - this is very helpful. Much appreciated.


    #DashBoard


  • 7.  RE: Password protect on ultritouch panel

    Posted 08-06-2019 21:16

    One other quick question - I have a function that passes a string over telnet, but that string uses triangle brackets within it. Is there an easy way to escape these out so that Dashboard doesn't replace automatically with ASCII codes?

     


    #DashBoard


  • 8.  RE: Password protect on ultritouch panel

    Posted 08-08-2019 20:37

    Hi Rob.

    If you're in the script editor, it should handle this automatically for you. If you to rosstalk.sendMessage(HOST, PORT, '<TEST>');

    It will appear in the XML source as: rosstalk.sendMessage(HOST, PORT, '&lt;TEST&gt;');

    But it would actually send-out the correct ASCII codes for < and > when the message goes over the wire. The escaping is just for storing it in the XML.

    James


    #DashBoard