Browse Source

增加接口元数据增删改action

master
zmh 2 years ago
parent
commit
2efc9a6a18
  1. 37
      web/client/src/sections/metadataManagement/actions/metadata.js
  2. 4
      web/client/src/utils/webapi.js

37
web/client/src/sections/metadataManagement/actions/metadata.js

@ -231,3 +231,40 @@ export function delMetadataFiles(id) {
} }
}); });
} }
export function postMetadataRestapis(data) {
return dispatch => basicAction({
type: 'post',
data: data,
dispatch: dispatch,
actionType: 'POST_METADATA_RESTAPIS',
url: ApiTable.postMetadataRestapis,
msg: { option: '新建元数据' },
reducer: {}
});
}
export function putMetadataRestapis(id, data) {
return dispatch => basicAction({
type: 'put',
data: data,
dispatch,
actionType: 'PUT_METADATA_RESTAPIS',
url: ApiTable.putMetadataRestapis.replace('{id}', id),
msg: {
option: '修改元数据',
}
});
}
export function delMetadataRestapis(id) {
return dispatch => basicAction({
type: 'del',
dispatch,
actionType: 'DELETE_METADATA_RESTAPIS',
url: ApiTable.delMetadataRestapis.replace('{id}', id),
msg: {
option: '删除元数据',
}
});
}

4
web/client/src/utils/webapi.js

@ -40,6 +40,10 @@ export const ApiTable = {
postMetadataFiles: 'metadata/files', postMetadataFiles: 'metadata/files',
putMetadataFiles: 'metadata/files/{id}', putMetadataFiles: 'metadata/files/{id}',
delMetadataFiles: 'metadata/files/{id}', delMetadataFiles: 'metadata/files/{id}',
//接口元数据增删改
postMetadataRestapis: 'metadata/restapis',
putMetadataRestapis: 'metadata/restapis/{id}',
delMetadataRestapis: 'metadata/restapis/{id}',
//元数据采集-数据源管理 //元数据采集-数据源管理
pgCheckConnect: 'adapter/check/connect', pgCheckConnect: 'adapter/check/connect',

Loading…
Cancel
Save