Commit Graph

4835 Commits

Author SHA1 Message Date
Dominik Csapak
e402755915 gui: node: change syslog to JournalView and journal api
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-15 12:09:26 +02:00
Dominik Csapak
1d397a8394 node: add journal api
this uses the new journalreader instead of journalctl, which is a bit
faster and can read from/to cursor and returns a start/end cursor

also you can give an unix epoch as time parameters

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-15 12:09:26 +02:00
Thomas Lamprecht
10525ed71e fix #2197: ui: editing CDROM doesn't require VM.Config.Disk rights
A user which just has the default role PVEVMUser on a VM is able to
edit the CDROM, either to no media or if storage permissions are
available also to other ISOs, through the API. So reflect this again
for the WebUI. We could add a check for "VM.Config.CDROM", but that's
not really worth, if we keep in mind that the Ext.Caps state is
heuristically only.

fixes commit d35b5b2afb

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-13 17:27:49 +00:00
Dominik Csapak
c0d4a151fd ui: NodeSelector: check status field for offline nodes
the memory stat is not available if the user has no audit privilges on
/nodes/NODENAME but the status is always available

also it makes simple more sense to check if it is online not only if the
memory value is there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-09 16:30:22 +00:00
Dominik Csapak
69106e5cf3 add new parameters cidr(6) to the network api
to also allow to set it directly and not via address/netmask

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-08 14:56:40 +00:00
Thomas Lamprecht
3747b7a2ed followup: do not break on mixed, as one with no level could follow
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-07 17:51:02 +00:00
Thomas Lamprecht
3512569d1e followup code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-07 17:49:43 +00:00
Dominik Csapak
595d0457d0 fix #2183: fix blinking subscription and show unknown status
we skip offline nodes, check for nodes without subscription,
and finally check for different levels

if for some reason we do not get any subscription status (should not happen)
we show 'unknown'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-07 17:22:52 +00:00
Dominik Csapak
5bb1062908 ui: TFAEdit: use new tfa api call
with the api call to userid/tfa we get the users tfa type as well
as the realm tfa type, so we can replace the call to the realm
with this

to properly show the loadmask, we want to initiate the api call when
the window is already shown, the 'show' event works for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-07 16:33:30 +00:00
Dominik Csapak
6dfb9ec490 ui: TFAEdit: change tfa_type default to null
If a dependency of a formula returns undefined, it will not get updated,
even if the other parts of the formula would work.

So we change the default to 'null' which gets handled differently,
but serves the same purpose for us.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-07 16:33:30 +00:00
Thomas Lamprecht
e7c0216d2e follouwp: reduce duplicate code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-07 13:30:50 +00:00
Tim Marx
abffa1a6dc ui: storage: handle empty response in case of file upload error
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-05-07 12:03:31 +00:00
Thomas Lamprecht
792fdf4929 bump version to 5.4-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-24 11:28:35 +00:00
Thomas Lamprecht
fc1da3b020 api: handle undefined shellcmd parameter better
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-24 11:27:52 +00:00
Thomas Lamprecht
78c2d7f781 api: ceph/osd: conciser metadata array to hash mapping
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-24 10:24:21 +00:00
Thomas Lamprecht
de6ad72f23 followup: refactor & code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-24 10:22:58 +00:00
Dominik Csapak
91564b7267 adapt osd api call for ceph nautilus
ceph nautilus changed the structure of 'pg dump osds'
they moved the data one level below

parse both new and old format, and bail if it returns anything else

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-24 10:06:28 +00:00
Dominic Jäger
29f26f6ddb Fix #482: Add timestamps to backup create task log
Adding timestamps to the log messages facilitates troubleshooting.

We only log this in the task log, as the syslog and the backup log
(stored together with the backup on the target storage) already have
date/time prefixed, so only the task log missed this info in case of
multiple backups tasks for a single job.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-04-24 09:17:06 +00:00
Fabian Grünbichler
e1c20e2a77 call cfs_update() before retrieving cluster status
otherwise this potentially returns outdated information (like the
cluster being quorate when corosync has crashed on all nodes 5 minutes
ago).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-04-18 09:44:11 +00:00
Dominik Csapak
919be4fbbe fix #1910: urlencode usernames in UserEdit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-18 05:24:32 +00:00
Dominik Csapak
920d4deb05 ui: tfa: handle if TFA setup with no specific type set
if we have no info about TFA in the userview (x as key instead of
x!oath or x!u2f) we disabled the whole window and the only action
was to delete

