Fix Javascript merge issue and UI worker detail display bug (#8135)

* Fix previous merge issues in Javascript

Signed-off-by: Alasdair Macmillan <aimmac23@gmail.com>

* Fix issue where worker detail doesn't display without tasks

---------

Signed-off-by: Alasdair Macmillan <aimmac23@gmail.com>
This commit is contained in:
Alasdair Macmillan
2026-01-27 18:56:28 +00:00
committed by GitHub
parent b1d63d0943
commit 41d079a316
3 changed files with 2 additions and 12 deletions

View File

@@ -7,7 +7,6 @@
* showConfirm('Delete this?', function() { });
*/
<<<<<<< HEAD
(function () {
'use strict';

View File

@@ -276,7 +276,7 @@ templ MaintenanceWorkers(data *dash.MaintenanceWorkersData) {
'</div>' +
'<hr>' +
'<h6>Current Tasks</h6>' +
(data.current_tasks.length === 0 ?
(data.current_tasks === null || data.current_tasks.length === 0 ?
'<p class="text-muted">No current tasks</p>' :
data.current_tasks.map(task =>
'<div class="card mb-2">' +
@@ -311,15 +311,6 @@ templ MaintenanceWorkers(data *dash.MaintenanceWorkersData) {
'Content-Type': 'application/json',
}
})
showConfirm(`Are you sure you want to pause worker ${workerID}?`, function() {
const encodedWorkerId = encodeURIComponent(workerID);
fetch('/api/maintenance/workers/' + encodedWorkerId + '/pause', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
>>>>>>> 5a7c74feac7c0b1dbab24446fbdbeddb8899c538
})
.then(response => response.json())
.then(data => {
if (data.success) {

File diff suppressed because one or more lines are too long