3368 Commits

Author SHA1 Message Date
Emmanuel Kasper
2414ef153a 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>
2017-10-19 11:46:24 +02:00
Emmanuel Kasper
42bd655684 Add a field to show which SCSI controller type we are currently using
We use the field label 'SCSI Controller'. 'Type' is redundant, otherwise
we would have Network Card Type, Display Type, Network Card type, etc ...

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
5034f7833c Do not use the noVirtIO property to build the controller list
This property is only used for CDEdit, so we can deduce this from
the fact that autoselect is set to 'cdrom'

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
0e09929dfe Save the components we found via down() in a variable for later reuse.
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
f5aea3f018 Remove unused noScsi parameter
SCSI is a valid bus for Disks and CD drives, so it should always
be appear in the bus list.

Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 11:46:23 +02:00
Emmanuel Kasper
7206af4b04 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>
2017-10-19 11:46:23 +02:00
Thomas Lamprecht
66b8fc0b8a fix #1518: ui: lxc: add 'more' menu with HA manage item to panel
Move the remove button into the more button and add a 'Manage HA'
button there, mirroring the changes from the qemu panel.

Allows to add an unmanaged CT to HA or to edit the HA settings of a
managed one.

Fixes: #1518
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-By: Dominik Csapak <d.csapak@proxmox.com>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
6e2db5ecdf 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>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
11480a8ca0 fix #1518: ui: qemu: add HA manage menu item to panel
Allows to add an unmanaged VM to HA or to edit the HA settings of a
managed one.

Fixes: #1518
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
757f4362c2 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>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
e488f98182 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>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
41e024ee43 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>
2017-10-19 09:24:46 +02:00
Thomas Lamprecht
35085f4ae8 ui: ceph: add some help buttons
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-19 08:51:34 +02:00
Thomas Lamprecht
6d44d7c08a 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>
2017-10-19 08:51:34 +02:00
Philip Abernethy
66f7b0f74e Use run_cli_handler instead of deprecated run_cli 2017-10-18 15:32:52 +02:00
Wolfgang Bumiller
b03b47491f test: mock PVE::Cluster::cfs_update
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.
2017-10-18 15:31:00 +02:00
Thomas Lamprecht
1c289bc89e ui: ha: make vote warning shorter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 14:54:25 +02:00
Thomas Lamprecht
9f50d5041b 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>
2017-10-16 14:54:22 +02:00
Thomas Lamprecht
a86b4daf7b 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>
2017-10-16 14:54:00 +02: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
bbcfa5abc9 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.

Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 14:13:05 +02:00
Thomas Lamprecht
ff605c35e7 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>
2017-10-16 14:10:48 +02:00
Dominik Csapak
5c6b8a6557 fix #1531: match nodename exactly for vmidselector
else we would get vms for wrong hosts if the nodename is a pre/postfix
of another nodename (e.g. 'abc' and 'abc123')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 11:23:20 +02:00
Dominik Csapak
e2c2bf5e50 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

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 07:09:18 +02:00
Thomas Lamprecht
840cd4669e ha/resource: add ignored state to web gui
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-10-13 10:53:27 +02:00
Fabian Grünbichler
fc4a772e78 bump version to 5.0-33
and add versioned dependencies:
- libpve-common-perl: for PVE::Subscription
- libpve-access-control: for new VM.Snapshot.Rollback privilege
2017-10-10 14:23:00 +02:00
Fabian Grünbichler
8ccae777f0 ceph: disable OSD unit in destroyosd
while OSDs units should only be runtime enable and disappear on reboots,
this serves as an additional safeguard to ensure no leftover units can
exist.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-10-10 12:17:17 +02:00
Fabian Grünbichler
f4fe197db4 ceph: correctly parse 'pg dump' output
Reported-By: Waschbüsch IT-Services GmbH <service@waschbuesch.it>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-10-10 12:16:43 +02:00
Dominik Csapak
4e02a286b1 fix #1516: fix mouse-scrolling of overflowhandlers in firefox
this is a workaround for scrolling in toolbars, etc. in firefox with the
mouse

while the result is not very "pretty", it maintains the old behaviour
for all other browsers and makes it work in firefox

we can drop this when we update to a new extjs release

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-06 07:54:55 +02:00
Wolfgang Bumiller
765bba6ca6 doc: spice-example-sh: support special characters in passwords 2017-10-05 13:57:27 +02:00
Wolfgang Bumiller
52a450d619 doc: spice-example-sh: fix ticket/csrf extraction
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.
2017-10-05 13:57:27 +02:00
Wolfgang Bumiller
be4c6ad688 doc: spice-example-sh: add quotes everywhere 2017-10-05 13:57:27 +02:00
Fabian Grünbichler
2b1f3fa87a build: reformat debian/control
using wrap-and-sort -abt
2017-10-04 11:05:32 +02:00
Dominik Csapak
bd9df10b78 fix #1510: do not scroll back to focus when view gets refreshed
this adds a workaround, so that we restore the scroll position
when we restore the focus

