diff --git a/threadpool/console-new/package.json b/threadpool/console-new/package.json index cef35383..3a166404 100644 --- a/threadpool/console-new/package.json +++ b/threadpool/console-new/package.json @@ -4,6 +4,7 @@ "private": true, "dependencies": { "@ahooksjs/use-url-state": "^3.5.1", + "@ant-design/happy-work-theme": "^1.0.0", "@ant-design/icons": "^5.2.6", "@tanem/react-nprogress": "^5.0.51", "@testing-library/jest-dom": "^5.16.5", @@ -13,6 +14,8 @@ "antd": "^5.4.7", "classnames": "^2.3.2", "dayjs": "^1.11.9", + "echarts": "^5.4.3", + "echarts-for-react": "^3.0.2", "i18next": "^23.5.1", "i18next-browser-languagedetector": "^7.1.0", "lodash": "^4.17.21", diff --git a/threadpool/console-new/src/App.tsx b/threadpool/console-new/src/App.tsx index 52ecb4b8..7ac3dc57 100644 --- a/threadpool/console-new/src/App.tsx +++ b/threadpool/console-new/src/App.tsx @@ -6,6 +6,7 @@ import { MenuProps } from 'antd'; import { useTran } from './hooks'; import { STR_MAP } from './config/i18n/locales/constants'; import IconFont from './components/icon'; +import { HappyProvider } from '@ant-design/happy-work-theme'; type MenuItem = Required['items'][number]; @@ -16,39 +17,44 @@ const App = () => { key: STR_MAP.DYNAMIC_THREAD_POOL, icon: , children: [ - { label: {useTran(STR_MAP.THREAD_POOL)}, key: '/thread-poll/index' }, + { + label: {useTran(STR_MAP.THREAD_POOL_MANAGE)}, + key: '/thread-poll/index', + }, ], }, { label: {useTran(STR_MAP.TENANT_MANAGE)}, - key: STR_MAP.TENANT_MANAGE, + key: '/tenant', icon: , }, { label: {useTran(STR_MAP.PROJECT_MANAGE)}, - key: STR_MAP.PROJECT_MANAGE, + key: '/item', icon: , }, { label: {useTran(STR_MAP.USER_MANAGE)}, - key: STR_MAP.USER_MANAGE, + key: '/user', icon: , }, { label: {useTran(STR_MAP.LOG_MANAGE)}, - key: STR_MAP.LOG_MANAGE, + key: '/log', icon: , }, ]; return ( - - - {routeList.map(item => ( - - ))} - - + + + + {routeList.map(item => ( + + ))} + + + ); }; diff --git a/threadpool/console-new/src/components/header/index.tsx b/threadpool/console-new/src/components/header/index.tsx index fdea38d5..8f90676a 100644 --- a/threadpool/console-new/src/components/header/index.tsx +++ b/threadpool/console-new/src/components/header/index.tsx @@ -39,7 +39,7 @@ const HeaderChild = () => { return (
navigate('/home')}> - +
diff --git a/threadpool/console-new/src/components/icon/index.module.less b/threadpool/console-new/src/components/icon/index.module.less new file mode 100644 index 00000000..20361481 --- /dev/null +++ b/threadpool/console-new/src/components/icon/index.module.less @@ -0,0 +1,3 @@ +// .custom-icon { +// color: red !important; +// } \ No newline at end of file diff --git a/threadpool/console-new/src/components/icon/index.tsx b/threadpool/console-new/src/components/icon/index.tsx index fee31ec8..a41d3f8b 100644 --- a/threadpool/console-new/src/components/icon/index.tsx +++ b/threadpool/console-new/src/components/icon/index.tsx @@ -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 ; +type MyComponentProps = React.HTMLProps & { type: string }; + +const IconFont: React.FC = props => { + return ; }; export default IconFont; diff --git a/threadpool/console-new/src/components/with-button/index.tsx b/threadpool/console-new/src/components/with-button/index.tsx new file mode 100644 index 00000000..0ec5c460 --- /dev/null +++ b/threadpool/console-new/src/components/with-button/index.tsx @@ -0,0 +1,27 @@ +import { Button, ButtonProps } from 'antd'; +import React from 'react'; +import { SearchOutlined, PlusOutlined, RedoOutlined } from '@ant-design/icons'; + +function withSearchIconButton

(WrappedComponent: React.ComponentType

) { + return function EnhancedComponent(props: P) { + return } {...props} />; + }; +} + +function withAddIconButton

