Files
grafana/public/app/plugins/datasource/prometheus/querybuilder/components/metrics-modal/styles.ts
Brendan O'Handley ba97c492f9 Prometheus: Metrics explorer usability test improvements (#69528)
* remove infer type functionality because usability tests confirmed it was confusing/not helpful

* persist button option to open modal when typing in metric select

* update copy desc for setting that includes type and description in search

* when filtering by type, only return metrics with defined type

* give focused metric row more contrast, consistent with metric select focused option

* allow selection of metrics with unknown types and undefined types

* add highlighting to backend search

* augment counters created from summaries with (summary)

* remove type from search input setting and only search by name and description

* fix test to reflect that type has been removed from the metadata input search as duplicated by the filter

* add button to select metric, change wording, make table hover row consistent with grafana table

* add tooltip icon with docs link for metric types that are augmented, histogram and summary

* remove files slated for future refactoring

* style changes based on catherine's review

* remove border from settings btn, select btn increase to md, change col size in table, fix responsive inputs ui for sm screens
2023-06-08 12:53:17 -04:00

102 lines
2.2 KiB
TypeScript

import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
export const getStyles = (theme: GrafanaTheme2, disableTextWrap: boolean) => {
return {
modal: css`
width: 85vw;
${theme.breakpoints.down('md')} {
width: 100%;
}
${theme.breakpoints.up('xl')} {
width: 60%;
}
`,
inputWrapper: css`
display: flex;
flex-direction: row;
flex-wrap: wrap;
`,
inputItemFirst: css`
flex-basis: 40%;
padding-right: 16px;
${theme.breakpoints.down('md')} {
padding-right: 0px;
padding-bottom: 16px;
}
`,
inputItem: css`
flex-grow: 1;
flex-basis: 20%;
${theme.breakpoints.down('md')} {
min-width: 100%;
}
`,
selectWrapper: css`
margin-bottom: ${theme.spacing(1)};
`,
resultsAmount: css`
color: ${theme.colors.text.secondary};
font-size: 0.85rem;
padding: 0 0 4px 0;
`,
resultsData: css`
margin: 4px 0 ${theme.spacing(2)} 0;
`,
resultsDataCount: css`
margin: 0;
`,
resultsDataFiltered: css`
color: ${theme.colors.text.secondary};
text-align: center;
border: solid 1px rgba(204, 204, 220, 0.25);
padding: 7px;
`,
resultsDataFilteredText: css`
display: inline;
vertical-align: text-top;
`,
results: css`
height: calc(80vh - 310px);
overflow-y: scroll;
`,
resultsFooter: css`
margin-top: 24px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
position: sticky;
`,
currentlySelected: css`
color: grey;
opacity: 75%;
font-size: 0.75rem;
`,
loadingSpinner: css`
visibility: hidden;
`,
visible: css`
visibility: visible;
`,
settingsBtn: css`
float: right;
`,
noBorder: css`
border: none;
`,
resultsPerPageLabel: css`
color: ${theme.colors.text.secondary};
opacity: 75%;
padding-top: 5px;
font-size: 0.85rem;
margin-right: 8px;
`,
resultsPerPageWrapper: css`
display: flex;
`,
};
};