File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change 88use Icinga \Module \Icingadb \Model \RedundancyGroupSummary ;
99use Icinga \Module \Icingadb \Widget \DependencyNodeStatistics ;
1010use ipl \Html \BaseHtmlElement ;
11+ use ipl \Html \Html ;
1112use ipl \Html \HtmlElement ;
1213use ipl \Html \Text ;
1314use ipl \Web \Widget \StateBall ;
@@ -37,14 +38,18 @@ protected function assembleVisual(BaseHtmlElement $visual): void
3738
3839 protected function assembleTitle (BaseHtmlElement $ title ): void
3940 {
40- $ title -> addHtml ( $ this ->createSubject () );
41+ $ subject = $ this ->createSubject ();
4142 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+ ));
4347 } 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+ ));
4552 }
46-
47- $ title ->addHtml (HtmlElement::create ('span ' , null , Text::create ($ text )));
4853 }
4954
5055 protected function createStatistics (): BaseHtmlElement
Original file line number Diff line number Diff line change 1212use Icinga \Module \Icingadb \Model \RedundancyGroupState ;
1313use Icinga \Module \Icingadb \Widget \DependencyNodeStatistics ;
1414use ipl \Html \BaseHtmlElement ;
15+ use ipl \Html \Html ;
1516use ipl \Stdlib \Filter ;
1617use ipl \Web \Url ;
1718use ipl \Web \Widget \Link ;
@@ -80,14 +81,18 @@ protected function assembleCaption(BaseHtmlElement $caption): void
8081
8182 protected function assembleTitle (BaseHtmlElement $ title ): void
8283 {
83- $ title -> addHtml ( $ this ->createSubject () );
84+ $ subject = $ this ->createSubject ();
8485 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+ ));
8690 } 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+ ));
8895 }
89-
90- $ title ->addHtml (HtmlElement::create ('span ' , null , Text::create ($ text )));
9196 }
9297
9398 protected function assemble (): void
Original file line number Diff line number Diff line change 99 font-size : 0.75em ;
1010 }
1111}
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