mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: UX/UI improvements for pausing and resuming of live tailing (#18931)
This commit is contained in:
parent
8c79085351
commit
14a740572d
@ -74,6 +74,7 @@ exports[`Render should render with base threshold 1`] = `
|
|||||||
Object {
|
Object {
|
||||||
"background": Object {
|
"background": Object {
|
||||||
"dropdown": "#1f1f20",
|
"dropdown": "#1f1f20",
|
||||||
|
"logsFresh": "#5794F240",
|
||||||
"scrollbar": "#343436",
|
"scrollbar": "#343436",
|
||||||
"scrollbar2": "#343436",
|
"scrollbar2": "#343436",
|
||||||
},
|
},
|
||||||
@ -235,6 +236,7 @@ exports[`Render should render with base threshold 1`] = `
|
|||||||
Object {
|
Object {
|
||||||
"background": Object {
|
"background": Object {
|
||||||
"dropdown": "#1f1f20",
|
"dropdown": "#1f1f20",
|
||||||
|
"logsFresh": "#5794F240",
|
||||||
"scrollbar": "#343436",
|
"scrollbar": "#343436",
|
||||||
"scrollbar2": "#343436",
|
"scrollbar2": "#343436",
|
||||||
},
|
},
|
||||||
|
@ -75,6 +75,7 @@ const darkTheme: GrafanaTheme = {
|
|||||||
dropdown: basicColors.dark3,
|
dropdown: basicColors.dark3,
|
||||||
scrollbar: basicColors.dark9,
|
scrollbar: basicColors.dark9,
|
||||||
scrollbar2: basicColors.dark9,
|
scrollbar2: basicColors.dark9,
|
||||||
|
logsFresh: '#5794F240',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ const lightTheme: GrafanaTheme = {
|
|||||||
dropdown: basicColors.white,
|
dropdown: basicColors.white,
|
||||||
scrollbar: basicColors.gray5,
|
scrollbar: basicColors.gray5,
|
||||||
scrollbar2: basicColors.gray5,
|
scrollbar2: basicColors.gray5,
|
||||||
|
logsFresh: '#d8e7ff',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ export interface GrafanaTheme extends GrafanaThemeCommons {
|
|||||||
dropdown: string;
|
dropdown: string;
|
||||||
scrollbar: string;
|
scrollbar: string;
|
||||||
scrollbar2: string;
|
scrollbar2: string;
|
||||||
|
logsFresh: string;
|
||||||
};
|
};
|
||||||
colors: {
|
colors: {
|
||||||
black: string;
|
black: string;
|
||||||
|
@ -10,6 +10,8 @@ import ElapsedTime from './ElapsedTime';
|
|||||||
const getStyles = (theme: GrafanaTheme) => ({
|
const getStyles = (theme: GrafanaTheme) => ({
|
||||||
logsRowsLive: css`
|
logsRowsLive: css`
|
||||||
label: logs-rows-live;
|
label: logs-rows-live;
|
||||||
|
font-family: ${theme.typography.fontFamily.monospace};
|
||||||
|
font-size: ${theme.typography.size.sm};
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
height: 65vh;
|
height: 65vh;
|
||||||
@ -21,15 +23,29 @@ const getStyles = (theme: GrafanaTheme) => ({
|
|||||||
logsRowFresh: css`
|
logsRowFresh: css`
|
||||||
label: logs-row-fresh;
|
label: logs-row-fresh;
|
||||||
color: ${theme.colors.text};
|
color: ${theme.colors.text};
|
||||||
background-color: ${selectThemeVariant({ light: theme.colors.gray6, dark: theme.colors.gray1 }, theme.type)};
|
background-color: ${selectThemeVariant(
|
||||||
|
{ light: theme.background.logsFresh, dark: theme.background.logsFresh },
|
||||||
|
theme.type
|
||||||
|
)};
|
||||||
|
animation: fade 1s ease-out 1s 1 normal forwards;
|
||||||
|
@keyframes fade {
|
||||||
|
from {
|
||||||
|
background-color: ${selectThemeVariant(
|
||||||
|
{ light: theme.background.logsFresh, dark: theme.background.logsFresh },
|
||||||
|
theme.type
|
||||||
|
)};
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
logsRowOld: css`
|
logsRowOld: css`
|
||||||
label: logs-row-old;
|
label: logs-row-old;
|
||||||
opacity: 0.8;
|
|
||||||
`,
|
`,
|
||||||
logsRowsIndicator: css`
|
logsRowsIndicator: css`
|
||||||
font-size: ${theme.typography.size.md};
|
font-size: ${theme.typography.size.md};
|
||||||
padding: ${theme.spacing.sm} 0;
|
padding-top: ${theme.spacing.sm};
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
`,
|
`,
|
||||||
@ -186,8 +202,8 @@ class LiveLogs extends PureComponent<Props, State> {
|
|||||||
{isPaused ? 'Resume' : 'Pause'}
|
{isPaused ? 'Resume' : 'Pause'}
|
||||||
</button>
|
</button>
|
||||||
<button onClick={this.props.stopLive} className={cx('btn btn-inverse', styles.button)}>
|
<button onClick={this.props.stopLive} className={cx('btn btn-inverse', styles.button)}>
|
||||||
<i className={'fa fa-stop'} />
|
<i className={'fa fa-times'} />
|
||||||
Stop
|
Exit live mode
|
||||||
</button>
|
</button>
|
||||||
{isPaused || (
|
{isPaused || (
|
||||||
<span>
|
<span>
|
||||||
|
Loading…
Reference in New Issue
Block a user