-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Kibana Home page - phase two #14749
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 0530766
tutorial components
nreese 4ae3411
use KuiCodeEditor for displaying instruction code
nreese 28d95d1
move spec files to server so joi can be used. Fetch via rest API
nreese e46f5f3
Adding more tutorials (#4)
tsg 4a6304a
add markdown parsing
nreese 136de54
use mustache to replace config.kibana.version with kibana version
nreese afdbdfa
add image preview to tutorial introduction
nreese 708963a
fix css class name
nreese 61a10de
add param types constants
nreese 115f16f
add docs variables
nreese 11089e7
[WIP] Logstash Netflow module tutorial (#5)
ycombinator cb58179
pass params to template replace logic
nreese 92d8e27
parameter inputs
nreese c52b9bb
use isReadOnly flag from ui-framework for KuiCodeEditor
nreese b00547e
dedemorton commits on netflow
nreese 870ada1
remove trailing slash from base links
nreese e765d30
add config.docs.logstash and fix vertical spacing between Content com…
nreese 2108733
Use logstash docs config variable
ycombinator f250dca
Starting to add Deb instructions
ycombinator 95d23fb
Fix Logstash documentation link
nreese b17895d
Make commands optional
nreese eb6b95b
Refactor: extract common LS instructions
nreese 20a5dcf
Edits for the existing tutorials
nreese 9625c75
change schema to support three instruction types
nreese 41b7e3b
[Netflow tutorial] Simplify OSX instructions
ycombinator 68f4aa5
replace axios with fetch
nreese 3eb8682
pass credentials to tutorial fetch
nreese f2f68d9
display cloud instructions when cloud set
nreese b4b6ea4
RadioButtonGroup component
nreese 084a6f2
update copy
nreese 254173e
add tutorial component jest tests
nreese 44d4a28
content component test
nreese 71f57df
load isCloudEnabled in home_app
nreese bf743d9
add functional test ensuring add data tutorials are fetch and displayed
nreese 9ae7d80
rename card btns to 'Add data', fix type in tutorial directory tab, r…
nreese c21b69d
move parameters form to right of instruction set title
nreese dcc70d3
add copy snippet button, remove line numbers from command block
nreese 1a0036a
add breadcrumb to tutorial view
nreese 479c731
update tutorial jest snapshot
nreese ac8df5d
use componentDidMount and ignore async results if componenent has bee…
nreese 77ff701
define shape of prop for instructionVariants and params. Create Numbe…
nreese f6da1a9
add bread crumb to add data directory page
nreese 4febf29
Add cloud version of the apache_logs tutorial (#16)
tsg 06ba9e7
fix styling broken by EUI rebase
nreese cd7cd12
add artifacts to tutorial schema
nreese fa5d3aa
fix styling for code block
nreese e9c2dc1
[Tutorials] Netflow: instructions for onPremCloud (#18)
ycombinator f9dc6a5
fix copy bug where copy would only contain previously selected text
nreese 1699c21
make string parameter input type be text
nreese 8b0b5d9
Implementing Elastic Cloud tutorial for Netflow module (#19)
ycombinator c1f7866
More tutorial edits (#20)
tsg 119c5c2
wrap markdown content in markdown-body class
nreese 96a54ea
use EuiFlexGroup to remove wasted space with 'copy snippet' button an…
nreese d9d0bc1
change OSX to macOS, use Computed property names for instruction_vari…
nreese 5e05e66
capitilize 'C' in Elastic Cloud
nreese 7d8654d
remove try/catch from copy_to_clipboard
nreese d089b16
Removing unrelated instructions
ycombinator 873995e
Copy editing fixes
ycombinator ef358a2
Multiply edits to the Beats tutorials (#21)
tsg d4c65e4
prevent 'Copy snippet' button text from wrapping
nreese abb1935
[Netflow tutorial] Windows instructions (#22)
ycombinator 76c1638
use EuiImage so tutorial images are clickable to view in full screen
nreese 214eaf2
fix jest tests
nreese ac9e4c6
set fullScreenIconColor and alt options for EuiImage, add space betwe…
nreese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/core_plugins/kibana/common/tutorials/filebeat_cloud_instructions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
166
src/core_plugins/kibana/common/tutorials/filebeat_instructions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
] | ||
} | ||
} | ||
}; |
2 changes: 2 additions & 0 deletions
2
src/core_plugins/kibana/common/tutorials/filebeat_onprem_cloud_instructions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
34
src/core_plugins/kibana/common/tutorials/instruction_variant.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
export const INSTRUCTION_VARIANT = { | ||
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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
27
src/core_plugins/kibana/common/tutorials/logstash_instructions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.' | ||
} | ||
], | ||
} | ||
}; |
40 changes: 40 additions & 0 deletions
40
src/core_plugins/kibana/common/tutorials/metricbeat_cloud_instructions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.' | ||
} | ||
} | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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:
Then where it's passed in: