Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions my-index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script>
window.devContext = true;
window.portalProperties = { skin: { hide_clinical_data_tab_study_view: false } };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for testing purposes?

window.frontendConfig = {
}
Expand Down
3 changes: 3 additions & 0 deletions src/config/IAppConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,7 @@ export interface IServerConfig {
clickhouse_mode: boolean;
download_custom_buttons_json: string;
feature_study_export: boolean;
skin?: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a convention above that dot notation gets converted to _. lets keep that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you test it this, the backend should automatically convert the dot notation. so i would think this wouldn't work. let me know if you need hlep testing this

hide_clinical_data_tab_study_view?: boolean;
};
}
8 changes: 7 additions & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,11 @@ export function initializeServerConfiguration(rawConfiguration: any) {
}
}

let portalProperties: any = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

if (typeof window !== 'undefined' && (window as any).portalProperties) {
portalProperties = (window as any).portalProperties;
}

// this establishes the order of precedence of configuration
// the override each other in the following order
// Note: server config defaults will only be applied where properties
Expand All @@ -360,7 +365,8 @@ export function initializeServerConfiguration(rawConfiguration: any) {
ServerConfigDefaults,
rawConfiguration,
frontendOverride,
localStorageOverride.serverConfig
localStorageOverride.serverConfig,
portalProperties
);

// apply custom corrections for deprecated
Expand Down
4 changes: 4 additions & 0 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ export default class StudyViewPage extends React.Component<
StudyViewPageTabDescriptions.CLINICAL_DATA
}
hide={
Boolean(
getServerConfig().skin
?.hide_clinical_data_tab_study_view
) ||
this.store.selectedSamples.result
.length === 0
}
Expand Down