Browse Source

(*)备份恢复下载调整

master
peng.peng 2 years ago
parent
commit
070056a8fb
  1. 4
      web/client/assets/files/backups/iota20220523--20230625-080107.dump
  2. 2
      web/client/index.html
  3. 5
      web/client/src/sections/backups/containers/backupTask.js
  4. 31
      web/client/src/sections/homePage/components/abnormalMonitoring.js
  5. 12
      web/client/src/sections/homePage/components/alarmList.js
  6. 3
      web/client/src/sections/homePage/containers/homePage.js

4
web/client/assets/files/backups/iota20220523--20230625-080107.dump

@ -0,0 +1,4 @@
alter table t_resource_consumption
add resource_id int;
comment on column t_resource_consumption.resource_id is '元数据id';

2
web/client/index.html

@ -14,7 +14,7 @@
}
</style>
<body>
<body style="background: #0F1C2A;">
<div id='App'></div>
<script type="text/javascript" src="http://localhost:5401/client/build/vendor.js"></script>
<script type="text/javascript" src="http://localhost:5401/client/build/app.js"></script>

5
web/client/src/sections/backups/containers/backupTask.js

@ -91,7 +91,10 @@ function Member(props) {
/> : <a style={{ color: 'gray' }}></a>)
options.push(
record?.source ?
<a a onClick={() => { window.open(record?.source) }}> 下载</a> : <a style={{ color: 'gray' }}></a>
<a a onClick={() => {
const url = '/assets/files/backups/' + record?.source.replace('/app/dbFiles/', '')
window.open(url)
}}>下载</a> : <a style={{ color: 'gray' }}></a>
)
if (record?.state != '备份中' && record?.state != '恢复中') {

31
web/client/src/sections/homePage/components/abnormalMonitoring.js

@ -1,14 +1,39 @@
import React, { useEffect, useState } from 'react'
import CarouselList from './public/carousel-list';
import { Tooltip } from 'antd';
import { ApiTable, useFsRequest } from '$utils';
import moment from 'moment';
function AbnormalMonitoring(props) {
const { data: logs = {} } = useFsRequest({
url: ApiTable.getLogs,
query: {
logState: false
},
// pollingInterval: 10000
});
const dataSource = logs?.rows ? logs?.rows?.map(s => {
return [
<div style={{ color: '#fff' }}>
<Tooltip placement="top" title={s?.acquisitionTask?.taskName}>
{s?.acquisitionTask?.taskName?.length > 20 ? s?.acquisitionTask?.taskNamesubstring(0, 20) + '...' : s?.acquisitionTask?.taskName}
</Tooltip>
</div>,
moment(s?.startTime).format('YYYY-MM-DD HH:mm:ss'),
moment(s?.endTime).valueOf() - moment(s?.startTime).valueOf() + '毫秒',
<div style={{ color: 'rgba(245, 27, 27, 1)' }}>
<Tooltip placement="top" title={s?.details}>
{s?.details?.length > 20 ? s?.details.substring(0, 20) + '...' : s?.details}
</Tooltip>
</div>
]
}) : []
return <div style={{ height: 149, border: '1px solid #50c9d74d', backgroundImage: 'linear-gradient(180deg, rgba(0, 32, 74, 0) 3%, rgba(80, 201, 247, 0.1) 100%)' }}>
<div className='center-card-title' style={{ marginBottom: 6 }}><div className='_icon_left' />异常监控<div className='_icon_right' /></div>
<CarouselList
header={['任务名称', '上次运行时间', '下次运行时间', '异常日志']}
data={[[<div style={{ color: '#fff' }}>任务名称1</div>, 2, 3, 4], [2, 2, 3, 4], [3, 2, 3, 4], [4, 2, 3, 4], [5, 2, 3, 4]]}
header={['任务名称', '采集时间', '耗时', '异常日志']}
data={dataSource}
rowNum={2}
height={100}
multiellipsis

12
web/client/src/sections/homePage/components/alarmList.js

@ -1,10 +1,18 @@
import React, { useEffect, useState } from 'react'
import TableCard from './public/table-card';
import CarouselList from './public/carousel-list';
function AlarmList(props) {
const { cardHeight } = props;
const renderBody = () => {
return '预警列表'
return <CarouselList
header={['任务名称', '采集时间', '耗时', '异常日志']}
data={[['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志'], ['任务名称', '采集时间', '耗时', '异常日志']]}
rowNum={6}
height={cardHeight - 42 - 13}
multiellipsis
// columnWidth={[200, 170, 120, 120]}
/>
}
return <TableCard

3
web/client/src/sections/homePage/containers/homePage.js

@ -13,6 +13,7 @@ import './style.less'
function homePage(props) {
const { dispatch } = props;
const childStyle = { height: '32%', color: '#fff', marginBottom: 17 }
const cardHeight = document.body.clientHeight * 0.32
return <div className='homepage'>
<div className='_title'>
<div onClick={() => { dispatch(push('/metadataManagement/latestMetadata')) }} className='_exit' ><div className='_icon' />进入后台</div>
@ -26,7 +27,7 @@ function homePage(props) {
<NodeResource />
</div>
<div className='child' style={childStyle}>
<AlarmList />
<AlarmList cardHeight={cardHeight} />
</div>
</div>
</div>

Loading…
Cancel
Save