]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add copy, CSV and column visibility buttons to tables
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 22 Feb 2020 18:14:51 +0000 (19:14 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 22 Feb 2020 20:45:10 +0000 (21:45 +0100)
23 files changed:
gui/baculum/protected/Web/JavaScript/misc.js
gui/baculum/protected/Web/Lang/en/messages.mo
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.mo
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.mo
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.mo
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Pages/ClientList.page
gui/baculum/protected/Web/Pages/ClientView.page
gui/baculum/protected/Web/Pages/FileSetList.page
gui/baculum/protected/Web/Pages/JobHistoryList.page
gui/baculum/protected/Web/Pages/JobList.page
gui/baculum/protected/Web/Pages/JobView.page
gui/baculum/protected/Web/Pages/PoolList.page
gui/baculum/protected/Web/Pages/PoolView.page
gui/baculum/protected/Web/Pages/ScheduleList.page
gui/baculum/protected/Web/Pages/StorageList.page
gui/baculum/protected/Web/Pages/VolumeList.page
gui/baculum/protected/Web/Pages/VolumeView.page
gui/baculum/protected/Web/Portlets/StatusSchedule.tpl
gui/baculum/themes/Baculum-v2/css/baculum.css

index 25521d4c0170d8e710b9deba94e1a94e919b2e7c..020dff3ce3e82f3fc8b2e281d0a56c1faba5fd0f 100644 (file)
@@ -1106,6 +1106,17 @@ function update_job_table(table_obj, new_data) {
        }
 }
 
