Commit Graph

32 Commits

Author SHA1 Message Date
Aaron Lauterer
403476f8ef ui: ha/ressources: fix toggling edit button on selection
It needs to be a 'proxmoxButton' to get activated when selecting a HA
ressource. This was lost during the last code cleanup, commit a69e943.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-07-07 14:20:16 +02:00
Thomas Lamprecht
a69e943d73 ui: ha/Resources: eslint fixes and code cleanup/refactoring/modernize
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-19 07:01:51 +02:00
Thomas Lamprecht
8b520a2b6f ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
9beb47513e ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
925ef9da87 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +01:00
Thomas Lamprecht
8f26f60445 ui: ha: drop unused pve-ha-resources model
we only have the unified pve-ha-status model now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-03 14:29:51 +01:00
Thomas Lamprecht
7ce422bbc0 ui: ha: calculate service name in model to fix sorting
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-03 14:29:36 +01:00
Thomas Lamprecht
98f1fb4a36 ui: ha: add name of service to resource grid
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-30 20:03:53 +01:00
Thomas Lamprecht
d4ce866f1f followup: code cleanup to arrow functions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-07-08 19:26:13 +02:00
Dominik Csapak
92b89add8d gui: show 0 for max_relocate/restart correctly
0 || '1' will always return '1'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-07-08 19:21:53 +02: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
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
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
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
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
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
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
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
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
Dominik Csapak
67796bbcd6 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
79786b96e5 jslint: fix missing or extra semicolon
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:07:42 +02:00
Emmanuel Kasper
df1419e813 reload stores of tabpanel children on 'activate' event
Tabpanel reload -> send 'show' event -> reload child panel store

do not work with ExtJS6

but

Tabpanel reload -> reload  child panel ->  child send 'show' event ->
reload a grid store in the panel still works

so we don't blindly replace the 'show' events everywhere but only
when the event was expected by a direct child of a tabpanel
2016-02-26 07:38:17 +01:00
Dominik Csapak
dbe1c56679 add htmlEncode to various fields
and the same for manager6

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-20 09:48:23 +01:00
Dietmar Maurer
7fc10cffd6 copy ha/Resources.js from manager to manager6 2016-02-15 12:35:14 +01:00