Browse Source

(*)脚本提交

master
peng.peng 1 year ago
parent
commit
6ef9ab108f
  1. 2
      api/app/lib/controllers/metadataAcquisition/adapter.js
  2. 18
      scripts/0.0.7/05_alter_backups.sql
  3. 3
      web/client/src/sections/backups/components/backupsModal.js
  4. 2
      web/client/src/sections/backups/containers/backupTask.js

2
api/app/lib/controllers/metadataAcquisition/adapter.js

@ -1,6 +1,6 @@
'use strict';
const { Pool } = require('pg');
// 新增模型
// 测试数据库连接
function checkConnect(opts) {
return async function (ctx, next) {

18
scripts/0.0.7/05_alter_backups.sql

@ -0,0 +1,18 @@
comment on column backups.databases is '备份数据源地址';
alter table backups
add restore_databases jsonb;
alter table backups
add restore_start timestamp with time zone;
comment on column backups.restore_start is '备份开始时间';
alter table backups
add restore_end timestamp with time zone;
comment on column backups.restore_end is '备份结束时间';

3
web/client/src/sections/backups/components/backupsModal.js

@ -33,7 +33,8 @@ export default (props) => {
onCancel: () => { },
}}
onFinish={async (values) => {
values.databases = dataSources?.rows?.find(s => s.id == values?.databases?.value)?.config;
let database = dataSources?.rows?.find(s => s.id == values?.databases?.value)
values.databases = { displayName: database?.name, ...database?.config };
values.createTime = moment();
values.state = '备份中';
values.title = title;

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

@ -58,7 +58,7 @@ function Member(props) {
dataIndex: 'database',
fixed: 'left',
width: '7%',
render: (text, record) => record?.databases?.database
render: (text, record) => record?.databases?.displayName
},
{
title: '备份信息',

Loading…
Cancel
Save