File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ public function getColumnDefinitions(): array
83
83
'allocate_load_balancer_node_ports ' => $ this ->translate ('Allocated Load Balancer Node Ports ' ),
84
84
'load_balancer_class ' => $ this ->translate ('Load Balancer Class ' ),
85
85
'internal_traffic_policy ' => $ this ->translate ('Internal Traffic Policy ' ),
86
+ 'icinga_state ' => $ this ->translate ('Icinga State ' ),
87
+ 'icinga_state_reason ' => $ this ->translate ('Icinga State Reason ' ),
86
88
'yaml ' => $ this ->translate ('YAML ' ),
87
89
'created ' => $ this ->translate ('Created At ' )
88
90
];
@@ -110,6 +112,8 @@ public function getColumns(): array
110
112
'allocate_load_balancer_node_ports ' ,
111
113
'load_balancer_class ' ,
112
114
'internal_traffic_policy ' ,
115
+ 'icinga_state ' ,
116
+ 'icinga_state_reason ' ,
113
117
'yaml ' ,
114
118
'created '
115
119
];
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ protected function assemble(): void
71
71
),
72
72
$ this ->translate ('Load Balancer Class ' ) => $ this ->service ->load_balancer_class ??
73
73
new EmptyState ($ this ->translate ('None ' )),
74
- $ this ->translate ('Internal Traffic Policy ' ) => $ this ->service ->internal_traffic_policy
74
+ $ this ->translate ('Internal Traffic Policy ' ) => $ this ->service ->internal_traffic_policy ,
75
+ $ this ->translate ('Icinga State ' ) => new DetailState ($ this ->service ->icinga_state ),
76
+ $ this ->translate ('Icinga State Reason ' ) => new IcingaStateReason (
77
+ $ this ->service ->icinga_state_reason
78
+ )
75
79
])),
76
80
new Labels ($ this ->service ->label ),
77
81
new Annotations ($ this ->service ->annotation ),
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class ServiceListItem extends BaseListItem
31
31
protected function assembleCaption (BaseHtmlElement $ caption ): void
32
32
{
33
33
// TODO add state reason then replace function by DefaultListItemCaption trait
34
- $ caption ->addHtml (new Text (' Placeholder for Icinga State Reason ' ));
34
+ $ caption ->addHtml (new Text ($ this -> item -> icinga_state_reason ));
35
35
}
36
36
37
37
protected function assembleFooter (BaseHtmlElement $ footer ): void
@@ -72,7 +72,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
72
72
};
73
73
74
74
// TODO add icinga state then replace function by DefaultListItemVisual trait
75
- $ visual ->addHtml (new StateBall (' none ' , $ size ));
75
+ $ visual ->addHtml (new StateBall ($ this -> item -> icinga_state , $ size ));
76
76
77
77
if ($ this ->getViewMode () === ViewModeSwitcher::VIEW_MODE_MINIMAL ) {
78
78
return ;
You can’t perform that action at this time.
0 commit comments