mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
升级antd
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@
|
||||
"@umijs/max": "^4.0.21",
|
||||
"@umijs/ssr-darkreader": "^4.9.45",
|
||||
"ansi-to-react": "^6.1.6",
|
||||
"antd": "^4.20.5",
|
||||
"antd": "^4.23.0",
|
||||
"antd-img-crop": "^4.2.3",
|
||||
"codemirror": "^5.65.2",
|
||||
"compression-webpack-plugin": "9.2.0",
|
||||
|
||||
+24
-13
@@ -201,10 +201,10 @@ const Crontab = () => {
|
||||
>
|
||||
{record.last_execution_time
|
||||
? new Date(record.last_execution_time * 1000)
|
||||
.toLocaleString(language, {
|
||||
hour12: false,
|
||||
})
|
||||
.replace(' 24:', ' 00:')
|
||||
.toLocaleString(language, {
|
||||
hour12: false,
|
||||
})
|
||||
.replace(' 24:', ' 00:')
|
||||
: '-'}
|
||||
</span>
|
||||
);
|
||||
@@ -413,11 +413,10 @@ const Crontab = () => {
|
||||
const getCrons = () => {
|
||||
setLoading(true);
|
||||
const { page, size, sorter, filters } = pageConf;
|
||||
let url = `${
|
||||
config.apiPrefix
|
||||
}crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify(
|
||||
filters,
|
||||
)}`;
|
||||
let url = `${config.apiPrefix
|
||||
}crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify(
|
||||
filters,
|
||||
)}`;
|
||||
if (sorter && sorter.field) {
|
||||
url += `&sorter=${JSON.stringify({
|
||||
field: sorter.field,
|
||||
@@ -586,8 +585,7 @@ const Crontab = () => {
|
||||
onOk() {
|
||||
request
|
||||
.put(
|
||||
`${config.apiPrefix}crons/${
|
||||
record.isDisabled === 1 ? 'enable' : 'disable'
|
||||
`${config.apiPrefix}crons/${record.isDisabled === 1 ? 'enable' : 'disable'
|
||||
}`,
|
||||
{
|
||||
data: [record.id],
|
||||
@@ -632,8 +630,7 @@ const Crontab = () => {
|
||||
onOk() {
|
||||
request
|
||||
.put(
|
||||
`${config.apiPrefix}crons/${
|
||||
record.isPinned === 1 ? 'unpin' : 'pin'
|
||||
`${config.apiPrefix}crons/${record.isPinned === 1 ? 'unpin' : 'pin'
|
||||
}`,
|
||||
{
|
||||
data: [record.id],
|
||||
@@ -1087,6 +1084,20 @@ const Crontab = () => {
|
||||
</Dropdown>
|
||||
}
|
||||
onTabClick={tabClick}
|
||||
items={[
|
||||
{
|
||||
key: 'all',
|
||||
label: '全部任务',
|
||||
children: panelContent,
|
||||
},
|
||||
...[...enabledCronViews].slice(0, 2).map((x) => (
|
||||
{
|
||||
key: x.id,
|
||||
label: x.name,
|
||||
children: panelContent
|
||||
}
|
||||
)),
|
||||
]}
|
||||
>
|
||||
<Tabs.TabPane tab="全部任务" key="all">
|
||||
{panelContent}
|
||||
|
||||
Reference in New Issue
Block a user