*UPDATE* Ability to nxget selected template DCI on any node fixes #992
authorEriks Jenkevics <eriks@netxms.org>
Thu, 25 Aug 2016 14:15:49 +0000 (17:15 +0300)
committerEriks Jenkevics <eriks@netxms.org>
Thu, 25 Aug 2016 14:15:49 +0000 (17:15 +0300)
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/dialogs/SelectAgentParamDlg.java
webui/webapp/DataCollection/src/org/netxms/ui/eclipse/datacollection/dialogs/SelectAgentParamDlg.java

index 5b0a583..09812f7 100644 (file)
@@ -38,6 +38,7 @@ import org.netxms.client.AgentTable;
 import org.netxms.client.NXCSession;
 import org.netxms.client.datacollection.DataCollectionItem;
 import org.netxms.client.objects.AbstractObject;
+import org.netxms.client.objects.Template;
 import org.netxms.ui.eclipse.datacollection.Activator;
 import org.netxms.ui.eclipse.datacollection.Messages;
 import org.netxms.ui.eclipse.jobs.ConsoleJob;
@@ -176,7 +177,7 @@ public class SelectAgentParamDlg extends AbstractSelectParamDlg
          return;
       
       // Opens Object Selection Dialog if object is not chosen
-      if (queryObject.getObjectClass() == object.OBJECT_TEMPLATE)
+      if (queryObject instanceof Template)
       {
          final ObjectSelectionDialog sDlg = new ObjectSelectionDialog(getShell(), null,
                ObjectSelectionDialog.createNodeSelectionFilter(false));
index 8014a91..a4149d5 100644 (file)
@@ -38,6 +38,7 @@ import org.netxms.client.AgentTable;
 import org.netxms.client.NXCSession;
 import org.netxms.client.datacollection.DataCollectionItem;
 import org.netxms.client.objects.AbstractObject;
+import org.netxms.client.objects.Template;
 import org.netxms.ui.eclipse.datacollection.Activator;
 import org.netxms.ui.eclipse.datacollection.Messages;
 import org.netxms.ui.eclipse.jobs.ConsoleJob;
@@ -169,7 +170,7 @@ public class SelectAgentParamDlg extends AbstractSelectParamDlg
                        return;
                
        // Opens Object Selection Dialog if object is not chosen
-               if (queryObject.getObjectClass() == object.OBJECT_TEMPLATE)
+               if (queryObject instanceof Template)
       {
          final ObjectSelectionDialog sDlg = new ObjectSelectionDialog(getShell(), null,
                ObjectSelectionDialog.createNodeSelectionFilter(false));