* [pbs-devel] [PATCH widget-toolkit/proxmox-bacukp] fix remove datastore callback
@ 2021-06-04 9:44 Dominik Csapak
2021-06-04 9:44 ` [pbs-devel] [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks Dominik Csapak
2021-06-04 9:44 ` [pbs-devel] [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore Dominik Csapak
0 siblings, 2 replies; 5+ messages in thread
From: Dominik Csapak @ 2021-06-04 9:44 UTC (permalink / raw)
To: pbs-devel
only switch to the datastore overview when we actually removed
the datastore and not on canceling it
proxmox-backup depends on a bumped widget-toolkit
proxmox-widget-toolkit:
Dominik Csapak (1):
window/SafeDestroy: add taskDone and apiCallDone callbacks
src/window/SafeDestroy.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
proxmox-backup:
Dominik Csapak (1):
ui: datastore/OptionView: only navigate up when we removed the
datastore
www/datastore/OptionView.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks
2021-06-04 9:44 [pbs-devel] [PATCH widget-toolkit/proxmox-bacukp] fix remove datastore callback Dominik Csapak
@ 2021-06-04 9:44 ` Dominik Csapak
2021-07-08 12:07 ` [pbs-devel] applied: " Thomas Lamprecht
2021-06-04 9:44 ` [pbs-devel] [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore Dominik Csapak
1 sibling, 1 reply; 5+ messages in thread
From: Dominik Csapak @ 2021-06-04 9:44 UTC (permalink / raw)
To: pbs-devel
like in edit window, so we can reacto to a successful task/api call
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/window/SafeDestroy.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/window/SafeDestroy.js b/src/window/SafeDestroy.js
index b269f2d..ead0e04 100644
--- a/src/window/SafeDestroy.js
+++ b/src/window/SafeDestroy.js
@@ -17,6 +17,14 @@ Ext.define('Proxmox.window.SafeDestroy', {
additionalItems: [],
+ // gets called if we have a progress bar or taskview and it detected that
+ // the task finished. function(success)
+ taskDone: Ext.emptyFn,
+
+ // gets called when the api call is finished, right at the beginning
+ // function(success, response, options)
+ apiCallDone: Ext.emptyFn,
+
config: {
item: {
id: undefined,
@@ -66,6 +74,7 @@ Ext.define('Proxmox.window.SafeDestroy', {
method: 'DELETE',
waitMsgTarget: view,
failure: function(response, opts) {
+ view.apiCallDone(false, response, opts);
view.close();
Ext.Msg.alert('Error', response.htmlStatus);
},
@@ -73,6 +82,8 @@ Ext.define('Proxmox.window.SafeDestroy', {
const hasProgressBar = !!(view.showProgress &&
response.result.data);
+ view.apiCallDone(true, response, options);
+
if (hasProgressBar) {
// stay around so we can trigger our close events
// when background action is completed
@@ -81,6 +92,7 @@ Ext.define('Proxmox.window.SafeDestroy', {
const upid = response.result.data;
const win = Ext.create('Proxmox.window.TaskProgress', {
upid: upid,
+ taskDone: view.taskDone,
listeners: {
destroy: function() {
view.close();
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore
2021-06-04 9:44 [pbs-devel] [PATCH widget-toolkit/proxmox-bacukp] fix remove datastore callback Dominik Csapak
2021-06-04 9:44 ` [pbs-devel] [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks Dominik Csapak
@ 2021-06-04 9:44 ` Dominik Csapak
2021-07-08 14:39 ` [pbs-devel] applied: " Thomas Lamprecht
1 sibling, 1 reply; 5+ messages in thread
From: Dominik Csapak @ 2021-06-04 9:44 UTC (permalink / raw)
To: pbs-devel
and not on window close
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/datastore/OptionView.js | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js
index 98152dce..5a5e85be 100644
--- a/www/datastore/OptionView.js
+++ b/www/datastore/OptionView.js
@@ -33,13 +33,11 @@ Ext.define('PBS.Datastore.Options', {
note: gettext('Configuration change only, no data will be deleted.'),
autoShow: true,
taskName: 'delete-datastore',
- listeners: {
- destroy: () => {
- let navtree = Ext.ComponentQuery.query('navigationtree')[0];
- navtree.rstore.load();
- let mainview = me.getView().up('mainview');
- mainview.getController().redirectTo('pbsDataStores');
- },
+ apiCallDone: (success) => {
+ let navtree = Ext.ComponentQuery.query('navigationtree')[0];
+ navtree.rstore.load();
+ let mainview = me.getView().up('mainview');
+ mainview.getController().redirectTo('pbsDataStores');
},
});
},
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] applied: [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks
2021-06-04 9:44 ` [pbs-devel] [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks Dominik Csapak
@ 2021-07-08 12:07 ` Thomas Lamprecht
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2021-07-08 12:07 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
On 04.06.21 11:44, Dominik Csapak wrote:
> like in edit window, so we can reacto to a successful task/api call
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> src/window/SafeDestroy.js | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore
2021-06-04 9:44 ` [pbs-devel] [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore Dominik Csapak
@ 2021-07-08 14:39 ` Thomas Lamprecht
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2021-07-08 14:39 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Dominik Csapak
On 04.06.21 11:44, Dominik Csapak wrote:
> and not on window close
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/datastore/OptionView.js | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-08 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 9:44 [pbs-devel] [PATCH widget-toolkit/proxmox-bacukp] fix remove datastore callback Dominik Csapak
2021-06-04 9:44 ` [pbs-devel] [PATCH widget-toolkit 1/1] window/SafeDestroy: add taskDone and apiCallDone callbacks Dominik Csapak
2021-07-08 12:07 ` [pbs-devel] applied: " Thomas Lamprecht
2021-06-04 9:44 ` [pbs-devel] [PATCH proxmox-backup 1/1] ui: datastore/OptionView: only navigate up when we removed the datastore Dominik Csapak
2021-07-08 14:39 ` [pbs-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal