Skip to content

Commit

Permalink
Refactor: extract common LS instructions (elastic#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator authored and nreese committed Nov 17, 2017
1 parent 90d5fa7 commit db6b54f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
14 changes: 14 additions & 0 deletions src/core_plugins/kibana/common/tutorials/logstash_instructions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const LOGSTASH_INSTRUCTIONS = {
INSTALL: {
OSX: {
title: 'Download and install Logstash',
textPre: 'Skip this step if Logstash is already installed. First time using Logstash? See the ' +
'[Getting Started Guide]({config.elastic_docs.website_url}/guide/en/logstash/{config.elastic_docs.link_version}' +
'/getting-started-with-logstash.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.tar.gz',
'tar xzvf logstash-{config.kibana.version}.tar.gz'
]
}
}
};
12 changes: 2 additions & 10 deletions src/core_plugins/kibana/server/tutorials/netflow/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { PARAM_TYPES } from '../../../common/tutorials/param_types';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant';
import { LOGSTASH_INSTRUCTIONS } from '../../../common/tutorials/logstash_instructions';

export function netflowSpecProvider() {
return {
Expand Down Expand Up @@ -31,16 +32,7 @@ export function netflowSpecProvider() {
{
id: INSTRUCTION_VARIANT.OSX,
instructions: [
{
title: 'Download and install Logstash',
textPre: 'Skip this step if Logstash is already installed. First time using Logstash? See the ' +
'[Getting Started Guide]({config.elastic_docs.website_url}/guide/en/logstash/{config.elastic_docs.link_version}' +
'/getting-started-with-logstash.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.tar.gz',
'tar xzvf logstash-{config.kibana.version}.tar.gz'
]
},
LOGSTASH_INSTRUCTIONS.INSTALL.OSX,
{
title: 'Set up the Netflow module',
textPre: 'In the Logstash install directory, run the following command to set up the Netflow module.',
Expand Down

0 comments on commit db6b54f

Please sign in to comment.