Skip to content

Commit

Permalink
ui: visually remove workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Garcia Garcia <miguel.garcia.garcia@cern.ch>
  • Loading branch information
miguelgrc authored and pamfilos committed Feb 27, 2024
1 parent c68aad3 commit 826e34c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 56 deletions.
82 changes: 33 additions & 49 deletions ui/cap-react/src/antd/dashboard/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Dashboard = ({ fetchDashboard, results, loading, groups }) => {
));

return (
<Row style={{ padding: "10px" }}>
<Row gutter={[20, 20]} style={{ padding: "20px" }}>
{showModal && (
<Modal
title="Your Collections"
Expand All @@ -54,26 +54,18 @@ const Dashboard = ({ fetchDashboard, results, loading, groups }) => {
</Space>
</Modal>
)}
<Col
xs={{ span: 24, order: 2 }}
md={{ span: 12, order: 1 }}
style={{ padding: "10px" }}
>
<DashboardList
loading={loading}
listType="draft"
list={lists["drafts"]}
header="Draft Documents"
description="Draft analyses that your collaborators have given you read/write access to"
displayShowAll
/>
<Col xs={{ span: 24, order: 2 }} md={{ span: 12, order: 1 }}>
<Card
title={<Typography.Text strong>Quick Search</Typography.Text>}
size="small"
headStyle={{ height: "46px", textAlign: "center" }}
style={{ height: "100%" }}
>
<DashboardQuickSearch />
</Card>
</Col>
<Col
xs={{ span: 24, order: 1 }}
md={{ span: 12, order: 2 }}
style={{ padding: "10px" }}
>
<Card style={{ paddingBottom: "10px" }}>
<Col xs={{ span: 24, order: 1 }} md={{ span: 12, order: 2 }}>
<Card style={{ paddingBottom: "1px" }}>
<Row justify="space-around" align="middle">
<Statistic
value={results.user_drafts_count}
Expand All @@ -98,24 +90,21 @@ const Dashboard = ({ fetchDashboard, results, loading, groups }) => {
</Row>
</Card>

<Card
title={<Typography.Text strong>Quick Search</Typography.Text>}
size="small"
headStyle={{ height: "46px", textAlign: "center" }}
style={{ marginTop: "20px" }}
>
<DashboardQuickSearch />
</Card>

<Card
title={<Typography.Text strong>Your Collections</Typography.Text>}
size="small"
headStyle={{ height: "46px" }}
style={{ marginTop: "20px" }}
>
<Space size={[0, 8]} wrap>
{generateCollectionTags(
groups.toJS().slice(0, MAX_DISPLAYED_COLLECTIONS)
{groups.toJS() ? (
generateCollectionTags(
groups.toJS().slice(0, MAX_DISPLAYED_COLLECTIONS)
)
) : (
<Typography.Text style={{ color: "rgba(0, 0, 0, 0.25)" }}>
No data
</Typography.Text>
)}
{groups.size > MAX_DISPLAYED_COLLECTIONS && (
<Button
Expand All @@ -130,31 +119,26 @@ const Dashboard = ({ fetchDashboard, results, loading, groups }) => {
</Space>
</Card>
</Col>
<Col
xs={{ span: 24, order: 3 }}
md={{ span: 12 }}
style={{ padding: "10px" }}
>

<Col xs={{ span: 24, order: 4 }} md={{ span: 12, order: 3 }}>
<DashboardList
loading={loading}
listType="published"
list={lists["published"]}
header="Published Documents in CAP"
description="All analyses published on CAP by members of your collaboration"
listType="draft"
list={lists["drafts"]}
header="Draft Documents"
description="Draft analyses that your collaborators have given you read/write access to"
displayShowAll
/>
</Col>
<Col
xs={{ span: 24, order: 4 }}
md={{ span: 12 }}
style={{ padding: "10px" }}
>

<Col xs={{ span: 24, order: 4 }} md={{ span: 12, order: 4 }}>
<DashboardList
loading={loading}
listType="workflows"
list={lists["workflows"]}
header="Workflows"
emptyMessage="Recent workflows attached to your content"
listType="published"
list={lists["published"]}
header="Published Documents in CAP"
description="All analyses published on CAP by members of your collaboration"
displayShowAll
/>
</Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Link } from "react-router-dom";
import {
AppstoreOutlined,
BranchesOutlined,
PlayCircleOutlined,
SettingOutlined,
TagOutlined,
} from "@ant-design/icons";
Expand Down Expand Up @@ -38,12 +37,6 @@ const NavMenu = ({ match, history, formErrors }) => {
),
icon: <BranchesOutlined />,
},
{
key: "workflows",
label: "Workflows",
icon: <PlayCircleOutlined />,
disabled: true,
},
{
key: "settings",
label: (
Expand Down

0 comments on commit 826e34c

Please sign in to comment.