From ef4068ebdef6585d4e5037ceafca98efd6b4d37e Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 24 Nov 2021 18:01:37 +0100 Subject: [PATCH] Move css styles from `SelfService` to module.less --- library/Director/Web/SelfService.php | 7 +++---- public/css/module.less | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/library/Director/Web/SelfService.php b/library/Director/Web/SelfService.php index b379c9f4..33756b7b 100644 --- a/library/Director/Web/SelfService.php +++ b/library/Director/Web/SelfService.php @@ -240,8 +240,7 @@ class SelfService return; } - // TODO: move to CSS - $codeStyle = ['style' => 'background: black; color: white; height: 14em; overflow: scroll;']; + $class = ['class' => 'agent-deployment-instructions']; $c->add([ Html::tag('h2', null, $this->translate('For manual configuration')), Html::tag('p', null, [$this->translate('Ticket'), ': ', Html::tag('code', null, $ticket)]), @@ -252,7 +251,7 @@ class SelfService null, ['class' => 'icon-download', 'target' => '_blank'] ), - Html::tag('pre', $codeStyle, $wizard->renderWindowsInstaller()), + Html::tag('pre', $class, $wizard->renderWindowsInstaller()), Html::tag('p', null, $this->translate( 'This requires the Icinga Agent to be installed. It generates and signs' . ' it\'s certificate and it also generates a minimal icinga2.conf to get' @@ -266,7 +265,7 @@ class SelfService ['class' => 'icon-download', 'target' => '_blank'] ), Html::tag('p', null, $this->translate('Just download and run this script on your Linux Client Machine:')), - Html::tag('pre', $codeStyle, $wizard->renderLinuxInstaller()) + Html::tag('pre', $class, $wizard->renderLinuxInstaller()) ]); } diff --git a/public/css/module.less b/public/css/module.less index b1a9eeb6..6836f9b3 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -303,6 +303,12 @@ pre.generated-config { } } +pre.agent-deployment-instructions { + color: @text-color; + height: 14em; + overflow: scroll; +} + table.avp th { font-size: inherit; }