Commit Graph

181 Commits

Author SHA1 Message Date
Dominik Csapak
cdd9b6c0a7 add _blank target for optional url
so that they open in a new tab/window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-08 13:38:09 +02:00
Dominik Csapak
27809975f2 add render functions for Certificates
this adds render_optional_url for a field which may contain a link
and render_san which simply displays the different values
in each line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-04 16:11:00 +02:00
Dominik Csapak
4ace5c6fc1 jslint fixes
those found their way in during a rebase of my patches

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-25 11:56:09 +02:00
Dominik Csapak
3438c27eab allow xtermjs to be the default console
if not available for a vm, we fallback to novnc like with spice

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-23 09:42:55 +02:00
Dominik Csapak
14a845bc7b Utils: add forEachMP
in the style of forEachBus, but for containers, so that we
only have to save the count once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-06 11:45:14 +02:00
Thomas Lamprecht
062a7f4955 ui/Utils: add storage schema
add a schema describing our storages name, the map for its
InputPanel, the icon we show in the add menu, and if it is available
at all there.

For now just use it to simplify the ugly if/else mess
format_storage_type was, future patches will use the information to
generalise Adding/Editing of those storages.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-28 13:19:41 +02:00
Thomas Lamprecht
70d4f9b41e ui/Utils: do not create non-standard console.dir fallback
resolves a future jslint type confusion and as it's nor standarized
nor used by our code we can just drop it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-28 13:19:41 +02:00
Dominik Csapak
9bad05bd76 make container clones/template available in the gui
also refactor the right click menu logic

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-21 15:54:32 +01:00
Dominik Csapak
34c61eaf4b adapt and rescope TemplateMenu for containers
make it guest agnostic so that we can use it for lxc also

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-21 15:54:32 +01:00
Wolfgang Link
ca9a198ac7 Add cifs storage plugin 2018-03-19 12:56:13 +01:00
Dominik Csapak
abe824aa95 add PVE.Utils.forEachBus and use it in qemu/HardwareView
this iterates over all busses or over the ones you specify
( a single or an array )

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-16 10:05:57 +01:00
Thomas Lamprecht
857b97a7dc ui: move loadSSHKeyFromFile from lxc/Create to Utils
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-02-22 15:04:51 +01:00
Dominik Csapak
35a04562fd change PVE.UserName/CSRFPreventionToken to Proxmox
this is now all in the widget-toolkit and needs to be
set/read to/from there, else we possibly get an inconsistent view on
those

this fixes as issue, where after login the ResourceStore would not update

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 14:49:11 +01:00
Thomas Lamprecht
755b9083dc dc/OptionView: cleanup & use new features from ObjectGrid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
e7ade592e3 use Proxmox.Utils instead of PVE.Utils
some function are now in Proxmox.Utils instead, so we have to use that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:38 +01:00
Dominik Csapak
c6b2336c3f add new xtermjs viewer window to Utils
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-12-12 08:34:07 +01:00
Dominik Csapak
4dbc64a786 improve tree/grid icons
we improve the icons in the tree and the resource grid by
differentiating between cluster online/offline status and no rrd data

when we have no rrd data from a node/storage, instead of showing a
red x (which is scary) even if the node is reachable by corosync (which
confused quite a bit of people, because we show all nodes as online in
the datacenter summary), we show the node/storage with a '?'

this signals that something is wrong with this node, even if we can
reach it via cluster methods

this rewrite of the logic includes a refactoring of the method
of getting the icon, because we want the same icons in the tree and the
grid, and an optimization on how we use the css classes
(introducing a x-grid-custom-icon class)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-11-14 13:27:07 +01:00
Thomas Lamprecht
50713765af ui: GuestStatusView: simplify HA state display
simplify HA Information in VM/CT Summary panel.
Use the already translated  'HA State' instead of 'Managed by HA'
(which now becomes obsolete as it was the single appearance).
Simplify PVE.Utils.format_ha respectively to mach the new name,
as here is the only use of this function we have no side effects.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 14:14:19 +02:00
Thomas Lamprecht
45d6c71af2 kvm_ostype: move to store-like format
move from the key => value format to one where all versions from a
base OS type can be directly used as data for a store.

We will rely on this in the next patch to allow a easy transition to
combobox UI for the OS type selector.

We also avoid having the base type multiple times.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Dominik Csapak
6760ab9248 show 'RBD' instead of 'RBD (external)' on storage summary
we cannot differentiate between external and pve-managed there,
so we just want to show 'RBD'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-07 12:53:27 +02:00
Dominik Csapak
3c23c0258b add new "RBD (PVE)" storage choice
this is for adding a pve managed ceph rbd storage, so that the user
just has to select the pool, and does not need to write the monitor
hosts and copy the keyring

the old "RBD" is renamed to "RBD (external)"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-07 12:35:14 +02:00
Fabian Grünbichler
fe15d330c4 add task description for cephcreatepool
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-09-07 11:38:20 +02:00
Dominik Csapak
dfe6d184ff adapt render_ceph_health for luminous
it is using 'status' instead of 'overall_health' now

also only give the health object now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-07-24 16:10:24 +02:00
Wolfgang Bumiller
1ec226c31d gui: drop cirrus from the GUI
now only available from the CLI
2017-06-28 12:13:45 +02:00
Dominik Csapak
530ee6b769 change short duration format to x.y
so we always show one decimal place
(instead of all with seconds and none with minutes, hours, days)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-22 10:08:56 +02:00
Dominik Csapak
ddd26302d7 add render_duration
for replica interval

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-14 07:30:46 +02:00
Emmanuel Kasper
2125c18a23 Adapt SafeDestroy component to be able to delete Ceph Pools 2017-06-13 05:40:08 +02:00
Dominik Csapak
c11ab8cb4a add right-click menu for nodes
to easier reach the bulk actions, create wizards, and shell

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-14 15:18:54 +02:00
Emmanuel Kasper
b9628aa501 Do not translate IT terms which should be used 'as is' in every language
for 'Initialize GPT' we use the alternate 'Initialize Disk with GPT' string
which was already existing
2017-03-02 10:39:41 +01:00
Emmanuel Kasper
3f6336553c Add a new renderer for displaying dates in a human readable way
render_timestamp returns a Date as
"2017-01-31 16:17:33"
which is good for computers and column sorting but unfit
for human consumption

the new renderer added by this patch renders a Date as
"Tuesday 31 January 2017 16:18:08"

Day-month-year order is the most used ordering
in the world and also commonly used in the USA for
official documents.
source:
https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States
https://en.wikipedia.org/wiki/Date_format_by_country
2017-02-01 10:09:38 +01:00
Emmanuel Kasper
a3b8efb45c Add new renderer function for toggling enabled/disabled options 2017-01-24 08:53:39 +01:00
Emmanuel Kasper
ec99b1c367 Remove duplicate strings 2017-01-18 10:19:43 +01:00
Emmanuel Kasper
2b9e88286e Add Windows 2016 as available ostype to select 2016-11-29 09:11:28 +01:00
Dominik Csapak
946730cdc6 add new ceph dashboard
this patch changes the ceph dashboard

now we show the information in a more graphical way, namely:

the overall status is displayed by a big icon (+health)
the warnings/errors are in a list (with severity)

we show more detailed information about monitors, osds, and pgs

we show the usage of the cluster as a gauge graph, and
the reads, writes and iops as running charts (the last 5 minutes)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 16:38:11 +01:00
Dominik Csapak
046e640c54 refactor health status widget and ceph status data
this adds a new component health widget, used for cluster and ceph
status

also refactor ceph error levels and ceph status data into PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 16:37:09 +01:00
Dominik Csapak
428bc4a224 refactor health icons
instead of setting them manually every time, factor them out in a
get_health_icon function

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 16:36:46 +01:00
Dietmar Maurer
fbd60cfd4c new helper call_menu_handler 2016-11-12 12:45:21 +01:00
Thomas Lamprecht
fe4f00adc9 add 'delete_if_default' helper and use it
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-02 11:00:16 +01:00
Dominik Csapak
2b2fe160f5 show ha error state in tree and resource grid
with this patch, vms in an ha error state get an icon (reusing the node
offline icon) to indicate the error

in the resource grid, we also add the icon, and have an additional
column where we can display the ha state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-28 09:35:05 +02:00
Dominik Csapak
bab64974a5 fix 'NaN%' when max value is 0
when we get a max value of 0
(for example when a storage is not active)

the render function would show:
'NaN% (0B of 0B)'

because of a division by 0

