浏览代码

HPCC-11169 Add ResourceURLCount to WUQueryDetails response

The ResourceURLCount is added to WUQueryDetails response. Also fix
'the ResourceURLCount should not set to 0 when IncludeResourceURLs
is set to false'.

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
Kevin Wang 11 年之前
父节点
当前提交
accf3cece7

+ 1 - 0
esp/scm/ws_workunits.ecm

@@ -1295,6 +1295,7 @@ ESPresponse [exceptions_inline] WUQueryDetailsResponse
     [min_ver("1.46")] ESParray<string> LibrariesUsed;
     [min_ver("1.46")] int CountGraphs;
     [min_ver("1.46")] ESParray<string> GraphIds;
+    [min_ver("1.50")] int ResourceURLCount;
 };
 
 ESPrequest WUMultiQuerySetDetailsRequest

+ 8 - 0
esp/services/ws_workunits/ws_workunitsQuerySets.cpp

@@ -1203,6 +1203,14 @@ bool CWsWorkunitsEx::onWUQueryDetails(IEspContext &context, IEspWUQueryDetailsRe
             resp.setClusters(clusterStates);
         }
     }
+    if (version >= 1.50)
+    {
+        StringArray views, urls;
+        WsWuInfo winfo(context, wuid);
+        winfo.getResourceInfo(views, urls, WUINFO_IncludeResourceURLs);
+        resp.setResourceURLCount(urls.length());
+    }
+
     return true;
 }
 

+ 1 - 1
esp/services/ws_workunits/ws_workunitsService.cpp

@@ -1473,7 +1473,7 @@ bool CWsWorkunitsEx::onWUInfo(IEspContext &context, IEspWUInfoRequest &req, IEsp
                 if (req.getIncludeResultsViewNames()||req.getIncludeResourceURLs()||(version >= 1.50))
                 {
                     StringArray views, urls;
-                    winfo.getResourceInfo(views, urls, flags);
+                    winfo.getResourceInfo(views, urls, WUINFO_IncludeResourceURLs);
                     IEspECLWorkunit& eclWU = resp.updateWorkunit();
                     if (req.getIncludeResultsViewNames())
                         resp.setResultViews(views);