Commit c4161b3f by zhaochengxiang

启动odata

parent 5593e2a4
...@@ -591,6 +591,27 @@ const ModelTable = (props) => { ...@@ -591,6 +591,27 @@ const ModelTable = (props) => {
onHistory && onHistory(record.id); onHistory && onHistory(record.id);
} }
const startODataItem = (record) => {
modal.confirm({
title: '提示!',
content: '您确定要启动该服务的OData吗?',
onOk: () => {
dispatch({
type: 'pds.enableOData',
payload: {
params: {
pdsDataServiceId: record.id
}
},
callback: () => {
showMessage('success', '启动成功');
onChange && onChange();
}
})
}
});
}
const disableODataItem = (record) => { const disableODataItem = (record) => {
modal.confirm({ modal.confirm({
title: '提示!', title: '提示!',
...@@ -732,7 +753,7 @@ const ModelTable = (props) => { ...@@ -732,7 +753,7 @@ const ModelTable = (props) => {
} else if (key === 'admit') { } else if (key === 'admit') {
app.openAdmit?.({ dirId: catalogId, service: currentItem }) app.openAdmit?.({ dirId: catalogId, service: currentItem })
} else if (key === 'enableOData') { } else if (key === 'enableOData') {
setODataConfigParams({visible: true, service: currentItem}) startODataItem(currentItem);
} else if (key === 'disableOData') { } else if (key === 'disableOData') {
disableODataItem(currentItem); disableODataItem(currentItem);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment