Skip to content
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

use canvas pipeline in visualize #25996

Merged
merged 39 commits into from
Dec 10, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8fcae1c
Resolve merge conflicts
lukeelmers Nov 27, 2018
ffaaafc
Fix broken imports
lukeelmers Nov 27, 2018
3e1ecec
adding canvas functions
ppisljar Nov 21, 2018
7150369
using pipeline in visualize
ppisljar Nov 21, 2018
44e9a20
skipping irrelevant tests
ppisljar Nov 21, 2018
55478d4
fixing test
ppisljar Nov 21, 2018
2328428
fixing based on review from tim
ppisljar Nov 26, 2018
7ff1284
i18n
ppisljar Nov 26, 2018
de13cb2
Fix broken i18n calls in core_plugins/interpreter.
lukeelmers Nov 28, 2018
7f7ece6
fix broken merge
ppisljar Nov 28, 2018
134321c
review feedback
ppisljar Nov 28, 2018
04f3c3a
support for custom request and response handlers
ppisljar Nov 28, 2018
338f08b
fixing markdown
ppisljar Nov 28, 2018
b00c64a
Rewrite pipeline helpers in ts, add WIP unit tests.
lukeelmers Nov 29, 2018
1d9d35b
changing the syntax for passing multiple metrics/buckets
ppisljar Nov 29, 2018
b43de6f
initialContext handler function
ppisljar Nov 29, 2018
e1f9119
cleaning up pipeline_data_loader
ppisljar Nov 29, 2018
6d5b8a5
Improve TS and autofix trailing spaces
Nov 29, 2018
41fb681
applying tim's feedback
ppisljar Nov 29, 2018
631c748
Add Schemas interface, finish buildVisPipeline tests.
lukeelmers Nov 29, 2018
79eca45
Add remaining tests for build pipeline helper.
lukeelmers Nov 29, 2018
e8dbf07
fixing
ppisljar Nov 30, 2018
0d8f843
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Nov 30, 2018
4eb8b74
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 1, 2018
9c00335
review feedback
ppisljar Dec 1, 2018
ae85fa3
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 3, 2018
980cdca
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 3, 2018
af839d3
fixing merge master
ppisljar Dec 3, 2018
d8ebcfb
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 5, 2018
1b5bdce
fixing merge master
ppisljar Dec 5, 2018
851ef35
split table row/column
ppisljar Dec 5, 2018
e7c63f1
updating based on tim's review
ppisljar Dec 5, 2018
995e241
fixing escaping issue
ppisljar Dec 6, 2018
c50ead2
updating canvas setAppReady
ppisljar Dec 6, 2018
01fbb84
removing multi: false from args
ppisljar Dec 6, 2018
fcd0f6a
named functions
ppisljar Dec 9, 2018
319d7c1
renaming getInitializedFunctions
ppisljar Dec 9, 2018
0a69a2e
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 10, 2018
6c13b48
Merge branch 'master' into visualize_canvas_pipeline2
ppisljar Dec 10, 2018
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
2 changes: 1 addition & 1 deletion packages/kbn-interpreter/src/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

export { populateBrowserRegistries, getBrowserRegistries } from './browser_registries';
export { createSocket } from './socket';
export { initializeInterpreter, interpretAst } from './interpreter';
export { initializeInterpreter, interpretAst, isInterpreterInitialized } from './interpreter';
4 changes: 4 additions & 0 deletions packages/kbn-interpreter/src/public/interpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export async function initializeInterpreter() {
return functionList;
}

export async function isInterpreterInitialized() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A method should not start with is unless it returns boolean. Consider getInitializedFunctions or returning !!functionList.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further review, since functionList is a Promise, !!functionList will always be true. This method name and logic should be refactored to reflect precisely what you're trying to do... imagine if you applied TypeScript to this file, (which will happen soon, right?)

return functionList;
}

// Use the above promise to seed the interpreter with the functions it can defer to
export async function interpretAst(ast, context, handlers) {
// Load plugins before attempting to get functions, otherwise this gets racey
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/canvas/public/components/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { populateBrowserRegistries } from '@kbn/interpreter/public';
import { populateBrowserRegistries, isInterpreterInitialized } from '@kbn/interpreter/public';
import { connect } from 'react-redux';
import { compose, withProps } from 'recompose';
import { getAppReady, getBasePath } from '../../state/selectors/app';
Expand Down Expand Up @@ -49,6 +49,7 @@ const mapDispatchToProps = dispatch => ({
// initialize the socket and interpreter
loadPrivateBrowserFunctions();
await populateBrowserRegistries(types, basePath);
await isInterpreterInitialized();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact we're not doing anything with the result indicates this method is incorrectly named, (see above, as well).


// set app state to ready
dispatch(appReady());
Expand Down