Commit Graph

5868 Commits

Author SHA1 Message Date
Thomas Lamprecht
01366f9e8c ui: move download URL to storage window into own file
As 200 lines is a bit much for the content view, i.e., basically
growing it by 50% in size for a very specific feature is not ideal.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:45:09 +02:00
Lorenz Stechauner
af3c0a9287 fix #1710: ui: storage: add download from url button
uses the common function PVE::Tools::download_file_from_url to
download a iso image or container template.

note: Only users with permissions `Sys.Audit` and `Sys.Modify` on
`/` are permitted to use the api endpoints due to security reasons.
(it is possible to download files from internal networks which would
be not visible/accessible from outside)

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:26 +02:00
Lorenz Stechauner
79035e5a0f ui: Utils: change download task format
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:24 +02:00
Lorenz Stechauner
17711ff849 api: nodes: add query_url_metadata method
metadata is gained using a HEAD request.

Due to the ability of this api endpoint to request files on internal
networks (which would not be visible/accessible from outside) it is
restricted to users with permissions `Sys.Audit` and `Sys.Modify` on
`/`. Users with these permissions are able to alter node (network)
config anyway, so this should not create any further security risk.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:20 +02:00
Thomas Lamprecht
16f9dcb8a0 d/control: bump versioned dependency on proxmox-widget-toolkit to 3.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:35:50 +02:00
Thomas Lamprecht
879e27c496 ui: realms: use address-book as default fallback icon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 21:59:42 +02:00
Thomas Lamprecht
da25c5ac41 ui: realms: add iconCls to menu entries
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 21:57:26 +02:00
Thomas Lamprecht
959df7bf26 ui: notes: use monospace font and make white-space pre-wrap in text area
can improve editing experience quite a bit when formating tables ore
the like.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 18:48:12 +02:00
Thomas Lamprecht
c2cd0c9eb3 ui: auth domains: openID: make 'username-claim' display-edit field
while we cannot allow editing it after realm creation it is still
interesting to know to which value it was set.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:26:58 +02:00
Dominik Csapak
c5be8d39c9 ui: Workspace: use domains info to hide password/tfa items
in the user menu

