Commit Graph

62 Commits

Author SHA1 Message Date
Thomas Lamprecht
063997ed16 ui: workspace: eslint fixes and code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-17 19:40:33 +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
9ebe2165c3 ui: save cluster name in PVE global
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:51:13 +01:00
Dominik Csapak
d1efcadf38 ui: use PMX.image.Logo from widget-toolkit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-18 18:42:16 +02:00
Dominik Csapak
1011b56983 ui: fix missing htmlEncodes
username can include some special characters, so we have
to escape them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-05-06 16:59:50 +02:00
Tim Marx
9fd1198e76 ui: auth: clear ui capabilities on logout
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2020-05-06 16:40:55 +02:00
Tim Marx
7c8051b436 ui: whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2020-05-06 16:40:52 +02:00
Dominik Csapak
428d5e7864 add Language selection in user menu
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-26 12:45:28 +02:00
Thomas Lamprecht
2ac41a189a ui: drop login-user fixed token edit due to multi window/z-index issues
We normally do not stack windows and it breaks/allows some funky
stuff.. As this isn't really required and can be done just fine over
the the DC -> Token panel, especially as we prefill the username to
the logged in one for new tokens now..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:29:27 +02:00
Thomas Lamprecht
48a66a12ee ui: api token: rewrite
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-26 12:18:25 +02:00
Fabian Grünbichler
e3372697a0 ui: add TokenView with fixed userid
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-04-25 18:25:06 +02:00
Thomas Lamprecht
35ffde01f0 followup sdn: move a bit below and fix showing on initial load
if the webinterface got loaded the api call to check if SDN is
available did not yet returned, so we could show it by accident -
even if libpve-network-perl wasn't instralled.
Fix that by hiding it (once) in the failure callback of the API call.

also move menu entries below, before Firewall, this fits better to
networking.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-03-26 15:21:13 +01:00
Alexandre Derumier
f1ca55fb03 sdn: enable SDN menu if /cluster/sdn api exist
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-03-23 14:43:29 +01:00
Alexandre Derumier
9233148bc1 add sdn gui
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-03-23 14:43:26 +01:00
Thomas Lamprecht
7a8653ceaa Revert "add beta text with link to bugtracker"
This reverts commit 1e12b31791.
2019-07-11 21:59:05 +02:00
Thomas Lamprecht
8ec8af9c60 use https links to our sites
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-26 14:33:56 +02:00
Thomas Lamprecht
1370f62818 ui: workspace: cope better with upgrade related false positive 401 HTTP codes
While we nowadays can work much better with package upgrades relating
the cluster stack it still happens that a pve-cluster upgrade can
produce a false-positive 401 (auth failure) code for a currently
valid ticket, e.g., because a pmxcfs lock was requested but the
pmxcfs was currently not mounted due an upgrade triggered restart.

A frequent case for a few false positive 401 is also a cluster
creation, especially if not done over the web GUI.

Thus add a counter, which gets set to 0 on each successful login or
ticket renewal and gets increased on each 401 error. Only show the
logged out window if we get five or more 401 responses. While 5 may
sound a bit much one needs to remember that we always have quite a
few API call in flight (resource update store, stores from current
panel ...) and thus, if one got really auth denied it will still show
quite fast (1 to 5 seconds, depending on which panel is currently
opened). Further, the backend naturally does not allows to do
anything during this time, this has no security implications
whatsoever.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-25 11:42:02 +02:00
Thomas Lamprecht
1e12b31791 add beta text with link to bugtracker
to not confuse people, especially if they share screen shots or the
like...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-06-04 13:38:09 +02:00
Thomas Lamprecht
180a86d39a pvecfg: adapt version and release semantic
Wit commit a74ba607d4 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.

But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.

This patch does that, and also cleans up semantics a bit, the
following two changed:

release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1

This allows to do everything we used this information for even in a
slightly easier way (no  string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)

Remove some cruft as we touch things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:11:43 +02:00
Thomas Lamprecht
404bf6c8b7 ui: followup: set background color to dark grey
Finally make the "Create VM/CT" button distinct from the User
(earlier "Logout") button, this should make them stand out more

As main color the "Proxmox Dark Grey" from our branding guide was
choosen
https://www.proxmox.com/images/proxmox/Proxmox-Corporate-Brandguideline-2018.pdf

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-22 21:29:36 +02:00
Dominik Csapak
d962846d43 make the logout button a menu and move the username there
so we have a more 'web-app' like appearance for the user

the menu contains links to:
* browser localstorage settings
* password change
* tfa change
* logout

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-05-22 21:29:36 +02:00
Wolfgang Bumiller
24d2ed8c27 ui: support u2f authentication and configuration
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-03 15:26:37 +02:00
Thomas Lamprecht
3d7b2aa9f4 fix #1358: ui: show clustername besides 'Datacenter' node, if available
If we get the cluster name (successful login with '/' Sys.Audit
permissions) then display it in the resource tree's root node.

This updated on login and all ticket refreshs (every 15 minutes).
I currently have no functionallity to refresh it actively on cluster
create over WebUI, as it's not a straight forward change there.
Further, this is something which does not changes often (in
production), and we cannot detect CLI or API triggered (from non-pve
clients) cluster creations anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-11-19 10:15:14 +01:00
Thomas Lamprecht
fe13284e4c ui: silence auth failures during cluster join
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-04-05 11:42:23 +02:00
Dominik Csapak
35a04562fd change PVE.UserName/CSRFPreventionToken to Proxmox
this is now all in the widget-toolkit and needs to be
set/read to/from there, else we possibly get an inconsistent view on
those

