epam / cloud-pipeline

Cloud agnostic genomics analysis, scientific computation and storage platform
https://cloud-pipeline.com
Apache License 2.0
146 stars 59 forks source link

User-defined UI configuration #2079

Open rodichenko opened 3 years ago

rodichenko commented 3 years ago

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:

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):

Example: dashboard, library, tools, search.

If there is no ui-pages attribute specified for user but there are several ui-pages attributes specified for user roles, the combination (intersection) of the provided page sets will be used, i.e.:

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:

ui-dashboard attribute must be a valid JSON string - an array of default panels, e.g.:

[
  {"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}
]

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:

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 be true or false.

Notes: the first available attribute (user -> role 1 -> role 2 -> ...) value will be used.

rodichenko commented 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: