فهرست منبع

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 سال پیش
والد
کامیت
4472500631
3فایلهای تغییر یافته به همراه28 افزوده شده و 5 حذف شده
  1. 3 0
      esp/src/eclwatch/FileSpray.js
  2. 5 5
      esp/src/eclwatch/LZBrowseWidget.js
  3. 20 0
      esp/src/eclwatch/TargetSelectWidget.js

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

@@ -372,6 +372,9 @@ define([
                 }
                 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.sprayFixedDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             this.sprayDelimitedDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             this.sprayXmlDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             this.sprayVariableDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             this.sprayBlobDestinationSelect.init({
-                Groups: true
+                SprayTargets: true
             });
             var context = this;
             this.dropZoneTargetSelect.init({

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

@@ -60,6 +60,8 @@ define([
             }
             if (params.Groups === true) {
                 this.loadGroups();
+            } else if (params.SprayTargets === true) {
+                this.loadSprayTargets();
             } else if (params.DropZones === true) {
                 this.loadDropZones();
             } 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() {
             for (var key in WsWorkunits.States) {
                 this.options.push({