From: Marcin Haba Date: Sat, 30 Jan 2021 19:17:37 +0000 (+0100) Subject: baculum: Add job status weather on job list page X-Git-Tag: Release-11.3.2~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f39cf6911d27c4910a37bce71d8fb68005fa4cf2;p=thirdparty%2Fbacula.git baculum: Add job status weather on job list page --- diff --git a/gui/baculum/protected/Web/JavaScript/misc.js b/gui/baculum/protected/Web/JavaScript/misc.js index 516105e28..ec5698e97 100644 --- a/gui/baculum/protected/Web/JavaScript/misc.js +++ b/gui/baculum/protected/Web/JavaScript/misc.js @@ -920,6 +920,20 @@ var MsgEnvelope = { } }; +var Weather = { + icons: [ + 'weather_sunny.png', + 'weather_sun_behind_small_cloud.png', + 'weather_sun_behind_large_cloud.png', + 'weather_sun_behind_rain_cloud.png', + 'weather_cloud_with_rain.png', + 'weather_cloud_with_lighting_and_rain.png' + ], + get_weather_icon(idx) { + return this.icons[idx]; + } +}; + var W3SideBar = { ids: { sidebar: 'sidebar', diff --git a/gui/baculum/protected/Web/Lang/en/messages.mo b/gui/baculum/protected/Web/Lang/en/messages.mo index 8bcba4f1b..cd34cb87e 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 e8a007494..ad856d8de 100644 --- a/gui/baculum/protected/Web/Lang/en/messages.po +++ b/gui/baculum/protected/Web/Lang/en/messages.po @@ -3202,3 +3202,9 @@ msgstr "Truncate log" msgid "Messages" msgstr "Messages" + +msgid "Last %errors/%count jobs finished with error." +msgstr "Last %errors/%count jobs finished with error." + +msgid "All last %count jobs finished successfully." +msgstr "All last %count jobs finished successfully." diff --git a/gui/baculum/protected/Web/Lang/ja/messages.mo b/gui/baculum/protected/Web/Lang/ja/messages.mo index 2f9f65b36..fa72c70d8 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 3f40e3251..f69f6561e 100644 --- a/gui/baculum/protected/Web/Lang/ja/messages.po +++ b/gui/baculum/protected/Web/Lang/ja/messages.po @@ -3288,3 +3288,9 @@ msgstr "Truncate log" msgid "Messages" msgstr "Messages" + +msgid "Last %errors/%count jobs finished with error." +msgstr "Last %errors/%count jobs finished with error." + +msgid "All last %count jobs finished successfully." +msgstr "All last %count jobs finished successfully." diff --git a/gui/baculum/protected/Web/Lang/pl/messages.mo b/gui/baculum/protected/Web/Lang/pl/messages.mo index 781cd396b..ea8e492e1 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 132a3c473..7d77e9985 100644 --- a/gui/baculum/protected/Web/Lang/pl/messages.po +++ b/gui/baculum/protected/Web/Lang/pl/messages.po @@ -3213,3 +3213,9 @@ msgstr "Przytnij dziennik" msgid "Messages" msgstr "Wiadomości" + +msgid "Last %errors/%count jobs finished with error." +msgstr "Ostatnie %errors/%count zadań zakończyło się błędem." + +msgid "All last %count jobs finished successfully." +msgstr "Wszystkie ostatnie %count zadań zakończyło się pomyślnie." diff --git a/gui/baculum/protected/Web/Lang/pt/messages.mo b/gui/baculum/protected/Web/Lang/pt/messages.mo index c06cc1ad9..02b84df54 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 e5f77bb31..29e76371c 100644 --- a/gui/baculum/protected/Web/Lang/pt/messages.po +++ b/gui/baculum/protected/Web/Lang/pt/messages.po @@ -3212,3 +3212,9 @@ msgstr "Truncate log" msgid "Messages" msgstr "Messages" + +msgid "Last %errors/%count jobs finished with error." +msgstr "Last %errors/%count jobs finished with error." + +msgid "All last %count jobs finished successfully." +msgstr "All last %count jobs finished successfully." diff --git a/gui/baculum/protected/Web/Lang/ru/messages.mo b/gui/baculum/protected/Web/Lang/ru/messages.mo index 3fb88d8f1..128d8f257 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 3f0e32762..b47763d69 100644 --- a/gui/baculum/protected/Web/Lang/ru/messages.po +++ b/gui/baculum/protected/Web/Lang/ru/messages.po @@ -3212,3 +3212,9 @@ msgstr "Truncate log" msgid "Messages" msgstr "Messages" + +msgid "Last %errors/%count jobs finished with error." +msgstr "Last %errors/%count jobs finished with error." + +msgid "All last %count jobs finished successfully." +msgstr "All last %count jobs finished successfully." diff --git a/gui/baculum/protected/Web/Pages/JobHistoryList.page b/gui/baculum/protected/Web/Pages/JobHistoryList.page index e2f30d7c8..5e3d8cf3f 100644 --- a/gui/baculum/protected/Web/Pages/JobHistoryList.page +++ b/gui/baculum/protected/Web/Pages/JobHistoryList.page @@ -149,7 +149,7 @@ function hide_btn_loader(jobid) { } } -var oJobList = { +var oJobHistoryList = { table: null, table_toolbar: null, actions: [ @@ -469,7 +469,7 @@ var oJobList = { }; MonitorParams = {jobs: null}; $(function() { - MonitorCallsInterval.push(function() { oJobList.init(); }); + MonitorCallsInterval.push(function() { oJobHistoryList.init(); }); }); /** @@ -496,7 +496,7 @@ var bulk_actions_output_id = '<%=$this->SourceTemplateControl->BulkActions->Bulk oBulkActionsModal.show_loader(false); - oJobList.table_toolbar.style.display = 'none'; + oJobHistoryList.table_toolbar.style.display = 'none'; oMonitor(); diff --git a/gui/baculum/protected/Web/Pages/JobList.page b/gui/baculum/protected/Web/Pages/JobList.page index 180142230..9973ae4fa 100644 --- a/gui/baculum/protected/Web/Pages/JobList.page +++ b/gui/baculum/protected/Web/Pages/JobList.page @@ -22,6 +22,7 @@ + <%[ Status ]%> <%[ Name ]%> <%[ Director ]%> <%[ Actions ]%> @@ -31,6 +32,7 @@ + <%[ Status ]%> <%[ Name ]%> <%[ Director ]%> <%[ Actions ]%> @@ -40,16 +42,21 @@ diff --git a/gui/baculum/themes/Baculum-v2/css/baculum.css b/gui/baculum/themes/Baculum-v2/css/baculum.css index 38ad6a4dd..c9bf052dd 100644 --- a/gui/baculum/themes/Baculum-v2/css/baculum.css +++ b/gui/baculum/themes/Baculum-v2/css/baculum.css @@ -526,3 +526,11 @@ table.component td:nth-of-type(1) { .blink { animation: blinker 4s linear infinite; } + +img.job_weather_icon { + display: block; + margin: 0 auto; + height: 32px; + width: 32px; + cursor: help; +}