Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Refine pivot of home page #5180

Merged
merged 2 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/webportal/src/app/home/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,21 @@ const Home = () => {
'https://openpai.readthedocs.io/en/latest/manual/cluster-admin/basic-management-operations.html#abnormal-jobs'
}
/>
<Pivot>
<PivotItem headerText='Abnormal jobs'>
<AbnormalJobList
jobs={listAbnormalJobs(runningJobs, lowGpuJobInfo)}
/>
</PivotItem>
<PivotItem headerText='My recent jobs'>
<RecentJobList style={{ minHeight: 0 }} jobs={userJobs} />
</PivotItem>
</Pivot>
<StackItem grow>
<Pivot>
<PivotItem headerText='Abnormal jobs'>
<AbnormalJobList
jobs={listAbnormalJobs(runningJobs, lowGpuJobInfo)}
/>
</PivotItem>
<PivotItem headerText='My recent jobs'>
<RecentJobList
style={{ minHeight: 0 }}
jobs={userJobs}
/>
</PivotItem>
</Pivot>
</StackItem>
</Stack>
) : (
<Pivot>
Expand Down
9 changes: 1 addition & 8 deletions src/webportal/src/app/home/home/abnormal-job-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const AbnormalJobList = ({ jobs }) => {
const jobListColumns = [
{
key: 'name',
minWidth: 150,
name: 'Name',
fieldName: 'name',
className: FontClassNames.mediumPlus,
Expand All @@ -72,8 +71,8 @@ const AbnormalJobList = ({ jobs }) => {
},
{
key: 'gpuCount',
minWidth: 150,
name: 'GPUs',
minWidth: 150,
fieldName: 'totalGpuNumber',
className: FontClassNames.mediumPlus,
isResizable: true,
Expand All @@ -90,7 +89,6 @@ const AbnormalJobList = ({ jobs }) => {
},
{
key: 'modified',
minWidth: 150,
name: 'Date Modified',
className: FontClassNames.mediumPlus,
isResizable: true,
Expand All @@ -100,15 +98,13 @@ const AbnormalJobList = ({ jobs }) => {
},
{
key: 'user',
minWidth: 60,
name: 'User',
fieldName: 'username',
className: FontClassNames.mediumPlus,
isResizable: true,
},
{
key: 'duration',
minWidth: 120,
name: 'Duration',
className: FontClassNames.mediumPlus,
isResizable: true,
Expand All @@ -125,15 +121,13 @@ const AbnormalJobList = ({ jobs }) => {
},
{
key: 'virtualCluster',
minWidth: 100,
name: 'Virtual Cluster',
fieldName: 'virtualCluster',
className: FontClassNames.mediumPlus,
isResizable: true,
},
{
key: 'status',
minWidth: 100,
name: 'Status',
isResizable: true,
onRender(job) {
Expand All @@ -142,7 +136,6 @@ const AbnormalJobList = ({ jobs }) => {
},
{
key: 'action',
minWidth: 100,
name: 'Action',
className: zeroPaddingClass,
isResizable: true,
Expand Down
5 changes: 0 additions & 5 deletions src/webportal/src/app/home/home/recent-job-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const DummyContent = () => {
const jobListColumns = [
{
key: 'name',
minWidth: 200,
name: 'Name',
fieldName: 'name',
className: FontClassNames.mediumPlus,
Expand All @@ -104,7 +103,6 @@ const jobListColumns = [
},
{
key: 'modified',
minWidth: 150,
name: 'Date Modified',
className: FontClassNames.mediumPlus,
isResizable: true,
Expand All @@ -114,7 +112,6 @@ const jobListColumns = [
},
{
key: 'duration',
minWidth: 120,
name: 'Duration',
className: FontClassNames.mediumPlus,
isResizable: true,
Expand All @@ -124,15 +121,13 @@ const jobListColumns = [
},
{
key: 'virtualCluster',
minWidth: 100,
name: 'Virtual Cluster',
fieldName: 'virtualCluster',
className: FontClassNames.mediumPlus,
isResizable: true,
},
{
key: 'status',
minWidth: 100,
name: 'Status',
isResizable: true,
onRender(job) {
Expand Down