fixed file upload errors in web UI
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 11 Oct 2017 14:33:48 +0000 (17:33 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 11 Oct 2017 14:35:42 +0000 (17:35 +0300)
ChangeLog
src/java/netxms-eclipse/FileManager/src/org/netxms/ui/eclipse/filemanager/views/AgentFileManager.java
webui/webapp/FileManager/META-INF/MANIFEST.MF
webui/webapp/FileManager/src/org/netxms/ui/eclipse/filemanager/actions/UploadFileToServer.java
webui/webapp/FileManager/src/org/netxms/ui/eclipse/filemanager/views/AgentFileManager.java

index c4954cf..329db6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
        - Filter in geo map view
        - "Duplicate" button in DCI threshold editor
        - Option to show legend for performance tab graphs with single DCI
+       - Fixed file upload errors in web UI
 - Implemented option to show "Top N items" in a Dashboad summary table using sorting and line limitation
 - Fixed issues: NX-1147, NX-1265, NX-1270, NX-1276, NX-1282, NX-1290, NX-1296, NX-1300, NX-1309, NX-1313, NX-1314, NX-1315, NX-1320, NX-1324, NX-1325, NX-1331, NX-1333, NX-1335
 
index 4eec688..f01152f 100644 (file)
@@ -773,7 +773,7 @@ public class AgentFileManager extends ViewPart
 
       final Object[] objects = selection.toArray();
 
-      new ConsoleJob(Messages.get().SelectServerFileDialog_JobTitle, null, Activator.PLUGIN_ID, null) {
+      new ConsoleJob("Reading remote directory", null, Activator.PLUGIN_ID, null) {
          @Override
          protected void runInternal(IProgressMonitor monitor) throws Exception
          {
@@ -798,7 +798,7 @@ public class AgentFileManager extends ViewPart
          @Override
          protected String getErrorMessage()
          {
-            return Messages.get().SelectServerFileDialog_JobError;
+            return "Cannot read remote directory";
          }
       }.start();
    }
@@ -897,7 +897,7 @@ public class AgentFileManager extends ViewPart
             @Override
             protected String getErrorMessage()
             {
-               return Messages.get().UploadFileToServer_JobError;
+               return "Cannot upload file to remote agent";
             }
          }.start();
       }
index be54e77..d59d88d 100644 (file)
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: NetXMS FileManager
 Bundle-SymbolicName: org.netxms.ui.eclipse.filemanager;singleton:=true
-Bundle-Version: 2.1.0
+Bundle-Version: 2.1.1
 Bundle-Activator: org.netxms.ui.eclipse.filemanager.Activator
 Bundle-Vendor: netxms.org
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
index d7a58d4..74d1992 100644 (file)
@@ -88,7 +88,7 @@ public class UploadFileToServer implements IWorkbenchWindowActionDelegate
                                                @Override
                                                public void setTotalWorkAmount(long workTotal)
                                                {
-                                                       monitor.beginTask(Messages.get().UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(), (int)workTotal);
+                                                       monitor.beginTask(Messages.get(getDisplay()).UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(), (int)workTotal);
                                                }
                                                
                                                @Override
index 8304ab5..183154c 100644 (file)
@@ -762,7 +762,7 @@ public class AgentFileManager extends ViewPart
 
       final Object[] objects = selection.toArray();
 
-      new ConsoleJob(Messages.get().SelectServerFileDialog_JobTitle, null, Activator.PLUGIN_ID, null) {
+      new ConsoleJob("Reading remote directory", null, Activator.PLUGIN_ID, null) {
          @Override
          protected void runInternal(IProgressMonitor monitor) throws Exception
          {
@@ -787,7 +787,7 @@ public class AgentFileManager extends ViewPart
          @Override
          protected String getErrorMessage()
          {
-            return Messages.get().SelectServerFileDialog_JobError;
+            return "Cannot read remote directory";
          }
       }.start();
    }
@@ -833,7 +833,7 @@ public class AgentFileManager extends ViewPart
                            @Override
                            public void setTotalWorkAmount(long workTotal)
                            {
-                              monitor.beginTask(Messages.get().UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(),
+                              monitor.beginTask(Messages.get(getDisplay()).UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(),
                                     (int)workTotal);
                            }
          
@@ -856,7 +856,7 @@ public class AgentFileManager extends ViewPart
                            @Override
                            public void setTotalWorkAmount(long workTotal)
                            {
-                              monitor.beginTask(Messages.get().UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(),
+                              monitor.beginTask(Messages.get(getDisplay()).UploadFileToServer_TaskNamePrefix + localFile.getAbsolutePath(),
                                     (int)workTotal);
                            }
          
@@ -886,7 +886,7 @@ public class AgentFileManager extends ViewPart
             @Override
             protected String getErrorMessage()
             {
-               return Messages.get().UploadFileToServer_JobError;
+               return "Cannot upload file to remote agent";
             }
          }.start();
       }