Facility Control

 View Only
  • 1.  Using Dashboard For Router Scheduler

    Posted 03-31-2017 18:39

    Is it possible to use Dashboard to fire scheduled routes for a Carbonite Xtreme? Basically the time of day would be a constant and the scheduler would trigger the route when the checkbox is selected and the scheduled time passes. How would I populate the drop-down lists with the global labels? I'm not very proficient with Dashboard so any help would be appreciated.



  • 2.  RE: Using Dashboard For Router Scheduler

    Posted 04-03-2017 18:38

    Hi TMunro.
    There are some tricky bits involved with getting the list of sources and destinations out of the selected IPS. I have encoded a panel that has script in place to handle this and you are welcome to use it as the base of your panel. The heavy lifting is done by the function in the tag called "populateDropdownLists".

    Please feel free to contact me for further assistance and we can help move you along in your project.

    <abs contexttype="opengear" style="">
       <meta>
          <api>function populateDropdownLists()
    {
       var nkGlobal = ogscript.getObject("nk-global");
       if (nkGlobal == null)
       {
          return;
       }
       
       var nkObj = nk.getActiveSystem();
       var sources = null;
       var dests = null;
       if (nkObj == null)
       {
          return;
       }
       
       
       var settingsObj = nkObj.getSettings();
       if (settingsObj == null)
       {
          return;
       }
       
       sources = [];
       dests = [];
       
       var srcObj = settingsObj.getInputs();
       for (var i = 0; i &lt; srcObj.getSize(); i++)
       {
          var src = srcObj.getValueForIndex(i);
          var lbl = srcObj.getLabelForIndex(i);
          sources.push({"key":src, "value":lbl});
       }
       
       var dstObj = settingsObj.getOutputs();
       for (var i = 0; i &lt; srcObj.getSize(); i++)
       {
          var dst = dstObj.getValueForIndex(i);
          var lbl = dstObj.getLabelForIndex(i);
          dests.push({"key":dst, "value":lbl});
       }
       
       params.replaceConstraint('params.source', params.createIntChoiceConstraint(sources));
       params.replaceConstraint('params.current_source', params.createIntChoiceConstraint(sources));
       params.replaceConstraint('params.dest', params.createIntChoiceConstraint(dests));
    }
    </api>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="Enabled" oid="params.enable" precision="0" type="INT16_ARRAY" value="1" widget="checkbox">
                <constraint key="0">Disabled</constraint>
                <constraint key="1">Enabled</constraint>
             </param>
             <param access="1" maxlength="0" name="Time" oid="params.time" precision="0" type="STRING_ARRAY" value="12:00:00" widget="time-picker">
                <value>12:00:00</value>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="Source" oid="params.source" precision="0" type="INT16_ARRAY" value="-1" widget="combo">
                <constraint key="0">In 1</constraint>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="Destination" oid="params.dest" precision="0" type="INT16_ARRAY" value="-1" widget="combo">
                <constraint key="0">Out 1</constraint>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="Current Source" oid="params.current_source" precision="0" type="INT16_ARRAY" value="-1" widget="label">
                <constraint key="0">In 1</constraint>
             </param>
          </params>
       </meta>
       <table bottom="6" left="7" right="8" top="81">
          <tr>
             <table fill="both" weightx="1.0">
                <tr>
                   <label colspan="1" fill="both" header="true" insets="2,2,2,2" name="Enable" rowspan="1" style="" weightx="1.0" weighty="0.0"/>
                   <label colspan="1" fill="both" header="true" insets="2,2,2,2" name="Time" rowspan="1" style="" weightx="1.0" weighty="0.0"/>
                   <label colspan="1" fill="both" header="true" insets="2,2,2,2" name="Source" rowspan="1" style="" weightx="1.0" weighty="0.0"/>
                   <label colspan="1" fill="both" header="true" insets="2,2,2,2" name="Destination" rowspan="1" style="" weightx="1.0" weighty="0.0"/>
                   <label colspan="1" fill="both" header="true" insets="2,2,2,2" name="Current Source" rowspan="1" style="" weightx="1.0" weighty="0.0"/>
                </tr>
                <tr>
                   <param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="params.enable" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="0.0"/>
                   <param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="params.time" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="0.0"/>
                   <param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="params.source" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="0.0"/>
                   <param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="params.dest" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="0.0"/>
                   <param colspan="1" expand="true" fill="both" insets="2,2,2,2" oid="params.current_source" orientation="vertical" rowspan="1" showlabel="false" weightx="1.0" weighty="0.0"/>
                </tr>
             </table>
          </tr>
          <tr>
             <blank height="1" weighty="1.0" width="1"/>
          </tr>
       </table>
       <abs contexttype="nk-router" height="63" left="16" right="300" top="12">
          <meta>
             <ogscript attribute="ActiveConfig" handles="attributechange,onload" scopename="nk-router">ogscript.putObject("nk-global", nk);
    populateDropdownLists();</ogscript>
          </meta>
          <nkfunction bottom="4" function="config" right="4" top="4" width="100"/>
          <ipslist bottom="4" left="4" right="105" style="style:navigationButton;" top="4"/>
       </abs>
    <button buttontype="push" height="58" name="Reset Dropdown" right="10" top="8" width="187">
          <task tasktype="ogscript">var newConstraint = params.createIntChoiceConstraint([{"key":-1, "value":"None"}]);
    
    params.replaceConstraint("params.source", newConstraint);
    params.replaceConstraint("params.current_source", newConstraint);
    params.replaceConstraint("params.dest", newConstraint);</task>
       </button>
    </abs>

    #DashBoard


  • 3.  RE: Using Dashboard For Router Scheduler

    Posted 04-03-2017 19:51

    Thanks James this is a huge help. I have updated the global labels but I'm not seeing that information populate the drop down lists. Should I be doing something in the setup of each drop down for them to acquire this information?


    #DashBoard


  • 4.  RE: Using Dashboard For Router Scheduler

    Posted 04-04-2017 16:54
    If you click on the "Configure" button, you can either remove any customizations you've added to your router's configuration file in DashBoard (this is a file that lives in DashBoard and contains lists of sources, destinations, and levels associated with your particular router/IPS) or import the Global Labels to overwrite the default labels in that configuration.
    #DashBoard


  • 5.  RE: Using Dashboard For Router Scheduler

    Posted 04-04-2017 17:00

    Note:
    When you click "Configure", you'll see this dialog box.

    If you have the "Custom" checkbox checked, it means DashBoard will not automatically try to generate a configuration for you (if it can/does, it will use Global Labels automatically). If you do not need to check the "Custom" box, don't.



    If you require "Custom", you can click the button under "Labels" to manually-specify your labels and/or import them from Global Labels:


    #DashBoard


  • 6.  RE: Using Dashboard For Router Scheduler

    Posted 05-16-2017 04:16
    Hello James;

    Is your solution working with a Carbonite Black Solo ? I would like to recall memory at time. (Or doing this with my Ultrix but I need CleanSwitch)
    #DashBoard