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

[Workspace] Fix issues in workspace detail and association modal #8201

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions changelogs/fragments/8201.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix issues in workspace detail and association modal ([#8201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8201))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
li[parentid] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a global css change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it just adds indentation to DQCs in association modal

padding-left: 25px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { HttpStart, NotificationsStart, SavedObjectsStart } from '../../../../..
import { AssociationDataSourceModalMode } from '../../../common/constants';
import { Logos } from '../../../../../core/common';
import { DirectQueryConnectionIcon } from '../workspace_form';
import './association_data_source_modal.scss';

const ConnectionIcon = ({
connection: { connectionType, type },
Expand Down Expand Up @@ -254,11 +255,13 @@ export const AssociationDataSourceModal = ({
'workspace.detail.dataSources.associateModal.searchPlaceholder',
{ defaultMessage: 'Search' }
),
compressed: true,
}}
options={options}
onChange={handleSelectionChange}
isLoading={isLoading}
renderOption={renderOption}
height={256}
>
{(list, search) => (
<Fragment>
Expand All @@ -273,7 +276,7 @@ export const AssociationDataSourceModal = ({
<EuiSmallButton onClick={closeModal}>
<FormattedMessage
id="workspace.detail.dataSources.associateModal.close.button"
defaultMessage="Close"
defaultMessage="Cancel"
/>
</EuiSmallButton>
<EuiSmallButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export const SelectDataSourceDetailPanel = ({
/>
</EuiText>
)}
<EuiSpacer />
</EuiTextAlign>
);

Expand Down Expand Up @@ -295,8 +296,11 @@ export const SelectDataSourceDetailPanel = ({
</EuiFlexGroup>
</EuiFlexItem>
</EuiFlexGroup>

<EuiHorizontalRule margin="m" />
{formData.selectedDataSourceConnections.length > 0 ? (
<EuiHorizontalRule margin="m" />
) : (
<EuiSpacer size="xl" />
)}
{renderTableContent()}
{isVisible && (
<AssociationDataSourceModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const WorkspaceDetailConnectionTable = ({

const search: EuiSearchBarProps = {
toolsLeft: renderToolsLeft(),
compressed: true,
box: {
incremental: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const DataSourceConnectionTable = forwardRef<
size="xs"
label={item.name}
icon={<DirectQueryConnectionIcon type={item.type} />}
style={{ maxHeight: '30px' }}
style={{ maxHeight: '30px', gap: '2px' }}
/>
))}
</EuiListGroup>
Expand Down