formatter: [
{css_class: 'size', format_func: function(val) { return Units.get_formatted_size(val); }},
{css_class: 'time', format_func: function(val) { return Units.format_time_period(val); }},
- {css_class: 'datetime', format_func: function(val) { return Units.format_date_str(val); }}
+ {css_class: 'datetime', format_func: function(val) { return Units.format_date_str(val); }},
+ {css_class: 'udatetime', format_func: function(val) { return Units.format_date(val); }}
],
set_formatters: function() {
var elements, formatter, txt, val;
msgid "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
msgstr "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
+
+msgid "State"
+msgstr "State"
+
+msgid "saved"
+msgstr "saved"
+
+msgid "deleted"
+msgstr "deleted"
msgid "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
msgstr "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
+
+msgid "State"
+msgstr "State"
+
+msgid "saved"
+msgstr "saved"
+
+msgid "deleted"
+msgstr "deleted"
msgid "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
msgstr "Z tą opcją są przeszukiwane pliki z nazwą równą dostarczonej nazwie pliku, w przeciwnym razie są wyszukiwane pliki z nazwami zawierającymi podaną nazwę pliku, np. *nazwapliku*."
+
+msgid "State"
+msgstr "Stan"
+
+msgid "saved"
+msgstr "zapisany"
+
+msgid "deleted"
+msgstr "skasowany"
msgid "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
msgstr "With this option are searched files with names equal provided filename, otherwise there are searched files with names containing provided filename like *filename*."
+
+msgid "State"
+msgstr "State"
+
+msgid "saved"
+msgstr "saved"
+
+msgid "deleted"
+msgstr "deleted"
* Bacula(R) - The Network Backup Solution
* Baculum - Bacula web interface
*
- * Copyright (C) 2013-2019 Kern Sibbald
+ * Copyright (C) 2013-2020 Kern Sibbald
*
* The main author of Baculum is Marcin Haba.
* The original author of Bacula is Kern Sibbald, with contributions
if (!empty($this->FileListSearch->Text)) {
$params['search'] = $this->FileListSearch->Text;
}
+ $params['details'] = '1';
$query = '?' . http_build_query($params);
$result = $this->getModule('api')->get(
array('jobs', $this->getJobId(), 'files', $query)
);
if ($result->error === 0) {
- $file_list = $result->output->items;
+ $file_list = $result->output;
if (!empty($this->FileListSearch->Text)) {
- $file_list = $this->findFileListItems($file_list, $this->FileListSearch->Text);
+ $this->findFileListItems($file_list, $this->FileListSearch->Text);
}
$this->FileList->DataSource = $file_list;
$this->FileList->dataBind();
- $this->FileListCount->Text = $result->output->total;
+ $this->FileListCount->Text = count($file_list);
} else {
$this->FileList->DataSource = array();
$this->FileList->dataBind();
}
}
- private function findFileListItems($file_list, $keyword) {
- $result = array();
+ private function findFileListItems(&$file_list, $keyword) {
for ($i = 0; $i < count($file_list); $i++) {
- $pos = stripos($file_list[$i], $keyword);
- $str1 = substr($file_list[$i], 0, $pos);
+ $pos = stripos($file_list[$i]->file, $keyword);
+ $str1 = substr($file_list[$i]->file, 0, $pos);
$key_len = strlen($keyword);
- $key = substr($file_list[$i], $pos, $key_len);
- $str2 = substr($file_list[$i], ($pos + $key_len));
- $result[] = $str1 . '<strong class="w3-text-red">' . $key . '</strong>' . $str2;
+ $key = substr($file_list[$i]->file, $pos, $key_len);
+ $str2 = substr($file_list[$i]->file, ($pos + $key_len));
+ $file_list[$i]->file = $str1 . '<strong class="w3-text-red">' . $key . '</strong>' . $str2;
}
- return $result;
}
/**
<div id="job_list_files_no_result" class="w3-panel w3-center" style="display: none"><strong><%[ No item result ]%></strong></div>
<com:TActiveRepeater ID="FileList">
<prop:HeaderTemplate>
- <ul>
+ <table class="w3-table w3-striped w3-white w3-margin-bottom dataTable dtr-column" style="table-layout: fixed">
+ <thead>
+ <tr class="row">
+ <th class="w3-center w3-hide-small" style="width: 65px"><%[ Attributes ]%></th>
+ <th class="w3-center w3-hide-small" style="width: 39px; padding: 10px 3px">UID</th>
+ <th class="w3-center w3-hide-small" style="width: 39px; padding: 10px 3px">GID</th>
+ <th class="w3-center w3-hide-small" style="width: 40px">Size</th>
+ <th class="w3-center w3-hide-small" style="width: 125px">MTIME</th>
+ <th class="w3-center"><%[ File ]%></th>
+ <th class="w3-center w3-hide-small" style="width: 50px"><%[ State ]%></th>
+ </tr>
+ </thead>
</prop:HeaderTemplate>
<prop:ItemTemplate>
- <li><%=$this->Data%></li>
+ <tr class="row">
+ <td class="w3-hide-small"><%#$this->Data->lstat->mode%></td>
+ <td class="w3-center w3-hide-small"><%#$this->Data->lstat->uid%></td>
+ <td class="w3-center w3-hide-small"><%#$this->Data->lstat->gid%></td>
+ <td class="w3-hide-small"><span class="size w3-right"><%#$this->Data->lstat->size%></span></td>
+ <td class="udatetime w3-hide-small"><%#$this->Data->lstat->mtime%></td>
+ <td style="word-wrap: break-word"><%#$this->Data->file%></td>
+ <td class="<%#$this->Data->fileindex > 0 ? 'w3-text-green' : 'w3-text-orange'%> w3-center w3-hide-small"><strong><%#$this->Data->fileindex > 0 ? Prado::localize('saved') : Prado::localize('deleted')%></strong></td>
+ </tr>
</prop:ItemTemplate>
<prop:FooterTemplate>
- </ul>
+ </table>
</prop:FooterTemplate>
</com:TActiveRepeater>
</div>
ID="LoadJobFileList"
OnCallback="loadFileList"
ClientSide.OnLoading="show_job_list_files_loader(true)"
- ClientSide.OnComplete="job_list_files_msg(); show_job_list_files_loader(false)"
+ ClientSide.OnComplete="job_list_files_msg(); show_job_list_files_loader(false); Formatters.set_formatters();"
/>
<script>
function get_job_list_files(page_direction) {