mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
b5e0c20595
commit
21ffb1ed5e
1 changed files with 14 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { EuiDatePicker, EuiFilterButton, EuiFilterGroup } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
|
||||
import moment, { Moment } from 'moment';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
@ -18,11 +18,12 @@ interface LogTimeControlsProps {
|
|||
stopLiveStreaming: () => any;
|
||||
isLiveStreaming: boolean;
|
||||
jumpToTime: (time: number) => any;
|
||||
intl: InjectedIntl;
|
||||
}
|
||||
|
||||
export class LogTimeControls extends React.PureComponent<LogTimeControlsProps> {
|
||||
class LogTimeControlsUI extends React.PureComponent<LogTimeControlsProps> {
|
||||
public render() {
|
||||
const { currentTime, isLiveStreaming } = this.props;
|
||||
const { currentTime, isLiveStreaming, intl } = this.props;
|
||||
|
||||
const currentMoment = currentTime ? moment(currentTime) : null;
|
||||
|
||||
|
@ -30,7 +31,14 @@ export class LogTimeControls extends React.PureComponent<LogTimeControlsProps> {
|
|||
return (
|
||||
<EuiFilterGroup>
|
||||
<InlineWrapper>
|
||||
<EuiDatePicker disabled onChange={noop} value="streaming..." />
|
||||
<EuiDatePicker
|
||||
disabled
|
||||
onChange={noop}
|
||||
value={intl.formatMessage({
|
||||
id: 'xpack.infra.logs.streamingDescription',
|
||||
defaultMessage: 'streaming…',
|
||||
})}
|
||||
/>
|
||||
</InlineWrapper>
|
||||
<EuiFilterButton
|
||||
color="primary"
|
||||
|
@ -86,6 +94,8 @@ export class LogTimeControls extends React.PureComponent<LogTimeControlsProps> {
|
|||
};
|
||||
}
|
||||
|
||||
export const LogTimeControls = injectI18n(LogTimeControlsUI);
|
||||
|
||||
const InlineWrapper = styled.div`
|
||||
display: inline-block;
|
||||
`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue