Commit Graph

2920 Commits

Author SHA1 Message Date
Dietmar Maurer
70473e51d4 HTTPServer.pm: rewrite rest_handler (simplify code)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:34 +01:00
Dietmar Maurer
b84415d325 remove base_handler_class - directly use PVE::API2 instead
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:34 +01:00
Dietmar Maurer
a2e669fe2c HTTPServer.pm: call rpcenv->init_request earlier.
Because we access file from /etc/pve/ in auth_handler.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:34 +01:00
Dietmar Maurer
9d3f059fd9 HTTPServer.pm: call $rpcenv-init() when necessary.
This code was removed from the generic server, so we need
to add it here. cleanup follows ...

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:34 +01:00
Dietmar Maurer
a9de2d443b pveproxy.pm: set title to 'Proxmox VE API'
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:34 +01:00
Dietmar Maurer
e4e84ee023 remove www/bootstrap completely (now in pve-http-server)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:33 +01:00
Dietmar Maurer
e469770953 pveproxy.pm: use PVE::APIServer::AnyEvent::add_dirs()
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:33 +01:00
Dietmar Maurer
b996e6c0ec use new libpve-http-server-perl package
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-16 11:54:33 +01:00
Fabian Grünbichler
f8a723372a bump version to 4.4-7 2017-01-13 11:01:33 +01:00
Fabian Grünbichler
f50cdc4e8c fix CSRF token generation
this broke with the recent refactoring
2017-01-13 10:58:44 +01:00
Emmanuel Kasper
22c01a4473 Disable autoSelect of target storage
autoSelect: true  was surreptitiously commited with the refactoring
of 406ac585db
( Use component references via lookupReference() )
2017-01-12 17:00:33 +01:00
Dietmar Maurer
d3c0bf7b95 bump version to 4.4-6 2017-01-12 14:24:13 +01:00
Dietmar Maurer
7e5f7c618b HTTPServer.pm: factor out code which refers to PVE::Cluster
This will make it easier to move HTTPServer to a separate package.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 13:07:00 +01:00
Dietmar Maurer
7e017024a7 add setup_environment hooks to CLIHandler classes
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 13:07:00 +01:00
Emmanuel Kasper
406ac585db Use component references via lookupReference()
This allows to add the components in each column in the order they
appear in the Clone Window.
References from child components are kept in an object in the parent
component so it should be the same performance-wise (contrary to to Ext.ComponentQuery
which is doing DOM parsing)
2017-01-12 12:26:07 +01:00
Fabian Grünbichler
7edaceb484 HTTPServer.pm: make split_abs_uri() private
and rename baseuri to base_uri to be consistent

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-12 11:55:54 +01:00
Dietmar Maurer
68d2366c32 HTTPServer.pm: improve baseuri matching
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:19 +01:00
Dietmar Maurer
2103d113af remove obsolete PVE::REST class
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:19 +01:00
Dietmar Maurer
be613dfcbc bin/Makefile: export PERLLIB=.. so that doc generator works correctly
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:19 +01:00
Dietmar Maurer
617ca1c615 PVE/API2/Formatter/HTML.pm: avoid use of PVE::REST
Instead, pass the HTTP server as last argument to the page formater,
so that we can call $server->create_auth_cookie().

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
ddaefd5c65 PVE/Service/pveproxy.pm: avoid using PVE::REST
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
7da6575ea3 HTTPServer.pm: add missing 'use' statements
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
2261f24957 HTTPServer.pm: add rest_handler method
copied from PVE::REST. We do not need that class anymore.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
3093a3e8c7 HTTPServer.pm: allow to set baseuri when creating the class
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
430b554feb HTTPServer.pm: add auth_handler
copied from PVE::REST (slightly adopted)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Dietmar Maurer
25de0db135 HTTPServer.pm: add cookie handling methods
Copied from PVE::REST (I want to get rid of this PVE::REST class).

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2017-01-12 11:53:18 +01:00
Emmanuel Kasper
68a433faff Use qcow2 as default disk format for clones fix: #1144
When using a file based storage, qcow2 has more features as raw,
this is why we recommend it for clones, similarly to when adding
new disk images.
2017-01-12 10:56:02 +01:00
Emmanuel Kasper
1c06db3444 Do not show a Clone Mode selection Window for non-templates clones
As Non-templates clones are always a full clone.
2017-01-12 10:48:29 +01:00
Emmanuel Kasper
364c58460f Group the Pool selector combobox to the VM properties
The pool membership relates here to the VM membership, not
the storage membership, so it makes sense to move it closer
to the VM ID / VM name form fields.
2017-01-12 10:41:47 +01:00
Emmanuel Kasper
2f3c5c38c0 Make the Snapshot selector an optional parameter in the Clone Window
The snapshot selector was known to confuse first time pve users.
Some wondered that they had no snapshot called 'current' in their
snapshot trees, and other thought that snapshots would be included
in the copied image.

