From: Fabian Ebner <f.ebner@proxmox.com>
To: Matthias Heiserer <m.heiserer@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 3/3] Storage GUI: Rewrite backup content view as TreePanel.
Date: Fri, 11 Mar 2022 12:57:10 +0100 [thread overview]
Message-ID: <9a29fae2-e96c-a3c3-8e03-57ad8b512cf8@proxmox.com> (raw)
In-Reply-To: <9b872072-c6f0-3110-e532-b7225e8db2cb@proxmox.com>
Am 11.03.22 um 12:33 schrieb Matthias Heiserer:
> On 09.03.2022 13:39, Fabian Ebner wrote:
>> Am 04.03.22 um 12:52 schrieb Matthias Heiserer:
> 8< --------->
>> It'd be great if you could also remove the now unused stuff from the
>> ContentView base class.
>>
>> Did you think about a way to re-use this new class for the guest's
>> backup view already?
> Not yet, as I wasn't certain whether there is a need. Will do both.
If it's possible to do without too much overhead, it's certainly nicer
than the current approach of having duplicated code to keep in sync.
>>
>>> +Ext.define('pve-data-store-backups', {
>>
>> Nit: datastore is not typical for PVE, and I'd prefer singular 'backup'.
>>
>>> + extend: 'Ext.data.Model',
>>> + fields: [
>>> + {
>>> + name: 'ctime',
>>> + date: 'date',
>>> + dateFormat: 'timestamp',
>>> + },
>>> + 'format',
>>> + 'volid',
>>> + 'content',
>>> + 'vmid',
>>> + 'size',
>>> + 'protected',
>>> + 'notes',
>>
>> Does not mention 'text' which is assigned later. And ContentView has
>> special handling to not display the full volid. Please also use
>> PVE.Utils.render_storage_content() for that here. Or we might want to
>> switch to using only the date for the leafs? But that needs some
>> consideration for filtering, and renamed backups which we currently
>> support..
>>
> For now, I would stay with displaying the full date and time, as it is
> the simplest solution.
I meant 'date and time' ;) Just not happy with displaying the full volid.
> 8< ---------
>> @Thomas: in PBS it's also ascending by date. Should that be changed or
>> do we switch back in PVE?
>>
>>> + 'backup-time',
>>
>> Isn't it ctime? That said, ContentView has some special handling for the
>> 'vdate' column, so maybe we should continue using that. It seems like
>> the back-end automatically sets the ctime to be the one from the archive
>> name via archive_info() in case it's a standard name, so maybe it
>> doesn't actually matter.
>>
> Yes, should be ctime.
> From what I understand, vdate in ContentView isn't something from the
> API, but just some convoluted way of displaying ctime. Functionally,
> there shouldn't be any differences.
Before pve-storage commit 9c629b3e76a6c70314a385982944fe7ca051947c, the
API didn't return the ctime calculated from the backup name. The code
for the vdate calculation is older. Using ctime from the API should be fine.
>
> 8< ---------
>>
>>> + let latest = c.reduce((l, r) => l.ctime > r.ctime ? l : r);
>>> + let num_verified = c.reduce((l, r) => l + r.verification ===
>>> 'ok', 0);
>>
>> Does adding a boolean work reliably? Feels hacky.
> According to ECMA standard 7.1.4, which I believe is the relevant
> section, it works just intended and converts true to 1 and false to 0.
>
> 8< ---------
>
> Agree with everything else. Thanks!
next prev parent reply other threads:[~2022-03-11 11:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 11:52 [pve-devel] [PATCH manager 1/3] GUI: Allow passing the node to BackupConfig directly Matthias Heiserer
2022-03-04 11:52 ` [pve-devel] [PATCH manager 2/3] GUI: Utils: Helpers for backup type and icon Matthias Heiserer
2022-03-09 12:32 ` Fabian Ebner
2022-03-04 11:52 ` [pve-devel] [PATCH manager 3/3] Storage GUI: Rewrite backup content view as TreePanel Matthias Heiserer
2022-03-09 12:39 ` Fabian Ebner
[not found] ` <9b872072-c6f0-3110-e532-b7225e8db2cb@proxmox.com>
2022-03-11 11:57 ` Fabian Ebner [this message]
2022-03-09 12:28 ` [pve-devel] [PATCH manager 1/3] GUI: Allow passing the node to BackupConfig directly Fabian 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=9a29fae2-e96c-a3c3-8e03-57ad8b512cf8@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=m.heiserer@proxmox.com \
--cc=pve-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