File tree 3 files changed +26
-10
lines changed
3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change 8
8
use Icinga \Module \Icingadb \Model \RedundancyGroupSummary ;
9
9
use Icinga \Module \Icingadb \Widget \DependencyNodeStatistics ;
10
10
use ipl \Html \BaseHtmlElement ;
11
+ use ipl \Html \Html ;
11
12
use ipl \Html \HtmlElement ;
12
13
use ipl \Html \Text ;
13
14
use ipl \Web \Widget \StateBall ;
@@ -37,14 +38,18 @@ protected function assembleVisual(BaseHtmlElement $visual): void
37
38
38
39
protected function assembleTitle (BaseHtmlElement $ title ): void
39
40
{
40
- $ title -> addHtml ( $ this ->createSubject () );
41
+ $ subject = $ this ->createSubject ();
41
42
if ($ this ->object ->state ->failed ) {
42
- $ text = $ this ->translate ('has no working objects ' );
43
+ $ title ->addHtml (Html::sprintf (
44
+ $ this ->translate ('%s has no working objects ' , '<groupname> has ... ' ),
45
+ $ subject
46
+ ));
43
47
} else {
44
- $ text = $ this ->translate ('has working objects ' );
48
+ $ title ->addHtml (Html::sprintf (
49
+ $ this ->translate ('%s has working objects ' , '<groupname> has ... ' ),
50
+ $ subject
51
+ ));
45
52
}
46
-
47
- $ title ->addHtml (HtmlElement::create ('span ' , null , Text::create ($ text )));
48
53
}
49
54
50
55
protected function createStatistics (): BaseHtmlElement
Original file line number Diff line number Diff line change 12
12
use Icinga \Module \Icingadb \Model \RedundancyGroupState ;
13
13
use Icinga \Module \Icingadb \Widget \DependencyNodeStatistics ;
14
14
use ipl \Html \BaseHtmlElement ;
15
+ use ipl \Html \Html ;
15
16
use ipl \Stdlib \Filter ;
16
17
use ipl \Web \Url ;
17
18
use ipl \Web \Widget \Link ;
@@ -80,14 +81,18 @@ protected function assembleCaption(BaseHtmlElement $caption): void
80
81
81
82
protected function assembleTitle (BaseHtmlElement $ title ): void
82
83
{
83
- $ title -> addHtml ( $ this ->createSubject () );
84
+ $ subject = $ this ->createSubject ();
84
85
if ($ this ->state ->failed ) {
85
- $ text = $ this ->translate ('has no working objects ' );
86
+ $ title ->addHtml (Html::sprintf (
87
+ $ this ->translate ('%s has no working objects ' , '<groupname> has ... ' ),
88
+ $ subject
89
+ ));
86
90
} else {
87
- $ text = $ this ->translate ('has working objects ' );
91
+ $ title ->addHtml (Html::sprintf (
92
+ $ this ->translate ('%s has working objects ' , '<groupname> has ... ' ),
93
+ $ subject
94
+ ));
88
95
}
89
-
90
- $ title ->addHtml (HtmlElement::create ('span ' , null , Text::create ($ text )));
91
96
}
92
97
93
98
protected function assemble (): void
Original file line number Diff line number Diff line change 9
9
font-size : 0.75em ;
10
10
}
11
11
}
12
+
13
+ .item-list.default-layout > .redundancy-group-list-item {
14
+ .title > .subject {
15
+ margin-right : .28125em ;
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments