Add custom menu action to ping server from SOI Console

Document ID : KB000126396
Last Modified Date : 08/02/2019
Show Technical Document Details
Question:
How can I create an additional action in the SOI Console Alerts pull down menu for ping option. I want to get an option to ping a server and see the output when they right click on an alert.
Environment:
SOI 4.x
Answer:
The custom-menu-config.xml file is an example which contains the ping menu item. It takes the ipaddress for the ping command from the attribute NETWORK_Address.
The custom-menu-config.xml has to be copied into the SOI\SamUI\custom\console\config folder. The SOI Console has to be closed and reopened to process the content of this file.

If the ipaddress will have to be taken from other attributes like userAttribute(n)  this can be adjusted like this

example

<menu>
<item name="Ping">
<!--<privilege>
<name>Remote Desktop</name>
<any-access/>
</privilege> -->
<toolbar-image>images/hints.gif</toolbar-image>
<!--<accelerator modifiers="2">VK_L</accelerator>-->
<popup-visibility>always</popup-visibility>
<action>
<context>
com.aprisma.spectrum.app.alarm.client.group.AlarmContext
</context>
<filter>
<has-attribute>AttributeID.NETWORK_ADDRESS</has-attribute>
</filter>
<launch-application>
<platform>
<command>cmd.exe /c start "local ping {0}" cmd.exe /c "ping.exe -a {0} &amp;&amp; pause" </command>
</platform>
<param>
<attribute>0x11044</attribute>
</param>
</launch-application>
</action>
</item>
</menu>

So the attribute is 0x11004 instead of userAttribute4 which used in this example.

This are the userAttribute hex values

Attribute: User_Attr_1 (0x11030)
Attribute: User_Attr_10 (0x11044)
Attribute: User_Attr_2 (0x11031)
Attribute: User_Attr_3 (0x11032)
Attribute: User_Attr_4 (0x11033)
Attribute: User_Attr_5 (0x11034)
Attribute: User_Attr_6 (0x11040)
Attribute: User_Attr_7 (0x11041)
Attribute: User_Attr_8 (0x11042)
Attribute: User_Attr_9 (0x11043)

 
File Attachments:
custom-menu-config.xml