Skip to content

Commit

Permalink
wf-details: display workspace size
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppe-steduto committed May 15, 2023
1 parent ddb62ed commit 34419e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions reana-ui/src/pages/workflowDetails/components/WorkflowInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ export default function WorkflowInfo({ workflow }) {
completed,
total,
status,
size,
launcherURL,
session_uri: sessionUri,
session_status: sessionStatus,
} = workflow;
const reanaToken = useSelector(getReanaToken);
const isDeleted = status === "deleted";
const hasDiskUsage = size.raw > 0;
const isDeletedUsingWorkspace = isDeleted && hasDiskUsage;
const isSessionOpen = sessionStatus === "created";
return (
<div className={styles.workflow}>
Expand All @@ -65,6 +69,17 @@ export default function WorkflowInfo({ workflow }) {
<span className={styles["launcher-label"]}>
<LauncherLabel url={launcherURL} />
</span>
<div>
{hasDiskUsage && (
<span
className={`${styles.size} ${
isDeletedUsingWorkspace ? styles.highlight : ""
}`}
>
<Icon name="hdd" /> {size.human_readable}
</span>
)}
</div>
<Popup
trigger={
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
.details-box {
display: flex;
align-items: baseline;

.size {
color: $light-gray;
font-size: 0.75em;
margin-right: 0.75em;

&.highlight {
color: $sui-red;
}
}
}
}

Expand Down

0 comments on commit 34419e8

Please sign in to comment.