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 d67b5c1f7b [INLONG-10592][Dashboard] When there are too many
selections in the drop-down box, omit some of them (#10593)
d67b5c1f7b is described below
commit d67b5c1f7b34d706381cb1e5231ba1769987d810
Author: kamianlaida <[email protected]>
AuthorDate: Tue Jul 16 12:43:36 2024 +0800
[INLONG-10592][Dashboard] When there are too many selections in the
drop-down box, omit some of them (#10593)
---
inlong-dashboard/src/ui/locales/cn.json | 4 +++-
inlong-dashboard/src/ui/locales/en.json | 4 +++-
.../src/ui/pages/ClusterTags/TagDetailModal.tsx | 13 +++++++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/inlong-dashboard/src/ui/locales/cn.json
b/inlong-dashboard/src/ui/locales/cn.json
index caf2cc4812..858945290a 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -920,5 +920,7 @@
"pages.GroupDataTemplate.Modifier":"修改人",
"pages.GroupDataTemplate.VisibleRange.All":"全局",
"pages.GroupDataTemplate.VisibleRange.InCharges":"责任人",
- "pages.GroupDataTemplate.VisibleRange.Tenant":"租户"
+ "pages.GroupDataTemplate.VisibleRange.Tenant":"租户",
+ "miscellaneous.total": "... 共",
+ "miscellaneous.tenants": "个租户"
}
diff --git a/inlong-dashboard/src/ui/locales/en.json
b/inlong-dashboard/src/ui/locales/en.json
index 93054818b8..7956346c2b 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -920,5 +920,7 @@
"pages.GroupDataTemplate.Modifier":"Modifier",
"pages.GroupDataTemplate.VisibleRange.All":"Global",
"pages.GroupDataTemplate.VisibleRange.InCharges":"Owner",
- "pages.GroupDataTemplate.VisibleRange.Tenant":"Tenant"
+ "pages.GroupDataTemplate.VisibleRange.Tenant":"Tenant",
+ "miscellaneous.total": "... total ",
+ "miscellaneous.tenants": " tenants"
}
diff --git a/inlong-dashboard/src/ui/pages/ClusterTags/TagDetailModal.tsx
b/inlong-dashboard/src/ui/pages/ClusterTags/TagDetailModal.tsx
index ef9f3534d3..743e3089a3 100644
--- a/inlong-dashboard/src/ui/pages/ClusterTags/TagDetailModal.tsx
+++ b/inlong-dashboard/src/ui/pages/ClusterTags/TagDetailModal.tsx
@@ -104,6 +104,18 @@ const TagDetailModal: React.FC<TagDetailModalProps> = ({
id, ...modalProps }) =>
showSearch: true,
allowClear: true,
mode: 'multiple',
+ maxTagCount: 9,
+ maxTagTextLength: 20,
+ maxTagPlaceholder: omittedValues => {
+ console.log('omittedValues', omittedValues);
+ return (
+ <span>
+ {i18n.t('miscellaneous.total')}
+ {omittedValues.length}
+ {i18n.t('miscellaneous.tenants')}
+ </span>
+ );
+ },
options: {
requestTrigger: ['onOpen', 'onSearch'],
requestService: keyword => ({
@@ -136,6 +148,7 @@ const TagDetailModal: React.FC<TagDetailModalProps> = ({
id, ...modalProps }) =>
return (
<Modal
+ width={600}
{...modalProps}
title={i18n.t(id ? 'basic.Edit' : 'basic.Create') +
i18n.t('pages.ClusterTags.Name')}
onOk={onOk}