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

Migrate reporting top nav to sharing context menu #22596

Merged
merged 31 commits into from
Sep 11, 2018

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Aug 31, 2018

screen shot 2018-08-31 at 10 16 08 am

screen shot 2018-08-31 at 10 16 19 am

screen shot 2018-08-31 at 1 04 11 pm

screen shot 2018-08-31 at 1 04 16 pm

Dev Docs

exportTypesRegistry removed

Removed exportTypesRegistry from the client-side. exportTypesRegistry had been used for registering Reporting export types for the UI. exportTypesRegistry still exists for registering export types with the server.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Aug 31, 2018

@elastic/kibana-design Where should the feedback go when the user clicks the generate button? Right now a toast notification is displayed. @cjcenizal suggested disabling the button and displaying the message in the context menu. I like that idea since it puts the feedback closer to where the action takes place. What do you think?

report

@cjcenizal
Copy link
Contributor

I just thought of one problem with my idea of disabling the button... if the user has auto-refresh enabled and wants to create a series of PDFs as the data changes, then disabling it on click will be frustrating.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Sep 7, 2018

bootstrap error

00:56:06 Running "run:i18nCheck" (run) task
00:56:09 [00:56:09] src/core_plugins/kibana [started]
00:56:12 [00:56:12] src/core_plugins/kibana [completed]
00:56:12 [00:56:12] src/server [started]
00:56:12 [00:56:12] src/server [completed]
00:56:12 [00:56:12] src/ui [started]
00:56:16 [00:56:16] src/ui [failed]
00:56:16 [00:56:16] → Unexpected token, expected ")" (59:80)
00:56:16 ERROR UNHANDLED ERROR
00:56:16 ERROR SyntaxError: Unexpected token, expected ")" (59:80)
00:56:16           at _class.raise (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:3893:15)
00:56:16           at _class.unexpected (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:5222:16)
00:56:16           at _class.expect (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:5210:28)
00:56:16           at _class.tsParseParenthesizedType (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:8926:12)
00:56:16           at _class.tsParseNonArrayType (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9026:23)
00:56:16           at _class.tsParseArrayTypeOrHigher (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9033:23)
00:56:16           at _class.tsParseTypeOperatorOrHigher (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9077:122)
00:56:16           at _class.tsParseUnionOrIntersectionType (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9082:18)
00:56:16           at _class.tsParseIntersectionTypeOrHigher (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9100:19)
00:56:16           at _class.tsParseUnionOrIntersectionType (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana/node_modules/@babel/parser/lib/index.js:9082:18)
00:56:16 Warning: non-zero exit code 1� Use --force to continue.

@nreese
Copy link
Contributor Author

nreese commented Sep 7, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Sep 7, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Sep 7, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Sep 7, 2018

flaky x-pack security test

22:30:10            └- ✖ fail: "security app rbac  rbac read only role can not  save a visualization"
22:30:10            │      Error: retry.try timeout: Error: retry.try timeout: [POST http://localhost:9515/session/ddad745ae67c8cc92704afb671582883/element / {"using":"partial link text","value":"Vertical Bar"}] no such element: Unable to locate element: {"method":"partial link text","selector":"Vertical Bar"}
22:30:10            │   (Session info: chrome=69.0.3497.81)
22:30:10            │   (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 3.10.0-862.11.6.el7.x86_64 x86_64)
22:30:10            │     at Server._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/remote/verbose_remote_logging.js:34:21)
22:30:10            │     at runRequest (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:92:40)
22:30:10            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:113:39
22:30:10            │     at new Promise (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:411:4)
22:30:10            │     at Session._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:67:10)
22:30:10            │     at Session.find (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:1328:15)
22:30:10            │     at Command.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Command.js:42:36)
22:30:10            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:393:16
22:30:10            │     at run (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:237:8)
22:30:10            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/nextTick.ts:44:4
22:30:10            │     at _combinedTickCallback (internal/process/next_tick.js:131:7)
22:30:10            │     at process._tickCallback (internal/process/next_tick.js:180:9)
22:30:10            │     at Command.find (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Command.js:23:10)
22:30:10            │     at Command.prototype.(anonymous function) [as findByPartialLinkText] (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/lib/strategies.js:29:16)
22:30:10            │     at _ensureElementWithTimeout (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/find.js:160:29)
22:30:10            │     at retry.try (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/find.js:51:33)
22:30:10            │     at runAttempt (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:39:21)
22:30:10            │     at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:67:37)
22:30:10            │     at <anonymous>
22:30:10            │     at lastError (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:29:9)
22:30:10            │     at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:63:13)
22:30:10            │     at <anonymous>
22:30:10            │       at lastError (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:29:9)
22:30:10            │       at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:63:13)
22:30:10            │       at <anonymous>

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Sep 8, 2018

