From 35aed5a469a2541785894cf0b50b367f1d4db663 Mon Sep 17 00:00:00 2001 From: jeroen Date: Thu, 18 Aug 2022 14:02:31 +0200 Subject: [PATCH] NEW FEATURE: added host label --- src/Repository/JobRepository.php | 1 + templates/job/add.html.twig | 6 ++++++ templates/job/edit.html.twig | 6 ++++++ templates/job/index.html.twig | 2 +- translations/messages.en-l33t.yaml | 4 ++++ translations/messages.en.yaml | 4 ++++ translations/messages.nl.yaml | 4 ++++ 7 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/Repository/JobRepository.php b/src/Repository/JobRepository.php index 586c75f..21a4a05 100644 --- a/src/Repository/JobRepository.php +++ b/src/Repository/JobRepository.php @@ -617,6 +617,7 @@ class JobRepository extends EntityRepository $job->setData('containertype', $values['containertype']); $job->setData('fail-pct', !empty($values['fail-pct']) ? (int)$values['fail-pct'] : 50); $job->setData('fail-days', !empty($values['fail-days']) ? (int)$values['fail-days'] : 7); + $job->setData('hostlabel', !empty($values['hostlabel']) ? $values['hostlabel'] : ''); if(!$job->hasData('crontype')) { throw new \InvalidArgumentException("Crontype cannot be empty"); diff --git a/templates/job/add.html.twig b/templates/job/add.html.twig index 7456585..04f8dc7 100644 --- a/templates/job/add.html.twig +++ b/templates/job/add.html.twig @@ -61,6 +61,12 @@ +
+ + + {{ "job.addedit.generalinfo.hostlabel.helptext" | trans }} +
+
diff --git a/templates/job/edit.html.twig b/templates/job/edit.html.twig index c7f95cf..f81f102 100644 --- a/templates/job/edit.html.twig +++ b/templates/job/edit.html.twig @@ -62,6 +62,12 @@
+
+ + + {{ 'job.addedit.generalinfo.hostlabel.helptext' | trans }} +
+

Job details