added "slow link" connection option in desktop console
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 17 Feb 2016 11:09:26 +0000 (13:09 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 17 Feb 2016 11:09:26 +0000 (13:09 +0200)
android/src/agent/res/values/build_number.xml
android/src/console/res/values/build_number.xml
build/build_number
include/build.h
src/java/build/set_build_number.cmd
src/java/build/set_build_number.sh
src/java/client/netxms-base/src/main/java/org/netxms/base/BuildNumber.java
src/java/netxms-eclipse/Core/src/org/netxms/ui/eclipse/console/ApplicationWorkbenchWindowAdvisor.java
src/java/netxms-eclipse/Core/src/org/netxms/ui/eclipse/console/dialogs/LoginDialog.java
src/java/netxms-eclipse/SNMP/src/org/netxms/ui/eclipse/snmp/shared/MibCache.java

index c7ae662..af5a3de 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-       <string name="build_number">8060</string>
+       <string name="build_number">8061</string>
 </resources>
index c7ae662..af5a3de 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-       <string name="build_number">8060</string>
+       <string name="build_number">8061</string>
 </resources>
index 8ad907f..b172970 100644 (file)
@@ -1 +1 @@
-8060
+8061
index c3bbbd9..9916004 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef __build_h
 #define __build_h
-#define NETXMS_VERSION_BUILD 8060
-#define NETXMS_VERSION_BUILD_STRING _T("8060")
+#define NETXMS_VERSION_BUILD 8061
+#define NETXMS_VERSION_BUILD_STRING _T("8061")
 #endif
index 314c774..eb1ea97 100644 (file)
@@ -1,5 +1,5 @@
 package org.netxms.base;
 public final class BuildNumber {
-   public static final String TEXT = "8060";
-   public static final int NUMBER = 8060;
+   public static final String TEXT = "8061";
+   public static final int NUMBER = 8061;
 }
index d2d1c24..3ef2bef 100644 (file)
@@ -254,6 +254,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor im
             autoConnect = false; // only do auto connect first time
          }
 
+         ConsoleSharedData.setProperty("SlowLink", settings.getBoolean("Connect.SlowLink"));
          LoginJob job = new LoginJob(display, 
                        settings.get("Connect.Server"), //$NON-NLS-1$ 
                settings.get("Connect.Login"), //$NON-NLS-1$
index a1c9050..fe2a873 100644 (file)
@@ -37,6 +37,7 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -72,6 +73,7 @@ public class LoginDialog extends Dialog
    private Combo comboAuth;
    private Combo comboCert;
    private String password;
+   private Button checkSlowLink;
    private Certificate certificate;
    private Color labelColor;
    private final CertificateManager certMgr;
@@ -182,6 +184,12 @@ public class LoginDialog extends Dialog
       gd.grabExcessHorizontalSpace = true;
       comboServer = WidgetHelper.createLabeledCombo(fields, SWT.DROP_DOWN, Messages.get().LoginDialog_server, gd, toolkit);
 
+      checkSlowLink = new Button(fields, SWT.CHECK);
+      checkSlowLink.setText("Connection over &slow link");
+      gd = new GridData();
+      gd.horizontalIndent = 8;
+      checkSlowLink.setLayoutData(gd);
+      
       textLogin = new LabeledText(fields, SWT.NONE, SWT.SINGLE | SWT.BORDER, toolkit);
       textLogin.setLabel(Messages.get().LoginDialog_login);
       gd = new GridData();
@@ -232,6 +240,8 @@ public class LoginDialog extends Dialog
       text = settings.get("Connect.Login"); //$NON-NLS-1$
       if (text != null)
          textLogin.setText(text);
+      
+      checkSlowLink.setSelection(settings.getBoolean("Connect.SlowLink"));
 
       try
       {
@@ -315,6 +325,7 @@ public class LoginDialog extends Dialog
       settings.put("Connect.ServerHistory", items.toArray(new String[items.size()])); //$NON-NLS-1$
       settings.put("Connect.Login", textLogin.getText()); //$NON-NLS-1$
       settings.put("Connect.AuthMethod", authMethod.getValue()); //$NON-NLS-1$
+      settings.put("Connect.SlowLink", checkSlowLink.getSelection());
       if (certificate != null)
          settings.put("Connect.Certificate", ((X509Certificate)certificate).getSubjectDN().toString());
 
index 7ec6fdc..9376f3f 100644 (file)
@@ -36,6 +36,7 @@ import org.netxms.client.snmp.SnmpObjectId;
 import org.netxms.client.snmp.SnmpObjectIdFormatException;
 import org.netxms.ui.eclipse.console.api.ConsoleLoginListener;
 import org.netxms.ui.eclipse.jobs.ConsoleJob;
+import org.netxms.ui.eclipse.shared.ConsoleSharedData;
 import org.netxms.ui.eclipse.snmp.Activator;
 import org.netxms.ui.eclipse.snmp.Messages;
 
@@ -52,6 +53,10 @@ public final class MibCache implements ConsoleLoginListener
        @Override
        public void afterLogin(final NXCSession session, Display display)
        {
+          Boolean slowLink = (Boolean)ConsoleSharedData.getProperty("SlowLink");
+          if ((slowLink != null) && slowLink.booleanValue())
+             return;
+          
                ConsoleJob job = new ConsoleJob(Messages.get().LoginListener_JobTitle, null, Activator.PLUGIN_ID, null) {
                        @Override
                        protected void runInternal(IProgressMonitor monitor) throws Exception