this fixes as issue, where after login the ResourceStore would not update

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>
2018-01-25 14:49:11 +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
e7ade592e3 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
Thomas Lamprecht
41e024ee43 ui: rename global 'Help' button to 'Documentation'
To make it more clear that this will always end you on the
Documentation index.

Also, multiple Help buttons which all may or may not do something
different are a bit weird/confusing - thus distinction can here be
really helpful, IMO.

We target HD ready (1280x720) as minimal target resolution where this
still fits nicely. This (or bigger) resolution is also used by our
screenshot framework for the documentation - so it also fits there.

Adapt the icon displayed to `fa-book` which resembles the one often
used for manuals and is clearer than a '?', IMO.

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
bbcfa5abc9 ui: re-align global search field to now shorter version
commit 2ddb072661 removed showing the
short SHA1 commit hash in the version info field but did not
realigned the search field so that it got a asymmetric space.

Adapt the Version info minimal width so that this is again the case.

Acked-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-16 14:13:05 +02:00
Emmanuel Kasper
2ddb072661 Do not display the abbreviated commit SHA-1 in the workspace version string
This string is ugly and unfit for human consumption for 99% of our users.
The same information is available in a number of place in the GUI via Node
Summary, Package Versions, Subscription (Report)
2017-07-25 14:24:35 +02:00
Dietmar Maurer
abbc1b7948 Revert "add beta text with link to bugtracker"
This reverts commit 6531861e69.

Prepare for final 5.0 release.
2017-06-29 07:58:37 +02:00
Dominik Csapak
d5a7996b13 fix reselection on vm/ct migrate in gui
there were a number of problems in how we reselected vms when they
migrated and selected:

we relied on the data in the configpanel to be static, but since
pveselnode is a reference, it actually changes when the resourcestore
changes
also, handling the reselection as a response to the statusstore failure
is very inconsistent, because we know exactly when a vm moves node in
the tree

this patch removes the whole configpanel vm migration code,
and lets the tree handle it
for this, we have to check if we have to reselect the entry,
deselect it manually and after the treeupdate reselect it

also in the right click selection check we have to check if it is
already selected, else the next selection will get canceled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-06-23 13:01:12 +02:00
Dominik Csapak
6531861e69 add beta text with link to bugtracker
for the 5.0 beta, add a link to the bugtracker

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-03-21 13:50:28 +01:00
Dominik Csapak
b625c828b7 remove not needed vnc code
since we access novnc always with the NoVncIndex.pm and never in extjs
itself, we can delete this code

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-01-04 10:50:38 +01:00
Dominik Csapak
c359b43706 make ceph status in cluster dashboard clickable
to get faster from the datacenter dashboard to the ceph dashboard

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-11-30 17:10:29 +01:00
Dominik Csapak
1e4a853c1e show correct mouse cursor on help and settings button
this patch fixes that moving your mouse over the top help button or the
settings button, does not change your mouse cursor like on every other
link/button/etc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-31 16:15:10 +01:00
Dominik Csapak
d0cbdb2beb open my settings directly with click
instead of having a menu with one entry, directly open the my settings
window. also change the icon from a down caret to a gear, to make it
more visible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-28 10:47:09 +02:00
Dominik Csapak
ce11a8afd0 add 'my settings' to top bar
this adds a menu right to the username with an entry 'my settings',
this opens a window with (for now) browser specific settings
and a place to reset them

the plan would be to add password change, 2fa setup etc here

one remark: the reset layout button reloads the window,
to really apply the reset

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-28 09:46:25 +02:00
Dietmar Maurer
c8802a60b7 use auto-generated block IDs to reference online docu. 2016-10-13 11:26:06 +02:00
Dominik Csapak
6c18be661c fix #1116: center modal windows on browser resize
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-05 07:03:27 +02:00
Emmanuel Kasper
f184350f9d Bugfix Only set a content when we have a selection
Removing a node via updateTree() would cause the selection to be lost temporary
which in turn via the selectionchange listener would select an
empty content.
Now we only set a content if we have a selection.
This fix a graphical glitch where a migrated VM would not be properly
re-selected at its new position in tree.

The bug was introduced by:
    Clear sensitive content when logging out fixes #1060
    de7eeaac1c
2016-09-14 11:47:18 +02:00
Dominik Csapak
3ef5861105 add global help button
this adds a global help button to the top,
which links to the index of our included documentation

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 16:37:08 +02:00
Dominik Csapak
55d727ca7a use new logo
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 08:56:08 +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
Emmanuel Kasper
de7eeaac1c Clear sensitive content when logging out fixes #1060
The current position inside the Workspace is saved via the StateProvider
separately thus this clearing operation do not lose the previous selection.

As a side effect by calling setContent(null) on logout we also fix the
following bug:

when logging out while the Syslog tab of the Node panel was displayed,
you had to login twice due a to a race condition in the store
load of the Syslog panel. ( The login call could complete successfully
before a backgroup store load, causing the faild store load call
to redisplay a login window)
2016-08-19 13:54:38 +02:00
Dominik Csapak
8cd6425724 remove unnecessary debug output
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-29 14:32:36 +02:00
Dominik Csapak
839eed5834 fix #558: add cluster wide search to the top
this makes use of the new globalsearch field and
puts it on top of the page, so that one can easily use it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-21 10:24:03 +02:00
Dominik Csapak
6a87871f66 make bottom panel collapsible
to save space if not needed, but keep it available with one click
(even temporarily when you click the title instead of the
expand tool)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-16 16:34:24 +02:00