Facility Control

 View Only
  • 1.  Using dashboard to perform NK-Router Snapshots

    Posted 05-29-2017 14:12

    Hi Everyone,

    I've been looking at writing some code to make/restore snapshots to/from an nk-router, and so far I can grab all the data fine. My issue comes when restoring the snapshot. I have currently written the following code to send the crosspoints back to the router, but I need to slow the for loop down otherwise it fires the switch requests quicker than they can be handled by the IPS.

    0x88 is a display box what what is currently being done/last completed
    0x70 is the number of crosspoints in the matrix
    0x100 is an integer array, with all the crosspoint sources saved.

    <button buttontype="push" colspan="1" fill="both" name="Load 0" rowspan="1" weightx="1.0" weighty="1.0">
       <task>params.setValue(0x88,0,'Please Wait, Loading 0');</task>
       <task tasktype="ogscript">for (load_count = 0; load_count &lt;= (params.getValue(0x70, 0) -1); load_count = load_count + 1)
    {
       nk.doSwitch(load_count,(params.getValue(0x100,load_count)-1),1);
       }</task>
       <task>params.setValue(0x88,0,'Loaded 0');</task>
    </button>

    Ideally I'm looking at wanting to add a delay of 25ms between each for loop, to prevent hammering/overloading the IPS. Can anyone suggest a good way to do this?

    Once the code is fully working I'm happy to post it all up for other people to make use of, as I suspect it might be useful to a few people. (Screenshot of what it will look like attached)

    Cheers
    James



  • 2.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 05-29-2017 20:07

    DashBoard does not let you pause inside of normal tasks (this is to avoid freezing the user interface while a task runs for a long time). However, if you execute your code in the asyncExec thread, ogscript.pause becomes available.

    Check out this example:

    <button buttontype="push" height="303" left="298" name="Script with pauses" top="128" width="639">
       <task tasktype="ogscript">function scriptWithPauses()
    {
       for (var i = 0; i &lt; 10; i++)
       {
          ogscript.debug("Hello");
          ogscript.pause(1000);
       }
    }
    ogscript.asyncExec(scriptWithPauses);
    
    </task>
    </button>
    

    #DashBoard


  • 3.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 05-30-2017 11:44

    Hi James,

    I think that has got it sussed, Thank you very much

    I believe that this is all up and running if anyone else wants to test/have a play with it, as I think I've proved it as far as I can for the moment. You will need to add your NK ID into the nk-router abs context.

    I hope this is useful to people.

    Usage:
    Select Router Type (to calculate the number of crosspoints to process)
    Enter a Name
    Click Save in the slot where you would like to save your Snapshot (if this appears to do nothing, then there is no connection to the router)
    Clcik Restore to Restore a Snapshot.
    Click Clear to delete the snapshot.
    If you Lock a Snapshot, then you cannot Save over it or Clear it. There is no restriction on restoring a snapshot at any time.


    Current Limitations:
    It only saves and restores Layer 0 (MD Vid as standard)
    You must save the grid file, otherwise your snapshots will not be preserved in the event of a power loss.
    There is no double check that you want to restore a snapshot, it just does it.

    <abs contexttype="opengear">//Code Written by James Sladen, code@james.sladen.org, with help from James Peltzer from Ross. v1.2<meta>
          <api>function debug(str)
      {
      ogscript.debug(str);
      }</api>
          <params>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x101 Snapshot_1_Data" oid="0x101" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x102 Snapshot_2_Data" oid="0x102" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x103 Snapshot_3_Data" oid="0x103" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x104 Snapshot_4_Data" oid="0x104" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x105 Snapshot_5_Data" oid="0x105" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x106 Snapshot_6_Data" oid="0x106" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x107 Snapshot_7_Data" oid="0x107" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x108 Snapshot_8_Data" oid="0x108" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x109 Snapshot_9_Data" oid="0x109" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" constraint="-1.0;144.0;-1.0;144.0;1" constrainttype="INT_STEP_RANGE" name="0x100 Snapshot_0_Data" oid="0x100" precision="0" type="INT16_ARRAY" value="-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1" widget="default"/>
             <param access="1" maxlength="0" name="0x80 Save_Snapshot_As" oid="0x80" type="STRING" value="Test 0" widget="default"/>
             <param access="1" constrainttype="INT_CHOICE" name="0x70 Router Type" oid="0x70" precision="0" type="INT16_ARRAY" value="72" widget="default">
                <constraint key="4">NK-3G164</constraint>
                <constraint key="16">NK-3G16</constraint>
                <constraint key="32">NK-3G32</constraint>
                <constraint key="34">NK-3G34</constraint>
                <constraint key="64">NK-3G64</constraint>
                <constraint key="72">NK-3G72</constraint>
                <constraint key="144">NK-3G144-X</constraint>
             </param>
             <param access="1" maxlength="0" name="0x89 Snapshot Names" oid="0x89" precision="0" type="STRING_ARRAY" value="[Empty];[Empty];[Empty];[Empty];[Empty];[Empty];[Empty];[Empty];[Empty];[Empty]" widget="default">
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
                <value>[Empty]</value>
             </param>
             <param access="1" maxlength="0" name="0x88 Last Action" oid="0x88" type="STRING" value="Snapshot 0: Cleared" widget="default"/>
             <param access="1" constrainttype="INT_CHOICE" name="0x87 Snapshots_locked" oid="0x87" precision="0" type="INT16_ARRAY" value="0;0;0;0;0;0;0;0;0;0" widget="default">
                <constraint key="0">Unlocked</constraint>
                <constraint key="1">Locked</constraint>
             </param>
          </params>
       </meta>
       <abs bottom="0" contexttype="nk-router" left="0" objectid="INSERT NK ID HERE" right="0" top="0">
          <api>function SaveSnapshot(Index)
      {
      if (params.getValue(0x87,Index) == 1)
        {
        params.setValue(0x88,0,"Snapshot "+Index+": Is Locked, NOT SAVING");
        }
      else
        {
        for (save_count = 0; save_count &lt;= (params.getValue(0x70, 0) -1); save_count = save_count + 1)
          {
          params.setValue((0x100+Index),save_count,nk.getStatus((save_count + 1),1));
          }
        params.setValue(0x89,Index,params.getValue(0x80,0));
        params.setValue(0x88,0,"Snapshot "+Index+": Saved As: "+params.getValue(0x80,0));      
        }
      }
    function RestoreSnapshot(Index)
      {
      function SlowLoad()
        {
        for (load_count = 0; load_count &lt;= (params.getValue(0x70, 0) -1); load_count = load_count + 1)
          {
          nk.doSwitch(load_count,(params.getValue(0x100+Index,load_count)-1),1);
          ogscript.pause(100);
          params.setValue(0x88,0,"Snapshot "+Index+": Restoring XPT:"+(load_count+1)+" SRC: "+(params.getValue(0x100+Index,load_count)));
          }
        params.setValue(0x88,0,"Snapshot "+Index+": Restored");
        }
      ogscript.asyncExec(SlowLoad); 
      }
    function ClearSnapshot(Index)
      {
      if (params.getValue(0x87,Index) == 1)
        {
        params.setValue(0x88,0,"Snapshot "+Index+": Is Locked, NOT CLEARING");
        }
      else
        {
        for (reset_count = 0; reset_count &lt;= 143; reset_count = reset_count + 1)
          {
          params.setValue(0x100+Index,reset_count,-1);
          }
        params.setValue(0x89,Index,"[Empty]");
        params.setValue(0x88,0,"Snapshot "+Index+": Cleared");
        }
      }</api>
          <param expand="true" height="90" left="220" oid="0x70" right="10" style="style:toggleButton" top="20" widget="22"/>
          <label height="90" left="10" name="Select Router Type" style="txt-align:west" top="10" width="200"/>
          <param expand="true" height="60" left="220" oid="0x80" top="125" widget="3" width="300"/>
          <label height="60" left="10" name="Save Snapshot As" style="txt-align:west" top="125" width="200"/>
          <param expand="true" height="60" left="10" oid="0x89" right="10" style="style:toggleButton" top="200" widget="22"/>
          <label height="60" left="550" name="Last Action" style="txt-align:west" top="125" width="100"/>
          <param expand="true" height="60" left="680" oid="0x88" right="10" top="125" widget="1"/>
          <simplegrid bottom="10" height="60" left="10" style="bg#dark;bdr:etched;" width="470">
             <ipslist style="t:bg#timerfg;f:bg#FF0000;"/>
          </simplegrid>
          <table height="280" left="10" right="10" top="260">
             <tr>
                <button buttontype="push" colspan="1" fill="both" name="Save 0" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(0);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 1" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(1);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 2" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(2);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 3" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(3);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 4" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(4);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 5" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(5);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 6" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(6);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 7" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(7);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 8" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(8);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Save 9" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">SaveSnapshot(9);</task>
                </button>
             </tr>
             <tr>
                <button buttontype="push" colspan="1" fill="both" name="Restore 0" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(0);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 1" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(1);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 2" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(2);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 3" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(3);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 4" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(4);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 5" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(5);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 6" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(6);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 7" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(7);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 8" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(8);</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Restore 9" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">RestoreSnapshot(9);</task>
                </button>
             </tr>
             <tr>
                <button buttontype="push" colspan="1" fill="both" name="Clear 0" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(0)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 1" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(1)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 2" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(2)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 3" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(3)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 4" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(4)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 5" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(5)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 6" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(6)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 7" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(7)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 8" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(8)</task>
                </button>
                <button buttontype="push" colspan="1" fill="both" name="Clear 9" rowspan="1" weightx="1.0" weighty="1.0">
                   <task tasktype="ogscript">ClearSnapshot(9)</task>
                </button>
             </tr>
             <tr>
                <param colspan="1" element="0" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="1" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="2" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="3" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="4" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="5" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="6" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="7" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="8" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
                <param colspan="1" element="9" expand="true" fill="both" oid="0x87" rowspan="1" showlabel="false" style="t:bg#FB0000;f:bg#000000;" weightx="1.0" weighty="1.0" widget="toggle"/>
             </tr>
          </table>
       </abs>
    </abs>

    #DashBoard


  • 4.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 11-30-2021 14:16
    This is an old post I'm reviving, but this tool is awesome! After I just rebuilt an NK 72 that lost its routes, I had to find something... glad to have this for next time!

    ------------------------------
    Erik Mitchell
    HILLSIDE CHRISTIAN CHURCH
    ------------------------------



  • 5.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 05-30-2017 13:07
    Very cool! Thank you very much for contributing your panel back.
    #DashBoard


  • 6.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 06-03-2017 11:23
    Hi James,

    I'm just trying to make it a little easier to see when the panel is connected to the router ok, so I was wondering if there way any way to change the text on a button?

    I've defined the IPS already so it automatically connects, but I would like it to say "Connected" with a green background, or "NOT Connected" with a red background. I've also looked at using nk.getActiveSystem(); to check, but without putting it in a loop of some kind I can't get it to detect when the NK is disconnected.

    Cheers
    James
    #DashBoard


  • 7.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 06-05-2017 13:31
    It's possible to listen for when the active system is switched from one to another... but that won't tell you whether the connection to the "active" system has itself gone up or down.

    The is dynamically-generated so renaming on that is not something I would recommend. You're likely better off putting a beside it to indicate connection status.

    James

    #DashBoard


  • 8.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 06-05-2017 17:36
    Hi James,

    For the moment I have decided to stick with just a Red/Green ipslist button so the user can see if it is connected to the IPS ok or not. I have updated the code in my previous post with that change.

    Cheers
    James
    #DashBoard


  • 9.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 09-27-2018 18:32
    So I have taken a snapshot and have been playing around with this. One thing I have found is that it does not always work on the first run. I have also noticed some sources come back with 4 digits instead of 2. As far as I know this is nothing that I have done, but maybe that sticks out as something to look at?
    #DashBoard


  • 10.  RE: Using dashboard to perform NK-Router Snapshots

    Posted 09-29-2018 13:40
    Hi jbins,

    When you say it doesn't always work on the first run, do you mean the saving or the restoring?

    Do you have a copy of the panel that you can send me that has the 4 digits in as well? I've never encountered this with my setup.

    Lastly, which IP<>NK interface are you using? the IPS or the NET?
    #DashBoard