[pve-devel] [PATCH manager 1/3] Use camel case for InputPanels aliases

Emmanuel Kasper e.kasper at proxmox.com
Mon Jul 10 13:46:51 CEST 2017


On 07/10/2017 11:09 AM, Dominik Csapak wrote:
> On 07/06/2017 02:09 PM, Emmanuel Kasper wrote:
>> Camel Case names for component alias follow Ext recommended practises
>> and are used otherwise everyelse in the code base.
>>
>> No functionnal changes, aliases for these components were not used
>> anyway.
>> ---
>>  www/manager6/qemu/CDEdit.js      | 2 +-
>>  www/manager6/qemu/HDEdit.js      | 2 +-
>>  www/manager6/qemu/NetworkEdit.js | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/www/manager6/qemu/CDEdit.js b/www/manager6/qemu/CDEdit.js
>> index 1fd36774..51921b8d 100644
>> --- a/www/manager6/qemu/CDEdit.js
>> +++ b/www/manager6/qemu/CDEdit.js
>> @@ -1,6 +1,6 @@
>>  Ext.define('PVE.qemu.CDInputPanel', {
>>      extend: 'PVE.panel.InputPanel',
>> -    alias: 'widget.PVE.qemu.CDInputPanel',
>> +    alias: 'widget.pveQemuCDInputPanel',
>>
>>      insideWizard: false,
>>
>> diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
>> index 43e5d965..8f5c9dbe 100644
>> --- a/www/manager6/qemu/HDEdit.js
>> +++ b/www/manager6/qemu/HDEdit.js
>> @@ -2,7 +2,7 @@
>>  /* 'change' property is assigned a string and then a function */
>>  Ext.define('PVE.qemu.HDInputPanel', {
>>      extend: 'PVE.panel.InputPanel',
>> -    alias: 'widget.PVE.qemu.HDInputPanel',
>> +    alias: 'widget.pveQemuHDInputPanel',
>>      onlineHelp: 'qm_hard_disk',
>>
>>      insideWizard: false,
>> diff --git a/www/manager6/qemu/NetworkEdit.js
>> b/www/manager6/qemu/NetworkEdit.js
>> index b63f5ff0..7e994823 100644
>> --- a/www/manager6/qemu/NetworkEdit.js
>> +++ b/www/manager6/qemu/NetworkEdit.js
>> @@ -1,6 +1,6 @@
>>  Ext.define('PVE.qemu.NetworkInputPanel', {
>>      extend: 'PVE.panel.InputPanel',
>> -    alias: 'widget.PVE.qemu.NetworkInputPanel',
>> +    alias: 'widget.pveQemuNetworkInputPanel',
>>      onlineHelp: 'qm_network_device',
>>
>>      insideWizard: false,
>>
> 
> 
> while we already touching those lines, we could adapt the 'new' style of
> extjs:
> 
> instead of:
> 
> alias: 'widget.blalba'
> 
> we could use:
> 
> xtype: 'blabla'

agree with the general idea, but I would prefer to do this later in a
bigger refactoring commit where all the component 'alias' property would
be switched to 'xtype'

We already have different coding styles in the UI due to the different
ExtJS generation, I would prefer not to add the confusion.

ack for the rest of comments for this serie, and next one, I will V2
following your input




More information about the pve-devel mailing list