-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Verbiage updates, and make description optional by default * Remove link to user dataset workspace from study summaries page * Make spacing between elements more consistent * Reorder attributes on detail page, remove quota usage, and refactor some page sections * Refactor
- Loading branch information
Showing
18 changed files
with
377 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
packages/libs/user-datasets/src/lib/Components/Detail/BiomDatasetDetail.jsx
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
packages/libs/user-datasets/src/lib/Components/Detail/EdaDatasetDetail.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { Link } from 'react-router-dom'; | ||
|
||
import UserDatasetDetail from './UserDatasetDetail'; | ||
|
||
class EdaDatasetDetail extends UserDatasetDetail { | ||
constructor(props) { | ||
super(props); | ||
this.renderEdaLinkout = this.renderEdaLinkout.bind(this); | ||
} | ||
|
||
renderEdaLinkout() { | ||
const { | ||
config: { displayName, projectId }, | ||
userDataset: { status }, | ||
edaWorkspaceUrl, | ||
edaMapUrl, | ||
} = this.props; | ||
|
||
const isInstalled = | ||
status?.import === 'complete' && | ||
status?.install?.find((d) => d.projectId === projectId)?.dataStatus === | ||
'complete'; | ||
|
||
if (!isInstalled) return null; | ||
|
||
if (edaWorkspaceUrl == null && edaMapUrl == null) return null; | ||
|
||
return ( | ||
<ul className="eda-linkout"> | ||
{!edaWorkspaceUrl ? null : ( | ||
<li> | ||
<Link to={edaWorkspaceUrl}> | ||
<i className="ebrc-icon-edaIcon"></i> Explore in {displayName} | ||
</Link> | ||
</li> | ||
)} | ||
{!edaMapUrl ? null : ( | ||
<li> | ||
<Link to={edaMapUrl}> | ||
<i className="ebrc-icon-edaIcon"></i> Explore in MapVEu | ||
</Link> | ||
</li> | ||
)} | ||
</ul> | ||
); | ||
} | ||
|
||
getAttributes() { | ||
const attributes = super.getAttributes(); | ||
|
||
if (!this.isInstalled()) return attributes; | ||
|
||
const edaLinks = { | ||
attribute: 'Explore', | ||
value: this.renderEdaLinkout(), | ||
}; | ||
const spliceIndex = this.props.includeNameHeader ? 2 : 1; | ||
return [ | ||
...attributes.slice(0, spliceIndex), | ||
edaLinks, | ||
...attributes.slice(spliceIndex), | ||
]; | ||
} | ||
} | ||
|
||
export default EdaDatasetDetail; |
Oops, something went wrong.