From: Daniel Kutyła Date: Fri, 10 Feb 2023 17:00:18 +0000 (+0100) Subject: Merge branch '18368-notification-banner' into main X-Git-Tag: 2.6.0~20 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/b676312f840c3f12855a4392afe90b275dd25b97 Merge branch '18368-notification-banner' into main closes #18368 Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła --- b676312f840c3f12855a4392afe90b275dd25b97 diff --cc src/common/config.ts index 93197367,ff44e2ef..a6eabdad --- a/src/common/config.ts +++ b/src/common/config.ts @@@ -28,82 -26,83 +28,94 @@@ export interface ClusterConfigJSON Scheme: string } }; - Mail?: { - SupportEmailAddress: string; + Mail?: { + SupportEmailAddress: string; + }; + Services: { + Controller: { + ExternalURL: string; }; - Services: { - Controller: { - ExternalURL: string - } - Workbench1: { - ExternalURL: string - } - Workbench2: { - ExternalURL: string - } - Websocket: { - ExternalURL: string - } - WebDAV: { - ExternalURL: string - }, - WebDAVDownload: { - ExternalURL: string - }, - WebShell: { - ExternalURL: string - } + Workbench1: { + ExternalURL: string; + }; + Workbench2: { + ExternalURL: string; }; + Workbench: { + DisableSharingURLsUI: boolean; + ArvadosDocsite: string; + FileViewersConfigURL: string; + WelcomePageHTML: string; + InactivePageHTML: string; + SSHHelpPageHTML: string; + SSHHelpHostSuffix: string; + SiteName: string; + IdleTimeout: string; - BannerUUID: string; + }; - Login: { - LoginCluster: string; - Google: { - Enable: boolean; - } - LDAP: { - Enable: boolean; - } - OpenIDConnect: { - Enable: boolean; - } - PAM: { - Enable: boolean; - } - SSO: { - Enable: boolean; - } - Test: { - Enable: boolean; - } + Websocket: { + ExternalURL: string; }; - Collections: { - ForwardSlashNameSubstitution: string; - ManagedProperties?: { - [key: string]: { - Function: string, - Value: string, - Protected?: boolean, - } - }, - TrustAllContent: boolean + WebDAV: { + ExternalURL: string; }; - Volumes: { - [key: string]: { - StorageClasses: { - [key: string]: boolean; - } - } + WebDAVDownload: { + ExternalURL: string; + }; + WebShell: { + ExternalURL: string; + }; + }; + Workbench: { + DisableSharingURLsUI: boolean; + ArvadosDocsite: string; + FileViewersConfigURL: string; + WelcomePageHTML: string; + InactivePageHTML: string; + SSHHelpPageHTML: string; + SSHHelpHostSuffix: string; + SiteName: string; + IdleTimeout: string; ++ BannerUUID: string; + }; + Login: { + LoginCluster: string; + Google: { + Enable: boolean; + }; + LDAP: { + Enable: boolean; + }; + OpenIDConnect: { + Enable: boolean; + }; + PAM: { + Enable: boolean; + }; + SSO: { + Enable: boolean; + }; + Test: { + Enable: boolean; }; + }; + Collections: { + ForwardSlashNameSubstitution: string; + ManagedProperties?: { + [key: string]: { + Function: string; + Value: string; + Protected?: boolean; + }; + }; + TrustAllContent: boolean; + }; + Volumes: { + [key: string]: { + StorageClasses: { + [key: string]: boolean; + }; + }; + }; } export class Config { @@@ -240,73 -219,66 +252,85 @@@ remove the entire ${varName} entry fro }; // Maps remote cluster hosts and removes the default RemoteCluster entry -export const mapRemoteHosts = (clusterConfigJSON: ClusterConfigJSON, config: Config) => { - config.remoteHosts = {}; - Object.keys(clusterConfigJSON.RemoteClusters).forEach(k => { config.remoteHosts[k] = clusterConfigJSON.RemoteClusters[k].Host; }); - delete config.remoteHosts["*"]; +export const mapRemoteHosts = ( + clusterConfigJSON: ClusterConfigJSON, + config: Config +) => { + config.remoteHosts = {}; + Object.keys(clusterConfigJSON.RemoteClusters).forEach((k) => { + config.remoteHosts[k] = clusterConfigJSON.RemoteClusters[k].Host; + }); + delete config.remoteHosts['*']; }; -export const mockClusterConfigJSON = (config: Partial): ClusterConfigJSON => ({ - API: { - UnfreezeProjectRequiresAdmin: false, - }, - ClusterID: "", - RemoteClusters: {}, - Services: { - Controller: { ExternalURL: "" }, - Workbench1: { ExternalURL: "" }, - Workbench2: { ExternalURL: "" }, - Websocket: { ExternalURL: "" }, - WebDAV: { ExternalURL: "" }, - WebDAVDownload: { ExternalURL: "" }, - WebShell: { ExternalURL: "" }, - }, +export const mockClusterConfigJSON = ( + config: Partial +): ClusterConfigJSON => ({ + API: { + UnfreezeProjectRequiresAdmin: false, + MaxItemsPerResponse: 1000, + }, + ClusterID: '', + RemoteClusters: {}, + Services: { + Controller: { ExternalURL: '' }, + Workbench1: { ExternalURL: '' }, + Workbench2: { ExternalURL: '' }, + Websocket: { ExternalURL: '' }, + WebDAV: { ExternalURL: '' }, + WebDAVDownload: { ExternalURL: '' }, + WebShell: { ExternalURL: '' }, + Workbench: { + DisableSharingURLsUI: false, + ArvadosDocsite: "", + FileViewersConfigURL: "", + WelcomePageHTML: "", + InactivePageHTML: "", + SSHHelpPageHTML: "", + SSHHelpHostSuffix: "", + SiteName: "", - IdleTimeout: "0s", - BannerUUID: "", ++ IdleTimeout: "0s" ++ } + }, + Workbench: { + DisableSharingURLsUI: false, + ArvadosDocsite: '', + FileViewersConfigURL: '', + WelcomePageHTML: '', + InactivePageHTML: '', + SSHHelpPageHTML: '', + SSHHelpHostSuffix: '', + SiteName: '', + IdleTimeout: '0s', ++ BannerUUID: "" + }, + Login: { + LoginCluster: '', + Google: { + Enable: false, + }, + LDAP: { + Enable: false, }, - Login: { - LoginCluster: "", - Google: { - Enable: false, - }, - LDAP: { - Enable: false, - }, - OpenIDConnect: { - Enable: false, - }, - PAM: { - Enable: false, - }, - SSO: { - Enable: false, - }, - Test: { - Enable: false, - }, + OpenIDConnect: { + Enable: false, }, - Collections: { - ForwardSlashNameSubstitution: "", - TrustAllContent: false, + PAM: { + Enable: false, }, - Volumes: {}, - ...config + SSO: { + Enable: false, + }, + Test: { + Enable: false, + }, + }, + Collections: { + ForwardSlashNameSubstitution: '', + TrustAllContent: false, + }, + Volumes: {}, + ...config, }); export const mockConfig = (config: Partial): Config => ({ diff --cc src/store/store.ts index 2057939e,899eb1cb..4ef5e3d0 --- a/src/store/store.ts +++ b/src/store/store.ts @@@ -74,7 -73,7 +74,8 @@@ import { ALL_PROCESSES_PANEL_ID } from import { Config } from 'common/config'; import { pluginConfig } from 'plugins'; import { MiddlewareListReducer } from 'common/plugintypes'; +import { sidePanelReducer } from './side-panel/side-panel-reducer' + import { bannerReducer } from './banner/banner-reducer'; declare global { interface Window { diff --cc src/views/workbench/workbench.tsx index 87f004b3,b6ce07ae..7103efd1 --- a/src/views/workbench/workbench.tsx +++ b/src/views/workbench/workbench.tsx @@@ -99,7 -99,7 +99,8 @@@ import { RestoreCollectionVersionDialo import { WebDavS3InfoDialog } from 'views-components/webdav-s3-dialog/webdav-s3-dialog'; import { pluginConfig } from 'plugins'; import { ElementListReducer } from 'common/plugintypes'; +import { COLLAPSE_ICON_SIZE } from 'views-components/side-panel-toggle/side-panel-toggle' + import { Banner } from 'views-components/baner/banner'; type CssRules = 'root' | 'container' | 'splitter' | 'asidePanel' | 'contentWrapper' | 'content'; @@@ -293,6 -271,7 +294,7 @@@ export const WorkbenchPanel + {React.createElement(React.Fragment, null, pluginConfig.dialogs)} - + } );