Skip to content

Commit 691ebd5

Browse files
authored
Merge pull request #416 from zhx828/minor-changs
Bug fixes
2 parents 00745ad + 2933103 commit 691ebd5

File tree

9 files changed

+57
-19
lines changed

9 files changed

+57
-19
lines changed

k8s/oncokb-public-local.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
spec:
2323
containers:
2424
- name: oncokb-public
25-
image: cbioportal/oncokb-public:2.3.4
25+
image: cbioportal/oncokb-public:2.3.5
2626
env:
2727
- name: SPRING_PROFILES_ACTIVE
2828
value: prod,no-liquibase

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.mskcc.cbio.oncokb</groupId>
77
<artifactId>public-website</artifactId>
8-
<version>2.3.4</version>
8+
<version>2.3.5</version>
99
<packaging>jar</packaging>
1010
<name>OncoKB Public Website</name>
1111

@@ -621,7 +621,7 @@
621621
<image>adoptopenjdk:11-jre-hotspot</image>
622622
</from>
623623
<to>
624-
<image>cbioportal/oncokb-public:2.3.4</image>
624+
<image>cbioportal/oncokb-public:2.3.5</image>
625625
</to>
626626
<container>
627627
<entrypoint>

src/main/docker/app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
services:
33
oncokb-app:
4-
image: cbioportal/oncokb-public:2.3.4
4+
image: cbioportal/oncokb-public:2.3.5
55
environment:
66
- _JAVA_OPTIONS=-Xmx512m -Xms256m
77
- SPRING_PROFILES_ACTIVE=prod,swagger

src/main/webapp/app/config/constants.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const GRID_BREAKPOINTS = {
5353
};
5454
export const SOP_LINK = 'https://sop.oncokb.org';
5555
export const FAQ_LINK = 'https://faq.oncokb.org';
56+
export const DEMO_WEBSITE_LINK = 'https://demo.oncokb.org';
5657

5758
export const REDIRECT_TIMEOUT_MILLISECONDS = 10000;
5859
export const NOTIFICATION_TIMEOUT_MILLISECONDS = 5000;

src/main/webapp/app/pages/APIAccessPage.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
DATA_RELEASES,
77
DataRelease,
88
DEFAULT_MARGIN_BOTTOM_LG,
9+
DEMO_WEBSITE_LINK,
910
DOCUMENT_TITLES,
1011
LicenseType,
1112
PAGE_ROUTE,
@@ -30,6 +31,7 @@ import { Link } from 'react-router-dom';
3031
import Select from 'react-select';
3132
import DocumentTitle from 'react-document-title';
3233
import AuthenticationStore from 'app/store/AuthenticationStore';
34+
import { Linkout } from 'app/shared/links/Linkout';
3335

3436
type DownloadAvailabilityWithDate = DataRelease & DownloadAvailability;
3537

