You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.1 KiB
149 lines
4.1 KiB
'use strict';
|
|
|
|
import { basicAction } from '@peace/utils'
|
|
import { ApiTable } from '$utils'
|
|
|
|
export function getResourceCatalog(params) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: params,
|
|
actionType: 'GET_RESOURCE_CATALOG',
|
|
url: ApiTable.getResourceCatalog,
|
|
msg: { error: '获取资源目录失败' },
|
|
reducer: { name: 'resourceCatalog' }
|
|
});
|
|
}
|
|
|
|
export function postResourceCatalog(data) {
|
|
return dispatch => basicAction({
|
|
type: 'post',
|
|
data: data,
|
|
dispatch: dispatch,
|
|
actionType: 'POST_RESOURCE_CATALOG',
|
|
url: ApiTable.postResourceCatalog,
|
|
msg: { option: '新建资源目录' },
|
|
reducer: {}
|
|
});
|
|
}
|
|
|
|
export function putResourceCatalog(id, data) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
data: data,
|
|
dispatch,
|
|
actionType: 'PUT_RESOURCE_CATALOG',
|
|
url: ApiTable.putResourceCatalog.replace('{id}', id),
|
|
msg: {
|
|
option: '修改资源目录',
|
|
}
|
|
});
|
|
}
|
|
|
|
export function delResourceCatalog(id) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch,
|
|
actionType: 'DELETE_RESOURCE_CATALOG',
|
|
url: ApiTable.delResourceCatalog.replace('{id}', id),
|
|
msg: {
|
|
option: '删除资源目录',
|
|
}
|
|
});
|
|
}
|
|
|
|
export function getMetadataDatabases(params) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: params,
|
|
actionType: 'GET_METADATA_DATABASES_LIST',
|
|
url: ApiTable.getMetadataDatabases,
|
|
msg: { error: '获取库表元数据列表失败' },
|
|
reducer: { name: 'metadataDatabases' }
|
|
});
|
|
}
|
|
|
|
export function getMetadataFiles(params) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: params,
|
|
actionType: 'GET_METADATA_FILES_LIST',
|
|
url: ApiTable.getMetadataFiles,
|
|
msg: { error: '获取文件元数据列表失败' },
|
|
reducer: { name: 'metadataFiles' }
|
|
});
|
|
}
|
|
|
|
export function getMetadataRestapis(params) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: params,
|
|
actionType: 'GET_METADATA_RESTAPIS_LIST',
|
|
url: ApiTable.getMetadataRestapis,
|
|
msg: { error: '获取接口元数据列表失败' },
|
|
reducer: { name: 'metadataRestapis' }
|
|
});
|
|
}
|
|
|
|
export function getMetadataModels(params) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
query: params,
|
|
actionType: 'GET_METADATA_MODELS_LIST',
|
|
url: ApiTable.getMetadataModels,
|
|
msg: { error: '获取元数据模型失败' },
|
|
reducer: { name: 'metadataModels' }
|
|
});
|
|
}
|
|
|
|
export function postMeatadataDatabases(data) {
|
|
return dispatch => basicAction({
|
|
type: 'post',
|
|
data: data,
|
|
dispatch: dispatch,
|
|
actionType: 'POST_METADATA_DATABASES',
|
|
url: ApiTable.postMeatadataDatabases,
|
|
msg: { option: '新建元数据' },
|
|
reducer: {}
|
|
});
|
|
}
|
|
|
|
export function putMeatadataDatabases(id, data) {
|
|
return dispatch => basicAction({
|
|
type: 'put',
|
|
data: data,
|
|
dispatch,
|
|
actionType: 'PUT_METADATA_DATABASES',
|
|
url: ApiTable.putMeatadataDatabases.replace('{id}', id),
|
|
msg: {
|
|
option: '修改元数据',
|
|
}
|
|
});
|
|
}
|
|
|
|
export function delMeatadataDatabases(id) {
|
|
return dispatch => basicAction({
|
|
type: 'del',
|
|
dispatch,
|
|
actionType: 'DELETE_METADATA_DATABASES',
|
|
url: ApiTable.delMeatadataDatabases.replace('{id}', id),
|
|
msg: {
|
|
option: '删除元数据',
|
|
}
|
|
});
|
|
}
|
|
|
|
export function getMetadataDatabasesById(id) {
|
|
return dispatch => basicAction({
|
|
type: 'get',
|
|
dispatch: dispatch,
|
|
actionType: 'GET_METADATA_DATABASES_Info',
|
|
url: ApiTable.getMetadataDatabasesById.replace('{id}', id),
|
|
msg: { error: '获取元数据基本信息失败' },
|
|
reducer: { name: 'metadataDatabasesInfo' }
|
|
});
|
|
}
|