From 748526dfc0862d6a8be42c33e33c60f45eab4cbc Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Jul 2020 08:56:21 +0200 Subject: [PATCH 1/3] Remove icinga-icon font The font resides now in ipl-web --- configuration.php | 1 - library/Icingadb/Widget/IcingaIcon.php | 31 ------------- library/Icingadb/Widget/ViewModeSwitcher.php | 1 + public/css/icinga-icons.less | 45 ------------------- public/font/Icinga-Icons.eot | Bin 1788 -> 0 bytes public/font/Icinga-Icons.svg | 13 ------ public/font/Icinga-Icons.ttf | Bin 1604 -> 0 bytes public/font/Icinga-Icons.woff | Bin 1680 -> 0 bytes 8 files changed, 1 insertion(+), 90 deletions(-) delete mode 100644 library/Icingadb/Widget/IcingaIcon.php delete mode 100644 public/css/icinga-icons.less delete mode 100644 public/font/Icinga-Icons.eot delete mode 100644 public/font/Icinga-Icons.svg delete mode 100644 public/font/Icinga-Icons.ttf delete mode 100644 public/font/Icinga-Icons.woff diff --git a/configuration.php b/configuration.php index 69ebaa76..81295f56 100644 --- a/configuration.php +++ b/configuration.php @@ -221,7 +221,6 @@ namespace Icinga\Module\Icingadb $this->provideCssFile('lists.less'); $this->provideCssFile('mixins.less'); $this->provideCssFile('widgets.less'); - $this->provideCssFile('icinga-icons.less'); $this->provideJsFile('action-list.js'); $this->provideJsFile('migrate.js'); diff --git a/library/Icingadb/Widget/IcingaIcon.php b/library/Icingadb/Widget/IcingaIcon.php deleted file mode 100644 index 608d965b..00000000 --- a/library/Icingadb/Widget/IcingaIcon.php +++ /dev/null @@ -1,31 +0,0 @@ -. The given - * name will be used as automatically added CSS class for the icon element in the format 'iicon-$name'. In addition, - * the CSS class 'icon' will be automatically added too. - * - * @param string $name The name of the icon - * @param Attributes|array $attributes The HTML attributes for the element - */ - public function __construct($name, $attributes = null) - { - $this - ->getAttributes() - ->add('class', ['icon', "iicon-$name"]) - ->add($attributes); - } -} diff --git a/library/Icingadb/Widget/ViewModeSwitcher.php b/library/Icingadb/Widget/ViewModeSwitcher.php index aaac4227..45c0771c 100644 --- a/library/Icingadb/Widget/ViewModeSwitcher.php +++ b/library/Icingadb/Widget/ViewModeSwitcher.php @@ -7,6 +7,7 @@ namespace Icinga\Module\Icingadb\Widget; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; use ipl\Web\Url; +use ipl\Web\Widget\IcingaIcon; use ipl\Web\Widget\Link; class ViewModeSwitcher extends BaseHtmlElement diff --git a/public/css/icinga-icons.less b/public/css/icinga-icons.less deleted file mode 100644 index a5a4d5ff..00000000 --- a/public/css/icinga-icons.less +++ /dev/null @@ -1,45 +0,0 @@ -/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */ - -@font-face { - font-family: 'Icinga-Icons'; - src: url('../icingadb/static?file=font/Icinga-Icons.eot'); - src: url('../icingadb/static?file=font/Icinga-Icons.eot') format('embedded-opentype'), - url('../icingadb/static?file=font/Icinga-Icons.ttf') format('truetype'), - url('../icingadb/static?file=font/Icinga-Icons.woff') format('woff'), - url('../icingadb/static?file=font/Icinga-Icons.svg') format('svg'); - font-weight: normal; - font-style: normal; - font-display: block; -} - -[class^="iicon-"]:before, [class*=" iicon-"]:before { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'Icinga-Icons' !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1em; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - - display: inline-block; - text-decoration: inherit; - width: 1em; - margin-right: .2em; - text-align: center; -} - -.iicon-minimal:before { - content: "\e900"; -} -.iicon-detailed:before { - content: "\e901"; -} -.iicon-default:before { - content: "\e902"; -} diff --git a/public/font/Icinga-Icons.eot b/public/font/Icinga-Icons.eot deleted file mode 100644 index b492a29cda708da6cd70d4aedf173fac3e990c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1788 zcma)7O-Ni<6#nkJGh-Z!CjLY*Ql5=bA&HvAU+Cg4QbDLBCc$ld8DGZ%oj1&kM0bw_ z3SE>+=_1)l*1=s%7o|M9kS@CFq6I@pp^GBjxM?9!XY$?m?lW&}44&cK`E!U%y~bAMJa2 zr&3~nmbUKC|a*u(DR&Xa@oy z)k(W=)yp}kiCx-bw9l?N8zr>kE^S5IE;?)Ow~u%KqP@f%Kb5>nm32}w1KJNMeX)f! zb3e6yA@fz#i@$M0H0!v82$tO_3fQ+~P!FIamCkrUbeyf5Fq_WUM_<&-FsctJOq0*z z3>VxYXYX6}!+Kp0B1VWs{m^}XpDWjmix|cg zF7-Gox{2FBM`z~ZM}rgNlQ*uP?>Yf@^mp}7oMRJf7xB;u!NH{q7cRX^l@%QRPu1~A zsm$mXy6+tv+%vuST&bF`1XL|hzIsJhFI}-48U9bMjZ~cNW^|z+gSgCPiff-p7JM#I z{M1o|P?mq_YgN<3!_!GU@<alYHo5zhH2>o}HC zPoe(F1fQ%*AWrXF>M)4akJ-4FILhw_ejv7uS$kptD0;6@Rr>YA`)wcpgO-$Lu~(YV zXX&U9cL~ob_h=*>6YhCVsTS^h{iUQdMV^S#!)U8mLpF;}e2A~{o3O*tO<3Sb&=O|} z4b!w@$K(+BfLxT%LKD6;Sd#z5;1uyQgVUVv0fRH-3kGM=i(P%LQq5#~=!vk!i}4$S zCHVz|Q^Y$4r+HP58k`}&Zg7_8=a0Eup_q5B&gHyf<)rI((JfaBUeUfbGWPB}_cR|l zP0SrPzrN~}8?XA)44n0fRXgt%-Lg}4m+c3eHviDP=M_gV8$J$I*nB)(J`?)Ma8PBx bOzr_T+3IJ - - -Generated by IcoMoon - - - - - - - - - \ No newline at end of file diff --git a/public/font/Icinga-Icons.ttf b/public/font/Icinga-Icons.ttf deleted file mode 100644 index 192416e166eee6201fef96faeff6978a1a553bdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1604 zcma)6J7^S96g_X=?#8TQVm>CsAQSTiHCaE230S;Bg%si^lGaQ%>n4!QEW0Zv-Jl>? zh$0r+iM6CtE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ybgrlR2e5CULN$>pmRzG0y$2L4)4&9`^B9MYV=$BgdkF**~VJ^APhqB(72`hhJdEd3L%rf7B1GD_<`-}N&+i$1HJKCpAvPS zd7`v&jXv|-Qe`~(>Pc~{szfT1T1H<+&}tgHun%|fRycZf6-IdzltopvV}_krGBpHt zP^;9lP=#BD+tg1Po*;i@c#`|wW_XJFwBczqV_Ds+L^YK?j8wRVow#SXO?}kx1o@KT zN$f_C;VJ6#hNpRdK8<9iy_|b^B;$Jpj3C2`9&&JTSbILb!dNz6nD#yANOv#BkVPH^ zrm2vFBj`r&RvxmIoO9XS{EVB&ITp#W&l&cS-^#*a-zz$~te4HZ#q6XrvFPxHPW!&s njbYtrk*((VR8P0>qR4rY+5{Fks`vJBnouv*%`c|@`8KiNXM_t_ From 3a921d4e18d6c7071cfc01b0af309f71869767c5 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Jul 2020 14:52:35 +0200 Subject: [PATCH 2/3] QuickActions: Use `Icon` widget from ipl/web --- library/Icingadb/Widget/Detail/QuickActions.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/library/Icingadb/Widget/Detail/QuickActions.php b/library/Icingadb/Widget/Detail/QuickActions.php index b951f0f8..607245cf 100644 --- a/library/Icingadb/Widget/Detail/QuickActions.php +++ b/library/Icingadb/Widget/Detail/QuickActions.php @@ -14,6 +14,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\RemoveAcknowledgementCommandFo use ipl\Html\BaseHtmlElement; use ipl\Html\Html; use ipl\Html\HtmlString; +use ipl\Web\Widget\Icon; class QuickActions extends BaseHtmlElement { @@ -47,7 +48,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'acknowledge', t('Acknowledge'), - 'icon-edit', + 'edit', t('Acknowledge this problem, suppress all future notifications for it and tag it as being handled') ); } @@ -70,7 +71,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'addComment', t('Comment', 'verb'), - 'icon-comment-empty', + 'comment', t('Add a new comment') ); } @@ -79,7 +80,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'sendCustomNotification', t('Notification'), - 'icon-bell', + 'bell', t('Send a custom notification') ); } @@ -88,7 +89,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'scheduleDowntime', t('Downtime'), - 'icon-plug', + 'plug', t('Schedule a downtime to suppress all problem notifications within a specific period of time') ); } @@ -103,7 +104,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'scheduleCheck', t('Reschedule'), - 'icon-calendar-empty', + 'calendar', t('Schedule the next active check at a different time than the current one') ); } @@ -112,7 +113,7 @@ class QuickActions extends BaseHtmlElement $this->assembleAction( 'processCheckresult', t('Process check result'), - 'icon-edit', + 'edit', sprintf( t('Submit a one time or so called passive result for the %s check'), $this->object->checkcommand @@ -133,7 +134,7 @@ class QuickActions extends BaseHtmlElement 'data-no-icinga-ajax' => true ], [ - Html::tag('i', ['class' => $icon]), + new Icon($icon), $label ] ); From eb09ebd4ecabeef86877c48b5d646337919a9843 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 19 Nov 2020 13:55:00 +0100 Subject: [PATCH 3/3] css: Define `@iplWebAssets` and export it --- public/css/common.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/common.less b/public/css/common.less index 2385fe02..6ca9e7e8 100644 --- a/public/css/common.less +++ b/public/css/common.less @@ -1,5 +1,9 @@ /* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */ +@exports: { + @iplWebAssets: "../lib/icinga/ipl"; +}; + & > .content.full-width { padding-left: 0; padding-right: 0;