[pbs-devel] [PATCH v3 proxmox-backup 28/33] ui: sync view: set sync direction when invoking run task via api
Christian Ebner
c.ebner at proxmox.com
Thu Sep 12 16:33:17 CEST 2024
Set the correct sync direction for the task to be executed.
Otherwise the task whit the correct id cannot be found as the config
lookup requires the correct config type to be set, which is done
based on the sync direction.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 2:
- no changes
www/config/SyncView.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/www/config/SyncView.js b/www/config/SyncView.js
index 39e464fc5..bf0c7e8c0 100644
--- a/www/config/SyncView.js
+++ b/www/config/SyncView.js
@@ -83,9 +83,14 @@ Ext.define('PBS.config.SyncJobView', {
if (selection.length < 1) return;
let id = selection[0].data.id;
+ let params = {};
+ if (view.syncDirection !== undefined) {
+ params["sync-direction"] = view.syncDirection;
+ }
Proxmox.Utils.API2Request({
method: 'POST',
url: `/admin/sync/${id}/run`,
+ params: params,
success: function(response, opt) {
Ext.create('Proxmox.window.TaskViewer', {
upid: response.result.data,
--
2.39.2
More information about the pbs-devel
mailing list