From: Marcin Haba Date: Sat, 26 Jun 2021 18:35:53 +0000 (+0200) Subject: baculum: Reorganize dasboard page - idea proposed by Sergey Zhidkov X-Git-Tag: Release-11.3.2~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=391b805a58f0351ac11f2f57ace2f80ea1d65cd8;p=thirdparty%2Fbacula.git baculum: Reorganize dasboard page - idea proposed by Sergey Zhidkov --- diff --git a/gui/baculum/protected/Common/Class/BClientScript.php b/gui/baculum/protected/Common/Class/BClientScript.php index b1d1b3195..8cc576df0 100644 --- a/gui/baculum/protected/Common/Class/BClientScript.php +++ b/gui/baculum/protected/Common/Class/BClientScript.php @@ -31,7 +31,7 @@ Prado::using('System.Web.UI.WebControls.TClientScript'); */ class BClientScript extends TClientScript { - const SCRIPTS_VERSION = 20; + const SCRIPTS_VERSION = 21; public function getScriptUrl() { diff --git a/gui/baculum/protected/Web/JavaScript/misc.js b/gui/baculum/protected/Web/JavaScript/misc.js index f056478ae..0984c22a3 100644 --- a/gui/baculum/protected/Web/JavaScript/misc.js +++ b/gui/baculum/protected/Web/JavaScript/misc.js @@ -573,12 +573,10 @@ var oLastJobsList = { last_jobs_list_body: 'lats_jobs_list_body' }, init: function(data) { - this.destroy(); - this.set_table(data); - }, - destroy: function() { if (this.last_jobs_table) { - this.last_jobs_table.destroy(); + update_job_table(this.last_jobs_table, data); + } else { + this.set_table(data); } }, set_table: function(data) { @@ -586,8 +584,12 @@ var oLastJobsList = { data: data, bInfo: false, paging: false, - searching: false, deferRender: true, + dom: 'lBfrtip', + stateSave: true, + buttons: [ + 'copy', 'csv', 'colvis' + ], columns: [ { className: 'details-control', @@ -603,6 +605,13 @@ var oLastJobsList = { data: 'name', responsivePriority: 2 }, + { + data: 'type', + render: function(data, type, row) { + return JobType.get_type(data); + }, + visible: false, + }, { data: 'level', render: function(data, type, row) { @@ -610,15 +619,110 @@ var oLastJobsList = { }, responsivePriority: 3 }, + { + data: 'clientid', + visible: false + }, + { + data: 'client', + visible: false + }, + { + data: 'schedtime', + render: render_date, + visible: false + }, { data: 'starttime', render: render_date, responsivePriority: 5 }, + { + data: 'endtime', + render: render_date, + visible: false + }, + { + data: 'realendtime', + render: render_date, + visible: false + }, + { + data: 'jobtdate', + render: render_date_ts, + visible: false + }, + { + data: 'volsessionid', + visible: false + }, + { + data: 'volsessiontime', + render: render_date_ts, + visible: false + }, + { + data: 'jobbytes', + render: render_bytes + }, + { + data: 'readbytes', + render: render_bytes, + visible: false + }, + {data: 'jobfiles'}, { data: 'jobstatus', render: render_jobstatus, responsivePriority: 4 + }, + { + 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 } ], responsive: { @@ -633,7 +737,7 @@ var oLastJobsList = { }, { className: "dt-center", - targets: [ 1, 3, 4, 5 ] + targets: [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 ] }], order: [1, 'desc'] }); @@ -716,8 +820,8 @@ var Dashboard = { document.getElementById(this.ids.clients.jobs).textContent = occupancy; }, update_job_access: function() { - // get last 10 jobs - var data = this.stats.jobs.slice(0, 10); + // get last 15 jobs + var data = this.stats.jobs.slice(0, 15); oLastJobsList.init(data); }, update_jobs: function() { diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index 6035a7cb2..884b41259 100644 Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/en/messages.po b/gui/baculum/protected/Web/Lang/en/messages.po index 7b326e7f0..308c15b38 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -1439,9 +1439,6 @@ msgstr "Name" msgid "JobId" msgstr "JobId" -msgid "Last 10 jobs" -msgstr "Last 10 jobs" - msgid "More jobs" msgstr "More jobs" diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 7dbc1ec03..19980bb27 100644 Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/ja/messages.po b/gui/baculum/protected/Web/Lang/ja/messages.po index 5aec2cee3..dfd6686ab 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -811,9 +811,6 @@ msgstr "言語" msgid "Language:" msgstr "言語:" -msgid "Last 10 jobs" -msgstr "直近10件のジョブ実行結果" - msgid "Last 12 hours" msgstr "Last 12 hours" diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index 131b369b5..f0351699c 100644 Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pl/messages.po b/gui/baculum/protected/Web/Lang/pl/messages.po index 9422e5e76..2b1802c1f 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -1449,9 +1449,6 @@ msgstr "Nazwa" msgid "JobId" msgstr "JobId" -msgid "Last 10 jobs" -msgstr "Ostatnie 10 zadań" - msgid "More jobs" msgstr "Więcej zadań" diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index 1128b6d17..137121083 100644 Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/pt/messages.po b/gui/baculum/protected/Web/Lang/pt/messages.po index 66c21d4c3..af889b101 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -1449,9 +1449,6 @@ msgstr "Nome" msgid "JobId" msgstr "JobId" -msgid "Last 10 jobs" -msgstr "Último 10 jobs" - msgid "More jobs" msgstr "Mostrar mais jobs" diff --git a/gui/baculum/protected/Web/Lang/ru/messages.mo b/gui/baculum/protected/Web/Lang/ru/messages.mo index dd8b3899d..08c4b15f3 100644 Binary files a/gui/baculum/protected/Web/Lang/ru/messages.mo and b/gui/baculum/protected/Web/Lang/ru/messages.mo differ diff --git a/gui/baculum/protected/Web/Lang/ru/messages.po b/gui/baculum/protected/Web/Lang/ru/messages.po index 3800c1a02..4a0159148 100644 --- a/gui/baculum/protected/Web/Lang/ru/messages.po +++ b/gui/baculum/protected/Web/Lang/ru/messages.po @@ -1449,9 +1449,6 @@ msgstr "Имя" msgid "JobId" msgstr "Id задания" -msgid "Last 10 jobs" -msgstr "Последние 10 заданий" - msgid "More jobs" msgstr "Больше заданий" diff --git a/gui/baculum/protected/Web/Pages/Dashboard.page b/gui/baculum/protected/Web/Pages/Dashboard.page index a87cd0f2c..b2dea844d 100644 --- a/gui/baculum/protected/Web/Pages/Dashboard.page +++ b/gui/baculum/protected/Web/Pages/Dashboard.page @@ -13,7 +13,6 @@

-

-

<%[ Clients ]%>

<%[ The most often used: ]%>

@@ -28,7 +27,6 @@

-

-

<%[ Finished jobs ]%>

<%[ The most often used: ]%>

@@ -42,7 +40,6 @@

-

-

<%[ Pools ]%>

<%[ The most often used: ]%>

@@ -56,7 +53,6 @@

-

-

<%[ Total bytes ]%>

<%[ Total files: ]%>

@@ -71,49 +67,72 @@
-
-
-

<%[ Database ]%>

+
+
+

<%[ Database ]%>

-
-

<%[ Database type: ]%>

-

<%[ Database size: ]%>

+
+
<%[ Database type: ]%>
+
<%[ Database size: ]%>
+
+ +
+

<%[ Run job ]%>  

+
+
+ +
+

<%[ Perform restore ]%>  

+
+
+
-
<%[ Last 10 jobs ]%>
+ + + + + + + + + + + + + + + + + + + + + + + +
<%[ JobId ]%> <%[ Name ]%><%[ Type ]%> <%[ Level ]%>ClientId<%[ Client ]%><%[ Scheduled time ]%> <%[ Start time ]%><%[ End time ]%><%[ Real end time ]%>JobTDateVolSessionIdVolSessionTime<%[ Size ]%><%[ Read bytes ]%><%[ Files ]%> <%[ Job status ]%><%[ Job errors ]%><%[ Job missing files ]%>PoolId<%[ Pool ]%>FileSetId<%[ FileSet ]%>PriorJobId<%[ Purged files ]%><%[ Has base ]%><%[ Reviewed ]%><%[ Comment ]%><%[ File table ]%>
-
- -
-

<%[ Run job ]%>

-
-
- -
-

<%[ Perform restore ]%>

-
-
-
diff --git a/gui/baculum/themes/Baculum-v2/css/baculum.css b/gui/baculum/themes/Baculum-v2/css/baculum.css index 84770c44f..7491270c8 100644 --- a/gui/baculum/themes/Baculum-v2/css/baculum.css +++ b/gui/baculum/themes/Baculum-v2/css/baculum.css @@ -404,13 +404,17 @@ table.component td:nth-of-type(1) { } .usage_box { - height: 138px; + height: 78px; -webkit-transition: height 0.3s; /* For Safari 3.1 to 6.0 */ transition: height 0.3s; } .usage_box:hover { - height: 200px; + height: 140px; +} + +.usage_box h4 { + margin-left: 78px; } .info {