Skip to content

Commit

Permalink
Mv Web Client Info to Config; Print Client Version (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Boyle authored Feb 27, 2021
1 parent e4dc5d2 commit ad292fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/components/InfoDialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Box, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, Grid, CircularProgress, Link, Paper, Table, TableHead, TableRow, TableCell, TableBody, TableContainer, withStyles } from '@material-ui/core';
import Config from '../config';

export const toolInfoStates = {
LOADING: 1,
Expand Down Expand Up @@ -108,6 +109,7 @@ export class InfoDialog extends React.Component {
}

render = () => {
const config = new Config();
let content;
if (this.state.deidentifierInfo === toolInfoStates.LOADING) {
content = <CircularProgress />
Expand All @@ -117,8 +119,8 @@ export class InfoDialog extends React.Component {
const toolInfo = this.state.deidentifierInfo;
content = <React.Fragment>
<DialogContentText id="scroll-dialog-description" tabIndex={-1}>
You are currently using version xyz of the <Link
href="https://github.com/nlpsandbox/phi-deidentifier-app">NLP
You are currently using version {config.version()} of the <Link
href={config.source()}>NLP
Sandbox PHI Deidentifier Web Client</Link>, a tool made for testing
the effectiveness of community-created, open source PHI annotators
submitted to the NLP Sandbox. You can input a clinical note, which
Expand Down
10 changes: 10 additions & 0 deletions client/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@ export default class Config {
return `${serverUrl}${serverApiPath}`;
}

version() {
// Version of the web client
return '1.0.0';
}

source() {
// URL to source of web client
return "https://github.com/nlpsandbox/phi-deidentifier-app";
}

}

0 comments on commit ad292fd

Please sign in to comment.