v20260106-15-jobrun-popup-objects-sort #49

Merged
ivooskamp merged 2 commits from v20260106-15-jobrun-popup-objects-sort into main 2026-01-13 11:19:16 +01:00
3 changed files with 49 additions and 8 deletions

View File

@ -1 +1 @@
v20260106-14-veeam-m365-overall-message
v20260106-15-jobrun-popup-objects-sort

View File

@ -283,16 +283,36 @@ function renderObjects(objects) {
return;
}
// Sort: objects with an error_message first (alphabetically by name), then the rest (also by name).
var sorted = (objects || []).slice().sort(function (a, b) {
a = a || {};
b = b || {};
var aHasErr = !!(a.error_message && a.error_message.toString().trim());
var bHasErr = !!(b.error_message && b.error_message.toString().trim());
if (aHasErr !== bHasErr) return aHasErr ? -1 : 1;
var an = (a.name || "").toString().toLowerCase();
var bn = (b.name || "").toString().toLowerCase();
if (an < bn) return -1;
if (an > bn) return 1;
return 0;
});
var html = "<div class=\"table-responsive\"><table class=\"table table-sm table-bordered mb-0\">";
html += "<thead><tr><th>Object</th><th>Type</th><th>Status</th><th>Error</th></tr></thead><tbody>";
for (var i = 0; i < objects.length; i++) {
var o = objects[i] || {};
for (var i = 0; i < sorted.length; i++) {
var o = sorted[i] || {};
html += "<tr>";
html += "<td>" + (o.name || "") + "</td>";
html += "<td>" + (o.type || "") + "</td>";
html += "<td>" + escapeHtml(o.name || "") + "</td>";
html += "<td>" + escapeHtml(o.type || "") + "</td>";
var d = statusDotClass(o.status);
html += "<td class=\"status-text " + statusClass(o.status) + "\">" + (d ? ('<span class=\\\"status-dot ' + d + ' me-2\\\" aria-hidden=\\\"true\\\"></span>') : '') + escapeHtml(o.status || "") + "</td>";
html += "<td>" + (o.error_message || "") + "</td>";
html += "<td class=\"status-text " + statusClass(o.status) + "\">" +
(d ? ("<span class=\"status-dot " + d + " me-2\" aria-hidden=\"true\"></span>") : "") +
escapeHtml(o.status || "") +
"</td>";
html += "<td>" + escapeHtml(o.error_message || "") + "</td>";
html += "</tr>";
}
html += "</tbody></table></div>";

View File

@ -110,6 +110,27 @@ Removed an incorrectly indented redirect statement so the module loads correctly
- Updated the Veeam Backup for Microsoft 365 mail parser to always persist the extracted overall “Details” warning/info message, even when the run is reported as Success.
- This ensures permission/role warnings (e.g. “Missing application permissions/roles…”) are stored and can be used for overrides.
---
## v20260106-15-jobrun-popup-objects-sort
- Fixed job run popup so objects are rendered again.
- Restored object list handling in the job run popup.
- Updated sorting logic:
- Objects with an error message are shown first, sorted alphabetically by object name.
- Remaining objects are shown below, also sorted alphabetically by object name.
---
## v20260106-16-jobrun-popup-objects-visible
- Fixed job run popup where the Objects section was not visible for certain runs.
- Adjusted popup layout to prevent objects from being hidden behind the footer.
- Improved object rendering to handle different mail structures consistently.
- Updated object sorting logic:
- Objects with an error message are displayed first, sorted alphabetically by object name.
- Remaining objects are displayed below, also sorted alphabetically by object name.
================================================================================================================================================
## v0.1.16