Skip to content

[lens] Use top nav in Lens app #46190

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 21 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
27b6824
[lens] Use top nav in Lens app
wylieconlon Sep 19, 2019
9ace121
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 23, 2019
2c6817c
Add tests for saved query, pass filters around more places
wylieconlon Sep 23, 2019
d69977c
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 24, 2019
a787f94
Fix filter passing
wylieconlon Sep 24, 2019
cfd7b8b
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 24, 2019
761be14
Add unit test for field popover making correct queries
wylieconlon Sep 24, 2019
9aad4b8
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 24, 2019
0bf1b44
Respond to review feedback
wylieconlon Sep 25, 2019
588635e
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 25, 2019
3c02c20
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Sep 26, 2019
c8361c9
Fix type errors
wylieconlon Sep 26, 2019
edd1628
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Oct 1, 2019
124b1e9
Respond to all review comments
wylieconlon Oct 1, 2019
29abf4c
Remove commented code
wylieconlon Oct 1, 2019
9bc8214
Top nav should be compatible as angular directive
wylieconlon Oct 1, 2019
0639138
Fix rendering issue with filter updates
wylieconlon Oct 2, 2019
449155f
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Oct 2, 2019
85c089a
Merge remote-tracking branch 'origin/master' into lens/use-top-nav
wylieconlon Oct 2, 2019
3bf24ef
Respond to review comments and add onChange test
wylieconlon Oct 2, 2019
dcd2495
Add specific test for the index pattern bug from Tina
wylieconlon Oct 2, 2019
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