all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Lukas Wagner <l.wagner@proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v6 6/6] ui: add support for optional Remote in SyncJob
Date: Sat, 25 Nov 2023 17:16:48 +0100	[thread overview]
Message-ID: <00acc107-9c54-4018-9ead-c345d7f395a4@proxmox.com> (raw)
In-Reply-To: <4219ee34-147e-4112-bcd2-3aaa5d6fcfd9@proxmox.com>

Am 24/11/2023 um 11:36 schrieb Lukas Wagner:
> 
> 
> On 11/21/23 15:31, Hannes Laimer wrote:
>> diff --git a/www/Utils.js b/www/Utils.js
>> index 2eca600e..d7f11cb6 100644
>> --- a/www/Utils.js
>> +++ b/www/Utils.js
>> @@ -711,6 +711,11 @@ Ext.define('PBS.Utils', {
>>   	return Ext.String.htmlEncode(value);
>>       },
>>   
>> +    render_optional_remote: function(value, metadata, record) {
> Nit: New functions/variables should use camelCase, see
> https://pve.proxmox.com/wiki/Javascript_Style_Guide#Casing

I agree, but kept this as is, because the function above this
is named render_optional_namespace, this probably should be fixed in a more
tree-wide manner

> 
>> +	if (!value) return `- (${gettext('Local')})`;
> Nit: Don't use single-line if statements for new code, see
> https://pve.proxmox.com/wiki/Javascript_Style_Guide#Single-Line_If-Statement

fixed in a follow-up, those are indeed not nice to read.

>> +			listeners: {
>> +			    change: function(_group, radio) {
> 
> Nit: This component already has a controller, including a 'control'
> section for event routing - I guess it would be cleaner
> if this function was part of the controller, triggered
> by an entry for 'control'?
> 
> See:
> https://docs-devel.sencha.com/extjs/7.0.0/classic/Ext.app.ViewController.html#cfg-control
> 
> However, it seems like other form elements here already use the same 
> approach as you, so I guess it's fine.


Yeah I agree, if there's a controller then all* view logic should use
that. But no biggie for now.

*there certainly are exceptions like to all rules/guidelines




  reply	other threads:[~2023-11-25 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 14:31 [pbs-devel] [PATCH proxmox-backup v6 0/6] local sync-jobs Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 1/6] accept a ref to a HttpClient Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 2/6] pull: refactor pulling from a datastore Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 3/6] pull: add support for pulling from local datastore Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 4/6] manager: add completion for opt. Remote in SyncJob Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 5/6] api: make Remote for SyncJob optional Hannes Laimer
2023-11-21 14:31 ` [pbs-devel] [PATCH proxmox-backup v6 6/6] ui: add support for optional Remote in SyncJob Hannes Laimer
2023-11-24 10:36   ` Lukas Wagner
2023-11-25 16:16     ` Thomas Lamprecht [this message]
2023-11-22 10:14 ` [pbs-devel] [PATCH proxmox-backup v6 0/6] local sync-jobs Gabriel Goller
2023-11-24 10:38 ` Lukas Wagner
2023-11-25 16:14 ` [pbs-devel] applied: " Thomas Lamprecht

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=00acc107-9c54-4018-9ead-c345d7f395a4@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=l.wagner@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