we have to make an additional api call here, since it is the only
place (currently) where we can get the realm type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ Thomas: adapt to move of parse_userid to widget-toolkit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:20:16 +02:00
Thomas Lamprecht
b8dcc6d307 ui: user view: use username/realm renderer from widget-toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:18:44 +02:00
Thomas Lamprecht
c0e3df11d8 ui: user view: adapt to users response API changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:15:31 +02:00
Thomas Lamprecht
a901e4adc3 ui: login: code-style and indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 14:15:56 +02:00
Dominik Csapak
6026595802 ui: dc/UserView: disable Password button based on realm type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dominik Csapak
e3393f6d74 ui: dc/UserView: disable TFA button based on realm type
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dominik Csapak
668951e22b ui: dc: add AuthEditOpenId panel
for adding and editing openid realms, does not support tfa

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dominik Csapak
550857eb16 ui: dc/AuthEditBase: only add tfa field on auth modes that support that
for now that are all, but we will ad one where that is not possible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 14:10:19 +02:00
Dietmar Maurer
3dd99bab1f ui: implement OpenId login
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
 [ Thomas: amended the following changes:
 - factor out openid_login_param to widget-toolkit as
   getOpenIDRedirectionAuthorization and use it
 - use camel case to match our JS style guide and our framework (and
   basically the rest of the JS world)
 - minor cleanups like moving variable definition into the single if
   branch their used
 ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 14:09:30 +02:00
Fabian Ebner
d2aae44882 cli: tasks: don't treat warning status as an error status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-02 12:52:08 +02:00
Thomas Lamprecht
df6f4b1874 move BackupInfo module into Cluster
no semantic change regarding API or the like intended

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 12:50:49 +02:00
Fabian Ebner
1a2e0e235e api: backup info: prefer kebab-case
And also add the 'backup-info' endpoint to the index.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 12:03:03 +02:00
Thomas Lamprecht
37208950a7 pve6to7: fix description-length warning for guests
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:49:48 +02:00
Thomas Lamprecht
897c1fc84c ui: qemu/HW: reformat comment to better use awailable text-width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:46:01 +02:00
Thomas Lamprecht
4fe1ea255a ui: storage selector: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:45:28 +02:00
Fabian Grünbichler
cea2918a85 pve6to7: drop PASS for Luminous -> Nautilus check
this should pass on pretty much every system running hyper converged
Ceph on PVE 6.x ..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-02 11:43:44 +02:00
Fabian Grünbichler
23db33ca4c pve6to7: reduce number of cluster PASS statements
these were mostly releveant for upgrading from Corosync 2.x to 3.x - so
keep the warnings/errors, but reduce the noise a bit by skipping lots of
PASS output.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-02 11:43:44 +02:00
Thomas Lamprecht
1bde7cd8df api: cluster: add backupinfo to subdirectories
to make it actually show up in auto-completion and some docs..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:36:26 +02:00
Thomas Lamprecht
db11051374 api: cluster/backupinfo: rework bogus index endpoint
This had a myriad of issues:

* marked as protected, thus forwarded to the privileged daemon even
  if it just returned static information
* did not return directory index but a "stub" string, which does not
  makes sense.
* not named index

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 11:34:34 +02:00
Thomas Lamprecht
02c634bcdc ui: node: always show Repositories panel in navigation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 18:40:09 +02:00
Fabian Ebner
2292a19637 ui: add panel for listing APT repositories
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:03:38 +02:00
Fabian Ebner
7e33f74b22 api: apt: add PUT and POST handler for repositories
To allow adding/modifying them. Currently the only possible modification is
enable/disable.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:03:38 +02:00
Fabian Ebner
9005e0dfe1 api: apt: add call for repository information
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:03:09 +02:00
Dominik Csapak
97723d760c pve6to7: skip user.cfg if it does not exist
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 16:25:50 +02:00
Thomas Lamprecht
4c5bb36772 d/postinst: regenerate machine-id also for 4.0 beta ISOs
With some poking around I got the hold of more released ISO files,
while beta it seems that we have some loyal installations setup with
a 4.0 beta and updated to 7.0 beta[0] (cool stuff!)

[0]: https://forum.proxmox.com/threads/proxmox-ve-7-0-beta-released.91388/page-3#post-399500

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 14:25:18 +02:00
Fabian Ebner
1126b8cd7d pve6to7: more fine-grained detection of misconfigured guest volumes
If neither 'rootdir' nor 'images' are configured on a storage, but
there are guest images, just log the number of volumes found. If they
are relevant for migration, the check for unreferenced volumes will
catch them later.

Also detect content type mismatch for all volumes of existing guests,
which also covers the case of a VM image on a storage with only
'rootdir' and vice versa. To catch all such unreferenced volumes too,
it is necessary to scan all storages that do not have both content
types configured.

Change the message from 'will not work' to 'might not work'. If a
volume only referenced by a snapshot is misconfigured, it doesn't mean
that the guest doesn't work at all. Or it might be an ISO on a
misconfigured storage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 14:21:11 +02:00
Fabian Ebner
f68689bbf8 pve6to7: content check: fix detecting pass
If there is a log_fail, because of misconfigured 'none' content type, the final
log_pass should not be printed.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 14:21:11 +02:00
Thomas Lamprecht
bf430fc56c bump version to 7.0-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 20:00:39 +02:00
Lorenz Stechauner
81579be0ac aplinfo: factoring out regex for vztmpl
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-06-28 19:16:03 +02:00
Hannes Laimer
c5f7b4b34f api: cluster/resources: add 'name' property to return schema
VM names are returned by the endpoint anyway, therefore it makes sense
to add it to the endpoint specification so it also appears in the API
docs and is visible when using pvesh with text output.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 17:59:53 +02:00
Dominik Csapak
e24567ac25 ui: node/Config: add vmid filter to task lists
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-28 17:51:50 +02:00
Dominik Csapak
c313af0f6d {qemu, lxc}/Config: adapt to new proxmoxNodeTasks
by adding a preFilter and extraFilter

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-28 17:51:50 +02:00
Dominik Csapak
acf8a27172 api: tasks: add 'statusfilter' to task list endpoint
Similar to PBS. The 'errors' filter parameter still takes precedence
(overrides this)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ Thomas: adapt to renamed PVE::Tools helper method ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 17:51:25 +02:00
Dominik Csapak
97e749ad3c api: tasks: add 'since' and 'until' filter for the task list
similar to PBS

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 17:17:43 +02:00
Thomas Lamprecht
2cc7120e1b api: apt versions: track proxmox-backup-file-restore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 15:32:38 +02:00
Thomas Lamprecht
89e4fc8cc7 api/apt: whitespace/indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 14:07:03 +02:00
Thomas Lamprecht
9ef058d391 bump version to 7.0-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-24 08:59:46 +02:00
Thomas Lamprecht
daed1e5b03 d/postinst: regenerate machine-id also for internal updated hosts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-24 08:59:46 +02:00
Fabian Ebner
4bb46baab5 cli tools: correctly handle warnings status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-24 08:50:38 +02:00
Fabian Ebner
bbc34b4789 cli: pveam: remove unused private sub
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-24 08:50:38 +02:00
Fabian Ebner
0a7de3377b nodes: startall: correctly handle warning status for delayed task
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-24 08:50:38 +02:00