* [pbs-devel] [PATCH proxmox-backup] ui: add maintenance mask to DataStoreListSummary
@ 2022-05-06 9:58 Hannes Laimer
2022-05-16 16:13 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2022-05-06 9:58 UTC (permalink / raw)
To: pbs-devel
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
www/datastore/DataStoreListSummary.js | 33 ++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/www/datastore/DataStoreListSummary.js b/www/datastore/DataStoreListSummary.js
index eb9e04e1..b135326c 100644
--- a/www/datastore/DataStoreListSummary.js
+++ b/www/datastore/DataStoreListSummary.js
@@ -22,6 +22,7 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
stillbad: 0,
deduplication: 1.0,
error: "",
+ maintenance: '',
},
},
setTasks: function(taskdata, since) {
@@ -34,10 +35,21 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
let vm = me.getViewModel();
if (statusData.error !== undefined) {
+ Proxmox.Utils.API2Request({
+ url: `/config/datastore/${statusData.store}`,
+ success: (response) => {
+ const config = response.result.data;
+ if (config['maintenance-mode']) {
+ const [_type, msg] = PBS.Utils.parseMaintenanceMode(config['maintenance-mode']);
+ vm.set('maintenance', `${gettext('Datastore is in maintenance mode')}${msg ? ': ' + msg : ''}`);
+ }
+ },
+ });
vm.set('error', statusData.error);
return;
} else {
vm.set('error', "");
+ vm.set('maintenance', '');
}
let usage = statusData.used/statusData.total;
@@ -104,12 +116,31 @@ Ext.define('PBS.datastore.DataStoreListSummary', {
'</center>',
],
bind: {
- visible: '{error}',
+ visible: '{error && !maintenance}',
data: {
text: '{error}',
},
},
},
+ {
+ xtype: 'box',
+ reference: 'errorBox',
+ hidden: true,
+ tpl: [
+ '<center>',
+ `<h3>${gettext("Maintenance mode")}</h3>`,
+ '<i class="fa fa-5x fa-wrench"></i>',
+ '<br /><br/>',
+ '{text}',
+ '</center>',
+ ],
+ bind: {
+ visible: '{maintenance}',
+ data: {
+ text: '{maintenance}',
+ },
+ },
+ },
{
xtype: 'proxmoxGauge',
warningThreshold: 0.8,
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] ui: add maintenance mask to DataStoreListSummary
2022-05-06 9:58 [pbs-devel] [PATCH proxmox-backup] ui: add maintenance mask to DataStoreListSummary Hannes Laimer
@ 2022-05-16 16:13 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-05-16 16:13 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Hannes Laimer
Am 5/6/22 um 11:58 schrieb Hannes Laimer:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> www/datastore/DataStoreListSummary.js | 33 ++++++++++++++++++++++++++-
> 1 file changed, 32 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-16 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 9:58 [pbs-devel] [PATCH proxmox-backup] ui: add maintenance mask to DataStoreListSummary Hannes Laimer
2022-05-16 16:13 ` [pbs-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox