all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup 2/2] ui: GC/prune: pass tasks last run endtime to task viewer
Date: Mon, 4 May 2026 09:04:47 +0200	[thread overview]
Message-ID: <20e6e6c7-c4fe-4b72-aa90-1f201941579c@proxmox.com> (raw)
In-Reply-To: <60072553-b386-441b-9c0a-7c301b9ccfbb@proxmox.com>

On 5/4/26 8:33 AM, Dominik Csapak wrote:
> passing the endtime from the grids look good to me, but
> one comment inline
> 
> On 4/30/26 2:09 PM, Christian Ebner wrote:
>> Same issue as tackled by commit e8552dae3 ("ui: sync/verify view:
>> show correct duration in task log window"), pass the last run
>> endtime to the task log window for correct calculation of the
>> job duration for finished jobs, not using the current time.
>>
>> For correctly showing the verification task status in datastore
>> contents, an additional API request is required first to get the
>> endtime. Other call sites arelady have the required information.
>>
>> Fixes: https://forum.proxmox.com/threads/183157/
>> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
>> ---
>>   www/config/GCView.js     |  9 ++++++---
>>   www/config/PruneView.js  |  3 +++
>>   www/datastore/Content.js | 14 +++++++++++---
>>   www/tape/BackupJobs.js   |  3 +++
>>   4 files changed, 23 insertions(+), 6 deletions(-)
>>
>> diff --git a/www/config/GCView.js b/www/config/GCView.js
>> index 9fcc22344..5f4e625fa 100644
>> --- a/www/config/GCView.js
>> +++ b/www/config/GCView.js
>> @@ -98,12 +98,15 @@ Ext.define('PBS.config.GCJobView', {
>>           showTaskLog: function () {
>>               let _me = this;
>> -            let upid = this.getData().upid;
>> -            if (!upid) {
>> +            let data = this.getData();
>> +            if (!data.upid) {
>>                   return;
>>               }
>> -            Ext.create('Proxmox.window.TaskViewer', { upid }).show();
>> +            Ext.create('Proxmox.window.TaskViewer', {
>> +                upid: data.upid,
>> +                endtime: data['last-run-endtime'],
>> +            }).show();
>>           },
>>           startStore: function () {
>> diff --git a/www/config/PruneView.js b/www/config/PruneView.js
>> index f38724687..431a1ddcf 100644
>> --- a/www/config/PruneView.js
>> +++ b/www/config/PruneView.js
>> @@ -99,9 +99,12 @@ Ext.define('PBS.config.PruneJobView', {
>>                   return;
>>               }
>> +            let endtime = selection[0].data['last-run-endtime'];
>> +
>>               Ext.create('Proxmox.window.TaskViewer', {
>>                   autoShow: true,
>>                   upid,
>> +                endtime,
>>               });
>>           },
>> diff --git a/www/datastore/Content.js b/www/datastore/Content.js
>> index 1ec07505d..0d968b52e 100644
>> --- a/www/datastore/Content.js
>> +++ b/www/datastore/Content.js
>> @@ -1399,9 +1399,17 @@ Ext.define('PBS.DataStoreContent', {
>>                   dblclick: function (view, el, row, col, ev, rec) {
>>                       let verify = rec?.data?.verification;
>>                       if (verify?.upid && rec.parentNode?.id !== 
>> 'root') {
>> -                        Ext.create('Proxmox.window.TaskViewer', {
>> -                            autoShow: true,
>> -                            upid: verify.upid,
>> +                        Proxmox.Utils.API2Request({
>> +                            url: `/nodes/localhost/tasks/ 
>> ${encodeURIComponent(verify.upid)}/status`,
>> +                            failure: function (response) {
>> +                                Ext.Msg.alert(gettext('Error'), 
>> response.htmlStatus);
>> +                            },
>> +                            success: function (response, options) {
>> +                                
>> Ext.create('Proxmox.window.TaskViewer', {
>> +                                    upid: response.result.data.upid,
>> +                                    endtime: 
>> response.result.data.endtime,
>> +                                }).show();
>> +                            },
>>                           });
> 
> instead of doing an extra api call here, I'd favor using the endtime
> from the status api call directly in the taskviewer in proxmox-widget- 
> toolkit. That window does poll the status anyway.

True, that is even better: It could fallback to getting the endtime from 
the response there if not explicitly given at creation time.

Will incorporate that into a version 2 of the patches, thanks for review!




  reply	other threads:[~2026-05-04  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 12:10 [PATCH proxmox-backup 0/2] additional task endtime fixes Christian Ebner
2026-04-30 12:10 ` [PATCH proxmox-backup 1/2] api: node: return optional endtime in tasks status Christian Ebner
2026-04-30 12:10 ` [PATCH proxmox-backup 2/2] ui: GC/prune: pass tasks last run endtime to task viewer Christian Ebner
2026-05-04  6:34   ` Dominik Csapak
2026-05-04  7:04     ` Christian Ebner [this message]
2026-05-04  8:02   ` Thomas Lamprecht
2026-05-04  8:11     ` Christian Ebner
2026-05-04 15:45 ` superseded: [PATCH proxmox-backup 0/2] additional task endtime fixes Christian Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20e6e6c7-c4fe-4b72-aa90-1f201941579c@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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