public static final int GENERATES_OUTPUT = 0x00000010;
public static final int DISABLED = 0x00000020;
public static final int SHOW_IN_COMMANDS = 0x00000040;
- public static final int REQUIRES_REMOTE_OS_MATCH = 0x00000080;
+ public static final int REQUIRES_NODE_OS_MATCH = 0x00000080;
public static final int REQUIRES_TEMPLATE_MATCH = 0x00000100;
public static final int SNMP_INDEXED_BY_VALUE = 0x00010000;
- public static final int REQUIRES_LOCAL_OS_MATCH = 0x00020000;
+ public static final int REQUIRES_WORKSTATION_OS_MATCH = 0x00020000;
protected long id;
protected String name;
return false; // OID does not match
}
- if ((flags & REQUIRES_REMOTE_OS_MATCH) != 0)
+ if ((flags & REQUIRES_NODE_OS_MATCH) != 0)
{
boolean match = false;
- String[] substrings = filter.toolLocOS.split(",");
+ String[] substrings = filter.toolNodeOS.split(",");
for(int i = 0; i < substrings.length; i++)
{;
if (Pattern.matches(substrings[i], node.getPlatformName()))
return false; //Not correct type of OS
}
- if ((flags & REQUIRES_LOCAL_OS_MATCH) != 0)
+ if ((flags & REQUIRES_WORKSTATION_OS_MATCH) != 0)
{
boolean match = false;
- String[] substrings = filter.toolLocOS.split(",");
+ String[] substrings = filter.toolWorkstationOS.split(",");
for(int i = 0; i < substrings.length; i++)
{;
if (Pattern.matches(substrings[i], System.getProperty("os.name")))
/**
* @return the toolRemOS
*/
- public String getToolRemOS()
+ public String getToolNodeOS()
{
- return filter.toolRemOS;
+ return filter.toolNodeOS;
}
/**
* @return the toolLocOS
*/
- public String getToolLocOS()
+ public String getToolWorkstationOS()
{
- return filter.toolLocOS;
+ return filter.toolWorkstationOS;
}
/**
}
/**
- * @param toolRemOS the comma separated list of OS name regexps
+ * @param toolNodeOS the comma separated list of OS name regexps
*/
- public void setToolRemOS(String toolRemOS)
+ public void setToolNodeOS(String toolNodeOS)
{
- filter.toolRemOS = toolRemOS;
+ filter.toolNodeOS = toolNodeOS;
modified = true;
}
/**
- * @param toolLocOS the comma separated list of OS name regexps
+ * @param toolWorkstationOS the comma separated list of OS name regexps
*/
- public void setToolLocOS(String toolLocOS)
+ public void setToolWorkstationOS(String toolWorkstationOS)
{
- filter.toolLocOS = toolLocOS;
+ filter.toolWorkstationOS = toolWorkstationOS;
modified = true;
}
public class ObjectToolFilter
{
@Element(required=false, name="toolOS")
- public String toolRemOS;
+ public String toolNodeOS;
@Element(required=false)
- public String toolLocOS;
+ public String toolWorkstationOS;
@Element(required=false)
public String toolTemplate;
public ObjectToolFilter()
{
- toolRemOS = "";
- toolLocOS = "";
+ toolNodeOS = "";
+ toolWorkstationOS = "";
toolTemplate = "";
snmpOid = "";
}
EditInputFieldDialog_ValidatePassword=Validate password after entry
Filter_AgentNeeded=NetXMS agent should be available
Filter_OIDShouldMatch=Node SNMP OID should match with the following template:
-Filter_OSShouldMatch=Remote system OS name should match this template(coma separated regular expression list):
+Filter_OSShouldMatch=Node OS name should match this template(coma separated regular expression list):
Filter_SNMPNeeded=Node should support SNMP
Filter_TemplateShouldMatch=Parent template name should match this template(coma separated regular expression list):
General_AgentCommand=Agent's command
EditInputFieldDialog_ValidatePassword=\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u0432\u043e\u0434\u0430
Filter_AgentNeeded=\u0410\u0433\u0435\u043d\u0442 NetXMS \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d
Filter_OIDShouldMatch=\u0423\u0437\u0435\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c SNMP OID, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443:
-Filter_OSShouldMatch=\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u041e\u0421 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443(\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438):
+Filter_OSShouldMatch=\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u041e\u0421 \u0443\u0437\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443(\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438):
Filter_SNMPNeeded=\u0423\u0437\u0435\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c SNMP
Filter_TemplateShouldMatch=\u0418\u043c\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443(\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438):
General_AgentCommand=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430
private Button checkAgent;
private Button checkSNMP;
private Button checkMatchOID;
- private Button checkMatchRemoteOS;
- private Button checkMatchLocalOS;
+ private Button checkMatchNodeOS;
+ private Button checkMatchWorkstationOS;
private Button checkMatchTemplate;
private Text textOID;
- private Text textRemOS;
- private Text textLocOS;
+ private Text textNodeOS;
+ private Text textWorkstationOS;
private Text textTemplate;
/* (non-Javadoc)
textOID.setLayoutData(gd);
textOID.setEnabled(checkMatchOID.getSelection());
- checkMatchRemoteOS = new Button(dialogArea, SWT.CHECK);
- checkMatchRemoteOS.setText(Messages.get().Filter_OSShouldMatch);
- checkMatchRemoteOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_REMOTE_OS_MATCH) != 0);
- checkMatchRemoteOS.addSelectionListener(new SelectionListener() {
+ checkMatchNodeOS = new Button(dialogArea, SWT.CHECK);
+ checkMatchNodeOS.setText(Messages.get().Filter_OSShouldMatch);
+ checkMatchNodeOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_NODE_OS_MATCH) != 0);
+ checkMatchNodeOS.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e)
{
- textRemOS.setEnabled(checkMatchRemoteOS.getSelection());
- if (checkMatchRemoteOS.getSelection())
- textRemOS.setFocus();
+ textNodeOS.setEnabled(checkMatchNodeOS.getSelection());
+ if (checkMatchNodeOS.getSelection())
+ textNodeOS.setFocus();
}
@Override
}
});
- textRemOS = new Text(dialogArea, SWT.BORDER);
- textRemOS.setText(objectTool.getToolRemOS());
+ textNodeOS = new Text(dialogArea, SWT.BORDER);
+ textNodeOS.setText(objectTool.getToolNodeOS());
gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.horizontalIndent = 20;
- textRemOS.setLayoutData(gd);
- textRemOS.setEnabled(checkMatchRemoteOS.getSelection());
+ textNodeOS.setLayoutData(gd);
+ textNodeOS.setEnabled(checkMatchNodeOS.getSelection());
- checkMatchLocalOS = new Button(dialogArea, SWT.CHECK);
- checkMatchLocalOS.setText("Local system OS name should match this template(coma separated regular expression list)");
- checkMatchLocalOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_LOCAL_OS_MATCH) != 0);
- checkMatchLocalOS.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- textLocOS.setEnabled(checkMatchLocalOS.getSelection());
- if (checkMatchLocalOS.getSelection())
- textLocOS.setFocus();
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e)
- {
- widgetSelected(e);
- }
- });
-
- textLocOS = new Text(dialogArea, SWT.BORDER);
- textLocOS.setText(objectTool.getToolLocOS());
- gd = new GridData();
- gd.horizontalAlignment = SWT.FILL;
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalIndent = 20;
- textLocOS.setLayoutData(gd);
- textLocOS.setEnabled(checkMatchLocalOS.getSelection());
+ if (objectTool.getType() == ObjectTool.TYPE_LOCAL_COMMAND)
+ {
+ checkMatchWorkstationOS = new Button(dialogArea, SWT.CHECK);
+ checkMatchWorkstationOS.setText("Workstation OS name should match this template(coma separated regular expression list)");
+ checkMatchWorkstationOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_WORKSTATION_OS_MATCH) != 0);
+ checkMatchWorkstationOS.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+ textWorkstationOS.setEnabled(checkMatchWorkstationOS.getSelection());
+ if (checkMatchWorkstationOS.getSelection())
+ textWorkstationOS.setFocus();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e)
+ {
+ widgetSelected(e);
+ }
+ });
+
+ textWorkstationOS = new Text(dialogArea, SWT.BORDER);
+ textWorkstationOS.setText(objectTool.getToolWorkstationOS());
+ gd = new GridData();
+ gd.horizontalAlignment = SWT.FILL;
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalIndent = 20;
+ textWorkstationOS.setLayoutData(gd);
+ textWorkstationOS.setEnabled(checkMatchWorkstationOS.getSelection());
+ }
checkMatchTemplate = new Button(dialogArea, SWT.CHECK);
checkMatchTemplate.setText(Messages.get().Filter_TemplateShouldMatch);
objectTool.setSnmpOid(textOID.getText());
- if (checkMatchRemoteOS.getSelection())
- objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_REMOTE_OS_MATCH);
+ if (checkMatchNodeOS.getSelection())
+ objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_NODE_OS_MATCH);
else
- objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_REMOTE_OS_MATCH);
+ objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_NODE_OS_MATCH);
- objectTool.setToolRemOS(textRemOS.getText());
+ objectTool.setToolNodeOS(textNodeOS.getText());
- if (checkMatchLocalOS.getSelection())
- objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_LOCAL_OS_MATCH);
+ if ((checkMatchWorkstationOS != null) && checkMatchWorkstationOS.getSelection())
+ objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_WORKSTATION_OS_MATCH);
else
- objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_LOCAL_OS_MATCH);
+ objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_WORKSTATION_OS_MATCH);
- objectTool.setToolLocOS(textLocOS.getText());
+ if (textWorkstationOS != null)
+ objectTool.setToolWorkstationOS(textWorkstationOS.getText());
if (checkMatchTemplate.getSelection())
objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_TEMPLATE_MATCH);
EditInputFieldDialog_ValidatePassword=Validate password after entry
Filter_AgentNeeded=NetXMS agent should be available
Filter_OIDShouldMatch=Node SNMP OID should match with the following template:
-Filter_OSShouldMatch=Remote system OS name should match this template(coma separated regular expression list):
+Filter_OSShouldMatch=Node OS name should match this template(coma separated regular expression list):
Filter_SNMPNeeded=Node should support SNMP
Filter_TemplateShouldMatch=Parent template name should match this template(coma separated regular expression list):
General_AgentCommand=Agent's command
EditInputFieldDialog_ValidatePassword=Validate password after entry
Filter_AgentNeeded=\u0410\u0433\u0435\u043d\u0442 NetXMS \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d
Filter_OIDShouldMatch=\u0423\u0437\u0435\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c SNMP OID, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443:
-Filter_OSShouldMatch=\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u041e\u0421 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443(\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438):
+Filter_OSShouldMatch=\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u041e\u0421 \u0443\u0437\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443(\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438):
Filter_SNMPNeeded=\u0423\u0437\u0435\u043b \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c SNMP
Filter_TemplateShouldMatch=Parent template name should match this template(coma separated regular expression list):
General_AgentCommand=\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430
private Button checkAgent;
private Button checkSNMP;
private Button checkMatchOID;
- private Button checkMatchOS;
+ private Button checkMatchNodeOS;
+ private Button checkMatchWorkstationOS;
private Button checkMatchTemplate;
private Text textOID;
- private Text textOS;
+ private Text textNodeOS;
+ private Text textWorkstationOS;
private Text textTemplate;
/* (non-Javadoc)
textOID.setLayoutData(gd);
textOID.setEnabled(checkMatchOID.getSelection());
- checkMatchOS = new Button(dialogArea, SWT.CHECK);
- checkMatchOS.setText(Messages.get().Filter_OSShouldMatch);
- checkMatchOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_OS_MATCH) != 0);
- checkMatchOS.addSelectionListener(new SelectionListener() {
+ checkMatchNodeOS = new Button(dialogArea, SWT.CHECK);
+ checkMatchNodeOS.setText(Messages.get().Filter_OSShouldMatch);
+ checkMatchNodeOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_NODE_OS_MATCH) != 0);
+ checkMatchNodeOS.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e)
{
- textOS.setEnabled(checkMatchOS.getSelection());
- if (checkMatchOS.getSelection())
- textOS.setFocus();
+ textNodeOS.setEnabled(checkMatchNodeOS.getSelection());
+ if (checkMatchNodeOS.getSelection())
+ textNodeOS.setFocus();
}
@Override
}
});
- textOS = new Text(dialogArea, SWT.BORDER);
- textOS.setText(objectTool.getToolOS());
+ textNodeOS = new Text(dialogArea, SWT.BORDER);
+ textNodeOS.setText(objectTool.getToolNodeOS());
gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.horizontalIndent = 20;
- textOS.setLayoutData(gd);
- textOS.setEnabled(checkMatchOS.getSelection());
+ textNodeOS.setLayoutData(gd);
+ textNodeOS.setEnabled(checkMatchNodeOS.getSelection());
+
+ if (objectTool.getType() == ObjectTool.TYPE_LOCAL_COMMAND)
+ {
+ checkMatchWorkstationOS = new Button(dialogArea, SWT.CHECK);
+ checkMatchWorkstationOS.setText("Workstation OS name should match this template(coma separated regular expression list)");
+ checkMatchWorkstationOS.setSelection((objectTool.getFlags() & ObjectTool.REQUIRES_WORKSTATION_OS_MATCH) != 0);
+ checkMatchWorkstationOS.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e)
+ {
+ textWorkstationOS.setEnabled(checkMatchWorkstationOS.getSelection());
+ if (checkMatchWorkstationOS.getSelection())
+ textWorkstationOS.setFocus();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e)
+ {
+ widgetSelected(e);
+ }
+ });
+
+ textWorkstationOS = new Text(dialogArea, SWT.BORDER);
+ textWorkstationOS.setText(objectTool.getToolWorkstationOS());
+ gd = new GridData();
+ gd.horizontalAlignment = SWT.FILL;
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalIndent = 20;
+ textWorkstationOS.setLayoutData(gd);
+ textWorkstationOS.setEnabled(checkMatchWorkstationOS.getSelection());
+ }
checkMatchTemplate = new Button(dialogArea, SWT.CHECK);
checkMatchTemplate.setText(Messages.get().Filter_TemplateShouldMatch);
objectTool.setSnmpOid(textOID.getText());
- if (checkMatchOS.getSelection())
- objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_OS_MATCH);
+ if (checkMatchNodeOS.getSelection())
+ objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_NODE_OS_MATCH);
+ else
+ objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_NODE_OS_MATCH);
+
+ objectTool.setToolNodeOS(textNodeOS.getText());
+
+ if ((checkMatchWorkstationOS != null) && checkMatchWorkstationOS.getSelection())
+ objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_WORKSTATION_OS_MATCH);
else
- objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_OS_MATCH);
+ objectTool.setFlags(objectTool.getFlags() & ~ObjectTool.REQUIRES_WORKSTATION_OS_MATCH);
- objectTool.setToolOS(textOS.getText());
+ if (textWorkstationOS != null)
+ objectTool.setToolWorkstationOS(textWorkstationOS.getText());
if (checkMatchTemplate.getSelection())
objectTool.setFlags(objectTool.getFlags() | ObjectTool.REQUIRES_TEMPLATE_MATCH);