public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore add: validate if path is absolute
Date: Fri, 26 Apr 2024 08:27:30 +0200	[thread overview]
Message-ID: <20240426062731.501439-1-d.csapak@proxmox.com> (raw)

the backend checks this too, but by then we closed the window already
and the user has to start adding again.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/window/DataStoreEdit.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/window/DataStoreEdit.js b/www/window/DataStoreEdit.js
index b61154606..4d4c528f3 100644
--- a/www/window/DataStoreEdit.js
+++ b/www/window/DataStoreEdit.js
@@ -61,6 +61,7 @@ Ext.define('PBS.DataStoreEdit', {
 			allowBlank: false,
 			fieldLabel: gettext('Backing Path'),
 			emptyText: gettext('An absolute path'),
+			validator: v => v.startsWith('/') ? true : gettext('Path must be absolute.'),
 		    },
 		],
 		column2: [
-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


             reply	other threads:[~2024-04-26  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  6:27 Dominik Csapak [this message]
2024-04-26  6:27 ` [pbs-devel] [PATCH proxmox-backup 2/2] ui: prune jobs: add enabled column in grid Dominik Csapak

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=20240426062731.501439-1-d.csapak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal