Commit Graph

33 Commits

Author SHA1 Message Date
Thomas Lamprecht
f729096099 ui: buttons: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:58:52 +02:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
8058410f40 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
f6710aac38 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
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Thomas Lamprecht
417f904f78 ui: pending revert: detect parent pending grid automatically
but cache it to avoid frequent, potential costly, up() calls

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:49:31 +01:00
Thomas Lamprecht
3ee15859b2 ui: pending revert: rename baseurl config to apiurl
makes more sense and avoids confusion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 15:48:33 +01:00
Thomas Lamprecht
591efb6725 ui: factor out pending changes revert button
makes no sense to have the, more or less, exact same 25 line method 5
times..

could be moved to widget TK, but that's for another time.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-30 11:48:03 +01:00
Tim Marx
8eccc68f6c added new parameter to pass a command to the newly opened terminal
Ext.urlEncode is deprecated, use Ext.Object.toQueryString instead

Signed-off-by: Tim Marx <t.marx@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-08 12:29:49 +01:00
Dominik Csapak
3438c27eab allow xtermjs to be the default console
if not available for a vm, we fallback to novnc like with spice

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-04-23 09:42:55 +02:00
Dominik Csapak
a71b43989e enable/disable xtermjs depending on the existance of a serial port
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-01-30 16:37:21 +01:00
Thomas Lamprecht
672a6270ea use HelpButton from widget toolkit
Proxmox.button.Help renamed the css class for the button styling, as
this class is only used rarely and the widget toolkit does not
provides a (shared) css file itself, just rename it here too.

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
5720fafabc 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
Emmanuel Kasper
ea54132130 Set Console Button icon style at definition time
This will allow the 'Upgrade' button to get an icon too.

Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-20 14:33:30 +01:00
Emmanuel Kasper
d0f7ae4642 Use the new xterm.js icon with the corresponding Menu Item
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-20 14:33:30 +01:00
Emmanuel Kasper
c02971cf8c jslint: remove trailing comma after last objects property
Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
2017-12-20 14:33:30 +01:00
Dominik Csapak
d345d7ad5d add xtermjs to consolebutton
also rework the button.
move most things in the static configuration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-12-12 08:34:07 +01:00
Emmanuel Kasper
f4824f0a69 Allow to set the onlineHelp via a config Object
For cases when we need to set the online help block id of a modal window after the help
button has been configured.
2017-09-19 11:11:29 +02:00
Emmanuel Kasper
9317d08a2d Rename the pve-help-button to pve-inline-button
This will allow reuse of the class for other inlined buttons
2017-07-25 14:24:35 +02:00
Dominik Csapak
1344537655 port button from proxmox-widget-toolkit
we want the new behaviour of the proxmox button also in pve, but
we do not want to change to proxmox-widget-toolkit yet

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-14 07:32:20 +02:00
Thomas Lamprecht
8348c25c4c explicit set button focus respecting the 'dangerous' option
The line:
 > Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
just set the button which should get triggered on an keyboard "Enter"
if no button is focused currently.

But often the 'Yes' buttons is focused so an enter press would
trigger it, even on a as 'dangerous' marked option.

Fix this, as else a to fast "Enter" press can cause more problems
than needed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2017-06-12 10:24:29 +02:00
Dominik Csapak
6fb47ebac9 correctly hide helpButton in wizard
the property is "listenToGlobalEvent" not "listenGlobalEvent"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-02 16:40:50 +01:00
Dietmar Maurer
c8802a60b7 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Dominik Csapak
a50de12435 add tooltip hashmap/generator for help button
instead of manually setting the onlineHelpTooltip property
we now have a method which maps links to the docs to
titles

for now this uses a static hashmap, but in the future
we want to generate this by the pve-docs package

also most of the subheaders we can generate instead of
saving them because they simply have each word capitalized
(e.g. '_container_network' => 'Container Network')

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-15 11:58:17 +02:00
Dominik Csapak
4542b0d633 make pveHelpButton more abstract
this adds an option to set the helplink on the global event

also we now only set the link instead of the complete handler,
which is now static and gets the url from a property
(which we will set directly for other help buttons)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 16:36:48 +02:00
Emmanuel Kasper
285403bf62 Add custom syle to pveHelpButton
Next / OK are already displayed in blue, which is the 'call-to-action'
color we use everywhere.
To prevent stealing attention from these buttons, switch help button
to grey
2016-06-01 12:38:29 +02:00
Emmanuel Kasper
ecbca6c4c0 Add help button for PVE
This help button is meant to be added on InputPanels, where a
link to an online documentation chapter or subschapter is available.

Clicking on the help button will open the help in a new
browser tab.

Original idea similar to the pfSense GUI.
2016-06-01 12:30:25 +02:00
Dominik Csapak
ec0bd652db jslint: fix type confusion and property access
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}

also fix object['property'] access with
object.property

also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:23 +02:00
Dominik Csapak
52721af8dc add split button
the same code base as our pveButton
(selectionchange handling, confirm,etc.)
but with a split button (a button with a menu)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-05 07:42:06 +02:00
Dominik Csapak
9fb537753a ext6migrate: remove trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-16 16:32:55 +01:00
Dominik Csapak
26c5f8d776 ext6migrate: fix Console butten text (again)
since sometimes, we set the text of the console button
('shell' or 'upgrade')
we do not want to override this everytime, but only
when me.text === null

we cannot use applyIf either, because this overwrites only
if the field is undefined, not null

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-16 16:26:58 +01:00
Emmanuel Kasper
0d9df07076 fix display of lxc console button text
same reasoning as

f799361886
do not use applyIf when adding items in initComponent()
2016-03-09 18:02:09 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00