Commit Graph

20 Commits

Author SHA1 Message Date
Dominik Csapak
375d291810 gui: show lock in status bar of vms/cts
also add 'tbarSpacing' parameter to ConfigPanel, that controls
the spacing after the title

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-03-21 18:39:27 +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
Dietmar Maurer
63b6b7ce74 ConfigPanel: automatically expand node in selectById()
This is only used for automated tests.
2016-11-21 13:02:01 +01:00
Dietmar Maurer
86ca27943d ConfigPanel: added helper selectById()
for test automation
2016-11-11 17:11:19 +01:00
Dominik Csapak
b7c32bee5f change overflowhandler of actionmenu to scroller
the menu overflowhandler has a few problems
(alignment, no action for some entries)
so we change it to type scroller

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-15 13:41:02 +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
d33823bf07 add tooltip to help button
with this patch, the help button on the config panels
get a tooltip with the text of the property
onlineHelpTooltip

or when an options has an onlineHelp defined but no
tooltip text, it gets the title of the option
(e.g. Datacenter -> Backup has the Tooltip "Backup")

We want this, to clarify where the help button goes,
without actually clicking

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-14 13:05:38 +02:00
Dominik Csapak
9cc74dfe30 add a helpbutton to the toolbar of the configpanel
this adds a contextual help button to the action
toolbar on the far right.

now the subclasses of pvePanelConfig have to have
a property 'onlineHelp', which is a relative link
to the relevant documentation

if no link is given, we output 'No Help available'.

For the folder view, we have a switch statement,
because these are dynamically created and simply
from type pvePanelConfig

if an option has the property onlineHelp, this link
will be set when selecting it, so that
you have a contextual help button for the options
(e.g. directly to the backup documentation on the 'Backup' entry)

if an option does not have this property, it defaults
to the pvePanelConfig property

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 16:40:43 +02:00
Dominik Csapak
9a4c279dbf use a treelist instead of tabs in configpanel
this patch changes configpanel class,
so that instead of creating a tabpanel,
we now are a card panel which uses a treelist
to choose the active card

this changes how the panel looks:
instead of having countless tabs on the top
we now can have a nice tree structure on the left

how the items will be interpreted by the tree
is commented in www/manager6/panel/ConfigPanel.js

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-08-24 12:19:09 +02:00
Dominik Csapak
464c721af6 fire activate event for lazyitems in tabpanels
when changing tabs which are lazyitems,
there will be no activate event for the content of the tab

so we fire it manually on tabchange (if the new card has the
lazyitems plugin activated) as we do it for the hide event

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-07-07 08:09:53 +02:00
Dominik Csapak
e008e6e44f check if tabs exist before selecting them
when switching from a vm to a template, if you
have a tab selected which does not exists in a template
(for example console or task history) you break
the site

this patch checks if the wanted tab actually exists,
and leave it on default (the first) when it does not

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-02 06:24:48 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
before ECMA5 trailing commas in arrays and objects
are forbidden

in jslint this is an error and cannot be deactivated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:34 +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
f3f4a82385 fix button toolbar height
setting the border to false, instead of setting the style
(which had the wrong syntax for extjs6 anyway)
and set the height to 36 pixesl (because of the larger font)
this makes the buttons vertically centered

to make the text on the left vertically centered, we
remove the padding

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-31 12:39:11 +02:00
Dominik Csapak
7e27f5d1b4 ext6migrate: make some (sub)tabs lazy
make following (sub)tabs lazy:
 * ceph
 * firewall
 * ha
 * search
 * lxc/Resources

we have to add layout: 'fit', whereever we make a whole tab lazy
and we have to move the title of the search tab to the instantiaton
instead of the class definition, because the search grid is now a
sub component instead of a tab

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-16 16:32:40 +01:00
Dominik Csapak
a39018a72e ext6migrate: prepare panels for lazyitems
since we want to make some tabpanels lazyitems,
we have to change the behaviour of the configpanel
and the subconfigpanel

in the configpanel, we have to manually fire the hide event
for the tabs which are lazyitems, because they will not
be direct children of our tabpanel and thus their
hide event will not fire

in the subconfigpanel we have to manually save the to
be active tab, since at this point, the subtabs are not there
yet (and cannot be activated)

also in the afterrender event, we only want to set the
activetab when we have none, and we only set the first,
if we have none saved

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-16 16:30:26 +01:00
Emmanuel Kasper
458e534cf2 Add class documentation header 2016-02-17 12:06:32 +01:00
Thomas Lamprecht
5fc9bddb07 ext6/triton: add some visual changes and fixes
They are mostly intended to save space as the "new theme", if it
gets applied, takes up space like it's worth pure gold.

Paddings get made smaller on buttons, tabs and grids.
Also let the main tree receive a sane space padding.

Further fix the height of the top info panel (the one with the logo,
PVE version, login button ...).

Also the "start/stop/more/..." buttons from the tool bar above the
navigation tab bar gets fixed.

Login panel got also some small fixes together with all input
fields.

We use simple CSS overrides to achieve this all.
Working with the scss (sass) files and rebuilding the theme would
be nicer, but as I have no intend to start working with senchas
"build system" and we self have no sane way for compiling the sass
stuff also, this is the preferred way for now.

We add a new css stylesheet so that the current manager remains
untouched by this changes.
2016-02-12 10:46:51 +01:00
Emmanuel Kasper
cececa1d65 ext6migrate: remove redundant code to set the default active tab
If the default activeTab is *undefined* and *not* null, activeTab defaults to 0,
so we don't need to set this explicitely.

dug from ExtJS tabPanel:
activeTab = me.activeTab !== null ? (me.activeTab || 0) : null;
2016-01-22 11:24:21 +01:00
Dietmar Maurer
bac5bd135c rename manager5 to manager6 2016-01-22 11:24:10 +01:00