+/**
+ * Used to escape values before putting them into regular expression.
+ * Dedicated to use in table values.
+ */
+dtEscapeRegex = function(value) {
+       if (typeof(value) != 'string' && typeof(value.toString) == 'function') {
+               value = value.toString();
+       }
+       return $.fn.dataTable.util.escapeRegex(value);
+};
+
 $(function() {
        W3SideBar.init();
        set_sbbr_compatibility();
index 916d3f1bb898aea92659626234b6e60ab673fe8f..f07a72705eb783cd83ebc36a9bb50c2f4d59d82c 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ
index f78bc5b3632bfe6f68d0220e45ab668f7471bab0..154e18560786504ac7230078ff24ccd4886be397 100644 (file)
@@ -2524,3 +2524,93 @@ msgstr "Create new resource"
 
 msgid "The resource has been created successfully."
 msgstr "The resource has been created successfully."
+
+msgid "Scheduled time"
+msgstr "Scheduled time"
+
+msgid "Real end time"
+msgstr "Real end time"
+
+msgid "Read bytes"
+msgstr "Read bytes"
+
+msgid "Job errors"
+msgstr "Job errors"
+
+msgid "Job missing files"
+msgstr "Job missing files"
+
+msgid "Purged files"
+msgstr "Purged files"
+
+msgid "Has base"
+msgstr "Has base"
+
+msgid "Reviewed"
+msgstr "Reviewed"
+
+msgid "Comment"
+msgstr "Comment"
+
+msgid "File table"
+msgstr "File table"
+
+msgid "Label date"
+msgstr "Label date"
+
+msgid "Vol. blocks"
+msgstr "Vol. blocks"
+
+msgid "Vol. abytes"
+msgstr "Vol. abytes"
+
+msgid "Vol. apadding"
+msgstr "Vol. apadding"
+
+msgid "Vol. hole bytes"
+msgstr "Vol. hole bytes"
+
+msgid "Vol. holes"
+msgstr "Vol. holes"
+
+msgid "Vol. parts"
+msgstr "Vol. parts"
+
+msgid "Vol. writes"
+msgstr "Vol. writes"
+
+msgid "Vol. capacity bytes"
+msgstr "Vol. capacity bytes"
+
+msgid "Storage"
+msgstr "Storage"
+
+msgid "Media addressing"
+msgstr "Media addressing"
+
+msgid "Vol. read time"
+msgstr "Vol. read time"
+
+msgid "Vol. write time"
+msgstr "Vol. write time"
+
+msgid "End file"
+msgstr "End file"
+
+msgid "End block"
+msgstr "End block"
+
+msgid "Initial write"
+msgstr "Initial write"
+
+msgid "Vol. type"
+msgstr "Vol. type"
+
+msgid "Vol. cloud parts"
+msgstr "Vol. cloud parts"
+
+msgid "Last part bytes"
+msgstr "Last part bytes"
+
+msgid "Cache retention"
+msgstr "Cache retention"
index c09a299fb9ff3056463dc1acee5840fc270f7329..a9ee1e6346062610fa9635e44cfcc1693ed2574f 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ
index 9de7ea6a950bdd8f6d7f0e008fe8a7bd8df0aa0b..35e385f333f8d244183a949d62acd90b1417beb9 100644 (file)
@@ -2610,3 +2610,93 @@ msgstr "Create new resource"
 
 msgid "The resource has been created successfully."
 msgstr "The resource has been created successfully."
+
+msgid "Scheduled time"
+msgstr "Scheduled time"
+
+msgid "Real end time"
+msgstr "Real end time"
+
+msgid "Read bytes"
+msgstr "Read bytes"
+
+msgid "Job errors"
+msgstr "Job errors"
+
+msgid "Job missing files"
+msgstr "Job missing files"
+
+msgid "Purged files"
+msgstr "Purged files"
+
+msgid "Has base"
+msgstr "Has base"
+
+msgid "Reviewed"
+msgstr "Reviewed"
+
+msgid "Comment"
+msgstr "Comment"
+
+msgid "File table"
+msgstr "File table"
+
+msgid "Label date"
+msgstr "Label date"
+
+msgid "Vol. blocks"
+msgstr "Vol. blocks"
+
+msgid "Vol. abytes"
+msgstr "Vol. abytes"
+
+msgid "Vol. apadding"
+msgstr "Vol. apadding"
+
+msgid "Vol. hole bytes"
+msgstr "Vol. hole bytes"
+
+msgid "Vol. holes"
+msgstr "Vol. holes"
+
+msgid "Vol. parts"
+msgstr "Vol. parts"
+
+msgid "Vol. writes"
+msgstr "Vol. writes"
+
+msgid "Vol. capacity bytes"
+msgstr "Vol. capacity bytes"
+
+msgid "Storage"
+msgstr "Storage"
+
+msgid "Media addressing"
+msgstr "Media addressing"
+
+msgid "Vol. read time"
+msgstr "Vol. read time"
+
+msgid "Vol. write time"
+msgstr "Vol. write time"
+
+msgid "End file"
+msgstr "End file"
+
+msgid "End block"
+msgstr "End block"
+
+msgid "Initial write"
+msgstr "Initial write"
+
+msgid "Vol. type"
+msgstr "Vol. type"
+
+msgid "Vol. cloud parts"
+msgstr "Vol. cloud parts"
+
+msgid "Last part bytes"
+msgstr "Last part bytes"
+
+msgid "Cache retention"
+msgstr "Cache retention"
index 2e19b42c0807d2622452d64401c2e4d5e8f5a6c3..30307a968a8c85f05462e78abbebfce6944b4609 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ
index f459b4b24978be0b50464af98dbb10d0d29aa7c8..d28f8ca4737c4a1847fea07034c09b6c4f47c3e1 100644 (file)
@@ -2533,3 +2533,92 @@ msgstr "Tworzenie nowego zasobu"
 msgid "The resource has been created successfully."
 msgstr "Zasób został utworzony pomyślnie."
 
+msgid "Scheduled time"
+msgstr "Scheduled time"
+
+msgid "Real end time"
+msgstr "Real end time"
+
+msgid "Read bytes"
+msgstr "Przeczyt. bajtów"
+
+msgid "Job errors"
+msgstr "Błędy zadania"
+
+msgid "Job missing files"
+msgstr "Brak. pliki zad."
+
+msgid "Purged files"
+msgstr "Wyczy. plików"
+
+msgid "Has base"
+msgstr "Ma bazę"
+
+msgid "Reviewed"
+msgstr "Przejrzane"
+
+msgid "Comment"
+msgstr "Komentarz"
+
+msgid "File table"
+msgstr "Tabela plików"
+
+msgid "Label date"
+msgstr "Data etykiety"
+
+msgid "Vol. blocks"
+msgstr "Bloki wol."
+
+msgid "Vol. abytes"
+msgstr "abytes wol."
+
+msgid "Vol. apadding"
+msgstr "Apadding wol."
+
+msgid "Vol. hole bytes"
+msgstr "Bajtów dziur wol."
+
+msgid "Vol. holes"
+msgstr "Dziur wol."
+
+msgid "Vol. parts"
+msgstr "Części wol."
+
+msgid "Vol. writes"
+msgstr "Zapisów wol."
+
+msgid "Vol. capacity bytes"
+msgstr "Pojemność wol."
+
+msgid "Storage"
+msgstr "Magazyn"
+
+msgid "Media addressing"
+msgstr "Adresowanie mediów"
+
+msgid "Vol. read time"
+msgstr "Czas czytania wol."
+
+msgid "Vol. write time"
+msgstr "Czas zapisu na wol."
+
+msgid "End file"
+msgstr "Koniec pliku"
+
+msgid "End block"
+msgstr "Koniec bloku"
+
+msgid "Initial write"
+msgstr "Wstępny zapis"
+
+msgid "Vol. type"
+msgstr "Typ wol."
+
+msgid "Vol. cloud parts"
+msgstr "Części wol. cloud"
+
+msgid "Last part bytes"
+msgstr "Bajtów ostatniej części"
+
+msgid "Cache retention"
+msgstr "Retencja cache"
index e73c4483f07346a4f453a2e0e85a04de7b20ec4d..6e0f6aae16633ecf670f07cdfce8518eb8e4611f 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ
index 3185ae97192309bbab687f34770f4577e88d13a1..a7f977b0df877a9743c4af6a94d8493e9ccdcefe 100644 (file)
@@ -2533,3 +2533,92 @@ msgstr "Criar novo recurso"
 msgid "The resource has been created successfully."
 msgstr "O recurso foi criado com sucesso."
 
+msgid "Scheduled time"
+msgstr "Scheduled time"
+
+msgid "Real end time"
+msgstr "Real end time"
+
+msgid "Read bytes"
+msgstr "Read bytes"
+
+msgid "Job errors"
+msgstr "Job errors"
+
+msgid "Job missing files"
+msgstr "Job missing files"
+
+msgid "Purged files"
+msgstr "Purged files"
+
+msgid "Has base"
+msgstr "Has base"
+
+msgid "Reviewed"
+msgstr "Reviewed"
+
+msgid "Comment"
+msgstr "Comment"
+
+msgid "File table"
+msgstr "File table"
+
+msgid "Label date"
+msgstr "Label date"
+
+msgid "Vol. blocks"
+msgstr "Vol. blocks"
+
+msgid "Vol. abytes"
+msgstr "Vol. abytes"
+
+msgid "Vol. apadding"
+msgstr "Vol. apadding"
+
+msgid "Vol. hole bytes"
+msgstr "Vol. hole bytes"
+
+msgid "Vol. holes"
+msgstr "Vol. holes"
+
+msgid "Vol. parts"
+msgstr "Vol. parts"
+
+msgid "Vol. writes"
+msgstr "Vol. writes"
+
+msgid "Vol. capacity bytes"
+msgstr "Vol. capacity bytes"
+
+msgid "Storage"
+msgstr "Storage"
+
+msgid "Media addressing"
+msgstr "Media addressing"
+
+msgid "Vol. read time"
+msgstr "Vol. read time"
+
+msgid "Vol. write time"
+msgstr "Vol. write time"
+
+msgid "End file"
+msgstr "End file"
+
+msgid "End block"
+msgstr "End block"
+
+msgid "Initial write"
+msgstr "Initial write"
+
+msgid "Vol. type"
+msgstr "Vol. type"
+
+msgid "Vol. cloud parts"
+msgstr "Vol. cloud parts"
+
+msgid "Last part bytes"
+msgstr "Last part bytes"
+
+msgid "Cache retention"
+msgstr "Cache retention"
index 23e190792d12e5f4db78849d1515d2cf3fea7573..12916074531957634f331bc55f3885eedd176af5 100644 (file)
@@ -51,6 +51,11 @@ var oClientList = {
                var table = $('#' + this.ids.client_list).DataTable({
                        data: oData.clients,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -131,7 +136,7 @@ var oClientList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -142,12 +147,20 @@ var oClientList = {
                                                column.data().unique().sort(sort_natural).each(function (d, j) {
                                                        var time = Units.format_time_period(d);
                                                        var time_f = time.value + ' ' + time.format + ((time.value > 0) ? 's': '');
-                                                       select.append('<option value="' + time_f + '">' + time_f + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(time_f) + '$') {
+                                                               select.append('<option value="' + time_f + '" selected>' + time_f + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + time_f + '">' + time_f + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
                                                        if (d) {
-                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                               if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                                       select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                               } else {
+                                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                               }
                                                        }
                                                });
                                        }
index 8d8522ba2c9211653fc76c655af5dc4653208e95..262ab9200969f11b44b61b7aae0b237154da18b2 100644 (file)
@@ -537,11 +537,31 @@ oGraphicalClientStatus.init();
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </thead>
@@ -553,11 +573,31 @@ oGraphicalClientStatus.init();
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </tfoot>
@@ -583,6 +623,11 @@ var oJobForClientList = {
                this.table = $('#' + this.ids.job_list).DataTable({
                        data: this.data,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -601,11 +646,57 @@ var oJobForClientList = {
                                {
                                        data: 'level',
                                        render: function(data, type, row) {
-                                               return JobLevel.get_level(data);
+                                               return (['R', 'D'].indexOf(row.type) === -1 ? JobLevel.get_level(data) : '-');
                                        }
                                },
+                               {
+                                       data: 'clientid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'client',
+                                       visible: false
+                               },
+                               {
+                                       data: 'schedtime',
+                                       visible: false
+                               },
                                {data: 'starttime'},
                                {data: 'endtime'},
+                               {
+                                       data: 'realendtime',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobtdate',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessionid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessiontime',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
                                {
                                        data: 'jobstatus',
                                        render: function (data, type, row) {
@@ -631,7 +722,68 @@ var oJobForClientList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'readbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
                                {data: 'jobfiles'},
+                               {
+                                       data: 'joberrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobmissingfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'poolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'pool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filesetid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'fileset',
+                                       visible: false
+                               },
+                               {
+                                       data: 'priorjobid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'purgedfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'hasbase',
+                                       visible: false
+                               },
+                               {
+                                       data: 'reviewed',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filetable',
+                                       visible: false
+                               },
                                {
                                        data: 'jobid',
                                        render: function (data, type, row) {
@@ -659,35 +811,48 @@ var oJobForClientList = {
                                orderable: false,
                                targets: 0
                        },
+                       {
+                               className: 'action_col',
+                               orderable: false,
+                               targets: [ 30 ]
+                       },
                        {
                                className: "dt-center",
-                               targets: [ 1, 3, 4, 5, 6, 7, 9, 10 ]
+                               targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ]
                        },
                        {
                                className: "dt-body-right",
-                               targets: [ 8 ]
+                               targets: [ 15, 16 ]
                        }],
                        order: [1, 'desc'],
                        initComplete: function () {
-                               this.api().columns([2, 3, 4, 7]).every(function () {
+                               this.api().columns([2, 3, 4, 14]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
                                                .search(val ? '^' + val + '$' : '', true, false)
                                                .draw();
                                        });
-                                       if (column[0][0] == 7) {
+                                       if (column[0][0] == 14) {
                                                column.data().unique().sort().each(function (d, j) {
-                                                       select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index 31a579a082e8c5d823eb716db39dbf401c27d6e6..72dbdddea05956d7219308aba2b54d757515fffa 100644 (file)
@@ -10,7 +10,7 @@
                <button type="button" class="w3-button w3-green<%=empty($_SESSION['dir']) ? ' hide': ''%>" onclick="document.location.href='<%=$this->Service->constructUrl('NewResource', array('component_type' => 'dir', 'component_name' => $_SESSION['dir'], 'resource_type' => 'Fileset'))%>';"><i class="fa fa-plus"></i> &nbsp;<%[ Add fileset ]%></button>
        </div>
        <div class="w3-container">
-               <table id="fileset_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom">
+               <table id="fileset_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom" style="width: 100%">
                        <thead>
                                <tr>
                                        <th></th>
@@ -43,6 +43,11 @@ var oFileSetList = {
                var table = $('#' + this.ids.fileset_list).DataTable({
                        data: <%=json_encode($this->filesets)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -90,7 +95,7 @@ var oFileSetList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -98,7 +103,11 @@ var oFileSetList = {
                                                .draw();
                                        });
                                        column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                               if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                       select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                               } else {
+                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                               }
                                        });
                                });
                        }
index c60a58e5c27d75f2edea727b3a08ecb26d51ac16..01f3b0907a1fec25da702c8b002c834f2dc815a0 100644 (file)
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </thead>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </tfoot>
@@ -80,6 +120,11 @@ var oJobList = {
                this.table = $('#' + this.ids.job_list).DataTable({
                        data: this.data,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -101,8 +146,54 @@ var oJobList = {
                                                return (['R', 'D'].indexOf(row.type) === -1 ? JobLevel.get_level(data) : '-');
                                        }
                                },
+                               {
+                                       data: 'clientid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'client',
+                                       visible: false
+                               },
+                               {
+                                       data: 'schedtime',
+                                       visible: false
+                               },
                                {data: 'starttime'},
                                {data: 'endtime'},
+                               {
+                                       data: 'realendtime',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobtdate',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessionid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessiontime',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
                                {
                                        data: 'jobstatus',
                                        render: function (data, type, row) {
@@ -128,7 +219,68 @@ var oJobList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'readbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
                                {data: 'jobfiles'},
+                               {
+                                       data: 'joberrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobmissingfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'poolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'pool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filesetid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'fileset',
+                                       visible: false
+                               },
+                               {
+                                       data: 'priorjobid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'purgedfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'hasbase',
+                                       visible: false
+                               },
+                               {
+                                       data: 'reviewed',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filetable',
+                                       visible: false
+                               },
                                {
                                        data: 'jobid',
                                        render: function (data, type, row) {
@@ -187,37 +339,45 @@ var oJobList = {
                        {
                                className: 'action_col',
                                orderable: false,
-                               targets: [ 10 ]
+                               targets: [ 30 ]
                        },
                        {
                                className: "dt-center",
-                               targets: [ 1, 3, 4, 5, 6, 7, 9, 10 ]
+                               targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ]
                        },
                        {
                                className: "dt-body-right",
-                               targets: [ 8 ]
+                               targets: [ 15, 16 ]
                        }],
                        order: [1, 'desc'],
                        initComplete: function () {
-                               this.api().columns([2, 3, 4, 7]).every(function () {
+                               this.api().columns([2, 3, 4, 5, 14]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
                                                .search(val ? '^' + val + '$' : '', true, false)
                                                .draw();
                                        });
-                                       if (column[0][0] == 7) {
+                                       if (column[0][0] == 14) {
                                                column.data().unique().sort().each(function (d, j) {
-                                                       select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index d26d7dd72f2e39201c5ca82ffed8367d178da72a..180142230ce482e19cb71246746d67181316b898 100644 (file)
@@ -52,6 +52,11 @@ var oJobHistoryList = {
                var table = $('#' + this.ids.job_history_list).DataTable({
                        data: <%=json_encode($this->jobs)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -99,7 +104,7 @@ var oJobHistoryList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -107,7 +112,11 @@ var oJobHistoryList = {
                                                .draw();
                                        });
                                        column.data().unique().sort().each(function (d, j) {
-                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                               if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                       select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                               } else {
+                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                               }
                                        });
                                });
                        }
index 87c986204f0a97380da6d5ea673bdd5691ad247b..611788c47ed0413bead565d9c70d85d19ed49e89 100644 (file)
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </thead>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </tfoot>
@@ -129,6 +169,11 @@ var oJobHistoryList = {
                this.table = $('#' + this.ids.job_list).DataTable({
                        data: this.data,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -147,11 +192,57 @@ var oJobHistoryList = {
                                {
                                        data: 'level',
                                        render: function(data, type, row) {
-                                               return JobLevel.get_level(data);
+                                               return (['R', 'D'].indexOf(row.type) === -1 ? JobLevel.get_level(data) : '-');
                                        }
                                },
+                               {
+                                       data: 'clientid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'client',
+                                       visible: false
+                               },
+                               {
+                                       data: 'schedtime',
+                                       visible: false
+                               },
                                {data: 'starttime'},
                                {data: 'endtime'},
+                               {
+                                       data: 'realendtime',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobtdate',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessionid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessiontime',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
                                {
                                        data: 'jobstatus',
                                        render: function (data, type, row) {
@@ -177,7 +268,68 @@ var oJobHistoryList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'readbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
                                {data: 'jobfiles'},
+                               {
+                                       data: 'joberrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobmissingfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'poolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'pool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filesetid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'fileset',
+                                       visible: false
+                               },
+                               {
+                                       data: 'priorjobid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'purgedfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'hasbase',
+                                       visible: false
+                               },
+                               {
+                                       data: 'reviewed',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filetable',
+                                       visible: false
+                               },
                                {
                                        data: 'jobid',
                                        render: function (data, type, row) {
@@ -205,35 +357,48 @@ var oJobHistoryList = {
                                orderable: false,
                                targets: 0
                        },
+                       {
+                               className: 'action_col',
+                               orderable: false,
+                               targets: [ 30 ]
+                       },
                        {
                                className: "dt-center",
-                               targets: [ 1, 3, 4, 5, 6, 7, 9, 10 ]
+                               targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ]
                        },
                        {
                                className: "dt-body-right",
-                               targets: [ 8 ]
+                               targets: [ 15, 16 ]
                        }],
                        order: [1, 'desc'],
                        initComplete: function () {
-                               this.api().columns([3, 4, 7]).every(function () {
+                               this.api().columns([3, 4, 5, 14]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
                                                .search(val ? '^' + val + '$' : '', true, false)
                                                .draw();
                                        });
-                                       if (column[0][0] == 7) {
+                                       if (column[0][0] == 14) {
                                                column.data().unique().sort().each(function (d, j) {
-                                                       select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index ef219b7b7893debf48642d2875643a12c8e499ac..2347542278062de698167682679d2f64f41f77e6 100644 (file)
@@ -53,6 +53,11 @@ var oPoolList = {
                var table = $('#' + this.ids.pool_list).DataTable({
                        data: oData.pools,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -131,7 +136,7 @@ var oPoolList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -140,17 +145,29 @@ var oPoolList = {
                                        });
                                        if ([3, 4].indexOf(column[0][0]) !== -1) {
                                                column.cells('', column[0]).render('display').unique().sort(sort_natural).each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else if (column[0][0] == 5) {
                                                column.data().unique().sort(sort_natural).each(function (d, j) {
                                                        var time = Units.format_time_period(d);
                                                        var time_f = time.value + ' ' + time.format + ((time.value > 0) ? 's': '');
-                                                       select.append('<option value="' + time_f + '">' + time_f + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(time_f) + '$') {
+                                                               select.append('<option value="' + time_f + '" selected>' + time_f + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + time_f + '">' + time_f + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index bd63924816f4656ca761579cf9e62fdf12239b1f..56c5035c77e5affba1f5c00417a188f9ca000344 100644 (file)
                                        <th>MediaId</th>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Slot ]%></th>
+                                       <th>PoolId</th>
+                                       <th><%[ Pool ]%></th>
                                        <th>InChanger</th>
+                                       <th>StorageId</th>
+                                       <th><%[ Storage ]%></th>
+                                       <th>DeviceId</th>
                                        <th><%[ Vol. status ]%></th>
+                                       <th><%[ Enabled ]%></th>
+                                       <th><%[ Recycle ]%></th>
                                        <th>MediaType</th>
+                                       <th>MediaTypeId</th>
+                                       <th>LabelType</th>
+                                       <th><%[ First written ]%></th>
                                        <th><%[ Last written ]%></th>
-                                       <th><%[ Vol. jobs ]%></th>
                                        <th><%[ Vol. bytes ]%></th>
+                                       <th><%[ Max. vol. bytes ]%></th>
+                                       <th><%[ Max. vol. jobs ]%></th>
+                                       <th><%[ Max. vol. files ]%></th>
+                                       <th><%[ Vol. capacity bytes ]%></th>
+                                       <th><%[ Vol. abytes ]%></th>
+                                       <th><%[ Vol. apadding ]%></th>
+                                       <th><%[ Vol. hole bytes ]%></th>
+                                       <th><%[ Vol. holes ]%></th>
+                                       <th><%[ Vol. parts ]%></th>
+                                       <th><%[ Vol. errors ]%></th>
+                                       <th><%[ Vol. writes ]%></th>
+                                       <th><%[ Label date ]%></th>
+                                       <th><%[ Vol. jobs ]%></th>
+                                       <th><%[ Vol. files ]%></th>
+                                       <th><%[ Vol. blocks ]%></th>
+                                       <th><%[ Vol. mounts ]%></th>
+                                       <th><%[ Action on purge ]%></th>
+                                       <th><%[ Vol. retention ]%></th>
+                                       <th><%[ Cache retention ]%></th>
+                                       <th><%[ Vol. use duration ]%></th>
+                                       <th><%[ Media addressing ]%></th>
+                                       <th><%[ Vol. read time ]%></th>
+                                       <th><%[ Vol. write time ]%></th>
+                                       <th><%[ Vol. type ]%></th>
+                                       <th><%[ Vol. cloud parts ]%></th>
+                                       <th><%[ Last part bytes ]%></th>
+                                       <th><%[ End file ]%></th>
+                                       <th><%[ End block ]%></th>
+                                       <th>LocationId</th>
+                                       <th><%[ Recycle count ]%></th>
+                                       <th><%[ Initial write ]%></th>
+                                       <th>ScratchPoolId</th>
+                                       <th><%[ Scratch pool ]%></th>
+                                       <th>RecyclePoolId</th>
+                                       <th><%[ Recycle pool ]%></th>
+                                       <th><%[ Comment ]%></th>
+                                       <th><%[ When expire ]%></th>
                                        <th><%[ Actions ]%></th>
                                </tr>
                        </thead>
                                        <th>MediaId</th>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Slot ]%></th>
+                                       <th>PoolId</th>
+                                       <th><%[ Pool ]%></th>
                                        <th>InChanger</th>
+                                       <th>StorageId</th>
+                                       <th><%[ Storage ]%></th>
+                                       <th>DeviceId</th>
                                        <th><%[ Vol. status ]%></th>
+                                       <th><%[ Enabled ]%></th>
+                                       <th><%[ Recycle ]%></th>
                                        <th>MediaType</th>
+                                       <th>MediaTypeId</th>
+                                       <th>LabelType</th>
+                                       <th><%[ First written ]%></th>
                                        <th><%[ Last written ]%></th>
-                                       <th><%[ Vol. jobs ]%></th>
                                        <th><%[ Vol. bytes ]%></th>
+                                       <th><%[ Max. vol. bytes ]%></th>
+                                       <th><%[ Max. vol. jobs ]%></th>
+                                       <th><%[ Max. vol. files ]%></th>
+                                       <th><%[ Vol. capacity bytes ]%></th>
+                                       <th><%[ Vol. abytes ]%></th>
+                                       <th><%[ Vol. apadding ]%></th>
+                                       <th><%[ Vol. hole bytes ]%></th>
+                                       <th><%[ Vol. holes ]%></th>
+                                       <th><%[ Vol. parts ]%></th>
+                                       <th><%[ Vol. errors ]%></th>
+                                       <th><%[ Vol. writes ]%></th>
+                                       <th><%[ Label date ]%></th>
+                                       <th><%[ Vol. jobs ]%></th>
+                                       <th><%[ Vol. files ]%></th>
+                                       <th><%[ Vol. blocks ]%></th>
+                                       <th><%[ Vol. mounts ]%></th>
+                                       <th><%[ Action on purge ]%></th>
+                                       <th><%[ Vol. retention ]%></th>
+                                       <th><%[ Cache retention ]%></th>
+                                       <th><%[ Vol. use duration ]%></th>
+                                       <th><%[ Media addressing ]%></th>
+                                       <th><%[ Vol. read time ]%></th>
+                                       <th><%[ Vol. write time ]%></th>
+                                       <th><%[ Vol. type ]%></th>
+                                       <th><%[ Vol. cloud parts ]%></th>
+                                       <th><%[ Last part bytes ]%></th>
+                                       <th><%[ End file ]%></th>
+                                       <th><%[ End block ]%></th>
+                                       <th>LocationId</th>
+                                       <th><%[ Recycle count ]%></th>
+                                       <th><%[ Initial write ]%></th>
+                                       <th>ScratchPoolId</th>
+                                       <th><%[ Scratch pool ]%></th>
+                                       <th>RecyclePoolId</th>
+                                       <th><%[ Recycle pool ]%></th>
+                                       <th><%[ Comment ]%></th>
+                                       <th><%[ When expire ]%></th>
                                        <th><%[ Actions ]%></th>
                                </tr>
                        </tfoot>
@@ -175,6 +267,11 @@ var oVolumeList = {
                this.table = $('#' + this.ids.volume_list).DataTable({
                        data: <%=json_encode($this->volumes_in_pool)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -184,8 +281,14 @@ var oVolumeList = {
                                },
                                {data: 'mediaid'},
                                {data: 'volumename'},
+                               {data: 'slot'},
                                {
-                                       data: 'slot'
+                                       data: 'poolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'pool',
+                                       visible: false
                                },
                                {
                                        data: 'inchanger',
@@ -193,15 +296,52 @@ var oVolumeList = {
                                                return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
                                        }
                                },
+                               {
+                                       data: 'storageid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'storage',
+                                       visible: false
+                               },
+                               {
+                                       data: 'deviceid',
+                                       visible: false
+                               },
                                {data: 'volstatus'},
+                               {
+                                       data: 'enabled',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'recycle',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
                                {data: 'mediatype'},
+                               {
+                                       data: 'mediatypeid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'labeltype',
+                                       visible: false
+                               },
+                               {
+                                       data: 'firstwritten',
+                                       visible: false
+                               },
                                {data: 'lastwritten'},
-                               {data: 'voljobs'},
                                {
                                        data: 'volbytes',
                                        render: function (data, type, row) {
                                                var s;
-                                               if (type == 'display' || type == 'filter') {
+                                               if (type == 'display') {
                                                        s = Units.get_formatted_size(data)
                                                } else {
                                                        s = data;
@@ -209,6 +349,252 @@ var oVolumeList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'maxvolbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'maxvoljobs',
+                                       visible: false
+                               },
+                               {
+                                       data: 'maxvolfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volcapacitybytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volabytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volapadding',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volholebytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volholes',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volparts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volerrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volwrites',
+                                       visible: false
+                               },
+                               {
+                                       data: 'labeldate',
+                                       visible: false
+                               },
+                               {
+                                       data: 'voljobs',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volblocks',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volmounts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'actiononpurge',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volretention',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'cacheretention',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'voluseduration',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'mediaaddressing',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volreadtime',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volwritetime',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'voltype',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volcloudparts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'lastpartbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'endfile',
+                                       visible: false
+                               },
+                               {
+                                       data: 'endblock',
+                                       visible: false
+                               },
+                               {
+                                       data: 'locationid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclecount',
+                                       visible: false
+                               },
+                               {
+                                       data: 'initialwrite',
+                                       visible: false
+                               },
+                               {
+                                       data: 'scratchpoolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'scratchpool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclepoolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclepool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'whenexpire',
+                                       visible: false
+                               },
                                {
                                        data: 'mediaid',
                                        render: function(data, type, row) {
@@ -238,20 +624,20 @@ var oVolumeList = {
                        },
                        {
                                className: "dt-center",
-                               targets: [ 1, 3, 4, 5, 7, 8, 10 ]
+                               targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 ]
                        },
                        {
                                className: "dt-body-right",
-                               targets: [ 9 ]
+                               targets: [ 18 ]
                        }],
                        order: [3, 'asc'],
                        initComplete: function () {
-                               this.api().columns([2, 3, 4, 5, 6]).every(function () {
+                               this.api().columns([2, 3, 6, 10, 13]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -260,11 +646,19 @@ var oVolumeList = {
                                        });
                                        if (column[0][0] == 3) {
                                                column.cells('', column[0]).render('display').unique().sort(sort_natural).each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index 0f3552321e21f5e99b0b14ad569c89c1757155e4..6d24406f02095828deba591704fdeeaf976188c3 100644 (file)
                                        </tr>
                                </thead>
                                <tbody id="schedule_list_body"></tbody>
+                               <tfoot>
+                                       <tr>
+                                               <th></th>
+                                               <th><%[ Name ]%></th>
+                                               <th class="w3-center"><%[ Actions ]%></th>
+                                       </tr>
+                               </tfoot>
                        </table>
                </table>
        </div>
@@ -36,6 +43,11 @@ var oScheduleList = {
                var table = $('#' + this.ids.schedule_list).DataTable({
                        data: <%=json_encode($this->schedules)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -75,7 +87,29 @@ var oScheduleList = {
                                className: "dt-center",
                                targets: [ 2 ]
                        }],
-                       order: [1, 'asc']
+                       order: [1, 'asc'],
+                       initComplete: function () {
+                               this.api().columns([1]).every(function () {
+                                       var column = this;
+                                       var select = $('<select><option value=""></option></select>')
+                                       .appendTo($(column.footer()).empty())
+                                       .on('change', function () {
+                                               var val = dtEscapeRegex(
+                                                       $(this).val()
+                                               );
+                                               column
+                                               .search(val ? '^' + val + '$' : '', true, false)
+                                               .draw();
+                                       });
+                                       column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
+                                               if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                       select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                               } else {
+                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                               }
+                                       });
+                               });
+                       }
                });
        }
 };
index 8cdbd37b8cbaebc47660ba38ef3967d612d10a4a..d71abc3b70ffa0da2ba318ea0a508852e35cc51d 100644 (file)
@@ -12,7 +12,7 @@
                <button type="button" class="w3-button w3-margin-bottom w3-green<%=empty($_SESSION['sd']) ? ' hide': ''%>" onclick="document.location.href='<%=$this->Service->constructUrl('NewResource', array('component_type' => 'sd', 'component_name' => $_SESSION['sd'], 'resource_type' => 'Autochanger'))%>';"><i class="fa fa-plus"></i> &nbsp;<%[ Add autochanger ]%></button>
        </div>
        <div class="w3-container">
-               <table id="storage_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom">
+               <table id="storage_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom" style="width: 100%">
                        <thead>
                                <tr>
                                        <th></th>
@@ -47,6 +47,11 @@ var oStorageList = {
                var table = $('#' + this.ids.storage_list).DataTable({
                        data: <%=json_encode($this->storages)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -101,7 +106,7 @@ var oStorageList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -109,7 +114,11 @@ var oStorageList = {
                                                .draw();
                                        });
                                        column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                               if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                       select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                               } else {
+                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                               }
                                        });
                                });
                        }
index 72ba97ac2021344bbe848e8ce66e70f62b0888a6..d2d73e3766dbb5d5653fdf5439c92c5d7cedd5c7 100644 (file)
                                        <th>MediaId</th>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Slot ]%></th>
+                                       <th>PoolId</th>
+                                       <th><%[ Pool ]%></th>
                                        <th>InChanger</th>
+                                       <th>StorageId</th>
+                                       <th><%[ Storage ]%></th>
+                                       <th>DeviceId</th>
                                        <th><%[ Vol. status ]%></th>
+                                       <th><%[ Enabled ]%></th>
+                                       <th><%[ Recycle ]%></th>
                                        <th>MediaType</th>
+                                       <th>MediaTypeId</th>
+                                       <th>LabelType</th>
+                                       <th><%[ First written ]%></th>
                                        <th><%[ Last written ]%></th>
                                        <th><%[ Vol. bytes ]%></th>
+                                       <th><%[ Max. vol. bytes ]%></th>
+                                       <th><%[ Max. vol. jobs ]%></th>
+                                       <th><%[ Max. vol. files ]%></th>
+                                       <th><%[ Vol. capacity bytes ]%></th>
+                                       <th><%[ Vol. abytes ]%></th>
+                                       <th><%[ Vol. apadding ]%></th>
+                                       <th><%[ Vol. hole bytes ]%></th>
+                                       <th><%[ Vol. holes ]%></th>
+                                       <th><%[ Vol. parts ]%></th>
+                                       <th><%[ Vol. errors ]%></th>
+                                       <th><%[ Vol. writes ]%></th>
+                                       <th><%[ Label date ]%></th>
+                                       <th><%[ Vol. jobs ]%></th>
+                                       <th><%[ Vol. files ]%></th>
+                                       <th><%[ Vol. blocks ]%></th>
+                                       <th><%[ Vol. mounts ]%></th>
+                                       <th><%[ Action on purge ]%></th>
+                                       <th><%[ Vol. retention ]%></th>
+                                       <th><%[ Cache retention ]%></th>
+                                       <th><%[ Vol. use duration ]%></th>
+                                       <th><%[ Media addressing ]%></th>
+                                       <th><%[ Vol. read time ]%></th>
+                                       <th><%[ Vol. write time ]%></th>
+                                       <th><%[ Vol. type ]%></th>
+                                       <th><%[ Vol. cloud parts ]%></th>
+                                       <th><%[ Last part bytes ]%></th>
+                                       <th><%[ End file ]%></th>
+                                       <th><%[ End block ]%></th>
+                                       <th>LocationId</th>
+                                       <th><%[ Recycle count ]%></th>
+                                       <th><%[ Initial write ]%></th>
+                                       <th>ScratchPoolId</th>
+                                       <th><%[ Scratch pool ]%></th>
+                                       <th>RecyclePoolId</th>
+                                       <th><%[ Recycle pool ]%></th>
+                                       <th><%[ Comment ]%></th>
+                                       <th><%[ When expire ]%></th>
                                        <th><%[ Actions ]%></th>
                                </tr>
                        </thead>
                                        <th>MediaId</th>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Slot ]%></th>
+                                       <th>PoolId</th>
+                                       <th><%[ Pool ]%></th>
                                        <th>InChanger</th>
+                                       <th>StorageId</th>
+                                       <th><%[ Storage ]%></th>
+                                       <th>DeviceId</th>
                                        <th><%[ Vol. status ]%></th>
+                                       <th><%[ Enabled ]%></th>
+                                       <th><%[ Recycle ]%></th>
                                        <th>MediaType</th>
+                                       <th>MediaTypeId</th>
+                                       <th>LabelType</th>
+                                       <th><%[ First written ]%></th>
                                        <th><%[ Last written ]%></th>
                                        <th><%[ Vol. bytes ]%></th>
+                                       <th><%[ Max. vol. bytes ]%></th>
+                                       <th><%[ Max. vol. jobs ]%></th>
+                                       <th><%[ Max. vol. files ]%></th>
+                                       <th><%[ Vol. capacity bytes ]%></th>
+                                       <th><%[ Vol. abytes ]%></th>
+                                       <th><%[ Vol. apadding ]%></th>
+                                       <th><%[ Vol. hole bytes ]%></th>
+                                       <th><%[ Vol. holes ]%></th>
+                                       <th><%[ Vol. parts ]%></th>
+                                       <th><%[ Vol. errors ]%></th>
+                                       <th><%[ Vol. writes ]%></th>
+                                       <th><%[ Label date ]%></th>
+                                       <th><%[ Vol. jobs ]%></th>
+                                       <th><%[ Vol. files ]%></th>
+                                       <th><%[ Vol. blocks ]%></th>
+                                       <th><%[ Vol. mounts ]%></th>
+                                       <th><%[ Action on purge ]%></th>
+                                       <th><%[ Vol. retention ]%></th>
+                                       <th><%[ Cache retention ]%></th>
+                                       <th><%[ Vol. use duration ]%></th>
+                                       <th><%[ Media addressing ]%></th>
+                                       <th><%[ Vol. read time ]%></th>
+                                       <th><%[ Vol. write time ]%></th>
+                                       <th><%[ Vol. type ]%></th>
+                                       <th><%[ Vol. cloud parts ]%></th>
+                                       <th><%[ Last part bytes ]%></th>
+                                       <th><%[ End file ]%></th>
+                                       <th><%[ End block ]%></th>
+                                       <th>LocationId</th>
+                                       <th><%[ Recycle count ]%></th>
+                                       <th><%[ Initial write ]%></th>
+                                       <th>ScratchPoolId</th>
+                                       <th><%[ Scratch pool ]%></th>
+                                       <th>RecyclePoolId</th>
+                                       <th><%[ Recycle pool ]%></th>
+                                       <th><%[ Comment ]%></th>
+                                       <th><%[ When expire ]%></th>
                                        <th><%[ Actions ]%></th>
                                </tr>
                        </tfoot>
@@ -56,6 +150,11 @@ var oVolumeList = {
                var table = $('#' + this.ids.volume_list).DataTable({
                        data: <%=json_encode($this->volumes)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -65,8 +164,14 @@ var oVolumeList = {
                                },
                                {data: 'mediaid'},
                                {data: 'volumename'},
+                               {data: 'slot'},
+                               {
+                                       data: 'poolid',
+                                       visible: false
+                               },
                                {
-                                       data: 'slot'
+                                       data: 'pool',
+                                       visible: false
                                },
                                {
                                        data: 'inchanger',
@@ -74,8 +179,46 @@ var oVolumeList = {
                                                return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
                                        }
                                },
+                               {
+                                       data: 'storageid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'storage',
+                                       visible: false
+                               },
+                               {
+                                       data: 'deviceid',
+                                       visible: false
+                               },
                                {data: 'volstatus'},
+                               {
+                                       data: 'enabled',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'recycle',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
                                {data: 'mediatype'},
+                               {
+                                       data: 'mediatypeid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'labeltype',
+                                       visible: false
+                               },
+                               {
+                                       data: 'firstwritten',
+                                       visible: false
+                               },
                                {data: 'lastwritten'},
                                {
                                        data: 'volbytes',
@@ -89,6 +232,252 @@ var oVolumeList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'maxvolbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'maxvoljobs',
+                                       visible: false
+                               },
+                               {
+                                       data: 'maxvolfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volcapacitybytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volabytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volapadding',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volholebytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volholes',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volparts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volerrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volwrites',
+                                       visible: false
+                               },
+                               {
+                                       data: 'labeldate',
+                                       visible: false
+                               },
+                               {
+                                       data: 'voljobs',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volblocks',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volmounts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'actiononpurge',
+                                       render: function(data, type, row) {
+                                               return (data === 1) ? '<%[ Yes ]%>' : '<%[ No ]%>';
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volretention',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'cacheretention',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'voluseduration',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'mediaaddressing',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volreadtime',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volwritetime',
+                                       render: function(data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       var ret = Units.format_time_period(data);
+                                                       t = ret.value + ' ' + ret.format;
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'voltype',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volcloudparts',
+                                       visible: false
+                               },
+                               {
+                                       data: 'lastpartbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'endfile',
+                                       visible: false
+                               },
+                               {
+                                       data: 'endblock',
+                                       visible: false
+                               },
+                               {
+                                       data: 'locationid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclecount',
+                                       visible: false
+                               },
+                               {
+                                       data: 'initialwrite',
+                                       visible: false
+                               },
+                               {
+                                       data: 'scratchpoolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'scratchpool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclepoolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'recyclepool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'whenexpire',
+                                       visible: false
+                               },
                                {
                                        data: 'mediaid',
                                        render: function(data, type, row) {
@@ -118,20 +507,20 @@ var oVolumeList = {
                        },
                        {
                                className: "dt-center",
-                               targets: [ 1, 3, 4, 5, 7, 9 ]
+                               targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 ]
                        },
                        {
                                className: "dt-body-right",
-                               targets: [ 8 ]
+                               targets: [ 18 ]
                        }],
                        order: [3, 'asc'],
                        initComplete: function () {
-                               this.api().columns([2, 3, 4, 5, 6]).every(function () {
+                               this.api().columns([2, 3, 6, 10, 13]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -140,11 +529,19 @@ var oVolumeList = {
                                        });
                                        if (column[0][0] == 3) {
                                                column.cells('', column[0]).render('display').unique().sort(sort_natural).each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index ab57219a6a63fa0244df20f34673c253183fec87..ab368e610ed3c7b9ee69fca6234d3bfecf3998e1 100644 (file)
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </thead>
                                        <th><%[ Name ]%></th>
                                        <th><%[ Type ]%></th>
                                        <th class="w3-center"><%[ Level ]%></th>
+                                       <th class="w3-center">ClientId</th>
+                                       <th class="w3-center"><%[ Client ]%></th>
+                                       <th class="w3-center"><%[ Scheduled time ]%></th>
                                        <th class="w3-center"><%[ Start time ]%></th>
                                        <th class="w3-center"><%[ End time ]%></th>
+                                       <th class="w3-center"><%[ Real end time ]%></th>
+                                       <th class="w3-center">JobTDate</th>
+                                       <th class="w3-center">VolSessionId</th>
+                                       <th class="w3-center">VolSessionTime</th>
                                        <th class="w3-center"><%[ Job status ]%></th>
                                        <th class="w3-center"><%[ Size ]%></th>
+                                       <th class="w3-center"><%[ Read bytes ]%></th>
                                        <th class="w3-center"><%[ Files ]%></th>
+                                       <th class="w3-center"><%[ Job errors ]%></th>
+                                       <th class="w3-center"><%[ Job missing files ]%></th>
+                                       <th class="w3-center">PoolId</th>
+                                       <th class="w3-center"><%[ Pool ]%></th>
+                                       <th class="w3-center">FileSetId</th>
+                                       <th class="w3-center"><%[ FileSet ]%></th>
+                                       <th class="w3-center">PriorJobId</th>
+                                       <th class="w3-center"><%[ Purged files ]%></th>
+                                       <th class="w3-center"><%[ Has base ]%></th>
+                                       <th class="w3-center"><%[ Reviewed ]%></th>
+                                       <th class="w3-center"><%[ Comment ]%></th>
+                                       <th class="w3-center"><%[ File table ]%></th>
                                        <th class="w3-center"><%[ Action ]%></th>
                                </tr>
                        </tfoot>
@@ -378,6 +418,11 @@ var oJobsOnVolumeList = {
                this.table = $('#' + this.ids.jobs_on_volume_list).DataTable({
                        data: <%=json_encode($this->jobs_on_volume)%>,
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -396,11 +441,57 @@ var oJobsOnVolumeList = {
                                {
                                        data: 'level',
                                        render: function(data, type, row) {
-                                               return JobLevel.get_level(data);
+                                               return (['R', 'D'].indexOf(row.type) === -1 ? JobLevel.get_level(data) : '-');
                                        }
                                },
+                               {
+                                       data: 'clientid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'client',
+                                       visible: false
+                               },
+                               {
+                                       data: 'schedtime',
+                                       visible: false
+                               },
                                {data: 'starttime'},
                                {data: 'endtime'},
+                               {
+                                       data: 'realendtime',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobtdate',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessionid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'volsessiontime',
+                                       render: function (data, type, row) {
+                                               var t;
+                                               if (type == 'display') {
+                                                       t = Units.format_date(data)
+                                               } else {
+                                                       t = data;
+                                               }
+                                               return t;
+                                       },
+                                       visible: false
+                               },
                                {
                                        data: 'jobstatus',
                                        render: function (data, type, row) {
@@ -411,7 +502,8 @@ var oJobsOnVolumeList = {
                                                        ret = data;
                                                }
                                                return ret;
-                                       }
+                                       },
+                                       className: 'w3-center'
                                },
                                {
                                        data: 'jobbytes',
@@ -425,7 +517,68 @@ var oJobsOnVolumeList = {
                                                return s;
                                        }
                                },
+                               {
+                                       data: 'readbytes',
+                                       render: function (data, type, row) {
+                                               var s;
+                                               if (type == 'display') {
+                                                       s = Units.get_formatted_size(data)
+                                               } else {
+                                                       s = data;
+                                               }
+                                               return s;
+                                       },
+                                       visible: false
+                               },
                                {data: 'jobfiles'},
+                               {
+                                       data: 'joberrors',
+                                       visible: false
+                               },
+                               {
+                                       data: 'jobmissingfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'poolid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'pool',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filesetid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'fileset',
+                                       visible: false
+                               },
+                               {
+                                       data: 'priorjobid',
+                                       visible: false
+                               },
+                               {
+                                       data: 'purgedfiles',
+                                       visible: false
+                               },
+                               {
+                                       data: 'hasbase',
+                                       visible: false
+                               },
+                               {
+                                       data: 'reviewed',
+                                       visible: false
+                               },
+                               {
+                                       data: 'comment',
+                                       visible: false
+                               },
+                               {
+                                       data: 'filetable',
+                                       visible: false
+                               },
                                {
                                        data: 'jobid',
                                        render: function (data, type, row) {
@@ -463,25 +616,33 @@ var oJobsOnVolumeList = {
                        }],
                        order: [1, 'desc'],
                        initComplete: function () {
-                               this.api().columns([2, 3, 4, 7]).every(function () {
+                               this.api().columns([2, 3, 4, 14]).every(function () {
                                        var column = this;
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
                                                .search(val ? '^' + val + '$' : '', true, false)
                                                .draw();
                                        });
-                                       if (column[0][0] == 7) {
+                                       if (column[0][0] == 14) {
                                                column.data().unique().sort().each(function (d, j) {
-                                                       select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '" title="' + JobStatus.get_desc(d) + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index 80a6df24befb89d2bea2beb22ded36daadb98c34..e68a7b06447c9173219f19b012aa7e0e83045490 100644 (file)
@@ -134,6 +134,11 @@ var oJobScheduleList = {
                this.table = $('#' + this.ids.schedule_list).DataTable({
                        data: this.get_data(),
                        deferRender: true,
+                       dom: 'lBfrtip',
+                       stateSave: true,
+                       buttons: [
+                               'copy', 'csv', 'colvis'
+                       ],
                        columns: [
                                {
                                        className: 'details-control',
@@ -210,7 +215,7 @@ var oJobScheduleList = {
                                        var select = $('<select><option value=""></option></select>')
                                        .appendTo($(column.footer()).empty())
                                        .on('change', function () {
-                                               var val = $.fn.dataTable.util.escapeRegex(
+                                               var val = dtEscapeRegex(
                                                        $(this).val()
                                                );
                                                column
@@ -219,11 +224,19 @@ var oJobScheduleList = {
                                        });
                                        if (column[0][0] == 3) {
                                                column.cells('', column[0]).render('display').unique().sort(sort_natural).each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        } else {
                                                column.cells('', column[0]).render('display').unique().sort().each(function(d, j) {
-                                                       select.append('<option value="' + d + '">' + d + '</option>');
+                                                       if (column.search() == '^' + dtEscapeRegex(d) + '$') {
+                                                               select.append('<option value="' + d + '" selected>' + d + '</option>');
+                                                       } else {
+                                                               select.append('<option value="' + d + '">' + d + '</option>');
+                                                       }
                                                });
                                        }
                                });
index c4f616773c64b1e4d503c5e6719dbfae355d0b54..486f2f8de03de2f708d69f2c8a86c23a5a580f1c 100644 (file)
@@ -51,6 +51,10 @@ table.dataTable.no-footer {
        box-shadow: none !important;
 }
 
+.dataTables_length {
+       margin-right: 5px;
+}
+
 th.action_col, td.action_col {
        width: 110px !important;
 }