GrafanaUI: mark all Log components deprecated (#55404)

This commit is contained in:
Sven Grossmann 2022-09-20 08:48:32 +02:00 committed by GitHub
parent caba98590d
commit 95ddfe8ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 26 additions and 7 deletions

View File

@ -22,8 +22,7 @@ import { LogDetailsRow } from './LogDetailsRow';
import { getLogRowStyles } from './getLogRowStyles';
import { getAllFields } from './logParser';
//Components
/** @deprecated will be removed in the next major version */
export interface Props extends Themeable2 {
row: LogRowModel;
showDuplicates: boolean;
@ -176,5 +175,6 @@ class UnThemedLogDetails extends PureComponent<Props> {
}
}
/** @deprecated will be removed in the next major version */
export const LogDetails = withTheme2(UnThemedLogDetails);
LogDetails.displayName = 'LogDetails';

View File

@ -12,8 +12,7 @@ import { IconButton } from '../IconButton/IconButton';
import { LogLabelStats } from './LogLabelStats';
import { getLogRowStyles } from './getLogRowStyles';
//Components
/** @deprecated will be removed in the next major version */
export interface Props extends Themeable2 {
parsedValue: string;
parsedKey: string;
@ -220,5 +219,6 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
}
}
/** @deprecated will be removed in the next major version */
export const LogDetailsRow = withTheme2(UnThemedLogDetailsRow);
LogDetailsRow.displayName = 'LogDetailsRow';

View File

@ -96,5 +96,6 @@ class UnThemedLogLabelStats extends PureComponent<Props> {
}
}
/** @deprecated will be removed in the next major version */
export const LogLabelStats = withTheme2(UnThemedLogLabelStats);
LogLabelStats.displayName = 'LogLabelStats';

View File

@ -51,6 +51,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
`,
});
/** @deprecated will be removed in the next major version */
export interface Props {
active?: boolean;
count: number;
@ -58,6 +59,7 @@ export interface Props {
value?: string;
}
/** @deprecated will be removed in the next major version */
export const LogLabelStatsRow: FunctionComponent<Props> = ({ active, count, proportion, value }) => {
const style = useStyles2(getStyles);
const percent = `${Math.round(proportion * 100)}%`;

View File

@ -49,6 +49,7 @@ interface State {
prevValue: string;
}
/** @deprecated will be removed in the next major version */
export class UnThemedLogMessageAnsi extends PureComponent<Props, State> {
state: State = {
chunks: [],

View File

@ -256,5 +256,6 @@ class UnThemedLogRow extends PureComponent<Props, State> {
}
}
/** @deprecated will be removed in the next major version */
export const LogRow = withTheme2(UnThemedLogRow);
LogRow.displayName = 'LogRow';

View File

@ -123,6 +123,7 @@ const LogRowContextGroupHeader: React.FunctionComponent<LogRowContextGroupHeader
);
};
/** @deprecated will be removed in the next major version */
export const LogRowContextGroup: React.FunctionComponent<LogRowContextGroupProps> = ({
row,
rows,
@ -184,6 +185,7 @@ export const LogRowContextGroup: React.FunctionComponent<LogRowContextGroupProps
);
};
/** @deprecated will be removed in the next major version */
export const LogRowContext: React.FunctionComponent<LogRowContextProps> = ({
row,
context,

View File

@ -11,20 +11,25 @@ import {
DataQueryError,
} from '@grafana/data';
/** @deprecated will be removed in the next major version */
export interface RowContextOptions {
direction?: 'BACKWARD' | 'FORWARD';
limit?: number;
}
/** @deprecated will be removed in the next major version */
export interface LogRowContextRows {
before?: string[];
after?: string[];
}
/** @deprecated will be removed in the next major version */
export interface LogRowContextQueryErrors {
before?: string;
after?: string;
}
/** @deprecated will be removed in the next major version */
export interface HasMoreContextRows {
before: boolean;
after: boolean;
@ -48,6 +53,7 @@ interface LogRowContextProviderProps {
}) => JSX.Element;
}
/** @deprecated will be removed in the next major version */
export const getRowContexts = async (
getRowContext: (row: LogRowModel, options?: RowContextOptions) => Promise<DataQueryResponse>,
row: LogRowModel,
@ -130,6 +136,7 @@ export const getRowContexts = async (
};
};
/** @deprecated will be removed in the next major version */
export const LogRowContextProvider: React.FunctionComponent<LogRowContextProviderProps> = ({
getRowContext,
row,

View File

@ -16,8 +16,7 @@ import { LogRowContext } from './LogRowContext';
import { LogRowContextQueryErrors, HasMoreContextRows, LogRowContextRows } from './LogRowContextProvider';
import { getLogRowStyles } from './getLogRowStyles';
//Components
/** @deprecated will be removed in the next major version */
export const MAX_CHARACTERS = 100000;
interface Props extends Themeable2 {
@ -187,5 +186,6 @@ class UnThemedLogRowMessage extends PureComponent<Props> {
}
}
/** @deprecated will be removed in the next major version */
export const LogRowMessage = withTheme2(UnThemedLogRowMessage);
LogRowMessage.displayName = 'LogRowMessage';

View File

@ -8,6 +8,7 @@ import { Themeable2 } from '../../types/theme';
import { getAllFields } from './logParser';
/** @deprecated will be removed in the next major version */
export interface Props extends Themeable2 {
row: LogRowModel;
showDetectedFields: string[];
@ -45,5 +46,6 @@ class UnThemedLogRowMessageDetectedFields extends PureComponent<Props> {
}
}
/** @deprecated will be removed in the next major version */
export const LogRowMessageDetectedFields = withTheme2(UnThemedLogRowMessageDetectedFields);
LogRowMessageDetectedFields.displayName = 'LogRowMessageDetectedFields';

View File

@ -6,13 +6,14 @@ import { TimeZone, LogsDedupStrategy, LogRowModel, Field, LinkModel, LogsSortOrd
import { withTheme2 } from '../../themes/index';
import { Themeable2 } from '../../types/theme';
//Components
import { LogRow } from './LogRow';
import { RowContextOptions } from './LogRowContextProvider';
import { getLogRowStyles } from './getLogRowStyles';
/** @deprecated will be removed in the next major version */
export const PREVIEW_LIMIT = 100;
/** @deprecated will be removed in the next major version */
export interface Props extends Themeable2 {
logRows?: LogRowModel[];
deduplicatedRows?: LogRowModel[];

View File

@ -16,6 +16,8 @@ type FieldDef = {
/**
* Returns all fields for log row which consists of fields we parse from the message itself and additional fields
* found in the dataframe (they may contain links).
*
* @deprecated will be removed in the next major version
*/
export const getAllFields = memoizeOne(
(row: LogRowModel, getFieldLinks?: (field: Field, rowIndex: number) => Array<LinkModel<Field>>) => {