* [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore
@ 2021-06-01 13:35 Dominik Csapak
2021-06-01 13:35 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: dashboard/TaskSummary: add type 'close' to the close tool Dominik Csapak
2021-06-01 14:39 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Thomas Lamprecht
0 siblings, 2 replies; 4+ messages in thread
From: Dominik Csapak @ 2021-06-01 13:35 UTC (permalink / raw)
To: pbs-devel
so that the update does not get canceled because of a bad datastore
hide the irrelevant fields in that case
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/datastore/DataStoreListSummary.js | 35 +++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js
index a9a8481a..eb9e04e1 100644
--- a/www/datastore/DataStoreListSummary.js
+++ b/www/datastore/DataStoreListSummary.js
@@ -21,6 +21,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
full: "N/A",
stillbad: 0,
deduplication: 1.0,
+ error: "",
},
},
setTasks: function(taskdata, since) {
@@ -32,6 +33,13 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
let me = this;
let vm = me.getViewModel();
+ if (statusData.error !== undefined) {
+ vm.set('error', statusData.error);
+ return;
+ } else {
+ vm.set('error', "");
+ }
+
let usage = statusData.used/statusData.total;
let usagetext = Ext.String.format(gettext('{0} of {1}'),
Proxmox.Utils.format_size(statusData.used),
@@ -83,12 +91,34 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
},
items: [
+ {
+ xtype: 'box',
+ reference: 'errorBox',
+ hidden: true,
+ tpl: [
+ '<center>',
+ `<h3>${gettext("Error")}</h3>`,
+ '<i class="fa fa-5x fa-exclamation-circle critical"></i>',
+ '<br /><br/>',
+ '{text}',
+ '</center>',
+ ],
+ bind: {
+ visible: '{error}',
+ data: {
+ text: '{error}',
+ },
+ },
+ },
{
xtype: 'proxmoxGauge',
warningThreshold: 0.8,
criticalThreshold: 0.95,
flex: 1,
reference: 'usage',
+ bind: {
+ visible: '{!error}',
+ },
},
{
xtype: 'pmxInfoWidget',
@@ -99,6 +129,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
data: {
text: '{full}',
},
+ visible: '{!error}',
},
},
{
@@ -110,6 +141,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
data: {
text: '{deduplication}',
},
+ visible: '{!error}',
},
},
{
@@ -143,6 +175,9 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
reference: 'historychart',
title: gettext('Usage History'),
height: 100,
+ bind: {
+ visible: '{!error}',
+ },
},
{
xtype: 'container',
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH proxmox-backup 2/2] ui: dashboard/TaskSummary: add type 'close' to the close tool
2021-06-01 13:35 [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Dominik Csapak
@ 2021-06-01 13:35 ` Dominik Csapak
2021-06-01 14:40 ` [pbs-devel] applied: " Thomas Lamprecht
2021-06-01 14:39 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Thomas Lamprecht
1 sibling, 1 reply; 4+ messages in thread
From: Dominik Csapak @ 2021-06-01 13:35 UTC (permalink / raw)
To: pbs-devel
otherwise the button is not visible
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/dashboard/TaskSummary.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/www/dashboard/TaskSummary.js b/www/dashboard/TaskSummary.js
index a1131f1d..ac2b6292 100644
--- a/www/dashboard/TaskSummary.js
+++ b/www/dashboard/TaskSummary.js
@@ -75,6 +75,7 @@ Ext.define('PBS.TaskSummary', {
if (tasklist === undefined) {
tasklist = Ext.create('Ext.grid.Panel', {
tools: [{
+ type: 'close',
handler: () => tasklist.setVisible(false),
}],
floating: true,
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore
2021-06-01 13:35 [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Dominik Csapak
2021-06-01 13:35 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: dashboard/TaskSummary: add type 'close' to the close tool Dominik Csapak
@ 2021-06-01 14:39 ` Thomas Lamprecht
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2021-06-01 14:39 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
On 01.06.21 15:35, Dominik Csapak wrote:
> so that the update does not get canceled because of a bad datastore
> hide the irrelevant fields in that case
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/datastore/DataStoreListSummary.js | 35 +++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-01 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 13:35 [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Dominik Csapak
2021-06-01 13:35 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: dashboard/TaskSummary: add type 'close' to the close tool Dominik Csapak
2021-06-01 14:40 ` [pbs-devel] applied: " Thomas Lamprecht
2021-06-01 14:39 ` [pbs-devel] applied: [PATCH proxmox-backup 1/2] ui: datastore/DataStoreListSummary: catch and show errors per datastore Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox