From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 493F51FF172
	for <inbox@lore.proxmox.com>; Tue,  1 Apr 2025 10:23:33 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 7F6AE1C037;
	Tue,  1 Apr 2025 10:23:22 +0200 (CEST)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Tue,  1 Apr 2025 10:23:14 +0200
Message-Id: <20250401082318.1312661-1-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.39.5
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.021 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH storage/manager v5] allow down/upload & import
 of images in the web UI
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

most of the building blocks are already there:
* we can have image files in an import storage
* we can import image files via the api from such a storage

this series fills in the missing bits & pieces:
* allow uploading/downloading image files into an import storage via the webgui
* adding the possibility to select such a file when creating a vm/disk

One minor "ugliness": when switching between import on/off, the target
storage selector resets. This is normally intended by the component,
since it's most often only disabled when it's still visible, except here
in this case.

If this is a blocker, I can of course add an option to the selector
to not do this here, but IMHO this is a rather odd use case anyway,
so I opted for not handling that explicitely.

changes from v4:
* add an 'extension alias' mechanism for the upload window,
  to have separate extensions to validate for the file selector
  and the file name field (thanks for noticing @Filip)

changes from v3:
* allow raw (.raw, .img) and vmdk files too
* automatically append '.raw' for '.img' files

changes from v2:
* fix correctly unset 'import-from' in wizard when going to summary,
  back to disk, unselecting import, then going forward to the summary
  again
* fixed an issue with the file selector being mistakenly disabled

changes from v1:
* fixed an issue where the file selector would be hidden but invalid

pve-storage:

Dominik Csapak (1):
  import: allow upload of guest images files into import storage

 src/PVE/API2/Storage/Status.pm | 17 ++++++++++++++++-
 src/PVE/Storage.pm             |  3 ++-
 2 files changed, 18 insertions(+), 2 deletions(-)

pve-manager:

Dominik Csapak (3):
  ui: storage content: allow upload of guest images for import type
  ui: form: file selector: allow optional filter
  ui: qemu hd edit: allow importing a disk from the import storage

 www/manager6/form/FileSelector.js           | 10 +++
 www/manager6/qemu/HDEdit.js                 | 71 ++++++++++++++++++++-
 www/manager6/window/DownloadUrlToStorage.js |  4 ++
 www/manager6/window/UploadToStorage.js      | 24 +++++--
 4 files changed, 104 insertions(+), 5 deletions(-)

-- 
2.39.5



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