Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3280] Improvement(ui): Truncate key and values detail properties #4594

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public void testViewTabMetalakeDetails() throws InterruptedException {
@Order(8)
public void testViewCatalogDetails() throws InterruptedException {
catalogsPage.clickViewCatalogBtn(HIVE_CATALOG_NAME);
mouseMoveTo(By.xpath(".//*[@data-prev-refer='details-props-key-metastore.uris']"));
Assertions.assertTrue(
catalogsPage.verifyShowCatalogDetails(HIVE_CATALOG_NAME, hiveMetastoreUri));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public boolean verifyShowCatalogDetails(String name, String hiveMetastoreUris)
boolean isHiveURIS =
waitShowText(
hiveMetastoreUris,
By.xpath(".//*[@data-prev-refer='details-props-key-metastore.uris']"));
By.xpath(".//*[@data-prev-refer='tip-details-props-key-metastore.uris']"));
boolean isShowCheck =
waitShowText(
"false",
Expand Down
17 changes: 15 additions & 2 deletions web/src/components/DetailsDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,27 @@ const DetailsDrawer = props => {
return (
<TableRow key={index} data-refer={`details-props-index-${index}`}>
<TableCell className={'twc-py-[0.7rem]'} data-refer={`details-props-key-${item.key}`}>
{item.key}
<Tooltip
title={<span data-refer={`tip-details-props-key-${item.key}`}>{item.key}</span>}
placement='bottom'
>
{item.key.length > 22 ? `${item.key.substring(0, 22)}...` : item.key}
</Tooltip>
</TableCell>
<TableCell
className={'twc-py-[0.7rem]'}
data-refer={`details-props-value-${item.value}`}
data-prev-refer={`details-props-key-${item.key}`}
>
{item.key === 'jdbc-password' ? '[HIDDEN]' : item.value}
{item.key === 'jdbc-password' && '[HIDDEN]'}
{item.key !== 'jdbc-password' && (
<Tooltip
title={<span data-prev-refer={`tip-details-props-key-${item.key}`}>{item.value}</span>}
placement='bottom'
>
{item.value.length > 22 ? `${item.value.substring(0, 22)}...` : item.value}
</Tooltip>
)}
</TableCell>
</TableRow>
)
Expand Down
Loading