Skip to content

Commit

Permalink
Add status check to "add data" tutorials (#17732) (#19097)
Browse files Browse the repository at this point in the history
* add statusCheck configuration to instructionSetSchema

* add status check step to instruction set

* track status check state

* query elasticsearch for hits

* display message when status check completes

* clean up

* use callout to display status check results

* Updated status check

* update tutorial snapshot

* add jest tests for InstructionSet component

* pass function as prop instead of wrapping in new function

* refactor checkInstructionSetStatus

* update snapshots that broke after rebase

* Suggested changes (#24)

* update jest test for statusCheckState prop enum

* update tutorial snapshots
  • Loading branch information
nreese authored May 16, 2018
1 parent 5db2efd commit 1dae595
Show file tree
Hide file tree
Showing 9 changed files with 1,179 additions and 87 deletions.
15 changes: 14 additions & 1 deletion src/core_plugins/kibana/common/tutorials/tutorial_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ const artifactsSchema = Joi.object({
}),
});

const statusCheckSchema = Joi.object({
title: Joi.string(),
text: Joi.string(),
btnLabel: Joi.string(),
success: Joi.string(),
error: Joi.string(),
esHitsCheck: Joi.object({
index: Joi.string().required(),
query: Joi.object().required(),
}).required(),
});

const instructionSchema = Joi.object({
title: Joi.string(),
textPre: Joi.string(),
Expand All @@ -40,7 +52,8 @@ const instructionVariantSchema = Joi.object({
const instructionSetSchema = Joi.object({
title: Joi.string(),
// Variants (OSes, languages, etc.) for which tutorial instructions are specified.
instructionVariants: Joi.array().items(instructionVariantSchema).required()
instructionVariants: Joi.array().items(instructionVariantSchema).required(),
statusCheck: statusCheckSchema,
});

const paramSchema = Joi.object({
Expand Down
Loading

0 comments on commit 1dae595

Please sign in to comment.