instead show all options, so the user can overwrite the setting

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-17 12:59:51 +00:00
Thomas Lamprecht
df7587c99c bump version to 5.4-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 14:32:03 +00:00
Thomas Lamprecht
1bfa058823 ui: tfa edit: fix initial state of delete button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 14:32:03 +00:00
Thomas Lamprecht
9ff893ae52 vzdump: code cleanup empty newlines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 14:16:21 +00:00
Thomas Lamprecht
e2b5eb29b5 vzdump: use strftime for backup basename assembly
we already use POSIX strftime a lot in the stack, so nothing new,
also just use the perl built in localtime

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 14:09:03 +00:00
Thomas Lamprecht
57d56896c8 fix #263: only include node rrd stats if user has Sys.Audit
It makes sense to not give users without Sys.Audit permissions to
much information over a node and this is relatively easy and cheap to
check and enforce at those two points.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
2019-04-16 12:28:42 +00:00
Thomas Lamprecht
588c0a75a7 followup: code cleanup and print error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 12:06:25 +00:00
Alwin Antreich
1b364b3a98 pveceph: install ceph service print sucess message
This patch adds a success message on successful ceph.service
installation. And adds a newline to make a successful ceph package
installation more visible.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
2019-04-16 12:03:29 +00:00
Wolfgang Bumiller
6db00a0935 fix #2177: use getValue() to get otp value
as '.value' isn't always valid

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 11:53:00 +00:00
Thomas Lamprecht
b0184fc4cf tfa: disable, not mask, other cards if tfa is already setup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 07:54:05 +00:00
Thomas Lamprecht
72bff50c04 tfa: comment that TOTP secret is meant to be base32
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 07:53:27 +00:00
Thomas Lamprecht
f92943e2f8 make jslint happier
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 07:46:59 +00:00
Wolfgang Bumiller
1b16f7138b ui: tfa: set initial tab based on current tfa type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 07:02:05 +00:00
Wolfgang Bumiller
ac3daab801 ui: tfa: mask panels for not currently used types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 07:02:05 +00:00
Wolfgang Bumiller
da89881018 ui: user view: show tfa type name
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 07:02:05 +00:00
Wolfgang Bumiller
1cdb49c199 www: parser: add parseTfaType helper
The tfa keys can now contain the type as additional
information, so let's parse it out.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 07:02:05 +00:00
Thomas Lamprecht
6e48ebf9ad d/control: bump widget-toolkit version dependency
It's not that nothing would work without it, but ceph cannot be
configured via gui, and knowing that some user want to do strange
things with mixing package versions, we save us some hassle just
recording this to ensure one cannot run into this..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-16 06:08:13 +00:00
Mira Limbeck
16a83f8991 fix ceph install wizard not accepting ipv6
changes the vtype to the newly defined IP64CIDRAddress. depends on the
introduction of the IP64CIDRAddress vtype in proxmox-widget-toolkit.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-04-16 05:41:57 +00:00
Dominic Jäger
5dcd61c4bc d/control: bump doc-generator build dependency version
When building a current version of pve-manager a dependency to the
documentation is missing, as it ships new references used by our
onlineHelp tooling this is required.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-04-16 05:30:19 +00:00
Thomas Lamprecht
fa6f371649 cleanup Status plugins use statements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-11 09:22:04 +02:00
Thomas Lamprecht
0bd2dc09e4 followup: code cleanup, remove unnecessary type check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-11 09:11:07 +02:00
Dominik Csapak
035452b97f fix #1326: allow multiple status server definitions per type
we allow an id like storage.cfg but leave it optional (so we do not
break existing configs):

 influxdb: name

so that one can export the data to multiple servers of the same type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-11 08:11:43 +02:00
Thomas Lamprecht
af17f0ad57 bump version to 5.4-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 16:11:34 +02:00
Thomas Lamprecht
bb469a1176 ui: dc/options: allow to edit cluster wide migration settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 16:04:34 +02:00
Thomas Lamprecht
41ca346587 followuop: ui/dc/options: fix default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 15:35:38 +02:00
Thomas Lamprecht
8f17b4965a ui: dc/options: allow to edit HA shutdown policy
add some helpers handling this, can be re used for adding the
migration field, maybe we want to move this to widget-toolkits parent
ObjectGrid class, a bit cleaned up.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 15:31:24 +02:00
Thomas Lamprecht
d42ef8da91 ui: lxc: do not disable complete add resource button if no disk caps
While for now you only have elements which require the add disk
capability in the add sections it makes no sense to hide it, as it
would suggest that one can add no resource at all, and can easily
introduce a bug if we add another type of resource here, independent
of disk add cap.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 09:56:17 +02:00
Dominik Csapak
d35b5b2afb fix #1814: do not enable disk related buttons for audit user
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-10 09:50:05 +02:00
Thomas Lamprecht
2d41c7e6f2 ui: u2f: refactor error code map out and use in login window
to avoid showing numbers as error codes to users, even though the
strings are not much more helpful either...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-10 09:49:13 +02:00
Dominik Csapak
35e8d081ec remove non-existant property
vmComboSelector does not have such a property

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-04-10 09:31:04 +02:00