From 7640ef6ed57b390c9d1421cb2e1bc43cc365c0a1 Mon Sep 17 00:00:00 2001 From: yubonluo Date: Wed, 4 Sep 2024 13:31:44 +0800 Subject: [PATCH 1/4] update css defination class name Signed-off-by: yubonluo --- .../workspace_detail/data_source_connection_table.scss | 10 +++++----- .../workspace_detail/data_source_connection_table.tsx | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss index 6b11cacd471e..5085ecbbbc0f 100644 --- a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss +++ b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss @@ -1,19 +1,19 @@ -.customized-table thead { +.direct-query-expanded-table thead { display: none; } -[id^="row"][id$="expansion"] > td:first-child > div:first-child { +.direct-query-table [id^="row"][id$="expansion"] > td:first-child > div:first-child { padding: 0; } -.customized-row:first-child > td { +.direct-query-expanded-row:first-child > td { border-top: 0; } -.customized-row:last-child > td { +.direct-query-expanded-row:last-child > td { border-bottom: 0; } -.customized-row > td:nth-child(2) { +.direct-query-expanded-row > td:nth-child(2) { padding-left: 25px; } diff --git a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx index 507ef32f07b4..dbe65327b457 100644 --- a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx +++ b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx @@ -123,9 +123,9 @@ export const DataSourceConnectionTable = ({ items={item?.relatedConnections ?? []} itemId="id" columns={baseColumns} - className="customized-table" + className="direct-query-expanded-table" rowProps={{ - className: 'customized-row', + className: 'direct-query-expanded-row', }} /> ); @@ -295,6 +295,7 @@ export const DataSourceConnectionTable = ({ isSelectable={true} itemIdToExpandedRowMap={itemIdToExpandedRowMap} isExpandable={true} + className="direct-query-table" pagination={{ initialPageSize: 10, pageSizeOptions: [10, 20, 30], From a504ca93cf5c2531288fae80aafad3fe2afb6e87 Mon Sep 17 00:00:00 2001 From: yubonluo Date: Wed, 4 Sep 2024 13:34:19 +0800 Subject: [PATCH 2/4] optimize the code Signed-off-by: yubonluo --- .../workspace_detail/data_source_connection_table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx index dbe65327b457..c11f9fbee254 100644 --- a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx +++ b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx @@ -123,9 +123,9 @@ export const DataSourceConnectionTable = ({ items={item?.relatedConnections ?? []} itemId="id" columns={baseColumns} - className="direct-query-expanded-table" + className="workspace-detail-direct-query-expanded-table" rowProps={{ - className: 'direct-query-expanded-row', + className: 'workspace-detail-direct-query-expanded-row', }} /> ); @@ -295,7 +295,7 @@ export const DataSourceConnectionTable = ({ isSelectable={true} itemIdToExpandedRowMap={itemIdToExpandedRowMap} isExpandable={true} - className="direct-query-table" + className="workspace-detail-direct-query-table" pagination={{ initialPageSize: 10, pageSizeOptions: [10, 20, 30], From 0b2ef8ced2921f1333aefde4b779ae2446feb587 Mon Sep 17 00:00:00 2001 From: yubonluo Date: Wed, 4 Sep 2024 13:34:19 +0800 Subject: [PATCH 3/4] optimize the code Signed-off-by: yubonluo --- .../workspace_detail/data_source_connection_table.scss | 10 +++++----- .../workspace_detail/data_source_connection_table.tsx | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss index 5085ecbbbc0f..d5d11ddaf716 100644 --- a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss +++ b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.scss @@ -1,19 +1,19 @@ -.direct-query-expanded-table thead { +.workspace-detail-direct-query-expanded-table thead { display: none; } -.direct-query-table [id^="row"][id$="expansion"] > td:first-child > div:first-child { +.workspace-detail-direct-query-table [id^="row"][id$="expansion"] > td:first-child > div:first-child { padding: 0; } -.direct-query-expanded-row:first-child > td { +.workspace-detail-direct-query-expanded-row:first-child > td { border-top: 0; } -.direct-query-expanded-row:last-child > td { +.workspace-detail-direct-query-expanded-row:last-child > td { border-bottom: 0; } -.direct-query-expanded-row > td:nth-child(2) { +.workspace-detail-direct-query-expanded-row > td:nth-child(2) { padding-left: 25px; } diff --git a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx index dbe65327b457..c11f9fbee254 100644 --- a/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx +++ b/src/plugins/workspace/public/components/workspace_detail/data_source_connection_table.tsx @@ -123,9 +123,9 @@ export const DataSourceConnectionTable = ({ items={item?.relatedConnections ?? []} itemId="id" columns={baseColumns} - className="direct-query-expanded-table" + className="workspace-detail-direct-query-expanded-table" rowProps={{ - className: 'direct-query-expanded-row', + className: 'workspace-detail-direct-query-expanded-row', }} /> ); @@ -295,7 +295,7 @@ export const DataSourceConnectionTable = ({ isSelectable={true} itemIdToExpandedRowMap={itemIdToExpandedRowMap} isExpandable={true} - className="direct-query-table" + className="workspace-detail-direct-query-table" pagination={{ initialPageSize: 10, pageSizeOptions: [10, 20, 30], From d2b2f036fbdcc93e14cbcf33b29ba268aa4de38f Mon Sep 17 00:00:00 2001 From: "opensearch-changeset-bot[bot]" <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 05:42:09 +0000 Subject: [PATCH 4/4] Changeset file for PR #7986 created/updated --- changelogs/fragments/7986.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/7986.yml diff --git a/changelogs/fragments/7986.yml b/changelogs/fragments/7986.yml new file mode 100644 index 000000000000..e79ea4dc30c1 --- /dev/null +++ b/changelogs/fragments/7986.yml @@ -0,0 +1,2 @@ +fix: +- Fix workspace detail classname definition ([#7986](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7986)) \ No newline at end of file