mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Unified search] Cleanups the showQueryBar flag (#143270)
* [Unified search] Cleanups the showQueryBar flag that is not used anymore * Fix add filter story error
This commit is contained in:
parent
b288c2fcb7
commit
411a306216
29 changed files with 9 additions and 33 deletions
|
@ -517,7 +517,6 @@ export function DashboardTopNav({
|
|||
return {
|
||||
badges,
|
||||
screenTitle,
|
||||
showQueryBar,
|
||||
showSearchBar,
|
||||
showFilterBar,
|
||||
showSaveQuery,
|
||||
|
|
|
@ -74,7 +74,6 @@ describe('ContextApp test', () => {
|
|||
const topNavProps = {
|
||||
appName: 'context',
|
||||
showSearchBar: true,
|
||||
showQueryBar: true,
|
||||
showQueryInput: false,
|
||||
showFilterBar: true,
|
||||
showSaveQuery: false,
|
||||
|
|
|
@ -145,7 +145,6 @@ export const ContextApp = ({ dataView, anchorId }: ContextAppProps) => {
|
|||
return {
|
||||
appName: 'context',
|
||||
showSearchBar: true,
|
||||
showQueryBar: true,
|
||||
showQueryInput: false,
|
||||
showFilterBar: true,
|
||||
showSaveQuery: false,
|
||||
|
|
|
@ -24,7 +24,6 @@ export type TopNavMenuProps<QT extends Query | AggregateQuery = Query> =
|
|||
config?: TopNavMenuData[];
|
||||
badges?: Array<EuiBadgeProps & { badgeText: string }>;
|
||||
showSearchBar?: boolean;
|
||||
showQueryBar?: boolean;
|
||||
showQueryInput?: boolean;
|
||||
showDatePicker?: boolean;
|
||||
showFilterBar?: boolean;
|
||||
|
@ -142,7 +141,6 @@ export function TopNavMenu<QT extends AggregateQuery | Query = Query>(
|
|||
|
||||
TopNavMenu.defaultProps = {
|
||||
showSearchBar: false,
|
||||
showQueryBar: true,
|
||||
showQueryInput: true,
|
||||
showDatePicker: true,
|
||||
showFilterBar: true,
|
||||
|
|
|
@ -22,7 +22,7 @@ const mockIndexPatterns = [
|
|||
title: 'logstash-*',
|
||||
fields: [
|
||||
{
|
||||
name: 'response',
|
||||
name: 'bytes',
|
||||
type: 'number',
|
||||
esTypes: ['integer'],
|
||||
aggregatable: true,
|
||||
|
@ -30,6 +30,7 @@ const mockIndexPatterns = [
|
|||
searchable: true,
|
||||
},
|
||||
],
|
||||
getName: () => 'logstash-*',
|
||||
},
|
||||
{
|
||||
id: '1235',
|
||||
|
@ -44,6 +45,7 @@ const mockIndexPatterns = [
|
|||
searchable: true,
|
||||
},
|
||||
],
|
||||
getName: () => 'test-*',
|
||||
},
|
||||
] as DataView[];
|
||||
|
||||
|
@ -162,6 +164,11 @@ const services = {
|
|||
],
|
||||
},
|
||||
},
|
||||
dataViewEditor: {
|
||||
userPermissions: {
|
||||
editDataView: action('editDataView'),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
setIndexPatterns({
|
||||
|
@ -173,7 +180,6 @@ function wrapSearchBarInContext(testProps: SearchBarProps<Query>) {
|
|||
appName: 'test',
|
||||
timeHistory: mockTimeHistory,
|
||||
intl: null as any,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showDatePicker: true,
|
||||
showAutoRefreshOnly: false,
|
||||
|
|
|
@ -190,7 +190,6 @@ export function createSearchBar({
|
|||
showAutoRefreshOnly={props.showAutoRefreshOnly}
|
||||
showDatePicker={props.showDatePicker}
|
||||
showFilterBar={props.showFilterBar}
|
||||
showQueryBar={props.showQueryBar}
|
||||
showQueryInput={props.showQueryInput}
|
||||
showSaveQuery={props.showSaveQuery}
|
||||
showSubmitButton={props.showSubmitButton}
|
||||
|
|
|
@ -211,7 +211,6 @@ describe('SearchBar', () => {
|
|||
screenTitle: 'test screen',
|
||||
onQuerySubmit: noop,
|
||||
query: kqlQuery,
|
||||
showQueryBar: false,
|
||||
showQueryInput: false,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -48,7 +48,6 @@ export interface SearchBarOwnProps<QT extends AggregateQuery | Query = Query> {
|
|||
screenTitle?: string;
|
||||
dataTestSubj?: string;
|
||||
// Togglers
|
||||
showQueryBar?: boolean;
|
||||
showQueryInput?: boolean;
|
||||
showFilterBar?: boolean;
|
||||
showDatePicker?: boolean;
|
||||
|
@ -122,7 +121,6 @@ class SearchBarUI<QT extends (Query | AggregateQuery) | Query = Query> extends C
|
|||
State<QT | Query>
|
||||
> {
|
||||
public static defaultProps = {
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showDatePicker: true,
|
||||
showSubmitButton: true,
|
||||
|
|
|
@ -58,7 +58,6 @@ export const markdownVisDefinition: VisTypeDefinition<MarkdownVisParams> = {
|
|||
options: {
|
||||
showTimePicker: false,
|
||||
showFilterBar: false,
|
||||
showQueryBar: true,
|
||||
showQueryInput: false,
|
||||
},
|
||||
inspectorAdapters: {},
|
||||
|
|
|
@ -14,7 +14,6 @@ export const sampleAreaVis = {
|
|||
stage: 'production',
|
||||
options: {
|
||||
showTimePicker: true,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: true,
|
||||
hierarchicalData: false,
|
||||
|
|
|
@ -20,7 +20,6 @@ export const samplePieVis = {
|
|||
stage: 'production',
|
||||
options: {
|
||||
showTimePicker: true,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: true,
|
||||
hierarchicalData: false,
|
||||
|
|
|
@ -66,7 +66,6 @@ export function getTimelionVisDefinition(dependencies: TimelionVisDependencies)
|
|||
},
|
||||
options: {
|
||||
showIndexSelection: false,
|
||||
showQueryBar: true,
|
||||
showFilterBar: false,
|
||||
showQueryInput: false,
|
||||
},
|
||||
|
|
|
@ -157,7 +157,6 @@ export const metricsVisDefinition: VisTypeDefinition<
|
|||
editor: TSVB_EDITOR_NAME,
|
||||
},
|
||||
options: {
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: false,
|
||||
},
|
||||
|
|
|
@ -51,7 +51,6 @@ export const createVegaTypeDefinition = (): VisTypeDefinition<VisParams> => {
|
|||
toExpressionAst,
|
||||
options: {
|
||||
showIndexSelection: false,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
},
|
||||
getSupportedTriggers: () => {
|
||||
|
|
|
@ -346,7 +346,6 @@ export const getVis = (bucketType: string) => {
|
|||
titleInWizard: '',
|
||||
options: {
|
||||
showTimePicker: true,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: true,
|
||||
hierarchicalData: false,
|
||||
|
|
|
@ -19,7 +19,6 @@ export const sampleAreaVis = {
|
|||
stage: 'production',
|
||||
options: {
|
||||
showTimePicker: true,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: true,
|
||||
hierarchicalData: false,
|
||||
|
|
|
@ -15,7 +15,6 @@ import { Schemas } from './schemas';
|
|||
|
||||
const defaultOptions: VisTypeOptions = {
|
||||
showTimePicker: true,
|
||||
showQueryBar: true,
|
||||
showFilterBar: true,
|
||||
showIndexSelection: true,
|
||||
showQueryInput: true,
|
||||
|
|
|
@ -22,7 +22,6 @@ import { NavigateToLensContext } from '../../common';
|
|||
|
||||
export interface VisTypeOptions {
|
||||
showTimePicker: boolean;
|
||||
showQueryBar: boolean;
|
||||
showFilterBar: boolean;
|
||||
showIndexSelection: boolean;
|
||||
showQueryInput: boolean;
|
||||
|
|
|
@ -170,8 +170,7 @@ const TopNav = ({
|
|||
return vis.type.options.showTimePicker && hasTimeField;
|
||||
};
|
||||
const showFilterBar = vis.type.options.showFilterBar;
|
||||
const showQueryInput =
|
||||
vis.type.requiresSearch && vis.type.options.showQueryBar && vis.type.options.showQueryInput;
|
||||
const showQueryInput = vis.type.requiresSearch && vis.type.options.showQueryInput;
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
|
|
|
@ -43,7 +43,6 @@ export const FindingsSearchBar = ({
|
|||
appName={PLUGIN_NAME}
|
||||
dataTestSubj={TEST_SUBJECTS.FINDINGS_SEARCH_BAR}
|
||||
showFilterBar={true}
|
||||
showQueryBar={true}
|
||||
showQueryInput={true}
|
||||
showDatePicker={false}
|
||||
showSaveQuery={false}
|
||||
|
|
|
@ -60,7 +60,6 @@ export const HostsContent: React.FunctionComponent = () => {
|
|||
{metricsDataView ? (
|
||||
<>
|
||||
<SearchBar
|
||||
showQueryBar={true}
|
||||
showFilterBar={false}
|
||||
showDatePicker={true}
|
||||
showAutoRefreshOnly={false}
|
||||
|
|
|
@ -927,7 +927,6 @@ export const LensTopNavMenu = ({
|
|||
}
|
||||
textBasedLanguageModeErrors={textBasedLanguageModeErrors}
|
||||
onTextBasedSavedAndExit={onTextBasedSavedAndExit}
|
||||
showQueryBar={true}
|
||||
showFilterBar={true}
|
||||
data-test-subj="lnsApp_topNav"
|
||||
screenTitle={'lens'}
|
||||
|
|
|
@ -64,7 +64,6 @@ export function ProfilingSearchBar({
|
|||
|
||||
onQuerySubmit({ dateRange, query });
|
||||
}}
|
||||
showQueryBar
|
||||
showQueryInput
|
||||
showDatePicker
|
||||
showFilterBar={false}
|
||||
|
|
|
@ -59,7 +59,6 @@ export const FilterBar = memo<FilterBarComponentProps>(
|
|||
showAutoRefreshOnly={false}
|
||||
showFilterBar={true}
|
||||
showDatePicker={false}
|
||||
showQueryBar={false}
|
||||
showQueryInput={false}
|
||||
showSaveQuery={false}
|
||||
dataTestSubj={dataTestSubj}
|
||||
|
|
|
@ -202,7 +202,6 @@ describe('QueryBar ', () => {
|
|||
showAutoRefreshOnly: false,
|
||||
showDatePicker: false,
|
||||
showFilterBar: true,
|
||||
showQueryBar: true,
|
||||
showQueryInput: true,
|
||||
showSaveQuery: true,
|
||||
showSubmitButton: false,
|
||||
|
|
|
@ -125,7 +125,6 @@ export const QueryBar = memo<QueryBarComponentProps>(
|
|||
showAutoRefreshOnly={false}
|
||||
showFilterBar={!hideSavedQuery}
|
||||
showDatePicker={false}
|
||||
showQueryBar={true}
|
||||
showQueryInput={true}
|
||||
showSaveQuery={true}
|
||||
timeHistory={timeHistory}
|
||||
|
|
|
@ -311,7 +311,6 @@ export const SearchBarComponent = memo<SiemSearchBarProps & PropsFromRedux>(
|
|||
savedQuery={savedQuery}
|
||||
showFilterBar={!hideFilterBar}
|
||||
showDatePicker={true}
|
||||
showQueryBar={true}
|
||||
showQueryInput={!hideQueryInput}
|
||||
showSaveQuery={true}
|
||||
dataTestSubj={dataTestSubj}
|
||||
|
|
|
@ -63,7 +63,6 @@ export const AdminSearchBar = memo(() => {
|
|||
iconType="search"
|
||||
showFilterBar={false}
|
||||
showDatePicker={false}
|
||||
showQueryBar={true}
|
||||
showQueryInput={true}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -259,7 +259,6 @@ export const SearchSourceExpressionForm = (props: SearchSourceExpressionFormProp
|
|||
onSavedQueryUpdated={onSavedQuery}
|
||||
onSaved={onSavedQuery}
|
||||
showSaveQuery
|
||||
showQueryBar
|
||||
showQueryInput
|
||||
showFilterBar
|
||||
showDatePicker={false}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue