提交 dd6dad7d authored 作者: vipcxj's avatar vipcxj

add: 新增获取服务端数据源动态meta的接口

上级 3cd363ec
...@@ -2449,9 +2449,9 @@ ...@@ -2449,9 +2449,9 @@
} }
}, },
"@babel/register": { "@babel/register": {
"version": "7.0.0-beta.42", "version": "7.0.0-beta.44",
"resolved": "https://registry.npmjs.org/@babel/register/-/register-7.0.0-beta.42.tgz", "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.0.0-beta.44.tgz",
"integrity": "sha512-15mi2lyyMDZ2reaZgEnQI9oM7shEMohjH8L/rMLdLtbgIYNtK5STK6ECLPCy3V6VWURGCSCOZCc0YFtl+OQTfg==", "integrity": "sha512-7DlnSyWKnBE+MS+mFPsp5T+2+vz9d5GUDwIJtyCdKGeYkme6uakFVH7qpp4eMpYc47wTANoVbCEDugRQXUeTzg==",
"dev": true, "dev": true,
"requires": { "requires": {
"core-js": "2.5.3", "core-js": "2.5.3",
...@@ -2530,12 +2530,13 @@ ...@@ -2530,12 +2530,13 @@
"dev": true "dev": true
}, },
"@storybook/addon-actions": { "@storybook/addon-actions": {
"version": "3.4.1", "version": "4.0.0-alpha.2",
"resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-3.4.1.tgz", "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-4.0.0-alpha.2.tgz",
"integrity": "sha512-mCpEbzex7WYkyIHn9QUnIz83IwMO9Zi4D2LC6c/0u42HzQdkmTJWnyEg4NY5Az/1WZZTtwe9aep/pLc+Zzokdw==", "integrity": "sha512-DwIQJHNBTXIGnQTCu9FXhwBAjcdF5DpDF7A/V0GP2bMVPgXDwjUXrCFD+akIsj8LYeNM+2w5vvmBS5KSX/wBKA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/components": "3.4.1", "@storybook/addons": "4.0.0-alpha.2",
"@storybook/components": "4.0.0-alpha.2",
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
"deep-equal": "1.0.1", "deep-equal": "1.0.1",
"glamor": "2.20.40", "glamor": "2.20.40",
...@@ -2545,19 +2546,6 @@ ...@@ -2545,19 +2546,6 @@
"prop-types": "15.6.1", "prop-types": "15.6.1",
"react-inspector": "2.3.0", "react-inspector": "2.3.0",
"uuid": "3.2.1" "uuid": "3.2.1"
},
"dependencies": {
"@storybook/components": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@storybook/components/-/components-3.4.1.tgz",
"integrity": "sha512-STu4EkkUWZgMb/Cbpdf3YUKcQVTqIpg+kEP9zG7519/Eg0OuBgRZ4qRr5jiDbLQMsaGS8oxwjhCoHufG903oZw==",
"dev": true,
"requires": {
"glamor": "2.20.40",
"glamorous": "4.12.2",
"prop-types": "15.6.1"
}
}
} }
}, },
"@storybook/addon-info": { "@storybook/addon-info": {
...@@ -2581,28 +2569,16 @@ ...@@ -2581,28 +2569,16 @@
} }
}, },
"@storybook/addon-links": { "@storybook/addon-links": {
"version": "3.4.1", "version": "4.0.0-alpha.2",
"resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-3.4.1.tgz", "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-4.0.0-alpha.2.tgz",
"integrity": "sha512-yOVStezQO/VTTlxoqDdVu6CCI2kHBNdLD6lY9w1ly20b6J4hg2Cgy/d/VyPUKfM3fTkdAHeBFayg41KmR9lrMQ==", "integrity": "sha512-BZFYkHjXfi7bUELJvxCnJpfRVlk90kjez8jT4YwpvF9kdVIBLjAPfdXy2pUveCooKYdBhmU9uy8w3suXz4G8yg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@storybook/components": "3.4.1", "@storybook/addons": "4.0.0-alpha.2",
"@storybook/components": "4.0.0-alpha.2",
"babel-runtime": "6.26.0", "babel-runtime": "6.26.0",
"global": "4.3.2", "global": "4.3.2",
"prop-types": "15.6.1" "prop-types": "15.6.1"
},
"dependencies": {
"@storybook/components": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@storybook/components/-/components-3.4.1.tgz",
"integrity": "sha512-STu4EkkUWZgMb/Cbpdf3YUKcQVTqIpg+kEP9zG7519/Eg0OuBgRZ4qRr5jiDbLQMsaGS8oxwjhCoHufG903oZw==",
"dev": true,
"requires": {
"glamor": "2.20.40",
"glamorous": "4.12.2",
"prop-types": "15.6.1"
}
}
} }
}, },
"@storybook/addons": { "@storybook/addons": {
...@@ -11598,12 +11574,6 @@ ...@@ -11598,12 +11574,6 @@
"json5": "0.5.1", "json5": "0.5.1",
"object-assign": "4.1.1" "object-assign": "4.1.1"
} }
},
"tapable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz",
"integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==",
"dev": true
} }
} }
}, },
...@@ -18507,9 +18477,9 @@ ...@@ -18507,9 +18477,9 @@
} }
}, },
"react": { "react": {
"version": "16.2.0", "version": "16.3.1",
"resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", "resolved": "https://registry.npmjs.org/react/-/react-16.3.1.tgz",
"integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", "integrity": "sha512-NbkxN9jsZ6+G+ICsLdC7/wUD26uNbvKU/RAxEWgc9kcdKvROt+5d5j2cNQm5PSFTQ4WNGsR3pa4qL2Q0/WSy1w==",
"requires": { "requires": {
"fbjs": "0.8.16", "fbjs": "0.8.16",
"loose-envify": "1.3.1", "loose-envify": "1.3.1",
...@@ -18646,9 +18616,9 @@ ...@@ -18646,9 +18616,9 @@
} }
}, },
"react-dom": { "react-dom": {
"version": "16.2.0", "version": "16.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.3.1.tgz",
"integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", "integrity": "sha512-2Infg89vzahq8nfVi1GkjPqq0vrBvf0f3T0+dTtyjq4f6HKOqKixAK25Vr593O3QTx4kw/vmUtAJwerlevNWOA==",
"requires": { "requires": {
"fbjs": "0.8.16", "fbjs": "0.8.16",
"loose-envify": "1.3.1", "loose-envify": "1.3.1",
...@@ -20955,6 +20925,12 @@ ...@@ -20955,6 +20925,12 @@
} }
} }
}, },
"tapable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz",
"integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==",
"dev": true
},
"temp": { "temp": {
"version": "0.8.3", "version": "0.8.3",
"resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
...@@ -21515,19 +21491,6 @@ ...@@ -21515,19 +21491,6 @@
"integrity": "sha1-Antp+oIyJeVRys4+8DsR9qs3wdc=", "integrity": "sha1-Antp+oIyJeVRys4+8DsR9qs3wdc=",
"dev": true "dev": true
}, },
"tslint-loader": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/tslint-loader/-/tslint-loader-3.6.0.tgz",
"integrity": "sha512-Me9Qf/87BOfCY8uJJw+J7VMF4U8WiMXKLhKKKugMydF0xMhMOt9wo2mjYTNhwbF9H7SHh8PAIwRG8roisTNekQ==",
"dev": true,
"requires": {
"loader-utils": "1.1.0",
"mkdirp": "0.5.1",
"object-assign": "4.1.1",
"rimraf": "2.6.2",
"semver": "5.5.0"
}
},
"tty-browserify": { "tty-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"moment": "^2.18.1", "moment": "^2.18.1",
"prop-types": "^15.6.1", "prop-types": "^15.6.1",
"react": "^16.2.0", "react": "^16.3.1",
"react-async-wrapper": "^0.1.6", "react-async-wrapper": "^0.1.6",
"react-dom": "^16.2.0", "react-dom": "^16.3.1",
"react-json-view": "^1.11.4", "react-json-view": "^1.11.4",
"react-markdown": "^3.3.0", "react-markdown": "^3.3.0",
"react-router-4-compat": "^0.1.8", "react-router-4-compat": "^0.1.8",
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
"@babel/polyfill": "^7.0.0-beta.44", "@babel/polyfill": "^7.0.0-beta.44",
"@babel/preset-env": "^7.0.0-beta.44", "@babel/preset-env": "^7.0.0-beta.44",
"@babel/preset-react": "^7.0.0-beta.44", "@babel/preset-react": "^7.0.0-beta.44",
"@babel/register": "^7.0.0-beta.40", "@babel/register": "^7.0.0-beta.44",
"@storybook/addon-actions": "^3.4.1", "@storybook/addon-actions": "^4.0.0-alpha.2",
"@storybook/addon-info": "^4.0.0-alpha.2", "@storybook/addon-info": "^4.0.0-alpha.2",
"@storybook/addon-links": "^3.4.1", "@storybook/addon-links": "^4.0.0-alpha.2",
"@storybook/react": "^4.0.0-alpha.2", "@storybook/react": "^4.0.0-alpha.2",
"@types/webpack": "^4.1.3", "@types/webpack": "^4.1.3",
"autoprefixer": "^8.2.0", "autoprefixer": "^8.2.0",
...@@ -118,7 +118,6 @@ ...@@ -118,7 +118,6 @@
"react-test-renderer": "^16.2.0", "react-test-renderer": "^16.2.0",
"redbox-react": "^1.5.0", "redbox-react": "^1.5.0",
"style-loader": "^0.20.3", "style-loader": "^0.20.3",
"tslint-loader": "^3.6.0",
"uglifyjs-webpack-plugin": "^1.2.4", "uglifyjs-webpack-plugin": "^1.2.4",
"url-loader": "^1.0.1", "url-loader": "^1.0.1",
"webpack": "^4.5.0", "webpack": "^4.5.0",
......
...@@ -22,12 +22,18 @@ export const datasourceApi = (coordinate) => { ...@@ -22,12 +22,18 @@ export const datasourceApi = (coordinate) => {
if (containerType === 'global') { if (containerType === 'global') {
return { return {
query: partial(calcGlobalDatasource, [datasourceName]), query: partial(calcGlobalDatasource, [datasourceName]),
queryMeta: partial(calcGlobalDatasourceMeta, [datasourceName]),
count: partial(countGlobalDatasource, [datasourceName]), count: partial(countGlobalDatasource, [datasourceName]),
countMeta: partial(countGlobalDatasourceMeta, [datasourceName]),
cursor: partial(cursorGlobalDatasource, [datasourceName]), cursor: partial(cursorGlobalDatasource, [datasourceName]),
meta: partial(getGlobalDatasourceMeta, [datasourceName]), cursorMeta: partial(cursorGlobalDatasourceMeta, [datasourceName]),
update: partial(updateGlobalDatasource, [datasourceName]), update: partial(updateGlobalDatasource, [datasourceName]),
updateMeta: partial(updateGlobalDatasourceMeta, [datasourceName]),
create: partial(createGlobalDatasource, [datasourceName]), create: partial(createGlobalDatasource, [datasourceName]),
createMeta: partial(createGlobalDatasourceMeta, [datasourceName]),
remove: partial(removeGlobalDatasource, [datasourceName]), remove: partial(removeGlobalDatasource, [datasourceName]),
removeMeta: partial(removeGlobalDatasourceMeta, [datasourceName]),
meta: partial(getGlobalDatasourceMeta, [datasourceName]),
validateUpdate: partial(validateUpdateGlobalDatasource, datasourceName), validateUpdate: partial(validateUpdateGlobalDatasource, datasourceName),
validateCreate: partial(validateCreateGlobalDatasource, datasourceName), validateCreate: partial(validateCreateGlobalDatasource, datasourceName),
validateRemove: partial(validateRemoveGlobalDatasource, datasourceName), validateRemove: partial(validateRemoveGlobalDatasource, datasourceName),
...@@ -37,10 +43,16 @@ export const datasourceApi = (coordinate) => { ...@@ -37,10 +43,16 @@ export const datasourceApi = (coordinate) => {
query: partial(calcModuleDatasource, [containerName, datasourceName]), query: partial(calcModuleDatasource, [containerName, datasourceName]),
count: partial(countModuleDatasource, [containerName, datasourceName]), count: partial(countModuleDatasource, [containerName, datasourceName]),
cursor: partial(cursorModuleDatasource, [containerName, datasourceName]), cursor: partial(cursorModuleDatasource, [containerName, datasourceName]),
meta: partial(getModuleDatasourceMeta, [containerName, datasourceName]),
update: partial(updateModuleDatasource, [containerName, datasourceName]), update: partial(updateModuleDatasource, [containerName, datasourceName]),
create: partial(createModuleDatasource, [containerName, datasourceName]), create: partial(createModuleDatasource, [containerName, datasourceName]),
remove: partial(removeModuleDatasource, [containerName, datasourceName]), remove: partial(removeModuleDatasource, [containerName, datasourceName]),
meta: partial(getModuleDatasourceMeta, [containerName, datasourceName]),
queryMeta: partial(calcModuleDatasourceMeta, [containerName, datasourceName]),
countMeta: partial(countModuleDatasourceMeta, [containerName, datasourceName]),
cursorMeta: partial(cursorModuleDatasourceMeta, [containerName, datasourceName]),
updateMeta: partial(updateModuleDatasourceMeta, [containerName, datasourceName]),
createMeta: partial(createModuleDatasourceMeta, [containerName, datasourceName]),
removeMeta: partial(removeModuleDatasourceMeta, [containerName, datasourceName]),
validateUpdate: partial(validateUpdateModuleDatasource, [containerName, datasourceName]), validateUpdate: partial(validateUpdateModuleDatasource, [containerName, datasourceName]),
validateCreate: partial(validateCreateModuleDatasource, [containerName, datasourceName]), validateCreate: partial(validateCreateModuleDatasource, [containerName, datasourceName]),
validateRemove: partial(validateRemoveModuleDatasource, [containerName, datasourceName]), validateRemove: partial(validateRemoveModuleDatasource, [containerName, datasourceName]),
...@@ -73,14 +85,26 @@ export async function calcGlobalDatasource(name, { pst, psz, filters = [], sortB ...@@ -73,14 +85,26 @@ export async function calcGlobalDatasource(name, { pst, psz, filters = [], sortB
return request(`${config.apiContextPath}/api/datasource/${name}`, makeParams({ pst, psz, dmPath }, { filters, sortBys, sortTypes, params })); return request(`${config.apiContextPath}/api/datasource/${name}`, makeParams({ pst, psz, dmPath }, { filters, sortBys, sortTypes, params }));
} }
export async function calcGlobalDatasourceMeta(name, { params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/datasource/${name}/meta/query`, makeParams({ dmPath }, { params }));
}
export async function countGlobalDatasource(name, { filters = [], params = {}, dmPath }) { export async function countGlobalDatasource(name, { filters = [], params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/datasource/${name}/count`, makeParams({ dmPath }, { filters, params })); return request(`${config.apiContextPath}/api/datasource/${name}/count`, makeParams({ dmPath }, { filters, params }));
} }
export async function countGlobalDatasourceMeta(name, { params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/datasource/${name}/meta/count`, makeParams({ dmPath }, { params }));
}
export async function cursorGlobalDatasource(name, key, params = {}, dmPath) { export async function cursorGlobalDatasource(name, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/datasource/${name}/cursor`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/datasource/${name}/cursor`, makeParams({ key, dmPath }, { params }));
} }
export async function cursorGlobalDatasourceMeta(name, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/datasource/${name}/meta/cursor`, makeParams({ key, dmPath }, { params }));
}
export async function validateUpdateGlobalDatasource(name, key, params = {}, dmPath) { export async function validateUpdateGlobalDatasource(name, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/datasource/${name}/update/validate`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/datasource/${name}/update/validate`, makeParams({ key, dmPath }, { params }));
} }
...@@ -93,6 +117,14 @@ export async function updateGlobalDatasource(name, key, params = {}, dmPath) { ...@@ -93,6 +117,14 @@ export async function updateGlobalDatasource(name, key, params = {}, dmPath) {
}); });
} }
export async function updateGlobalDatasourceMeta(name, key, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/datasource/${name}/meta/update`, {
key,
params,
dmPath,
});
}
export async function validateCreateGlobalDatasource(name, params = {}, dmPath) { export async function validateCreateGlobalDatasource(name, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/datasource/${name}/create/validate`, makeParams({ dmPath }, { params })); return request(`${config.apiContextPath}/api/datasource/${name}/create/validate`, makeParams({ dmPath }, { params }));
} }
...@@ -104,6 +136,13 @@ export async function createGlobalDatasource(name, params = {}, dmPath) { ...@@ -104,6 +136,13 @@ export async function createGlobalDatasource(name, params = {}, dmPath) {
}); });
} }
export async function createGlobalDatasourceMeta(name, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/datasource/${name}/meta/create`, {
params,
dmPath,
});
}
export async function validateRemoveGlobalDatasource(name, key, params = {}, dmPath) { export async function validateRemoveGlobalDatasource(name, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/datasource/${name}/remove/validate`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/datasource/${name}/remove/validate`, makeParams({ key, dmPath }, { params }));
} }
...@@ -116,6 +155,14 @@ export async function removeGlobalDatasource(name, key, params = {}, dmPath) { ...@@ -116,6 +155,14 @@ export async function removeGlobalDatasource(name, key, params = {}, dmPath) {
}); });
} }
export async function removeGlobalDatasourceMeta(name, key, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/datasource/${name}/meta/remove`, {
key,
params,
dmPath,
});
}
export async function getGlobalDatasourceMeta(name) { export async function getGlobalDatasourceMeta(name) {
return request(`${config.apiContextPath}/api/datasource/${name}/meta`); return request(`${config.apiContextPath}/api/datasource/${name}/meta`);
} }
...@@ -124,14 +171,26 @@ export async function calcModuleDatasource(mdName, dsName, { pst, psz, filters = ...@@ -124,14 +171,26 @@ export async function calcModuleDatasource(mdName, dsName, { pst, psz, filters =
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}`, makeParams({ pst, psz, dmPath }, { filters, sortBys, sortTypes, params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}`, makeParams({ pst, psz, dmPath }, { filters, sortBys, sortTypes, params }));
} }
export async function calcModuleDatasourceMeta(mdName, dsName, { params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/query`, makeParams({ dmPath }, { params }));
}
export async function countModuleDatasource(mdName, dsName, { filters = [], params = {}, dmPath }) { export async function countModuleDatasource(mdName, dsName, { filters = [], params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/count`, makeParams({ dmPath }, { filters, params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/count`, makeParams({ dmPath }, { filters, params }));
} }
export async function countModuleDatasourceMeta(mdName, dsName, { params = {}, dmPath }) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/count`, makeParams({ dmPath }, { params }));
}
export async function cursorModuleDatasource(mdName, dsName, key, params = {}, dmPath) { export async function cursorModuleDatasource(mdName, dsName, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/cursor`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/cursor`, makeParams({ key, dmPath }, { params }));
} }
export async function cursorModuleDatasourceMeta(mdName, dsName, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/cursor`, makeParams({ key, dmPath }, { params }));
}
export async function validateUpdateModuleDatasource(mdName, dsName, key, params = {}, dmPath) { export async function validateUpdateModuleDatasource(mdName, dsName, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/update/validate`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/update/validate`, makeParams({ key, dmPath }, { params }));
} }
...@@ -144,6 +203,14 @@ export async function updateModuleDatasource(mdName, dsName, key, params = {}, d ...@@ -144,6 +203,14 @@ export async function updateModuleDatasource(mdName, dsName, key, params = {}, d
}); });
} }
export async function updateModuleDatasourceMeta(mdName, dsName, key, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/update`, {
key,
params,
dmPath,
});
}
export async function validateCreateModuleDatasource(mdName, dsName, params = {}, dmPath) { export async function validateCreateModuleDatasource(mdName, dsName, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/create/validate`, makeParams({ dmPath }, { params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/create/validate`, makeParams({ dmPath }, { params }));
} }
...@@ -155,6 +222,13 @@ export async function createModuleDatasource(mdName, dsName, params = {}, dmPath ...@@ -155,6 +222,13 @@ export async function createModuleDatasource(mdName, dsName, params = {}, dmPath
}); });
} }
export async function createModuleDatasourceMeta(mdName, dsName, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/create`, {
params,
dmPath,
});
}
export async function validateRemoveModuleDatasource(mdName, dsName, key, params = {}, dmPath) { export async function validateRemoveModuleDatasource(mdName, dsName, key, params = {}, dmPath) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/remove/validate`, makeParams({ key, dmPath }, { params })); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/remove/validate`, makeParams({ key, dmPath }, { params }));
} }
...@@ -167,6 +241,14 @@ export async function removeModuleDatasource(mdName, dsName, key, params = {}, d ...@@ -167,6 +241,14 @@ export async function removeModuleDatasource(mdName, dsName, key, params = {}, d
}); });
} }
export async function removeModuleDatasourceMeta(mdName, dsName, key, params = {}, dmPath) {
return post(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta/remove`, {
key,
params,
dmPath,
});
}
export async function getModuleDatasourceMeta(mdName, dsName) { export async function getModuleDatasourceMeta(mdName, dsName) {
return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta`); return request(`${config.apiContextPath}/api/module/user/${mdName}/datasource/${dsName}/meta`);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论