@@ -208,6 +210,12 @@ export default class APIAccessPage extends React.Component<{
208210
https://www.oncokb.org/api/v1/genes
209211
</code>
210212
</div>
213+
<div className={'mt-2'}>
214+
You can also use our{' '}
215+
<Linkout link={DEMO_WEBSITE_LINK}>demo website</Linkout> which
216+
includes the full data of BRAF, TP53 and ROS1 before committing
217+
to our license.
218+
</div>
211219
</div>
212220
</div>
213221
{this.props.authenticationStore.account &&

src/main/webapp/app/pages/ActionableGenesPage.tsx

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Evidence, MainType } from 'app/shared/api/generated/OncoKbPrivateAPI';
1616
import Select from 'react-select';
1717
import _ from 'lodash';
1818
import {
19+
concatElementsByComma,
1920
getCancerTypeNameFromOncoTreeType,
2021
getDefaultColumnDefinition,
2122
getDrugNameFromTreatment,
@@ -436,10 +437,6 @@ export default class ActionableGenesPage extends React.Component<
436437
return Promise.resolve(content.join('\n'));
437438
}
438439

439-
concatElementsByComma(list: ReactNode[]) {
440-
return list.reduce((prev, curr) => [prev, ', ', curr]);
441-
}
442-
443440
getAlterationCell(hugoSymbol: string, alterations: string[]) {
444441
const linkedAlts = alterations.map<React.ReactNode>(
445442
(alteration, index: number) => (
@@ -457,7 +454,7 @@ export default class ActionableGenesPage extends React.Component<
457454
<DefaultTooltip
458455
overlay={
459456
<div style={{ maxWidth: '400px' }}>
460-
{this.concatElementsByComma(linkedAlts)}
457+
{concatElementsByComma(linkedAlts)}
461458
</div>
462459
}
463460
overlayStyle={{
@@ -478,7 +475,7 @@ export default class ActionableGenesPage extends React.Component<
478475
</span>
479476
);
480477
} else {
481-
return this.concatElementsByComma(linkedAlts);
478+
return concatElementsByComma(linkedAlts);
482479
}
483480
}
484481

@@ -516,6 +513,7 @@ export default class ActionableGenesPage extends React.Component<
516513
{
517514
...getDefaultColumnDefinition(TABLE_COLUMN_KEY.TUMOR_TYPE),
518515
minWidth: 300,
516+
accessor: 'tumorType',
519517
Cell(props: { original: Treatment }) {
520518
return <span>{props.original.tumorType}</span>;
521519
}

src/main/webapp/app/pages/alterationPage/AlterationPage.tsx

+20-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
TherapeuticImplication
66
} from 'app/store/AnnotationStore';
77
import { computed, action, IReactionDisposer, reaction } from 'mobx';
8-
import { Col, Row } from 'react-bootstrap';
8+
import { Col, Row, Button } from 'react-bootstrap';
99
import AppStore from 'app/store/AppStore';
1010
import _ from 'lodash';
1111
import Select from 'react-select';
@@ -21,11 +21,16 @@ import OncoKBTable, {
2121
} from 'app/components/oncokbTable/OncoKBTable';
2222
import {
2323
citationsHasInfo,
24+
concatElementsByComma,
2425
getDefaultColumnDefinition,
2526
OncoKBOncogenicityIcon,
2627
reduceJoin
2728
} from 'app/shared/utils/Utils';
28-
import { GenePageLink } from 'app/shared/utils/UrlUtils';
29+
import {
30+
AlterationPageLink,
31+
GenePageLink,
32+
TumorTypePageLink
33+
} from 'app/shared/utils/UrlUtils';
2934
import { CitationTooltip } from 'app/components/CitationTooltip';
3035
import { DefaultTooltip } from 'cbioportal-frontend-commons';
3136
import { RouterStore } from 'mobx-react-router';
@@ -247,7 +252,19 @@ export default class GenePage extends React.Component<
247252
...getDefaultColumnDefinition(TABLE_COLUMN_KEY.DRUGS)
248253
},
249254
{
250-
...getDefaultColumnDefinition(TABLE_COLUMN_KEY.EVIDENCE_CANCER_TYPE)
255+
...getDefaultColumnDefinition(TABLE_COLUMN_KEY.EVIDENCE_CANCER_TYPE),
256+
Cell: (props: { original: any }) => {
257+
return (
258+
<Button
259+
variant={'link'}
260+
onClick={() =>
261+
(this.store.tumorTypeQuery = props.original.cancerTypes)
262+
}
263+
>
264+
{props.original.cancerTypes}
265+
</Button>
266+
);
267+
}
251268
},
252269
{
253270
...getDefaultColumnDefinition(TABLE_COLUMN_KEY.CITATIONS),

src/main/webapp/app/pages/genePage/GenePage.tsx

+15-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ import {
3232
BiologicalVariant,
3333
ClinicalVariant
3434
} from 'app/shared/api/generated/OncoKbPrivateAPI';
35-
import { AlterationPageLink, CitationLink } from 'app/shared/utils/UrlUtils';
35+
import {
36+
AlterationPageLink,
37+
CitationLink,
38+
TumorTypePageLink
39+
} from 'app/shared/utils/UrlUtils';
3640
import AppStore from 'app/store/AppStore';
3741
import OncoKBTable, {
3842
SearchColumn
@@ -261,11 +265,16 @@ export default class GenePage extends React.Component<
261265
getCancerTypeNameFromOncoTreeType(data.cancerType),
262266
keyword
263267
),
264-
Cell(props: { original: ClinicalVariant }) {
268+
Cell: (props: { original: ClinicalVariant }) => {
269+
const tumorType = getCancerTypeNameFromOncoTreeType(
270+
props.original.cancerType
271+
);
265272
return (
266-
<span>
267-
{getCancerTypeNameFromOncoTreeType(props.original.cancerType)}
268-
</span>
273+
<TumorTypePageLink
274+
hugoSymbol={this.store.hugoSymbol}
275+
alteration={props.original.variant.name}
276+
tumorType={tumorType}
277+
/>
269278
);
270279
}
271280
},
@@ -626,6 +635,7 @@ export default class GenePage extends React.Component<
626635
{...this.store.mutationMapperProps.result}
627636
store={this.store.mutationMapperStore.result}
628637
oncogenicities={this.store.uniqOncogenicity}
638+
showTrackSelector={false}
629639
windowWrapper={this.windowWrapper}
630640
/>
631641
</Col>

src/main/webapp/app/shared/utils/Utils.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
Article
77
} from 'app/shared/api/generated/OncoKbAPI';
88
import _ from 'lodash';
9-
import React from 'react';
9+
import React, { ReactNode } from 'react';
1010
import {
1111
APP_LOCAL_DATE_FORMAT,
1212
APP_LOCAL_DATETIME_FORMAT_Z,
@@ -428,3 +428,7 @@ export const scrollWidthOffsetInNews = (el?: any) => {
428428
const yOffset = -80;
429429
window.scrollTo({ top: yCoordinate + yOffset, behavior: 'smooth' });
430430
};
431+
432+
export const concatElementsByComma = (list: ReactNode[]) => {
433+
return list.reduce((prev, curr) => [prev, ', ', curr]);
434+
};

0 commit comments

Comments
 (0)