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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"test:watch": "yarn run jest -- --watch",
"updateAPI": "openapi-generator-cli generate -i http://localhost:9090/v3/api-docs -g typescript-axios -o src/main/webapp/app/shared/api/generated/curation --type-mappings set=Array",
"updateCoreAPI": "curl http://localhost:8000/oncokb/api/v1/v2/api-docs?group=Private%20APIs | jq '.definitions.ResponseEntity.properties.statusCode.enum |= unique' > /tmp/updateCoreAPI.json && openapi-generator-cli generate -i /tmp/updateCoreAPI.json -g typescript-axios -o src/main/webapp/app/shared/api/generated/core --type-mappings List=any",
"updateDefaultCoreAPI": "curl 'http://localhost:8080/app/api/v1/v2/api-docs?group=default' > /tmp/updateDefaultCoreAPI.json && openapi-generator-cli generate -i /tmp/updateDefaultCoreAPI.json -g typescript-axios -o src/main/webapp/app/shared/api/generated/defaultCore --type-mappings List=any",
"wdio": "cross-env TS_NODE_PROJECT=src/test/javascript/tsconfig.json wdio run ./wdio.conf.ts",
"webapp:build": "yarn run clean-www && yarn run webapp:build:dev --",
"webapp:build:dev": "webpack --config webpack/webpack.dev.js --env stats=minimal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public SecurityFilterChain oauthFilterChain(HttpSecurity http, MvcRequestMatcher
.requestMatchers(mvc.pattern("/websocket/**")).hasAnyAuthority(AuthoritiesConstants.CURATOR, AuthoritiesConstants.USER)
.requestMatchers(mvc.pattern("/api/**")).hasAnyAuthority(AuthoritiesConstants.CURATOR, AuthoritiesConstants.USER, AuthoritiesConstants.ADMIN)
.requestMatchers(mvc.pattern("/legacy-api/**")).hasAnyAuthority(AuthoritiesConstants.CURATOR, AuthoritiesConstants.USER, AuthoritiesConstants.ADMIN)
.requestMatchers(mvc.pattern("/core/**")).hasAnyAuthority(AuthoritiesConstants.CURATOR, AuthoritiesConstants.USER, AuthoritiesConstants.ADMIN)
.requestMatchers(mvc.pattern("/v3/api-docs/**")).hasAuthority(AuthoritiesConstants.ADMIN)
.requestMatchers(mvc.pattern("/management/**")).hasAuthority(AuthoritiesConstants.ADMIN)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.springframework.web.server.ResponseStatusException;