with the flag 'jumpToFocus', we can enable the old behaviour

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-04 10:57:33 +02:00
Dietmar Maurer
43fc27a4ec PVE/API2/Subscription.pm - use new PVE::Subcription class 2017-10-03 12:54:29 +02:00
Dietmar Maurer
e83795f570 Subscription.js - use enableTextSelection instead of 'selectable' feature
The 'selectable' feature does not work anymore.
2017-09-27 17:23:03 +02:00
Wolfgang Link
0d083f4b27 Clean up unnecessary code.
The jobid is already parsed by the file parser.
2017-09-25 15:45:28 +02:00
Thomas Lamprecht
f2e9079f0d remove obsolete Posix use clause
besides the cleanup purpose this fixes an actual problem, perls POSIX
module has the following caveat:

`Everything is exported by default (with a handful of exceptions).
This is an unfortunate backwards compatibility feature and its use is
strongly discouraged. You should either prevent the exporting (by
saying "use POSIX ();", as usual) and then use fully qualified names
(e.g.  "POSIX::SEEK_END"), or give an explicit import list. If you do
neither and opt for the default (as in "use POSIX;"), you will import
hundreds and hundreds of symbols into your namespace.'

see `perldoc POSIX`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 15:18:25 +02:00
Thomas Lamprecht
8c054099b2 window.Wizard: increase default size
The current size was choosen with the older, more compact, classic
theme. The Crisp theme, now in use, has a bit more spaces and bigger
font sizes to adapt to the increased pixel density of current
displays.
Increase the size a bit (~13%) but try to keep the aspect ratio.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
d24064e4d3 PVE.qemu.OSTypeEdit: declare static
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
5f38c3fc81 wizard: merge CD/DVD and OS panels
We had a single column for the CD/DVD panel, fill the second column
with the now in size reduced OS type selector, as ISO selection and
OS type selection are tied together.

Reduces steps needed for creating a VM.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
e41bb8b9b6 OSType edit: switch to combobox
Move from the radiogroup to two comboboxes, where the base OS and
then a specific Version can be choosen.

Avoids multiple occurences of strings like "Microsoft Windows" and
saves a lot of space - which will be used to merge this panel with
the ISO selector panel in the create wizard.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +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
Thomas Lamprecht
0f421616f1 refactor OSDefaults, OSTypeEdit: add and use getDefaults
encapuslation wise it makes sense to have a helper which assembles a
os specific setting object in the OSDefaults class, where those
settings are defined.

Else we always need to check if the current OSType on the user side
of this class, which is against encapsulation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-25 14:11:50 +02:00
Thomas Lamprecht
4ad508efc9 ui: reuse ResourceStores default handling for guest description
First, there was an additional space between "'" and ")" which lead
me to this.
I could never trigger the case where vmname is undefined, and saw
that we have a almost same default handling in data/ResourceStore.js

So, just use that one instead here - it misses the single-quotes
inside the parentheses, but as there are already said parentheses
this is visually still very OK, IMO.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 10:41:57 +02:00
Thomas Lamprecht
a5c9479705 use log method from base VZDump::Plugin
we copied our log method over there to resolve a cyclic dependency,
now use it here to reduce code duplication.
As we are below pve-guest-common in the dpendency hierachy we may use
it, but it does not may (or at least should) use us.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-22 09:34:09 +02:00
Matthias Urban
8ed196a408 VM.Snapshot.Rollback privilege added
VM.Snapshot.Rollback privilege added

Signed-off-by: Matthias Urban <matthias.urban@pure-systems.com>
2017-09-22 09:24:44 +02:00
Thomas Lamprecht
8555b100bb vzdump/pigz: use ProcFSTools for core count, not sysconf
A "sysconf(84)" is not really descripitve. There is no POSIX const
entry for _SC_NPROCESSORS_ONLN (number of processors online) as its
not standard but an adoption of glibc.
Better just use our proven ProcFSTool's cpuinfo method for getting
the desired information.

This is kept only for backwards compatibillity as we guaranteed that
we use #cpus/2 if 'pigz' is set to 1, else I would have removed this
alltogether and just directly passed 'pigz' to the command...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-09-20 12:34:22 +02:00
Emmanuel Kasper
1c62fde24d Turn the offline/online checkbox of the Migrate Windows into a displayfield
This checkbox had not effect whatsoever:
 * if the VM was online and offline was selected, the migration would fail
 with the message that the --online flag is needed for running VMs
 * if the the VM was offline and online was selected, the migration would
 happen offline anyway
2017-09-19 11:11:29 +02:00
Emmanuel Kasper
2df7ea9fda Rework Migrate Window with declarative synthax
Also group all qemu vs LXC tests in a single place.
2017-09-19 11:11:29 +02:00