[pbs-devel] [PATCH v5 proxmox-backup 25/31] ui: sync view: set sync direction when invoking run task via api

Dominik Csapak d.csapak at proxmox.com
Fri Oct 25 12:44:35 CEST 2024


imho this and the previous patch should be squashed together,
since the previous one mentions this behaviour anyway
and does not make much sense without

On 10/18/24 10:42, Christian Ebner wrote:
> 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 4:
> - no changes
> 
> changes since version 3:
> - 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,





More information about the pbs-devel mailing list