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

Kibana Home page - phase two #14749

Merged
merged 65 commits into from
Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b5993f0
add tutorial directory and home promo section
nreese Nov 2, 2017
0530766
tutorial components
nreese Nov 3, 2017
4ae3411
use KuiCodeEditor for displaying instruction code
nreese Nov 6, 2017
28d95d1
move spec files to server so joi can be used. Fetch via rest API
nreese Nov 8, 2017
e46f5f3
Adding more tutorials (#4)
tsg Nov 8, 2017
4a6304a
add markdown parsing
nreese Nov 8, 2017
136de54
use mustache to replace config.kibana.version with kibana version
nreese Nov 8, 2017
afdbdfa
add image preview to tutorial introduction
nreese Nov 8, 2017
708963a
fix css class name
nreese Nov 8, 2017
61a10de
add param types constants
nreese Nov 9, 2017
115f16f
add docs variables
nreese Nov 9, 2017
11089e7
[WIP] Logstash Netflow module tutorial (#5)
ycombinator Nov 9, 2017
cb58179
pass params to template replace logic
nreese Nov 9, 2017
92d8e27
parameter inputs
nreese Nov 9, 2017
c52b9bb
use isReadOnly flag from ui-framework for KuiCodeEditor
nreese Nov 9, 2017
b00547e
dedemorton commits on netflow
nreese Nov 9, 2017
870ada1
remove trailing slash from base links
nreese Nov 10, 2017
e765d30
add config.docs.logstash and fix vertical spacing between Content com…
nreese Nov 10, 2017
2108733
Use logstash docs config variable
ycombinator Nov 13, 2017
f250dca
Starting to add Deb instructions
ycombinator Nov 17, 2017
95d23fb
Fix Logstash documentation link
nreese Nov 27, 2017
b17895d
Make commands optional
nreese Nov 27, 2017
eb6b95b
Refactor: extract common LS instructions
nreese Nov 27, 2017
20a5dcf
Edits for the existing tutorials
nreese Nov 27, 2017
9625c75
change schema to support three instruction types
nreese Nov 28, 2017
41b7e3b
[Netflow tutorial] Simplify OSX instructions
ycombinator Dec 5, 2017
68f4aa5
replace axios with fetch
nreese Dec 12, 2017
3eb8682
pass credentials to tutorial fetch
nreese Dec 12, 2017
f2f68d9
display cloud instructions when cloud set
nreese Dec 12, 2017
b4b6ea4
RadioButtonGroup component
nreese Dec 13, 2017
084a6f2
update copy
nreese Dec 13, 2017
254173e
add tutorial component jest tests
nreese Dec 13, 2017
44d4a28
content component test
nreese Dec 13, 2017
71f57df
load isCloudEnabled in home_app
nreese Dec 13, 2017
bf743d9
add functional test ensuring add data tutorials are fetch and displayed
nreese Dec 14, 2017
9ae7d80
rename card btns to 'Add data', fix type in tutorial directory tab, r…
nreese Dec 14, 2017
c21b69d
move parameters form to right of instruction set title
nreese Dec 14, 2017
dcc70d3
add copy snippet button, remove line numbers from command block
nreese Dec 15, 2017
1a0036a
add breadcrumb to tutorial view
nreese Dec 15, 2017
479c731
update tutorial jest snapshot
nreese Dec 15, 2017
ac8df5d
use componentDidMount and ignore async results if componenent has bee…
nreese Dec 18, 2017
77ff701
define shape of prop for instructionVariants and params. Create Numbe…
nreese Dec 18, 2017
f6da1a9
add bread crumb to add data directory page
nreese Dec 18, 2017
4febf29
Add cloud version of the apache_logs tutorial (#16)
tsg Dec 19, 2017
06ba9e7
fix styling broken by EUI rebase
nreese Dec 19, 2017
cd7cd12
add artifacts to tutorial schema
nreese Dec 21, 2017
fa5d3aa
fix styling for code block
nreese Dec 21, 2017
e9c2dc1
[Tutorials] Netflow: instructions for onPremCloud (#18)
ycombinator Dec 21, 2017
f9dc6a5
fix copy bug where copy would only contain previously selected text
nreese Dec 21, 2017
1699c21
make string parameter input type be text
nreese Dec 21, 2017
8b0b5d9
Implementing Elastic Cloud tutorial for Netflow module (#19)
ycombinator Jan 3, 2018
c1f7866
More tutorial edits (#20)
tsg Jan 3, 2018
119c5c2
wrap markdown content in markdown-body class
nreese Jan 3, 2018
96a54ea
use EuiFlexGroup to remove wasted space with 'copy snippet' button an…
nreese Jan 3, 2018
d9d0bc1
change OSX to macOS, use Computed property names for instruction_vari…
nreese Jan 3, 2018
5e05e66
capitilize 'C' in Elastic Cloud
nreese Jan 3, 2018
7d8654d
remove try/catch from copy_to_clipboard
nreese Jan 3, 2018
d089b16
Removing unrelated instructions
ycombinator Jan 4, 2018
873995e
Copy editing fixes
ycombinator Jan 4, 2018
ef358a2
Multiply edits to the Beats tutorials (#21)
tsg Jan 5, 2018
d4c65e4
prevent 'Copy snippet' button text from wrapping
nreese Jan 5, 2018
abb1935
[Netflow tutorial] Windows instructions (#22)
ycombinator Jan 8, 2018
76c1638
use EuiImage so tutorial images are clickable to view in full screen
nreese Jan 8, 2018
214eaf2
fix jest tests
nreese Jan 8, 2018
ac9e4c6
set fullScreenIconColor and alt options for EuiImage, add space betwe…
nreese Jan 8, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"moment": "2.13.0",
"moment-timezone": "0.5.4",
"ngreact": "0.5.1",
"mustache": "2.3.0",
"no-ui-slider": "1.2.0",
"node-fetch": "1.3.2",
"pegjs": "0.9.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const FILEBEAT_CLOUD_INSTRUCTIONS = {
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `filebeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Filebeat\\filebeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
}
}
};
166 changes: 166 additions & 0 deletions src/core_plugins/kibana/common/tutorials/filebeat_instructions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
export const FILEBEAT_INSTRUCTIONS = {
INSTALL: {
OSX: {
title: 'Download and install Filebeat',
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'tar xzvf filebeat-{config.kibana.version}-darwin-x86_64.tar.gz',
'cd filebeat-{config.kibana.version}-darwin-x86_64/',
]
},
DEB: {
title: 'Download and install Filebeat',
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i filebeat-{config.kibana.version}-amd64.deb'
],
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
RPM: {
title: 'Download and install Filebeat',
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi filebeat-{config.kibana.version}-x86_64.rpm'
],
textPost: 'Looking for the 32 bits packages? See the [Download page](https://www.elastic.co/downloads/beats/filebeat).'
},
WINDOWS: {
title: 'Download and install Filebeat',
textPre: 'First time using Filebeat? See the [Getting Started Guide]' +
'({config.docs.beats.filebeat}/filebeat-getting-started.html).\n' +
'1. Download the Filebeat Windows zip file from the [downloads](https://www.elastic.co/downloads/beats/filebeat) page.\n' +
'2. Extract the contents of the zip file into `C:\\Program Files`.\n' +
'3. Rename the `filebeat-{config.kibana.version}-windows` directory to `Filebeat`.\n' +
'4. Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select' +
' Run As Administrator). If you are running Windows XP, you may need to download and install PowerShell.\n' +
'5. From the PowerShell prompt, run the following commands to install Filebeat as a Windows service.',
commands: [
'PS > cd C:\\Program Files\\Filebeat',
'PS C:\\Program Files\\Filebeat> .\\install-service-filebeat.ps1'
],
textPost: 'Modify the settings under `output.elasticsearch` in the ' +
'`C:\\Program Files\\Filebeat\\filebeat.yml` file to point to your Elasticsearch installation.'
}
},
START: {
OSX: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards.' +
' If the dashboards are already set up, omit this command.',
commands: [
'./filebeat setup',
'./filebeat -e',
]
},
DEB: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo filebeat setup',
'sudo service filebeat start',
]
},
RPM: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'sudo filebeat setup',
'sudo service filebeat start',
],
},
WINDOWS: {
title: 'Start Filebeat',
textPre: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, ' +
'omit this command.',
commands: [
'PS C:\\Program Files\\Filebeat> filebeat.exe setup',
'PS C:\\Program Files\\Filebeat> Service-Start filebeat',
]
}
},
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `filebeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/filebeat/filebeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Filebeat\\filebeat.yml` to set the connection information:',
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
' username: "elastic"',
' password: "<password>"',
'setup.kibana:',
' host: "<kibana_url>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user, ' +
'`<es_url>` is the URL of Elasticsearch, and `<kibana_url>` is the URL of Kibana.'
}
},
PLUGINS: {
GEOIP_AND_UA: {
title: 'Install Elasticsearch GeoIP and user agent plugins',
textPre: 'This module requires two Elasticsearch plugins that are not ' +
'installed by default.\n\nFrom the Elasticsearch installation folder, run:',
commands: [
'bin/elasticsearch-plugin install ingest-geoip',
'bin/elasticsearch-plugin install ingest-user-agent'
]
},
GEOIP: {
title: 'Install Elasticsearch GeoIP plugin',
textPre: 'This module requires an Elasticsearch plugin that is not ' +
'installed by default.\n\nFrom the Elasticsearch installation folder, run:',
commands: [
'bin/elasticsearch-plugin install ingest-geoip'
]
}
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const FILEBEAT_ONPREM_CLOUD_INSTRUCTIONS = {
};
34 changes: 34 additions & 0 deletions src/core_plugins/kibana/common/tutorials/instruction_variant.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export const INSTRUCTION_VARIANT = {
Copy link
Contributor

Choose a reason for hiding this comment

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

take it or leave it, just wanted to let you know you can typedef these so you can be more explicit about accepted types. e.g. this is how DashboardMode works:

/**
 * A dashboard mode.
 * @typedef {string} DashboardMode
 */

/**
 * Dashboard view modes.
 * @type {{EDIT: DashboardViewMode, VIEW: DashboardViewMode}}
 */
export const DashboardViewMode = {
  EDIT: 'edit',
  VIEW: 'view'
};

Then where it's passed in:

 * @param {DashboardMode} dashboardMode.

OSX: 'osx',
DEB: 'deb',
RPM: 'rpm',
DOCKER: 'docker',
WINDOWS: 'windows',
NODE: 'node',
DJANGO: 'django',
FLASK: 'flask'
};

const DISPLAY_MAP = {
[INSTRUCTION_VARIANT.OSX]: 'macOS',
[INSTRUCTION_VARIANT.DEB]: 'DEB',
[INSTRUCTION_VARIANT.RPM]: 'RPM',
[INSTRUCTION_VARIANT.DOCKER]: 'Docker',
[INSTRUCTION_VARIANT.WINDOWS]: 'Windows',
[INSTRUCTION_VARIANT.NODE]: 'Node.js',
[INSTRUCTION_VARIANT.DJANGO]: 'Django',
[INSTRUCTION_VARIANT.FLASK]: 'Flask',
};

/**
* Convert instruction variant id into display text.
*
* @params {String} id - instruction variant id as defined from INSTRUCTION_VARIANT
* @return {String} display name
*/
export function getDisplayText(id) {
if (id in DISPLAY_MAP) {
return DISPLAY_MAP[id];
}
return id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this ever happen? Should we throw an error if it's not in the display map?

}
27 changes: 27 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,27 @@
export const LOGSTASH_INSTRUCTIONS = {
INSTALL: {
OSX: [
{
title: 'Download and install the Java Runtime Environment',
textPre: 'Follow the installation instructions [here](https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jre.html).'
},
{
title: 'Download and install Logstash',
commands: [
'curl -L -O https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.tar.gz',
'tar xzvf logstash-{config.kibana.version}.tar.gz'
]
}
],
WINDOWS: [
{
title: 'Download and install the Java runtime environment',
textPre: 'Follow the installation instructions [here](https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jre_install.html).'
},
{
title: 'Download and install Logstash',
textPre: 'Download Logstash from [here](https://artifacts.elastic.co/downloads/logstash/logstash-{config.kibana.version}.zip) and unzip it.'
}
],
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const METRICBEAT_CLOUD_INSTRUCTIONS = {
CONFIG: {
OSX: {
title: 'Edit the configuration',
textPre: 'Modify `metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
DEB: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
RPM: {
title: 'Edit the configuration',
textPre: 'Modify `/etc/metricbeat/metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
},
WINDOWS: {
title: 'Edit the configuration',
textPre: 'Modify `C:\\Program Files\\Filebeat\\metricbeat.yml` to set the connection information for Elastic Cloud:',
commands: [
'cloud.id: "{config.cloud.id}"',
'cloud.auth: "elastic:<password>"'
],
textPost: 'Where `<password>` is the password of the `elastic` user.'
}
}
};
Loading