this patch simply returns 'N/A' because
a max value of 0 should never be valid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-19 12:05:36 +02:00
Emmanuel Kasper
c15c61d3e8 Move globally defined regexpes into PVE.Utils
Those globally defined regexpes were only used in Toolkit.js
2016-10-18 12:40:47 +02:00
Emmanuel Kasper
9fa2e36d3a Turn PVE.Utils into a singleton
This will allow us to add contructed values ( regexp a = stringA + stringB )
into the constructor.
Access to the PVE.Utils properties and methods stays the same.
2016-10-18 12:40:28 +02:00
Dietmar Maurer
c8802a60b7 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Dominik Csapak
4eb76884a6 move DocsPages from global to PVE.Utils namespace
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-07 08:34:32 +02:00
Emmanuel Kasper
98a01af2a8 Add regexp to match a bus entry in a VM config 2016-10-07 07:01:36 +02:00
Dominik Csapak
a50de12435 add tooltip hashmap/generator for help button
instead of manually setting the onlineHelpTooltip property
we now have a method which maps links to the docs to
titles

for now this uses a static hashmap, but in the future
we want to generate this by the pve-docs package

also most of the subheaders we can generate instead of
saving them because they simply have each word capitalized
(e.g. '_container_network' => 'Container Network')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-15 11:58:17 +02:00
Dominik Csapak
a36deac4a5 add DiskList panel
this patch adds a disk list panel which:
lists the disks with typical columns
(type, vendor, serial, smart, wearout, etc.)

and with a doubleclick you can show the smart attributes

and with a click on init disk you can initialize a disk
with a gpt table

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-07 11:17:53 +02:00
Dominik Csapak
054ac1b879 add new StatusView component
this adds a component StatusView which is intended to
replace the old statusview panels of qemu/lxc/nodes
(later maybe also pools and storages)

it extends Ext.panel.Panel and expects an rstore and title

it is not intended to be used directly but to be subclassed

it works like this:

on instantiating, it adds a listener to the rstore load,
so that on every rstore load 'updateValues' gets executed

there, if successful, looks for every subcomponent of type
'pveInfoWidget' and calls 'updateField' on it

'updateField' calculates the update text and value for
the info widgets based on the given class variables

using either:
textField -> which gets the value from the store and
displays it simple as text (with renderer and calculator)

or valueField and (optional) maxField
where it determines the usage
(also with a renderer and calculator)

for both there is a default calculator/renderer
but this can be overwritten when instantiating/declaring

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-08-19 13:54:30 +02:00
Dominik Csapak
e31294433f open vm console on doubleclick in tree
with this patch you can open the console of a guest
with a simple doubleclick in the tree

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-21 13:10:49 +02:00
Dominik Csapak
70e779e47b add HostList validator and check monhosts with it
this adds a vtype which splits the given string into a list by
; or , or space
and checks if it is a valid (hostname|ip) port notation

also make the rbd monhost input field use it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-15 11:53:05 +02:00
Dominik Csapak
7b58d7b272 refactor DnsName regex
we will need this again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-15 11:53:05 +02:00
Emmanuel Kasper
49f5d1abd1 Rename the SCSI VirtIO controller to better differenciate from VirtIO blk
Also fix casing to match VirtIO as displayed in Network Panel
2016-06-08 12:43:09 +02:00
Emmanuel Kasper
5ca366f2f4 Case fix for VMware
Closes: #778
2016-06-08 12:42:08 +02:00
Dominik Csapak
cc1a91be71 fix right click selection in tree
in my commit 685b7aa4c5
i introduced a bug with that an item gets selected
in the tree when you right click on it

also fix the function parameters

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-31 12:23:06 +02:00
Dominik Csapak
685b7aa4c5 move cmdmenu function and use it in poolmemberlist
we had the function for the cmdmenu at two
different places (resourcetree and resourcegrid)

move it to PVE.Utils to reuse code, and
also use it in pool members list

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-20 07:30:21 +02:00
Dominik Csapak
4dcca8a403 change hotplugselector to checkboxes
the hotplugselector was not good to use,
and the options were confusing (empty was the default value, etc)

now we have checkboxes for each value, and if none are selected,
hotplug is disabled

also fixes the renderer when hotplug is set to '1' which
just means the default of 'disk,network,usb'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-05-17 06:15:53 +02:00
Dominik Csapak
f25d7c4a74 jslint: change (x)?x:y to x || y
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:08:51 +02:00
Dominik Csapak
a764c5f72e jslint: fix missing or extra semicolon
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:07:42 +02:00
Dominik Csapak
368df92e0d improve gui cidr matching
with this fix, we (again) allow ipv4 cidr to be as low as 8
also check the cidr for ipv6 and show the valid ranges in the
error text

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-28 10:57:41 +02:00
Emmanuel Kasper
b7159d8bee Do not display the internal value we use for storing ostypes
Strings like 'Linux 4.X/3.X/2.6 Kernel' are difficult
enough to visually parse, so don't append the internal
representation (l26) at the end: it does not bring any relevant
information to the user, and we usually don't display
internal representations in the GUI.
2016-04-21 12:20:33 +02:00
Wolfgang Link
d481d825b3 add Windows 10 and 2012r2 to OS selection
So user now we support also Win 10 and R2.
2016-04-20 10:00:47 +02:00
Dominik Csapak
0be88ae197 remove trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-20 09:37:06 +02:00
Dominik Csapak
728f1b97e6 fix #143: add disk/mem percent sort
previously, we had a disk/memory usage column in the resource grid,
whose raw data were the bytes used, but we added a renderer
to display it as percentage

