Commit Graph

374 Commits

Author SHA1 Message Date
Dominik Csapak
4f0c076470 add DiskSelector from PVE
to be usable with other products.
also add a parameter 'typeProperty' to be able to configure
the backend property for the usage type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-16 11:34:37 +02:00
Dominik Csapak
b2d7d422ec format_duration_human: say <0.1s instead of 0s
if we get a duration of <=0.1s it should actually be somewhere
betweeen 0 and 0.1 so return <0.1s

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-16 09:56:23 +02:00
Dominik Csapak
b1d446d0b2 show Task warnings differently
tasks can now show also 'WARNINGS: <count>'
filter it out and provide a 'parse_task_status' function for easy reuse

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-16 09:55:17 +02:00
Dominik Csapak
66be1b8ac1 ProxmoxProxy: add duration fields for proxmox-tasks
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-16 09:55:17 +02:00
Thomas Lamprecht
82327aca09 networkedit: display MTU for OVS-bond interfaces too
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Originally-by: Alexandre Derumier <aderumier@odiso.com>
2020-06-08 16:47:46 +02:00
Thomas Lamprecht
9d4375e5e0 d/control: drop rsync from build dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:08:01 +02:00
Thomas Lamprecht
d2eb74c991 improve passing package version down
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:05:20 +02:00
Thomas Lamprecht
84c6d299c7 drop leftover utils, moved to src
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:44:20 +02:00
Thomas Lamprecht
ecabd4379c cleanly separate sources from package build, move to own folder
compared result with `diffoscope`, saw now difference

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:43:03 +02:00
Thomas Lamprecht
c898b490c7 use eslint and execute as check target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:20:50 +02:00
Thomas Lamprecht
ec8c0f111c add pbs to upload target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:20:30 +02:00
Thomas Lamprecht
05a977a227 make eslint 100% happy
lots of churn and changes but will allow to enforce linting again in
the build system.

Also switch over from var to let.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 17:16:22 +02:00
Thomas Lamprecht
4f1b9b8c3b some more eslint fixes
manually adapted after eslint --fix call due to our damn weird
indentation scheme

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 15:05:50 +02:00
Thomas Lamprecht
01031528ad eslint fixes all over the place
all autofixed by eslint with a slightly reduced base config rule set
to avoid rules which may give some undesired results in our code
base.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 15:02:29 +02:00
Thomas Lamprecht
94ac12f1bd utils: some eslint fixes and refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 14:43:18 +02:00
Thomas Lamprecht
eb9dfa15da utils: some eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 13:52:17 +02:00
Thomas Lamprecht
41a786fc86 task description: use 'Backup Job' if no id is set
We set the id for vzdump tasks only for single VM/CT backups, so if
it's undefined we got a job for sure.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-05 15:09:37 +02:00
Thomas Lamprecht
0545f1edb8 format task description: avoid printing undefined ID
fixes and regression for backup jobs which seems to get from empty
string to undefined ID in PVE 6.x - whyever...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-05 14:51:46 +02:00
Thomas Lamprecht
2d10a5977c bump version to 2.2-7
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 18:20:20 +02:00
Thomas Lamprecht
0855ba611e rrd: only move legend to header if both exists
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-04 18:19:16 +02:00
Dominik Csapak
335b5f3747 button: make xtype of parent configurable
to get the selection model of the parent, we use by default the xtype
'grid', but sometimes we want to use something else (e.g. 'treepanel')

to be flexible we make this configurable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-06-04 13:01:04 +02:00
Thomas Lamprecht
8617feb8fc bump version to 2.2-6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-03 11:43:43 +02:00
Thomas Lamprecht
4febc669d5 utils: add updateColumnWidth helper from PVE
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-29 19:31:02 +02:00
Thomas Lamprecht
e662b4a0b8 rrd charts: add legend to header for better space usage
Docking the legend to the bottom took space away from the chart, and
was the just used as the simplest solution when it was implemented.

The panel header has enough spaces for any reasonable number of
different series in a chart, so move it there.

