[pve-devel] [pve-manager 1/4] Rename Wizard Component aliases using camelCase

Dominik Csapak d.csapak at proxmox.com
Wed Jul 6 14:10:27 CEST 2016


looks good, but i think we can also drop the []

On 07/06/2016 10:32 AM, Emmanuel Kasper wrote:
> this is ExtJS recommended practise, follows most of our
> conventions and is necessary for querying
> components with Ext.ComponentQuery.query() without escaping the
> dots in the component widget name.
> ---
>  www/manager6/form/BusTypeSelector.js     | 2 +-
>  www/manager6/form/ControllerSelector.js  | 4 ++--
>  www/manager6/form/NetworkCardSelector.js | 2 +-
>  www/manager6/qemu/CDEdit.js              | 2 +-
>  www/manager6/qemu/CreateWizard.js        | 7 ++++---
>  www/manager6/qemu/HDEdit.js              | 2 +-
>  www/manager6/qemu/MemoryEdit.js          | 2 +-
>  www/manager6/qemu/NetworkEdit.js         | 2 +-
>  www/manager6/qemu/OSTypeEdit.js          | 2 +-
>  www/manager6/qemu/ProcessorEdit.js       | 2 +-
>  10 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/www/manager6/form/BusTypeSelector.js b/www/manager6/form/BusTypeSelector.js
> index 641eda8..096d5c2 100644
> --- a/www/manager6/form/BusTypeSelector.js
> +++ b/www/manager6/form/BusTypeSelector.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.form.BusTypeSelector', {
>      extend: 'PVE.form.KVComboBox',
> -    alias: ['widget.PVE.form.BusTypeSelector'],
> +    alias: ['widget.pveBusSelector'],
>
>      noVirtIO: false,
>
> diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
> index 72c4767..86e620e 100644
> --- a/www/manager6/form/ControllerSelector.js
> +++ b/www/manager6/form/ControllerSelector.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.form.ControllerSelector', {
>      extend: 'Ext.form.FieldContainer',
> -    alias: ['widget.PVE.form.ControllerSelector'],
> +    alias: ['widget.pveControllerSelector'],
>
>      statics: {
>  	maxIds: {
> @@ -65,7 +65,7 @@ Ext.define('PVE.form.ControllerSelector', {
>  	    },
>  	    items: [
>  		{
> -		    xtype: 'PVE.form.BusTypeSelector',
> +		    xtype: 'pveBusSelector',
>  		    name: 'controller',
>  		    value: 'ide',
>  		    noVirtIO: me.noVirtIO,
> diff --git a/www/manager6/form/NetworkCardSelector.js b/www/manager6/form/NetworkCardSelector.js
> index 699e0a9..624b030 100644
> --- a/www/manager6/form/NetworkCardSelector.js
> +++ b/www/manager6/form/NetworkCardSelector.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.form.NetworkCardSelector', {
>      extend: 'PVE.form.KVComboBox',
> -    alias: ['widget.PVE.form.NetworkCardSelector'],
> +    alias: ['widget.pveNetworkCardSelector'],
>      comboItems: [
>  	['e1000', 'Intel E1000'],
>  	['virtio', 'VirtIO (' + gettext('paravirtualized') + ')'],
> diff --git a/www/manager6/qemu/CDEdit.js b/www/manager6/qemu/CDEdit.js
> index 651c137..1a6617d 100644
> --- a/www/manager6/qemu/CDEdit.js
> +++ b/www/manager6/qemu/CDEdit.js
> @@ -72,7 +72,7 @@ Ext.define('PVE.qemu.CDInputPanel', {
>  	var items = [];
>
>  	if (!me.confid) {
> -	    me.bussel = Ext.createWidget('PVE.form.ControllerSelector', {
> +	    me.bussel = Ext.create('PVE.form.ControllerSelector', {
>  		noVirtIO: true
>  	    });
>  	    items.push(me.bussel);
> diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
> index d692117..91bff38 100644
> --- a/www/manager6/qemu/CreateWizard.js
> +++ b/www/manager6/qemu/CreateWizard.js
> @@ -2,6 +2,7 @@
>  /*jslint confusion: true */
>  Ext.define('PVE.qemu.CreateWizard', {
>      extend: 'PVE.window.Wizard',
> +    alias: 'widget.pveQemuCreateWizard',
>
>      initComponent: function() {
>  	var me = this;
> @@ -96,16 +97,16 @@ Ext.define('PVE.qemu.CreateWizard', {
>  		},
>  		{
>  		    title: gettext('OS'),
> -		    xtype: 'PVE.qemu.OSTypeInputPanel'
> +		    xtype: 'pveQemuOSTypePanel'
>  		},
>  		cdpanel,
>  		hdpanel,
>  		{
> -		    xtype: 'PVE.qemu.ProcessorInputPanel',
> +		    xtype: 'pveQemuProcessorPanel',
>  		    title: gettext('CPU')
>  		},
>  		{
> -		    xtype: 'PVE.qemu.MemoryInputPanel',
> +		    xtype: 'pveQemuMemoryPanel',
>  		    insideWizard: true,
>  		    title: gettext('Memory')
>  		},
> diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
> index 9da2e6b..c86ab44 100644
> --- a/www/manager6/qemu/HDEdit.js
> +++ b/www/manager6/qemu/HDEdit.js
> @@ -170,7 +170,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
>  	me.column2 = [];
>
>  	if (!me.confid || me.unused) {
> -	    me.bussel = Ext.createWidget('PVE.form.ControllerSelector', {
> +	    me.bussel = Ext.create('PVE.form.ControllerSelector', {
>  		vmconfig: me.insideWizard ? {ide2: 'cdrom'} : {}
>  	    });
>  	    me.column1.push(me.bussel);
> diff --git a/www/manager6/qemu/MemoryEdit.js b/www/manager6/qemu/MemoryEdit.js
> index 7b57959..0725eac 100644
> --- a/www/manager6/qemu/MemoryEdit.js
> +++ b/www/manager6/qemu/MemoryEdit.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.qemu.MemoryInputPanel', {
>      extend: 'PVE.panel.InputPanel',
> -    alias: 'widget.PVE.qemu.MemoryInputPanel',
> +    alias: 'widget.pveQemuMemoryPanel',
>      onlineHelp: 'chapter-qm.html#_memory',
>
>      insideWizard: false,
> diff --git a/www/manager6/qemu/NetworkEdit.js b/www/manager6/qemu/NetworkEdit.js
> index a8019db..8a4945d 100644
> --- a/www/manager6/qemu/NetworkEdit.js
> +++ b/www/manager6/qemu/NetworkEdit.js
> @@ -124,7 +124,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
>
>  	me.column2 = [
>  	    {
> -		xtype: 'PVE.form.NetworkCardSelector',
> +		xtype: 'pveNetworkCardSelector',
>  		name: 'model',
>  		fieldLabel: gettext('Model'),
>  		value: 'e1000',
> diff --git a/www/manager6/qemu/OSTypeEdit.js b/www/manager6/qemu/OSTypeEdit.js
> index 62d9866..2fc8997 100644
> --- a/www/manager6/qemu/OSTypeEdit.js
> +++ b/www/manager6/qemu/OSTypeEdit.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.qemu.OSTypeInputPanel', {
>      extend: 'PVE.panel.InputPanel',
> -    alias: 'widget.PVE.qemu.OSTypeInputPanel',
> +    alias: 'widget.pveQemuOSTypePanel',
>      onlineHelp: 'chapter-qm.html#_os_settings',
>
>      initComponent : function() {
> diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js
> index f5a131e..c3e2bc0 100644
> --- a/www/manager6/qemu/ProcessorEdit.js
> +++ b/www/manager6/qemu/ProcessorEdit.js
> @@ -1,6 +1,6 @@
>  Ext.define('PVE.qemu.ProcessorInputPanel', {
>      extend: 'PVE.panel.InputPanel',
> -    alias: 'widget.PVE.qemu.ProcessorInputPanel',
> +    alias: 'widget.pveQemuProcessorPanel',
>      onlineHelp: 'chapter-qm.html#_cpu',
>
>      onGetValues: function(values) {
>





More information about the pve-devel mailing list