Skip to content

Commit

Permalink
[home] Include ability to publish kibana saved objects from add data …
Browse files Browse the repository at this point in the history
…tutorial (#19559) (#20939)

* add savedObjects to tutorial schema, add savedObjects to APM, add bulk create endpoint

* SavedObjectInstaller component

* bulkCreate fixes

* fix tutorial jest test

* update from sqren review

* updated copy

* move saved object json into seperate json files

* minor commit clean up

* ensure isMounted before setting state after async call, allow manifest to customize saved object install message

* remove duplicated logic for getting config xpack.apm.indexPattern

* refactor get index pattern title

* add functional test that loads APM saved objects

* remove extra await

* display overwrite message

* use angular free savedObjectClient

* functional test cleanup

* handle bulkRequest exception and add jest tests for SavedObjectsInstaller

* use Promise.reject instead of throw

* update copy
  • Loading branch information
nreese authored Jul 18, 2018
1 parent 0b39582 commit fe2f671
Show file tree
Hide file tree
Showing 18 changed files with 1,218 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/core_plugins/kibana/common/tutorials/tutorial_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,8 @@ export const tutorialSchema = {

// Elastic stack artifacts produced by product when it is setup and run.
artifacts: artifactsSchema,

// saved objects used by data module.
savedObjects: Joi.array().items(),
savedObjectsInstallMsg: Joi.string(),
};
3 changes: 3 additions & 0 deletions src/core_plugins/kibana/public/home/components/home_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function HomeApp({
getConfig,
setConfig,
clearIndexPatternsCache,
bulkCreate,
}) {

const isCloudEnabled = chrome.getInjected('isCloudEnabled', false);
Expand All @@ -66,6 +67,7 @@ export function HomeApp({
getTutorial={getTutorial}
replaceTemplateStrings={replaceTemplateStrings}
tutorialId={props.match.params.id}
bulkCreate={bulkCreate}
/>
);
};
Expand Down Expand Up @@ -119,4 +121,5 @@ HomeApp.propTypes = {
getConfig: PropTypes.func.isRequired,
setConfig: PropTypes.func.isRequired,
clearIndexPatternsCache: PropTypes.func.isRequired,
bulkCreate: PropTypes.func.isRequired,
};
Loading

0 comments on commit fe2f671

Please sign in to comment.