* [pve-devel] [PATCH-SERIES v3] improve warnings handling in UI and add to PVE
@ 2021-07-08 9:14 Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again Fabian Ebner
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Fabian Ebner @ 2021-07-08 9:14 UTC (permalink / raw)
To: pve-devel, pbs-devel
Changes from v2:
* dropped already applied patches
* new patch to re-add helper usage to widget-toolkit's task list
Not much remaining of the series, just re-use the helper where
possible, and the example usage of the feature in PVE for container
restore as non-root.
The last patch requires a dependency bump: pve-container -> pve-common
proxmox-widget-toolkit:
Fabian Ebner (1):
node: tasks: use helper to format status again
src/node/Tasks.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
proxmox-backup:
Fabian Ebner (1):
ui: tasks: use format_task_status
www/panel/Tasks.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
pve-container:
Fabian Ebner (1):
restore: sanitize config: use new warn() function
src/PVE/LXC/Create.pm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [pve-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again
2021-07-08 9:14 [pve-devel] [PATCH-SERIES v3] improve warnings handling in UI and add to PVE Fabian Ebner
@ 2021-07-08 9:14 ` Fabian Ebner
2021-07-08 9:50 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-backup 1/1] ui: tasks: use format_task_status Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH/RFC v3 pve-container 1/1] restore: sanitize config: use new warn() function Fabian Ebner
2 siblings, 1 reply; 7+ messages in thread
From: Fabian Ebner @ 2021-07-08 9:14 UTC (permalink / raw)
To: pve-devel, pbs-devel
which avoids the all-caps "WARNINGS:" and uses the localized version.
The call was thrown out by the big overhaul in
9e059d560c872f14aef0e586010a6b6a91ce2729.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
New in v3, but essentially restoring the already applied
4294143f92f43c3288304b35de3419b035d38cd2.
src/node/Tasks.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/node/Tasks.js b/src/node/Tasks.js
index aa074b4..c852615 100644
--- a/src/node/Tasks.js
+++ b/src/node/Tasks.js
@@ -435,14 +435,7 @@ Ext.define('Proxmox.node.Tasks', {
return '';
}
- let parsed = Proxmox.Utils.parse_task_status(value);
- switch (parsed) {
- case 'unknown': return Proxmox.Utils.unknownText;
- case 'error': return Proxmox.Utils.errorText + ': ' + value;
- case 'ok': // fall-through
- case 'warning': // fall-through
- default: return value;
- }
+ return Proxmox.Utils.format_task_status(value);
},
},
],
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [pve-devel] [PATCH v3 proxmox-backup 1/1] ui: tasks: use format_task_status
2021-07-08 9:14 [pve-devel] [PATCH-SERIES v3] improve warnings handling in UI and add to PVE Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again Fabian Ebner
@ 2021-07-08 9:14 ` Fabian Ebner
2021-07-08 9:45 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2021-07-08 9:14 ` [pve-devel] [PATCH/RFC v3 pve-container 1/1] restore: sanitize config: use new warn() function Fabian Ebner
2 siblings, 1 reply; 7+ messages in thread
From: Fabian Ebner @ 2021-07-08 9:14 UTC (permalink / raw)
To: pve-devel, pbs-devel
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
No changes from v2.
www/panel/Tasks.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/www/panel/Tasks.js b/www/panel/Tasks.js
index a194e478..a64e0eee 100644
--- a/www/panel/Tasks.js
+++ b/www/panel/Tasks.js
@@ -372,14 +372,7 @@ Ext.define('PBS.node.Tasks', {
return '';
}
- let parsed = Proxmox.Utils.parse_task_status(value);
- switch (parsed) {
- case 'unknown': return Proxmox.Utils.unknownText;
- case 'error': return Proxmox.Utils.errorText + ': ' + value;
- case 'ok': // fall-through
- case 'warning': // fall-through
- default: return value;
- }
+ return Proxmox.Utils.format_task_status(value);
},
},
],
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [pve-devel] [PATCH/RFC v3 pve-container 1/1] restore: sanitize config: use new warn() function
2021-07-08 9:14 [pve-devel] [PATCH-SERIES v3] improve warnings handling in UI and add to PVE Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-backup 1/1] ui: tasks: use format_task_status Fabian Ebner
@ 2021-07-08 9:14 ` Fabian Ebner
2021-10-14 11:05 ` [pve-devel] applied: " Thomas Lamprecht
2 siblings, 1 reply; 7+ messages in thread
From: Fabian Ebner @ 2021-07-08 9:14 UTC (permalink / raw)
To: pve-devel, pbs-devel
to make it more visible that the task finished with warnings.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Dependency bump for pve-common needed.
No changes from v2.
src/PVE/LXC/Create.pm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 82d7ad9..67b4c7a 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -6,6 +6,7 @@ use File::Basename;
use File::Path;
use Fcntl;
+use PVE::RPCEnvironment;
use PVE::Storage::PBSPlugin;
use PVE::Storage;
use PVE::DataCenterConfig;
@@ -306,6 +307,8 @@ sub restore_configuration_from_proxmox_backup {
sub sanitize_and_merge_config {
my ($conf, $oldconf, $restricted, $unique) = @_;
+ my $rpcenv = PVE::RPCEnvironment::get();
+
foreach my $key (keys %$oldconf) {
next if $key eq 'digest' || $key eq 'rootfs' || $key eq 'snapshots' || $key eq 'unprivileged' || $key eq 'parent';
next if $key =~ /^mp\d+$/; # don't recover mountpoints
@@ -316,12 +319,16 @@ sub sanitize_and_merge_config {
if ($key eq 'lxc' && $restricted) {
my $lxc_list = $oldconf->{'lxc'};
- warn "skipping custom lxc options, restore manually as root:\n";
- warn "--------------------------------\n";
+
+ my $msg = "skipping custom lxc options, restore manually as root:\n";
+ $msg .= "--------------------------------\n";
foreach my $lxc_opt (@$lxc_list) {
- warn "$lxc_opt->[0]: $lxc_opt->[1]\n"
+ $msg .= "$lxc_opt->[0]: $lxc_opt->[1]\n"
}
- warn "--------------------------------\n";
+ $msg .= "--------------------------------";
+
+ $rpcenv->warn($msg);
+
next;
}
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-10-14 11:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 9:14 [pve-devel] [PATCH-SERIES v3] improve warnings handling in UI and add to PVE Fabian Ebner
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again Fabian Ebner
2021-07-08 9:50 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2021-07-08 9:14 ` [pve-devel] [PATCH v3 proxmox-backup 1/1] ui: tasks: use format_task_status Fabian Ebner
2021-07-08 9:45 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2021-07-08 9:14 ` [pve-devel] [PATCH/RFC v3 pve-container 1/1] restore: sanitize config: use new warn() function Fabian Ebner
2021-10-14 11:05 ` [pve-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