This is an automated email from the ASF dual-hosted git repository.
dockerzhang 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 43f690beca [INLONG-11431][Dashboard] Add copy approval link to my
application page (#11432)
43f690beca is described below
commit 43f690beca5472296bb47e0a3c6995f59c033d8e
Author: kamianlaida <[email protected]>
AuthorDate: Wed Oct 30 12:20:13 2024 +0800
[INLONG-11431][Dashboard] Add copy approval link to my application page
(#11432)
---
inlong-dashboard/src/ui/locales/cn.json | 1 +
inlong-dashboard/src/ui/locales/en.json | 1 +
.../src/ui/pages/Process/Applies/config.tsx | 32 ++++++++++++++++++----
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/inlong-dashboard/src/ui/locales/cn.json
b/inlong-dashboard/src/ui/locales/cn.json
index f8fae84023..23f83e31aa 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -781,6 +781,7 @@
"pages.Approvals.MyApproval": "我的审批",
"pages.Approvals.Type.Group": "申请数据流组",
"pages.Approvals.Type.Consume": "申请订阅",
+ "pages.Approvals.Copy": "复制审批地址",
"pages.ConsumeCreate.SubscriptionInformation": "订阅信息",
"pages.ConsumeCreate.Prev": "上一步",
"pages.ConsumeCreate.Next": "下一步",
diff --git a/inlong-dashboard/src/ui/locales/en.json
b/inlong-dashboard/src/ui/locales/en.json
index df05a26629..89f3af4be2 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -781,6 +781,7 @@
"pages.Approvals.MyApproval": "My approval",
"pages.Approvals.Type.Group": "Apply group",
"pages.Approvals.Type.Consume": "Apply subscription",
+ "pages.Approvals.Copy": "Copy Approval Address",
"pages.ConsumeCreate.SubscriptionInformation": "Subscription information",
"pages.ConsumeCreate.Prev": "Prev",
"pages.ConsumeCreate.Next": "Next",
diff --git a/inlong-dashboard/src/ui/pages/Process/Applies/config.tsx
b/inlong-dashboard/src/ui/pages/Process/Applies/config.tsx
index 114a066c60..b8a5c6488a 100644
--- a/inlong-dashboard/src/ui/pages/Process/Applies/config.tsx
+++ b/inlong-dashboard/src/ui/pages/Process/Applies/config.tsx
@@ -23,6 +23,7 @@ import i18n from '@/i18n';
import { statusList, genStatusTag } from './status';
import { timestampFormat } from '@/core/utils';
import StatusTag from '@/ui/components/StatusTag';
+import { Button } from 'antd';
export const getFilterFormContent = defaultValues => [
{
@@ -130,11 +131,32 @@ export const getColumns = activedName => [
dataIndex: 'action',
width: 100,
render: (text, record) => (
- <Link
-
to={`/process/${activedName}/${record.id}?inlongGroupMode=${record.showInList?.[0]?.inlongGroupMode}`}
- >
- {i18n.t('basic.Detail')}
- </Link>
+ <>
+ <Link
+
to={`/process/${activedName}/${record.id}?inlongGroupMode=${record.showInList?.[0]?.inlongGroupMode}`}
+ >
+ {i18n.t('basic.Detail')}
+ </Link>
+ {record.currentTasks.length > 0 && (
+ <Button
+ type="link"
+ onClick={() => {
+ const baseUrl = window.location.href.split('applies')[0];
+ const fullUrl =
+ baseUrl +
+ 'approvals/' +
+ record?.id +
+ '/?taskId=' +
+ record?.currentTasks[0].id +
+ '&inlongGroupMode=' +
+ record?.showInList?.[0]?.inlongGroupMode;
+ setTimeout(() => navigator.clipboard.writeText(fullUrl), 0);
+ }}
+ >
+ {i18n.t('pages.Approvals.Copy')}
+ </Button>
+ )}
+ </>
),
},
];