19 declare(strict_types=1);
33 public function __construct(
object $a_parent_obj,
string $a_parent_cmd =
'')
35 $this->
setId(
'sc_groups');
39 $this->
renderer = $DIC->ui()->renderer();
40 $this->uiFactory = $DIC->ui()->factory();
43 public function init(): void
45 $this->
lng->loadLanguageModule(
'sysc');
46 $this->
addColumn($this->
lng->txt(
'title'),
'title',
'60%');
47 $this->
addColumn($this->
lng->txt(
'last_update'),
'last_update_sort',
'20%');
48 $this->
addColumn($this->
lng->txt(
'sysc_completed_num'),
'completed',
'10%');
49 $this->
addColumn($this->
lng->txt(
'sysc_failed_num'),
'failed',
'10%');
54 $this->
setRowTemplate(
'tpl.syscheck_groups_row.html',
'components/ILIAS/SystemCheck');
58 protected function fillRow(array $a_set): void
60 $this->tpl->setVariable(
'VAL_TITLE', (
string) ($a_set[
'title'] ??
''));
62 $id = (
int) ($a_set[
'id'] ?? 0);
64 $this->tpl->setVariable(
66 $this->
ctrl->getLinkTarget($this->getParentObject(),
'showGroup')
69 $this->tpl->setVariable(
'VAL_DESC', (
string) ($a_set[
'description'] ??
''));
70 $this->tpl->setVariable(
'VAL_LAST_UPDATE', (
string) ($a_set[
'last_update'] ??
''));
71 $this->tpl->setVariable(
'VAL_COMPLETED', (
int) ($a_set[
'completed'] ?? 0));
72 $this->tpl->setVariable(
'VAL_FAILED', (
int) ($a_set[
'failed'] ?? 0));
74 switch ($a_set[
'status']) {
76 $this->tpl->setVariable(
'STATUS_CLASS',
'smallgreen');
79 $this->tpl->setVariable(
'STATUS_CLASS',
'warning');
85 $dropDownItems = array(
86 $this->uiFactory->button()->shy(
87 $this->
lng->txt(
'show'),
91 $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
92 ->withLabel($this->
lng->txt(
'actions'));
94 $this->tpl->setVariable(
'ACTIONS', $this->
renderer->render($dropDown));
103 $item[
'id'] = $group->getId();
107 $item[
'title'] = $task_gui->getGroupTitle();
108 $item[
'description'] = $task_gui->getGroupDescription();
109 $item[
'status'] = $group->getStatus();
116 $item[
'last_update_sort'] = $last_update->get(
IL_CAL_UNIX);
setFormAction(string $a_form_action, bool $a_multipart=false)
static lookupLastUpdate(int $a_grp_id)
static lookupFailed(int $a_grp_id)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(object $a_parent_obj, string $a_parent_cmd='')
static lookupCompleted(int $a_grp_id)
__construct(Container $dic, ilPlugin $plugin)
Table GUI for system check groups overview.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static getComponentTaskGUIForGroup(int $a_group_id, ?int $a_task_id=null)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)