Skip to content

[7.x] [lens] Use top nav in Lens app (#46190) #47238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions packages/kbn-es-query/src/es_query/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export function buildQueryFromFilters(filters: unknown[], indexPattern: unknown): unknown;
export function buildEsQuery(
indexPattern: unknown,
queries: unknown,
filters: unknown,
config?: {
allowLeadingWildcards: boolean;
queryStringOptions: unknown;
ignoreFilterIfFieldNotInIndex: boolean;
dateFormatTZ?: string | null;
}
): unknown;
export function getEsQueryConfig(config: {
get: (name: string) => unknown;
}): {
allowLeadingWildcards: boolean;
queryStringOptions: unknown;
ignoreFilterIfFieldNotInIndex: boolean;
dateFormatTZ?: string | null;
};
1 change: 1 addition & 0 deletions packages/kbn-es-query/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
* under the License.
*/

export * from './es_query';
export * from './kuery';
export * from './filters';
3 changes: 2 additions & 1 deletion src/legacy/core_plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

// /// Define plugin function
import { DataPlugin as Plugin, DataSetup } from './plugin';
import { DataPlugin as Plugin, DataSetup, DataStart } from './plugin';

export function plugin() {
return new Plugin();
Expand All @@ -28,6 +28,7 @@ export function plugin() {

/** @public types */
export type DataSetup = DataSetup;
export type DataStart = DataStart;

export { FilterBar, ApplyFiltersPopover } from './filter';
export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ export interface SearchBarOwnProps {
showFilterBar?: boolean;
showDatePicker?: boolean;
showAutoRefreshOnly?: boolean;
showSaveQuery?: boolean;

onRefreshChange?: (options: { isPaused: boolean; refreshInterval: number }) => void;
// Query bar - should be in SearchBarInjectedDeps
query?: Query;
// Show when user has privileges to save
showSaveQuery?: boolean;
savedQuery?: SavedQuery;
onQuerySubmit?: (payload: { dateRange: TimeRange; query?: Query }) => void;
// User has saved the current state as a saved query
onSaved?: (savedQuery: SavedQuery) => void;
// User has modified the saved query, your app should persist the update
onSavedQueryUpdated?: (savedQuery: SavedQuery) => void;
// User has cleared the active query, your app should clear the entire query bar
onClearSavedQuery?: () => void;
}

Expand Down
8 changes: 4 additions & 4 deletions x-pack/legacy/plugins/lens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ export const lens: LegacyPluginInitializer = kibana => {
api: [PLUGIN_ID],
catalogue: [PLUGIN_ID],
savedObject: {
all: [],
read: [],
all: ['search'],
read: ['index-pattern'],
},
ui: ['save', 'show'],
ui: ['save', 'show', 'saveQuery'],
},
read: {
api: [PLUGIN_ID],
catalogue: [PLUGIN_ID],
savedObject: {
all: [],
read: [],
read: ['index-pattern'],
},
ui: ['show'],
},
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/lens/public/app_plugin/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
}

.lnsApp__header {
padding: $euiSize;
border-bottom: $euiBorderThin;
}

Expand Down
Loading