diff --git a/end-to-end-test/local/docker_compose/keycloak.yml b/end-to-end-test/local/docker_compose/keycloak.yml index 6d5e5ff29eb..3d7800a4231 100644 --- a/end-to-end-test/local/docker_compose/keycloak.yml +++ b/end-to-end-test/local/docker_compose/keycloak.yml @@ -15,7 +15,7 @@ services: networks: - cbio-net container_name: keycloak - image: jboss/keycloak:11.0.3 + image: quay.io/keycloak/keycloak:11.0.3 restart: unless-stopped depends_on: - kcdb diff --git a/end-to-end-test/local/runtime-config/portal.properties b/end-to-end-test/local/runtime-config/portal.properties index f704197dc8e..8d38e21908e 100644 --- a/end-to-end-test/local/runtime-config/portal.properties +++ b/end-to-end-test/local/runtime-config/portal.properties @@ -7,10 +7,6 @@ spring.datasource.username=cbio_user spring.datasource.password=somepassword spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect spring.datasource.driver-class-name=com.mysql.jdbc.Driver -db.user=cbio_user -db.password=somepassword -db.driver=com.mysql.jdbc.Driver -db.connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false&allowPublicKeyRetrieval=true # set tomcat_resource_name when using dbconnector=jndi instead of the default # dbconnector=dbcp. Note that dbconnector needs to be set in CATLINA_OPTS when # using Tomcat (CATALINA_OPTS="-Ddbconnector=jndi"). It does not get picked up diff --git a/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js b/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js index 5d20f0bb7fb..8ce2f0faab4 100644 --- a/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js +++ b/end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js @@ -132,8 +132,6 @@ describe('oncoprint', function() { const urlWithUserConfig = createUrlWithSettingsQueryParam( MANUAL_TRACK_CONFIG ); - // go to home page first because navigating to same page with hash params doesn't cause change - goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false); goToUrlAndSetLocalStorage(urlWithUserConfig, false); waitForOncoprint(ONCOPRINT_TIMEOUT); @@ -172,9 +170,7 @@ describe('oncoprint', function() { const urlWithUserConfig = createUrlWithSettingsQueryParam( customConfig ); - // go to home page first because navigating to same page with hash params doesn't cause change - goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false); - browser.url(urlWithUserConfig); + goToUrlAndSetLocalStorage(urlWithUserConfig, false); waitForOncoprint(ONCOPRINT_TIMEOUT); diff --git a/end-to-end-test/shared/specUtils.js b/end-to-end-test/shared/specUtils.js index 4595b2c9800..b005398225f 100644 --- a/end-to-end-test/shared/specUtils.js +++ b/end-to-end-test/shared/specUtils.js @@ -209,6 +209,8 @@ function goToUrlAndSetLocalStorage(url, authenticated = false) { const currentUrl = browser.getUrl(); const needToLogin = authenticated && (!currentUrl || !currentUrl.includes('http')); + // navigate to blank page first to prevent issues with url hash params + browser.url('about:blank'); if (!useExternalFrontend) { browser.url(url); console.log('Connecting to: ' + url); diff --git a/src/shared/components/columnVisibilityControls/ColumnVisibilityControls.tsx b/src/shared/components/columnVisibilityControls/ColumnVisibilityControls.tsx index e721ec5d7b3..c310d46414f 100644 --- a/src/shared/components/columnVisibilityControls/ColumnVisibilityControls.tsx +++ b/src/shared/components/columnVisibilityControls/ColumnVisibilityControls.tsx @@ -3,6 +3,7 @@ import _ from 'lodash'; import { Dropdown, Checkbox } from 'react-bootstrap'; import { DropdownToggleProps } from 'react-bootstrap/lib/DropdownToggle'; import { DropdownMenuProps } from 'react-bootstrap/lib/DropdownMenu'; +import { action, computed } from 'mobx'; export interface IColumnVisibilityDef { id: string; @@ -40,6 +41,8 @@ export class ColumnVisibilityControls extends React.Component< constructor(props: IColumnVisibilityControlsProps) { super(props); this.handleSelect = this.handleSelect.bind(this); + this.selectAll = this.selectAll.bind(this); + this.deselectAll = this.deselectAll.bind(this); } public render() { @@ -52,6 +55,59 @@ export class ColumnVisibilityControls extends React.Component< ); } + private toggleAllColumns(select: boolean) { + if (!this.props.columnVisibility) return; + + const toggledColumns = new Set(); + this.props.columnVisibility.forEach(column => { + if (column.visible !== select) { + toggledColumns.add(column.id); + } + }); + + toggledColumns.forEach(columnId => { + if (this.props.onColumnToggled && columnId) { + this.props.onColumnToggled( + columnId, + this.props.columnVisibility + ); + } + }); + } + + private selectAll() { + this.toggleAllColumns(true); + } + + private deselectAll() { + this.toggleAllColumns(false); + } + + get selectDeselectAllButtons() { + return ( +
+ + +
+ ); + } + private get defaultDropdown() { return ( @@ -70,6 +126,9 @@ export class ColumnVisibilityControls extends React.Component< whiteSpace: 'nowrap', }} > +
+ {this.selectDeselectAllButtons} +