forked from opengoofy/hippo4j
-
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.
feat: login en and happy work (opengoofy#1479)
* stash code * fix active router * feat: login en and happy work --------- Co-authored-by: yikai <[email protected]>
- Loading branch information
Showing
27 changed files
with
495 additions
and
69 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
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,3 @@ | ||
// .custom-icon { | ||
// color: red !important; | ||
// } |
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,15 +1,15 @@ | ||
import { createFromIconfontCN } from '@ant-design/icons'; | ||
|
||
interface Props { | ||
type: string; | ||
} | ||
import React from 'react'; | ||
import style from './index.module.less'; | ||
|
||
const MyIcon = createFromIconfontCN({ | ||
scriptUrl: '//at.alicdn.com/t/c/font_4254722_3l4m6by7h34.js', // 在 iconfont.cn 上生成 | ||
scriptUrl: '//at.alicdn.com/t/c/font_4254722_vw34zn7su2.js', // 在 iconfont.cn 上生成 | ||
}); | ||
|
||
const IconFont = (props: Props) => { | ||
return <MyIcon {...props}></MyIcon>; | ||
type MyComponentProps = React.HTMLProps<HTMLDivElement> & { type: string }; | ||
|
||
const IconFont: React.FC<MyComponentProps> = props => { | ||
return <MyIcon className={style['custom-icon']} {...props}></MyIcon>; | ||
}; | ||
|
||
export default IconFont; |
27 changes: 27 additions & 0 deletions
27
threadpool/console-new/src/components/with-button/index.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,27 @@ | ||
import { Button, ButtonProps } from 'antd'; | ||
import React from 'react'; | ||
import { SearchOutlined, PlusOutlined, RedoOutlined } from '@ant-design/icons'; | ||
|
||
function withSearchIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) { | ||
return function EnhancedComponent(props: P) { | ||
return <WrappedComponent icon={<SearchOutlined></SearchOutlined>} {...props} />; | ||
}; | ||
} | ||
|
||
function withAddIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) { | ||
return function EnhancedComponent(props: P) { | ||
return <WrappedComponent icon={<PlusOutlined />} {...props}></WrappedComponent>; | ||
}; | ||
} | ||
|
||
function withResetIconButton<P extends ButtonProps>(WrappedComponent: React.ComponentType<P>) { | ||
return function EnhancedComponent(props: P) { | ||
return <WrappedComponent {...props} icon={<RedoOutlined />}></WrappedComponent>; | ||
}; | ||
} | ||
|
||
export const SearchButton = withSearchIconButton(Button); | ||
|
||
export const AddButton = withAddIconButton(Button); | ||
|
||
export const ResetButton = withResetIconButton(Button); |
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
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
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
Empty file.
34 changes: 34 additions & 0 deletions
34
threadpool/console-new/src/page/thread-pool-monitor/index.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,34 @@ | ||
import * as echarts from 'echarts/core'; | ||
import { GridComponent } from 'echarts/components'; | ||
import { LineChart } from 'echarts/charts'; | ||
import { UniversalTransition } from 'echarts/features'; | ||
import { CanvasRenderer } from 'echarts/renderers'; | ||
import { useEffect } from 'react'; | ||
echarts.use([GridComponent, LineChart, CanvasRenderer, UniversalTransition]); | ||
|
||
const ThreadPoolMonitor = () => { | ||
useEffect(() => { | ||
let chartDom = document.getElementById('main'); | ||
let myChart = echarts.init(chartDom); | ||
let option; | ||
option = { | ||
xAxis: { | ||
type: 'category', | ||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], | ||
}, | ||
yAxis: { | ||
type: 'value', | ||
}, | ||
series: [ | ||
{ | ||
data: [150, 230, 224, 218, 135, 147, 260], | ||
type: 'line', | ||
}, | ||
], | ||
}; | ||
option && myChart.setOption(option); | ||
}); | ||
return <div id="main" style={{ width: '400px', height: '400px' }}></div>; | ||
}; | ||
|
||
export default ThreadPoolMonitor; |
Oops, something went wrong.