@RestController
@RequestMapping({ "/legacy-api" })
@RequestMapping({ "/legacy-api", "/api/v1/utils" })
public class ApiProxy {

private final ApiProxyService apiProxyService;
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/pages/curation/CurationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import OncoKBSidebar from 'app/components/sidebar/OncoKBSidebar';
import CurationHistoryTab from 'app/components/tabs/CurationHistoryTab';
import CurationToolsTab from 'app/components/tabs/CurationToolsTab';
import Tabs from 'app/components/tabs/tabs';
import { RealtimeCheckedInputGroup, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import { RealtimeCheckedInputGroup, RealtimeMultiTabTextAreaInput, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import GeneHeader from './header/GeneHeader';
import VusTable from 'app/shared/table/VusTable';
import * as styles from './styles.module.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ModifyCancerTypeModal from 'app/shared/modal/ModifyCancerTypeModal';
import { notifyError } from 'app/oncokb-commons/components/util/NotificationUtils';
import { getLevelDropdownOptions } from 'app/shared/util/firebase/firebase-level-utils';
import { DIAGNOSTIC_LEVELS_ORDERING, READABLE_FIELD, PROGNOSTIC_LEVELS_ORDERING } from 'app/config/constants/firebase';
import { RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import { RealtimeMultiTabTextAreaInput, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import RealtimeLevelDropdownInput, { LevelOfEvidenceType } from 'app/shared/firebase/input/RealtimeLevelDropdownInput';
import CommentIcon from 'app/shared/icons/CommentIcon';
import { DeleteSectionButton } from '../button/DeleteSectionButton';
Expand Down Expand Up @@ -141,11 +141,13 @@ function CancerTypeCollapsible({
badge={<BadgeGroup firebasePath={cancerTypePath} showDeletedBadge={cancerTypesReview?.removed || false} />}
isPendingDelete={cancerTypesReview?.removed || false}
>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${cancerTypePath}/summary`}
inputClass={styles.summaryTextarea}
label="Therapeutic Summary (Optional)"
mutationName={mutationName}
cancerTypeName={cancerTypeName}
labelIcon={
<GeneHistoryTooltip
historyData={parsedHistoryList}
Expand All @@ -155,11 +157,13 @@ function CancerTypeCollapsible({
}
name="txSummary"
/>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${cancerTypePath}/diagnosticSummary`}
inputClass={styles.summaryTextarea}
label="Diagnostic Summary (Optional)"
mutationName={mutationName}
cancerTypeName={cancerTypeName}
labelIcon={
<GeneHistoryTooltip
historyData={parsedHistoryList}
Expand All @@ -169,11 +173,13 @@ function CancerTypeCollapsible({
}
name="dxSummary"
/>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${cancerTypePath}/prognosticSummary`}
inputClass={styles.summaryTextarea}
label="Prognostic Summary (Optional)"
mutationName={mutationName}
cancerTypeName={cancerTypeName}
labelIcon={
<GeneHistoryTooltip
historyData={parsedHistoryList}
Expand Down Expand Up @@ -224,11 +230,13 @@ function CancerTypeCollapsible({
name="diagnosticLevel"
options={getLevelDropdownOptions(DIAGNOSTIC_LEVELS_ORDERING)}
/>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${cancerTypePath}/diagnostic/description`}
inputClass={styles.textarea}
label="Description of Evidence"
mutationName={mutationName}
cancerTypeName={cancerTypeName}
name="evidenceDescription"
parseRefs
/>
Expand All @@ -255,11 +263,13 @@ function CancerTypeCollapsible({
name="prognosticLevel"
options={getLevelDropdownOptions(PROGNOSTIC_LEVELS_ORDERING)}
/>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${cancerTypePath}/prognostic/description`}
inputClass={styles.textarea}
label="Description of Evidence"
mutationName={mutationName}
cancerTypeName={cancerTypeName}
name="evidenceDescription"
parseRefs
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'app/config/constants/firebase';
import { notifyError } from 'app/oncokb-commons/components/util/NotificationUtils';
import { AlterationAnnotationStatus, HotspotDTO, ProteinExonDTO } from 'app/shared/api/generated/curation';
import { RealtimeCheckedInputGroup, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import { RealtimeCheckedInputGroup, RealtimeMultiTabTextAreaInput, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import CommentIcon from 'app/shared/icons/CommentIcon';
import EditIcon from 'app/shared/icons/EditIcon';
import HotspotIcon from 'app/shared/icons/HotspotIcon';
Expand Down Expand Up @@ -355,10 +355,11 @@ const MutationCollapsible = ({
}
isPendingDelete={isMutationPendingDelete}
>
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
firebasePath={`${mutationPath}/summary`}
inputClass={styles.summaryTextarea}
label="Mutation Summary (Optional)"
mutationName={mutationName}
labelIcon={
<GeneHistoryTooltip
historyData={parsedHistoryList}
Expand Down Expand Up @@ -474,11 +475,12 @@ const MutationCollapsible = ({
/>
</>
)}
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${mutationPath}/mutation_effect/description`}
inputClass={styles.textarea}
label="Description of Evidence"
mutationName={mutationName}
labelIcon={
<GeneHistoryTooltip
historyData={parsedHistoryList}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import GeneHistoryTooltip from 'app/components/geneHistoryTooltip/GeneHistoryTooltip';
import { READABLE_FIELD } from 'app/config/constants/firebase';
import { notifyError } from 'app/oncokb-commons/components/util/NotificationUtils';
import { RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import { RealtimeMultiTabTextAreaInput, RealtimeTextAreaInput } from 'app/shared/firebase/input/RealtimeInputs';
import CommentIcon from 'app/shared/icons/CommentIcon';
import EditIcon from 'app/shared/icons/EditIcon';
import ModifyTherapyModal from 'app/shared/modal/ModifyTherapyModal';
Expand Down Expand Up @@ -128,10 +128,12 @@ function TherapyCollapsible({
isPendingDelete={treatmentReview?.removed || false}
>
<TherapyDropdownGroup treatmentPath={therapyPath} />
<RealtimeTextAreaInput
<RealtimeMultiTabTextAreaInput
disabled={readOnly}
firebasePath={`${therapyPath}/description`}
inputClass={styles.textarea}
mutationName={mutationName}
cancerTypeName={cancerTypeName}
label="Description of Evidence"
labelIcon={
<GeneHistoryTooltip
Expand Down
44 changes: 44 additions & 0 deletions src/main/webapp/app/pages/curation/tooltip/CPLHelpTooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import DefaultTooltip from 'app/shared/tooltip/DefaultTooltip';
import React from 'react';

export default function CPLHelpTooltip(props) {
const tableData = [
['[[tumor type]]', 'Tumor type', 'Melanoma'],
['[[gene]]', 'Gene', 'BRAF'],
['[[mutation]] [[[mutation]]]', 'Mutation + ‘mutation’', 'V600E mutation'],
['[[mutation]] [[[mutant]]]', 'Mutation + ‘mutant’', 'V600E mutant'],
['[[variant]]', 'Gene + Mutation + ‘mutant’ + Tumor Type', 'BRAF V600E mutant melanoma'],
['[[mutation|singular]]', 'Singularize mutation', 'Oncogenic Mutation'],
['[[mutation|plural]]', 'Pluralize mutation', 'Fusions'],
];
return (
<DefaultTooltip
placement="top"
overlayInnerStyle={{ maxWidth: '450px' }}
overlay={
<table style={{ borderCollapse: 'collapse', width: '100%' }}>
<thead>
<tr style={{ borderBottom: '2px solid black' }}>
<th>OCPL Code</th>
<th>Output of Code from API</th>
<th>Example of output in an annotation</th>
</tr>
</thead>
<tbody>
{tableData.map((row, index) => (
<tr key={index} style={{ borderBottom: '1px solid #ccc' }}>
<td>
<pre style={{ margin: 0 }}>{row[0]}</pre>
</td>
<td>{row[1]}</td>
<td>{row[2]}</td>
</tr>
))}
</tbody>
</table>
}
>
{props.children}
</DefaultTooltip>
);
}
3 changes: 3 additions & 0 deletions src/main/webapp/app/shared/api/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ArticleResourceApi,
AuditResourceApi,
} from './generated/curation/api';
import { UtilsApi } from './generated/defaultCore';
import { DriveAnnotationApi } from './manual/drive-annotation-api';
import { EvidenceApi } from './manual/evidence-api';
import { GeneTypeApi } from './manual/gene-type-api';
Expand All @@ -34,3 +35,5 @@ export const evidenceClient = new EvidenceApi(undefined, '', axiosInstance);
export const geneTypeClient = new GeneTypeApi(undefined, '', axiosInstance);
export const driveAnnotationClient = new DriveAnnotationApi(undefined, '', axiosInstance);
export const geneLegacyApi = new GeneApi(undefined, '', axiosInstance);

export const utilsClient = new UtilsApi(undefined, 'api/v1', axiosInstance);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
base.ts
common.ts
configuration.ts
docs/Alteration.md
docs/AnnotateMutationByGenomicChangeQuery.md
docs/AnnotateMutationByHGVSgQuery.md
docs/AnnotatedVariant.md
docs/ApiHttpError.md
docs/Article.md
docs/ArticleAbstract.md
docs/BiologicalVariant.md
docs/CancerTypeCount.md
docs/Citations.md
docs/ClinicalVariant.md
docs/CplAnnotationRequest.md
docs/DownloadAvailability.md
docs/Drug.md
docs/DrugSynonym.md
docs/DrugsApi.md
docs/EnsemblGene.md
docs/EnsemblTranscript.md
docs/Evidence.md
docs/Exon.md
docs/Gene.md
docs/GeneNumber.md
docs/Geneset.md
docs/GenomeNexusAnnotatedVariantInfo.md
docs/Implication.md
docs/IndicatorQueryTreatment.md
docs/LevelNumber.md
docs/MainNumber.md
docs/MainNumberLevel.md
docs/MainType.md
docs/MatchVariant.md
docs/MatchVariantRequest.md
docs/MatchVariantResult.md
docs/MutationEffectResp.md
docs/PfamDomainRange.md
docs/PortalAlteration.md
docs/Query.md
docs/RelevantCancerTypeQuery.md
docs/SearchApi.md
docs/TranscriptApi.md
docs/TranscriptCoverageFilterResult.md
docs/TranscriptResult.md
docs/Treatment.md
docs/TreatmentDrug.md
docs/TreatmentDrugId.md
docs/TumorType.md
docs/TypeaheadSearchResp.md
docs/UntranslatedRegion.md
docs/UtilsApi.md
docs/VariantAnnotation.md
docs/VariantAnnotationTumorType.md
docs/VariantConsequence.md
git_push.sh
index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.13.0
Loading
Loading