Dominik Csapak [Tue, 12 Dec 2017 12:25:15 +0000 (13:25 +0100)]
remove (near)full status for storages
since this is not a good default, we do not want the user
to have to configure those limits for each storage, and
a warning triangle was confusing for multiple users,
we remove this again
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fix #1589: auth_handler: raise exception on init_request error
cfs_* methods cann now die (rightfully so) when the IPCC endpoint is
not connected, or another grave IPCC error arised.
As we did not catch those problems in the RPCEnvironments
init_request method, which loads the user config, this got
propagated to the anyevents auth_handler call in its
unshift_read_header method where then all errors where processed in
the same way => with an unauthorized response logging an logged in
user out.
So catch this error and raise an internal server errror exception
instead. Anyevent needs some minor modifiaction in a separate patch
to handle PVE::Exceptions correctly, so this is the partial fix for
bug #1589
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Thu, 30 Nov 2017 16:34:05 +0000 (17:34 +0100)]
Fix JSLint type confusion warnings
The type confusion warnings arose from string and integer concatenation,
and object properties of the name which were alternatively set with
strings and integers.
Thomas Lamprecht [Tue, 28 Nov 2017 15:32:44 +0000 (16:32 +0100)]
ceph: create mon: fix & improve check if IP is in public net
If a CIDR gets passed to Net::IP it is expected to not be from the
middle of an subnet, i.e., 192.168.1.12/24 is *not* OK but
192.168.1.0/24 would be OK.
As the Network/interfaces files also accepts CIDR notation for the
'address' param (now also for IPv4) this let to problems in our node
monitor IP detection code, which used the interface file and Net::IP to
find any address from the ceph public network.
So change to our newer helper PVE::Network::get_local_ip_from_cidr to
get all configured and ready (=up) IPs from this network.
Also handle the case where multiple networks where returned, add a
parameter to allow specifying one of those and ask the user to do so.
If no public network is configured and no mon-address parameter was
passed, we fall back to the remote node IP of the node, as was done
previously. We expect that the user only overwrites the mon-address
if he knows what he do and omit checks here.
Thomas Lamprecht [Mon, 27 Nov 2017 11:43:31 +0000 (12:43 +0100)]
fix #1578: api/resource hastate: fallback to resource cfg state
With ignored or still queued services we have no hastate for a
service in the manager status available.
As we use hastate in the web UI to determine if a service is
configured for HA this could lead to confusion there.
For example, the VM/CT 'Manage HA' window thinks tries to add the
service again if its in the 'ignored' state, and then the backend
errors out because it is already configured.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
access log rotate: try to reload not restart services
with the use of systemd the /etc/init.d/pveproxy restart call got
intercepted and redirected to systemd, which did an restart.
But, that is a behvaior change to the intention of the init.d script,
which would not restart but reload the service.
Thus change this to systemds equivalent:
systemctl try-reload-or-restart pveproxy.service
Which tries to reload, if the unit supports it, and only if that does
not worked it restarts.
Same for spiceproxy.
Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 3 Nov 2017 08:51:37 +0000 (09:51 +0100)]
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)
Dominik Csapak [Wed, 9 Aug 2017 12:08:26 +0000 (14:08 +0200)]
add ver get parameter for js/css files to improve cache behaviour
we do not set an Expire header for our js files, and certain browsers
do not even make the request then (on which we would answer
with a correct 304 not modified)
so to force the browser to load a new version of the gui when we change
something, we add the package version as a get parameter
when doing this, the browsers still cache the file, until the get
parameter changes, which is exactly what we want
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 30 Oct 2017 14:03:38 +0000 (15:03 +0100)]
prevent visual flashing of button when changing element in the tree
when changing between elements in the tree, either the
start or shutdown buttons were visually flashing (meaning they are
enabled/disabled for a short time and change state shortly after)
Dominik Csapak [Fri, 27 Oct 2017 12:13:48 +0000 (14:13 +0200)]
fix #1539: add missing shellquote for proxied commands of pvesh
if we do not do this, passing arguments with spaces
(e.g., pvesh set YYY --param "one word")
leads to ssh calls like this:
ssh REMOTE pvesh set YYY --param one word
Emmanuel Kasper [Thu, 5 Oct 2017 13:46:25 +0000 (15:46 +0200)]
Update VM SCSI controller type after OS selection in Wizard
This was done previously without any kind of user visible feedback, so users
would not know that they had a Virtio SCSI controller as default controller
for Linux VMs.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Thu, 5 Oct 2017 13:41:55 +0000 (15:41 +0200)]
Update VM SCSI type based on iothread value when inside the wizard
We keep the same logic as before: once the iothread option is selected,
the SCSI controller is switched to virtio-scsi-single, until iothread
is unselected again.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Emmanuel Kasper [Mon, 2 Oct 2017 08:37:30 +0000 (10:37 +0200)]
Do not use 'autoselect' as a boolean when preselecting a bus
The bus selector is displayed when we add a Hard Disk or CD Drive.
When it is displayed, we *always* preselect the next available
slot on the controller of our choice.
So this test is not needed.
We keep the test on the string value of 'autoselect' to select
a bus position when adding a CD Drive.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:05 +0000 (11:48 +0200)]
ui: lxc: remove obsolete unmount button
This button was hidden by default and was intended to show up when a
CT is mounted only.
The check if mounted, was done for OpenVZ and may not become true
currently also we only have CLI helpers for mount/unmount but no API
– so just remove it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:03 +0000 (11:48 +0200)]
ui: qemu: combine system changing buttons
add a 'More' Button to the VM and CT Config Panel (its base panel)
and move all buttons which may result in config changes there.
After that we have separated power/migrate actions from system
affecting actions (clone, remove, convert to template).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:48:02 +0000 (11:48 +0200)]
ui: add PVE.menu.Item
Extend 'Ext.menu.Item' with a simplified handler logic also used in
'PVE.button.Button'.
If 'confirmMsg' config is set we wrap the defined handler in a
confirm dialog, useful if the menu item just makes an API call and
does not has an own (edit) window shown.
In contrast to the 'pveButton' we do not have a selection model,
enable function and the respective logic here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Tue, 17 Oct 2017 09:47:59 +0000 (11:47 +0200)]
ui: rename global 'Help' button to 'Documentation'
To make it more clear that this will always end you on the
Documentation index.
Also, multiple Help buttons which all may or may not do something
different are a bit weird/confusing - thus distinction can here be
really helpful, IMO.
We target HD ready (1280x720) as minimal target resolution where this
still fits nicely. This (or bigger) resolution is also used by our
screenshot framework for the documentation - so it also fits there.
Adapt the icon displayed to `fa-book` which resembles the one often
used for manuals and is clearer than a '?', IMO.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Thu, 19 Oct 2017 06:20:12 +0000 (08:20 +0200)]
ui: pveWindowEdit: allow sane onlineHelp specification for edit windows
instead of heuristically choosing the onlineHelp entry from our first
item prefer the one we have in our config, if noone the fallback to
the old heuristic.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Because the replication's purge_old_state() function now
fails if cfs_update() fails, and since it tries to access
the actual local pmxcfs it should never have been called by
tests anyway.
Thomas Lamprecht [Wed, 11 Oct 2017 10:09:42 +0000 (12:09 +0200)]
ui: ha: use vmComboSelector when adding new resource
Make adding resources more comfortable by showing the user also the
name, type, node, ... in a nice combo box grid when adding a
resource instead of just a integer spinner.
Fixes #1517 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Wed, 11 Oct 2017 10:09:41 +0000 (12:09 +0200)]
ui: add VM ComboSelector
this is a mixture of the multi select VMSelector and the single
select pveGuestIDSelector.
Useful when a single VM must be selected but also complementary
information should be shown to the user.
Most of the times the VMID is not really useful for an user as
numbers are harder to remember and to associate as names.
So a dialog which need a VMID (e.g. HA resource addition) forced the
user to lookup the Guest Name -> Guest VMID mapping and then enter it
correctly in the respective input field.
This can be improved by using a combo grid based selector which shows
additional information in the edit window itself, can be sorted and
filtered to quickly select a guest.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Acked-by: Dominik Csapak <d.csapak@proxmox.com>
Thomas Lamprecht [Wed, 11 Oct 2017 12:10:24 +0000 (14:10 +0200)]
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>
Thomas Lamprecht [Wed, 11 Oct 2017 07:16:23 +0000 (09:16 +0200)]
ui: re-align global search field to now shorter version
commit 2ddb072661a9230dac16ec91c2f4ba91b8144dba removed showing the
short SHA1 commit hash in the version info field but did not
realigned the search field so that it got a asymmetric space.
Adapt the Version info minimal width so that this is again the case.
ui: inline novnc: always focus console panel after render
Enforce focus on the Inline CT/VM/Host Console panel backed by noVNC.
Else, if a Console is already active on VM A and we select VM B the
console there does not gets the focus as its now in the three and
regaining focus to the console is not fully intuitive - i.e. just
clicking on the console won't do the trick, you have to click on
specific spots (e.g. console panel header) or re open the console.
The only possible drawback of the focusing is that if one has the
console open, selects another VM he cannot navigate the tree down
with the arrow keys (as long as the console is open) - but thats
hardly a situation where one gets into and can be worked around.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Wed, 11 Oct 2017 09:49:50 +0000 (11:49 +0200)]
fix updateStore destroy
the store never fires/gets a destroy event, thus it
never stops the load_task and never unqueues itself in case
the store gets destroyed but not explicitely stopped
with overriding the destroy method, this works now as intended
We extract them from the json data by first deleting all
quotes, then deleting everything up to their entries, then
everything after the next comma. If the entry is at the end
there's no comma, instead there are closing braces, so we
need to strip away these as well.