So before displaying the Clone Window, do an API call to verify
if the source VM has snapshots.
2017-01-12 10:41:36 +01:00
Emmanuel Kasper
26693bb937 Disable the submit button based on whole form validity
Until now we disabled the submit button, based on
the feature API call where we tested if the selected VM, and its snapshot
can be used as the source of a clone.

This had the following problems:
 * the feature test for copy clone / linked clone always returned true,
 since the passed paramaters were already filtered before user input
 (ie we only allowed a linked clone to be selected if the source VM is
 a template, or a snasphot to be selected if existed on source VM)
 * the guest ID input field was not validated

With the current patch, the validation is now made on each of the form
fields. verifyFeature() is still used to populate a list of valid nodes
passed to the Node Selector.
2017-01-12 10:40:22 +01:00
Emmanuel Kasper
c3dea8fcaa Use correct parameter for GuestIDSelector 2017-01-12 10:38:01 +01:00
Emmanuel Kasper
44494b4c4c Better naming for kv1 comb box, document the two private functions 2017-01-12 10:37:50 +01:00
Dominik Csapak
4198e16fdd update gettexts to avoid duplicates in po file
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-11 10:57:55 +01:00
Dietmar Maurer
33dc998183 remove obsolete inline documentation 2017-01-11 10:54:47 +01:00
Dominik Csapak
93cdb62689 add type column to storage content view
and move the grouping feature in the class definition while changing
the text to a generic one

this allows us to group by all columns and still have meaningful
grouping headers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 15:42:12 +01:00
Dominik Csapak
7c3a011345 remove unnecessary emptyText
we already set it statically

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 15:39:15 +01:00
Dominik Csapak
f3f73cde3b check general health for ceph monitors, not only time
we did not check the healthservices array for the monitor widget,
this patch does that, and takes the worst health state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 13:03:04 +01:00
Dominik Csapak
bd8950b0ea fix #1247: disregard timecheck for one monitor
if we only have one monitor, set the timecheck to HEALTH_OK
(since we get none)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 13:02:17 +01:00
Dominik Csapak
a49cdceebb fix jslint errors
since the value at the top is now directly a string,
we need the jslint confusion at the number and not for the
string at the bottom anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 12:14:26 +01:00
Dominik Csapak
49e1990583 fix gettext strings
we expect a gettext on a single line and to not contain any
variable/logic, so we remove the long text from it altogether (since we
do not want to translate that at the moment), and we rearrange the code
so that gettext only contains strings

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 12:14:12 +01:00
Dominik Csapak
8f3600b629 disable submit button in migrate window when not valid
when the form is not valid (e.g. an offline or no host selected),
disable the submit button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 08:21:30 +01:00
Dominik Csapak
eb882c6f04 show only relevant vms in bulk action window
this adds a default filter for bulk start and stop, so that only the
relevant vms are visible (stopped and started respectively)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 08:18:35 +01:00
Dominik Csapak
3373911503 make filtered columns in grid more prominent
this makes the column header not only italic but also bold, so that one
can more easily see that the column is filtered

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-10 08:14:41 +01:00
Emmanuel Kasper
e83e60bfa1 Reload the grid list of backups after the backup task completion
This allows visual feedback for first time users doing a backup.
2017-01-05 16:17:32 +01:00
Dominik Csapak
6a4edbd195 change Start/Stop/Migrate all to Bulk actions
this uses the new vmselector and the new vmid filter in the backend
to allow starting/stopping/migrating selected vms instead of all

by default all vms are selected to have the same default behaviour

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-05 15:59:44 +01:00
Dominik Csapak
42aff48802 add vmselector form field
this is a form field which is a grid for selecting vms

if nodename is given, it will filter the vms only to the given node

you can filter the grid with the column header, and only the selected
and visible items are in the value of the field

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-05 15:58:41 +01:00
Dominik Csapak
6ae2ec8126 add BulkAction window class
this is mostly copied from MigrateAll.js, but a more generic way,
to allow startall and stopall to also use it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-05 15:57:11 +01:00
Dominik Csapak
2a498506e0 add vmid filter to (start/stop/migrate)all
this is a simple filter which allows us to limit the actions to specific
vmids

this makes it much simpler to start/stop/migrate a range of vms

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-05 15:55:59 +01:00
Thomas Lamprecht
3e52f2ed01 ha: re-add node to service status
On the old HA status we saw where a service was located currently,
this information was lost when we merged the resource and the status
tab.
Add this information again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-01-05 15:52:23 +01:00