mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Flame Graph: Exact search (#56769)
* Use exact match * Create searchable FlameGraphPanel.tsx
This commit is contained in:
parent
7386f8652c
commit
8f75ec4007
9
public/app/plugins/panel/flamegraph/FlameGraphPanel.tsx
Normal file
9
public/app/plugins/panel/flamegraph/FlameGraphPanel.tsx
Normal file
@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
import { CoreApp, PanelProps } from '@grafana/data';
|
||||
|
||||
import FlameGraphContainer from './components/FlameGraphContainer';
|
||||
|
||||
export const FlameGraphPanel: React.FunctionComponent<PanelProps> = (props) => {
|
||||
return <FlameGraphContainer data={props.data.series[0]} app={CoreApp.Unknown} flameGraphHeight={props.height} />;
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
import { colors, fuzzyMatch } from '@grafana/ui';
|
||||
import { colors } from '@grafana/ui';
|
||||
|
||||
import {
|
||||
BAR_BORDER_WIDTH,
|
||||
@ -93,7 +93,7 @@ export function renderRect(
|
||||
const l = 65 + 7 * intensity;
|
||||
|
||||
const name = rect.label;
|
||||
const queryResult = query && fuzzyMatch(name.toLowerCase(), query.toLowerCase()).found;
|
||||
const queryResult = query && name.toLowerCase().includes(query.toLowerCase());
|
||||
|
||||
if (!rect.collapsed) {
|
||||
ctx.stroke();
|
||||
|
@ -1,11 +1,5 @@
|
||||
import React from 'react';
|
||||
import { PanelPlugin } from '@grafana/data';
|
||||
|
||||
import { CoreApp, PanelPlugin, PanelProps } from '@grafana/data';
|
||||
|
||||
import FlameGraphContainer from './components/FlameGraphContainer';
|
||||
|
||||
export const FlameGraphPanel: React.FunctionComponent<PanelProps> = (props) => {
|
||||
return <FlameGraphContainer data={props.data.series[0]} app={CoreApp.Unknown} flameGraphHeight={props.height} />;
|
||||
};
|
||||
import { FlameGraphPanel } from './FlameGraphPanel';
|
||||
|
||||
export const plugin = new PanelPlugin(FlameGraphPanel);
|
||||
|
Loading…
Reference in New Issue
Block a user