5 require_once(
"./Services/Table/classes/class.ilTable2GUI.php");
6 require_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
31 parent::__construct(null,
"");
32 $this->
setTitle($lng->txt(
"background_tasks"));
36 $this->
addColumn($this->lng->txt(
"name"),
"");
37 $this->
addColumn($this->lng->txt(
"id"),
"");
38 $this->
addColumn($this->lng->txt(
"bt_available"),
"");
39 $this->
addColumn($this->lng->txt(
"running_tasks"),
"");
40 $this->
addColumn($this->lng->txt(
"waiting_tasks"),
"");
41 $this->
addColumn($this->lng->txt(
"actions"),
"");
66 $clientlist =
new ilClientList($this->setup->db_connections);
67 $list = $clientlist->getClients();
72 $client_name = (
$client->getName()) ?
$client->getName() :
"<" . $lng->txt(
"no_client_name") .
">";
81 $bt_available =
false;
85 "name" => $client_name,
86 "desc" =>
$client->getDescription(),
88 "running_tasks" => $running_tasks,
89 "waiting_tasks" => $waiting_tasks,
90 "bt_available" => $bt_available
105 $this->tpl->setVariable(
"NAME", $a_set[
"name"]);
106 $this->tpl->setVariable(
"DESC", $a_set[
"desc"]);
107 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
108 $this->tpl->setVariable(
"RUNNING_TASKS", $a_set[
"running_tasks"]);
109 $this->tpl->setVariable(
"WAITING_TASKS", $a_set[
"waiting_tasks"]);
110 $this->tpl->setVariable(
"BT_AVAILABLE", $a_set[
"bt_available"] ? $this->lng->txt(
"yes") : $this->lng->txt(
"no"));
113 if ($a_set[
"bt_available"]) {
114 $adv->addItem($this->lng->txt(
"kill_waiting_tasks"),
"",
"setup.php?cmd=kill_waiting_tasks&client_id=" . $a_set[
"id"]);
117 $this->tpl->setVariable(
"ACTIONS", $adv->getHTML());
129 return BucketContainer::where([
"state" => State::RUNNING])->count();
135 return BucketContainer::where([
"state" => State::SCHEDULED])->count();
142 BucketContainer::where(
"TRUE")->first();
if(isset($_REQUEST['delete'])) $list
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
fillRow($a_set)
Fill table row.
__construct($setup)
ilBackgroundTaskTableGUI constructor.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilBackgroundTaskTableGUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.
setLimit($a_limit=0, $a_default_limit=0)