with this, the columns sorted by bytes and not by percentage,
which made the column rather confusing

with this patch, we add a real percentage column (where the
data is a float from 0 to 1) so it sorts correctly

also make the old columns show the used size in B/KiB/etc.
by default we still only show the percentage column

since the disk usage part was always zero with qemu guests,
leave it empty there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-20 09:36:23 +02:00
Dietmar Maurer
45ab85bb2e use translated strings in format_ha() 2016-04-19 09:38:07 +02:00
Thomas Lamprecht
ced1677b2b StatusView: more verbose HA status output
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-04-19 09:07:13 +02:00
Dominik Csapak
0bfc799f0a add render_*_percentage and calculate_* to Utils
these functions will be used for the resource grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-15 17:02:17 +02:00
Dominik Csapak
02f47fe8e0 generalize format_size function
now it calculates the size in a general way,
up to the size defined in an array

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-15 17:00:55 +02:00
Dominik Csapak
5a4ba3c2fd also display Linux 4.X on OS selection
changes only the display

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-15 09:42:42 +02:00
Dominik Csapak
b1d8e73d15 add new icons to grid and tree
we set new icons for the tree and grid
changes:
* new icons
* wider type column (bigger icons)
* use arrows true (uses arrows instead of +/- and gets rid of the
  ugly lines in the tree)
* datacenter has icon instead of folder open/close
* "folder view" gets type icons for folders

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-11 11:49:59 +02:00
Dietmar Maurer
16152937f8 reduce translation overhead 2016-04-04 16:59:52 +02:00
Dietmar Maurer
bfade4b40b Utils.js: add task descriptions for vzclone and vztemplate 2016-04-04 12:42:32 +02:00
Dominik Csapak
d98a2c3c2a fix language selector
due to the changes in
f2782813cd
we have to set the default value to '__default__'
instead of ''

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-01 13:22:25 +02:00
Dietmar Maurer
23d3881a0a fix jslint errors 2016-03-31 11:13:50 +02:00
Dominik Csapak
7b9c038d54 ext6migrate: change status units to binary prefixes
we used a factor of 2^10 when calculating, but
wrote MB,GB,etc which is not (entirely) correct

this patch changes the units to MiB, GiB, etc,
because this is more sensible than changing the calculation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-31 10:38:37 +02:00
Dominik Csapak
17c71f27d2 ext6migrate: Qemu Bios Selector fixes
add render function for Qemu Bios,
and change data to comboItems and '' to '__default__'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-21 11:15:50 +01:00
Dominik Csapak
8682685479 fix monStoreErrors
in extjs6 they renamed request.operation to request._operation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-04 16:57:18 +01:00
Dominik Csapak
f2782813cd ext6migrate: fix model behaviour for KVComboBox
we used an empty value for the Key-Value ComboBox for defaults.
With extjs6, if the idProperty of a model is empty, they generate
a name for it, which breaks our logic for submitting
(currently we checked if this is empty, and send a delete command
to our api)
instead, we use the value 'default' and check for it when we submit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-29 15:27:15 +01:00
Dominik Csapak
c7218ab37d ext6migrate: update vncconsole and remove java applet code
includes the following fixes:
 * remove all code related to the old java applet vnc client
   (we do not use this anymore)
 * move static configuration to class definition
 * use Ext.ux.IFrame instead of widget.uxiframe (to be consistent)
 * change listener from show to activate (for browser refresh)
 * change deprecated autoScroll to scrollable
 * remove novnc option from openVNCViewer function,
    since we do not need this option anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-27 09:27:15 +01:00
Emmanuel Kasper
63b9faaec1 temporary disable accessibility warnings
ExtJS6 adds accessibility (aria) support to the framework, which means
special handling of space/enter key and panels title, and a lot of
warnings / errors in the browser console

Aria support will be reenabled after all the components are migrated to
ExtJS6
2016-02-17 15:26:13 +01:00
Dietmar Maurer
ffd96a3bf5 add correct display text for lvmthin and drbd storage type 2016-01-27 05:56:30 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00