]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Reorganize dasboard page - idea proposed by Sergey Zhidkov
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 26 Jun 2021 18:35:53 +0000 (20:35 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:25 +0000 (09:03 +0100)
14 files changed:
gui/baculum/protected/Common/Class/BClientScript.php
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/Lang/ru/messages.mo
gui/baculum/protected/Web/Lang/ru/messages.po
gui/baculum/protected/Web/Pages/Dashboard.page
gui/baculum/themes/Baculum-v2/css/baculum.css

index b1d1b3195d94b6358e4e2bba8c6c606671963a73..8cc576df046a4ab8a1c922f76501677612f60b61 100644 (file)
@@ -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()
        {
index f056478aec10306b9b46ca8ca961af035f17a84d..0984c22a3c76db62d050222d23ce219c9e5596fa 100644 (file)
@@ -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() {
index 6035a7cb262dd35cd7917a4532678caa89dc13ca..884b41259e53f072465d8cb70197b20cfc9fdace 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 7b326e7f0b1f9d24ed12df9f0ada4dba7a1da4fb..308c15b389670d82f7db371612332ff6c2a3f4f7 100644 (file)
@@ -1439,9 +1439,6 @@ msgstr "Name"
 msgid "JobId"
 msgstr "JobId"
 
-msgid "Last 10 jobs"
-msgstr "Last 10 jobs"
-
 msgid "More jobs"
 msgstr "More jobs"
 
index 7dbc1ec032a39978170c8bc0a8c6bb8406a8db06..19980bb275245e8014757bc618b97c5f6655a303 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 5aec2cee3bdc044b7980db05f1242ae4232acae7..dfd6686ab21867c311ce3f1c6d14b4519b1653ef 100644 (file)
@@ -811,9 +811,6 @@ msgstr "言語"
 msgid "Language:"
 msgstr "言語:"
 
-msgid "Last 10 jobs"
-msgstr "直近10件のジョブ実行結果"
-
 msgid "Last 12 hours"
 msgstr "Last 12 hours"
 
index 131b369b535e8fd148cbf58d24468e68aa98ba7f..f0351699cfe98abe536211a8cd88e749ebdece70 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 9422e5e76fa34ab4877cf22f177654230e2b51fe..2b1802c1f424f40175c01529b4afa5b47b81f85f 100644 (file)
@@ -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ń"
 
index 1128b6d17ff55ec8e27f1ec2e28a7e4c6bc40dbd..1371210830737edf5842dd678015f0ca3213bd80 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 66c21d4c3cd6140757876977b5962e996f195ef7..af889b101364871a6757f15b6aae4f8dac5b7c79 100644 (file)
@@ -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"
 
index dd8b3899df63e8cb31b5f0baa629fb1f0a0d8a7f..08c4b15f3bb9e6b4cf939fa546b2f34f24378ddb 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ru/messages.mo and b/gui/baculum/protected/Web/Lang/ru/messages.mo differ
index 3800c1a0252032933c9f57706bff5646d7108332..4a0159148a915c0d933786f1d8adc08a1b42d73e 100644 (file)
@@ -1449,9 +1449,6 @@ msgstr "Имя"
 msgid "JobId"
 msgstr "Id задания"
 
-msgid "Last 10 jobs"
-msgstr "Последние 10 заданий"
-
 msgid "More jobs"
 msgstr "Больше заданий"
 
index a87cd0f2cacffec9f7da7a7d6089d02d878648dd..b2dea844d69071be2e867fb761d7fca658ac3d41 100644 (file)
@@ -13,7 +13,6 @@
                                <div class="w3-right">
                                        <h3 id="client_no">-</h3>
                                </div>
-                               <div class="w3-clear"></div>
                                <h4><%[ Clients ]%></h4>
                                <div class="w3-text">
                                        <p class="w3-small"><%[ The most often used: ]%> <strong><span id="client_most"></span></strong></p>
@@ -28,7 +27,6 @@
                                <div class="w3-right">
                                        <h3 id="job_no">-</h3>
                                </div>
-                               <div class="w3-clear"></div>
                                <h4><%[ Finished jobs ]%></h4>
                                <div class="w3-text">
                                        <p class="w3-small"><%[ The most often used: ]%> <strong><span id="job_most"></span></strong></p>
@@ -42,7 +40,6 @@
                                <div class="w3-right">
                                        <h3 id="pool_no">-</h3>
                                </div>
-                               <div class="w3-clear"></div>
                                <h4><%[ Pools ]%></h4>
                                <div class="w3-text">
                                        <p class="w3-small"><%[ The most often used: ]%> <strong><span id="pool_most"></span></strong></p>
@@ -56,7 +53,6 @@
                                <div class="w3-right">
                                        <h3 id="jobs_total_bytes">-</h3>
                                </div>
-                               <div class="w3-clear"></div>
                                <h4><%[ Total bytes ]%></h4>
                                <div class="w3-text">
                                        <p><%[ Total files: ]%><strong><span id="jobs_total_files"></span></strong></p>
                                <div class="dashboard_graph">
                                        <div id="jobs_summary_graph"></div>
                                </div>
-                               <div class="w3-card-4 w3-padding-16 w3-margin-top">
-                                       <header class="w3-container w3-light-grey">
-                                               <h3><i class="fa fa-database w3-xxxlarge"></i> <%[ Database ]%></h3>
+                               <div class="w3-card-4 w3-padding-16 w3-margin-top w3-margin-bottom">
+                                       <header class="w3-container w3-light-grey w3-half w3-left">
+                                               <h4 class="w3-center"><i class="fa fa-database w3-xxlarge"></i> <span style="vertical-align: super"><%[ Database ]%></span></h4>
                                        </header>
-                                       <div class="w3-container">
-                                               <p><%[ Database type: ]%> <span id="database_type"></span></p>
-                                               <p><%[ Database size: ]%> <span id="database_size"></span></p>
+                                       <div class="w3-container w3-half w3-left">
+                                               <div class="w3-padding-small"><%[ Database type: ]%> <span id="database_type"></span></div>
+                                               <div class="w3-padding-small"><%[ Database size: ]%> <span id="database_size"></span></div>
                                        </div>
+                                       <div class="w3-clear"></div>
                                </div>
+                               <com:TActiveLinkButton
+                                       OnClick="loadRunJobModal"
+                                       Attributes.onclick="document.getElementById('run_job').style.display='block'"
+                                       Style="text-decoration: none"
+                               >
+                                       <div class="w3-container w3-blue w3-third w3-center w3-padding-small w3-margin-right w3-margin-bottom">
+                                               <p style="margin: 10px 0"><%[ Run job ]%> &nbsp;<i class="fa fa-play"></i></p>
+                                       </div>
+                               </com:TActiveLinkButton>
+                               <a href="<%=$this->Service->constructUrl('RestoreWizard')%>" style="text-decoration: none">
+                                       <div class="w3-container w3-blue w3-rest w3-center w3-padding-small w3-margin-bottom">
+                                               <p style="margin: 10px 0"><%[ Perform restore ]%> &nbsp;<i class="fa fa-reply w3-large"></i></p>
+                                       </div>
+                               </a>
+                               <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
                        </div>
                        <div class="w3-twothird">
-                               <h5><%[ Last 10 jobs ]%></h5>
                                <table id="last_jobs_list" class="w3-table w3-striped w3-hoverable w3-white w3-margin-bottom" style="width: 100%">
                                        <thead>
                                                <tr>
                                                        <th></th>
                                                        <th><%[ JobId ]%></th>
                                                        <th><%[ Name ]%></th>
+                                                       <th><%[ Type ]%></th>
                                                        <th><%[ Level ]%></th>
+                                                       <th>ClientId</th>
+                                                       <th><%[ Client ]%></th>
+                                                       <th><%[ Scheduled time ]%></th>
                                                        <th><%[ Start time ]%></th>
+                                                       <th><%[ End time ]%></th>
+                                                       <th><%[ Real end time ]%></th>
+                                                       <th>JobTDate</th>
+                                                       <th>VolSessionId</th>
+                                                       <th>VolSessionTime</th>
+                                                       <th><%[ Size ]%></th>
+                                                       <th><%[ Read bytes ]%></th>
+                                                       <th><%[ Files ]%></th>
                                                        <th><%[ Job status ]%></th>
+                                                       <th><%[ Job errors ]%></th>
+                                                       <th><%[ Job missing files ]%></th>
+                                                       <th>PoolId</th>
+                                                       <th><%[ Pool ]%></th>
+                                                       <th>FileSetId</th>
+                                                       <th><%[ FileSet ]%></th>
+                                                       <th>PriorJobId</th>
+                                                       <th><%[ Purged files ]%></th>
+                                                       <th><%[ Has base ]%></th>
+                                                       <th><%[ Reviewed ]%></th>
+                                                       <th><%[ Comment ]%></th>
+                                                       <th><%[ File table ]%></th>
                                                </tr>
                                        </thead>
                                        <tbody id="last_jobs_list_body">
                                        </tbody>
                                </table>
                                <button type="button" class="w3-button w3-dark-grey w3-right w3-margin-bottom" onclick="document.location.href='<%=$this->Service->constructUrl('JobHistoryList')%>'"><%[ More jobs ]%> &nbsp;<i class="fa fa-arrow-right"></i></button>
-                               <div class="w3-clear"></div>
-                               <com:TActiveLinkButton
-                                       OnClick="loadRunJobModal"
-                                       Attributes.onclick="document.getElementById('run_job').style.display='block'"
-                                       Style="text-decoration: none"
-                               >
-                                       <div class="w3-container w3-blue w3-third w3-center w3-padding-16 w3-margin-right">
-                                               <h1><%[ Run job ]%>  <i class="fa fa-play w3-xlarge"></i></h1>
-                                       </div>
-                               </com:TActiveLinkButton>
-                               <a href="<%=$this->Service->constructUrl('RestoreWizard')%>" style="text-decoration: none">
-                                       <div class="w3-container w3-blue w3-rest w3-center w3-padding-16">
-                                               <h1><%[ Perform restore ]%>  <i class="fa fa-reply w3-xlarge"></i></h1>
-                                       </div>
-                               </a>
-                               <com:Application.Web.Portlets.RunJob ID="RunJobModal" />
                        </div>
                </div>
        </div>
index 84770c44f0da7adfc2b3bdfef646ef1f009c35ee..7491270c843ae7ab8a794e1a8bb6e929b2228997 100644 (file)
@@ -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 {