You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by le...@apache.org on 2022/07/08 03:40:56 UTC
[inlong] branch master updated: [INLONG-4865][Dashboard] The storage config can still be modified after submitting for approval
This is an automated email from the ASF dual-hosted git repository.
leezng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 0494dc7f2 [INLONG-4865][Dashboard] The storage config can still be modified after submitting for approval
0494dc7f2 is described below
commit 0494dc7f29ff5695413ba058d9d95144fd3c91ed
Author: Daniel <le...@outlook.com>
AuthorDate: Fri Jul 8 11:40:52 2022 +0800
[INLONG-4865][Dashboard] The storage config can still be modified after submitting for approval
---
.../src/pages/AccessDetail/DataSources/index.tsx | 33 +++++++++++++---------
.../src/pages/AccessDetail/DataStorage/index.tsx | 33 +++++++++++++---------
2 files changed, 38 insertions(+), 28 deletions(-)
diff --git a/inlong-dashboard/src/pages/AccessDetail/DataSources/index.tsx b/inlong-dashboard/src/pages/AccessDetail/DataSources/index.tsx
index 90ac64120..46fdfb34c 100644
--- a/inlong-dashboard/src/pages/AccessDetail/DataSources/index.tsx
+++ b/inlong-dashboard/src/pages/AccessDetail/DataSources/index.tsx
@@ -58,7 +58,7 @@ const getFilterFormContent = defaultValues => [
},
];
-const Comp = ({ inlongGroupId }: Props, ref) => {
+const Comp = ({ inlongGroupId, readonly }: Props, ref) => {
const [options, setOptions] = useState({
// keyword: '',
pageSize: defaultSize,
@@ -162,16 +162,19 @@ const Comp = ({ inlongGroupId }: Props, ref) => {
{
title: i18n.t('basic.Operating'),
dataIndex: 'action',
- render: (text, record) => (
- <>
- <Button type="link" onClick={() => onEdit(record)}>
- {i18n.t('basic.Edit')}
- </Button>
- <Button type="link" onClick={() => onDelete(record)}>
- {i18n.t('basic.Delete')}
- </Button>
- </>
- ),
+ render: (text, record) =>
+ readonly ? (
+ '-'
+ ) : (
+ <>
+ <Button type="link" onClick={() => onEdit(record)}>
+ {i18n.t('basic.Edit')}
+ </Button>
+ <Button type="link" onClick={() => onDelete(record)}>
+ {i18n.t('basic.Delete')}
+ </Button>
+ </>
+ ),
} as any,
]);
@@ -216,9 +219,11 @@ const Comp = ({ inlongGroupId }: Props, ref) => {
onFilter,
}}
suffix={
- <Button type="primary" onClick={() => setCreateModal({ visible: true })}>
- {i18n.t('pages.AccessDetail.DataSources.Create')}
- </Button>
+ !readonly && (
+ <Button type="primary" onClick={() => setCreateModal({ visible: true })}>
+ {i18n.t('pages.AccessDetail.DataSources.Create')}
+ </Button>
+ )
}
table={{
columns,
diff --git a/inlong-dashboard/src/pages/AccessDetail/DataStorage/index.tsx b/inlong-dashboard/src/pages/AccessDetail/DataStorage/index.tsx
index aa04f4b18..05ef5eef6 100644
--- a/inlong-dashboard/src/pages/AccessDetail/DataStorage/index.tsx
+++ b/inlong-dashboard/src/pages/AccessDetail/DataStorage/index.tsx
@@ -51,7 +51,7 @@ const getFilterFormContent = defaultValues => [
},
];
-const Comp = ({ inlongGroupId }: Props, ref) => {
+const Comp = ({ inlongGroupId, readonly }: Props, ref) => {
const [options, setOptions] = useState({
keyword: '',
pageSize: defaultSize,
@@ -208,16 +208,19 @@ const Comp = ({ inlongGroupId }: Props, ref) => {
{
title: i18n.t('basic.Operating'),
dataIndex: 'action',
- render: (text, record) => (
- <>
- <Button type="link" onClick={() => onEdit(record)}>
- {i18n.t('basic.Edit')}
- </Button>
- <Button type="link" onClick={() => onDelete(record)}>
- {i18n.t('basic.Delete')}
- </Button>
- </>
- ),
+ render: (text, record) =>
+ readonly ? (
+ '-'
+ ) : (
+ <>
+ <Button type="link" onClick={() => onEdit(record)}>
+ {i18n.t('basic.Edit')}
+ </Button>
+ <Button type="link" onClick={() => onDelete(record)}>
+ {i18n.t('basic.Delete')}
+ </Button>
+ </>
+ ),
} as any,
]);
@@ -229,9 +232,11 @@ const Comp = ({ inlongGroupId }: Props, ref) => {
onFilter,
}}
suffix={
- <Button type="primary" onClick={() => setCreateModal({ visible: true })}>
- {i18n.t('pages.AccessDetail.DataStorage.New')}
- </Button>
+ !readonly && (
+ <Button type="primary" onClick={() => setCreateModal({ visible: true })}>
+ {i18n.t('pages.AccessDetail.DataStorage.New')}
+ </Button>
+ )
}
table={{
columns,