From dd3576782e227293756b605706f4d990de187021 Mon Sep 17 00:00:00 2001 From: alisman Date: Tue, 4 Apr 2023 14:00:01 -0400 Subject: [PATCH] Disable oncokb fetch from MutationMapper when show_oncokb config is off --- src/pages/resultsView/mutation/ResultsViewMutationMapper.tsx | 2 ++ .../tools/mutationMapper/StandaloneMutationMapper.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/pages/resultsView/mutation/ResultsViewMutationMapper.tsx b/src/pages/resultsView/mutation/ResultsViewMutationMapper.tsx index 286054fbee2..0d55612bf63 100644 --- a/src/pages/resultsView/mutation/ResultsViewMutationMapper.tsx +++ b/src/pages/resultsView/mutation/ResultsViewMutationMapper.tsx @@ -42,6 +42,7 @@ import { submitToStudyViewPage } from '../querySummary/QuerySummaryUtils'; import { ExtendedMutationTableColumnType } from 'shared/components/mutationTable/MutationTable'; import { extractColumnNames } from 'shared/components/mutationMapper/MutationMapperUtils'; import { PatientSampleSummary } from '../querySummary/PatientSampleSummary'; +import { getServerConfig } from 'config/config'; export interface IResultsViewMutationMapperProps extends IMutationMapperProps { store: ResultsViewMutationMapperStore; @@ -215,6 +216,7 @@ export default class ResultsViewMutationMapper extends MutationMapper< cosmicData={this.props.store.cosmicData.result} oncoKbData={this.props.store.oncoKbData} usingPublicOncoKbInstance={ + getServerConfig().show_oncokb && this.props.store.usingPublicOncoKbInstance } mergeOncoKbIcons={this.props.mergeOncoKbIcons} diff --git a/src/pages/staticPages/tools/mutationMapper/StandaloneMutationMapper.tsx b/src/pages/staticPages/tools/mutationMapper/StandaloneMutationMapper.tsx index 4f9c9b6ebf3..df086ace83e 100644 --- a/src/pages/staticPages/tools/mutationMapper/StandaloneMutationMapper.tsx +++ b/src/pages/staticPages/tools/mutationMapper/StandaloneMutationMapper.tsx @@ -12,6 +12,7 @@ import { ExtendedMutationTableColumnType } from 'shared/components/mutationTable import _ from 'lodash'; import { extractColumnNames } from 'shared/components/mutationMapper/MutationMapperUtils'; import ResultsViewMutationTable from 'pages/resultsView/mutation/ResultsViewMutationTable'; +import { getServerConfig } from 'config/config'; export interface IStandaloneMutationMapperProps extends IMutationMapperProps { // add standalone view specific props here if needed @@ -34,6 +35,7 @@ export default class StandaloneMutationMapper extends MutationMapper< } oncoKbCancerGenes={this.props.store.oncoKbCancerGenes} usingPublicOncoKbInstance={ + getServerConfig().show_oncokb && this.props.store.usingPublicOncoKbInstance } mergeOncoKbIcons={this.props.mergeOncoKbIcons}