Skip to content

Commit 4d97186

Browse files
committed
fix: review
1 parent 794c6a9 commit 4d97186

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/components/ConnectToDB/ConnectToDBDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function ConnectToDBDialog({
6262
tenantApi.useGetTenantInfoQuery(params);
6363
const endpoint = endpointFromProps ?? tenantData?.ControlPlane?.endpoint;
6464

65-
const snippet = getSnippetCode(activeTab, {database, endpoint});
65+
const snippet = getSnippetCode(activeTab, {database: tenantData?.Name, endpoint});
6666
const docsLink = getDocsLink(activeTab);
6767

6868
return (

src/containers/Header/Header.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ function Header() {
117117

118118
if (isDatabasePage && database) {
119119
elements.push(
120-
<Button
121-
view={'flat'}
122-
onClick={() => getConnectToDBDialog({database: databaseData?.Name || database})}
123-
>
120+
<Button view={'flat'} onClick={() => getConnectToDBDialog({database})}>
124121
<Icon data={PlugConnection} />
125122
{headerKeyset('connect')}
126123
</Button>,

src/containers/Tenant/Diagnostics/TopShards/TopShards.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export const TopShards = ({tenantName, path, databaseFullPath}: TopShardsProps)
7575
let normalizedPath = path;
7676

7777
if (tenantName !== databaseFullPath) {
78+
//tenantName may be database full path or database id. If it is database id, we must remove it from object's path and add database full path instead
7879
const shrinkedPath = path.startsWith(tenantName) ? path.slice(tenantName.length) : path;
7980
normalizedPath = databaseFullPath + shrinkedPath;
8081
}

0 commit comments

Comments
 (0)