-
Notifications
You must be signed in to change notification settings - Fork 917
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
Add a new augment-vis
saved object type
#3109
Add a new augment-vis
saved object type
#3109
Conversation
Keeping as draft until #3108 has been reviewed & merged; I will then rebase this PR |
Codecov Report
@@ Coverage Diff @@
## feature/feature-anywhere #3109 +/- ##
============================================================
+ Coverage 66.67% 66.70% +0.02%
============================================================
Files 3220 3226 +6
Lines 61454 61522 +68
Branches 9417 9429 +12
============================================================
+ Hits 40977 41038 +61
- Misses 18232 18237 +5
- Partials 2245 2247 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
272d45d
to
06aefaa
Compare
vis-integration
saved object typeaugment-vis
saved object type
c48d422
to
ac745ef
Compare
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a comprehensive review yet, but this is looking good so far. Just a few minor comments and questions.
src/plugins/vis_augmenter/public/saved_augment_vis/utils/helpers.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_augmenter/public/saved_augment_vis/_saved_augment_vis.ts
Show resolved
Hide resolved
f11288e
to
c3e46d9
Compare
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
c3e46d9
to
9a3bc42
Compare
…mments Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
@ashwin-pc @joshuarrrr the latest commit registers the new type in the management plugin. I've added details and screenshots in the PR description as well. The plugin framework provides all of the functionality out-of-the-box but I've also manually confirmed the CRUD operations, inspection, viewing relationships, import/export, searching, etc. work as expected. The main changes needed were adding a I also added a helper One open question: how do we want to generate names for the saved objects? Right now, I'm defaulting to |
src/plugins/vis_augmenter/public/saved_augment_vis/saved_augment_vis.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler pretty neat implementation, can you also as a part of this PR document the process to create a new saved object type? (optional but highly appreciated!) @abbyhu2000 Can you take a look at this PR too since you have a lot of context about saved objects? |
Sure, I'll go ahead and add a section in the README 😄 |
Signed-off-by: Tyler Ohlsen <[email protected]>
@ashwin-pc @kristenTian @joshuarrrr can I get another look at this PR? I'd like to get this one merged next to help unblock the plugin teams. |
src/plugins/vis_augmenter/public/saved_augment_vis/utils/test_helpers.ts
Show resolved
Hide resolved
*/ | ||
export const createAugmentVisSavedObject = async (AugmentVis: ISavedAugmentVis): Promise<any> => { | ||
const loader = getSavedAugmentVisLoader(); | ||
return await loader.get((AugmentVis as any) as Record<string, unknown>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like the usage of ISavedAugmentVis
. Just seems like it should be simpler for the typescript compiler to understand that it's compatible with Record<string, unknown>
.
src/plugins/vis_augmenter/public/saved_augment_vis/saved_augment_vis_references.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Tyler Ohlsen <[email protected]>
merging despite build and verify failure on windows. See #3400 |
Description
This PR adds a new
augment-vis
saved object type. Details on the design can be found in the related issueSpecifically, this PR makes the following changes:
Client-side:
vis_augmenter
plugin'sstart
lifecycle stepServer-side:
vis_augmenter
plugin'ssetup
lifecycle stepIt also registers the saved object in the Saved Objects Management plugin, by:
augment-vis
saved object server-side definition,Screenshots of an example
augment-vis
type in the Saved Objects Management plugin:Fig. 1: new object is highlighted (note there is no link to the title since there is no dedicated plugin for this new saved object):
Fig. 2: viewing the relationship of the saved object, showing the visualization saved object as the child:
Issues Resolved
Closes #2893
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr