all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH v2 proxmox-backup 09/15] ui: add verify job edit window
Date: Thu, 8 Oct 2020 11:58:59 +0200	[thread overview]
Message-ID: <63716ca1-3519-5752-4924-5f5c36deabbd@proxmox.com> (raw)
In-Reply-To: <20201007090324.42928-10-h.laimer@proxmox.com>

one comment inline

On 10/7/20 11:03 AM, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>   www/Makefile                |  1 +
>   www/window/VerifyJobEdit.js | 89 +++++++++++++++++++++++++++++++++++++
>   2 files changed, 90 insertions(+)
>   create mode 100644 www/window/VerifyJobEdit.js
> 
> diff --git a/www/Makefile b/www/Makefile
> index a6c46718..e04af930 100644
> --- a/www/Makefile
> +++ b/www/Makefile
> @@ -20,6 +20,7 @@ JSSRC=							\
>   	config/DataStoreConfig.js			\
>   	window/UserEdit.js				\
>   	window/UserPassword.js				\
> +	window/VerifyJobEdit.js				\
>   	window/RemoteEdit.js				\
>   	window/SyncJobEdit.js				\
>   	window/ACLEdit.js				\
> diff --git a/www/window/VerifyJobEdit.js b/www/window/VerifyJobEdit.js
> new file mode 100644
> index 00000000..985d2ef6
> --- /dev/null
> +++ b/www/window/VerifyJobEdit.js
> @@ -0,0 +1,89 @@
> +Ext.define('PBS.window.VerifyJobEdit', {
> +    extend: 'Proxmox.window.Edit',
> +    alias: 'widget.pbsVerifyJobEdit',
> +    mixins: ['Proxmox.Mixin.CBind'],
> +
> +    userid: undefined,
> +
> +    onlineHelp: 'verifyjobs',
> +
> +    isAdd: true,
> +
> +    subject: gettext('VerifyJob'),
> +
> +    fieldDefaults: { labelWidth: 120 },
> +
> +    cbindData: function(initialConfig) {
> +	let me = this;
> +
> +	let baseurl = '/api2/extjs/config/verify';
> +	let id = initialConfig.id;
> +
> +	me.isCreate = !id;
> +	me.url = id ? `${baseurl}/${id}` : baseurl;
> +	me.method = id ? 'PUT' : 'POST';
> +	me.autoLoad = !!id;
> +	return { };
> +    },
> +
> +    items: {
> +	xtype: 'inputpanel',
> +	column1: [
> +	    {
> +		fieldLabel: gettext('Verify Job ID'),
> +		xtype: 'pmxDisplayEditField',
> +		name: 'id',
> +		renderer: Ext.htmlEncode,
> +		allowBlank: false,
> +		minLength: 4,
> +		cbind: {
> +		    editable: '{isCreate}',
> +		},
> +	    },
> +	    {
> +		fieldLabel: gettext('Datastore'),
> +		xtype: 'pbsDataStoreSelector',
> +		allowBlank: false,
> +		name: 'store',
> +	    },
> +	    {
> +		xtype: 'proxmoxintegerfield',
> +		fieldLabel: gettext('Days valid'),
> +		minValue: 1,
> +		value: '',
> +		allowBlank: true,
> +		name: 'outdated-after'

i would also add a

cbind: {
     deleteEmpty: '{!isCreate}'
}

here (basically every field that is optional and can be empty should 
have that)

> +	    },
> +	],
> +
> +	column2: [
> +	    {
> +		fieldLabel: gettext('Ignore verified'),
> +		xtype: 'proxmoxcheckbox',
> +		name: 'ignore-verified',
> +		uncheckedValue: false,
> +		value: true,
> +	    },
> +	    {
> +		fieldLabel: gettext('Schedule'),
> +		xtype: 'pbsCalendarEvent',
> +		name: 'schedule',
> +		emptyText: gettext('none'),
> +		cbind: {
> +		    deleteEmpty: '{!isCreate}',
> +		},
> +	    },
> +	],
> +
> +	columnB: [
> +	    {
> +		fieldLabel: gettext('Comment'),
> +		xtype: 'proxmoxtextfield',
> +		name: 'comment',
> +		cbind: {
> +		    deleteEmpty: '{!isCreate}',
> +		},
> +	    },
> +	],
> +    },
> +});
> 





  reply	other threads:[~2020-10-08  9:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  9:03 [pbs-devel] [PATCH v2 proxmox-backup 00/15] add job based verify scheduling Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 01/15] add two new schemas for verify jobs Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 02/15] add verify job config Hannes Laimer
2020-10-08  7:50   ` Wolfgang Bumiller
2020-10-08  8:15     ` Dominik Csapak
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 03/15] api2: add verify job config endpoint Hannes Laimer
2020-10-08  8:22   ` Wolfgang Bumiller
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 04/15] add do_verification_job function to verify.rs Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 05/15] api2: add verify job admin endpoint Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 06/15] add scheduling for verify jobs Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 07/15] set a diffrent worker_type based on what is going to be verified(snapshot, group, ds) Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 08/15] ui: add verify job view Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 09/15] ui: add verify job edit window Hannes Laimer
2020-10-08  9:58   ` Dominik Csapak [this message]
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 10/15] ui: add task descriptions for the different types of verify(job, snapshot, group, ds) Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 11/15] remove verify_schedule field from DatastoreConfig Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 12/15] remove verify_schedule field from datastore config endpoint Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 13/15] remove verify-schedule field from DataStoreEdit and DataStoreConfig Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 14/15] remove old verification scheduling from proxmox-backup-proxy.rs Hannes Laimer
2020-10-07  9:03 ` [pbs-devel] [PATCH v2 proxmox-backup 15/15] verify job: log number of planned verifications Hannes Laimer

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=63716ca1-3519-5752-4924-5f5c36deabbd@proxmox.com \
    --to=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