From a00b42af1d8d66c40e8482058cc62ad2edfc7f2a Mon Sep 17 00:00:00 2001 From: Shivam Agarwal Date: Thu, 14 May 2026 01:01:26 +0530 Subject: [PATCH 1/2] feat: surface per-component conversion warnings in job results UI BucketDataSource: parse path||message warning strings from bucket resource and inject warnings (boolean) + warningList (String[]) into each datasource item. item.html: render warning icon and message list for flagged items using HTL data-sly-test/data-sly-list. navpanel.html: remove unused multi-bucket loop, hardcode single Bucket 1 tab (forms jobs always run as a single bucket). --- .../ConversionJobBucketDataSource.java | 26 ++++++++++++++++++- .../components/job/bucket/item/item.html | 9 ++++++- .../job/view/navpanel/navpanel.html | 12 +++------ 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/com/adobe/aem/modernize/job/datasource/ConversionJobBucketDataSource.java b/core/src/main/java/com/adobe/aem/modernize/job/datasource/ConversionJobBucketDataSource.java index 6e91b556..204a6dc2 100644 --- a/core/src/main/java/com/adobe/aem/modernize/job/datasource/ConversionJobBucketDataSource.java +++ b/core/src/main/java/com/adobe/aem/modernize/job/datasource/ConversionJobBucketDataSource.java @@ -21,6 +21,8 @@ */ import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -99,6 +101,7 @@ protected void doGet(@NotNull SlingHttpServletRequest request, @NotNull SlingHtt } private DataSource buildDataSource(final ResourceResolver rr, final ConversionJobBucket bucket, int offset, int limit) { + Map> warningsByPath = parseWarnings(bucket); List entries = bucket.getPaths().stream().skip(offset).limit(limit).map(p -> { Map vm = new HashMap<>(); vm.put("path", p); @@ -118,10 +121,31 @@ private DataSource buildDataSource(final ResourceResolver rr, final ConversionJo vm.put("status", "Unknown"); vm.put("statusClass", "unknown"); vm.put("icon", "helpCircle"); - + } + List warns = warningsByPath.getOrDefault(p, Collections.emptyList()); + if (!warns.isEmpty()) { + vm.put("warnings", true); + vm.put("warningList", warns.toArray(new String[0])); } return new ValueMapResource(rr, p, ITEM_RESOURCE_TYPE, new ValueMapDecorator(vm)); }).collect(Collectors.toList()); return new SimpleDataSource(entries.iterator()); } + + private Map> parseWarnings(ConversionJobBucket bucket) { + String[] raw = bucket.getResource().getValueMap().get("warnings", new String[0]); + if (raw.length == 0) { + return Collections.emptyMap(); + } + Map> result = new HashMap<>(); + for (String entry : raw) { + int sep = entry.indexOf("||"); + if (sep > 0) { + String path = entry.substring(0, sep); + String msg = entry.substring(sep + 2); + result.computeIfAbsent(path, k -> new ArrayList<>()).add(msg); + } + } + return result; + } } diff --git a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/bucket/item/item.html b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/bucket/item/item.html index 15346dbe..e8a0c2fb 100644 --- a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/bucket/item/item.html +++ b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/bucket/item/item.html @@ -18,7 +18,14 @@ #L% --> - ${properties.path} + +
${properties.path}
+ + +
⚠ ${warning}
+
+
+ ${properties.status}
diff --git a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html index bad41b01..e618e2f5 100644 --- a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html +++ b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html @@ -21,13 +21,9 @@ class="aem-modernize-navpanel-bucket-action" id="${properties.id}" size="${properties.size}" - orientation="${properties.orientation}" - data-sly-use.job="${'com.adobe.aem.modernize.model.ConversionJobNavItem' @ path=request.requestPathInfo.suffix}" - data-sly-list.bucket="${job.navBuckets}"> - - - Bucket ${bucketList.count} (${bucket.count} Items) + orientation="${properties.orientation}"> + + Bucket 1 From cd3f49f29f2327411e80c1a51abcaf8c63f6572d Mon Sep 17 00:00:00 2001 From: Shivam Agarwal Date: Thu, 14 May 2026 10:41:10 +0530 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20revert=20shared=20navpanel.html=20?= =?UTF-8?q?=E2=80=94=20dynamic=20loop=20works=20for=20all=20job=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shared navpanel component is used by form, component, structure, and policy job views. Hardcoding a single tab broke multi-bucket navigation for all non-form job types. Reverted to the original dynamic data-sly-list.bucket loop. Forms jobs always produce a single bucket, so the loop naturally renders one tab without any forms-specific override needed. --- .../components/job/view/navpanel/navpanel.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html index e618e2f5..bad41b01 100644 --- a/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html +++ b/ui.apps/src/main/content/jcr_root/apps/aem-modernize/components/job/view/navpanel/navpanel.html @@ -21,9 +21,13 @@ class="aem-modernize-navpanel-bucket-action" id="${properties.id}" size="${properties.size}" - orientation="${properties.orientation}"> - - Bucket 1 + orientation="${properties.orientation}" + data-sly-use.job="${'com.adobe.aem.modernize.model.ConversionJobNavItem' @ path=request.requestPathInfo.suffix}" + data-sly-list.bucket="${job.navBuckets}"> + + + Bucket ${bucketList.count} (${bucket.count} Items)