(WrappedComponent: React.ComponentType

) { + return function EnhancedComponent(props: P) { + return } {...props}>; + }; +} + +function withResetIconButton

(WrappedComponent: React.ComponentType

) { + return function EnhancedComponent(props: P) { + return }>; + }; +} + +export const SearchButton = withSearchIconButton(Button); + +export const AddButton = withAddIconButton(Button); + +export const ResetButton = withResetIconButton(Button); diff --git a/threadpool/console-new/src/config/i18n/locales/constants.ts b/threadpool/console-new/src/config/i18n/locales/constants.ts index 8632ba92..613fda9d 100644 --- a/threadpool/console-new/src/config/i18n/locales/constants.ts +++ b/threadpool/console-new/src/config/i18n/locales/constants.ts @@ -1,4 +1,5 @@ export enum STR_MAP { + GLOBAL_TITLE = 'globalTitle', DYNAMIC_THREAD_POOL = 'dynamicThreadPool', THREAD_POOL_MANAGE = 'threadPoolManage', PROJECT = 'project', @@ -15,10 +16,21 @@ export enum STR_MAP { EXECUTION_TIMEOUT = 'executionTimeout', ALARM_OR_NOT = 'alarmOrNot', CREATION_TIME = 'creationTime', - UPDATE_TIME = 'update time', + UPDATE_TIME = 'updateTime', EDIT = 'edit', TENANT_MANAGE = 'tenantManage', LOG_MANAGE = 'logManage', PROJECT_MANAGE = 'projectManage', USER_MANAGE = 'userManage', + LOGIN_SUCCESSFUL = 'loginSuccessful', + USER_INPUT_MESSAGE = 'userInputMessage', + USRE_NAME = 'username', + PASSWORD_INPUT_MESSAGE = 'passwordInputMessage', + REMERBER_PASSWORD = 'rememberPassWord', + FORGOT_PASSWORD = 'forgotPassword', + ACCOUNT_PASSWORD_LOGIN = 'accountPasswordLogin', + PASSWOR = 'password', + LOGIN = 'login', + PHONE_LOGIN = 'phoneLogin', + ALARM_EDITING_SUCCESS = 'alarmEditingSuccess', } diff --git a/threadpool/console-new/src/config/i18n/locales/en.ts b/threadpool/console-new/src/config/i18n/locales/en.ts index 45be09f0..978f5e0b 100644 --- a/threadpool/console-new/src/config/i18n/locales/en.ts +++ b/threadpool/console-new/src/config/i18n/locales/en.ts @@ -23,6 +23,18 @@ const enTranslationMap: { [key: string]: string } = { [STR_MAP.PROJECT_MANAGE]: 'project management', [STR_MAP.USER_MANAGE]: 'user management', [STR_MAP.LOG_MANAGE]: 'log management', + [STR_MAP.LOGIN_SUCCESSFUL]: 'login successful', + [STR_MAP.USER_INPUT_MESSAGE]: 'please enter your username', + [STR_MAP.USRE_NAME]: 'username', + [STR_MAP.PASSWORD_INPUT_MESSAGE]: 'please enter password', + [STR_MAP.REMERBER_PASSWORD]: 'remember the password', + [STR_MAP.FORGOT_PASSWORD]: 'forgot password', + [STR_MAP.ACCOUNT_PASSWORD_LOGIN]: 'account password login', + [STR_MAP.GLOBAL_TITLE]: `The world's best thread pool management tool`, + [STR_MAP.PASSWOR]: 'password', + [STR_MAP.LOGIN]: 'login', + [STR_MAP.PHONE_LOGIN]: 'Mobile login', + [STR_MAP.ALARM_EDITING_SUCCESS]: 'alarm editing success', }; export default enTranslationMap; diff --git a/threadpool/console-new/src/config/i18n/locales/zh.ts b/threadpool/console-new/src/config/i18n/locales/zh.ts index 0d3bdaf3..5acde9dd 100644 --- a/threadpool/console-new/src/config/i18n/locales/zh.ts +++ b/threadpool/console-new/src/config/i18n/locales/zh.ts @@ -23,6 +23,18 @@ const zhTranslationMap: { [key: string]: string } = { [STR_MAP.PROJECT_MANAGE]: '项目管理', [STR_MAP.USER_MANAGE]: '用户权限', [STR_MAP.LOG_MANAGE]: '日志管理', + [STR_MAP.LOGIN_SUCCESSFUL]: '登录成功', + [STR_MAP.USER_INPUT_MESSAGE]: '请输入用户名', + [STR_MAP.USRE_NAME]: '用户名', + [STR_MAP.PASSWORD_INPUT_MESSAGE]: '请输入密码', + [STR_MAP.REMERBER_PASSWORD]: '记住密码', + [STR_MAP.FORGOT_PASSWORD]: '忘记密码', + [STR_MAP.ACCOUNT_PASSWORD_LOGIN]: '账号密码登录', + [STR_MAP.GLOBAL_TITLE]: `全球最好用的线程池管理工具`, + [STR_MAP.PASSWOR]: '密码', + [STR_MAP.LOGIN]: '登录', + [STR_MAP.PHONE_LOGIN]: '手机号登录', + [STR_MAP.ALARM_EDITING_SUCCESS]: '报警编辑成功', }; export default zhTranslationMap; diff --git a/threadpool/console-new/src/config/theme/dark-algorithm.ts b/threadpool/console-new/src/config/theme/dark-algorithm.ts index 054da61e..dcd15994 100644 --- a/threadpool/console-new/src/config/theme/dark-algorithm.ts +++ b/threadpool/console-new/src/config/theme/dark-algorithm.ts @@ -22,7 +22,7 @@ export const darkAlgorithm = { // padding: 10, // paddingXS: 5, // margin: 0, - // fontSize: 14, + // cellFontSize: 12, // colorBorderSecondary: darkDefaultTheme.borderColor.bl1, // paddingContentVerticalLG: 4, }, diff --git a/threadpool/console-new/src/config/theme/default-algnorithm.ts b/threadpool/console-new/src/config/theme/default-algnorithm.ts index bcb8e6b9..f9c6e766 100644 --- a/threadpool/console-new/src/config/theme/default-algnorithm.ts +++ b/threadpool/console-new/src/config/theme/default-algnorithm.ts @@ -20,7 +20,7 @@ export const defaultAlgorithm = { // padding: 10, // paddingXS: 5, // margin: 0, - // fontSize: 14, + // cellFontSize: 12, // colorBorderSecondary: lightDefaultTheme.borderColor.bl1, // paddingContentVerticalLG: 4, }, diff --git a/threadpool/console-new/src/page/item/index.tsx b/threadpool/console-new/src/page/item/index.tsx index 55cfc618..4d35bac8 100644 --- a/threadpool/console-new/src/page/item/index.tsx +++ b/threadpool/console-new/src/page/item/index.tsx @@ -122,7 +122,6 @@ const Tenant: React.FC = () => { {
{ const navigate = useNavigate(); const { validateFields } = form; const [remenberMe, setRemenberMe] = useState(0); + const { t } = useTranslation(); const { run, loading } = useRequest(service.fetchLogin, { manual: true, onSuccess: res => { if (res) { - message.success('登陆成功'); + message.success(t(STR_MAP.LOGIN_SUCCESSFUL)); navigate('/thread-poll/index'); setToken(res?.data); } @@ -54,12 +57,12 @@ const Login = () => { rules={[ { required: true, - message: '请输入用户名!', + message: t(STR_MAP.USER_INPUT_MESSAGE), }, ]} > } size="large" allowClear @@ -71,12 +74,12 @@ const Login = () => { rules={[ { required: true, - message: '请输入密码!', + message: t(STR_MAP.PASSWORD_INPUT_MESSAGE), }, ]} > } size="large" allowClear @@ -91,9 +94,9 @@ const Login = () => { setRemenberMe(e.target.checked ? 1 : 0); }} > - 记住密码 + {t(STR_MAP.REMERBER_PASSWORD)} - + {t(STR_MAP.FORGOT_PASSWORD)} @@ -105,23 +108,23 @@ const Login = () => { onClick={handleLogin} loading={loading} > - 登陆 + {t(STR_MAP.LOGIN)} ), - [form, loading, handleLogin] + [form, loading, handleLogin, t] ); const items: TabsProps['items'] = [ { key: TABS_KEY.LOGIN, - label: '账号密码登陆', + label: t(STR_MAP.ACCOUNT_PASSWORD_LOGIN), children: formNode, }, { key: TABS_KEY.PHONE, - label: '手机号登陆', + label: t(STR_MAP.PHONE_LOGIN), children: formNode, }, ]; @@ -132,7 +135,7 @@ const Login = () => {
- 全球最好用的线程池管理工具 + {t(STR_MAP.GLOBAL_TITLE)}
diff --git a/threadpool/console-new/src/page/tenant/index.tsx b/threadpool/console-new/src/page/tenant/index.tsx index 5af8ac52..1651531c 100644 --- a/threadpool/console-new/src/page/tenant/index.tsx +++ b/threadpool/console-new/src/page/tenant/index.tsx @@ -109,7 +109,6 @@ const Tenant: React.FC = () => {
{ + 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
; +}; + +export default ThreadPoolMonitor; diff --git a/threadpool/console-new/src/page/thread-pool-monitor/router.ts b/threadpool/console-new/src/page/thread-pool-monitor/router.ts new file mode 100644 index 00000000..13e1e53b --- /dev/null +++ b/threadpool/console-new/src/page/thread-pool-monitor/router.ts @@ -0,0 +1,11 @@ +import { IRouterList } from '@/typings'; +import ThreadPoolMonitor from '.'; + +const routerList: IRouterList[] = [ + { + path: '/echarts', + component: ThreadPoolMonitor, + }, +]; + +export default routerList; diff --git a/threadpool/console-new/src/page/thread-pool/constants.ts b/threadpool/console-new/src/page/thread-pool/constants.ts new file mode 100644 index 00000000..8ed76cdf --- /dev/null +++ b/threadpool/console-new/src/page/thread-pool/constants.ts @@ -0,0 +1,23 @@ +export const QUEUE_TYPE_MAP: { [key: string]: string } = { + '1': 'ArrayBlockingQueue', + '2': 'LinkedBlockingQueue', + '3': 'LinkedBlockingDeque', + '4': 'SynchronousQueue', + '5': 'LinkedTransferQueue', + '6': 'PriorityBlockingQueue', + '9': 'ResizableLinkedBlockingQueue', +}; + +export const REJECT_TYPE_MAP: { [key: string]: string } = { + '1': 'CallerRunsPolicy', + '2': 'AbortPolicy', + '3': 'DiscardPolicy', + '4': 'DiscardOldestPolicy', + '5': 'RunsOldestTaskPolicy', + '6': 'SyncPutQueuePolicy', +}; + +export const paramsType = { project: 0, thpool: 0 }; +export const eBtnStyle = { + padding: '0 6px', +}; diff --git a/threadpool/console-new/src/page/thread-pool/index.tsx b/threadpool/console-new/src/page/thread-pool/index.tsx index ed2dc227..4072244f 100644 --- a/threadpool/console-new/src/page/thread-pool/index.tsx +++ b/threadpool/console-new/src/page/thread-pool/index.tsx @@ -1,73 +1,162 @@ -import { Button, Form, Select, Space, Table, Typography } from 'antd'; +import { Button, Form, Select, Space, Switch, Table, Typography, message } from 'antd'; import { useFormStateToUrl, useTran } from '@/hooks'; import { STR_MAP } from '@/config/i18n/locales/constants'; import { ColumnProps } from 'antd/es/table'; +import { SearchButton, AddButton } from '@/components/with-button'; +import { useAntdTable } from 'ahooks'; +import service from './service'; +import { Result, Record } from './type'; +import { QUEUE_TYPE_MAP, REJECT_TYPE_MAP, eBtnStyle, paramsType } from './constants'; +import { useTranslation } from 'react-i18next'; +import request from '@/utils'; const { Title } = Typography; const { Item } = Form; -const params = { project: 0, thpool: 0 }; +interface CustomTableParams { + pageSize: number; + current: number; + tpId: string; + itemId: string; +} + const ThreadPoll = () => { const [form] = Form.useForm(); - const { handleSetUrlState } = useFormStateToUrl<{ project: number; thpool: number }>(form, params); - const columns: ColumnProps[] = [ + const { handleSetUrlState } = useFormStateToUrl<{ project: number; thpool: number }>(form, paramsType); + const { t } = useTranslation(); + + const columns: ColumnProps[] = [ { title: useTran(STR_MAP.SERIAL_NUMBER), - dataIndex: 'order', + dataIndex: '', + render: (col, num, index) => { + return index + 1; + }, + fixed: 'left', + width: 80, }, { title: useTran(STR_MAP.PROJECT), - dataIndex: 'project', + dataIndex: 'tenantId', + width: 150, }, { - title: useTran(STR_MAP.TENANTRY), - dataIndex: 'tenantry', + title: useTran(STR_MAP.THREAD_POOL), + dataIndex: 'tpId', + width: 150, }, { - title: useTran(STR_MAP.THREAD_POOL), - dataIndex: 'thread_pool', + title: useTran(STR_MAP.CORE_THREAD), + dataIndex: 'coreSize', + render: col => {col}, + width: 100, }, { title: useTran(STR_MAP.MAXIMUM_THREAD), - dataIndex: 'maximum_thread', + dataIndex: 'maxSize', + render: col => {col}, + width: 100, }, { title: useTran(STR_MAP.QUEUE_TYPE), - dataIndex: 'queue_type', + dataIndex: 'queueType', + render: (col: number) => QUEUE_TYPE_MAP[String(col)], + width: 150, + }, + { + title: useTran(STR_MAP.QUEUE_CAPACITY), + dataIndex: 'capacity', + width: 150, }, { title: useTran(STR_MAP.REJECTION_STRATEGY), - dataIndex: 'tenantry', + dataIndex: 'rejectedType', + render: (col: number) => REJECT_TYPE_MAP[String(col)] ?? 'CustomRejectedPolicy_' + col, + width: 150, }, { title: useTran(STR_MAP.EXECUTION_TIMEOUT), - dataIndex: 'tenantry', + dataIndex: 'executeTimeOut', + render: (col: number) => col ?? 0, + width: 100, }, { title: useTran(STR_MAP.ALARM_OR_NOT), - dataIndex: 'tenantry', + dataIndex: 'isAlarm', + render: (col: number, row) => ( + handleAlarm({ id: row?.id, alarm: Number(!col) })} /> + ), + width: 100, }, { title: useTran(STR_MAP.CREATION_TIME), - dataIndex: 'tenantry', + dataIndex: 'gmtCreate', + width: 150, + align: 'center', }, { title: useTran(STR_MAP.UPDATE_TIME), - dataIndex: 'tenantry', + dataIndex: 'gmtModified', + width: 150, + align: 'center', }, { title: useTran(STR_MAP.EDIT), - dataIndex: 'tenantry', + dataIndex: 'eidt', + fixed: 'right', + width: 150, + render: () => ( + <> + + + + ), }, ]; - const handleSubmit = () => { - handleSetUrlState(); + const getTableData = (params: CustomTableParams): Promise => { + const { pageSize, current } = params; + return service.fetchThreadPoolTable({ + current, + size: pageSize, + tpId: '', + itemId: '', + }); + }; + + const { tableProps, search } = useAntdTable(getTableData, { + defaultPageSize: 5, + form: form, + }); + + const { submit } = search; + + const handleAlarm = async (params: { id: string; alarm: number }) => { + const { id, alarm } = params; + request(`/hippo4j/v1/cs/thread/pool/alarm/enable/${id}/${alarm}`, { + method: 'post', + }) + .then(res => { + if (res.success) { + message.success(t(STR_MAP.ALARM_EDITING_SUCCESS)); + submit(); + } + }) + .catch(err => { + console.log('err:::', err); + }); }; return ( - - {useTran(STR_MAP.THREAD_POOL)} + + {useTran(STR_MAP.THREAD_POOL_MANAGE)}
+ + + @@ -76,14 +165,21 @@ const ThreadPoll = () => { - - + + {useTran(STR_MAP.ADD)} -
+
); }; diff --git a/threadpool/console-new/src/page/thread-pool/service.ts b/threadpool/console-new/src/page/thread-pool/service.ts new file mode 100644 index 00000000..c1fd99c4 --- /dev/null +++ b/threadpool/console-new/src/page/thread-pool/service.ts @@ -0,0 +1,17 @@ +import request from '@/utils'; +import { Result, ThreadPoolTableBody, ThreadPoolTableRes } from './type'; + +const fetchThreadPoolTable = async (body: ThreadPoolTableBody): Promise => { + const { data } = await request('/hippo4j/v1/cs/thread/pool/query/page', { + method: 'POST', + body, + }); + return { + total: data?.total, + list: data?.records, + }; +}; + +export default { + fetchThreadPoolTable, +}; diff --git a/threadpool/console-new/src/page/thread-pool/type.ts b/threadpool/console-new/src/page/thread-pool/type.ts new file mode 100644 index 00000000..2be9b23b --- /dev/null +++ b/threadpool/console-new/src/page/thread-pool/type.ts @@ -0,0 +1,123 @@ +import { Params } from 'ahooks/lib/useAntdTable/types'; + +// body +export interface ThreadPoolTableBody { + /** + * current page + */ + current: number; + /** + * project id + */ + itemId?: string; + /** + * page size + */ + size: number; + /** + *tenant Id + */ + tenantId?: string; + /** + * thread pool ID + */ + tpId?: string; +} + +export interface Record { + /** + * 是否超时 + */ + allowCoreThreadTimeOut?: number; + /** + * 队列容量 + */ + capacity?: number; + /** + * 容量报警 + */ + capacityAlarm?: number; + /** + * 核心线程数 + */ + coreSize?: number; + /** + * 执行超市 + */ + executeTimeOut?: number; + /** + * 创建时间 + */ + gmtCreate?: string; + /** + * 修改时间 + */ + gmtModified?: string; + /** + * ID + */ + id: string; + /** + * 是否报警 + */ + isAlarm?: number; + /** + * 项目ID + */ + itemId?: string; + /** + * 空闲回收 + */ + keepAliveTime?: number; + /** + * 活跃度报警 + */ + livenessAlarm?: number; + /** + * 最大线程数 + */ + maxSize?: number; + /** + * 队列名称 + */ + queueName?: null; + /** + * 队列类型 + */ + queueType?: number; + /** + * 拒绝策略类型 + */ + rejectedType?: number; + /** + * 租户ID + */ + tenantId?: string; + /** + * 线程池ID + */ + tpId?: string; +} + +export interface ThreadPoolTableRes { + countId: null; + current: number; + desc: boolean; + hitCount: boolean; + itemId: string; + maxLimit: null; + optimizeCountSql: boolean; + orders: string[]; + pages: number; + records: Record[]; + searchCount: boolean; + size: number; + tenantId: string; + total: number; + tpId: string; +} + +export interface Result { + total: number; + list: Record[]; +} diff --git a/threadpool/console-new/src/page/user/index.tsx b/threadpool/console-new/src/page/user/index.tsx index 1849015b..78cdbb95 100644 --- a/threadpool/console-new/src/page/user/index.tsx +++ b/threadpool/console-new/src/page/user/index.tsx @@ -109,7 +109,6 @@ const Tenant: React.FC = () => { = { success: boolean; - data?: T; + data: T; module?: T; msg?: string; status?: number; @@ -41,6 +41,7 @@ const inital: RequestOptions = { headers: { 'Content-Type': 'application/json', }, + // headers, credentials: true, responseType: 'JSON', cache: 'no-cache', @@ -89,6 +90,7 @@ function request(url: string, config: RequestOptions): Promise> { } else { config.headers = { Authorization: getToken(), 'Content-Type': 'application/json' }; } + let { method, params, body, headers, credentials, responseType } = Object.assign({}, inital, config) as any; if (typeof url !== 'string') throw new TypeError('url is not an string'); if (!/^http(s?):\/\//i.test(url)) url = baseURL + url; diff --git a/threadpool/console-new/yarn.lock b/threadpool/console-new/yarn.lock index 9bebc0fc..c6cc6cbc 100644 --- a/threadpool/console-new/yarn.lock +++ b/threadpool/console-new/yarn.lock @@ -41,7 +41,7 @@ dependencies: "@ctrl/tinycolor" "^3.4.0" -"@ant-design/cssinjs@^1.16.0": +"@ant-design/cssinjs@^1.16.0", "@ant-design/cssinjs@^1.16.1": version "1.17.0" resolved "https://registry.npmmirror.com/@ant-design/cssinjs/-/cssinjs-1.17.0.tgz#a3f69cf5131539b76ccdbfced43d242557599fea" integrity sha512-MgGCZ6sfD3yQB0XW0hN4jgixMxApTlDYyct+pc7fRZNO4CaqWWm/9iXkkljNR27lyWLZmm+XiDfcIOo1bnrnMA== @@ -54,6 +54,18 @@ rc-util "^5.35.0" stylis "^4.0.13" +"@ant-design/happy-work-theme@^1.0.0": + version "1.0.0" + resolved "https://registry.npmmirror.com/@ant-design/happy-work-theme/-/happy-work-theme-1.0.0.tgz#b18e2d2cb37df496def5c5773c146885c6cac87c" + integrity sha512-BKuz5PZkGZwXqzDwTE9fiHYlpKdDyoGnApEih2MG1GF79/a/YekxBc4tdqocykDtWzt3z1wwmHv8AiB7EUTWsQ== + dependencies: + "@ant-design/cssinjs" "^1.16.1" + "@babel/runtime" "^7.18.3" + "@ctrl/tinycolor" "^3.6.0" + classnames "^2.3.2" + rc-motion "^2.7.3" + rc-util "^5.33.0" + "@ant-design/icons-svg@^4.3.0": version "4.3.1" resolved "https://registry.npmmirror.com/@ant-design/icons-svg/-/icons-svg-4.3.1.tgz#4b2f65a17d4d32b526baa6414aca2117382bf8da" @@ -4468,6 +4480,22 @@ eastasianwidth@^0.2.0: resolved "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +echarts-for-react@^3.0.2: + version "3.0.2" + resolved "https://registry.npmmirror.com/echarts-for-react/-/echarts-for-react-3.0.2.tgz#ac5859157048a1066d4553e34b328abb24f2b7c1" + integrity sha512-DRwIiTzx8JfwPOVgGttDytBqdp5VzCSyMRIxubgU/g2n9y3VLUmF2FK7Icmg/sNVkv4+rktmrLN9w22U2yy3fA== + dependencies: + fast-deep-equal "^3.1.3" + size-sensor "^1.0.1" + +echarts@^5.4.3: + version "5.4.3" + resolved "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz#f5522ef24419164903eedcfd2b506c6fc91fb20c" + integrity sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA== + dependencies: + tslib "2.3.0" + zrender "5.4.4" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -8733,7 +8761,7 @@ rc-menu@~9.12.0: rc-overflow "^1.3.1" rc-util "^5.27.0" -rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.0, rc-motion@^2.6.1, rc-motion@^2.6.2, rc-motion@^2.9.0: +rc-motion@^2.0.0, rc-motion@^2.0.1, rc-motion@^2.3.0, rc-motion@^2.3.4, rc-motion@^2.4.3, rc-motion@^2.4.4, rc-motion@^2.6.0, rc-motion@^2.6.1, rc-motion@^2.6.2, rc-motion@^2.7.3, rc-motion@^2.9.0: version "2.9.0" resolved "https://registry.npmmirror.com/rc-motion/-/rc-motion-2.9.0.tgz#9e18a1b8d61e528a97369cf9a7601e9b29205710" integrity sha512-XIU2+xLkdIr1/h6ohPZXyPBMvOmuyFZQ/T0xnawz+Rh+gh4FINcnZmMT5UTIj6hgI0VLDjTaPeRd+smJeSPqiQ== @@ -9647,6 +9675,11 @@ sisteransi@^1.0.5: resolved "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +size-sensor@^1.0.1: + version "1.0.2" + resolved "https://registry.npmmirror.com/size-sensor/-/size-sensor-1.0.2.tgz#b8f8da029683cf2b4e22f12bf8b8f0a1145e8471" + integrity sha512-2NCmWxY7A9pYKGXNBfteo4hy14gWu47rg5692peVMst6lQLPKrVjhY+UTEsPI5ceFRJSl3gVgMYaUi/hKuaiKw== + slash@^2.0.0: version "2.0.0" resolved "https://registry.npmmirror.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" @@ -10318,6 +10351,11 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@2.3.0: + version "2.3.0" + resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== + tslib@^1.8.1: version "1.14.1" resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -11152,3 +11190,10 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zrender@5.4.4: + version "5.4.4" + resolved "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz#8854f1d95ecc82cf8912f5a11f86657cb8c9e261" + integrity sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw== + dependencies: + tslib "2.3.0" diff --git a/threadpool/console/src/views/hippo4j/instance/index.vue b/threadpool/console/src/views/hippo4j/instance/index.vue index 3d95ddaa..76c6756b 100755 --- a/threadpool/console/src/views/hippo4j/instance/index.vue +++ b/threadpool/console/src/views/hippo4j/instance/index.vue @@ -81,7 +81,6 @@ -