73 Commits

Author SHA1 Message Date
Thomas Lamprecht
c3a1166ed7 use InputPanel from widget toolkit
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
Thomas Lamprecht
6529dbca44 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

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
Thomas Lamprecht
74c82e073f use ObjectStore from widget toolkit
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
Thomas Lamprecht
85daa13bcd use DiffStore from widget toolkit
The alias stayed the same (store.diff) so we need to change direct
usage of 'PVE.data.DiffStore' only.

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
Thomas Lamprecht
0d173d3e55 use windowEdit from widget toolkit
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
Thomas Lamprecht
324095c43e use KVCombobox from widget toolkit
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
Thomas Lamprecht
956cd0bdda use Checkbox from widget toolkit
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
42ec18721b 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
55dd324575 use Button from widget toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
9ab1d02410 use Proxmox.button.StdRemoveButton where possible
most 'Remove' buttons we have used the same code pattern over and over,
with the StdRemoveButton we have a component which does all of this for
us

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
7a8d5554d4 change pve-invalid-row class to proxmox-invalid-row
because we will use that in the widget toolkit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
9fcbafbece use IntegerField from widget toolkit
there we implemented deleteEmpty, which we can use in some cases.
this also fixes a bug in the ControllerSelector where
an empty field would be allowed (but should not)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Dominik Csapak
9c5bb73a8a use ComboGrid from proxmox-widget-toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-01-25 13:36:37 +01:00
Thomas Lamprecht
30fb6227e9 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
2c619cd7db 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
69fecfe640 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
06359ba440 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
Dominik Csapak
cc83c7b862 highlight errors in grids
we gave erroneous entries in grids the class .x-form-invalid-field
but since we changed to the "crisp" theme, this class did not have any
highlighting

so instead we use our own "pve-invalid-row" class
and give it a light red background

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-14 15:18:54 +02:00
Dominik Csapak
f7cd934701 make the ha node priority field explicitly not a form field
in extjs 6.2 form fields in widgetcolumns get parsed in a form
which is not what we want here, because we have a hidden field, which
gets generated on a change

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-09 10:44:23 +01:00
Emmanuel Kasper
9af71828d4 Rename 'create' to 'isCreate' in pveWindowEdit and subclasses
This fixes around 20 jslint type confusion warnings.
Also reduce the scope and document jslint warnings along the way.
No functional changes.
2017-03-02 10:36:35 +01:00
Dominik Csapak
b0853f8e37 do no translate ha states
because they have a special meaning, do not translate them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-24 09:00:09 +01:00
Emmanuel Kasper
a99be93b9d Remove technical terms from content to be translated 2017-01-23 11:51:05 +01:00
Dominik Csapak
f0f0680299 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
6fbae489ae 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
Thomas Lamprecht
180873313f 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
Emmanuel Kasper
7e7cdb0716 HA: Add a warning/info message for HA setups < 3 votes fix: #1228 2017-01-03 11:10:06 +01:00
Emmanuel Kasper
dd0f5ef3d5 Convert the VMIDSelector to a generic GuestIDSelector
This allows to display a 'CT', a 'VM', or a 'CT/VM' label
to be displayed, depending on the context.

Currently when restoring a CT backup or creating a CT via the
wizard, we are asked to enter a  *VM* ID, which is confusing.
2016-12-19 07:31:27 +01:00
Dietmar Maurer
85ce9faba7 ha/ResourceEdit.js: fix online help ref 2016-11-23 11:39:58 +01:00
Dominik Csapak
9eb1d8ee70 change the ha resources columns
rename Request State to State, and add the request_state and crm_state
as hidden columns (so that the user can display them if they want)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 12:30:36 +01:00
Dominik Csapak
fba0a1d89e merge ha resources into the ha status panel
this changes the ha status view and ha resources view, so that they take
an rstore and use that instead of a new one

we do this, so that we can display the status and the resources grid
with one api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 12:30:05 +01:00
Dominik Csapak
12613b2e62 add the haStatus panel
for the new status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 12:29:09 +01:00
Dominik Csapak
aa16b83f62 add new fields to ha models
to be prepared for the new ha status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-22 12:28:28 +01:00
Dietmar Maurer
0ebabc3c5b Resources.js: s/enabled/started/ 2016-11-19 10:38:04 +01:00
Thomas Lamprecht
130668cfb5 ha resource edit: adapt to new service state
Add the new stopped state to the ResourceEdit panel.
Rename enabled state to started as done in ha-manager.

As 'enabled' is now the wrong label use the more correct label
'Request state', for both the resource edit window and the grid
column.

Do this by replacing the checkbox with a KVCombogrid.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-19 10:20:04 +01:00
Dominik Csapak
7b5f3d7cfa make backup/storage/ha resources/ha groups grid stateful
so that the column changes are saved in the browsers local storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-17 09:16:15 +01:00
Dominik Csapak
ac47b0d215 fix #1196: make restriced/nofailback boolean in gui
since we get the string "0" from the backend if the line is in the
groups.cfg, we have to set the field to type boolean, or the string will
always be interpreted as true

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-10 10:02:11 +01:00
Dominik Csapak
9346100128 add pveIntegerField and use it
this adds a subclass of Ext.form.field.Number with the settings for
Integers (allowDecimals: false and allowExponential: false and default
step size 1)

and use it where we only accept integers

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:14:06 +01:00
Dominik Csapak
d4eb9a856b move onlineHelp into classes from definition
this patch moves the onlineHelp ids into the javascript classes, instead
of defining them where we use the classes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 17:13:12 +01:00
Dominik Csapak
bbe1f86af3 fix jslint errors in ha resources
also the correct value for haGroupSelector is [] not '',
with this, the reset button works correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 16:44:03 +01:00
Thomas Lamprecht
d30840d838 forbid decimals and exponent in HA resource edit numberfields
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-02 11:10:58 +01:00
Thomas Lamprecht
6643f07956 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
Thomas Lamprecht
db0c652e1b add 'max_{relocate, restart}' fields to UI
The 'max_reloacte' and 'max_restart' properties can be set via CLI
and API for about a year, expose them to the user alsow via web
interface

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-10-31 16:36:05 +01:00
Thomas Lamprecht
b4167ff221 remove unnecessary trigraph
values['delete'] is always empty here, plus the code was buggy for
the case that it wasn't:

values['delete'] = values['delete'] ? ',group' : 'group';
                ^^^
         always overwrites values['delete'], even if not empty

So just drop it here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-10-31 16:34:53 +01:00
Emmanuel Kasper
ffdef67ce7 Add onlineHelp 2016-10-19 17:25:53 +02:00
Emmanuel Kasper
4aff45544e Use enable as adjective to match the Resource List panel
Since we describe a resource state, an adjective is also here a better match.
2016-10-19 17:25:36 +02:00
Emmanuel Kasper
4772e2a060 Close #1161: add hint when disabling a ha resource
Disabling a HA resource/service means that this
ressource will always be turned off.
However some users though this disabling HA management
for this VM, see
http://pve.proxmox.com/pipermail/pve-user/2016-October/011024.html

so we had a hint after clicking on the 'disable' checkbox, that
the checkbox is meant for shutdown
2016-10-19 17:25:20 +02:00
Dietmar Maurer
2963616ae3 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Thomas Lamprecht
1cea646d50 HA/Groups: add onlineHelp button to edit window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-10-07 08:36:19 +02:00
Thomas Lamprecht
bd5d4d9dc5 ha/groups: allow editing node priorities through UI
This allows the setting and editing node priorities in HA groups.

Also fixes the bug where the priorities of an existing group (e.g.
set through the CLI) where deleted when editing said group through
the GUI.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-07 08:29:48 +02:00
Dominik Csapak
172978d27d drop all hide calls
since we do not use tabpanels anymore,
the hide calls and listeners do nothing,
so we can drop them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-08-24 12:46:47 +02:00