File tree Expand file tree Collapse file tree 7 files changed +14
-37
lines changed
library/Notifications/Widget Expand file tree Collapse file tree 7 files changed +14
-37
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Make sure you use `notifications` as the module name. The following requirements
13
13
or [ PostgreSQL] ( https://www.php.net/manual/en/ref.pdo-pgsql.php ) PDO PHP libraries
14
14
- [ Icinga Notifications] ( https://github.com/Icinga/icinga-notifications )
15
15
- [ Icinga Web] ( https://github.com/Icinga/icingaweb2 ) (≥2.9)
16
- - [ Icinga PHP Library (ipl)] ( https://github.com/Icinga/icinga-php-library ) (≥0.14 .0)
16
+ - [ Icinga PHP Library (ipl)] ( https://github.com/Icinga/icinga-php-library ) (≥0.15 .0)
17
17
- [ Icinga PHP Thirdparty] ( https://github.com/Icinga/icinga-php-thirdparty ) (≥0.12.0)
18
18
19
19
<!-- {% include "02-Installation.md" %} -->
Original file line number Diff line number Diff line change 7
7
use Icinga \Module \Notifications \Model \Source ;
8
8
use ipl \Html \BaseHtmlElement ;
9
9
use ipl \Html \Html ;
10
+ use ipl \Web \Widget \Ball ;
10
11
11
12
class EventSourceBadge extends BaseHtmlElement
12
13
{
@@ -39,7 +40,9 @@ protected function assemble()
39
40
->getAttributes ()
40
41
->add ('title ' , $ title );
41
42
42
- $ this ->add ((new SourceIcon (SourceIcon::SIZE_LARGE ))->addHtml ($ this ->source ->getIcon ()));
43
+ $ this ->addHtml ((new Ball (Ball::SIZE_LARGE ))
44
+ ->addAttributes (['class ' => 'source-icon ' ])
45
+ ->addHtml ($ this ->source ->getIcon ()));
43
46
$ this ->add (Html::tag ('span ' , ['class ' => 'name ' ], $ this ->source ->name ?? $ this ->source ->type ));
44
47
}
45
48
}
Original file line number Diff line number Diff line change 9
9
use Icinga \Module \Notifications \Model \Incident ;
10
10
use Icinga \Module \Notifications \Model \Objects ;
11
11
use Icinga \Module \Notifications \Model \Source ;
12
- use Icinga \Module \Notifications \Widget \SourceIcon ;
13
12
use InvalidArgumentException ;
14
13
use ipl \Html \BaseHtmlElement ;
15
14
use ipl \Html \Html ;
16
15
use ipl \Html \HtmlElement ;
17
16
use ipl \Web \Common \BaseListItem ;
17
+ use ipl \Web \Widget \Ball ;
18
18
use ipl \Web \Widget \Link ;
19
19
use ipl \Web \Widget \TimeAgo ;
20
20
@@ -108,7 +108,9 @@ protected function assembleHeader(BaseHtmlElement $header): void
108
108
$ object = $ this ->item ->object ;
109
109
/** @var Source $source */
110
110
$ source = $ object ->source ;
111
- $ content [] = (new SourceIcon (SourceIcon::SIZE_BIG ))->addHtml ($ source ->getIcon ());
111
+ $ content [] = (new Ball (Ball::SIZE_BIG ))
112
+ ->addAttributes (['class ' => 'source-icon ' ])
113
+ ->addHtml ($ source ->getIcon ());
112
114
}
113
115
114
116
$ content [] = new TimeAgo ($ this ->item ->time ->getTimestamp ());
Original file line number Diff line number Diff line change 9
9
use Icinga \Module \Notifications \Model \Incident ;
10
10
use Icinga \Module \Notifications \Model \Objects ;
11
11
use Icinga \Module \Notifications \Model \Source ;
12
- use Icinga \Module \Notifications \Widget \SourceIcon ;
13
12
use ipl \Html \Attributes ;
14
13
use ipl \Html \BaseHtmlElement ;
15
14
use ipl \Html \FormattedString ;
16
15
use ipl \Html \Html ;
17
16
use ipl \Html \HtmlElement ;
18
17
use ipl \I18n \Translation ;
19
18
use ipl \Web \Common \BaseListItem ;
19
+ use ipl \Web \Widget \Ball ;
20
20
use ipl \Web \Widget \Icon ;
21
21
use ipl \Web \Widget \Link ;
22
22
use ipl \Web \Widget \TimeAgo ;
@@ -85,7 +85,9 @@ protected function assembleHeader(BaseHtmlElement $header): void
85
85
86
86
/** @var Source $source */
87
87
$ source = $ this ->item ->object ->source ;
88
- $ meta ->addHtml ((new SourceIcon (SourceIcon::SIZE_BIG ))->addHtml ($ source ->getIcon ()));
88
+ $ meta ->addHtml ((new Ball (Ball::SIZE_BIG ))
89
+ ->addAttributes (['class ' => 'source-icon ' ])
90
+ ->addHtml ($ source ->getIcon ()));
89
91
90
92
if ($ this ->item ->recovered_at !== null ) {
91
93
$ meta ->addHtml (FormattedString::create (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
Module: notifications
2
2
Version: 0.1.0
3
3
Requires:
4
- Libraries: icinga-php-library (>=0.14 .0), icinga-php-thirdparty (>=0.12.0)
4
+ Libraries: icinga-php-library (>=0.15 .0), icinga-php-thirdparty (>=0.12.0)
5
5
Description: Icinga Notifications Web
6
6
Manage incidents and who gets notified about them how and when
Original file line number Diff line number Diff line change 29
29
}
30
30
31
31
.source-icon {
32
- .ball ();
33
32
.ball-solid (@gray-light );
34
33
35
34
color : @text-color ;
You can’t perform that action at this time.
0 commit comments