Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ function updateMenuJudgehosts(data)
sendNotification('Judgehost down.',
{'tag': 'host_'+data[i].hostname+'@'+
Math.floor(data[i].polltime),
'link': domjudge_base_url + '/jury/judgehosts/' + encodeURIComponent(data[i].hostname),
'link': domjudge_base_url + '/jury/judgehosts/' + encodeURIComponent(data[i].judgehostid),
'body': data[i].hostname + ' is down'});
}
}
Expand Down
8 changes: 4 additions & 4 deletions webapp/src/Controller/Jury/JudgehostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function indexAction(Request $request): Response
/**
* @throws NonUniqueResultException
*/
#[Route(path: '/{judgehostid}', methods: ['GET'], name: 'jury_judgehost')]
#[Route(path: '/{judgehostid<\d+>}', methods: ['GET'], name: 'jury_judgehost')]
public function viewAction(Request $request, int $judgehostid): Response
{
/** @var Judgehost|null $judgehost */
Expand Down Expand Up @@ -302,7 +302,7 @@ public function viewAction(Request $request, int $judgehostid): Response
* @throws NonUniqueResultException
*/
#[IsGranted('ROLE_ADMIN')]
#[Route(path: '/{judgehostid}/delete', name: 'jury_judgehost_delete')]
#[Route(path: '/{judgehostid<\d+>}/delete', name: 'jury_judgehost_delete')]
public function deleteAction(Request $request, int $judgehostid): Response
{
/** @var Judgehost $judgehost */
Expand All @@ -318,7 +318,7 @@ public function deleteAction(Request $request, int $judgehostid): Response
}

#[IsGranted('ROLE_ADMIN')]
#[Route(path: '/{judgehostid}/enable', name: 'jury_judgehost_enable')]
#[Route(path: '/{judgehostid<\d+>}/enable', name: 'jury_judgehost_enable')]
public function enableAction(RouterInterface $router, Request $request, int $judgehostid): RedirectResponse
{
/** @var Judgehost $judgehost */
Expand All @@ -330,7 +330,7 @@ public function enableAction(RouterInterface $router, Request $request, int $jud
}

#[IsGranted('ROLE_ADMIN')]
#[Route(path: '/{judgehostid}/disable', name: 'jury_judgehost_disable')]
#[Route(path: '/{judgehostid<\d+>}/disable', name: 'jury_judgehost_disable')]
public function disableAction(RouterInterface $router, Request $request, int $judgehostid): RedirectResponse
{
/** @var Judgehost $judgehost */
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Service/DOMJudgeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function getUpdates(): array
}

$judgehosts = $this->em->createQueryBuilder()
->select('j.hostname', 'j.polltime')
->select('j.judgehostid', 'j.hostname', 'j.polltime')
->from(Judgehost::class, 'j')
->andWhere('j.enabled = 1')
->andWhere('j.hidden = 0')
Expand Down
Loading