Drop then the legend toggle tool from the header as it isn't required
anymore..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-29 19:21:14 +02:00
Thomas Lamprecht
efa61051ac rrd charts: cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-29 19:21:14 +02:00
Thomas Lamprecht
c58d410099 rrd charts: render 3 decimal points for small values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-29 19:21:14 +02:00
Thomas Lamprecht
9f1b3a70cb css: reduce chart legends space impact
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-29 19:21:14 +02:00
Thomas Lamprecht
c197c3f2bc bump version to 2.2-5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-28 18:36:40 +02:00
Thomas Lamprecht
e2abd63cc2 format_duration_short: rename to format_duration_human and change semantics a bit
The rationale is that things like 11.4d or 22.6h is hard to parse for
humans (base 10 to base 60 or base 24 conversion). So try to emulate
what a human would tell another human to pass a duration information
along with reasonable good but not high accuracy.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-28 18:31:24 +02:00
Dominik Csapak
e9fc81fabe Utils: add duration format/render
from pve-manager

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-28 13:31:24 +02:00
Dominik Csapak
6d812e6d8b css: add icon colors
from pve-manager

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-28 13:29:32 +02:00
Dominik Csapak
9fcd1bdb42 improve error extraction for monStoreErrors
by printing the whole error body when it cannot be parsed as JSON

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-26 19:04:54 +02:00
Thomas Lamprecht
187e9a6d3a form/display edit: use the 'fit' layout to avoid width glitch
As else we get some issues with inner field adding some space on
outer fieldcontainer, which let a mix of "normal" fields and this one
appear asymmetrical.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-26 18:26:55 +02:00
Thomas Lamprecht
865be88ed5 JournalView: avoid null dereference on quick tab switch
the updateView method can be called through an XHR request callback,
which may get triggered once the user switched already over to
another panel and viewmodel isn't valid (or did not get valid at the
first place) anymore.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-26 10:14:53 +02:00
Thomas Lamprecht
8f9e331d8c bump version to 2.2-4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 19:04:16 +02:00
Thomas Lamprecht
7e0a80cd16 task history: better default column width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:56:56 +02:00
Thomas Lamprecht
122a207938 node/tasks: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:37:10 +02:00
Thomas Lamprecht
f138d11f0d ui: task history: handle running tasks
normally this is used as strict task history, meaning no running
tasks included. But we can have running tasks in PBS here, so at
least avoid that they're shown as error.

Also add a refresh button as a simple workaround to the auto-refresh
problem, which isn't straightforward to solve with the buffered
reader we have here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:32:01 +02:00
Thomas Lamprecht
5e80efaeea utils: task descriptions: allow to use functions
Useful if we need to split the ID, or do some more complex rendering
for a task type.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:28:21 +02:00
Thomas Lamprecht
4afd5b2f9d utils: task descriptions: allow to add/override entries
Allows having only the common ones here, and more special ones in the
per product code. Sometimes there are simple worker IDs which can
have a very different meaning for one product, with this that clash
can be resolved in a standardized way.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:20:26 +02:00
Thomas Lamprecht
f4d366dc85 ui: network: make CIDR & gateway column broader by default
ensuring they fit at least always a full IPv4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:14:14 +02:00
Thomas Lamprecht
82b8bfb053 ui: network: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 18:13:34 +02:00
Thomas Lamprecht
2e6fdef087 render_upid: fallback to worker_{id,type}
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 16:47:17 +02:00
Thomas Lamprecht
88725b272a css: add proxmox-invalid-row class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-25 16:46:48 +02:00
Dominik Csapak
2561610c8e return cookie again in authOK
the calling code did require that authOK returns the cookie if
there is a valid one

make it now very explicit that the cookie gets returned instead
of using implicit short-circuit behaviour

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-25 13:51:30 +02:00
Dominik Csapak
ac6184986c fix #2758: reject 'tfa' cookies
return false on authOK when the ticket is a tfa ticket
(starts with PVE:tfa!)

when a user now loads the page with only a tfa ticket, it shows the
login window again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-25 10:42:58 +02:00
Thomas Lamprecht
eaa0fcbd77 bump version to 2.2-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 13:08:16 +02:00
Thomas Lamprecht
4b5c6b3ff1 window: edit: eslint fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 13:08:07 +02:00
Thomas Lamprecht
b24601aff5 window: edit: call setValue on all fields
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 13:01:01 +02:00
Thomas Lamprecht
18a6f207ef window password edit: refactor to more schematic code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-22 11:27:28 +02:00