From 2baad4d57aed49ffde6b47fa56fbf0240c8f1509 Mon Sep 17 00:00:00 2001 From: Chen Wang <cwang138@illinois.edu> Date: Thu, 19 Oct 2023 12:08:42 -0500 Subject: [PATCH 1/5] add description --- src/components/SemanticViewer.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SemanticViewer.jsx b/src/components/SemanticViewer.jsx index e8250b90..4a310626 100644 --- a/src/components/SemanticViewer.jsx +++ b/src/components/SemanticViewer.jsx @@ -408,6 +408,7 @@ class SemanticViewer extends Component { <TableCell component="th" scope="row"> {field["name"]} </TableCell> + <TableCell align="right">{field["dc:description"]}</TableCell> <TableCell align="right">{field["titles"]}</TableCell> <TableCell align="right">{field["datatype"]}</TableCell> <TableCell align="right">{field["qudt:unit"]}</TableCell> @@ -424,6 +425,7 @@ class SemanticViewer extends Component { <TableHead> <TableRow> <TableCell className={classes.headerCell}>Name</TableCell> + <TableCell className={classes.headerCell} align="right">Description</TableCell> <TableCell className={classes.headerCell} align="right">Titles</TableCell> <TableCell className={classes.headerCell} align="right">Datatype</TableCell> <TableCell className={classes.headerCell} align="right">Unit</TableCell> @@ -569,7 +571,7 @@ class SemanticViewer extends Component { </Box> </Grid> { - this.state.selectedSemanticType["dc:description"] === "" ? + this.state.selectedSemanticType["dc:description"] === "" ? null : <Grid item xs={12}> <Box sx={{mx: 1}}> From 81a89568e5b902d4c09ac61d4145732c63863258 Mon Sep 17 00:00:00 2001 From: Chen Wang <cwang138@illinois.edu> Date: Thu, 19 Oct 2023 12:11:27 -0500 Subject: [PATCH 2/5] add filter back --- src/components/DataViewer.jsx | 1 + src/components/SemanticViewer.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/DataViewer.jsx b/src/components/DataViewer.jsx index 24826931..fd7995b0 100644 --- a/src/components/DataViewer.jsx +++ b/src/components/DataViewer.jsx @@ -757,6 +757,7 @@ class DataViewer extends Component { {/*filters*/} <Grid item lg={8} sm={8} xl={8} xs={12}> <Paper variant="outlined" className={classes.filter}> + <Typography variant="h6">Filters</Typography> <div className={classes.selectDiv}> <Datatype selectedDataType={this.state.selectedDataType} diff --git a/src/components/SemanticViewer.jsx b/src/components/SemanticViewer.jsx index 4a310626..937ea78d 100644 --- a/src/components/SemanticViewer.jsx +++ b/src/components/SemanticViewer.jsx @@ -472,6 +472,7 @@ class SemanticViewer extends Component { <Grid container spacing={4}> <Grid item lg={6} sm={6} xl={6} xs={12}> <Paper variant="outlined" className={classes.filter}> + <Typography variant="h6">Filters</Typography> <div className={classes.selectDiv}> <Space selectedSpace={this.state.selectedSpace} From 4cf002cdc89363bc68565070325bff7bf4f872e2 Mon Sep 17 00:00:00 2001 From: Chen Wang <cwang138@illinois.edu> Date: Thu, 19 Oct 2023 12:17:01 -0500 Subject: [PATCH 3/5] wording of semantics dataset type --- src/components/App.jsx | 2 +- src/components/children/Datatype.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index 8078191f..1a33e52a 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -429,7 +429,7 @@ class App extends Component { fetch("/SemanticViewer"); }} > - Semantics Viewer + Dataset Type Viewer </MenuItem> </Menu> ); diff --git a/src/components/children/Datatype.jsx b/src/components/children/Datatype.jsx index 1a10e59e..4b1756e3 100644 --- a/src/components/children/Datatype.jsx +++ b/src/components/children/Datatype.jsx @@ -34,7 +34,7 @@ class Datatype extends React.Component { if (this.props.datatypes.length > 0) { return ( <div> - <InputLabel>Dataset Type</InputLabel> + <InputLabel>Semantic Dataset Type</InputLabel> <Select value={this.props.selectedDataType} onChange={this.props.handleDatatypeSelection} className={classes.select}> <MenuItem key="All" value="All" className={classes.denseStyle}>All</MenuItem> From 4b67dfc13e7f34e4936252a2c767086fd482005d Mon Sep 17 00:00:00 2001 From: Chen Wang <cwang138@illinois.edu> Date: Thu, 19 Oct 2023 12:50:41 -0500 Subject: [PATCH 4/5] comment out delete button --- src/components/SemanticViewer.jsx | 55 ++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/src/components/SemanticViewer.jsx b/src/components/SemanticViewer.jsx index 937ea78d..ad7a0670 100644 --- a/src/components/SemanticViewer.jsx +++ b/src/components/SemanticViewer.jsx @@ -46,6 +46,7 @@ import ErrorMessage from "./children/ErrorMessage"; import Confirmation from "./children/Confirmation"; import LoadingOverlay from "react-loading-overlay"; import semantics from "../reducers/semantics"; +import {exportJson} from "../utils/common"; const cookies = new Cookies(); const redundantProp = ["deleted", "privileges", "spaces"]; @@ -554,17 +555,49 @@ class SemanticViewer extends Component { <Typography variant="subtitle1">Semantic Schema</Typography> </div> <br/> - <Grid container spacing={2} lg={8} md={8} xl={8} xs={12}> - <Grid item> - <Button - color="primary" - variant="contained" - className={classes.inlineButtons} - size="small" - onClick={this.downloadTemplate} - > - Download Template - </Button> + <Grid container spacing={2}> + <Grid item xs={12}> + <div className={classes.metadata}> + <Button + color="primary" + variant="contained" + className={classes.inlineButtons} + size="small" + onClick={this.downloadTemplate} + > + Download Template + </Button> + <Button + color="primary" + variant="contained" + className={classes.inlineButtons} + size="small" + onClick={() => { + exportJson(this.state.selectedSemanticType); + }} + > + Download Definition + </Button> + <CopyToClipboard text={this.state.selectedSemanticType["url"]}> + <Button + color="secondary" + variant="contained" + className={classes.inlineButtons} + size="small" + > + Copy Type + </Button> + </CopyToClipboard> + {/*<Button*/} + {/* color="secondary"*/} + {/* variant="contained"*/} + {/* className={classes.inlineButtons}*/} + {/* size="small"*/} + {/* onClick={this.onClickDelete}*/} + {/*>*/} + {/* DELETE*/} + {/*</Button>*/} + </div> </Grid> <Grid item xs={12}> <Box sx={{mx: 1}}> From c1e76f45f37f8b8e7887c49e7a66111744c8cb03 Mon Sep 17 00:00:00 2001 From: Chen Wang <cwang138@illinois.edu> Date: Thu, 19 Oct 2023 12:53:24 -0500 Subject: [PATCH 5/5] entry for changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592e5d4c..763d2832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + +## [Unreleased] + +### Changed +- Missing Filters title for both Data viewer and Semantics Viewer [#156](https://github.com/IN-CORE/incore-ui/issues/156) +- Semantic viewer needs to show description [#157](https://github.com/IN-CORE/incore-ui/issues/157) + + ## [1.8.0] - 2023-10-11 ### Changed