Open rodichenko opened 3 years ago
@sidoruka @SilinPavel @mzueva @maryvictol 2f39030103c1780c900e13cf7a5044e19d5eefc4 implements UI configuration for user groups (AD groups): misc.groups.ui.preferences
preference specifies ui-pages
, ui-dashboard
, ui-home-page
and ui-search-document-types
(see #2103) settings for AD groups, e.g.:
{
"AD_GROUP_NAME": {
"ui-pages": "dashboard, library, tools, search",
"ui-dashboard": [
{"i":"data","x":0,"y":12,"w":12,"h":12},
{"i":"tools","x":12,"y":0,"w":12,"h":24},
{"i":"active","x":0,"y":0,"w":12,"h":12}
],
"ui-home-page": "search",
"ui-search-document-types": "pipeline, storage"
},
"AD_GROUP_NAME_2": {
"ui-pages": "search"
}
}
@SilinPavel could you please add this preference to Miscellaneous
group:
misc.groups.ui.preferences
Miscellaneous
Object
{}
or empty
Background
At the moment, Cloud Pipeline provides default UI configuration for every user:
It would be nice to have a user-specific configuration of the mentioned UI parts.
Approach
Let's introduce the following metadata attributes:
ui-pages
(string): comma-separated page identifiers, e.g.dashboard, runs, search, library
;ui-dashboard
(string, JSON): default dashboard layout configuration;ui-home-page
(string) - "home" page identifier;ui-library-expanded
(boolean) - if Library page is expanded by default (i.e., objects tree is visible on the left side)Those attributes may be set to the user or to the role. GUI will check them in the following order: user attributes -> user roles attributes.
Pages configuration (
ui-pages
attribute)Comma-separated list of page identifiers (case-insensitive):
dashboard
library
cluster
tools
runs
settings
search
(advanced search page and quick search page)billing
notifications
(email notification)Example:
dashboard, library, tools, search
.If there is no
ui-pages
attribute specified for user but there are severalui-pages
attributes specified for user roles, the combination (intersection) of the provided page sets will be used, i.e.:ui-pages
:dashboard, library, tools, search
;ui-pages
:dashboard, library, tools, runs
;Dashboard, Library and Tools pages will be available for the user.
Dashboard default layout configuration (
ui-dashboard
attribute)Dashboard is a grid of 24 columns and 24 rows with panels. Each panel has:
i
), case sensitive string, one of:active
- active jobs panel;completed
- recently completed jobs panelactivities
- activities panel;data
- data panel;notifications
- notifications panel;tools
- personal tools panel;pipelines
- pipelines panel;projects
- projects panel;services
- services panel;x
- column index, zero-based integer (0 .. 23);y
- row index, zero-based integer (0 .. 23);w
- width of the panel, number of columns (integer);h
- height of the panel, number of rows (integer).ui-dashboard
attribute must be a valid JSON string - an array of default panels, e.g.:Notes: the first available attribute (user -> role 1 -> role 2 -> ...) value will be used.
Default home page (
ui-home-page
attribute)Defines home page (the one that will be displayed when user opens Cloud Pipeline root url).
ui-home-page
attribute value (string) must be:ui-home-page
:library
ui-home-page
:/storage/<storage identifier>
ui-home-page
:https://server.com/path
Notes: the first available attribute (user -> role 1 -> role 2 -> ...) value will be used.
Default library expanded state (
ui-library-expanded
attribute)Defines if Library page is at the expanded state by default (i.e., objects tree is visible).
ui-library-expanded
attribute value must betrue
orfalse
.Notes: the first available attribute (user -> role 1 -> role 2 -> ...) value will be used.