chore: playground hotkey

This commit is contained in:
jialin
2024-06-25 17:09:47 +08:00
parent a7ea167298
commit ad9775db69
13 changed files with 122 additions and 37 deletions
+8 -7
View File
@@ -8,7 +8,7 @@ import { useIntl } from '@umijs/max';
import { Button, Input, Space, Table } from 'antd';
import _ from 'lodash';
import { useEffect, useState } from 'react';
import { queryNodesList } from '../apis';
import { queryWorkersList } from '../apis';
import { ListItem } from '../config/types';
const { Column } = Table;
@@ -33,8 +33,8 @@ const Models: React.FC = () => {
const params = {
..._.pickBy(queryParams, (val: any) => !!val)
};
const res = await queryNodesList(params);
console.log('res=======', res);
const res = await queryWorkersList(params);
setDataSource(res.items);
setTotal(res.pagination.total);
} catch (error) {
@@ -131,15 +131,16 @@ const Models: React.FC = () => {
return (
<StatusTag
statusValue={{
status:
record.status?.state === 'active' ? 'success' : 'error',
text: record.status?.state
status: ['Inactive', 'unknown'].includes(record.state)
? 'inactive'
: 'success',
text: record.state
}}
></StatusTag>
);
}}
/>
<Column title="IP" dataIndex="address" key="address" />
<Column title="IP" dataIndex="ip" key="address" />
<Column
title="CPU"
dataIndex="CPU"