mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 07:56:56 +00:00
* added more changes to query builder * added types for composite queries * (feat): added edit rules and create rules forms * (feat): added chart preview for alert metric ui * (feat): added threshold in chart, translations in alert form and a few fixes * feat: added a link for alert name in list alerts page and source for each rule update Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
27 lines
572 B
TypeScript
27 lines
572 B
TypeScript
import React from 'react';
|
|
|
|
import { QueryChipContainer, QueryChipItem } from './styles';
|
|
import { ILabelRecord } from './types';
|
|
|
|
interface QueryChipProps {
|
|
queryData: ILabelRecord;
|
|
onRemove: (id: string) => void;
|
|
}
|
|
|
|
export default function QueryChip({
|
|
queryData,
|
|
onRemove,
|
|
}: QueryChipProps): JSX.Element {
|
|
const { key, value } = queryData;
|
|
return (
|
|
<QueryChipContainer>
|
|
<QueryChipItem
|
|
closable={key !== 'severity' && key !== 'description'}
|
|
onClose={(): void => onRemove(key)}
|
|
>
|
|
{key}: {value}
|
|
</QueryChipItem>
|
|
</QueryChipContainer>
|
|
);
|
|
}
|