Commit Graph

67 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Dominik Csapak
8ae40b73f1 Utils: add 'auth-realm-sync-test' to task descriptions
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-25 19:28:50 +02:00
Thomas Lamprecht
dca21e597e monStoreErrors: refactor out and render param exception errors
adapt the .x-mask-msg-text class to center the text, as else this
looks not to nice..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-24 16:59:55 +02:00
Thomas Lamprecht
e1b9384897 utils: add 'auth-realm-sync' task description
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-03 09:33:52 +02:00
Moayad Almalat
9dc4b04bba Add Ar to Languages map - Login page
Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
2020-02-18 14:09:10 +01:00
Dominik Csapak
cb30fbfa19 add capitalized NoneText
we want this in some cases

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-02-05 20:23:39 +01:00
Alexandre Derumier
8aefd47ceb add vlan interface support
vlan-raw-device && vlan-id field are only
enabled if interface name is different than interfaceX.Y

I have added a listener on iface,
to enable them live if user want a custom name for vlan interface

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-30 16:14:30 +01:00
Dietmar Maurer
890d561b67 parse_task_upid: Allow additional (optional) task_id field
We need that if tasks runs inside multi-threaded applications (several
tasks inside one process).
2019-12-17 11:51:46 +01:00
Thomas Lamprecht
8a2837f408 task descriptions: add CT push/pull and HA shutdown
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-06 13:39:42 +01:00
Thomas Lamprecht
16c0a0b570 Ext.Msg: switch from depreacated msg to message property
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-26 12:58:50 +01:00
Oguz Bektas
d1dc9b56e7 add reboot for containers into task description table
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-11-14 12:10:56 +01:00
Thomas Lamprecht
dc4f36a2bd utils: sort language_map in code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-05 13:48:23 +02:00
Dominik Csapak
7c67159cdc add qmreboot task description
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-09-19 13:19:05 +02:00
Dominic Jäger
317eb5611b Add hebrew to list of languages
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2019-09-03 09:04:01 +02:00
Thomas Lamprecht
227fb07f0c follouwp: code cleanup for render_bond_mode
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 12:42:26 +02:00
Thomas Lamprecht
61e428c29d follouwp: code cleanup for bond_mode_array
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-10 12:36:57 +02:00
Dominik Csapak
8311c0b1af node network: refactor bond mode array generation
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-10 12:26:54 +02:00
Thomas Lamprecht
3154bb784e use https links to our sites
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-26 16:05:34 +02:00
Dominik Csapak
1098bee4d4 refactor info/link extraction from onlinehelp to utils
so that we can reuse that code for getting links from the docs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-06-21 15:16:39 +02:00
Mira Limbeck
577b6c7546 add ipv6 and ipv4 cidr match vtype
add additional vtype for combined ipv4 and ipv6 cidr validation.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-04-16 05:37:12 +00:00
Wolfgang Bumiller
c2e25a2111 add helpers required for u2f authentication
With u2f having a ticket doesn't mean we're logged in yet,
so we need to be able to distinguish between the two.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 13:12:29 +02:00
Dominik Csapak
b7d94d3e1a reword suspend
we have now have two suspend modes:

* pause: leave the process running and pause the guest cpu
* hibernate: save the state (and memory) to disk, stop the vm

since the meanings of suspend and hibernate are too close,
we change the old 'suspend' to 'pause'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-30 12:41:41 +01:00
Tim Marx
f80f1f94d3 utils: xtermjs: allow to pass a 'cmd' parameter to the terminal
also, as we already touch this:
Ext.urlEncode is deprecated, use Ext.Object.toQueryString instead

Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-02-28 10:39:40 +01:00
Dominik Csapak
9bf01f76c7 fix popup behaviour in firefox with touchscreens on desktop
when the popup blocker is active, nw is undefined and nw.focus() throws
an error and the touchend event is not finished, causing
extjs to retry the touchevent and click handler, which tries to open
a popup which gets blocked here, and so on

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-21 12:31:16 +01:00
Fabian Grünbichler
9138244f8b tasks: put vzdump into VM/CT category
to allow rendering of guest ID if available.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-01-03 09:19:40 +01:00
Dominik Csapak
99a5979b2b fix typo
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-29 12:33:08 +01:00
Dominik Csapak
0908d830cf Utils: storage creation task descriptions
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-11-22 14:07:31 +01:00
Thomas Lamprecht
c5aaa502d3 Utils: fix jslint errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:20:25 +01:00
Thomas Lamprecht
9367da29d2 Utils: add some task descriptions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-22 13:20:21 +01:00
Thomas Lamprecht
8cb1ec178c fixup: vlan type: use 'Linux VLAN'
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-19 14:22:34 +02:00
Alexandre Derumier
92ccd25d2a add missing vlan type in network panel
Currently a vlan interface is correctly parsed,
but GUI display it as unknown
2018-06-19 11:33:27 +02:00
Thomas Lamprecht
0247a07a1e add traditional Chinese to language map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-07 09:46:24 +02:00
Dominik Csapak
18ffbaef6c add missing task description mappings
this includes
* cephmgrcreate/destroy
* acmerenew/register/deactivate/refresh/renew/revoke/update
* clustercreate/join
* move_volume

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-14 10:53:04 +02:00
Dominik Csapak
ea7fb2205f remove gettext definition in Utils.js
this should not be here, rather where we include the language files
(like in pve), because this is not ecma conform and behaves very
different in different browsers (e.g. safari ignores the if check
completely and simply uses that function definition)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-08 11:37:32 +01:00
Dominik Csapak
5812914ce5 reintroduce api2request checks for toolkit 2018-01-15 14:51:24 +01:00
Dominik Csapak
ab7fac0b2f add task_desc_table and format_task_description from pve
since the Task is in the widget-toolkit, passing
a renderer/list a few levels of components down is not nice
and there are not *that* many strings in the task_desc_table,
we put it here, so that either pve and pmg can use them
2018-01-15 14:11:02 +01:00
Dominik Csapak
590d00bf20 remove unnecessary formatter 2018-01-15 14:09:53 +01:00
Dominik Csapak
f97a2a34ee add all languages from pve 2018-01-15 14:09:41 +01:00
Dominik Csapak
881c9c0c12 add Xtermjs popup helper
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-12-11 14:42:16 +01:00
Thomas Lamprecht
e94c076748 Utils: fix some lint errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-12-07 12:00:27 +01:00
Dominik Csapak
b91c7ce210 add format_size from pve
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-11 06:43:39 +02:00
Dietmar Maurer
0ee4c725d3 only define gettext if not already defined 2017-10-04 12:17:42 +02:00