File tree 3 files changed +11
-4
lines changed
3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ public function getColumnDefinitions(): array
72
72
'active ' => $ this ->translate ('Active ' ),
73
73
'last_schedule_time ' => $ this ->translate ('Last Schedule Time ' ),
74
74
'last_successful_time ' => $ this ->translate ('Last Successful Time ' ),
75
+ 'icinga_state ' => $ this ->translate ('Icinga State ' ),
76
+ 'icinga_state_reason ' => $ this ->translate ('Icinga State Reason ' ),
75
77
'yaml ' => $ this ->translate ('YAML ' ),
76
78
'created ' => $ this ->translate ('Created At ' )
77
79
];
@@ -95,6 +97,8 @@ public function getColumns(): array
95
97
'active ' ,
96
98
'last_schedule_time ' ,
97
99
'last_successful_time ' ,
100
+ 'icinga_state ' ,
101
+ 'icinga_state_reason ' ,
98
102
'yaml ' ,
99
103
'created '
100
104
];
Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ protected function assemble(): void
56
56
$ this ->translate ('Successful Jobs History Limit ' ) => $ this ->cronJob ->successful_jobs_history_limit ,
57
57
$ this ->translate ('Failed Jobs History Limit ' ) => $ this ->cronJob ->failed_jobs_history_limit ,
58
58
$ this ->translate ('Last Successful Time ' ) => $ lastSuccessfulTime ,
59
- $ this ->translate ('Last Schedule Time ' ) => $ lastScheduleTime
59
+ $ this ->translate ('Last Schedule Time ' ) => $ lastScheduleTime ,
60
+ $ this ->translate ('Icinga State ' ) => new DetailState ($ this ->cronJob ->icinga_state ),
61
+ $ this ->translate ('Icinga State Reason ' ) => new IcingaStateReason (
62
+ $ this ->cronJob ->icinga_state_reason
63
+ )
60
64
])),
61
65
new Labels ($ this ->cronJob ->label ),
62
66
new Annotations ($ this ->cronJob ->annotation ),
Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ class CronJobListItem extends BaseListItem
31
31
32
32
protected function assembleCaption (BaseHtmlElement $ caption ): void
33
33
{
34
- // TODO add state reason then replace function by DefaultListItemCaption trait
35
- $ caption ->addHtml (new Text ('Placeholder for Icinga State Reason ' ));
34
+ $ caption ->addHtml (new Text ($ this ->item ->icinga_state_reason ));
36
35
}
37
36
38
37
protected function assembleFooter (BaseHtmlElement $ footer ): void
@@ -87,7 +86,7 @@ protected function assembleVisual(BaseHtmlElement $visual): void
87
86
};
88
87
89
88
// TODO add icinga state then replace function by DefaultListItemVisual trait
90
- $ visual ->addHtml (new StateBall (' none ' , $ size ));
89
+ $ visual ->addHtml (new StateBall ($ this -> item -> icinga_state , $ size ));
91
90
92
91
if ($ this ->getViewMode () === ViewModeSwitcher::VIEW_MODE_MINIMAL ) {
93
92
return ;
You can’t perform that action at this time.
0 commit comments