-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SUN
committed
Mar 7, 2024
1 parent
6de0add
commit da3fc68
Showing
6 changed files
with
166 additions
and
7 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
eventmesh-dashboard-view/src/assets/icons/eventmesh-topic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
60 changes: 60 additions & 0 deletions
60
eventmesh-dashboard-view/src/routes/topic/AbnormalTopicCount.tsx
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,60 @@ | ||
import React, { forwardRef } from 'react' | ||
import { Paper, PaperProps, Stack, Typography, Button } from '@mui/material' | ||
import { red } from '@mui/material/colors' | ||
|
||
interface AbnormalTopicCountProps extends PaperProps {} | ||
|
||
const AbnormalTopicCount = forwardRef<typeof Paper, AbnormalTopicCountProps>( | ||
({ ...props }, ref) => { | ||
return ( | ||
<Paper | ||
sx={{ | ||
height: 80, | ||
pt: 1, | ||
pb: 1, | ||
pr: { | ||
sm: 1, | ||
md: 3 | ||
}, | ||
pl: { | ||
sm: 1, | ||
md: 3 | ||
} | ||
}}> | ||
<Stack | ||
direction="row" | ||
justifyContent="space-between" | ||
alignItems="center"> | ||
<Stack alignItems="flex-start"> | ||
<Typography paragraph variant="caption" sx={{ m: 0 }}> | ||
异常状态 Topic 数量 | ||
</Typography> | ||
<Button sx={{ fontSize: 13, mb: -2 }} size="small"> | ||
查看详情 | ||
</Button> | ||
</Stack> | ||
<Stack sx={{ width: 120 }} alignItems="center"> | ||
<Typography | ||
variant="subtitle1" | ||
sx={{ | ||
width: 32, | ||
height: 32, | ||
borderRadius: 16, | ||
bgcolor: red[400], | ||
boxSizing: 'content-box', | ||
border: `8px solid ${red[50]}`, | ||
textAlign: 'center', | ||
fontWeight: 'bolder', | ||
color: 'white' | ||
}}> | ||
2 | ||
</Typography> | ||
</Stack> | ||
</Stack> | ||
</Paper> | ||
) | ||
} | ||
) | ||
|
||
AbnormalTopicCount.displayName = 'AbnormalTopicCount' | ||
export default AbnormalTopicCount |
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 |
---|---|---|
@@ -1,11 +1,46 @@ | ||
import React, { forwardRef } from "react"; | ||
import { Box, BoxProps } from "@mui/material"; | ||
import React, { forwardRef } from 'react' | ||
import { Box, BoxProps, Paper, Stack } from '@mui/material' | ||
import Page from '../../components/Page' | ||
import TopicCount from './TopicCount' | ||
import AbnormalTopicCount from './AbnormalTopicCount' | ||
|
||
interface TopicProps extends BoxProps {} | ||
|
||
const Topic = forwardRef<typeof Box, TopicProps>(({ ...props }, ref) => { | ||
return <Box ref={ref}>Topic</Box>; | ||
}); | ||
return ( | ||
<Page> | ||
<Stack sx={{ width: 1, height: 1, p: 2 }} spacing={1}> | ||
<Stack direction="row" spacing={1}> | ||
<Stack sx={{ width: { sm: 180, md: 240, lg: 360 } }} spacing={1}> | ||
<TopicCount /> | ||
<AbnormalTopicCount /> | ||
</Stack> | ||
<Stack> | ||
<Stack direction="row"> | ||
<Box>Filter</Box> | ||
<Box>Refresh</Box> | ||
</Stack> | ||
<Stack direction="row"> | ||
<Box sx={{ flexFlow: 1 }}>Topic Stats</Box> | ||
<Box>Message Stats</Box> | ||
<Box>Average Message Stats</Box> | ||
</Stack> | ||
</Stack> | ||
</Stack> | ||
<Stack sx={{ flexGrow: 1 }}> | ||
<Stack | ||
direction="row" | ||
justifyContent="space-between" | ||
alignItems="center"> | ||
<Box> Search</Box> | ||
<Box> Add</Box> | ||
</Stack> | ||
<Paper sx={{ flexGrow: 1 }}>List</Paper> | ||
</Stack> | ||
</Stack> | ||
</Page> | ||
) | ||
}) | ||
|
||
Topic.displayName = "Topic"; | ||
export default Topic; | ||
Topic.displayName = 'Topic' | ||
export default Topic |
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,48 @@ | ||
import React, { forwardRef } from 'react' | ||
import { Paper, PaperProps, Stack, Typography } from '@mui/material' | ||
import { Icons } from '../../assets/icons' | ||
|
||
interface TopicCountProps extends PaperProps {} | ||
|
||
const TopicCount = forwardRef<typeof Paper, TopicCountProps>( | ||
({ ...props }, ref) => { | ||
return ( | ||
<Paper | ||
sx={{ | ||
height: 80, | ||
pt: 1, | ||
pb: 1, | ||
pr: { | ||
sm: 1, | ||
md: 3 | ||
}, | ||
pl: { | ||
sm: 1, | ||
md: 3 | ||
} | ||
}}> | ||
<Stack | ||
direction="row" | ||
justifyContent="space-between" | ||
alignItems="center"> | ||
<Icons.EventMeshTopic /> | ||
<Stack sx={{ width: 120 }} alignItems="center"> | ||
<Typography paragraph variant="caption" sx={{ m: 0 }}> | ||
Topic 总数量 | ||
</Typography> | ||
<Typography | ||
paragraph | ||
variant="h6" | ||
color="primary" | ||
sx={{ m: 0, fontWeight: 'bold' }}> | ||
5 | ||
</Typography> | ||
</Stack> | ||
</Stack> | ||
</Paper> | ||
) | ||
} | ||
) | ||
|
||
TopicCount.displayName = 'TopicCount' | ||
export default TopicCount |
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