Skip to content

Commit 9543805

Browse files
committed
Fixes judgehost down notification
The route requires the judgehostid as route parameter, not the hostname.
1 parent 0c7db21 commit 9543805

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

webapp/public/js/domjudge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ function updateMenuJudgehosts(data)
759759
sendNotification('Judgehost down.',
760760
{'tag': 'host_'+data[i].hostname+'@'+
761761
Math.floor(data[i].polltime),
762-
'link': domjudge_base_url + '/jury/judgehosts/' + encodeURIComponent(data[i].hostname),
762+
'link': domjudge_base_url + '/jury/judgehosts/' + encodeURIComponent(data[i].judgehostid),
763763
'body': data[i].hostname + ' is down'});
764764
}
765765
}

webapp/src/Service/DOMJudgeService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public function getUpdates(): array
370370
}
371371

372372
$judgehosts = $this->em->createQueryBuilder()
373-
->select('j.hostname', 'j.polltime')
373+
->select('j.judgehostid', 'j.hostname', 'j.polltime')
374374
->from(Judgehost::class, 'j')
375375
->andWhere('j.enabled = 1')
376376
->andWhere('j.hidden = 0')

0 commit comments

Comments
 (0)