Sfoglia il codice sorgente

Merge pull request #6915 from GordonSmith/HPCC-12809

HPCC-12809 Landing Zone Spray Group shows too many clusters

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 anni fa
parent
commit
4472500631

+ 3 - 0
esp/src/eclwatch/FileSpray.js

@@ -372,6 +372,9 @@ define([
                 }
                 }
                 return response; 
                 return response; 
             });
             });
+        },
+        GetSprayTargets: function(params) {
+            return ESPRequest.send("FileSpray", "GetSprayTargets", params);
         }
         }
     };
     };
 });
 });

+ 5 - 5
esp/src/eclwatch/LZBrowseWidget.js

@@ -420,19 +420,19 @@ define([
 
 
             this.initLandingZonesGrid();
             this.initLandingZonesGrid();
             this.sprayFixedDestinationSelect.init({
             this.sprayFixedDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             });
             this.sprayDelimitedDestinationSelect.init({
             this.sprayDelimitedDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             });
             this.sprayXmlDestinationSelect.init({
             this.sprayXmlDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             });
             this.sprayVariableDestinationSelect.init({
             this.sprayVariableDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             });
             this.sprayBlobDestinationSelect.init({
             this.sprayBlobDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             });
             var context = this;
             var context = this;
             this.dropZoneTargetSelect.init({
             this.dropZoneTargetSelect.init({

+ 20 - 0
esp/src/eclwatch/TargetSelectWidget.js

@@ -60,6 +60,8 @@ define([
             }
             }
             if (params.Groups === true) {
             if (params.Groups === true) {
                 this.loadGroups();
                 this.loadGroups();
+            } else if (params.SprayTargets === true) {
+                this.loadSprayTargets();
             } else if (params.DropZones === true) {
             } else if (params.DropZones === true) {
                 this.loadDropZones();
                 this.loadDropZones();
             } else if (params.DropZoneFolders === true) {
             } else if (params.DropZoneFolders === true) {
@@ -177,6 +179,24 @@ define([
             });
             });
         },
         },
 
 
+        loadSprayTargets: function () {
+            var context = this;
+            FileSpray.GetSprayTargets({
+                load: function (response) {
+                    if (lang.exists("GetSprayTargetsResponse.GroupNodes.GroupNode", response)) {
+                        var targetData = response.GetSprayTargetsResponse.GroupNodes.GroupNode;
+                        for (var i = 0; i < targetData.length; ++i) {
+                            context.options.push({
+                                label: targetData[i].Name,
+                                value: targetData[i].Name
+                            });
+                        }
+                        context._postLoad();
+                    }
+                }
+            });
+        },
+
         loadWUState: function() {
         loadWUState: function() {
             for (var key in WsWorkunits.States) {
             for (var key in WsWorkunits.States) {
                 this.options.push({
                 this.options.push({