diff --git a/public/app/features/datasources/components/picker/DataSourceCard.tsx b/public/app/features/datasources/components/picker/DataSourceCard.tsx index fd9c65234c2..2e4c5ddc799 100644 --- a/public/app/features/datasources/components/picker/DataSourceCard.tsx +++ b/public/app/features/datasources/components/picker/DataSourceCard.tsx @@ -15,13 +15,15 @@ export function DataSourceCard({ ds, onClick, selected }: DataSourceCardProps) { return ( - {ds.name} - - {ds.meta.name} - {ds.meta.info.description} - + +
+ {ds.name} + | + {ds.meta.name} +
+
- {`${ds.meta.name} + {`${ds.meta.name} {ds.isDefault ? : null}
@@ -38,6 +40,34 @@ function getStyles(theme: GrafanaTheme2) { // Move to list component margin-bottom: 0; border-radius: 0; + padding: ${theme.spacing(1.5)}; + `, + heading: css` + width: 100%; + overflow: hidden; + // This is needed to enable ellipsis when text overlfows + > button { + width: 100%; + } + `, + headingContent: css` + color: ${theme.colors.text.secondary}; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + `, + dsName: css` + color: ${theme.colors.text.primary}; + `, + dsType: css` + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + `, + headingSeparator: css` + margin: 0 ${theme.spacing(1)}; + color: ${theme.colors.border.weak}; `, selected: css` background-color: ${theme.colors.background.secondary}; diff --git a/public/app/features/datasources/components/picker/DataSourceDropdown.tsx b/public/app/features/datasources/components/picker/DataSourceDropdown.tsx index e2dcd6831a3..416951f0038 100644 --- a/public/app/features/datasources/components/picker/DataSourceDropdown.tsx +++ b/public/app/features/datasources/components/picker/DataSourceDropdown.tsx @@ -199,7 +199,7 @@ function getStylesPickerContent(theme: GrafanaTheme2) { container: css` display: flex; flex-direction: column; - height: 480px; + height: 412px; box-shadow: ${theme.shadows.z3}; width: 480px; background: ${theme.colors.background.primary}; @@ -209,15 +209,16 @@ function getStylesPickerContent(theme: GrafanaTheme2) { background: ${theme.colors.background.secondary}; `, dataSourceList: css` - height: 423px; - padding: 0 ${theme.spacing(2)}; + flex: 1; + height: 100%; `, footer: css` + flex: 0; display: flex; justify-content: space-between; - padding: ${theme.spacing(2)}; + padding: ${theme.spacing(1.5)}; border-top: 1px solid ${theme.colors.border.weak}; - height: 57px; + background-color: ${theme.colors.background.secondary}; `, }; } diff --git a/public/app/features/datasources/components/picker/DataSourceModal.tsx b/public/app/features/datasources/components/picker/DataSourceModal.tsx index 142b6a4c20b..da636b7aeae 100644 --- a/public/app/features/datasources/components/picker/DataSourceModal.tsx +++ b/public/app/features/datasources/components/picker/DataSourceModal.tsx @@ -123,7 +123,7 @@ function getDataSourceModalStyles(theme: GrafanaTheme2) { flex-direction: column; width: 50%; height: 100%; - padding-right: ${theme.spacing(1)}; + padding-right: ${theme.spacing(4)}; border-right: 1px solid ${theme.colors.border.weak}; `, rightColumn: css` @@ -133,7 +133,7 @@ function getDataSourceModalStyles(theme: GrafanaTheme2) { height: 100%; justify-items: space-evenly; align-items: stretch; - padding-left: ${theme.spacing(1)}; + padding-left: ${theme.spacing(4)}; `, builtInDataSources: css` flex: 1;