Same xpack rbac test failure. @elastic/kibana-security Is this a known flaky test?

03:17:12            └- ✖ fail: "security app rbac  rbac all role can save a visualization"
03:17:12            │      Error: retry.try timeout: Error: retry.try timeout: [POST http://localhost:9515/session/234b1a9118c9981d04e9aaf4bcd3970f/element / {"using":"partial link text","value":"Vertical Bar"}] no such element: Unable to locate element: {"method":"partial link text","selector":"Vertical Bar"}
03:17:12            │   (Session info: chrome=69.0.3497.81)
03:17:12            │   (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-1018-gcp x86_64)
03:17:12            │     at Server._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/remote/verbose_remote_logging.js:34:21)
03:17:12            │     at runRequest (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:92:40)
03:17:12            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:113:39
03:17:12            │     at new Promise (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:411:4)
03:17:12            │     at Session._post (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:67:10)
03:17:12            │     at Session.find (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Session.js:1328:15)
03:17:12            │     at Command.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Command.js:42:36)
03:17:12            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:393:16
03:17:12            │     at run (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/Promise.ts:237:8)
03:17:12            │     at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/dojo/_debug/nextTick.ts:44:4
03:17:12            │     at _combinedTickCallback (internal/process/next_tick.js:131:7)
03:17:12            │     at process._tickCallback (internal/process/next_tick.js:180:9)
03:17:12            │     at Command.find (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/Command.js:23:10)
03:17:12            │     at Command.prototype.(anonymous function) [as findByPartialLinkText] (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/node_modules/leadfoot/lib/strategies.js:29:16)
03:17:12            │     at _ensureElementWithTimeout (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/find.js:160:29)
03:17:12            │     at retry.try (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/functional/services/find.js:51:33)
03:17:12            │     at runAttempt (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:39:21)
03:17:12            │     at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:67:37)
03:17:12            │     at <anonymous>
03:17:12            │     at lastError (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:29:9)
03:17:12            │     at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:63:13)
03:17:12            │     at <anonymous>
03:17:12            │       at lastError (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:29:9)
03:17:12            │       at retryForSuccess (/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-x-pack/kibana/test/common/services/retry/retry_for_success.js:63:13)
03:17:12            │       at <anonymous>

jenkins, test this

@legrego
Copy link
Member

legrego commented Sep 8, 2018

@Rasroh is this the flaky test you wanted to debug with me?

@legrego
Copy link
Member

legrego commented Sep 8, 2018

@nreese I took a quick look at these, and they are likely flaky. I've opened #22852 to try to address the flakiness.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

Couple minor things but otherwise, LGTM. Did not pull down and test latest code.

readonly id: string;

getShareActions: (
{ objectType, objectId, getUnhashableStates, sharingData, isDirty, onClose }: ShareActionProps
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting way to do this. Since it's just defining the interface and ShareAction, I think you could get away with:

getShareActions: (config: ShareActionProps) => ShareAction[]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if you are looking at an old commits, but the destructuring was removed in this commit

168ed84

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, that was an old unpublished comment that got published by accident with the latest :)

const query = {
jobParams: rison.encode(jobParams),
};
return kfetch({ method: 'POST', pathname: `${API_BASE_URL}/${exportType}`, query }).then(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if you make this an async function and use await the returned promise is implicit. Should still work with the catch. E.g.

 const response = await kfetch({ method: 'POST', pathname: `${API_BASE_URL}/${exportType}`, query });
 jobCompletionNotifications.add(response.job.id);

I don't think you need to return the response, just the promise.

* you may not use this file except in compliance with the Elastic License.
*/

// TODO: Remove once typescript definitions are in EUI
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove this comment, there is no declaration here, so I think these defintions are typed in eui

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit 1b6dcab into elastic:master Sep 11, 2018
@nreese
Copy link
Contributor Author

nreese commented Sep 11, 2018

cc @w33ble Not sure how this is going to impact canvas/reports.

@nreese nreese added the release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. label Sep 13, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@@ -85,6 +85,7 @@
"@kbn/ui-framework": "link:../packages/kbn-ui-framework",
"@samverschueren/stream-to-observable": "^0.3.0",
"@slack/client": "^4.2.2",
"@types/moment-timezone": "^0.5.8",
Copy link
Member

Choose a reason for hiding this comment

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

@nreese Do you mind if I move this to devDependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not at all. Thanks @sqren. Putting it in dependencies was a mistake

Copy link
Member

Choose a reason for hiding this comment

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

No worries. I just noticed as I was adding some types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. review v6.5.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants