mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 16:07:10 +00:00
* feat: added traceoperator component and styles * chore: minor style improvments * feat: added conditions for traceoperator * chore: minor UI fixes * chore: type changes * chore: added initialvalue for trace operators * chore: Added changes to prepare request payload * chore: fixed minor styles + minor ux fix * feat: added span selector * chore: added ui changes in the editor * chore: removed traceoperations and reused queryoperations * chore: minor changes in queryaddon and aggregation for support * chore: added traceoperators in alerts * chore: minor pr review change * chore: linter fix * fix: fixed minor ts issues * fix: added limit support in traceoperator * chore: minor fix in traceoperator styles * chore: linting fix + icon changes * chore: updated type * chore: lint fixes * feat: added changes for showing querynames in alerts * feat: added trace operator grammer + antlr files * feat: added traceoperator context util * chore: added traceoperator validation function * feat: added traceoperator editor * feat: added queryname boost + operator constants * fix: pr reviews * chore: minor ui fix * fix: updated grammer files * test: added test for traceoperatorcontext * chore: removed check for multiple queries in traceexplorer * test: minor test fix * test: fixed breaking mapQueryDataFromApi test * chore: fixed logic to show trace operator * chore: updated docs link * chore: minor ui issue fix * chore: changed trace operator query name * chore: removed using spans from in trace opeartors * fix: added fix for order by in trace opeartor * feat: added changes related to saved in views in trace opeartor * chore: added changes to keep indirect descendent operator at bottom * chore: removed returnspansfrom field from traceoperator * chore: updated file names + regenerated grammer * chore: added beta tag in trace opeartor * chore: pr review fixes * Fix/tsc trace operator + tests (#8942) * fix: added tsc fixes for trace operator * chore: moved traceoperator utils * test: added test for traceopertor util * chore: tsc fix * fix: fixed tsc issue * Feat/trace operator dashboards (#8992) * chore: added callout message for multiple queries without trace operators * feat: added changes for supporting trace operators in dashboards * chore: minor changes for list panel
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import './SignozRadioGroup.styles.scss';
|
|
|
|
import { Radio } from 'antd';
|
|
import { RadioChangeEvent } from 'antd/es/radio';
|
|
|
|
interface Option {
|
|
value: string;
|
|
label: string;
|
|
icon?: React.ReactNode;
|
|
}
|
|
|
|
interface SignozRadioGroupProps {
|
|
value: string;
|
|
options: Option[];
|
|
onChange: (e: RadioChangeEvent) => void;
|
|
className?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
function SignozRadioGroup({
|
|
value,
|
|
options,
|
|
onChange,
|
|
className = '',
|
|
disabled = false,
|
|
}: SignozRadioGroupProps): JSX.Element {
|
|
return (
|
|
<Radio.Group
|
|
value={value}
|
|
buttonStyle="solid"
|
|
className={`signoz-radio-group ${className}`}
|
|
onChange={onChange}
|
|
disabled={disabled}
|
|
>
|
|
{options.map((option) => (
|
|
<Radio.Button
|
|
key={option.value}
|
|
value={option.value}
|
|
className={value === option.value ? 'selected_view tab' : 'tab'}
|
|
>
|
|
<div className="view-title-container">
|
|
{option.icon && <div className="icon-container">{option.icon}</div>}
|
|
{option.label}
|
|
</div>
|
|
</Radio.Button>
|
|
))}
|
|
</Radio.Group>
|
|
);
|
|
}
|
|
|
|
SignozRadioGroup.defaultProps = {
|
|
className: '',
|
|
disabled: false,
|
|
};
|
|
|
|
export default SignozRadioGroup;
|