mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 08:29:03 +08:00
Resource attr filter: style fix and quick filter changes (#7691)
* chore: resource attr filter init * chore: resource attr filter api integration * chore: operator config updated * chore: fliter show hide logic and styles * chore: add support for custom operator list to qb * chore: minor refactor * chore: minor code refactor * test: quick filters test suite added * test: quick filters test suite added * test: all errors test suite added * chore: style fix * test: all errors mock fix * chore: test case fix and mixpanel update * chore: color update * chore: minor refactor * chore: style fix * chore: set default query in exceptions tab * chore: style fix * chore: minor refactor * chore: minor refactor * chore: minor refactor * chore: test update * chore: fix filter header with no query name * fix: scroll fix * chore: add data source traces to quick filters * chore: replace div with fragment --------- Co-authored-by: Aditya Singh <adityasingh@Adityas-MacBook-Pro.local>
This commit is contained in:
parent
43e2be0333
commit
ae509b4ae9
@ -8,6 +8,7 @@ import cx from 'classnames';
|
|||||||
import QuickFilters from 'components/QuickFilters/QuickFilters';
|
import QuickFilters from 'components/QuickFilters/QuickFilters';
|
||||||
import { QuickFiltersSource } from 'components/QuickFilters/types';
|
import { QuickFiltersSource } from 'components/QuickFilters/types';
|
||||||
import RouteTab from 'components/RouteTab';
|
import RouteTab from 'components/RouteTab';
|
||||||
|
import TypicalOverlayScrollbar from 'components/TypicalOverlayScrollbar/TypicalOverlayScrollbar';
|
||||||
import { LOCALSTORAGE } from 'constants/localStorage';
|
import { LOCALSTORAGE } from 'constants/localStorage';
|
||||||
import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActions/RightToolbarActions';
|
import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActions/RightToolbarActions';
|
||||||
import ResourceAttributesFilterV2 from 'container/ResourceAttributeFilterV2/ResourceAttributesFilterV2';
|
import ResourceAttributesFilterV2 from 'container/ResourceAttributeFilterV2/ResourceAttributesFilterV2';
|
||||||
@ -60,21 +61,25 @@ function AllErrors(): JSX.Element {
|
|||||||
showFilters ? 'filter-visible' : '',
|
showFilters ? 'filter-visible' : '',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Toolbar
|
<TypicalOverlayScrollbar>
|
||||||
showAutoRefresh={false}
|
<>
|
||||||
leftActions={
|
<Toolbar
|
||||||
!showFilters ? (
|
showAutoRefresh={false}
|
||||||
<Tooltip title="Show Filters">
|
leftActions={
|
||||||
<Button onClick={handleFilterVisibilityChange} className="filter-btn">
|
!showFilters ? (
|
||||||
<FilterOutlined />
|
<Tooltip title="Show Filters">
|
||||||
</Button>
|
<Button onClick={handleFilterVisibilityChange} className="filter-btn">
|
||||||
</Tooltip>
|
<FilterOutlined />
|
||||||
) : undefined
|
</Button>
|
||||||
}
|
</Tooltip>
|
||||||
rightActions={<RightToolbarActions onStageRunQuery={handleRunQuery} />}
|
) : undefined
|
||||||
/>
|
}
|
||||||
<ResourceAttributesFilterV2 />
|
rightActions={<RightToolbarActions onStageRunQuery={handleRunQuery} />}
|
||||||
<RouteTab routes={routes} activeKey={pathname} history={history} />
|
/>
|
||||||
|
<ResourceAttributesFilterV2 />
|
||||||
|
<RouteTab routes={routes} activeKey={pathname} history={history} />
|
||||||
|
</>
|
||||||
|
</TypicalOverlayScrollbar>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -3,11 +3,13 @@ import {
|
|||||||
IQuickFiltersConfig,
|
IQuickFiltersConfig,
|
||||||
} from 'components/QuickFilters/types';
|
} from 'components/QuickFilters/types';
|
||||||
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
|
||||||
|
import { DataSource } from 'types/common/queryBuilder';
|
||||||
|
|
||||||
export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'Environment',
|
title: 'Environment',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'deployment.environment',
|
key: 'deployment.environment',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -20,6 +22,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'Service Name',
|
title: 'Service Name',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'service.name',
|
key: 'service.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -32,6 +35,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'Hostname',
|
title: 'Hostname',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'host.name',
|
key: 'host.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -44,6 +48,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'K8s Cluster Name',
|
title: 'K8s Cluster Name',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'k8s.cluster.name',
|
key: 'k8s.cluster.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -56,6 +61,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'K8s Deployment Name',
|
title: 'K8s Deployment Name',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'k8s.deployment.name',
|
key: 'k8s.deployment.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -68,6 +74,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'K8s Namespace Name',
|
title: 'K8s Namespace Name',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'k8s.namespace.name',
|
key: 'k8s.namespace.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
@ -80,6 +87,7 @@ export const ExceptionsQuickFiltersConfig: IQuickFiltersConfig[] = [
|
|||||||
{
|
{
|
||||||
type: FiltersType.CHECKBOX,
|
type: FiltersType.CHECKBOX,
|
||||||
title: 'K8s Pod Name',
|
title: 'K8s Pod Name',
|
||||||
|
dataSource: DataSource.TRACES,
|
||||||
attributeKey: {
|
attributeKey: {
|
||||||
key: 'k8s.pod.name',
|
key: 'k8s.pod.name',
|
||||||
dataType: DataTypes.String,
|
dataType: DataTypes.String,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user