+
{connected === 0 ? (
@@ -97,9 +95,3 @@ async function loadOptionsAsync(uid: string, searchString: string, setLoading: (
return options;
}
-
-function getStyles(theme: GrafanaTheme2) {
- return {
- container: css``,
- };
-}
diff --git a/public/app/features/library-panels/components/PanelLibraryOptionsGroup/PanelLibraryOptionsGroup.tsx b/public/app/features/library-panels/components/PanelLibraryOptionsGroup/PanelLibraryOptionsGroup.tsx
index 5864e4e25d3..5978d723249 100644
--- a/public/app/features/library-panels/components/PanelLibraryOptionsGroup/PanelLibraryOptionsGroup.tsx
+++ b/public/app/features/library-panels/components/PanelLibraryOptionsGroup/PanelLibraryOptionsGroup.tsx
@@ -84,7 +84,7 @@ export const PanelLibraryOptionsGroup = ({ panel, searchQuery, isWidget = false
};
const styles = {
- libraryPanelsView: css`
- width: 100%;
- `,
+ libraryPanelsView: css({
+ width: '100%',
+ }),
};
diff --git a/public/app/features/library-panels/styles.ts b/public/app/features/library-panels/styles.ts
index c836ea6a06a..05f1cfba99a 100644
--- a/public/app/features/library-panels/styles.ts
+++ b/public/app/features/library-panels/styles.ts
@@ -4,51 +4,50 @@ import { GrafanaTheme2 } from '@grafana/data';
export function getModalStyles(theme: GrafanaTheme2) {
return {
- myTable: css`
- max-height: 204px;
- overflow-y: auto;
- margin-top: 11px;
- margin-bottom: 28px;
- border-radius: ${theme.shape.radius.default};
- border: 1px solid ${theme.colors.action.hover};
- background: ${theme.colors.background.primary};
- color: ${theme.colors.text.secondary};
- font-size: ${theme.typography.h6.fontSize};
- width: 100%;
+ myTable: css({
+ maxHeight: '204px',
+ overflowY: 'auto',
+ marginTop: '11px',
+ marginBottom: '28px',
+ borderRadius: theme.shape.radius.default,
+ border: `1px solid ${theme.colors.action.hover}`,
+ background: theme.colors.background.primary,
+ color: theme.colors.text.secondary,
+ fontSize: theme.typography.h6.fontSize,
+ width: '100%',
- thead {
- color: #538ade;
- font-size: ${theme.typography.bodySmall.fontSize};
- }
+ thead: {
+ color: '#538ade',
+ fontSize: theme.typography.bodySmall.fontSize,
+ },
- th,
- td {
- padding: 6px 13px;
- height: ${theme.spacing(4)};
- }
+ 'th, td': {
+ padding: '6px 13px',
+ height: theme.spacing(4),
+ },
- tbody > tr:nth-child(odd) {
- background: ${theme.colors.background.secondary};
- }
- `,
- noteTextbox: css`
- margin-bottom: ${theme.spacing(4)};
- `,
- textInfo: css`
- color: ${theme.colors.text.secondary};
- font-size: ${theme.typography.size.sm};
- `,
- dashboardSearch: css`
- margin-top: ${theme.spacing(2)};
- `,
- modal: css`
- width: 500px;
- `,
- modalText: css`
- font-size: ${theme.typography.h4.fontSize};
- color: ${theme.colors.text.primary};
- margin-bottom: ${theme.spacing(4)};
- padding-top: ${theme.spacing(2)};
- `,
+ 'tbody > tr:nth-child(odd)': {
+ background: theme.colors.background.secondary,
+ },
+ }),
+ noteTextbox: css({
+ marginBottom: theme.spacing(4),
+ }),
+ textInfo: css({
+ color: theme.colors.text.secondary,
+ fontSize: theme.typography.size.sm,
+ }),
+ dashboardSearch: css({
+ marginTop: theme.spacing(2),
+ }),
+ modal: css({
+ width: '500px',
+ }),
+ modalText: css({
+ fontSize: theme.typography.h4.fontSize,
+ color: theme.colors.text.primary,
+ marginBottom: theme.spacing(4),
+ paddingTop: theme.spacing(2),
+ }),
};
}
diff --git a/public/app/features/logs/components/LoadingIndicator.tsx b/public/app/features/logs/components/LoadingIndicator.tsx
index 8c33d85bb41..e3d4b94b670 100644
--- a/public/app/features/logs/components/LoadingIndicator.tsx
+++ b/public/app/features/logs/components/LoadingIndicator.tsx
@@ -19,7 +19,7 @@ export const LoadingIndicator = ({ adjective = 'newer' }: Props) => {
);
};
-const loadingIndicatorStyles = css`
- display: flex;
- justify-content: center;
-`;
+const loadingIndicatorStyles = css({
+ display: 'flex',
+ justifyContent: 'center',
+});
diff --git a/public/app/features/logs/components/LogDetailsRow.tsx b/public/app/features/logs/components/LogDetailsRow.tsx
index 2bf94eabf05..0139ddec647 100644
--- a/public/app/features/logs/components/LogDetailsRow.tsx
+++ b/public/app/features/logs/components/LogDetailsRow.tsx
@@ -50,60 +50,60 @@ interface State {
const getStyles = memoizeOne((theme: GrafanaTheme2) => {
return {
- wordBreakAll: css`
- label: wordBreakAll;
- word-break: break-all;
- `,
- copyButton: css`
- & > button {
- color: ${theme.colors.text.secondary};
- padding: 0;
- justify-content: center;
- border-radius: ${theme.shape.radius.circle};
- height: ${theme.spacing(theme.components.height.sm)};
- width: ${theme.spacing(theme.components.height.sm)};
- svg {
- margin: 0;
- }
+ wordBreakAll: css({
+ label: 'wordBreakAll',
+ wordBreak: 'break-all',
+ }),
+ copyButton: css({
+ '& > button': {
+ color: theme.colors.text.secondary,
+ padding: 0,
+ justifyContent: 'center',
+ borderRadius: theme.shape.radius.circle,
+ height: theme.spacing(theme.components.height.sm),
+ width: theme.spacing(theme.components.height.sm),
+ svg: {
+ margin: 0,
+ },
- span > div {
- top: -5px;
- & button {
- color: ${theme.colors.success.main};
- }
- }
- }
- `,
- adjoiningLinkButton: css`
- margin-left: ${theme.spacing(1)};
- `,
- wrapLine: css`
- label: wrapLine;
- white-space: pre-wrap;
- `,
- logDetailsStats: css`
- padding: 0 ${theme.spacing(1)};
- `,
- logDetailsValue: css`
- display: flex;
- align-items: center;
- line-height: 22px;
+ 'span > div': {
+ top: '-5px',
+ '& button': {
+ color: theme.colors.success.main,
+ },
+ },
+ },
+ }),
+ adjoiningLinkButton: css({
+ marginLeft: theme.spacing(1),
+ }),
+ wrapLine: css({
+ label: 'wrapLine',
+ whiteSpace: 'pre-wrap',
+ }),
+ logDetailsStats: css({
+ padding: `0 ${theme.spacing(1)}`,
+ }),
+ logDetailsValue: css({
+ display: 'flex',
+ alignItems: 'center',
+ lineHeight: '22px',
- .log-details-value-copy {
- visibility: hidden;
- }
- &:hover {
- .log-details-value-copy {
- visibility: visible;
- }
- }
- `,
- buttonRow: css`
- display: flex;
- flex-direction: row;
- gap: ${theme.spacing(0.5)};
- margin-left: ${theme.spacing(0.5)};
- `,
+ '.log-details-value-copy': {
+ visibility: 'hidden',
+ },
+ '&:hover': {
+ '.log-details-value-copy': {
+ visibility: 'visible',
+ },
+ },
+ }),
+ buttonRow: css({
+ display: 'flex',
+ flexDirection: 'row',
+ gap: theme.spacing(0.5),
+ marginLeft: theme.spacing(0.5),
+ }),
};
});
diff --git a/public/app/features/logs/components/LogLabelStats.tsx b/public/app/features/logs/components/LogLabelStats.tsx
index f6ac4558966..e4b8b07797b 100644
--- a/public/app/features/logs/components/LogLabelStats.tsx
+++ b/public/app/features/logs/components/LogLabelStats.tsx
@@ -11,36 +11,36 @@ const STATS_ROW_LIMIT = 5;
const getStyles = stylesFactory((theme: GrafanaTheme2) => {
return {
- logsStats: css`
- label: logs-stats;
- background: inherit;
- color: ${theme.colors.text.primary};
- word-break: break-all;
- width: fit-content;
- max-width: 100%;
- `,
- logsStatsHeader: css`
- label: logs-stats__header;
- border-bottom: 1px solid ${theme.colors.border.medium};
- display: flex;
- `,
- logsStatsTitle: css`
- label: logs-stats__title;
- font-weight: ${theme.typography.fontWeightMedium};
- padding-right: ${theme.spacing(2)};
- display: inline-block;
- white-space: nowrap;
- text-overflow: ellipsis;
- flex-grow: 1;
- `,
- logsStatsClose: css`
- label: logs-stats__close;
- cursor: pointer;
- `,
- logsStatsBody: css`
- label: logs-stats__body;
- padding: 5px 0px;
- `,
+ logsStats: css({
+ label: 'logs-stats',
+ background: 'inherit',
+ color: theme.colors.text.primary,
+ wordBreak: 'break-all',
+ width: 'fit-content',
+ maxWidth: '100%',
+ }),
+ logsStatsHeader: css({
+ label: 'logs-stats__header',
+ borderBottom: `1px solid ${theme.colors.border.medium}`,
+ display: 'flex',
+ }),
+ logsStatsTitle: css({
+ label: 'logs-stats__title',
+ fontWeight: theme.typography.fontWeightMedium,
+ paddingRight: theme.spacing(2),
+ display: 'inline-block',
+ whiteSpace: 'nowrap',
+ textOverflow: 'ellipsis',
+ flexGrow: 1,
+ }),
+ logsStatsClose: css({
+ label: 'logs-stats__close',
+ cursor: 'pointer',
+ }),
+ logsStatsBody: css({
+ label: 'logs-stats__body',
+ padding: '5px 0px',
+ }),
};
});
diff --git a/public/app/features/logs/components/LogLabelStatsRow.tsx b/public/app/features/logs/components/LogLabelStatsRow.tsx
index 18eeeb37953..9dd5b796dc5 100644
--- a/public/app/features/logs/components/LogLabelStatsRow.tsx
+++ b/public/app/features/logs/components/LogLabelStatsRow.tsx
@@ -4,49 +4,49 @@ import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
const getStyles = (theme: GrafanaTheme2) => ({
- logsStatsRow: css`
- label: logs-stats-row;
- margin: ${parseInt(theme.spacing(2), 10) / 1.75}px 0;
- `,
- logsStatsRowActive: css`
- label: logs-stats-row--active;
- color: ${theme.colors.primary.text};
- position: relative;
- `,
- logsStatsRowLabel: css`
- label: logs-stats-row__label;
- display: flex;
- margin-bottom: 1px;
- `,
- logsStatsRowValue: css`
- label: logs-stats-row__value;
- flex: 1;
- text-overflow: ellipsis;
- overflow: hidden;
- `,
- logsStatsRowCount: css`
- label: logs-stats-row__count;
- text-align: right;
- margin-left: ${theme.spacing(0.75)};
- `,
- logsStatsRowPercent: css`
- label: logs-stats-row__percent;
- text-align: right;
- margin-left: ${theme.spacing(0.75)};
- width: ${theme.spacing(4.5)};
- `,
- logsStatsRowBar: css`
- label: logs-stats-row__bar;
- height: ${theme.spacing(0.5)};
- overflow: hidden;
- background: ${theme.colors.text.disabled};
- `,
- logsStatsRowInnerBar: css`
- label: logs-stats-row__innerbar;
- height: ${theme.spacing(0.5)};
- overflow: hidden;
- background: ${theme.colors.primary.main};
- `,
+ logsStatsRow: css({
+ label: 'logs-stats-row',
+ margin: `${parseInt(theme.spacing(2), 10) / 1.75}px 0`,
+ }),
+ logsStatsRowActive: css({
+ label: 'logs-stats-row--active',
+ color: theme.colors.primary.text,
+ position: 'relative',
+ }),
+ logsStatsRowLabel: css({
+ label: 'logs-stats-row__label',
+ display: 'flex',
+ marginBottom: '1px',
+ }),
+ logsStatsRowValue: css({
+ label: 'logs-stats-row__value',
+ flex: 1,
+ textOverflow: 'ellipsis',
+ overflow: 'hidden',
+ }),
+ logsStatsRowCount: css({
+ label: 'logs-stats-row__count',
+ textAlign: 'right',
+ marginLeft: theme.spacing(0.75),
+ }),
+ logsStatsRowPercent: css({
+ label: 'logs-stats-row__percent',
+ textAlign: 'right',
+ marginLeft: theme.spacing(0.75),
+ width: theme.spacing(4.5),
+ }),
+ logsStatsRowBar: css({
+ label: 'logs-stats-row__bar',
+ height: theme.spacing(0.5),
+ overflow: 'hidden',
+ background: theme.colors.text.disabled,
+ }),
+ logsStatsRowInnerBar: css({
+ label: 'logs-stats-row__innerbar',
+ height: theme.spacing(0.5),
+ overflow: 'hidden',
+ background: theme.colors.primary.main,
+ }),
});
export interface Props {
diff --git a/public/app/features/logs/components/LogLabels.tsx b/public/app/features/logs/components/LogLabels.tsx
index 9fa3e77b112..c3d7b9117ad 100644
--- a/public/app/features/logs/components/LogLabels.tsx
+++ b/public/app/features/logs/components/LogLabels.tsx
@@ -86,28 +86,28 @@ LogLabel.displayName = 'LogLabel';
const getStyles = (theme: GrafanaTheme2) => {
return {
- logsLabels: css`
- display: flex;
- flex-wrap: wrap;
- font-size: ${theme.typography.size.xs};
- `,
- logsLabel: css`
- label: logs-label;
- display: flex;
- padding: ${theme.spacing(0, 0.25)};
- background-color: ${theme.colors.background.secondary};
- border-radius: ${theme.shape.radius.default};
- margin: ${theme.spacing(0.125, 0.5, 0, 0)};
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- `,
- logsLabelValue: css`
- label: logs-label__value;
- display: inline-block;
- max-width: ${theme.spacing(25)};
- text-overflow: ellipsis;
- overflow: hidden;
- `,
+ logsLabels: css({
+ display: 'flex',
+ flexWrap: 'wrap',
+ fontSize: theme.typography.size.xs,
+ }),
+ logsLabel: css({
+ label: 'logs-label',
+ display: 'flex',
+ padding: theme.spacing(0, 0.25),
+ backgroundColor: theme.colors.background.secondary,
+ borderRadius: theme.shape.radius.default,
+ margin: theme.spacing(0.125, 0.5, 0, 0),
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ }),
+ logsLabelValue: css({
+ label: 'logs-label__value',
+ display: 'inline-block',
+ maxWidth: theme.spacing(25),
+ textOverflow: 'ellipsis',
+ overflow: 'hidden',
+ }),
};
};
diff --git a/public/app/features/logs/components/LogRowMessageDisplayedFields.tsx b/public/app/features/logs/components/LogRowMessageDisplayedFields.tsx
index 4bc81f76cee..5391dd0cce9 100644
--- a/public/app/features/logs/components/LogRowMessageDisplayedFields.tsx
+++ b/public/app/features/logs/components/LogRowMessageDisplayedFields.tsx
@@ -72,9 +72,9 @@ export const LogRowMessageDisplayedFields = memo((props: Props) => {
});
const displayedFieldsStyles = {
- noWrap: css`
- white-space: nowrap;
- `,
+ noWrap: css({
+ whiteSpace: 'nowrap',
+ }),
};
LogRowMessageDisplayedFields.displayName = 'LogRowMessageDisplayedFields';
diff --git a/public/app/features/logs/components/getLogRowStyles.ts b/public/app/features/logs/components/getLogRowStyles.ts
index e3609dae455..eec5a40bfe4 100644
--- a/public/app/features/logs/components/getLogRowStyles.ts
+++ b/public/app/features/logs/components/getLogRowStyles.ts
@@ -32,11 +32,11 @@ export const getLogLevelStyles = (theme: GrafanaTheme2, logLevel?: LogLevel) =>
}
return {
- logsRowLevelColor: css`
- &::after {
- background-color: ${logColor};
- }
- `,
+ logsRowLevelColor: css({
+ '&::after': {
+ backgroundColor: logColor,
+ },
+ }),
};
};
@@ -44,79 +44,79 @@ export const getLogRowStyles = memoizeOne((theme: GrafanaTheme2) => {
const hoverBgColor = styleMixins.hoverColor(theme.colors.background.secondary, theme);
const contextOutlineColor = tinycolor(theme.components.dashboard.background).setAlpha(0.7).toRgbString();
return {
- logsRowLevel: css`
- label: logs-row__level;
- max-width: ${theme.spacing(1.25)};
- cursor: default;
- &::after {
- content: '';
- display: block;
- position: absolute;
- top: 1px;
- bottom: 1px;
- width: 3px;
- left: ${theme.spacing(0.5)};
- }
- `,
+ logsRowLevel: css({
+ label: 'logs-row__level',
+ maxWidth: theme.spacing(1.25),
+ cursor: 'default',
+ '&::after': {
+ content: "''",
+ display: 'block',
+ position: 'absolute',
+ top: '1px',
+ bottom: '1px',
+ width: '3px',
+ left: theme.spacing(0.5),
+ },
+ }),
// Compared to logsRowLevel we need to make error logs wider to accommodate the icon
logsRowWithError: css({
maxWidth: `${theme.spacing(1.5)}`,
}),
- logsRowMatchHighLight: css`
- label: logs-row__match-highlight;
- background: inherit;
- padding: inherit;
- color: ${theme.components.textHighlight.text}
- background-color: ${theme.components.textHighlight};
- `,
+ logsRowMatchHighLight: css({
+ label: 'logs-row__match-highlight',
+ background: 'inherit',
+ padding: 'inherit',
+ color: theme.components.textHighlight.text,
+ backgroundColor: theme.components.textHighlight.background,
+ }),
logRows: css({
position: 'relative',
}),
- logsRowsTable: css`
- label: logs-rows;
- font-family: ${theme.typography.fontFamilyMonospace};
- font-size: ${theme.typography.bodySmall.fontSize};
- width: 100%;
- position: relative;
- `,
- logsRowsTableContain: css`
- contain: strict;
- `,
- highlightBackground: css`
- background-color: ${tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString()};
- `,
- logsRow: css`
- label: logs-row;
- width: 100%;
- cursor: pointer;
- vertical-align: top;
+ logsRowsTable: css({
+ label: 'logs-rows',
+ fontFamily: theme.typography.fontFamilyMonospace,
+ fontSize: theme.typography.bodySmall.fontSize,
+ width: '100%',
+ position: 'relative',
+ }),
+ logsRowsTableContain: css({
+ contain: 'strict',
+ }),
+ highlightBackground: css({
+ backgroundColor: tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString(),
+ }),
+ logsRow: css({
+ label: 'logs-row',
+ width: '100%',
+ cursor: 'pointer',
+ verticalAlign: 'top',
- &:hover {
- .log-row-menu {
- z-index: 1;
- }
+ '&:hover': {
+ '.log-row-menu': {
+ zIndex: 1,
+ },
- background: ${hoverBgColor};
- }
+ background: hoverBgColor,
+ },
- td:not(.log-row-menu-cell):last-child {
- width: 100%;
- }
+ 'td:not(.log-row-menu-cell):last-child': {
+ width: '100%',
+ },
- > td:not(.log-row-menu-cell) {
- position: relative;
- padding-right: ${theme.spacing(1)};
- border-top: 1px solid transparent;
- border-bottom: 1px solid transparent;
- height: 100%;
- }
- `,
- logsRowDuplicates: css`
- label: logs-row__duplicates;
- text-align: right;
- width: 4em;
- cursor: default;
- `,
+ '> td:not(.log-row-menu-cell)': {
+ position: 'relative',
+ paddingRight: theme.spacing(1),
+ borderTop: '1px solid transparent',
+ borderBottom: '1px solid transparent',
+ height: '100%',
+ },
+ }),
+ logsRowDuplicates: css({
+ label: 'logs-row__duplicates',
+ textAlign: 'right',
+ width: '4em',
+ cursor: 'default',
+ }),
logIconError: css({
color: theme.colors.warning.main,
position: 'relative',
@@ -127,202 +127,201 @@ export const getLogRowStyles = memoizeOne((theme: GrafanaTheme2) => {
position: 'relative',
top: '-2px',
}),
- logsRowToggleDetails: css`
- label: logs-row-toggle-details__level;
- font-size: 9px;
- padding-top: 5px;
- max-width: 15px;
- `,
- logsRowLocalTime: css`
- label: logs-row__localtime;
- white-space: nowrap;
- `,
- logsRowLabels: css`
- label: logs-row__labels;
- white-space: nowrap;
- max-width: 22em;
+ logsRowToggleDetails: css({
+ label: 'logs-row-toggle-details__level',
+ fontSize: '9px',
+ paddingTop: '5px',
+ maxWidth: '15px',
+ }),
+ logsRowLocalTime: css({
+ label: 'logs-row__localtime',
+ whiteSpace: 'nowrap',
+ }),
+ logsRowLabels: css({
+ label: 'logs-row__labels',
+ whiteSpace: 'nowrap',
+ maxWidth: '22em',
/* This is to make the labels vertical align */
- > span {
- margin-top: 0.75px;
- }
- `,
- logsRowMessage: css`
- label: logs-row__message;
- white-space: pre-wrap;
- word-break: break-all;
- overflow-wrap: anywhere;
- width: 100%;
- text-align: left;
- `,
- copyLogButton: css`
- padding: 0 0 0 ${theme.spacing(0.5)};
- height: ${theme.spacing(3)};
- width: ${theme.spacing(3.25)};
- line-height: ${theme.spacing(2.5)};
- overflow: hidden;
- &:hover {
- background-color: ${colorManipulator.alpha(theme.colors.text.primary, 0.12)};
- }
- }
- `,
+ '> span': {
+ marginTop: '0.75px',
+ },
+ }),
+ logsRowMessage: css({
+ label: 'logs-row__message',
+ whiteSpace: 'pre-wrap',
+ wordBreak: 'break-all',
+ overflowWrap: 'anywhere',
+ width: '100%',
+ textAlign: 'left',
+ }),
+ copyLogButton: css({
+ padding: theme.spacing(0, 0, 0, 0.5),
+ height: theme.spacing(3),
+ width: theme.spacing(3.25),
+ lineHeight: theme.spacing(2.5),
+ overflow: 'hidden',
+ '&:hover': {
+ backgroundColor: colorManipulator.alpha(theme.colors.text.primary, 0.12),
+ },
+ }),
//Log details specific CSS
- logDetailsContainer: css`
- label: logs-row-details-table;
- border: 1px solid ${theme.colors.border.medium};
- padding: 0 ${theme.spacing(1)} ${theme.spacing(1)};
- border-radius: ${theme.shape.radius.default};
- margin: ${theme.spacing(2.5)} ${theme.spacing(1)} ${theme.spacing(2.5)} ${theme.spacing(2)};
- cursor: default;
- `,
- logDetailsTable: css`
- label: logs-row-details-table;
- line-height: 18px;
- width: 100%;
- td:last-child {
- width: 100%;
- }
- `,
- logsDetailsIcon: css`
- label: logs-row-details__icon;
- position: relative;
- color: ${theme.v1.palette.gray3};
- padding-top: 1px;
- padding-bottom: 1px;
- padding-right: ${theme.spacing(0.75)};
- `,
- logDetailsLabel: css`
- label: logs-row-details__label;
- max-width: 30em;
- min-width: 20em;
- padding: 0 ${theme.spacing(1)};
- overflow-wrap: break-word;
- `,
- logDetailsHeading: css`
- label: logs-row-details__heading;
- font-weight: ${theme.typography.fontWeightBold};
- padding: ${theme.spacing(1)} 0 ${theme.spacing(0.5)};
- `,
- logDetailsValue: css`
- label: logs-row-details__row;
- position: relative;
- vertical-align: middle;
- cursor: default;
+ logDetailsContainer: css({
+ label: 'logs-row-details-table',
+ border: `1px solid ${theme.colors.border.medium}`,
+ padding: theme.spacing(0, 1, 1),
+ borderRadius: theme.shape.radius.default,
+ margin: theme.spacing(2.5, 1, 2.5, 2),
+ cursor: 'default',
+ }),
+ logDetailsTable: css({
+ label: 'logs-row-details-table',
+ lineHeight: '18px',
+ width: '100%',
+ 'td:last-child': {
+ width: '100%',
+ },
+ }),
+ logsDetailsIcon: css({
+ label: 'logs-row-details__icon',
+ position: 'relative',
+ color: theme.v1.palette.gray3,
+ paddingTop: '1px',
+ paddingBottom: '1px',
+ paddingRight: theme.spacing(0.75),
+ }),
+ logDetailsLabel: css({
+ label: 'logs-row-details__label',
+ maxWidth: '30em',
+ minMidth: '20em',
+ padding: theme.spacing(0, 1),
+ overflowWrap: 'break-word',
+ }),
+ logDetailsHeading: css({
+ label: 'logs-row-details__heading',
+ fontWeight: theme.typography.fontWeightBold,
+ padding: theme.spacing(1, 0, 0.5),
+ }),
+ logDetailsValue: css({
+ label: 'logs-row-details__row',
+ position: 'relative',
+ verticalAlign: 'middle',
+ cursor: 'default',
- &:hover {
- background-color: ${hoverBgColor};
- }
- `,
+ '&:hover': {
+ backgroundColor: hoverBgColor,
+ },
+ }),
// Log row
- topVerticalAlign: css`
- label: topVerticalAlign;
- margin-top: -${theme.spacing(0.9)};
- margin-left: -${theme.spacing(0.25)};
- `,
- detailsOpen: css`
- &:hover {
- background-color: ${styleMixins.hoverColor(theme.colors.background.primary, theme)};
- }
- `,
- errorLogRow: css`
- label: erroredLogRow;
- color: ${theme.colors.text.secondary};
- `,
+ topVerticalAlign: css({
+ label: 'topVerticalAlign',
+ marginTop: theme.spacing(-0.9),
+ marginLeft: theme.spacing(-0.25),
+ }),
+ detailsOpen: css({
+ '&:hover': {
+ backgroundColor: styleMixins.hoverColor(theme.colors.background.primary, theme),
+ },
+ }),
+ errorLogRow: css({
+ label: 'erroredLogRow',
+ color: theme.colors.text.secondary,
+ }),
// Log Row Message
- positionRelative: css`
- label: positionRelative;
- position: relative;
- `,
- rowWithContext: css`
- label: rowWithContext;
- z-index: 1;
- outline: 9999px solid ${contextOutlineColor};
- display: inherit;
- `,
- horizontalScroll: css`
- label: horizontalScroll;
- white-space: pre;
- `,
- contextNewline: css`
- display: block;
- margin-left: 0px;
- `,
- rowMenu: css`
- label: rowMenu;
- display: flex;
- flex-wrap: nowrap;
- flex-direction: row;
- align-content: flex-end;
- justify-content: space-evenly;
- align-items: center;
- position: absolute;
- top: 0;
- bottom: auto;
- background: ${theme.colors.background.primary};
- box-shadow: ${theme.shadows.z3};
- padding: ${theme.spacing(0.5, 1, 0.5, 1)};
- z-index: 100;
- gap: ${theme.spacing(0.5)};
+ positionRelative: css({
+ label: 'positionRelative',
+ position: 'relative',
+ }),
+ rowWithContext: css({
+ label: 'rowWithContext',
+ zIndex: 1,
+ outline: `9999px solid ${contextOutlineColor}`,
+ display: 'inherit',
+ }),
+ horizontalScroll: css({
+ label: 'horizontalScroll',
+ whiteSpace: 'pre',
+ }),
+ contextNewline: css({
+ display: 'block',
+ marginLeft: '0px',
+ }),
+ rowMenu: css({
+ label: 'rowMenu',
+ display: 'flex',
+ flexWrap: 'nowrap',
+ flexDirection: 'row',
+ alignContent: 'flex-end',
+ justifyContent: 'space-evenly',
+ alignItems: 'center',
+ position: 'absolute',
+ top: 0,
+ bottom: 'auto',
+ background: theme.colors.background.primary,
+ boxShadow: theme.shadows.z3,
+ padding: theme.spacing(0.5, 1, 0.5, 1),
+ zIndex: 100,
+ gap: theme.spacing(0.5),
- & > button {
- margin: 0;
- }
- `,
- logRowMenuCell: css`
- position: sticky;
- z-index: ${theme.zIndex.dropdown};
- margin-top: -${theme.spacing(0.125)};
- right: 0px;
+ '& > button': {
+ margin: 0,
+ },
+ }),
+ logRowMenuCell: css({
+ position: 'sticky',
+ zIndex: theme.zIndex.dropdown,
+ marginTop: theme.spacing(-0.125),
+ right: 0,
- & > span {
- transform: translateX(-100%);
- }
- `,
- logLine: css`
- background-color: transparent;
- border: none;
- diplay: inline;
- font-family: ${theme.typography.fontFamilyMonospace};
- font-size: ${theme.typography.bodySmall.fontSize};
- letter-spacing: ${theme.typography.bodySmall.letterSpacing};
- text-align: left;
- padding: 0;
- user-select: text;
- `,
+ '& > span': {
+ transform: 'translateX(-100%)',
+ },
+ }),
+ logLine: css({
+ backgroundColor: 'transparent',
+ border: 'none',
+ diplay: 'inline',
+ fontFamily: theme.typography.fontFamilyMonospace,
+ fontSize: theme.typography.bodySmall.fontSize,
+ letterSpacing: theme.typography.bodySmall.letterSpacing,
+ textAlign: 'left',
+ padding: 0,
+ userSelect: 'text',
+ }),
// Log details
- logsRowLevelDetails: css`
- label: logs-row__level_details;
- &::after {
- top: -3px;
- }
- `,
- logDetails: css`
- label: logDetailsDefaultCursor;
- cursor: default;
+ logsRowLevelDetails: css({
+ label: 'logs-row__level_details',
+ '&::after': {
+ top: '-3px',
+ },
+ }),
+ logDetails: css({
+ label: 'logDetailsDefaultCursor',
+ cursor: 'default',
- &:hover {
- background-color: ${theme.colors.background.primary};
- }
- `,
- visibleRowMenu: css`
- label: visibleRowMenu;
- aspect-ratio: 1/1;
- z-index: 90;
- `,
- linkButton: css`
- label: linkButton;
- > button {
- padding-top: ${theme.spacing(0.5)};
- }
- `,
- hidden: css`
- label: hidden;
- visibility: hidden;
- `,
- unPinButton: css`
- height: ${theme.spacing(3)};
- line-height: ${theme.spacing(2.5)};
- `,
+ '&:hover': {
+ backgroundColor: theme.colors.background.primary,
+ },
+ }),
+ visibleRowMenu: css({
+ label: 'visibleRowMenu',
+ aspectRatio: '1/1',
+ zIndex: 90,
+ }),
+ linkButton: css({
+ label: 'linkButton',
+ '> button': {
+ paddingTop: theme.spacing(0.5),
+ },
+ }),
+ hidden: css({
+ label: 'hidden',
+ visibility: 'hidden',
+ }),
+ unPinButton: css({
+ height: theme.spacing(3),
+ lineHeight: theme.spacing(2.5),
+ }),
};
});