Responder Developer Guide
Modify Snooze Values

Version: 10.2.1c and 10.2.1c SP3

Resource Center Home

When the user right clicks a row in the Alerts tab and selects Snooze, Responder presents a list of snooze times. You may modify this list of snooze times by creating a custom.layout file. The Implementing Customizations page discusses custom.layout files. This page walks you through adding a value to the list of snooze times and removing an existing value.

The following image displays the default list of snooze times.

In this example, we'll remove the "Two Hours" time and add a "Ten Hours" time. This requires a custom.layout file which can be created using a text editor such as Notepad or an XML editor. This file must have a name that ends with custom.layout. In this example, the file is called SnoozeTimes.custom.layout.

Add Value

Adding a Snooze value requires two entries in the custom.layout XML file. The first adds the value to the list visible in the user interface. Add a CommandItem for the Snooze value to the AlertSnooze command.

Add a Snooze Value
Copy Code
<Command key="AlertSnooze" type="Miner.Responder.Explorer.Commands.CommandPopupAlertSnooze, Miner.Responder.Explorer, Version=9.2.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc">
  <CommandItems>
    <CommandItem key="Snooze10hour"/>
  </CommandItems>
</Command>

The second entry is a command for the value you are adding. In the example below, the Snooze10hour command (added to the AlertSnooze command above) is created in the XML as a command that uses the Miner.Responder.Explorer.Commands.CommandButtonSnoozeAmount object. The CreateData section has three parameters. The first value matches the value assigned to the AlertSnooze command (above). The second value is the text as it appears in the user interface. The third value is the amount of time (in seconds) Responder must wait when this option is selected.

To simplify, you can copy the XML on this page, paste it into your own custom.layout file, and modify the values to suit your needs. The XML sample at the bottom of this page shows the entire custom.layout file we used to add a value and remove a value.

Add a Snooze Value
Copy Code
<Command key="Snooze10hour" type="Miner.Responder.Explorer.Commands.CommandButtonSnoozeAmount, Miner.Responder.Explorer, Version=9.2.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc">
  <CreateData>
    <Param type="System.String" value="Snooze10hour"/>
    <Param type="System.String" value="Ten Hours"/>
    <Param type="System.Int32" value="600"/>
  </CreateData>
</Command>

 

Remove Value

Need to list default key values for the existing snooze values so that users can remove them.  

Remove a Snooze Value
Copy Code
<RemoveObjects>
  <RemoveObject objectType="Command" key="Snooze2hour"/>
</RemoveObjects>

If you wish to remove default values from the Snooze command, use the following keys in your custom.layout XML.

Snooze Value XML Key
One Minute Snooze1min
Five Minutes Snooze5min
Thirty Minutes Snooze30min
One Hour Snooze1hour
Two Hours Snooze2hour

 

With the custom layout file, the Snooze values list is modified. The Two Hours value has been removed and the Ten Hours value added to the list. 

The following XML sample is the entire SnoozeTimes.custom.layout file used to add the Ten Hours value and remove the Two Hours value. 

Sample: SnoozeTimes.custom.layout
Copy Code
<?xml version="1.0" encoding="us-ascii"?>
<LayoutData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layoutFormat="2">
  <MainWindow>
    <CommandManager>
      <Commands>
        <Command key="AlertSnooze" type="Miner.Responder.Explorer.Commands.CommandPopupAlertSnooze, Miner.Responder.Explorer, Version=9.2.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc">
          <CommandItems>
            <CommandItem key="Snooze10hour"/>
          </CommandItems>
        </Command>
        <Command key="Snooze10hour" type="Miner.Responder.Explorer.Commands.CommandButtonSnoozeAmount, Miner.Responder.Explorer, Version=9.2.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc">
          <CreateData>
            <Param type="System.String" value="Snooze10hour"/>
            <Param type="System.String" value="Ten Hours"/>
            <Param type="System.Int32" value="600"/>
          </CreateData>
        </Command>
      </Commands>
    </CommandManager>
  </MainWindow>
  <RemoveObjects>
    <RemoveObject objectType="Command" key="Snooze2hour"/>
  </RemoveObjects>
</LayoutData>

 

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com