From 9533e69ce5829bac39d5b3717efe26d845831a28 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Tue, 14 Jan 2020 18:36:25 +0100 Subject: [PATCH 1/8] start migrating tutorials --- .../convert_pattern_and_ingest_name.js | 50 --------------- .../lib/convert_pattern_and_ingest_name.js | 39 ----------- src/legacy/core_plugins/kibana/index.js | 2 +- .../components/tutorial/instruction_set.js | 2 +- src/legacy/ui/tutorials_mixin.js | 2 +- .../tutorials/lib/tutorials_registry_types.ts | 28 ++++---- .../server/tutorials/activemq_logs/index.ts} | 6 +- .../tutorials/activemq_metrics/index.ts} | 6 +- .../tutorials/aerospike_metrics/index.ts} | 6 +- .../server/tutorials/apache_logs/index.ts} | 6 +- .../server/tutorials/apache_metrics/index.ts} | 6 +- .../home/server/tutorials/auditbeat/index.ts} | 6 +- .../home/server/tutorials/aws_logs/index.ts} | 6 +- .../server/tutorials/aws_metrics/index.ts} | 6 +- .../server/tutorials/azure_metrics/index.ts} | 6 +- .../server/tutorials/ceph_metrics/index.ts} | 6 +- .../server/tutorials/cisco_logs/index.ts} | 6 +- .../tutorials/cloudwatch_logs/index.ts} | 6 +- .../tutorials/cockroachdb_metrics/index.ts} | 6 +- .../server/tutorials/consul_metrics/index.ts} | 6 +- .../server/tutorials/coredns_logs/index.ts} | 6 +- .../tutorials/coredns_metrics/index.ts} | 6 +- .../tutorials/couchbase_metrics/index.ts} | 6 +- .../tutorials/couchdb_metrics/index.ts} | 6 +- .../server/tutorials/docker_metrics/index.ts} | 6 +- .../tutorials/dropwizard_metrics/index.ts} | 6 +- .../tutorials/elasticsearch_logs/index.ts} | 6 +- .../tutorials/elasticsearch_metrics/index.ts} | 6 +- .../home/server/tutorials/ems/index.ts} | 2 +- .../tutorials/envoyproxy_logs/index.ts} | 6 +- .../tutorials/envoyproxy_metrics/index.ts} | 6 +- .../server/tutorials/etcd_metrics/index.ts} | 6 +- .../server/tutorials/golang_metrics/index.ts} | 6 +- .../tutorials/haproxy_metrics/index.ts} | 6 +- .../server/tutorials/ibmmq_logs/index.ts} | 6 +- .../home/server/tutorials/iis_logs/index.ts} | 6 +- .../instructions/auditbeat_instructions.ts} | 11 ++-- .../instructions/filebeat_instructions.ts} | 4 +- .../functionbeat_instructions.ts} | 4 +- .../get_space_id_for_beats_tutorial.ts} | 4 +- .../instructions/heartbeat_instructions.ts} | 4 +- .../instructions/instruction_variant.ts} | 0 .../instructions/logstash_instructions.ts} | 0 .../instructions/metricbeat_instructions.ts} | 9 +-- .../onprem_cloud_instructions.ts} | 0 .../tutorials/instructions/param_types.ts} | 0 .../instructions/tutorial_category.ts} | 0 .../instructions/tutorial_schema.ts} | 0 .../instructions/winlogbeat_instructions.ts} | 7 +- .../server/tutorials/iptables_logs/index.ts} | 6 +- .../server/tutorials/kafka_logs/index.ts} | 6 +- .../server/tutorials/kafka_metrics/index.ts} | 6 +- .../server/tutorials/kibana_metrics/index.ts} | 6 +- .../tutorials/kubernetes_metrics/index.ts} | 6 +- .../server/tutorials/logstash_logs/index.ts} | 6 +- .../tutorials/logstash_metrics/index.ts} | 6 +- .../tutorials/memcached_metrics/index.ts} | 6 +- .../tutorials/mongodb_metrics/index.ts} | 6 +- .../server/tutorials/mssql_metrics/index.ts} | 6 +- .../server/tutorials/munin_metrics/index.ts} | 6 +- .../server/tutorials/mysql_logs/index.ts} | 6 +- .../server/tutorials/mysql_metrics/index.ts} | 6 +- .../home/server/tutorials/nats_logs/index.ts} | 6 +- .../server/tutorials/nats_metrics/index.ts} | 6 +- .../tutorials/netflow/common_instructions.ts} | 0 .../tutorials/netflow/elastic_cloud.ts} | 4 +- .../home/server/tutorials/netflow/index.ts} | 2 +- .../home/server/tutorials/netflow/on_prem.ts} | 4 +- .../netflow/on_prem_elastic_cloud.ts} | 6 +- .../server/tutorials/nginx_logs/index.ts} | 6 +- .../server/tutorials/nginx_metrics/index.ts} | 6 +- .../server/tutorials/osquery_logs/index.ts} | 6 +- .../tutorials/php_fpm_metrics/index.ts} | 6 +- .../tutorials/postgresql_logs/index.ts} | 6 +- .../tutorials/postgresql_metrics/index.ts} | 6 +- .../tutorials/prometheus_metrics/index.ts} | 6 +- .../tutorials/rabbitmq_metrics/index.ts} | 6 +- .../server/tutorials/redis_logs/index.ts} | 6 +- .../server/tutorials/redis_metrics/index.ts} | 6 +- .../home/server/tutorials/register.ts} | 2 +- .../server/tutorials/stan_metrics/index.ts} | 6 +- .../server/tutorials/suricata_logs/index.ts} | 6 +- .../server/tutorials/system_logs/index.ts} | 6 +- .../server/tutorials/system_metrics/index.ts} | 6 +- .../server/tutorials/traefik_logs/index.ts} | 6 +- .../tutorials/traefik_metrics/index.ts} | 6 +- .../tutorials/uptime_monitors/index.ts} | 6 +- .../server/tutorials/uwsgi_metrics/index.ts} | 6 +- .../tutorials/vsphere_metrics/index.ts} | 6 +- .../tutorials/windows_event_logs/index.ts} | 6 +- .../tutorials/windows_metrics/index.ts} | 6 +- .../home/server/tutorials/zeek_logs/index.ts} | 6 +- .../tutorials/zookeeper_metrics/index.ts} | 6 +- .../create_static_index_pattern.ts | 2 +- x-pack/plugins/apm/kibana.json | 3 +- x-pack/plugins/apm/server/plugin.ts | 20 ++++++ .../apm/server/tutorial/envs/elastic_cloud.ts | 41 ++++-------- .../apm/server/tutorial/envs/on_prem.ts | 44 ++++++------- .../plugins/apm/server/tutorial/index.ts | 64 ++++++++----------- .../apm/server/tutorial}/index_pattern.json | 0 .../instructions/apm_agent_instructions.ts | 19 +----- .../instructions/apm_server_instructions.ts | 19 +----- 102 files changed, 340 insertions(+), 460 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js delete mode 100644 src/legacy/core_plugins/kibana/common/lib/convert_pattern_and_ingest_name.js rename src/{legacy/core_plugins/kibana/server/tutorials/activemq_logs/index.js => plugins/home/server/tutorials/activemq_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/activemq_metrics/index.js => plugins/home/server/tutorials/activemq_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js => plugins/home/server/tutorials/aerospike_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/apache_logs/index.js => plugins/home/server/tutorials/apache_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/apache_metrics/index.js => plugins/home/server/tutorials/apache_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/auditbeat/index.js => plugins/home/server/tutorials/auditbeat/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/aws_logs/index.js => plugins/home/server/tutorials/aws_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/aws_metrics/index.js => plugins/home/server/tutorials/aws_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/azure_metrics/index.js => plugins/home/server/tutorials/azure_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/ceph_metrics/index.js => plugins/home/server/tutorials/ceph_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/cisco_logs/index.js => plugins/home/server/tutorials/cisco_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/cloudwatch_logs/index.js => plugins/home/server/tutorials/cloudwatch_logs/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/cockroachdb_metrics/index.js => plugins/home/server/tutorials/cockroachdb_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/consul_metrics/index.js => plugins/home/server/tutorials/consul_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/coredns_logs/index.js => plugins/home/server/tutorials/coredns_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js => plugins/home/server/tutorials/coredns_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js => plugins/home/server/tutorials/couchbase_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/couchdb_metrics/index.js => plugins/home/server/tutorials/couchdb_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/docker_metrics/index.js => plugins/home/server/tutorials/docker_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js => plugins/home/server/tutorials/dropwizard_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js => plugins/home/server/tutorials/elasticsearch_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js => plugins/home/server/tutorials/elasticsearch_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/ems/index.js => plugins/home/server/tutorials/ems/index.ts} (97%) rename src/{legacy/core_plugins/kibana/server/tutorials/envoyproxy_logs/index.js => plugins/home/server/tutorials/envoyproxy_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js => plugins/home/server/tutorials/envoyproxy_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/etcd_metrics/index.js => plugins/home/server/tutorials/etcd_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/golang_metrics/index.js => plugins/home/server/tutorials/golang_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js => plugins/home/server/tutorials/haproxy_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/ibmmq_logs/index.js => plugins/home/server/tutorials/ibmmq_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/iis_logs/index.js => plugins/home/server/tutorials/iis_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/common/tutorials/auditbeat_instructions.js => plugins/home/server/tutorials/instructions/auditbeat_instructions.ts} (97%) rename src/{legacy/core_plugins/kibana/common/tutorials/filebeat_instructions.js => plugins/home/server/tutorials/instructions/filebeat_instructions.ts} (99%) rename src/{legacy/core_plugins/kibana/common/tutorials/functionbeat_instructions.js => plugins/home/server/tutorials/instructions/functionbeat_instructions.ts} (99%) rename src/{legacy/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js => plugins/home/server/tutorials/instructions/get_space_id_for_beats_tutorial.ts} (87%) rename src/{legacy/core_plugins/kibana/common/tutorials/heartbeat_instructions.js => plugins/home/server/tutorials/instructions/heartbeat_instructions.ts} (99%) rename src/{legacy/core_plugins/kibana/common/tutorials/instruction_variant.js => plugins/home/server/tutorials/instructions/instruction_variant.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/logstash_instructions.js => plugins/home/server/tutorials/instructions/logstash_instructions.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/metricbeat_instructions.js => plugins/home/server/tutorials/instructions/metricbeat_instructions.ts} (98%) rename src/{legacy/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js => plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/param_types.js => plugins/home/server/tutorials/instructions/param_types.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/tutorial_category.js => plugins/home/server/tutorials/instructions/tutorial_category.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/tutorial_schema.js => plugins/home/server/tutorials/instructions/tutorial_schema.ts} (100%) rename src/{legacy/core_plugins/kibana/common/tutorials/winlogbeat_instructions.js => plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts} (96%) rename src/{legacy/core_plugins/kibana/server/tutorials/iptables_logs/index.js => plugins/home/server/tutorials/iptables_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/kafka_logs/index.js => plugins/home/server/tutorials/kafka_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/kafka_metrics/index.js => plugins/home/server/tutorials/kafka_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/kibana_metrics/index.js => plugins/home/server/tutorials/kibana_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js => plugins/home/server/tutorials/kubernetes_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/logstash_logs/index.js => plugins/home/server/tutorials/logstash_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/logstash_metrics/index.js => plugins/home/server/tutorials/logstash_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/memcached_metrics/index.js => plugins/home/server/tutorials/memcached_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js => plugins/home/server/tutorials/mongodb_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/mssql_metrics/index.js => plugins/home/server/tutorials/mssql_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/munin_metrics/index.js => plugins/home/server/tutorials/munin_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/mysql_logs/index.js => plugins/home/server/tutorials/mysql_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/mysql_metrics/index.js => plugins/home/server/tutorials/mysql_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/nats_logs/index.js => plugins/home/server/tutorials/nats_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/nats_metrics/index.js => plugins/home/server/tutorials/nats_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/netflow/common_instructions.js => plugins/home/server/tutorials/netflow/common_instructions.ts} (100%) rename src/{legacy/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js => plugins/home/server/tutorials/netflow/elastic_cloud.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/netflow/index.js => plugins/home/server/tutorials/netflow/index.ts} (96%) rename src/{legacy/core_plugins/kibana/server/tutorials/netflow/on_prem.js => plugins/home/server/tutorials/netflow/on_prem.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js => plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts} (90%) rename src/{legacy/core_plugins/kibana/server/tutorials/nginx_logs/index.js => plugins/home/server/tutorials/nginx_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/nginx_metrics/index.js => plugins/home/server/tutorials/nginx_metrics/index.ts} (93%) rename src/{legacy/core_plugins/kibana/server/tutorials/osquery_logs/index.js => plugins/home/server/tutorials/osquery_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js => plugins/home/server/tutorials/php_fpm_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/postgresql_logs/index.js => plugins/home/server/tutorials/postgresql_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js => plugins/home/server/tutorials/postgresql_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js => plugins/home/server/tutorials/prometheus_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js => plugins/home/server/tutorials/rabbitmq_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/redis_logs/index.js => plugins/home/server/tutorials/redis_logs/index.ts} (93%) rename src/{legacy/core_plugins/kibana/server/tutorials/redis_metrics/index.js => plugins/home/server/tutorials/redis_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/register.js => plugins/home/server/tutorials/register.ts} (99%) rename src/{legacy/core_plugins/kibana/server/tutorials/stan_metrics/index.js => plugins/home/server/tutorials/stan_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/suricata_logs/index.js => plugins/home/server/tutorials/suricata_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/system_logs/index.js => plugins/home/server/tutorials/system_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/system_metrics/index.js => plugins/home/server/tutorials/system_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/traefik_logs/index.js => plugins/home/server/tutorials/traefik_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/traefik_metrics/index.js => plugins/home/server/tutorials/traefik_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/uptime_monitors/index.js => plugins/home/server/tutorials/uptime_monitors/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js => plugins/home/server/tutorials/uwsgi_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js => plugins/home/server/tutorials/vsphere_metrics/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/windows_event_logs/index.js => plugins/home/server/tutorials/windows_event_logs/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/windows_metrics/index.js => plugins/home/server/tutorials/windows_metrics/index.ts} (91%) rename src/{legacy/core_plugins/kibana/server/tutorials/zeek_logs/index.js => plugins/home/server/tutorials/zeek_logs/index.ts} (92%) rename src/{legacy/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js => plugins/home/server/tutorials/zookeeper_metrics/index.ts} (91%) rename src/legacy/core_plugins/kibana/server/tutorials/apm/envs/elastic_cloud.js => x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts (66%) rename src/legacy/core_plugins/kibana/server/tutorials/apm/envs/on_prem.js => x-pack/plugins/apm/server/tutorial/envs/on_prem.ts (83%) rename src/legacy/core_plugins/kibana/server/tutorials/apm/index.js => x-pack/plugins/apm/server/tutorial/index.ts (62%) rename {src/legacy/core_plugins/kibana/server/tutorials/apm => x-pack/plugins/apm/server/tutorial}/index_pattern.json (100%) rename src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_agent_instructions.js => x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts (97%) rename src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_server_instructions.js => x-pack/plugins/apm/server/tutorial/instructions/apm_server_instructions.ts (85%) diff --git a/src/legacy/core_plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js b/src/legacy/core_plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js deleted file mode 100644 index 2d138df67ebf9..0000000000000 --- a/src/legacy/core_plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import expect from '@kbn/expect'; -import { patternToIngest, ingestToPattern } from '../convert_pattern_and_ingest_name'; - -describe('convertPatternAndTemplateName', function() { - describe('ingestToPattern', function() { - it("should convert an index template's name to its matching index pattern's title", function() { - expect(ingestToPattern('kibana-logstash-*')).to.be('logstash-*'); - }); - - it("should throw an error if the template name isn't a valid kibana namespaced name", function() { - expect(ingestToPattern) - .withArgs('logstash-*') - .to.throwException('not a valid kibana namespaced template name'); - expect(ingestToPattern) - .withArgs('') - .to.throwException(/not a valid kibana namespaced template name/); - }); - }); - - describe('patternToIngest', function() { - it("should convert an index pattern's title to its matching index template's name", function() { - expect(patternToIngest('logstash-*')).to.be('kibana-logstash-*'); - }); - - it('should throw an error if the pattern is empty', function() { - expect(patternToIngest) - .withArgs('') - .to.throwException(/pattern must not be empty/); - }); - }); -}); diff --git a/src/legacy/core_plugins/kibana/common/lib/convert_pattern_and_ingest_name.js b/src/legacy/core_plugins/kibana/common/lib/convert_pattern_and_ingest_name.js deleted file mode 100644 index 216dc7d882a2c..0000000000000 --- a/src/legacy/core_plugins/kibana/common/lib/convert_pattern_and_ingest_name.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -// To avoid index template naming collisions the index pattern creation API -// namespaces template names by prepending 'kibana-' to the matching pattern's title. -// e.g. a pattern with title `logstash-*` will have a matching template named `kibana-logstash-*`. -// This module provides utility functions for easily converting between template and pattern names. - -export function ingestToPattern(templateName) { - if (templateName.indexOf('kibana-') === -1) { - throw new Error('not a valid kibana namespaced template name'); - } - - return templateName.slice(templateName.indexOf('-') + 1); -} - -export function patternToIngest(patternName) { - if (patternName === '') { - throw new Error('pattern must not be empty'); - } - - return `kibana-${patternName.toLowerCase()}`; -} diff --git a/src/legacy/core_plugins/kibana/index.js b/src/legacy/core_plugins/kibana/index.js index 111b74d8aa6af..157bef47e2147 100644 --- a/src/legacy/core_plugins/kibana/index.js +++ b/src/legacy/core_plugins/kibana/index.js @@ -27,7 +27,7 @@ import { exportApi } from './server/routes/api/export'; import { homeApi } from './server/routes/api/home'; import { managementApi } from './server/routes/api/management'; import { registerFieldFormats } from './server/field_formats/register'; -import { registerTutorials } from './server/tutorials/register'; +import { registerTutorials } from '../../../plugins/home/server/tutorials/register'; import * as systemApi from './server/lib/system_api'; import mappings from './mappings.json'; import { getUiSettingDefaults } from './ui_setting_defaults'; diff --git a/src/legacy/core_plugins/kibana/public/home/np_ready/components/tutorial/instruction_set.js b/src/legacy/core_plugins/kibana/public/home/np_ready/components/tutorial/instruction_set.js index 4f60de00819e7..15bda33534185 100644 --- a/src/legacy/core_plugins/kibana/public/home/np_ready/components/tutorial/instruction_set.js +++ b/src/legacy/core_plugins/kibana/public/home/np_ready/components/tutorial/instruction_set.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import { Instruction } from './instruction'; import { ParameterForm } from './parameter_form'; import { Content } from './content'; -import { getDisplayText } from '../../../../../common/tutorials/instruction_variant'; +import { getDisplayText } from '../../../../../../../../plugins/home/server/tutorials/instructions/instruction_variant'; import { EuiTabs, EuiTab, diff --git a/src/legacy/ui/tutorials_mixin.js b/src/legacy/ui/tutorials_mixin.js index efaf4ee7e78f0..fc145b1d238e9 100644 --- a/src/legacy/ui/tutorials_mixin.js +++ b/src/legacy/ui/tutorials_mixin.js @@ -18,7 +18,7 @@ */ import Joi from 'joi'; -import { tutorialSchema } from '../core_plugins/kibana/common/tutorials/tutorial_schema'; +import { tutorialSchema } from '../../plugins/home/server/tutorials/instructions/tutorial_schema'; export function tutorialsMixin(kbnServer, server) { const tutorialProviders = []; diff --git a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts index 951ce935760a1..244b3ff5d0a15 100644 --- a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts +++ b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts @@ -32,7 +32,7 @@ export interface ParamTypes { } export interface InstructionSetSchema { readonly title: string; - readonly callOut: { + readonly callOut?: { title: string; message: string; iconType: IconType; @@ -46,22 +46,19 @@ export interface ParamsSchema { } export interface InstructionsSchema { readonly instructionSets: InstructionSetSchema[]; - readonly params: ParamsSchema[]; + readonly params?: ParamsSchema[]; } export interface DashboardSchema { id: string; - linkLabel?: { - is: boolean; - then: any; - }; + linkLabel?: string; isOverview: boolean; } export interface ArtifactsSchema { - readonly exportedFields: { + exportedFields?: { documentationUrl: string; }; - readonly dashboards: DashboardSchema[]; - readonly application: { + dashboards: DashboardSchema[]; + application?: { path: string; label: string; }; @@ -70,21 +67,21 @@ export interface TutorialSchema { id: string; category: TutorialsCategory; name: string; - isBeta: boolean; + isBeta?: boolean; shortDescription: string; euiIconType: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon; longDescription: string; - completionTimeMinutes: number; + completionTimeMinutes?: number; previewImagePath: string; // kibana and elastic cluster running on prem onPrem: InstructionsSchema; // kibana and elastic cluster running in elastic's cloud - elasticCloud: InstructionsSchema; + elasticCloud?: InstructionsSchema; // kibana running on prem and elastic cluster running in elastic's cloud - onPremElasticCloud: InstructionsSchema; + onPremElasticCloud?: InstructionsSchema; // Elastic stack artifacts produced by product when it is setup and run. artifacts: ArtifactsSchema; @@ -93,6 +90,9 @@ export interface TutorialSchema { savedObjects: any[]; savedObjectsInstallMsg: string; } -export type TutorialProvider = (context: { [key: string]: unknown }) => TutorialSchema; +export interface TutorialContext { + [key: string]: unknown; +} +export type TutorialProvider = (context: TutorialContext) => TutorialSchema; export type TutorialContextFactory = (req: KibanaRequest) => { [key: string]: unknown }; export type ScopedTutorialContextFactory = (...args: any[]) => any; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/activemq_logs/index.js b/src/plugins/home/server/tutorials/activemq_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/activemq_logs/index.js rename to src/plugins/home/server/tutorials/activemq_logs/index.ts index fa5fe3b0ecfe3..b03d0536d2298 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/activemq_logs/index.js +++ b/src/plugins/home/server/tutorials/activemq_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function activemqLogsSpecProvider(server, context) { +export function activemqLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'activemq'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/activemq_metrics/index.js b/src/plugins/home/server/tutorials/activemq_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/activemq_metrics/index.js rename to src/plugins/home/server/tutorials/activemq_metrics/index.ts index 683a58c85e552..5ecc441abdde0 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/activemq_metrics/index.js +++ b/src/plugins/home/server/tutorials/activemq_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function activemqMetricsSpecProvider(context) { +export function activemqMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'activemq'; return { id: 'activemqMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js rename to src/plugins/home/server/tutorials/aerospike_metrics/index.ts index aeb00dfa526fe..73462c0ae1466 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/aerospike_metrics/index.js +++ b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function aerospikeMetricsSpecProvider(context) { +export function aerospikeMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aerospike'; return { id: 'aerospikeMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apache_logs/index.js b/src/plugins/home/server/tutorials/apache_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/apache_logs/index.js rename to src/plugins/home/server/tutorials/apache_logs/index.ts index d60884e196498..f0bdf2567b1b4 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apache_logs/index.js +++ b/src/plugins/home/server/tutorials/apache_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function apacheLogsSpecProvider(context) { +export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'apache'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apache_metrics/index.js b/src/plugins/home/server/tutorials/apache_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/apache_metrics/index.js rename to src/plugins/home/server/tutorials/apache_metrics/index.ts index 5e20bfd1e9650..2e4f4cd0a3d07 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apache_metrics/index.js +++ b/src/plugins/home/server/tutorials/apache_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function apacheMetricsSpecProvider(context) { +export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'apache'; return { id: 'apacheMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/auditbeat/index.js b/src/plugins/home/server/tutorials/auditbeat/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/auditbeat/index.js rename to src/plugins/home/server/tutorials/auditbeat/index.ts index b67a872dcc0aa..2db96c36e77fc 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/auditbeat/index.js +++ b/src/plugins/home/server/tutorials/auditbeat/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/auditbeat_instructions'; +} from '../instructions/auditbeat_instructions'; -export function auditbeatSpecProvider(context) { +export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema { const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { id: 'auditbeat', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/aws_logs/index.js b/src/plugins/home/server/tutorials/aws_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/aws_logs/index.js rename to src/plugins/home/server/tutorials/aws_logs/index.ts index 5f7131cb4dcde..46ec1ef0ec89e 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/aws_logs/index.js +++ b/src/plugins/home/server/tutorials/aws_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function awsLogsSpecProvider(server, context) { +export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aws'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/aws_metrics/index.js b/src/plugins/home/server/tutorials/aws_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/aws_metrics/index.js rename to src/plugins/home/server/tutorials/aws_metrics/index.ts index e7b6644ecea1c..6e549cd24cdcc 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/aws_metrics/index.js +++ b/src/plugins/home/server/tutorials/aws_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function awsMetricsSpecProvider(context) { +export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aws'; return { id: 'awsMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/azure_metrics/index.js b/src/plugins/home/server/tutorials/azure_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/azure_metrics/index.js rename to src/plugins/home/server/tutorials/azure_metrics/index.ts index cbefd713a7381..a97a3a01ea6ec 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/azure_metrics/index.js +++ b/src/plugins/home/server/tutorials/azure_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function azureMetricsSpecProvider(context) { +export function azureMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'azure'; return { id: 'azureMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/ceph_metrics/index.js b/src/plugins/home/server/tutorials/ceph_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/ceph_metrics/index.js rename to src/plugins/home/server/tutorials/ceph_metrics/index.ts index d844dd016657c..ba86b5049b0e2 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/ceph_metrics/index.js +++ b/src/plugins/home/server/tutorials/ceph_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function cephMetricsSpecProvider(context) { +export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'ceph'; return { id: 'cephMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/cisco_logs/index.js b/src/plugins/home/server/tutorials/cisco_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/cisco_logs/index.js rename to src/plugins/home/server/tutorials/cisco_logs/index.ts index 90190bd0d6877..fb5c334e6e5fa 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/cisco_logs/index.js +++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function ciscoLogsSpecProvider(context) { +export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'cisco'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/cloudwatch_logs/index.js b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/cloudwatch_logs/index.js rename to src/plugins/home/server/tutorials/cloudwatch_logs/index.ts index 6abc7161d8bf2..48d8dcba67c35 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/cloudwatch_logs/index.js +++ b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/functionbeat_instructions'; +} from '../instructions/functionbeat_instructions'; -export function cloudwatchLogsSpecProvider(context) { +export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'cloudwatchLogs', name: i18n.translate('kbn.server.tutorials.cloudwatchLogs.nameTitle', { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/cockroachdb_metrics/index.js b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/cockroachdb_metrics/index.js rename to src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts index 0eb54700b50c2..3840c0b14f5ef 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/cockroachdb_metrics/index.js +++ b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function cockroachdbMetricsSpecProvider(context) { +export function cockroachdbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'cockroachdb'; return { id: 'cockroachdbMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/consul_metrics/index.js b/src/plugins/home/server/tutorials/consul_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/consul_metrics/index.js rename to src/plugins/home/server/tutorials/consul_metrics/index.ts index 361fd1db39e5a..c656997f6fda0 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/consul_metrics/index.js +++ b/src/plugins/home/server/tutorials/consul_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function consulMetricsSpecProvider(context) { +export function consulMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'consul'; return { id: 'consulMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/coredns_logs/index.js b/src/plugins/home/server/tutorials/coredns_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/coredns_logs/index.js rename to src/plugins/home/server/tutorials/coredns_logs/index.ts index ca308ac969e49..7851bf627e47e 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/coredns_logs/index.js +++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function corednsLogsSpecProvider(server, context) { +export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'coredns'; const platforms = ['OSX', 'DEB', 'RPM']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js b/src/plugins/home/server/tutorials/coredns_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js rename to src/plugins/home/server/tutorials/coredns_metrics/index.ts index 58bd8f656bafb..cb1abd17244e3 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/coredns_metrics/index.js +++ b/src/plugins/home/server/tutorials/coredns_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function corednsMetricsSpecProvider(context) { +export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'coredns'; return { id: 'corednsMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js rename to src/plugins/home/server/tutorials/couchbase_metrics/index.ts index 3348b9edb7b9c..f56abbeb4b865 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/couchbase_metrics/index.js +++ b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function couchbaseMetricsSpecProvider(context) { +export function couchbaseMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'couchbase'; return { id: 'couchbaseMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/couchdb_metrics/index.js b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/couchdb_metrics/index.js rename to src/plugins/home/server/tutorials/couchdb_metrics/index.ts index cf7cec60c1f13..bf49c8b6ec9a5 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/couchdb_metrics/index.js +++ b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function couchdbMetricsSpecProvider(context) { +export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'couchdb'; return { id: 'couchdbMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/docker_metrics/index.js b/src/plugins/home/server/tutorials/docker_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/docker_metrics/index.js rename to src/plugins/home/server/tutorials/docker_metrics/index.ts index 0ed852afec7b7..ef7b11db1d650 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/docker_metrics/index.js +++ b/src/plugins/home/server/tutorials/docker_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function dockerMetricsSpecProvider(context) { +export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'docker'; return { id: 'dockerMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js rename to src/plugins/home/server/tutorials/dropwizard_metrics/index.ts index c32779fb36368..a63361f0dd67a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/dropwizard_metrics/index.js +++ b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function dropwizardMetricsSpecProvider(context) { +export function dropwizardMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'dropwizard'; return { id: 'dropwizardMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js rename to src/plugins/home/server/tutorials/elasticsearch_logs/index.ts index 20bdf38a5f779..1dad999409926 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_logs/index.js +++ b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function elasticsearchLogsSpecProvider(context) { +export function elasticsearchLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'elasticsearch'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js rename to src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts index a4d193ebc1d1f..74ac845140a08 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/elasticsearch_metrics/index.js +++ b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function elasticsearchMetricsSpecProvider(context) { +export function elasticsearchMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'elasticsearch'; return { id: 'elasticsearchMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/ems/index.js b/src/plugins/home/server/tutorials/ems/index.ts similarity index 97% rename from src/legacy/core_plugins/kibana/server/tutorials/ems/index.js rename to src/plugins/home/server/tutorials/ems/index.ts index 24293590299b1..bdb726903305a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/ems/index.js +++ b/src/plugins/home/server/tutorials/ems/index.ts @@ -18,7 +18,7 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; export function emsBoundariesSpecProvider(server) { function addBasePath(url) { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_logs/index.js b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_logs/index.js rename to src/plugins/home/server/tutorials/envoyproxy_logs/index.ts index 977decd413f08..5b763f649d71b 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_logs/index.js +++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function envoyproxyLogsSpecProvider(context) { +export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'envoyproxy'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js rename to src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts index 4e5301149b35b..6b21f1237d963 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/envoyproxy_metrics/index.js +++ b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function envoyproxyMetricsSpecProvider(server, context) { +export function envoyproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'envoyproxy'; return { id: 'envoyproxyMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/etcd_metrics/index.js b/src/plugins/home/server/tutorials/etcd_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/etcd_metrics/index.js rename to src/plugins/home/server/tutorials/etcd_metrics/index.ts index fdd0956bb25bb..fdae404c221c1 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/etcd_metrics/index.js +++ b/src/plugins/home/server/tutorials/etcd_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function etcdMetricsSpecProvider(context) { +export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'etcd'; return { id: 'etcdMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/golang_metrics/index.js b/src/plugins/home/server/tutorials/golang_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/golang_metrics/index.js rename to src/plugins/home/server/tutorials/golang_metrics/index.ts index 7eb6e340c863d..48dfff46a9535 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/golang_metrics/index.js +++ b/src/plugins/home/server/tutorials/golang_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function golangMetricsSpecProvider(context) { +export function golangMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'golang'; return { id: moduleName + 'Metrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js rename to src/plugins/home/server/tutorials/haproxy_metrics/index.ts index 7e2ca4af7fd9c..c6b7837eaeebf 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/haproxy_metrics/index.js +++ b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function haproxyMetricsSpecProvider(context) { +export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'haproxy'; return { id: 'haproxyMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/ibmmq_logs/index.js b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/ibmmq_logs/index.js rename to src/plugins/home/server/tutorials/ibmmq_logs/index.ts index 4ffda2d7a523c..514f90d3c7738 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/ibmmq_logs/index.js +++ b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function ibmmqLogsSpecProvider(server, context) { +export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'ibmmq'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/iis_logs/index.js b/src/plugins/home/server/tutorials/iis_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/iis_logs/index.js rename to src/plugins/home/server/tutorials/iis_logs/index.ts index d2a5b5f113d29..a7801811fbfc8 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/iis_logs/index.js +++ b/src/plugins/home/server/tutorials/iis_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function iisLogsSpecProvider(context) { +export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'iis'; const platforms = ['WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/common/tutorials/auditbeat_instructions.js b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts similarity index 97% rename from src/legacy/core_plugins/kibana/common/tutorials/auditbeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts index 3d95738ab21f7..69478c92c56dc 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/auditbeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts @@ -20,9 +20,10 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; -export const createAuditbeatInstructions = context => ({ +export const createAuditbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.osxTitle', { @@ -401,7 +402,7 @@ export function auditbeatStatusCheck() { }; } -export function onPremInstructions(platforms, context) { +export function onPremInstructions(platforms: string[], context?: TutorialContext) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(context); const variants = []; @@ -432,7 +433,7 @@ export function onPremInstructions(platforms, context) { }; } -export function onPremCloudInstructions(platforms) { +export function onPremCloudInstructions(platforms: string[]) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(); const TRYCLOUD_OPTION1 = createTrycloudOption1(); const TRYCLOUD_OPTION2 = createTrycloudOption2(); @@ -468,7 +469,7 @@ export function onPremCloudInstructions(platforms) { }; } -export function cloudInstructions(platforms) { +export function cloudInstructions(platforms: string[]) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(); const AUDITBEAT_CLOUD_INSTRUCTIONS = createAuditbeatCloudInstructions(); diff --git a/src/legacy/core_plugins/kibana/common/tutorials/filebeat_instructions.js b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts similarity index 99% rename from src/legacy/core_plugins/kibana/common/tutorials/filebeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts index 2180a489a449d..941251c3059dd 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/filebeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts @@ -20,9 +20,9 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; -export const createFilebeatInstructions = context => ({ +export const createFilebeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTitle', { diff --git a/src/legacy/core_plugins/kibana/common/tutorials/functionbeat_instructions.js b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts similarity index 99% rename from src/legacy/core_plugins/kibana/common/tutorials/functionbeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts index f4116191c1cac..4a8280def8202 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/functionbeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts @@ -20,9 +20,9 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; -export const createFunctionbeatInstructions = context => ({ +export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.osxTitle', { diff --git a/src/legacy/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js b/src/plugins/home/server/tutorials/instructions/get_space_id_for_beats_tutorial.ts similarity index 87% rename from src/legacy/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js rename to src/plugins/home/server/tutorials/instructions/get_space_id_for_beats_tutorial.ts index f7da589526003..894ffc6b126d6 100644 --- a/src/legacy/core_plugins/kibana/common/lib/get_space_id_for_beats_tutorial.js +++ b/src/plugins/home/server/tutorials/instructions/get_space_id_for_beats_tutorial.ts @@ -17,13 +17,15 @@ * under the License. */ +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; + /** * Returns valid configuration for a beat.yml file for adding the space id * if there is an active space and that space is not the default one. * * @param {object} context - Context object generated from tutorial factory (see #22760) */ -export function getSpaceIdForBeatsTutorial(context) { +export function getSpaceIdForBeatsTutorial(context?: TutorialContext) { if (!context || !context.spaceId || context.isInDefaultSpace) { return ''; } diff --git a/src/legacy/core_plugins/kibana/common/tutorials/heartbeat_instructions.js b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts similarity index 99% rename from src/legacy/core_plugins/kibana/common/tutorials/heartbeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts index d9af2126174f7..0e9f6af04d0cd 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/heartbeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts @@ -20,9 +20,9 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; -export const createHeartbeatInstructions = context => ({ +export const createHeartbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.osxTitle', { diff --git a/src/legacy/core_plugins/kibana/common/tutorials/instruction_variant.js b/src/plugins/home/server/tutorials/instructions/instruction_variant.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/instruction_variant.js rename to src/plugins/home/server/tutorials/instructions/instruction_variant.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/logstash_instructions.js b/src/plugins/home/server/tutorials/instructions/logstash_instructions.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/logstash_instructions.js rename to src/plugins/home/server/tutorials/instructions/logstash_instructions.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/metricbeat_instructions.js b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts similarity index 98% rename from src/legacy/core_plugins/kibana/common/tutorials/metricbeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts index b7b1bec851e94..05bb87e4ee6d1 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/metricbeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts @@ -20,9 +20,10 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; -export const createMetricbeatInstructions = context => ({ +export const createMetricbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTitle', { @@ -465,7 +466,7 @@ export function metricbeatStatusCheck(moduleName) { }; } -export function onPremInstructions(moduleName, platforms, context) { +export function onPremInstructions(moduleName: string, context?: TutorialContext) { const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(context); return { @@ -521,7 +522,7 @@ export function onPremInstructions(moduleName, platforms, context) { }; } -export function onPremCloudInstructions(moduleName) { +export function onPremCloudInstructions(moduleName: string) { const TRYCLOUD_OPTION1 = createTrycloudOption1(); const TRYCLOUD_OPTION2 = createTrycloudOption2(); const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(); diff --git a/src/legacy/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js b/src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/onprem_cloud_instructions.js rename to src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/param_types.js b/src/plugins/home/server/tutorials/instructions/param_types.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/param_types.js rename to src/plugins/home/server/tutorials/instructions/param_types.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/tutorial_category.js b/src/plugins/home/server/tutorials/instructions/tutorial_category.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/tutorial_category.js rename to src/plugins/home/server/tutorials/instructions/tutorial_category.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/tutorial_schema.js b/src/plugins/home/server/tutorials/instructions/tutorial_schema.ts similarity index 100% rename from src/legacy/core_plugins/kibana/common/tutorials/tutorial_schema.js rename to src/plugins/home/server/tutorials/instructions/tutorial_schema.ts diff --git a/src/legacy/core_plugins/kibana/common/tutorials/winlogbeat_instructions.js b/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts similarity index 96% rename from src/legacy/core_plugins/kibana/common/tutorials/winlogbeat_instructions.js rename to src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts index 509ab0e6aba2d..140292349d4c6 100644 --- a/src/legacy/core_plugins/kibana/common/tutorials/winlogbeat_instructions.js +++ b/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts @@ -20,9 +20,10 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; -import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial'; +import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; -export const createWinlogbeatInstructions = context => ({ +export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { WINDOWS: { title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.install.windowsTitle', { @@ -169,7 +170,7 @@ export function winlogbeatStatusCheck() { }; } -export function onPremInstructions(platforms, context) { +export function onPremInstructions(context?: TutorialContext) { const WINLOGBEAT_INSTRUCTIONS = createWinlogbeatInstructions(context); return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/iptables_logs/index.js b/src/plugins/home/server/tutorials/iptables_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/iptables_logs/index.js rename to src/plugins/home/server/tutorials/iptables_logs/index.ts index 63246e44d2d0d..d7e1e6869eebc 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/iptables_logs/index.js +++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function iptablesLogsSpecProvider(context) { +export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'iptables'; const platforms = ['DEB', 'RPM']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/kafka_logs/index.js b/src/plugins/home/server/tutorials/kafka_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/kafka_logs/index.js rename to src/plugins/home/server/tutorials/kafka_logs/index.ts index 0d98aaa8a8ccf..f01bbb3b01529 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/kafka_logs/index.js +++ b/src/plugins/home/server/tutorials/kafka_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function kafkaLogsSpecProvider(context) { +export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kafka'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/kafka_metrics/index.js b/src/plugins/home/server/tutorials/kafka_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/kafka_metrics/index.js rename to src/plugins/home/server/tutorials/kafka_metrics/index.ts index 088ee876661bb..827cd5795a03f 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/kafka_metrics/index.js +++ b/src/plugins/home/server/tutorials/kafka_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function kafkaMetricsSpecProvider(context) { +export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kafka'; return { id: 'kafkaMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/kibana_metrics/index.js b/src/plugins/home/server/tutorials/kibana_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/kibana_metrics/index.js rename to src/plugins/home/server/tutorials/kibana_metrics/index.ts index 64e07a87fe402..3481ac0cf6177 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/kibana_metrics/index.js +++ b/src/plugins/home/server/tutorials/kibana_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function kibanaMetricsSpecProvider(context) { +export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kibana'; return { id: 'kibanaMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js rename to src/plugins/home/server/tutorials/kubernetes_metrics/index.ts index 4f59816282538..eca7c2d1776b1 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/kubernetes_metrics/index.js +++ b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function kubernetesMetricsSpecProvider(context) { +export function kubernetesMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kubernetes'; return { id: 'kubernetesMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/logstash_logs/index.js b/src/plugins/home/server/tutorials/logstash_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/logstash_logs/index.js rename to src/plugins/home/server/tutorials/logstash_logs/index.ts index df0da000bc37a..0356ab9ddc8e1 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/logstash_logs/index.js +++ b/src/plugins/home/server/tutorials/logstash_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function logstashLogsSpecProvider(context) { +export function logstashLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'logstash'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/logstash_metrics/index.js b/src/plugins/home/server/tutorials/logstash_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/logstash_metrics/index.js rename to src/plugins/home/server/tutorials/logstash_metrics/index.ts index 1ccafa4762e65..3160e7c6e77db 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/logstash_metrics/index.js +++ b/src/plugins/home/server/tutorials/logstash_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function logstashMetricsSpecProvider(context) { +export function logstashMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'logstash'; return { id: moduleName + 'Metrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/memcached_metrics/index.js b/src/plugins/home/server/tutorials/memcached_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/memcached_metrics/index.js rename to src/plugins/home/server/tutorials/memcached_metrics/index.ts index 8a9f6bfe8b439..415b628016ea3 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/memcached_metrics/index.js +++ b/src/plugins/home/server/tutorials/memcached_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function memcachedMetricsSpecProvider(context) { +export function memcachedMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'memcached'; return { id: 'memcachedMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js rename to src/plugins/home/server/tutorials/mongodb_metrics/index.ts index 1e19650af73fd..707aef4788751 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/mongodb_metrics/index.js +++ b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function mongodbMetricsSpecProvider(context) { +export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mongodb'; return { id: 'mongodbMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/mssql_metrics/index.js b/src/plugins/home/server/tutorials/mssql_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/mssql_metrics/index.js rename to src/plugins/home/server/tutorials/mssql_metrics/index.ts index d12964e122bc6..7ac75e1d17412 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/mssql_metrics/index.js +++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function mssqlMetricsSpecProvider(context) { +export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mssql'; return { id: 'mssqlMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/munin_metrics/index.js b/src/plugins/home/server/tutorials/munin_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/munin_metrics/index.js rename to src/plugins/home/server/tutorials/munin_metrics/index.ts index 627c2ddd7dc5b..85c0ba6093f78 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/munin_metrics/index.js +++ b/src/plugins/home/server/tutorials/munin_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function muninMetricsSpecProvider(context) { +export function muninMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'munin'; return { id: 'muninMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/mysql_logs/index.js b/src/plugins/home/server/tutorials/mysql_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/mysql_logs/index.js rename to src/plugins/home/server/tutorials/mysql_logs/index.ts index 796c03c9b19e2..66d8ede6f1f73 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/mysql_logs/index.js +++ b/src/plugins/home/server/tutorials/mysql_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function mysqlLogsSpecProvider(context) { +export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mysql'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/mysql_metrics/index.js b/src/plugins/home/server/tutorials/mysql_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/mysql_metrics/index.js rename to src/plugins/home/server/tutorials/mysql_metrics/index.ts index 55087d03237d8..b08ea6fa99be3 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/mysql_metrics/index.js +++ b/src/plugins/home/server/tutorials/mysql_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function mysqlMetricsSpecProvider(context) { +export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mysql'; return { id: 'mysqlMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/nats_logs/index.js b/src/plugins/home/server/tutorials/nats_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/nats_logs/index.js rename to src/plugins/home/server/tutorials/nats_logs/index.ts index bbf221c91d5e2..cfe46082f4f40 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/nats_logs/index.js +++ b/src/plugins/home/server/tutorials/nats_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function natsLogsSpecProvider(context) { +export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nats'; const geoipRequired = false; const uaRequired = false; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/nats_metrics/index.js b/src/plugins/home/server/tutorials/nats_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/nats_metrics/index.js rename to src/plugins/home/server/tutorials/nats_metrics/index.ts index 54f01b70e2d15..a2183b4784478 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/nats_metrics/index.js +++ b/src/plugins/home/server/tutorials/nats_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function natsMetricsSpecProvider(context) { +export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nats'; return { id: 'natsMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/netflow/common_instructions.js b/src/plugins/home/server/tutorials/netflow/common_instructions.ts similarity index 100% rename from src/legacy/core_plugins/kibana/server/tutorials/netflow/common_instructions.js rename to src/plugins/home/server/tutorials/netflow/common_instructions.ts diff --git a/src/legacy/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js b/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js rename to src/plugins/home/server/tutorials/netflow/elastic_cloud.ts index 6ba76c2b5fa9c..b8fdaa7fac66d 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/netflow/elastic_cloud.js +++ b/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts @@ -19,8 +19,8 @@ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions'; +import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant'; +import { createLogstashInstructions } from '../instructions/logstash_instructions'; import { createCommonNetflowInstructions } from './common_instructions'; // TODO: compare with onPremElasticCloud and onPrem scenarios and extract out common bits diff --git a/src/legacy/core_plugins/kibana/server/tutorials/netflow/index.js b/src/plugins/home/server/tutorials/netflow/index.ts similarity index 96% rename from src/legacy/core_plugins/kibana/server/tutorials/netflow/index.js rename to src/plugins/home/server/tutorials/netflow/index.ts index 10a57fc291d59..434079a9fbd77 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/netflow/index.js +++ b/src/plugins/home/server/tutorials/netflow/index.ts @@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { createOnPremInstructions } from './on_prem'; import { createElasticCloudInstructions } from './elastic_cloud'; import { createOnPremElasticCloudInstructions } from './on_prem_elastic_cloud'; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem.js b/src/plugins/home/server/tutorials/netflow/on_prem.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem.js rename to src/plugins/home/server/tutorials/netflow/on_prem.ts index cc060611361bd..d7b2dea9d6647 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem.js +++ b/src/plugins/home/server/tutorials/netflow/on_prem.ts @@ -19,8 +19,8 @@ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions'; +import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant'; +import { createLogstashInstructions } from '../instructions/logstash_instructions'; import { createCommonNetflowInstructions } from './common_instructions'; // TODO: compare with onPremElasticCloud and elasticCloud scenarios and extract out common bits diff --git a/src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js b/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts similarity index 90% rename from src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js rename to src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts index 49674621b70be..cf3d233be646a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/netflow/on_prem_elastic_cloud.js +++ b/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts @@ -19,12 +19,12 @@ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant'; -import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions'; +import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant'; +import { createLogstashInstructions } from '../instructions/logstash_instructions'; import { createTrycloudOption1, createTrycloudOption2, -} from '../../../common/tutorials/onprem_cloud_instructions'; +} from '../instructions/onprem_cloud_instructions'; import { createCommonNetflowInstructions } from './common_instructions'; // TODO: compare with onPrem and elasticCloud scenarios and extract out common bits diff --git a/src/legacy/core_plugins/kibana/server/tutorials/nginx_logs/index.js b/src/plugins/home/server/tutorials/nginx_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/nginx_logs/index.js rename to src/plugins/home/server/tutorials/nginx_logs/index.ts index ef4dae582790e..d05be1edcfc9a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/nginx_logs/index.js +++ b/src/plugins/home/server/tutorials/nginx_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function nginxLogsSpecProvider(context) { +export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nginx'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/nginx_metrics/index.js b/src/plugins/home/server/tutorials/nginx_metrics/index.ts similarity index 93% rename from src/legacy/core_plugins/kibana/server/tutorials/nginx_metrics/index.js rename to src/plugins/home/server/tutorials/nginx_metrics/index.ts index 2acb72b01eca9..22ad89070b92a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/nginx_metrics/index.js +++ b/src/plugins/home/server/tutorials/nginx_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function nginxMetricsSpecProvider(context) { +export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nginx'; return { id: 'nginxMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/osquery_logs/index.js b/src/plugins/home/server/tutorials/osquery_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/osquery_logs/index.js rename to src/plugins/home/server/tutorials/osquery_logs/index.ts index eddb81a9762e3..8e409f7b9e76d 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/osquery_logs/index.js +++ b/src/plugins/home/server/tutorials/osquery_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function osqueryLogsSpecProvider(context) { +export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'osquery'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js rename to src/plugins/home/server/tutorials/php_fpm_metrics/index.ts index c62cdfa0917ef..89ee942ddefa7 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/php_fpm_metrics/index.js +++ b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function phpfpmMetricsSpecProvider(context) { +export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'php_fpm'; return { id: 'phpfpmMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/postgresql_logs/index.js b/src/plugins/home/server/tutorials/postgresql_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/postgresql_logs/index.js rename to src/plugins/home/server/tutorials/postgresql_logs/index.ts index 810af1cb025e4..e4d3b29f60bfa 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/postgresql_logs/index.js +++ b/src/plugins/home/server/tutorials/postgresql_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function postgresqlLogsSpecProvider(context) { +export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'postgresql'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js rename to src/plugins/home/server/tutorials/postgresql_metrics/index.ts index 62203d7f13d33..bbd3fcea957c0 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/postgresql_metrics/index.js +++ b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function postgresqlMetricsSpecProvider(context) { +export function postgresqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'postgresql'; return { id: 'postgresqlMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js rename to src/plugins/home/server/tutorials/prometheus_metrics/index.ts index 20a66418042d6..7344df9e6bc15 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/prometheus_metrics/index.js +++ b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function prometheusMetricsSpecProvider(context) { +export function prometheusMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'prometheus'; return { id: moduleName + 'Metrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js rename to src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts index 34c2c28541d3f..fcf1140c340b1 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/rabbitmq_metrics/index.js +++ b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function rabbitmqMetricsSpecProvider(context) { +export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'rabbitmq'; return { id: 'rabbitmqMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/redis_logs/index.js b/src/plugins/home/server/tutorials/redis_logs/index.ts similarity index 93% rename from src/legacy/core_plugins/kibana/server/tutorials/redis_logs/index.js rename to src/plugins/home/server/tutorials/redis_logs/index.ts index 4d4b5dabad3da..aaf82f9c8c622 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/redis_logs/index.js +++ b/src/plugins/home/server/tutorials/redis_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function redisLogsSpecProvider(context) { +export function redisLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'redis'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/redis_metrics/index.js b/src/plugins/home/server/tutorials/redis_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/redis_metrics/index.js rename to src/plugins/home/server/tutorials/redis_metrics/index.ts index 708c16e041acb..64d10aed29be8 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/redis_metrics/index.js +++ b/src/plugins/home/server/tutorials/redis_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function redisMetricsSpecProvider(context) { +export function redisMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'redis'; return { id: 'redisMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/register.js b/src/plugins/home/server/tutorials/register.ts similarity index 99% rename from src/legacy/core_plugins/kibana/server/tutorials/register.js rename to src/plugins/home/server/tutorials/register.ts index 69a6ac76e4a8f..7b6eaec5c562c 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/register.js +++ b/src/plugins/home/server/tutorials/register.ts @@ -42,7 +42,7 @@ import { kubernetesMetricsSpecProvider } from './kubernetes_metrics'; import { uwsgiMetricsSpecProvider } from './uwsgi_metrics'; import { netflowSpecProvider } from './netflow'; import { traefikLogsSpecProvider } from './traefik_logs'; -import { apmSpecProvider } from './apm'; +import { apmSpecProvider } from '../../../../../../x-pack/plugins/apm/server/apm'; import { cephMetricsSpecProvider } from './ceph_metrics'; import { aerospikeMetricsSpecProvider } from './aerospike_metrics'; import { couchbaseMetricsSpecProvider } from './couchbase_metrics'; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/stan_metrics/index.js b/src/plugins/home/server/tutorials/stan_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/stan_metrics/index.js rename to src/plugins/home/server/tutorials/stan_metrics/index.ts index 3f5817ce2890b..78c8dd17ad845 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/stan_metrics/index.js +++ b/src/plugins/home/server/tutorials/stan_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function stanMetricsSpecProvider(context) { +export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'stan'; return { id: 'stanMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/suricata_logs/index.js b/src/plugins/home/server/tutorials/suricata_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/suricata_logs/index.js rename to src/plugins/home/server/tutorials/suricata_logs/index.ts index 3f2ecfa78d3b2..694df4d4b7a53 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/suricata_logs/index.js +++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function suricataLogsSpecProvider(context) { +export function suricataLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'suricata'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/system_logs/index.js b/src/plugins/home/server/tutorials/system_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/system_logs/index.js rename to src/plugins/home/server/tutorials/system_logs/index.ts index ec9792c3c4356..6284ef2e0b033 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/system_logs/index.js +++ b/src/plugins/home/server/tutorials/system_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function systemLogsSpecProvider(context) { +export function systemLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'system'; const platforms = ['OSX', 'DEB', 'RPM']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/system_metrics/index.js b/src/plugins/home/server/tutorials/system_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/system_metrics/index.js rename to src/plugins/home/server/tutorials/system_metrics/index.ts index 1bebc78146f83..605d28a7c0831 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/system_metrics/index.js +++ b/src/plugins/home/server/tutorials/system_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function systemMetricsSpecProvider(context) { +export function systemMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'system'; return { id: 'systemMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/traefik_logs/index.js b/src/plugins/home/server/tutorials/traefik_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/traefik_logs/index.js rename to src/plugins/home/server/tutorials/traefik_logs/index.ts index 65f697a59ee82..24e3a8c66cb93 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/traefik_logs/index.js +++ b/src/plugins/home/server/tutorials/traefik_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function traefikLogsSpecProvider(context) { +export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'traefik'; const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/traefik_metrics/index.js b/src/plugins/home/server/tutorials/traefik_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/traefik_metrics/index.js rename to src/plugins/home/server/tutorials/traefik_metrics/index.ts index 1a4c043ebc706..792b6787c6843 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/traefik_metrics/index.js +++ b/src/plugins/home/server/tutorials/traefik_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function traefikMetricsSpecProvider(server, context) { +export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'traefik'; return { id: 'traefikMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/uptime_monitors/index.js b/src/plugins/home/server/tutorials/uptime_monitors/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/uptime_monitors/index.js rename to src/plugins/home/server/tutorials/uptime_monitors/index.ts index 7cc90c740eb69..b21b965b2ca06 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/uptime_monitors/index.js +++ b/src/plugins/home/server/tutorials/uptime_monitors/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/heartbeat_instructions'; +} from '../instructions/heartbeat_instructions'; -export function uptimeMonitorsSpecProvider(context) { +export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'uptimeMonitors', name: i18n.translate('kbn.server.tutorials.uptimeMonitors.nameTitle', { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js rename to src/plugins/home/server/tutorials/uwsgi_metrics/index.ts index 8ec422f5b81d1..a49bbca28556f 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/uwsgi_metrics/index.js +++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function uwsgiMetricsSpecProvider(context) { +export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'uwsgi'; return { id: 'uwsgiMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js rename to src/plugins/home/server/tutorials/vsphere_metrics/index.ts index dc3a13bde0c76..6a9cff1651e6f 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/vsphere_metrics/index.js +++ b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function vSphereMetricsSpecProvider(context) { +export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'vsphere'; return { id: 'vsphereMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/windows_event_logs/index.js b/src/plugins/home/server/tutorials/windows_event_logs/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/windows_event_logs/index.js rename to src/plugins/home/server/tutorials/windows_event_logs/index.ts index 272535ad3e4e1..5ce0932159ec2 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/windows_event_logs/index.js +++ b/src/plugins/home/server/tutorials/windows_event_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/winlogbeat_instructions'; +} from '../instructions/winlogbeat_instructions'; -export function windowsEventLogsSpecProvider(context) { +export function windowsEventLogsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'windowsEventLogs', name: i18n.translate('kbn.server.tutorials.windowsEventLogs.nameTitle', { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/windows_metrics/index.js b/src/plugins/home/server/tutorials/windows_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/windows_metrics/index.js rename to src/plugins/home/server/tutorials/windows_metrics/index.ts index 9f30c330f4ae1..b86f990a5922d 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/windows_metrics/index.js +++ b/src/plugins/home/server/tutorials/windows_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function windowsMetricsSpecProvider(context) { +export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'windows'; return { id: 'windowsMetrics', diff --git a/src/legacy/core_plugins/kibana/server/tutorials/zeek_logs/index.js b/src/plugins/home/server/tutorials/zeek_logs/index.ts similarity index 92% rename from src/legacy/core_plugins/kibana/server/tutorials/zeek_logs/index.js rename to src/plugins/home/server/tutorials/zeek_logs/index.ts index 07d46c9c6ae84..0e6f3ff84ca1a 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/zeek_logs/index.js +++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/filebeat_instructions'; +} from '../instructions/filebeat_instructions'; -export function zeekLogsSpecProvider(context) { +export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'zeek'; const platforms = ['OSX', 'DEB', 'RPM']; return { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts similarity index 91% rename from src/legacy/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js rename to src/plugins/home/server/tutorials/zookeeper_metrics/index.ts index 64b45759b3bca..2a67c4c83b131 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/zookeeper_metrics/index.js +++ b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts @@ -18,14 +18,14 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, -} from '../../../common/tutorials/metricbeat_instructions'; +} from '../instructions/metricbeat_instructions'; -export function zookeeperMetricsSpecProvider(context) { +export function zookeeperMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'zookeeper'; return { id: moduleName + 'Metrics', diff --git a/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts b/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts index 562eb8850aa0c..c32559c35f9cb 100644 --- a/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts +++ b/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import { getInternalSavedObjectsClient } from '../helpers/saved_objects_client'; -import apmIndexPattern from '../../../../../../../src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json'; +import apmIndexPattern from '../../../../../../plugins/apm/server/apm/index_pattern.json'; import { APM_STATIC_INDEX_PATTERN_ID } from '../../../common/index_pattern_constants'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SavedObjectsErrorHelpers } from '../../../../../../../src/core/server/saved_objects'; diff --git a/x-pack/plugins/apm/kibana.json b/x-pack/plugins/apm/kibana.json index 40fee07742cf6..d60846131da74 100644 --- a/x-pack/plugins/apm/kibana.json +++ b/x-pack/plugins/apm/kibana.json @@ -5,5 +5,6 @@ "kibanaVersion": "kibana", "configPath": ["xpack", "apm"], "ui": false, - "requiredPlugins": ["apm_oss", "data", "home"] + "requiredPlugins": ["apm_oss", "data", "home"], + "optionalPlugins": ["cloud"] } diff --git a/x-pack/plugins/apm/server/plugin.ts b/x-pack/plugins/apm/server/plugin.ts index 11d91efdf6b01..83ece92aebe45 100644 --- a/x-pack/plugins/apm/server/plugin.ts +++ b/x-pack/plugins/apm/server/plugin.ts @@ -18,6 +18,9 @@ import { createApmAgentConfigurationIndex } from '../../../legacy/plugins/apm/se import { createApmApi } from '../../../legacy/plugins/apm/server/routes/create_apm_api'; import { getApmIndices } from '../../../legacy/plugins/apm/server/lib/settings/apm_indices/get_apm_indices'; import { APMConfig, mergeConfigs, APMXPackConfig } from '.'; +import { HomeServerPluginSetup } from '../../../../src/plugins/home/server'; +import { tutorialProvider } from './tutorial'; +import { CloudSetup } from '../../cloud/server'; export interface LegacySetup { server: Server; @@ -44,6 +47,8 @@ export class APMPlugin implements Plugin { core: CoreSetup, plugins: { apm_oss: APMOSSPlugin extends Plugin ? TSetup : never; + home: HomeServerPluginSetup; + cloud?: CloudSetup; } ) { const config$ = this.initContext.config.create(); @@ -68,6 +73,21 @@ export class APMPlugin implements Plugin { }); }); + plugins.home.tutorials.registerTutorial( + tutorialProvider({ + isEnabled: this.currentConfig['xpack.apm.ui.enabled'], + indexPatternTitle: this.currentConfig['apm_oss.indexPattern'], + cloud: plugins.cloud, + indices: { + errorIndices: this.currentConfig['apm_oss.errorIndices'], + metricsIndices: this.currentConfig['apm_oss.metricsIndices'], + onboardingIndices: this.currentConfig['apm_oss.onboardingIndices'], + sourcemapIndices: this.currentConfig['apm_oss.sourcemapIndices'], + transactionIndices: this.currentConfig['apm_oss.transactionIndices'], + }, + }) + ); + return { config$: mergedConfig$, registerLegacyAPI: once((__LEGACY: LegacySetup) => { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/envs/elastic_cloud.js b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts similarity index 66% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/envs/elastic_cloud.js rename to x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts index 64698a54eed3c..522bb551ce541 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/envs/elastic_cloud.js +++ b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts @@ -1,25 +1,11 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ -import { get, has } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../../common/tutorials/instruction_variant'; +import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server/tutorials/instructions/instruction_variant'; import { createNodeAgentInstructions, @@ -32,13 +18,10 @@ import { createJavaAgentInstructions, createDotNetAgentInstructions, } from '../instructions/apm_agent_instructions'; +import { CloudSetup } from '../../../../cloud/server'; -function getIfExists(obj, key) { - return has(obj, key) && get(obj, key); -} - -export function createElasticCloudInstructions(cloudSetup) { - const apmServerUrl = getIfExists(cloudSetup, 'apm.url'); +export function createElasticCloudInstructions(cloudSetup?: CloudSetup) { + const apmServerUrl = cloudSetup?.apm.url; const instructionSets = []; if (!apmServerUrl) { @@ -52,8 +35,8 @@ export function createElasticCloudInstructions(cloudSetup) { }; } -function getApmServerInstructionSet(cloudSetup) { - const cloudId = getIfExists(cloudSetup, 'cloudId'); +function getApmServerInstructionSet(cloudSetup?: CloudSetup) { + const cloudId = cloudSetup?.cloudId; return { title: i18n.translate('kbn.server.tutorials.apm.apmServer.title', { defaultMessage: 'APM Server', @@ -76,9 +59,9 @@ function getApmServerInstructionSet(cloudSetup) { }; } -function getApmAgentInstructionSet(cloudSetup) { - const apmServerUrl = getIfExists(cloudSetup, 'apm.url'); - const secretToken = getIfExists(cloudSetup, 'apm.secretToken'); +function getApmAgentInstructionSet(cloudSetup?: CloudSetup) { + const apmServerUrl = cloudSetup?.apm.url; + const secretToken = cloudSetup?.apm.secretToken; return { title: i18n.translate('kbn.server.tutorials.apm.elasticCloudInstructions.title', { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/envs/on_prem.js b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts similarity index 83% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/envs/on_prem.js rename to x-pack/plugins/apm/server/tutorial/envs/on_prem.ts index 4cbbbf89bf122..5ed3f8e96ba11 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/envs/on_prem.js +++ b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts @@ -1,24 +1,11 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../../common/tutorials/instruction_variant'; +import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server/tutorials/instructions/instruction_variant'; import { createWindowsServerInstructions, createEditConfig, @@ -40,7 +27,19 @@ import { createDotNetAgentInstructions, } from '../instructions/apm_agent_instructions'; -export function onPremInstructions(config) { +export function onPremInstructions({ + errorIndices, + transactionIndices, + metricsIndices, + sourcemapIndices, + onboardingIndices, +}: { + errorIndices: string; + transactionIndices: string; + metricsIndices: string; + sourcemapIndices: string; + onboardingIndices: string; +}) { const EDIT_CONFIG = createEditConfig(); const START_SERVER_UNIX = createStartServerUnix(); const START_SERVER_UNIX_SYSV = createStartServerUnixSysv(); @@ -98,7 +97,7 @@ export function onPremInstructions(config) { 'No APM Server detected. Please make sure it is running and you have updated to 7.0 or higher.', }), esHitsCheck: { - index: config.get('apm_oss.onboardingIndices'), + index: onboardingIndices, query: { bool: { filter: [ @@ -170,12 +169,7 @@ export function onPremInstructions(config) { defaultMessage: 'No data has been received from agents yet', }), esHitsCheck: { - index: [ - config.get('apm_oss.errorIndices'), - config.get('apm_oss.transactionIndices'), - config.get('apm_oss.metricsIndices'), - config.get('apm_oss.sourcemapIndices'), - ], + index: [errorIndices, transactionIndices, metricsIndices, sourcemapIndices], query: { bool: { filter: [ diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/index.js b/x-pack/plugins/apm/server/tutorial/index.ts similarity index 62% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/index.js rename to x-pack/plugins/apm/server/tutorial/index.ts index d86810a8bdf18..2e7f81badf680 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/index.js +++ b/x-pack/plugins/apm/server/tutorial/index.ts @@ -1,57 +1,49 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category'; +import { TUTORIAL_CATEGORY } from '../../../../../src/plugins/home/server/tutorials/instructions/tutorial_category'; import { onPremInstructions } from './envs/on_prem'; import { createElasticCloudInstructions } from './envs/elastic_cloud'; import apmIndexPattern from './index_pattern.json'; +import { CloudSetup } from '../../../cloud/server'; +import { ArtifactsSchema } from '../../../../../src/plugins/home/server/services/tutorials'; const apmIntro = i18n.translate('kbn.server.tutorials.apm.introduction', { defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.', }); -function isEnabled(config) { - const ENABLED_KEY = 'xpack.apm.ui.enabled'; - if (config.has(ENABLED_KEY)) { - return config.get(ENABLED_KEY); - } - - return false; -} - -export function apmSpecProvider(server) { - const config = server.config(); - const apmIndexPatternTitle = config.get('apm_oss.indexPattern'); - const { cloud } = server.newPlatform.setup; - +export const tutorialProvider = ({ + isEnabled, + indexPatternTitle, + cloud, + indices, +}: { + isEnabled: boolean; + indexPatternTitle: string; + cloud?: CloudSetup; + indices: { + errorIndices: string; + transactionIndices: string; + metricsIndices: string; + sourcemapIndices: string; + onboardingIndices: string; + }; +}) => () => { const savedObjects = [ { ...apmIndexPattern, attributes: { ...apmIndexPattern.attributes, - title: apmIndexPatternTitle, + title: indexPatternTitle, }, }, ]; - const artifacts = { + const artifacts: ArtifactsSchema = { dashboards: [ { id: '8d3ed660-7828-11e7-8c47-65b845b5cfb3', @@ -66,7 +58,7 @@ export function apmSpecProvider(server) { ], }; - if (isEnabled(config)) { + if (isEnabled) { artifacts.application = { path: '/app/apm', label: i18n.translate('kbn.server.tutorials.apm.specProvider.artifacts.application.label', { @@ -95,7 +87,7 @@ It allows you to monitor the performance of thousands of applications in real ti }), euiIconType: 'logoAPM', artifacts, - onPrem: onPremInstructions(config), + onPrem: onPremInstructions(indices), elasticCloud: createElasticCloudInstructions(cloud), previewImagePath: '/plugins/kibana/home/tutorial_resources/apm/apm.png', savedObjects, @@ -106,4 +98,4 @@ It allows you to monitor the performance of thousands of applications in real ti } ), }; -} +}; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json b/x-pack/plugins/apm/server/tutorial/index_pattern.json similarity index 100% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/index_pattern.json rename to x-pack/plugins/apm/server/tutorial/index_pattern.json diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_agent_instructions.js b/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts similarity index 97% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_agent_instructions.js rename to x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts index b47793a1610fd..7b8a463d0feca 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_agent_instructions.js +++ b/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts @@ -1,20 +1,7 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; diff --git a/src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_server_instructions.js b/x-pack/plugins/apm/server/tutorial/instructions/apm_server_instructions.ts similarity index 85% rename from src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_server_instructions.js rename to x-pack/plugins/apm/server/tutorial/instructions/apm_server_instructions.ts index 92626025276ee..afc6ed0b798ca 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/apm/instructions/apm_server_instructions.js +++ b/x-pack/plugins/apm/server/tutorial/instructions/apm_server_instructions.ts @@ -1,20 +1,7 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; From d1188dbcbad5da06d6ee4e9fa79e18ae94d7745d Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 15 Jan 2020 15:01:22 +0100 Subject: [PATCH 2/8] move tutorials to NP --- src/legacy/core_plugins/kibana/index.js | 4 +- .../public/home/np_ready/load_tutorials.js | 26 +--- .../routes/api/home/register_tutorials.js | 28 ---- .../kibana}/server/tutorials/ems/index.ts | 11 +- .../home/index.js => tutorials/register.ts} | 9 +- src/legacy/ui/tutorials_mixin.js | 63 -------- src/legacy/ui/tutorials_mixin.test.js | 89 ----------- src/legacy/ui/ui_mixin.js | 2 - src/plugins/home/server/index.ts | 3 + .../tutorials/lib/tutorials_registry_types.ts | 29 +++- .../services/tutorials/tutorials_registry.ts | 3 + .../server/tutorials/activemq_logs/index.ts | 10 +- .../tutorials/activemq_metrics/index.ts | 9 +- .../tutorials/aerospike_metrics/index.ts | 9 +- .../server/tutorials/apache_logs/index.ts | 10 +- .../server/tutorials/apache_metrics/index.ts | 10 +- .../home/server/tutorials/auditbeat/index.ts | 10 +- .../home/server/tutorials/aws_logs/index.ts | 10 +- .../server/tutorials/aws_metrics/index.ts | 10 +- .../server/tutorials/azure_metrics/index.ts | 10 +- .../server/tutorials/ceph_metrics/index.ts | 10 +- .../home/server/tutorials/cisco_logs/index.ts | 12 +- .../server/tutorials/cloudwatch_logs/index.ts | 12 +- .../tutorials/cockroachdb_metrics/index.ts | 10 +- .../server/tutorials/consul_metrics/index.ts | 10 +- .../server/tutorials/coredns_logs/index.ts | 10 +- .../server/tutorials/coredns_metrics/index.ts | 10 +- .../tutorials/couchbase_metrics/index.ts | 10 +- .../server/tutorials/couchdb_metrics/index.ts | 10 +- .../server/tutorials/docker_metrics/index.ts | 10 +- .../tutorials/dropwizard_metrics/index.ts | 10 +- .../tutorials/elasticsearch_logs/index.ts | 10 +- .../tutorials/elasticsearch_metrics/index.ts | 10 +- .../server/tutorials/envoyproxy_logs/index.ts | 12 +- .../tutorials/envoyproxy_metrics/index.ts | 10 +- .../server/tutorials/etcd_metrics/index.ts | 10 +- .../server/tutorials/golang_metrics/index.ts | 10 +- .../server/tutorials/haproxy_metrics/index.ts | 10 +- .../home/server/tutorials/ibmmq_logs/index.ts | 10 +- .../home/server/tutorials/iis_logs/index.ts | 10 +- .../instructions/auditbeat_instructions.ts | 10 +- .../instructions/filebeat_instructions.ts | 17 +- .../instructions/functionbeat_instructions.ts | 3 +- .../instructions/heartbeat_instructions.ts | 3 +- .../instructions/instruction_variant.ts | 2 +- .../instructions/metricbeat_instructions.ts | 6 +- .../instructions/tutorial_category.ts | 25 --- .../tutorials/instructions/tutorial_schema.ts | 139 ----------------- .../server/tutorials/iptables_logs/index.ts | 12 +- .../home/server/tutorials/kafka_logs/index.ts | 10 +- .../server/tutorials/kafka_metrics/index.ts | 10 +- .../server/tutorials/kibana_metrics/index.ts | 10 +- .../tutorials/kubernetes_metrics/index.ts | 10 +- .../server/tutorials/logstash_logs/index.ts | 10 +- .../tutorials/logstash_metrics/index.ts | 10 +- .../tutorials/memcached_metrics/index.ts | 10 +- .../server/tutorials/mongodb_metrics/index.ts | 10 +- .../server/tutorials/mssql_metrics/index.ts | 10 +- .../server/tutorials/munin_metrics/index.ts | 10 +- .../home/server/tutorials/mysql_logs/index.ts | 10 +- .../server/tutorials/mysql_metrics/index.ts | 10 +- .../home/server/tutorials/nats_logs/index.ts | 14 +- .../server/tutorials/nats_metrics/index.ts | 10 +- .../home/server/tutorials/netflow/index.ts | 6 +- .../home/server/tutorials/nginx_logs/index.ts | 10 +- .../server/tutorials/nginx_metrics/index.ts | 10 +- .../server/tutorials/osquery_logs/index.ts | 10 +- .../server/tutorials/php_fpm_metrics/index.ts | 14 +- .../server/tutorials/postgresql_logs/index.ts | 10 +- .../tutorials/postgresql_metrics/index.ts | 12 +- .../tutorials/prometheus_metrics/index.ts | 10 +- .../tutorials/rabbitmq_metrics/index.ts | 10 +- .../home/server/tutorials/redis_logs/index.ts | 10 +- .../server/tutorials/redis_metrics/index.ts | 10 +- src/plugins/home/server/tutorials/register.ts | 146 +++++++++--------- .../server/tutorials/stan_metrics/index.ts | 10 +- .../server/tutorials/suricata_logs/index.ts | 12 +- .../server/tutorials/system_logs/index.ts | 10 +- .../server/tutorials/system_metrics/index.ts | 10 +- .../server/tutorials/traefik_logs/index.ts | 12 +- .../server/tutorials/traefik_metrics/index.ts | 7 +- .../server/tutorials/uptime_monitors/index.ts | 10 +- .../server/tutorials/uwsgi_metrics/index.ts | 12 +- .../server/tutorials/vsphere_metrics/index.ts | 14 +- .../tutorials/windows_event_logs/index.ts | 10 +- .../server/tutorials/windows_metrics/index.ts | 10 +- .../home/server/tutorials/zeek_logs/index.ts | 12 +- .../tutorials/zookeeper_metrics/index.ts | 10 +- .../apm/server/tutorial/envs/elastic_cloud.ts | 2 +- .../apm/server/tutorial/envs/on_prem.ts | 2 +- x-pack/plugins/apm/server/tutorial/index.ts | 5 +- 91 files changed, 623 insertions(+), 705 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/server/routes/api/home/register_tutorials.js rename src/{plugins/home => legacy/core_plugins/kibana}/server/tutorials/ems/index.ts (90%) rename src/legacy/core_plugins/kibana/server/{routes/api/home/index.js => tutorials/register.ts} (74%) delete mode 100644 src/legacy/ui/tutorials_mixin.js delete mode 100644 src/legacy/ui/tutorials_mixin.test.js delete mode 100644 src/plugins/home/server/tutorials/instructions/tutorial_category.ts delete mode 100644 src/plugins/home/server/tutorials/instructions/tutorial_schema.ts diff --git a/src/legacy/core_plugins/kibana/index.js b/src/legacy/core_plugins/kibana/index.js index 157bef47e2147..7a5d8ccba03a1 100644 --- a/src/legacy/core_plugins/kibana/index.js +++ b/src/legacy/core_plugins/kibana/index.js @@ -24,10 +24,9 @@ import { promisify } from 'util'; import { migrations } from './migrations'; import { importApi } from './server/routes/api/import'; import { exportApi } from './server/routes/api/export'; -import { homeApi } from './server/routes/api/home'; import { managementApi } from './server/routes/api/management'; import { registerFieldFormats } from './server/field_formats/register'; -import { registerTutorials } from '../../../plugins/home/server/tutorials/register'; +import { registerTutorials } from './server/tutorials/register'; import * as systemApi from './server/lib/system_api'; import mappings from './mappings.json'; import { getUiSettingDefaults } from './ui_setting_defaults'; @@ -324,7 +323,6 @@ export default function(kibana) { // routes importApi(server); exportApi(server); - homeApi(server); managementApi(server); registerFieldFormats(server); registerTutorials(server); diff --git a/src/legacy/core_plugins/kibana/public/home/np_ready/load_tutorials.js b/src/legacy/core_plugins/kibana/public/home/np_ready/load_tutorials.js index 6a0a01ebda8db..2f6d4d631baf5 100644 --- a/src/legacy/core_plugins/kibana/public/home/np_ready/load_tutorials.js +++ b/src/legacy/core_plugins/kibana/public/home/np_ready/load_tutorials.js @@ -21,7 +21,6 @@ import _ from 'lodash'; import { getServices } from '../kibana_services'; import { i18n } from '@kbn/i18n'; -const baseUrlLP = getServices().addBasePath('/api/kibana/home/tutorials_LP'); const baseUrl = getServices().addBasePath('/api/kibana/home/tutorials'); const headers = new Headers(); headers.append('Accept', 'application/json'); @@ -29,42 +28,25 @@ headers.append('Content-Type', 'application/json'); headers.append('kbn-xsrf', 'kibana'); let tutorials = []; -let tutorialsLegacyPlatform = []; -let tutorialsNewPlatform = []; let tutorialsLoaded = false; async function loadTutorials() { try { - const responseLegacyPlatform = await fetch(baseUrlLP, { + const response = await fetch(baseUrl, { method: 'get', credentials: 'include', headers: headers, }); - if (responseLegacyPlatform.status >= 300) { + if (response.status >= 300) { throw new Error( i18n.translate('kbn.home.loadTutorials.requestFailedErrorMessage', { defaultMessage: 'Request failed with status code: {status}', - values: { status: responseLegacyPlatform.status }, - }) - ); - } - const responseNewPlatform = await fetch(baseUrl, { - method: 'get', - credentials: 'include', - headers: headers, - }); - if (responseNewPlatform.status >= 300) { - throw new Error( - i18n.translate('kbn.home.loadTutorials.requestFailedErrorMessage', { - defaultMessage: 'Request failed with status code: {status}', - values: { status: responseNewPlatform.status }, + values: { status: response.status }, }) ); } - tutorialsLegacyPlatform = await responseLegacyPlatform.json(); - tutorialsNewPlatform = await responseNewPlatform.json(); - tutorials = tutorialsLegacyPlatform.concat(tutorialsNewPlatform); + tutorials = await response.json(); tutorialsLoaded = true; } catch (err) { getServices().toastNotifications.addDanger({ diff --git a/src/legacy/core_plugins/kibana/server/routes/api/home/register_tutorials.js b/src/legacy/core_plugins/kibana/server/routes/api/home/register_tutorials.js deleted file mode 100644 index 315553af53892..0000000000000 --- a/src/legacy/core_plugins/kibana/server/routes/api/home/register_tutorials.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export function registerTutorials(server) { - server.route({ - path: '/api/kibana/home/tutorials_LP', - method: ['GET'], - handler: function(req) { - return server.getTutorials(req); - }, - }); -} diff --git a/src/plugins/home/server/tutorials/ems/index.ts b/src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts similarity index 90% rename from src/plugins/home/server/tutorials/ems/index.ts rename to src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts index bdb726903305a..3c0cfa60e8d7b 100644 --- a/src/plugins/home/server/tutorials/ems/index.ts +++ b/src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts @@ -18,11 +18,12 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../../../../../plugins/home/server'; +import { Server } from '../../../../../server/kbn_server'; -export function emsBoundariesSpecProvider(server) { - function addBasePath(url) { - const basePath = server.config().get('server.basePath'); +export function emsBoundariesSpecProvider(server: Server) { + function addBasePath(url: string) { + const basePath: string = server.config().get('server.basePath'); return `${basePath.length > 0 ? `${basePath}` : ''}${url}`; } @@ -31,7 +32,7 @@ export function emsBoundariesSpecProvider(server) { name: i18n.translate('kbn.server.tutorials.ems.nameTitle', { defaultMessage: 'EMS Boundaries', }), - category: TUTORIAL_CATEGORY.OTHER, + category: TutorialsCategory.OTHER, shortDescription: i18n.translate('kbn.server.tutorials.ems.shortDescription', { defaultMessage: 'Administrative boundaries from Elastic Maps Service.', }), diff --git a/src/legacy/core_plugins/kibana/server/routes/api/home/index.js b/src/legacy/core_plugins/kibana/server/tutorials/register.ts similarity index 74% rename from src/legacy/core_plugins/kibana/server/routes/api/home/index.js rename to src/legacy/core_plugins/kibana/server/tutorials/register.ts index 6a4303819f3e9..59d05cafa674e 100644 --- a/src/legacy/core_plugins/kibana/server/routes/api/home/index.js +++ b/src/legacy/core_plugins/kibana/server/tutorials/register.ts @@ -17,8 +17,11 @@ * under the License. */ -import { registerTutorials } from './register_tutorials'; +import { emsBoundariesSpecProvider } from './ems'; +import { Server } from '../../../../server/kbn_server'; -export function homeApi(server) { - registerTutorials(server); +export function registerTutorials(server: Server) { + server.newPlatform.setup.plugins.home.tutorials.registerTutorial(() => + emsBoundariesSpecProvider(server) + ); } diff --git a/src/legacy/ui/tutorials_mixin.js b/src/legacy/ui/tutorials_mixin.js deleted file mode 100644 index fc145b1d238e9..0000000000000 --- a/src/legacy/ui/tutorials_mixin.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import Joi from 'joi'; -import { tutorialSchema } from '../../plugins/home/server/tutorials/instructions/tutorial_schema'; - -export function tutorialsMixin(kbnServer, server) { - const tutorialProviders = []; - const scopedTutorialContextFactories = []; - - server.decorate('server', 'getTutorials', request => { - const initialContext = {}; - const scopedContext = scopedTutorialContextFactories.reduce( - (accumulatedContext, contextFactory) => { - return { ...accumulatedContext, ...contextFactory(request) }; - }, - initialContext - ); - - return tutorialProviders.map(tutorialProvider => { - return tutorialProvider(server, scopedContext); - }); - }); - - server.decorate('server', 'registerTutorial', specProvider => { - // registration during setup - const emptyContext = {}; - const { error } = Joi.validate(specProvider(server, emptyContext), tutorialSchema); - - if (error) { - throw new Error(`Unable to register tutorial spec because its invalid. ${error}`); - } - - tutorialProviders.push(specProvider); - }); - - server.decorate('server', 'addScopedTutorialContextFactory', scopedTutorialContextFactory => { - // returned by the setup method of the new plugin, they will do the same thing as now - if (typeof scopedTutorialContextFactory !== 'function') { - throw new Error( - `Unable to add scoped(request) context factory because you did not provide a function` - ); - } - - scopedTutorialContextFactories.push(scopedTutorialContextFactory); - }); -} diff --git a/src/legacy/ui/tutorials_mixin.test.js b/src/legacy/ui/tutorials_mixin.test.js deleted file mode 100644 index 58841987e0281..0000000000000 --- a/src/legacy/ui/tutorials_mixin.test.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { tutorialsMixin } from './tutorials_mixin'; - -const validTutorial = { - id: 'spec1', - category: 'other', - name: 'spec1', - shortDescription: 'short description', - longDescription: 'long description', - onPrem: { - instructionSets: [ - { - instructionVariants: [ - { - id: 'instructionVariant1', - instructions: [{}], - }, - ], - }, - ], - }, -}; - -describe('tutorial mixins', () => { - let getTutorials; - let registerTutorial; - let addScopedTutorialContextFactory; - const serverMock = { decorate: jest.fn() }; - beforeEach(async () => { - await tutorialsMixin({}, serverMock); - - [ - [, , getTutorials], - [, , registerTutorial], - [, , addScopedTutorialContextFactory], - ] = serverMock.decorate.mock.calls; - }); - - afterEach(() => { - jest.clearAllMocks(); - }); - - describe('scoped context', () => { - const mockRequest = {}; - const spacesContextFactory = request => { - if (request !== mockRequest) { - throw new Error('context factory not called with request object'); - } - return { - spaceId: 'my-space', - }; - }; - const specProvider = (server, context) => { - const tutorial = { ...validTutorial }; - tutorial.shortDescription = `I have been provided with scoped context, spaceId: ${context.spaceId}`; - return tutorial; - }; - beforeEach(async () => { - addScopedTutorialContextFactory(spacesContextFactory); - registerTutorial(specProvider); - }); - - test('passes scoped context to specProviders', () => { - const tutorials = getTutorials(mockRequest); - expect(tutorials.length).toBe(1); - expect(tutorials[0].shortDescription).toBe( - 'I have been provided with scoped context, spaceId: my-space' - ); - }); - }); -}); diff --git a/src/legacy/ui/ui_mixin.js b/src/legacy/ui/ui_mixin.js index 24d22efe4fa06..addfed05cdb48 100644 --- a/src/legacy/ui/ui_mixin.js +++ b/src/legacy/ui/ui_mixin.js @@ -18,7 +18,6 @@ */ import { fieldFormatsMixin } from './field_formats'; -import { tutorialsMixin } from './tutorials_mixin'; import { uiAppsMixin } from './ui_apps'; import { uiBundlesMixin } from './ui_bundles'; import { uiRenderMixin } from './ui_render'; @@ -29,6 +28,5 @@ export async function uiMixin(kbnServer) { await kbnServer.mixin(uiBundlesMixin); await kbnServer.mixin(uiSettingsMixin); await kbnServer.mixin(fieldFormatsMixin); - await kbnServer.mixin(tutorialsMixin); await kbnServer.mixin(uiRenderMixin); } diff --git a/src/plugins/home/server/index.ts b/src/plugins/home/server/index.ts index ed336f4a41d6e..0961c729698b9 100644 --- a/src/plugins/home/server/index.ts +++ b/src/plugins/home/server/index.ts @@ -24,3 +24,6 @@ import { PluginInitializerContext } from 'src/core/server'; import { HomeServerPlugin } from './plugin'; export const plugin = (initContext: PluginInitializerContext) => new HomeServerPlugin(initContext); + +export { INSTRUCTION_VARIANT } from './tutorials/instructions/instruction_variant'; +export { ArtifactsSchema, TutorialsCategory } from './services/tutorials'; diff --git a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts index 244b3ff5d0a15..80849513a3fad 100644 --- a/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts +++ b/src/plugins/home/server/services/tutorials/lib/tutorials_registry_types.ts @@ -26,17 +26,30 @@ export enum TutorialsCategory { METRICS = 'metrics', OTHER = 'other', } +export type Platform = 'WINDOWS' | 'OSX' | 'DEB' | 'RPM'; + export interface ParamTypes { NUMBER: string; STRING: string; } +export interface Instruction { + title?: string; + textPre?: string; + commands?: string[]; + textPost?: string; +} +export interface InstructionVariant { + id: string; + instructions: Instruction[]; +} export interface InstructionSetSchema { - readonly title: string; + readonly title?: string; readonly callOut?: { title: string; - message: string; - iconType: IconType; + message?: string; + iconType?: IconType; }; + instructionVariants: InstructionVariant[]; } export interface ParamsSchema { defaultValue: any; @@ -69,10 +82,10 @@ export interface TutorialSchema { name: string; isBeta?: boolean; shortDescription: string; - euiIconType: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon; + euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon; longDescription: string; completionTimeMinutes?: number; - previewImagePath: string; + previewImagePath?: string; // kibana and elastic cluster running on prem onPrem: InstructionsSchema; @@ -84,11 +97,11 @@ export interface TutorialSchema { onPremElasticCloud?: InstructionsSchema; // Elastic stack artifacts produced by product when it is setup and run. - artifacts: ArtifactsSchema; + artifacts?: ArtifactsSchema; // saved objects used by data module. - savedObjects: any[]; - savedObjectsInstallMsg: string; + savedObjects?: any[]; + savedObjectsInstallMsg?: string; } export interface TutorialContext { [key: string]: unknown; diff --git a/src/plugins/home/server/services/tutorials/tutorials_registry.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.ts index be0302cbd8188..e820924d7608d 100644 --- a/src/plugins/home/server/services/tutorials/tutorials_registry.ts +++ b/src/plugins/home/server/services/tutorials/tutorials_registry.ts @@ -25,6 +25,7 @@ import { ScopedTutorialContextFactory, } from './lib/tutorials_registry_types'; import { tutorialSchema } from './lib/tutorial_schema'; +import { builtInTutorials } from '../../tutorials/register'; export class TutorialsRegistry { private readonly tutorialProviders: TutorialProvider[] = []; // pre-register all the tutorials we know we want in here @@ -77,6 +78,8 @@ export class TutorialsRegistry { } public start() { + // pre-populate with built in tutorials + this.tutorialProviders.push(...builtInTutorials); return {}; } } diff --git a/src/plugins/home/server/tutorials/activemq_logs/index.ts b/src/plugins/home/server/tutorials/activemq_logs/index.ts index b03d0536d2298..5af62ea56dfa0 100644 --- a/src/plugins/home/server/tutorials/activemq_logs/index.ts +++ b/src/plugins/home/server/tutorials/activemq_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function activemqLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'activemq'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'activemqLogs', name: i18n.translate('kbn.server.tutorials.activemqLogs.nameTitle', { defaultMessage: 'ActiveMQ logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.activemqLogs.shortDescription', { defaultMessage: 'Collect ActiveMQ logs with Filebeat.', }), diff --git a/src/plugins/home/server/tutorials/activemq_metrics/index.ts b/src/plugins/home/server/tutorials/activemq_metrics/index.ts index 5ecc441abdde0..63ec9f47d59cc 100644 --- a/src/plugins/home/server/tutorials/activemq_metrics/index.ts +++ b/src/plugins/home/server/tutorials/activemq_metrics/index.ts @@ -18,12 +18,15 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, TutorialsCategory, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function activemqMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'activemq'; @@ -32,7 +35,7 @@ export function activemqMetricsSpecProvider(context: TutorialContext): TutorialS name: i18n.translate('kbn.server.tutorials.activemqMetrics.nameTitle', { defaultMessage: 'ActiveMQ metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.activemqMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from ActiveMQ instances.', }), @@ -59,7 +62,7 @@ export function activemqMetricsSpecProvider(context: TutorialContext): TutorialS }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts index 73462c0ae1466..b18153a6b3275 100644 --- a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts +++ b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts @@ -18,12 +18,15 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, TutorialsCategory, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function aerospikeMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aerospike'; @@ -33,7 +36,7 @@ export function aerospikeMetricsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Aerospike metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.aerospikeMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Aerospike server.', }), @@ -59,7 +62,7 @@ export function aerospikeMetricsSpecProvider(context: TutorialContext): Tutorial }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/apache_logs/index.ts b/src/plugins/home/server/tutorials/apache_logs/index.ts index f0bdf2567b1b4..c9aabd149c3c2 100644 --- a/src/plugins/home/server/tutorials/apache_logs/index.ts +++ b/src/plugins/home/server/tutorials/apache_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'apache'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'apacheLogs', name: i18n.translate('kbn.server.tutorials.apacheLogs.nameTitle', { defaultMessage: 'Apache logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.apacheLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the Apache HTTP server.', }), diff --git a/src/plugins/home/server/tutorials/apache_metrics/index.ts b/src/plugins/home/server/tutorials/apache_metrics/index.ts index 2e4f4cd0a3d07..236e2c09a6772 100644 --- a/src/plugins/home/server/tutorials/apache_metrics/index.ts +++ b/src/plugins/home/server/tutorials/apache_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'apache'; @@ -32,7 +36,7 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch name: i18n.translate('kbn.server.tutorials.apacheMetrics.nameTitle', { defaultMessage: 'Apache metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.apacheMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Apache 2 HTTP server.', }), @@ -64,7 +68,7 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/apache_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/auditbeat/index.ts b/src/plugins/home/server/tutorials/auditbeat/index.ts index 2db96c36e77fc..dbc5dae9d9745 100644 --- a/src/plugins/home/server/tutorials/auditbeat/index.ts +++ b/src/plugins/home/server/tutorials/auditbeat/index.ts @@ -18,21 +18,25 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/auditbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema { - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'auditbeat', name: i18n.translate('kbn.server.tutorials.auditbeat.nameTitle', { defaultMessage: 'Auditbeat', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.auditbeat.shortDescription', { defaultMessage: 'Collect audit data from your hosts.', }), diff --git a/src/plugins/home/server/tutorials/aws_logs/index.ts b/src/plugins/home/server/tutorials/aws_logs/index.ts index 46ec1ef0ec89e..65de1913e735c 100644 --- a/src/plugins/home/server/tutorials/aws_logs/index.ts +++ b/src/plugins/home/server/tutorials/aws_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aws'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'awsLogs', name: i18n.translate('kbn.server.tutorials.awsLogs.nameTitle', { defaultMessage: 'AWS S3 based logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.awsLogs.shortDescription', { defaultMessage: 'Collect AWS logs from S3 bucket with Filebeat.', }), diff --git a/src/plugins/home/server/tutorials/aws_metrics/index.ts b/src/plugins/home/server/tutorials/aws_metrics/index.ts index 6e549cd24cdcc..e36493f7dfc7d 100644 --- a/src/plugins/home/server/tutorials/aws_metrics/index.ts +++ b/src/plugins/home/server/tutorials/aws_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'aws'; @@ -32,7 +36,7 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema name: i18n.translate('kbn.server.tutorials.awsMetrics.nameTitle', { defaultMessage: 'AWS metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.awsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics for EC2 instances from the AWS APIs and Cloudwatch.', @@ -66,7 +70,7 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/aws_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/azure_metrics/index.ts b/src/plugins/home/server/tutorials/azure_metrics/index.ts index a97a3a01ea6ec..e9d33e24075ab 100644 --- a/src/plugins/home/server/tutorials/azure_metrics/index.ts +++ b/src/plugins/home/server/tutorials/azure_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function azureMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'azure'; @@ -33,7 +37,7 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche defaultMessage: 'Azure metrics', }), isBeta: true, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.azureMetrics.shortDescription', { defaultMessage: 'Fetch Azure Monitor metrics.', }), @@ -59,7 +63,7 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/ceph_metrics/index.ts b/src/plugins/home/server/tutorials/ceph_metrics/index.ts index ba86b5049b0e2..9732ba751675c 100644 --- a/src/plugins/home/server/tutorials/ceph_metrics/index.ts +++ b/src/plugins/home/server/tutorials/ceph_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'ceph'; @@ -33,7 +37,7 @@ export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchem defaultMessage: 'Ceph metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.cephMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Ceph server.', }), @@ -59,7 +63,7 @@ export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchem }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts index fb5c334e6e5fa..49db6882e97ff 100644 --- a/src/plugins/home/server/tutorials/cisco_logs/index.ts +++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'cisco'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'ciscoLogs', name: i18n.translate('kbn.server.tutorials.ciscoLogs.nameTitle', { defaultMessage: 'Cisco', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.ciscoLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from Cisco ASA firewalls.', }), @@ -46,7 +50,7 @@ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or r learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-cisco.html', }, }), - //euiIconType: 'logoCisco', + // euiIconType: 'logoCisco', artifacts: { dashboards: [], application: { diff --git a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts index 48d8dcba67c35..9ef4af2ecf161 100644 --- a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts +++ b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/functionbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSchema { return { @@ -31,7 +35,7 @@ export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.cloudwatchLogs.nameTitle', { defaultMessage: 'AWS Cloudwatch logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.cloudwatchLogs.shortDescription', { defaultMessage: 'Collect Cloudwatch logs with Functionbeat.', }), @@ -54,8 +58,8 @@ export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSc }, }, completionTimeMinutes: 10, - //previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png', - onPrem: onPremInstructions(null, null, null, context), + // previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png', + onPrem: onPremInstructions([], context), elasticCloud: cloudInstructions(), onPremElasticCloud: onPremCloudInstructions(), }; diff --git a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts index 3840c0b14f5ef..67aa6e95fca8f 100644 --- a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function cockroachdbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'cockroachdb'; @@ -32,7 +36,7 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori name: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.nameTitle', { defaultMessage: 'CockroachDB metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CockroachDB server.', }), @@ -64,7 +68,7 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/cockroachdb_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/consul_metrics/index.ts b/src/plugins/home/server/tutorials/consul_metrics/index.ts index c656997f6fda0..ac9592a0c7c94 100644 --- a/src/plugins/home/server/tutorials/consul_metrics/index.ts +++ b/src/plugins/home/server/tutorials/consul_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function consulMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'consul'; @@ -32,7 +36,7 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch name: i18n.translate('kbn.server.tutorials.consulMetrics.nameTitle', { defaultMessage: 'Consul metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.consulMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the Consul server.', }), @@ -64,7 +68,7 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/consul_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/coredns_logs/index.ts b/src/plugins/home/server/tutorials/coredns_logs/index.ts index 7851bf627e47e..1b8267f05d6ac 100644 --- a/src/plugins/home/server/tutorials/coredns_logs/index.ts +++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'coredns'; - const platforms = ['OSX', 'DEB', 'RPM']; + const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'corednsLogs', name: i18n.translate('kbn.server.tutorials.corednsLogs.nameTitle', { defaultMessage: 'CoreDNS logs', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.corednsLogs.shortDescription', { defaultMessage: 'Collect the logs created by Coredns.', }), diff --git a/src/plugins/home/server/tutorials/coredns_metrics/index.ts b/src/plugins/home/server/tutorials/coredns_metrics/index.ts index cb1abd17244e3..e0e5d6b783163 100644 --- a/src/plugins/home/server/tutorials/coredns_metrics/index.ts +++ b/src/plugins/home/server/tutorials/coredns_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'coredns'; @@ -32,7 +36,7 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.corednsMetrics.nameTitle', { defaultMessage: 'CoreDNS metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CoreDNS server.', }), @@ -59,7 +63,7 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/coredns_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts index f56abbeb4b865..7e60be2043387 100644 --- a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts +++ b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function couchbaseMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'couchbase'; @@ -33,7 +37,7 @@ export function couchbaseMetricsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Couchbase metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.couchbaseMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Couchbase.', }), @@ -59,7 +63,7 @@ export function couchbaseMetricsSpecProvider(context: TutorialContext): Tutorial }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts index bf49c8b6ec9a5..51a3f9f2b1811 100644 --- a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'couchdb'; @@ -32,7 +36,7 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.couchdbMetrics.nameTitle', { defaultMessage: 'CouchDB metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.couchdbMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CouchdB server.', }), @@ -64,7 +68,7 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/couchdb_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/docker_metrics/index.ts b/src/plugins/home/server/tutorials/docker_metrics/index.ts index ef7b11db1d650..cfedd7d5c775d 100644 --- a/src/plugins/home/server/tutorials/docker_metrics/index.ts +++ b/src/plugins/home/server/tutorials/docker_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'docker'; @@ -32,7 +36,7 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch name: i18n.translate('kbn.server.tutorials.dockerMetrics.nameTitle', { defaultMessage: 'Docker metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.dockerMetrics.shortDescription', { defaultMessage: 'Fetch metrics about your Docker containers.', }), @@ -64,7 +68,7 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/docker_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts index a63361f0dd67a..6d52074664cb1 100644 --- a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts +++ b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function dropwizardMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'dropwizard'; @@ -33,7 +37,7 @@ export function dropwizardMetricsSpecProvider(context: TutorialContext): Tutoria defaultMessage: 'Dropwizard metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.dropwizardMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Dropwizard Java application.', }), @@ -62,7 +66,7 @@ export function dropwizardMetricsSpecProvider(context: TutorialContext): Tutoria }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts index 1dad999409926..1e9dd84c1f539 100644 --- a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts +++ b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function elasticsearchLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'elasticsearch'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'elasticsearchLogs', name: i18n.translate('kbn.server.tutorials.elasticsearchLogs.nameTitle', { defaultMessage: 'Elasticsearch logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, isBeta: true, shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Elasticsearch.', diff --git a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts index 74ac845140a08..26f61fdc960d5 100644 --- a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts +++ b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function elasticsearchMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'elasticsearch'; @@ -33,7 +37,7 @@ export function elasticsearchMetricsSpecProvider(context: TutorialContext): Tuto defaultMessage: 'Elasticsearch metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Elasticsearch.', }), @@ -62,7 +66,7 @@ export function elasticsearchMetricsSpecProvider(context: TutorialContext): Tuto }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts index 5b763f649d71b..b7cdcb105eb76 100644 --- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts +++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'envoyproxy'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'envoyproxyLogs', name: i18n.translate('kbn.server.tutorials.envoyproxyLogs.nameTitle', { defaultMessage: 'Envoyproxy', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from the Envoy proxy.', }), @@ -46,7 +50,7 @@ It supports both standalone deployment and Envoy proxy deployment in Kubernetes. learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-envoyproxy.html', }, }), - //euiIconType: 'logoCisco', + // euiIconType: 'logoCisco', artifacts: { dashboards: [], application: { diff --git a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts index 6b21f1237d963..491def597be33 100644 --- a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts +++ b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function envoyproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'envoyproxy'; @@ -32,7 +36,7 @@ export function envoyproxyMetricsSpecProvider(context: TutorialContext): Tutoria name: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.nameTitle', { defaultMessage: 'Envoy Proxy metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.', }), @@ -53,7 +57,7 @@ export function envoyproxyMetricsSpecProvider(context: TutorialContext): Tutoria }, completionTimeMinutes: 10, // previewImagePath: '/plugins/kibana/home/tutorial_resources/envoyproxy_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/etcd_metrics/index.ts b/src/plugins/home/server/tutorials/etcd_metrics/index.ts index fdae404c221c1..53afc8ed8663e 100644 --- a/src/plugins/home/server/tutorials/etcd_metrics/index.ts +++ b/src/plugins/home/server/tutorials/etcd_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'etcd'; @@ -33,7 +37,7 @@ export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchem defaultMessage: 'Etcd metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.etcdMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Etcd server.', }), @@ -59,7 +63,7 @@ export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchem }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/golang_metrics/index.ts b/src/plugins/home/server/tutorials/golang_metrics/index.ts index 48dfff46a9535..98e136d6f7630 100644 --- a/src/plugins/home/server/tutorials/golang_metrics/index.ts +++ b/src/plugins/home/server/tutorials/golang_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function golangMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'golang'; @@ -33,7 +37,7 @@ export function golangMetricsSpecProvider(context: TutorialContext): TutorialSch defaultMessage: 'Golang metrics', }), isBeta: true, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.golangMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Golang app.', }), @@ -65,7 +69,7 @@ export function golangMetricsSpecProvider(context: TutorialContext): TutorialSch }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts index c6b7837eaeebf..858c6c8ce575d 100644 --- a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts +++ b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'haproxy'; @@ -33,7 +37,7 @@ export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSc defaultMessage: 'HAProxy metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.haproxyMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the HAProxy server.', }), @@ -59,7 +63,7 @@ export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSc }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts index 514f90d3c7738..1228c7c56cd42 100644 --- a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts +++ b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'ibmmq'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'ibmmqLogs', name: i18n.translate('kbn.server.tutorials.ibmmqLogs.nameTitle', { defaultMessage: 'IBM MQ logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.ibmmqLogs.shortDescription', { defaultMessage: 'Collect IBM MQ logs with Filebeat.', }), diff --git a/src/plugins/home/server/tutorials/iis_logs/index.ts b/src/plugins/home/server/tutorials/iis_logs/index.ts index a7801811fbfc8..83c8cd3f6ff89 100644 --- a/src/plugins/home/server/tutorials/iis_logs/index.ts +++ b/src/plugins/home/server/tutorials/iis_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'iis'; - const platforms = ['WINDOWS']; + const platforms = ['WINDOWS'] as const; return { id: 'iisLogs', name: i18n.translate('kbn.server.tutorials.iisLogs.nameTitle', { defaultMessage: 'IIS logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.iisLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the IIS HTTP server.', }), diff --git a/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts index 69478c92c56dc..8376b22b371e2 100644 --- a/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; -import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; +import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; export const createAuditbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { @@ -402,7 +402,7 @@ export function auditbeatStatusCheck() { }; } -export function onPremInstructions(platforms: string[], context?: TutorialContext) { +export function onPremInstructions(platforms: readonly Platform[], context?: TutorialContext) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(context); const variants = []; @@ -414,7 +414,7 @@ export function onPremInstructions(platforms: string[], context?: TutorialContex instructions.push(AUDITBEAT_INSTRUCTIONS.START[platform]); variants.push({ id: INSTRUCTION_VARIANT[platform], - instructions: instructions, + instructions, }); } return { @@ -433,7 +433,7 @@ export function onPremInstructions(platforms: string[], context?: TutorialContex }; } -export function onPremCloudInstructions(platforms: string[]) { +export function onPremCloudInstructions(platforms: readonly Platform[]) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(); const TRYCLOUD_OPTION1 = createTrycloudOption1(); const TRYCLOUD_OPTION2 = createTrycloudOption2(); @@ -469,7 +469,7 @@ export function onPremCloudInstructions(platforms: string[]) { }; } -export function cloudInstructions(platforms: string[]) { +export function cloudInstructions(platforms: readonly Platform[]) { const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(); const AUDITBEAT_CLOUD_INSTRUCTIONS = createAuditbeatCloudInstructions(); diff --git a/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts index 941251c3059dd..24ba3496d2611 100644 --- a/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts @@ -21,6 +21,7 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; export const createFilebeatInstructions = (context?: TutorialContext) => ({ INSTALL: { @@ -366,7 +367,7 @@ export const createFilebeatCloudInstructions = () => ({ }, }); -export function filebeatEnableInstructions(moduleName) { +export function filebeatEnableInstructions(moduleName: string) { return { OSX: { title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTitle', { @@ -424,7 +425,7 @@ export function filebeatEnableInstructions(moduleName) { }; } -export function filebeatStatusCheck(moduleName) { +export function filebeatStatusCheck(moduleName: string) { return { title: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.title', { defaultMessage: 'Module status', @@ -457,7 +458,11 @@ export function filebeatStatusCheck(moduleName) { }; } -export function onPremInstructions(moduleName, platforms, context) { +export function onPremInstructions( + moduleName: string, + platforms: readonly Platform[] = [], + context?: TutorialContext +) { const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(context); const variants = []; @@ -470,7 +475,7 @@ export function onPremInstructions(moduleName, platforms, context) { instructions.push(FILEBEAT_INSTRUCTIONS.START[platform]); variants.push({ id: INSTRUCTION_VARIANT[platform], - instructions: instructions, + instructions, }); } return { @@ -489,7 +494,7 @@ export function onPremInstructions(moduleName, platforms, context) { }; } -export function onPremCloudInstructions(moduleName, platforms) { +export function onPremCloudInstructions(moduleName: string, platforms: readonly Platform[] = []) { const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(); const TRYCLOUD_OPTION1 = createTrycloudOption1(); const TRYCLOUD_OPTION2 = createTrycloudOption2(); @@ -526,7 +531,7 @@ export function onPremCloudInstructions(moduleName, platforms) { }; } -export function cloudInstructions(moduleName, platforms) { +export function cloudInstructions(moduleName: string, platforms: readonly Platform[] = []) { const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(); const FILEBEAT_CLOUD_INSTRUCTIONS = createFilebeatCloudInstructions(); diff --git a/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts index 4a8280def8202..f8acf54ceafd9 100644 --- a/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts @@ -21,6 +21,7 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { @@ -349,7 +350,7 @@ export function functionbeatStatusCheck() { }; } -export function onPremInstructions(platforms, context) { +export function onPremInstructions(platforms: Platform[], context?: TutorialContext) { const FUNCTIONBEAT_INSTRUCTIONS = createFunctionbeatInstructions(context); return { diff --git a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts index 0e9f6af04d0cd..4221518773f6c 100644 --- a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts @@ -21,6 +21,7 @@ import { i18n } from '@kbn/i18n'; import { INSTRUCTION_VARIANT } from './instruction_variant'; import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions'; import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial'; +import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; export const createHeartbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { @@ -494,7 +495,7 @@ export function heartbeatStatusCheck() { }; } -export function onPremInstructions(platforms, context) { +export function onPremInstructions(platforms: Platform[], context?: TutorialContext) { const HEARTBEAT_INSTRUCTIONS = createHeartbeatInstructions(context); return { diff --git a/src/plugins/home/server/tutorials/instructions/instruction_variant.ts b/src/plugins/home/server/tutorials/instructions/instruction_variant.ts index 0c3be21044241..d026a3bdf2208 100644 --- a/src/plugins/home/server/tutorials/instructions/instruction_variant.ts +++ b/src/plugins/home/server/tutorials/instructions/instruction_variant.ts @@ -61,7 +61,7 @@ const DISPLAY_MAP = { * @params {String} id - instruction variant id as defined from INSTRUCTION_VARIANT * @return {String} display name */ -export function getDisplayText(id) { +export function getDisplayText(id: keyof typeof INSTRUCTION_VARIANT) { if (id in DISPLAY_MAP) { return DISPLAY_MAP[id]; } diff --git a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts index 05bb87e4ee6d1..24f449cd07574 100644 --- a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts @@ -372,7 +372,7 @@ export const createMetricbeatCloudInstructions = () => ({ }, }); -export function metricbeatEnableInstructions(moduleName) { +export function metricbeatEnableInstructions(moduleName: string) { return { OSX: { title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTitle', { @@ -433,7 +433,7 @@ export function metricbeatEnableInstructions(moduleName) { }; } -export function metricbeatStatusCheck(moduleName) { +export function metricbeatStatusCheck(moduleName: string) { return { title: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.title', { defaultMessage: 'Module status', @@ -588,7 +588,7 @@ export function onPremCloudInstructions(moduleName: string) { }; } -export function cloudInstructions(moduleName) { +export function cloudInstructions(moduleName: string) { const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(); const METRICBEAT_CLOUD_INSTRUCTIONS = createMetricbeatCloudInstructions(); diff --git a/src/plugins/home/server/tutorials/instructions/tutorial_category.ts b/src/plugins/home/server/tutorials/instructions/tutorial_category.ts deleted file mode 100644 index 8ac4d2490c17f..0000000000000 --- a/src/plugins/home/server/tutorials/instructions/tutorial_category.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export const TUTORIAL_CATEGORY = { - LOGGING: 'logging', - SIEM: 'siem', - METRICS: 'metrics', - OTHER: 'other', -}; diff --git a/src/plugins/home/server/tutorials/instructions/tutorial_schema.ts b/src/plugins/home/server/tutorials/instructions/tutorial_schema.ts deleted file mode 100644 index 1d04e0d83fa31..0000000000000 --- a/src/plugins/home/server/tutorials/instructions/tutorial_schema.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import Joi from 'joi'; -import { PARAM_TYPES } from './param_types'; -import { TUTORIAL_CATEGORY } from './tutorial_category'; - -const dashboardSchema = Joi.object({ - id: Joi.string().required(), // Dashboard saved object id - linkLabel: Joi.string().when('isOverview', { - is: true, - then: Joi.required(), - }), - // Is this an Overview / Entry Point dashboard? - isOverview: Joi.boolean().required(), -}); - -const artifactsSchema = Joi.object({ - // Fields present in Elasticsearch documents created by this product. - exportedFields: Joi.object({ - documentationUrl: Joi.string().required(), - }), - // Kibana dashboards created by this product. - dashboards: Joi.array() - .items(dashboardSchema) - .required(), - application: Joi.object({ - path: Joi.string().required(), - label: Joi.string().required(), - }), -}); - -const statusCheckSchema = Joi.object({ - title: Joi.string(), - text: Joi.string(), - btnLabel: Joi.string(), - success: Joi.string(), - error: Joi.string(), - esHitsCheck: Joi.object({ - index: Joi.alternatives() - .try(Joi.string(), Joi.array().items(Joi.string())) - .required(), - query: Joi.object().required(), - }).required(), -}); - -const instructionSchema = Joi.object({ - title: Joi.string(), - textPre: Joi.string(), - commands: Joi.array().items(Joi.string().allow('')), - textPost: Joi.string(), -}); - -const instructionVariantSchema = Joi.object({ - id: Joi.string().required(), - instructions: Joi.array() - .items(instructionSchema) - .required(), -}); - -const instructionSetSchema = Joi.object({ - title: Joi.string(), - callOut: Joi.object({ - title: Joi.string().required(), - message: Joi.string(), - iconType: Joi.string(), - }), - // Variants (OSes, languages, etc.) for which tutorial instructions are specified. - instructionVariants: Joi.array() - .items(instructionVariantSchema) - .required(), - statusCheck: statusCheckSchema, -}); - -const paramSchema = Joi.object({ - defaultValue: Joi.required(), - id: Joi.string() - .regex(/^[a-zA-Z_]+$/) - .required(), - label: Joi.string().required(), - type: Joi.string() - .valid(Object.values(PARAM_TYPES)) - .required(), -}); - -const instructionsSchema = Joi.object({ - instructionSets: Joi.array() - .items(instructionSetSchema) - .required(), - params: Joi.array().items(paramSchema), -}); - -export const tutorialSchema = { - id: Joi.string() - .regex(/^[a-zA-Z0-9-]+$/) - .required(), - category: Joi.string() - .valid(Object.values(TUTORIAL_CATEGORY)) - .required(), - name: Joi.string().required(), - isBeta: Joi.boolean().default(false), - shortDescription: Joi.string().required(), - euiIconType: Joi.string(), //EUI icon type string, one of https://elastic.github.io/eui/#/icons - longDescription: Joi.string().required(), - completionTimeMinutes: Joi.number().integer(), - previewImagePath: Joi.string(), - - // kibana and elastic cluster running on prem - onPrem: instructionsSchema.required(), - - // kibana and elastic cluster running in elastic's cloud - elasticCloud: instructionsSchema, - - // kibana running on prem and elastic cluster running in elastic's cloud - onPremElasticCloud: instructionsSchema, - - // 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(), -}; diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts index d7e1e6869eebc..a9058a0d65a30 100644 --- a/src/plugins/home/server/tutorials/iptables_logs/index.ts +++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'iptables'; - const platforms = ['DEB', 'RPM']; + const platforms = ['DEB', 'RPM'] as const; return { id: 'iptablesLogs', name: i18n.translate('kbn.server.tutorials.iptablesLogs.nameTitle', { defaultMessage: 'Iptables / Ubiquiti', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.iptablesLogs.shortDescription', { defaultMessage: 'Collect and parse iptables and ip6tables logs or from Ubiqiti firewalls.', }), @@ -48,7 +52,7 @@ number and the action performed on the traffic (allow/deny).. \ learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-iptables.html', }, }), - //euiIconType: 'logoUbiquiti', + // euiIconType: 'logoUbiquiti', artifacts: { dashboards: [], application: { diff --git a/src/plugins/home/server/tutorials/kafka_logs/index.ts b/src/plugins/home/server/tutorials/kafka_logs/index.ts index f01bbb3b01529..acf7408cbeddf 100644 --- a/src/plugins/home/server/tutorials/kafka_logs/index.ts +++ b/src/plugins/home/server/tutorials/kafka_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kafka'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'kafkaLogs', name: i18n.translate('kbn.server.tutorials.kafkaLogs.nameTitle', { defaultMessage: 'Kafka logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.kafkaLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Kafka.', }), diff --git a/src/plugins/home/server/tutorials/kafka_metrics/index.ts b/src/plugins/home/server/tutorials/kafka_metrics/index.ts index 827cd5795a03f..48a2d5ce8b47d 100644 --- a/src/plugins/home/server/tutorials/kafka_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kafka_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kafka'; @@ -33,7 +37,7 @@ export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSche defaultMessage: 'Kafka metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.kafkaMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Kafka server.', }), @@ -59,7 +63,7 @@ export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSche }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/kibana_metrics/index.ts b/src/plugins/home/server/tutorials/kibana_metrics/index.ts index 3481ac0cf6177..66171e8bc1876 100644 --- a/src/plugins/home/server/tutorials/kibana_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kibana_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kibana'; @@ -33,7 +37,7 @@ export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSch defaultMessage: 'Kibana metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.kibanaMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Kibana.', }), @@ -59,7 +63,7 @@ export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSch }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts index eca7c2d1776b1..a9300486fe639 100644 --- a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function kubernetesMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'kubernetes'; @@ -32,7 +36,7 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria name: i18n.translate('kbn.server.tutorials.kubernetesMetrics.nameTitle', { defaultMessage: 'Kubernetes metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.kubernetesMetrics.shortDescription', { defaultMessage: 'Fetch metrics from your Kubernetes installation.', }), @@ -64,7 +68,7 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/kubernetes_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/logstash_logs/index.ts b/src/plugins/home/server/tutorials/logstash_logs/index.ts index 0356ab9ddc8e1..2a47a3c2e36ae 100644 --- a/src/plugins/home/server/tutorials/logstash_logs/index.ts +++ b/src/plugins/home/server/tutorials/logstash_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function logstashLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'logstash'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'logstashLogs', name: i18n.translate('kbn.server.tutorials.logstashLogs.nameTitle', { defaultMessage: 'Logstash logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.logstashLogs.shortDescription', { defaultMessage: 'Collect and parse debug and slow logs created by Logstash itself.', }), diff --git a/src/plugins/home/server/tutorials/logstash_metrics/index.ts b/src/plugins/home/server/tutorials/logstash_metrics/index.ts index 3160e7c6e77db..0163b17b053a5 100644 --- a/src/plugins/home/server/tutorials/logstash_metrics/index.ts +++ b/src/plugins/home/server/tutorials/logstash_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function logstashMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'logstash'; @@ -33,7 +37,7 @@ export function logstashMetricsSpecProvider(context: TutorialContext): TutorialS defaultMessage: 'Logstash metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.logstashMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Logstash server.', }), @@ -60,7 +64,7 @@ export function logstashMetricsSpecProvider(context: TutorialContext): TutorialS }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/memcached_metrics/index.ts b/src/plugins/home/server/tutorials/memcached_metrics/index.ts index 415b628016ea3..6248ab46fcafe 100644 --- a/src/plugins/home/server/tutorials/memcached_metrics/index.ts +++ b/src/plugins/home/server/tutorials/memcached_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function memcachedMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'memcached'; @@ -33,7 +37,7 @@ export function memcachedMetricsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Memcached metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.memcachedMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Memcached server.', }), @@ -59,7 +63,7 @@ export function memcachedMetricsSpecProvider(context: TutorialContext): Tutorial }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts index 707aef4788751..b7234a14f075c 100644 --- a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mongodb'; @@ -32,7 +36,7 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.mongodbMetrics.nameTitle', { defaultMessage: 'MongoDB metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.mongodbMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from MongoDB.', }), @@ -64,7 +68,7 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mongodb_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/mssql_metrics/index.ts b/src/plugins/home/server/tutorials/mssql_metrics/index.ts index 7ac75e1d17412..500d7bc0703c2 100644 --- a/src/plugins/home/server/tutorials/mssql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mssql'; @@ -32,7 +36,7 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('kbn.server.tutorials.mssqlMetrics.nameTitle', { defaultMessage: 'Microsoft SQL Server Metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.mssqlMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from a Microsoft SQL Server instance', }), @@ -65,7 +69,7 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mssql_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/munin_metrics/index.ts b/src/plugins/home/server/tutorials/munin_metrics/index.ts index 85c0ba6093f78..a9356a9d1488c 100644 --- a/src/plugins/home/server/tutorials/munin_metrics/index.ts +++ b/src/plugins/home/server/tutorials/munin_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function muninMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'munin'; @@ -33,7 +37,7 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche defaultMessage: 'Munin metrics', }), isBeta: true, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.muninMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Munin server.', }), @@ -58,7 +62,7 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/mysql_logs/index.ts b/src/plugins/home/server/tutorials/mysql_logs/index.ts index 66d8ede6f1f73..db78e9c7b11a5 100644 --- a/src/plugins/home/server/tutorials/mysql_logs/index.ts +++ b/src/plugins/home/server/tutorials/mysql_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mysql'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'mysqlLogs', name: i18n.translate('kbn.server.tutorials.mysqlLogs.nameTitle', { defaultMessage: 'MySQL logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.mysqlLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by MySQL.', }), diff --git a/src/plugins/home/server/tutorials/mysql_metrics/index.ts b/src/plugins/home/server/tutorials/mysql_metrics/index.ts index b08ea6fa99be3..fa70f41a9a8b2 100644 --- a/src/plugins/home/server/tutorials/mysql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mysql_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'mysql'; @@ -32,7 +36,7 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('kbn.server.tutorials.mysqlMetrics.nameTitle', { defaultMessage: 'MySQL metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.mysqlMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from MySQL.', }), @@ -64,7 +68,7 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/mysql_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/nats_logs/index.ts b/src/plugins/home/server/tutorials/nats_logs/index.ts index cfe46082f4f40..f8bd0ec7fa827 100644 --- a/src/plugins/home/server/tutorials/nats_logs/index.ts +++ b/src/plugins/home/server/tutorials/nats_logs/index.ts @@ -18,24 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nats'; - const geoipRequired = false; - const uaRequired = false; - const platforms = ['DEB', 'RPM']; + const platforms = ['DEB', 'RPM'] as const; return { id: 'natsLogs', name: i18n.translate('kbn.server.tutorials.natsLogs.nameTitle', { defaultMessage: 'NATS logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, isBeta: true, shortDescription: i18n.translate('kbn.server.tutorials.natsLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Nats.', @@ -68,7 +70,7 @@ export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema { }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/nats_logs/screenshot.png', - onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context), + onPrem: onPremInstructions(moduleName, platforms, context), elasticCloud: cloudInstructions(moduleName, platforms), onPremElasticCloud: onPremCloudInstructions(moduleName, platforms), }; diff --git a/src/plugins/home/server/tutorials/nats_metrics/index.ts b/src/plugins/home/server/tutorials/nats_metrics/index.ts index a2183b4784478..0b327521354a6 100644 --- a/src/plugins/home/server/tutorials/nats_metrics/index.ts +++ b/src/plugins/home/server/tutorials/nats_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nats'; @@ -32,7 +36,7 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem name: i18n.translate('kbn.server.tutorials.natsMetrics.nameTitle', { defaultMessage: 'NATS metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.natsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the Nats server.', }), @@ -64,7 +68,7 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/nats_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/netflow/index.ts b/src/plugins/home/server/tutorials/netflow/index.ts index 434079a9fbd77..dc0363af41610 100644 --- a/src/plugins/home/server/tutorials/netflow/index.ts +++ b/src/plugins/home/server/tutorials/netflow/index.ts @@ -19,7 +19,7 @@ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { createOnPremInstructions } from './on_prem'; import { createElasticCloudInstructions } from './elastic_cloud'; import { createOnPremElasticCloudInstructions } from './on_prem_elastic_cloud'; @@ -28,7 +28,7 @@ export function netflowSpecProvider() { return { id: 'netflow', name: 'Netflow', - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.netflow.tutorialShortDescription', { defaultMessage: 'Collect Netflow records sent by a Netflow exporter.', }), @@ -42,7 +42,7 @@ This module support Netflow Version 5 and 9. [Learn more]({linkUrl}).', }, }), completionTimeMinutes: 10, - //previewImagePath: 'kibana-apache.png', TODO + // previewImagePath: 'kibana-apache.png', TODO onPrem: createOnPremInstructions(), elasticCloud: createElasticCloudInstructions(), onPremElasticCloud: createOnPremElasticCloudInstructions(), diff --git a/src/plugins/home/server/tutorials/nginx_logs/index.ts b/src/plugins/home/server/tutorials/nginx_logs/index.ts index d05be1edcfc9a..894e0993b156e 100644 --- a/src/plugins/home/server/tutorials/nginx_logs/index.ts +++ b/src/plugins/home/server/tutorials/nginx_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nginx'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'nginxLogs', name: i18n.translate('kbn.server.tutorials.nginxLogs.nameTitle', { defaultMessage: 'Nginx logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.nginxLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the Nginx HTTP server.', }), diff --git a/src/plugins/home/server/tutorials/nginx_metrics/index.ts b/src/plugins/home/server/tutorials/nginx_metrics/index.ts index 22ad89070b92a..cf29591a47ee5 100644 --- a/src/plugins/home/server/tutorials/nginx_metrics/index.ts +++ b/src/plugins/home/server/tutorials/nginx_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'nginx'; @@ -32,7 +36,7 @@ export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('kbn.server.tutorials.nginxMetrics.nameTitle', { defaultMessage: 'Nginx metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.nginxMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Nginx HTTP server.', }), @@ -69,7 +73,7 @@ which must be enabled in your Nginx installation. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/nginx_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/osquery_logs/index.ts b/src/plugins/home/server/tutorials/osquery_logs/index.ts index 8e409f7b9e76d..104af99121388 100644 --- a/src/plugins/home/server/tutorials/osquery_logs/index.ts +++ b/src/plugins/home/server/tutorials/osquery_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'osquery'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'osqueryLogs', name: i18n.translate('kbn.server.tutorials.osqueryLogs.nameTitle', { defaultMessage: 'Osquery logs', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.osqueryLogs.shortDescription', { defaultMessage: 'Collect the result logs created by osqueryd.', }), diff --git a/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts index 89ee942ddefa7..397e2956161e9 100644 --- a/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts +++ b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'php_fpm'; @@ -32,7 +36,7 @@ export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSch name: i18n.translate('kbn.server.tutorials.phpFpmMetrics.nameTitle', { defaultMessage: 'PHP-FPM metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, isBeta: false, shortDescription: i18n.translate('kbn.server.tutorials.phpFpmMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from PHP-FPM.', @@ -48,7 +52,7 @@ export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSch euiIconType: 'logoPhp', artifacts: { dashboards: [ - /*{ + /* { id: 'TODO', linkLabel: 'PHP-FPM metrics dashboard', isOverview: true @@ -59,8 +63,8 @@ export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSch }, }, completionTimeMinutes: 10, - //previewImagePath: '/plugins/kibana/home/tutorial_resources/php_fpm_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + // previewImagePath: '/plugins/kibana/home/tutorial_resources/php_fpm_metrics/screenshot.png', + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/postgresql_logs/index.ts b/src/plugins/home/server/tutorials/postgresql_logs/index.ts index e4d3b29f60bfa..9c041730ad5ca 100644 --- a/src/plugins/home/server/tutorials/postgresql_logs/index.ts +++ b/src/plugins/home/server/tutorials/postgresql_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'postgresql'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'postgresqlLogs', name: i18n.translate('kbn.server.tutorials.postgresqlLogs.nameTitle', { defaultMessage: 'PostgreSQL logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.postgresqlLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by PostgreSQL.', }), diff --git a/src/plugins/home/server/tutorials/postgresql_metrics/index.ts b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts index bbd3fcea957c0..ad4b08f4eb34b 100644 --- a/src/plugins/home/server/tutorials/postgresql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function postgresqlMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'postgresql'; @@ -32,7 +36,7 @@ export function postgresqlMetricsSpecProvider(context: TutorialContext): Tutoria name: i18n.translate('kbn.server.tutorials.postgresqlMetrics.nameTitle', { defaultMessage: 'PostgreSQL metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, isBeta: false, shortDescription: i18n.translate('kbn.server.tutorials.postgresqlMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from PostgreSQL.', @@ -61,8 +65,8 @@ export function postgresqlMetricsSpecProvider(context: TutorialContext): Tutoria }, }, completionTimeMinutes: 10, - //previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + // previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_metrics/screenshot.png', + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts index 7344df9e6bc15..a4533fe8ae69a 100644 --- a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts +++ b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function prometheusMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'prometheus'; @@ -33,7 +37,7 @@ export function prometheusMetricsSpecProvider(context: TutorialContext): Tutoria defaultMessage: 'Prometheus metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.prometheusMetrics.shortDescription', { defaultMessage: 'Fetch metrics from a Prometheus exporter.', }), @@ -63,7 +67,7 @@ export function prometheusMetricsSpecProvider(context: TutorialContext): Tutoria }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts index fcf1140c340b1..4e2bf56632bd3 100644 --- a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts +++ b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'rabbitmq'; @@ -32,7 +36,7 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS name: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.nameTitle', { defaultMessage: 'RabbitMQ metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the RabbitMQ server.', }), @@ -65,7 +69,7 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/rabbitmq_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/redis_logs/index.ts b/src/plugins/home/server/tutorials/redis_logs/index.ts index aaf82f9c8c622..11fb1ef1fb3fa 100644 --- a/src/plugins/home/server/tutorials/redis_logs/index.ts +++ b/src/plugins/home/server/tutorials/redis_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function redisLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'redis'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'redisLogs', name: i18n.translate('kbn.server.tutorials.redisLogs.nameTitle', { defaultMessage: 'Redis logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.redisLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by Redis.', }), diff --git a/src/plugins/home/server/tutorials/redis_metrics/index.ts b/src/plugins/home/server/tutorials/redis_metrics/index.ts index 64d10aed29be8..0454d6846e55f 100644 --- a/src/plugins/home/server/tutorials/redis_metrics/index.ts +++ b/src/plugins/home/server/tutorials/redis_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function redisMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'redis'; @@ -32,7 +36,7 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('kbn.server.tutorials.redisMetrics.nameTitle', { defaultMessage: 'Redis metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.redisMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Redis.', }), @@ -64,7 +68,7 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/redis_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/register.ts b/src/plugins/home/server/tutorials/register.ts index 7b6eaec5c562c..a609de75bedb4 100644 --- a/src/plugins/home/server/tutorials/register.ts +++ b/src/plugins/home/server/tutorials/register.ts @@ -42,7 +42,6 @@ import { kubernetesMetricsSpecProvider } from './kubernetes_metrics'; import { uwsgiMetricsSpecProvider } from './uwsgi_metrics'; import { netflowSpecProvider } from './netflow'; import { traefikLogsSpecProvider } from './traefik_logs'; -import { apmSpecProvider } from '../../../../../../x-pack/plugins/apm/server/apm'; import { cephMetricsSpecProvider } from './ceph_metrics'; import { aerospikeMetricsSpecProvider } from './aerospike_metrics'; import { couchbaseMetricsSpecProvider } from './couchbase_metrics'; @@ -75,7 +74,6 @@ import { iptablesLogsSpecProvider } from './iptables_logs'; import { ciscoLogsSpecProvider } from './cisco_logs'; import { envoyproxyLogsSpecProvider } from './envoyproxy_logs'; import { couchdbMetricsSpecProvider } from './couchdb_metrics'; -import { emsBoundariesSpecProvider } from './ems'; import { consulMetricsSpecProvider } from './consul_metrics'; import { cockroachdbMetricsSpecProvider } from './cockroachdb_metrics'; import { traefikMetricsSpecProvider } from './traefik_metrics'; @@ -87,77 +85,73 @@ import { ibmmqLogsSpecProvider } from './ibmmq_logs'; import { stanMetricsSpecProvider } from './stan_metrics'; import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics'; -export function registerTutorials(server) { - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(apacheLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(apacheMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(elasticsearchLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(iisLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kafkaLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(logstashLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(nginxLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(nginxMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mysqlLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mysqlMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mongodbMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(osqueryLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(phpfpmMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(postgresqlMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(postgresqlLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(rabbitmqMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(redisLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(redisMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(suricataLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(dockerMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kubernetesMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(uwsgiMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(netflowSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(traefikLogsSpecProvider); - server.registerTutorial(apmSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cephMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(aerospikeMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(couchbaseMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(dropwizardMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial( - elasticsearchMetricsSpecProvider - ); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(etcdMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(haproxyMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kafkaMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kibanaMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(memcachedMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(muninMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(vSphereMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(windowsMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(windowsEventLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(golangMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(logstashMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(prometheusMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(zookeeperMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(uptimeMonitorsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cloudwatchLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(awsMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mssqlMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(natsMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(natsLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(zeekLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(corednsMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(corednsLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(auditbeatSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(iptablesLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(ciscoLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(couchdbMetricsSpecProvider); - server.registerTutorial(emsBoundariesSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(consulMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cockroachdbMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(traefikMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(awsLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(azureMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(ibmmqLogsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(stanMetricsSpecProvider); - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyMetricsSpecProvider); -} +export const builtInTutorials = [ + systemLogsSpecProvider, + systemMetricsSpecProvider, + apacheLogsSpecProvider, + apacheMetricsSpecProvider, + elasticsearchLogsSpecProvider, + iisLogsSpecProvider, + kafkaLogsSpecProvider, + logstashLogsSpecProvider, + nginxLogsSpecProvider, + nginxMetricsSpecProvider, + mysqlLogsSpecProvider, + mysqlMetricsSpecProvider, + mongodbMetricsSpecProvider, + osqueryLogsSpecProvider, + phpfpmMetricsSpecProvider, + postgresqlMetricsSpecProvider, + postgresqlLogsSpecProvider, + rabbitmqMetricsSpecProvider, + redisLogsSpecProvider, + redisMetricsSpecProvider, + suricataLogsSpecProvider, + dockerMetricsSpecProvider, + kubernetesMetricsSpecProvider, + uwsgiMetricsSpecProvider, + netflowSpecProvider, + traefikLogsSpecProvider, + cephMetricsSpecProvider, + aerospikeMetricsSpecProvider, + couchbaseMetricsSpecProvider, + dropwizardMetricsSpecProvider, + elasticsearchMetricsSpecProvider, + etcdMetricsSpecProvider, + haproxyMetricsSpecProvider, + kafkaMetricsSpecProvider, + kibanaMetricsSpecProvider, + memcachedMetricsSpecProvider, + muninMetricsSpecProvider, + vSphereMetricsSpecProvider, + windowsMetricsSpecProvider, + windowsEventLogsSpecProvider, + golangMetricsSpecProvider, + logstashMetricsSpecProvider, + prometheusMetricsSpecProvider, + zookeeperMetricsSpecProvider, + uptimeMonitorsSpecProvider, + cloudwatchLogsSpecProvider, + awsMetricsSpecProvider, + mssqlMetricsSpecProvider, + natsMetricsSpecProvider, + natsLogsSpecProvider, + zeekLogsSpecProvider, + corednsMetricsSpecProvider, + corednsLogsSpecProvider, + auditbeatSpecProvider, + iptablesLogsSpecProvider, + ciscoLogsSpecProvider, + envoyproxyLogsSpecProvider, + couchdbMetricsSpecProvider, + consulMetricsSpecProvider, + cockroachdbMetricsSpecProvider, + traefikMetricsSpecProvider, + awsLogsSpecProvider, + activemqLogsSpecProvider, + activemqMetricsSpecProvider, + azureMetricsSpecProvider, + ibmmqLogsSpecProvider, + stanMetricsSpecProvider, + envoyproxyMetricsSpecProvider, +]; diff --git a/src/plugins/home/server/tutorials/stan_metrics/index.ts b/src/plugins/home/server/tutorials/stan_metrics/index.ts index 78c8dd17ad845..fd1923373cbe6 100644 --- a/src/plugins/home/server/tutorials/stan_metrics/index.ts +++ b/src/plugins/home/server/tutorials/stan_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'stan'; @@ -32,7 +36,7 @@ export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchem name: i18n.translate('kbn.server.tutorials.stanMetrics.nameTitle', { defaultMessage: 'STAN metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.stanMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the STAN server.', }), @@ -53,7 +57,7 @@ export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchem }, completionTimeMinutes: 10, // previewImagePath: '/plugins/kibana/home/tutorial_resources/stan_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts index 694df4d4b7a53..8aae1daec4a5c 100644 --- a/src/plugins/home/server/tutorials/suricata_logs/index.ts +++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function suricataLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'suricata'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'suricataLogs', name: i18n.translate('kbn.server.tutorials.suricataLogs.nameTitle', { defaultMessage: 'Suricata logs', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.suricataLogs.shortDescription', { defaultMessage: 'Collect the result logs created by Suricata IDS/IPS/NSM.', }), @@ -46,7 +50,7 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-suricata.html', }, }), - //euiIconType: 'logoSuricata', + // euiIconType: 'logoSuricata', artifacts: { dashboards: [ { diff --git a/src/plugins/home/server/tutorials/system_logs/index.ts b/src/plugins/home/server/tutorials/system_logs/index.ts index 6284ef2e0b033..67b2c12d01628 100644 --- a/src/plugins/home/server/tutorials/system_logs/index.ts +++ b/src/plugins/home/server/tutorials/system_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function systemLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'system'; - const platforms = ['OSX', 'DEB', 'RPM']; + const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'systemLogs', name: i18n.translate('kbn.server.tutorials.systemLogs.nameTitle', { defaultMessage: 'System logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.systemLogs.shortDescription', { defaultMessage: 'Collect and parse logs written by the local Syslog server.', }), diff --git a/src/plugins/home/server/tutorials/system_metrics/index.ts b/src/plugins/home/server/tutorials/system_metrics/index.ts index 605d28a7c0831..82af24a151527 100644 --- a/src/plugins/home/server/tutorials/system_metrics/index.ts +++ b/src/plugins/home/server/tutorials/system_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function systemMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'system'; @@ -32,7 +36,7 @@ export function systemMetricsSpecProvider(context: TutorialContext): TutorialSch name: i18n.translate('kbn.server.tutorials.systemMetrics.nameTitle', { defaultMessage: 'System metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.systemMetrics.shortDescription', { defaultMessage: 'Collect CPU, memory, network, and disk statistics from the host.', }), @@ -64,7 +68,7 @@ It collects system wide statistics and statistics per process and filesystem. \ }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/system_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/traefik_logs/index.ts b/src/plugins/home/server/tutorials/traefik_logs/index.ts index 24e3a8c66cb93..bba07b5279381 100644 --- a/src/plugins/home/server/tutorials/traefik_logs/index.ts +++ b/src/plugins/home/server/tutorials/traefik_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'traefik'; - const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS']; + const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'traefikLogs', name: i18n.translate('kbn.server.tutorials.traefikLogs.nameTitle', { defaultMessage: 'Traefik logs', }), - category: TUTORIAL_CATEGORY.LOGGING, + category: TutorialsCategory.LOGGING, shortDescription: i18n.translate('kbn.server.tutorials.traefikLogs.shortDescription', { defaultMessage: 'Collect and parse access logs created by the Traefik Proxy.', }), @@ -45,7 +49,7 @@ export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchem learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-traefik.html', }, }), - //euiIconType: 'logoTraefik', + // euiIconType: 'logoTraefik', artifacts: { dashboards: [ { diff --git a/src/plugins/home/server/tutorials/traefik_metrics/index.ts b/src/plugins/home/server/tutorials/traefik_metrics/index.ts index 792b6787c6843..f9e690e949a7a 100644 --- a/src/plugins/home/server/tutorials/traefik_metrics/index.ts +++ b/src/plugins/home/server/tutorials/traefik_metrics/index.ts @@ -18,12 +18,13 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory, TutorialSchema } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types'; export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'traefik'; @@ -32,7 +33,7 @@ export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.traefikMetrics.nameTitle', { defaultMessage: 'Traefik metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.traefikMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from Traefik.', }), @@ -53,7 +54,7 @@ export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSc }, completionTimeMinutes: 10, // previewImagePath: '/plugins/kibana/home/tutorial_resources/traefik_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/uptime_monitors/index.ts b/src/plugins/home/server/tutorials/uptime_monitors/index.ts index b21b965b2ca06..8727af823046b 100644 --- a/src/plugins/home/server/tutorials/uptime_monitors/index.ts +++ b/src/plugins/home/server/tutorials/uptime_monitors/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/heartbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSchema { return { @@ -31,7 +35,7 @@ export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.uptimeMonitors.nameTitle', { defaultMessage: 'Uptime Monitors', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.uptimeMonitors.shortDescription', { defaultMessage: 'Monitor services for their availability', }), @@ -62,7 +66,7 @@ export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSc }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png', - onPrem: onPremInstructions(null, null, null, context), + onPrem: onPremInstructions([], context), elasticCloud: cloudInstructions(), onPremElasticCloud: onPremCloudInstructions(), }; diff --git a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts index a49bbca28556f..944b397804b3e 100644 --- a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts +++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'uwsgi'; @@ -32,7 +36,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche name: i18n.translate('kbn.server.tutorials.uwsgiMetrics.nameTitle', { defaultMessage: 'uWSGI metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.uwsgiMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the uWSGI server.', }), @@ -44,7 +48,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-uwsgi.html', }, }), - //euiIconType: 'logouWSGI', + // euiIconType: 'logouWSGI', isBeta: false, artifacts: { dashboards: [ @@ -65,7 +69,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche }, completionTimeMinutes: 10, previewImagePath: '/plugins/kibana/home/tutorial_resources/uwsgi_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts index 6a9cff1651e6f..51276bd859486 100644 --- a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts +++ b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'vsphere'; @@ -32,7 +36,7 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc name: i18n.translate('kbn.server.tutorials.vsphereMetrics.nameTitle', { defaultMessage: 'vSphere metrics', }), - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.vsphereMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from vSphere.', }), @@ -44,7 +48,7 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-vsphere.html', }, }), - //euiIconType: 'logoVSphere', + // euiIconType: 'logoVSphere', isBeta: true, artifacts: { application: { @@ -59,8 +63,8 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc }, }, completionTimeMinutes: 10, - //previewImagePath: '/plugins/kibana/home/tutorial_resources/vsphere_metrics/screenshot.png', - onPrem: onPremInstructions(moduleName, null, null, null, context), + // previewImagePath: '/plugins/kibana/home/tutorial_resources/vsphere_metrics/screenshot.png', + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/windows_event_logs/index.ts b/src/plugins/home/server/tutorials/windows_event_logs/index.ts index 5ce0932159ec2..9e973b054a721 100644 --- a/src/plugins/home/server/tutorials/windows_event_logs/index.ts +++ b/src/plugins/home/server/tutorials/windows_event_logs/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/winlogbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function windowsEventLogsSpecProvider(context: TutorialContext): TutorialSchema { return { @@ -32,7 +36,7 @@ export function windowsEventLogsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Windows Event Log', }), isBeta: false, - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.windowsEventLogs.shortDescription', { defaultMessage: 'Fetch logs from the Windows Event Log.', }), @@ -58,7 +62,7 @@ export function windowsEventLogsSpecProvider(context: TutorialContext): Tutorial }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(null, null, null, context), + onPrem: onPremInstructions(context), elasticCloud: cloudInstructions(), onPremElasticCloud: onPremCloudInstructions(), }; diff --git a/src/plugins/home/server/tutorials/windows_metrics/index.ts b/src/plugins/home/server/tutorials/windows_metrics/index.ts index b86f990a5922d..41e005ab49d9f 100644 --- a/src/plugins/home/server/tutorials/windows_metrics/index.ts +++ b/src/plugins/home/server/tutorials/windows_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'windows'; @@ -33,7 +37,7 @@ export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSc defaultMessage: 'Windows metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.windowsMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Windows.', }), @@ -59,7 +63,7 @@ export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSc }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts index 0e6f3ff84ca1a..73663ae57da86 100644 --- a/src/plugins/home/server/tutorials/zeek_logs/index.ts +++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts @@ -18,22 +18,26 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/filebeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'zeek'; - const platforms = ['OSX', 'DEB', 'RPM']; + const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'zeekLogs', name: i18n.translate('kbn.server.tutorials.zeekLogs.nameTitle', { defaultMessage: 'Zeek logs', }), - category: TUTORIAL_CATEGORY.SIEM, + category: TutorialsCategory.SIEM, shortDescription: i18n.translate('kbn.server.tutorials.zeekLogs.shortDescription', { defaultMessage: 'Collect the logs created by Zeek/Bro.', }), @@ -46,7 +50,7 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-zeek.html', }, }), - //TODO: euiIconType: 'logoZeek', + // TODO: euiIconType: 'logoZeek', artifacts: { dashboards: [ { diff --git a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts index 2a67c4c83b131..4556371036770 100644 --- a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts +++ b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts @@ -18,12 +18,16 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../instructions/tutorial_category'; +import { TutorialsCategory } from '../../services/tutorials'; import { onPremInstructions, cloudInstructions, onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; export function zookeeperMetricsSpecProvider(context: TutorialContext): TutorialSchema { const moduleName = 'zookeeper'; @@ -33,7 +37,7 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial defaultMessage: 'Zookeeper metrics', }), isBeta: false, - category: TUTORIAL_CATEGORY.METRICS, + category: TutorialsCategory.METRICS, shortDescription: i18n.translate('kbn.server.tutorials.zookeeperMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Zookeeper server.', }), @@ -59,7 +63,7 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial }, }, completionTimeMinutes: 10, - onPrem: onPremInstructions(moduleName, null, null, null, context), + onPrem: onPremInstructions(moduleName, context), elasticCloud: cloudInstructions(moduleName), onPremElasticCloud: onPremCloudInstructions(moduleName), }; diff --git a/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts index 522bb551ce541..1d53263917109 100644 --- a/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts +++ b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts @@ -5,7 +5,7 @@ */ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server/tutorials/instructions/instruction_variant'; +import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server'; import { createNodeAgentInstructions, diff --git a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts index 5ed3f8e96ba11..60613d526f6a4 100644 --- a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts +++ b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts @@ -5,7 +5,7 @@ */ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server/tutorials/instructions/instruction_variant'; +import { INSTRUCTION_VARIANT } from '../../../../../../src/plugins/home/server'; import { createWindowsServerInstructions, createEditConfig, diff --git a/x-pack/plugins/apm/server/tutorial/index.ts b/x-pack/plugins/apm/server/tutorial/index.ts index 2e7f81badf680..be04bf545d3fd 100644 --- a/x-pack/plugins/apm/server/tutorial/index.ts +++ b/x-pack/plugins/apm/server/tutorial/index.ts @@ -5,12 +5,11 @@ */ import { i18n } from '@kbn/i18n'; -import { TUTORIAL_CATEGORY } from '../../../../../src/plugins/home/server/tutorials/instructions/tutorial_category'; import { onPremInstructions } from './envs/on_prem'; import { createElasticCloudInstructions } from './envs/elastic_cloud'; import apmIndexPattern from './index_pattern.json'; import { CloudSetup } from '../../../cloud/server'; -import { ArtifactsSchema } from '../../../../../src/plugins/home/server/services/tutorials'; +import { ArtifactsSchema, TutorialsCategory } from '../../../../../src/plugins/home/server'; const apmIntro = i18n.translate('kbn.server.tutorials.apm.introduction', { defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.', @@ -72,7 +71,7 @@ export const tutorialProvider = ({ name: i18n.translate('kbn.server.tutorials.apm.specProvider.name', { defaultMessage: 'APM', }), - category: TUTORIAL_CATEGORY.OTHER, + category: TutorialsCategory.OTHER, shortDescription: apmIntro, longDescription: i18n.translate('kbn.server.tutorials.apm.specProvider.longDescription', { defaultMessage: From 1a2424623b848ab2fd2ba89bc5cc209aaae0f36f Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 15 Jan 2020 15:16:10 +0100 Subject: [PATCH 3/8] fix apm and spaces code --- .../server/lib/index_pattern/create_static_index_pattern.ts | 3 ++- x-pack/plugins/spaces/server/plugin.ts | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts b/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts index c32559c35f9cb..fefaa30c8c36b 100644 --- a/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts +++ b/x-pack/legacy/plugins/apm/server/lib/index_pattern/create_static_index_pattern.ts @@ -4,7 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ import { getInternalSavedObjectsClient } from '../helpers/saved_objects_client'; -import apmIndexPattern from '../../../../../../plugins/apm/server/apm/index_pattern.json'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import apmIndexPattern from '../../../../../../plugins/apm/server/tutorial/index_pattern.json'; import { APM_STATIC_INDEX_PATTERN_ID } from '../../../common/index_pattern_constants'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { SavedObjectsErrorHelpers } from '../../../../../../../src/core/server/saved_objects'; diff --git a/x-pack/plugins/spaces/server/plugin.ts b/x-pack/plugins/spaces/server/plugin.ts index 6b7699100032d..b8ef81c05f7aa 100644 --- a/x-pack/plugins/spaces/server/plugin.ts +++ b/x-pack/plugins/spaces/server/plugin.ts @@ -38,9 +38,6 @@ import { initInternalSpacesApi } from './routes/api/internal'; */ export interface LegacyAPI { savedObjects: SavedObjectsLegacyService; - tutorial: { - addScopedTutorialContextFactory: (factory: any) => void; - }; auditLogger: { create: (pluginId: string) => AuditLogger; }; @@ -191,9 +188,6 @@ export class Plugin { 'spaces', spacesSavedObjectsClientWrapperFactory(spacesService, types) ); - legacyAPI.tutorial.addScopedTutorialContextFactory( - createSpacesTutorialContextFactory(spacesService) - ); // Register a function with server to manage the collection of usage stats registerSpacesUsageCollector(usageCollectionSetup, { kibanaIndex: legacyAPI.legacyConfig.kibanaIndex, From 7b6e27c588f6570ce94be53ac88d769a6a7572d2 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 15 Jan 2020 17:41:13 +0100 Subject: [PATCH 4/8] move ems tutorial into maps plugin --- src/legacy/core_plugins/kibana/index.js | 2 - .../kibana/server/tutorials/register.ts | 27 ------------ x-pack/legacy/plugins/maps/server/plugin.js | 8 ++++ .../maps}/server/tutorials/ems/index.ts | 43 +++++++------------ 4 files changed, 23 insertions(+), 57 deletions(-) delete mode 100644 src/legacy/core_plugins/kibana/server/tutorials/register.ts rename {src/legacy/core_plugins/kibana => x-pack/legacy/plugins/maps}/server/tutorials/ems/index.ts (63%) diff --git a/src/legacy/core_plugins/kibana/index.js b/src/legacy/core_plugins/kibana/index.js index 7a5d8ccba03a1..e515e75fb9393 100644 --- a/src/legacy/core_plugins/kibana/index.js +++ b/src/legacy/core_plugins/kibana/index.js @@ -26,7 +26,6 @@ import { importApi } from './server/routes/api/import'; import { exportApi } from './server/routes/api/export'; import { managementApi } from './server/routes/api/management'; import { registerFieldFormats } from './server/field_formats/register'; -import { registerTutorials } from './server/tutorials/register'; import * as systemApi from './server/lib/system_api'; import mappings from './mappings.json'; import { getUiSettingDefaults } from './ui_setting_defaults'; @@ -325,7 +324,6 @@ export default function(kibana) { exportApi(server); managementApi(server); registerFieldFormats(server); - registerTutorials(server); registerCspCollector(usageCollection, server); server.expose('systemApi', systemApi); server.injectUiAppVars('kibana', () => injectVars(server)); diff --git a/src/legacy/core_plugins/kibana/server/tutorials/register.ts b/src/legacy/core_plugins/kibana/server/tutorials/register.ts deleted file mode 100644 index 59d05cafa674e..0000000000000 --- a/src/legacy/core_plugins/kibana/server/tutorials/register.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { emsBoundariesSpecProvider } from './ems'; -import { Server } from '../../../../server/kbn_server'; - -export function registerTutorials(server: Server) { - server.newPlatform.setup.plugins.home.tutorials.registerTutorial(() => - emsBoundariesSpecProvider(server) - ); -} diff --git a/x-pack/legacy/plugins/maps/server/plugin.js b/x-pack/legacy/plugins/maps/server/plugin.js index 6009cea330ab0..d52a9f12ba631 100644 --- a/x-pack/legacy/plugins/maps/server/plugin.js +++ b/x-pack/legacy/plugins/maps/server/plugin.js @@ -10,6 +10,7 @@ import { getFlightsSavedObjects } from './sample_data/flights_saved_objects.js'; import { getWebLogsSavedObjects } from './sample_data/web_logs_saved_objects.js'; import { LICENSE_CHECK_STATE } from '../../../../plugins/licensing/server'; import { initRoutes } from './routes'; +import { emsBoundariesSpecProvider } from './tutorials/ems'; export class MapPlugin { setup(core, plugins, __LEGACY) { @@ -115,6 +116,13 @@ export class MapPlugin { isLayerTOCOpen: false, }, }); + + home.tutorials.registerTutorial( + emsBoundariesSpecProvider({ + prependBasePath: core.http.basePath.prepend, + emsLandingPageUrl: __LEGACY.mapConfig().emsLandingPageUrl, + }) + ); } __LEGACY.injectUiAppVars(APP_ID, async () => { diff --git a/src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts b/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts similarity index 63% rename from src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts rename to x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts index 3c0cfa60e8d7b..8aaedc59683b1 100644 --- a/src/legacy/core_plugins/kibana/server/tutorials/ems/index.ts +++ b/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts @@ -1,33 +1,20 @@ /* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. */ import { i18n } from '@kbn/i18n'; -import { TutorialsCategory } from '../../../../../../plugins/home/server'; -import { Server } from '../../../../../server/kbn_server'; +import { TutorialsCategory } from '../../../../../../../src/plugins/home/server'; -export function emsBoundariesSpecProvider(server: Server) { - function addBasePath(url: string) { - const basePath: string = server.config().get('server.basePath'); - return `${basePath.length > 0 ? `${basePath}` : ''}${url}`; - } - - return { +export function emsBoundariesSpecProvider({ + emsLandingPageUrl, + prependBasePath, +}: { + emsLandingPageUrl: string; + prependBasePath: (path: string) => string; +}) { + return () => ({ id: 'emsBoundaries', name: i18n.translate('kbn.server.tutorials.ems.nameTitle', { defaultMessage: 'EMS Boundaries', @@ -62,7 +49,7 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou 2. In the left sidebar, select an administrative boundary.\n\ 3. Click `Download GeoJSON` button.', values: { - emsLandingPageUrl: server.config().get('map.emsLandingPageUrl'), + emsLandingPageUrl, }, }), }, @@ -76,7 +63,7 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou 2. Click `Add layer`, then select `Upload GeoJSON`.\n\ 3. Upload the GeoJSON file and click `Import file`.', values: { - newMapUrl: addBasePath('/app/maps#/map'), + newMapUrl: prependBasePath('/app/maps#/map'), }, }), }, @@ -86,5 +73,5 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou }, ], }, - }; + }); } From b6a95023fe891ff2a1f130417076f0e3f77e7ced Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 16 Jan 2020 09:18:35 +0100 Subject: [PATCH 5/8] fix eslint issue --- src/plugins/home/server/tutorials/activemq_metrics/index.ts | 3 ++- src/plugins/home/server/tutorials/aerospike_metrics/index.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/home/server/tutorials/activemq_metrics/index.ts b/src/plugins/home/server/tutorials/activemq_metrics/index.ts index 63ec9f47d59cc..0b3615e7a4a66 100644 --- a/src/plugins/home/server/tutorials/activemq_metrics/index.ts +++ b/src/plugins/home/server/tutorials/activemq_metrics/index.ts @@ -24,7 +24,8 @@ import { onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; import { - TutorialContext, TutorialsCategory, + TutorialContext, + TutorialsCategory, TutorialSchema, } from '../../services/tutorials/lib/tutorials_registry_types'; diff --git a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts index b18153a6b3275..dc41706dcf54d 100644 --- a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts +++ b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts @@ -24,7 +24,8 @@ import { onPremCloudInstructions, } from '../instructions/metricbeat_instructions'; import { - TutorialContext, TutorialsCategory, + TutorialContext, + TutorialsCategory, TutorialSchema, } from '../../services/tutorials/lib/tutorials_registry_types'; From a0f50244c7a986279254c6978110b870d4f7b675 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 16 Jan 2020 12:03:56 +0100 Subject: [PATCH 6/8] fix types --- x-pack/legacy/plugins/spaces/index.ts | 3 --- .../spaces/server/routes/api/__fixtures__/create_legacy_api.ts | 1 - 2 files changed, 4 deletions(-) diff --git a/x-pack/legacy/plugins/spaces/index.ts b/x-pack/legacy/plugins/spaces/index.ts index 934b44b4accaf..2e6b878794777 100644 --- a/x-pack/legacy/plugins/spaces/index.ts +++ b/x-pack/legacy/plugins/spaces/index.ts @@ -127,9 +127,6 @@ export const spaces = (kibana: Record) => kibanaIndex: config.get('kibana.index'), }, savedObjects: server.savedObjects, - tutorial: { - addScopedTutorialContextFactory: server.addScopedTutorialContextFactory, - }, auditLogger: { create: (pluginId: string) => new AuditLogger(server, pluginId, server.config(), server.plugins.xpack_main.info), diff --git a/x-pack/plugins/spaces/server/routes/api/__fixtures__/create_legacy_api.ts b/x-pack/plugins/spaces/server/routes/api/__fixtures__/create_legacy_api.ts index cd2bcdcd5aa34..dfeb094e34e25 100644 --- a/x-pack/plugins/spaces/server/routes/api/__fixtures__/create_legacy_api.ts +++ b/x-pack/plugins/spaces/server/routes/api/__fixtures__/create_legacy_api.ts @@ -104,7 +104,6 @@ export const createLegacyAPI = ({ kibanaIndex: '', }, auditLogger: {} as any, - tutorial: {} as any, xpackMain: {} as any, savedObjects: savedObjectsService, }; From c9c64a4e790fa95f49b786ef3df22df4d8f35cd2 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 16 Jan 2020 13:07:09 +0100 Subject: [PATCH 7/8] fix translation ids --- .../server/tutorials/activemq_logs/index.ts | 15 +- .../tutorials/activemq_metrics/index.ts | 8 +- .../tutorials/aerospike_metrics/index.ts | 8 +- .../server/tutorials/apache_logs/index.ts | 15 +- .../server/tutorials/apache_metrics/index.ts | 15 +- .../home/server/tutorials/auditbeat/index.ts | 8 +- .../home/server/tutorials/aws_logs/index.ts | 8 +- .../server/tutorials/aws_metrics/index.ts | 15 +- .../server/tutorials/azure_metrics/index.ts | 8 +- .../server/tutorials/ceph_metrics/index.ts | 8 +- .../home/server/tutorials/cisco_logs/index.ts | 8 +- .../server/tutorials/cloudwatch_logs/index.ts | 6 +- .../tutorials/cockroachdb_metrics/index.ts | 8 +- .../server/tutorials/consul_metrics/index.ts | 15 +- .../server/tutorials/coredns_logs/index.ts | 15 +- .../server/tutorials/coredns_metrics/index.ts | 8 +- .../tutorials/couchbase_metrics/index.ts | 8 +- .../server/tutorials/couchdb_metrics/index.ts | 8 +- .../server/tutorials/docker_metrics/index.ts | 15 +- .../tutorials/dropwizard_metrics/index.ts | 15 +- .../tutorials/elasticsearch_logs/index.ts | 15 +- .../tutorials/elasticsearch_metrics/index.ts | 15 +- .../server/tutorials/envoyproxy_logs/index.ts | 15 +- .../tutorials/envoyproxy_metrics/index.ts | 6 +- .../server/tutorials/etcd_metrics/index.ts | 8 +- .../server/tutorials/golang_metrics/index.ts | 15 +- .../server/tutorials/haproxy_metrics/index.ts | 8 +- .../home/server/tutorials/ibmmq_logs/index.ts | 15 +- .../home/server/tutorials/iis_logs/index.ts | 8 +- .../instructions/auditbeat_instructions.ts | 169 ++- .../instructions/filebeat_instructions.ts | 141 +- .../instructions/functionbeat_instructions.ts | 93 +- .../instructions/heartbeat_instructions.ts | 212 +-- .../instructions/logstash_instructions.ts | 16 +- .../instructions/metricbeat_instructions.ts | 135 +- .../instructions/onprem_cloud_instructions.ts | 8 +- .../instructions/winlogbeat_instructions.ts | 51 +- .../server/tutorials/iptables_logs/index.ts | 8 +- .../home/server/tutorials/kafka_logs/index.ts | 15 +- .../server/tutorials/kafka_metrics/index.ts | 8 +- .../server/tutorials/kibana_metrics/index.ts | 8 +- .../tutorials/kubernetes_metrics/index.ts | 8 +- .../server/tutorials/logstash_logs/index.ts | 15 +- .../tutorials/logstash_metrics/index.ts | 8 +- .../tutorials/memcached_metrics/index.ts | 8 +- .../server/tutorials/mongodb_metrics/index.ts | 8 +- .../server/tutorials/mssql_metrics/index.ts | 15 +- .../server/tutorials/munin_metrics/index.ts | 8 +- .../home/server/tutorials/mysql_logs/index.ts | 15 +- .../server/tutorials/mysql_metrics/index.ts | 15 +- .../home/server/tutorials/nats_logs/index.ts | 15 +- .../server/tutorials/nats_metrics/index.ts | 15 +- .../tutorials/netflow/common_instructions.ts | 103 +- .../server/tutorials/netflow/elastic_cloud.ts | 2 +- .../home/server/tutorials/netflow/index.ts | 4 +- .../home/server/tutorials/netflow/on_prem.ts | 2 +- .../netflow/on_prem_elastic_cloud.ts | 2 +- .../home/server/tutorials/nginx_logs/index.ts | 15 +- .../server/tutorials/nginx_metrics/index.ts | 15 +- .../server/tutorials/osquery_logs/index.ts | 15 +- .../server/tutorials/php_fpm_metrics/index.ts | 6 +- .../server/tutorials/postgresql_logs/index.ts | 8 +- .../tutorials/postgresql_metrics/index.ts | 6 +- .../tutorials/prometheus_metrics/index.ts | 15 +- .../tutorials/rabbitmq_metrics/index.ts | 8 +- .../home/server/tutorials/redis_logs/index.ts | 15 +- .../server/tutorials/redis_metrics/index.ts | 15 +- .../server/tutorials/stan_metrics/index.ts | 6 +- .../server/tutorials/suricata_logs/index.ts | 15 +- .../server/tutorials/system_logs/index.ts | 15 +- .../server/tutorials/system_metrics/index.ts | 15 +- .../server/tutorials/traefik_logs/index.ts | 15 +- .../server/tutorials/traefik_metrics/index.ts | 6 +- .../server/tutorials/uptime_monitors/index.ts | 15 +- .../server/tutorials/uwsgi_metrics/index.ts | 15 +- .../server/tutorials/vsphere_metrics/index.ts | 8 +- .../tutorials/windows_event_logs/index.ts | 8 +- .../server/tutorials/windows_metrics/index.ts | 8 +- .../home/server/tutorials/zeek_logs/index.ts | 15 +- .../tutorials/zookeeper_metrics/index.ts | 8 +- x-pack/.i18nrc.json | 2 +- .../maps/server/tutorials/ems/index.ts | 14 +- .../apm/server/tutorial/envs/elastic_cloud.ts | 6 +- .../apm/server/tutorial/envs/on_prem.ts | 28 +- x-pack/plugins/apm/server/tutorial/index.ts | 12 +- .../instructions/apm_agent_instructions.ts | 232 ++- .../instructions/apm_server_instructions.ts | 18 +- .../translations/translations/ja-JP.json | 1322 ++++++++--------- .../translations/translations/zh-CN.json | 1322 ++++++++--------- 89 files changed, 2281 insertions(+), 2368 deletions(-) diff --git a/src/plugins/home/server/tutorials/activemq_logs/index.ts b/src/plugins/home/server/tutorials/activemq_logs/index.ts index 5af62ea56dfa0..6511a21b15c44 100644 --- a/src/plugins/home/server/tutorials/activemq_logs/index.ts +++ b/src/plugins/home/server/tutorials/activemq_logs/index.ts @@ -34,14 +34,14 @@ export function activemqLogsSpecProvider(context: TutorialContext): TutorialSche const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'activemqLogs', - name: i18n.translate('kbn.server.tutorials.activemqLogs.nameTitle', { + name: i18n.translate('home.tutorials.activemqLogs.nameTitle', { defaultMessage: 'ActiveMQ logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.activemqLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.activemqLogs.shortDescription', { defaultMessage: 'Collect ActiveMQ logs with Filebeat.', }), - longDescription: i18n.translate('kbn.server.tutorials.activemqLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.activemqLogs.longDescription', { defaultMessage: 'Collect ActiveMQ logs with Filebeat. \ [Learn more]({learnMoreLink}).', values: { @@ -53,12 +53,9 @@ export function activemqLogsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: '26434790-1464-11ea-8fd8-030a13064883', - linkLabel: i18n.translate( - 'kbn.server.tutorials.activemqLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'ActiveMQ Application Events', - } - ), + linkLabel: i18n.translate('home.tutorials.activemqLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'ActiveMQ Application Events', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/activemq_metrics/index.ts b/src/plugins/home/server/tutorials/activemq_metrics/index.ts index 0b3615e7a4a66..6c26d2f3e1d22 100644 --- a/src/plugins/home/server/tutorials/activemq_metrics/index.ts +++ b/src/plugins/home/server/tutorials/activemq_metrics/index.ts @@ -33,14 +33,14 @@ export function activemqMetricsSpecProvider(context: TutorialContext): TutorialS const moduleName = 'activemq'; return { id: 'activemqMetrics', - name: i18n.translate('kbn.server.tutorials.activemqMetrics.nameTitle', { + name: i18n.translate('home.tutorials.activemqMetrics.nameTitle', { defaultMessage: 'ActiveMQ metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.activemqMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.activemqMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from ActiveMQ instances.', }), - longDescription: i18n.translate('kbn.server.tutorials.activemqMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.activemqMetrics.longDescription', { defaultMessage: 'The `activemq` Metricbeat module fetches monitoring metrics from ActiveMQ instances \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function activemqMetricsSpecProvider(context: TutorialContext): TutorialS isBeta: true, artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.corednsMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.corednsMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts index dc41706dcf54d..656e7feceed0c 100644 --- a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts +++ b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts @@ -33,15 +33,15 @@ export function aerospikeMetricsSpecProvider(context: TutorialContext): Tutorial const moduleName = 'aerospike'; return { id: 'aerospikeMetrics', - name: i18n.translate('kbn.server.tutorials.aerospikeMetrics.nameTitle', { + name: i18n.translate('home.tutorials.aerospikeMetrics.nameTitle', { defaultMessage: 'Aerospike metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.aerospikeMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.aerospikeMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Aerospike server.', }), - longDescription: i18n.translate('kbn.server.tutorials.aerospikeMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.aerospikeMetrics.longDescription', { defaultMessage: 'The `aerospike` Metricbeat module fetches internal metrics from Aerospike. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function aerospikeMetricsSpecProvider(context: TutorialContext): Tutorial euiIconType: 'logoAerospike', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.aerospikeMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.aerospikeMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/apache_logs/index.ts b/src/plugins/home/server/tutorials/apache_logs/index.ts index c9aabd149c3c2..adf94f5567096 100644 --- a/src/plugins/home/server/tutorials/apache_logs/index.ts +++ b/src/plugins/home/server/tutorials/apache_logs/index.ts @@ -34,14 +34,14 @@ export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'apacheLogs', - name: i18n.translate('kbn.server.tutorials.apacheLogs.nameTitle', { + name: i18n.translate('home.tutorials.apacheLogs.nameTitle', { defaultMessage: 'Apache logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.apacheLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.apacheLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the Apache HTTP server.', }), - longDescription: i18n.translate('kbn.server.tutorials.apacheLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.apacheLogs.longDescription', { defaultMessage: 'The apache Filebeat module parses access and error logs created by the Apache HTTP server. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: 'Filebeat-Apache-Dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.apacheLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Apache logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.apacheLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Apache logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/apache_metrics/index.ts b/src/plugins/home/server/tutorials/apache_metrics/index.ts index 236e2c09a6772..e272f3efb5abe 100644 --- a/src/plugins/home/server/tutorials/apache_metrics/index.ts +++ b/src/plugins/home/server/tutorials/apache_metrics/index.ts @@ -33,14 +33,14 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'apache'; return { id: 'apacheMetrics', - name: i18n.translate('kbn.server.tutorials.apacheMetrics.nameTitle', { + name: i18n.translate('home.tutorials.apacheMetrics.nameTitle', { defaultMessage: 'Apache metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.apacheMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.apacheMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Apache 2 HTTP server.', }), - longDescription: i18n.translate('kbn.server.tutorials.apacheMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.apacheMetrics.longDescription', { defaultMessage: 'The `apache` Metricbeat module fetches internal metrics from the Apache 2 HTTP server. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch dashboards: [ { id: 'Metricbeat-Apache-HTTPD-server-status-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.apacheMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Apache metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.apacheMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Apache metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/auditbeat/index.ts b/src/plugins/home/server/tutorials/auditbeat/index.ts index dbc5dae9d9745..6d94e7507ff42 100644 --- a/src/plugins/home/server/tutorials/auditbeat/index.ts +++ b/src/plugins/home/server/tutorials/auditbeat/index.ts @@ -33,14 +33,14 @@ export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'auditbeat', - name: i18n.translate('kbn.server.tutorials.auditbeat.nameTitle', { + name: i18n.translate('home.tutorials.auditbeat.nameTitle', { defaultMessage: 'Auditbeat', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.auditbeat.shortDescription', { + shortDescription: i18n.translate('home.tutorials.auditbeat.shortDescription', { defaultMessage: 'Collect audit data from your hosts.', }), - longDescription: i18n.translate('kbn.server.tutorials.auditbeat.longDescription', { + longDescription: i18n.translate('home.tutorials.auditbeat.longDescription', { defaultMessage: 'Use Auditbeat to collect auditing data from your hosts. These include \ processes, users, logins, sockets information, file accesses, and more. \ @@ -54,7 +54,7 @@ processes, users, logins, sockets information, file accesses, and more. \ dashboards: [], application: { path: '/app/siem', - label: i18n.translate('kbn.server.tutorials.auditbeat.artifacts.dashboards.linkLabel', { + label: i18n.translate('home.tutorials.auditbeat.artifacts.dashboards.linkLabel', { defaultMessage: 'SIEM App', }), }, diff --git a/src/plugins/home/server/tutorials/aws_logs/index.ts b/src/plugins/home/server/tutorials/aws_logs/index.ts index 65de1913e735c..8908838bd558a 100644 --- a/src/plugins/home/server/tutorials/aws_logs/index.ts +++ b/src/plugins/home/server/tutorials/aws_logs/index.ts @@ -34,14 +34,14 @@ export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema { const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'awsLogs', - name: i18n.translate('kbn.server.tutorials.awsLogs.nameTitle', { + name: i18n.translate('home.tutorials.awsLogs.nameTitle', { defaultMessage: 'AWS S3 based logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.awsLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.awsLogs.shortDescription', { defaultMessage: 'Collect AWS logs from S3 bucket with Filebeat.', }), - longDescription: i18n.translate('kbn.server.tutorials.awsLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.awsLogs.longDescription', { defaultMessage: 'Collect AWS logs by exporting them to an S3 bucket which is configured with SQS notification. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema { dashboards: [ { id: '4746e000-bacd-11e9-9f70-1f7bda85a5eb', - linkLabel: i18n.translate('kbn.server.tutorials.awsLogs.artifacts.dashboards.linkLabel', { + linkLabel: i18n.translate('home.tutorials.awsLogs.artifacts.dashboards.linkLabel', { defaultMessage: 'AWS S3 server access log dashboard', }), isOverview: true, diff --git a/src/plugins/home/server/tutorials/aws_metrics/index.ts b/src/plugins/home/server/tutorials/aws_metrics/index.ts index e36493f7dfc7d..d00951b524530 100644 --- a/src/plugins/home/server/tutorials/aws_metrics/index.ts +++ b/src/plugins/home/server/tutorials/aws_metrics/index.ts @@ -33,15 +33,15 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema const moduleName = 'aws'; return { id: 'awsMetrics', - name: i18n.translate('kbn.server.tutorials.awsMetrics.nameTitle', { + name: i18n.translate('home.tutorials.awsMetrics.nameTitle', { defaultMessage: 'AWS metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.awsMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.awsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics for EC2 instances from the AWS APIs and Cloudwatch.', }), - longDescription: i18n.translate('kbn.server.tutorials.awsMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.awsMetrics.longDescription', { defaultMessage: 'The `aws` Metricbeat module fetches monitoring metrics from the AWS APIs and Cloudwatch. \ [Learn more]({learnMoreLink}).', @@ -55,12 +55,9 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: 'c5846400-f7fb-11e8-af03-c999c9dea608-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.awsMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'AWS metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.awsMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'AWS metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/azure_metrics/index.ts b/src/plugins/home/server/tutorials/azure_metrics/index.ts index e9d33e24075ab..72befcf8d2065 100644 --- a/src/plugins/home/server/tutorials/azure_metrics/index.ts +++ b/src/plugins/home/server/tutorials/azure_metrics/index.ts @@ -33,15 +33,15 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'azure'; return { id: 'azureMetrics', - name: i18n.translate('kbn.server.tutorials.azureMetrics.nameTitle', { + name: i18n.translate('home.tutorials.azureMetrics.nameTitle', { defaultMessage: 'Azure metrics', }), isBeta: true, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.azureMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.azureMetrics.shortDescription', { defaultMessage: 'Fetch Azure Monitor metrics.', }), - longDescription: i18n.translate('kbn.server.tutorials.azureMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.azureMetrics.longDescription', { defaultMessage: 'The `azure` Metricbeat module fetches Azure Monitor metrics. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche euiIconType: 'logoAzure', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.azureMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.azureMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/ceph_metrics/index.ts b/src/plugins/home/server/tutorials/ceph_metrics/index.ts index 9732ba751675c..6b5f9c4c6fe5f 100644 --- a/src/plugins/home/server/tutorials/ceph_metrics/index.ts +++ b/src/plugins/home/server/tutorials/ceph_metrics/index.ts @@ -33,15 +33,15 @@ export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchem const moduleName = 'ceph'; return { id: 'cephMetrics', - name: i18n.translate('kbn.server.tutorials.cephMetrics.nameTitle', { + name: i18n.translate('home.tutorials.cephMetrics.nameTitle', { defaultMessage: 'Ceph metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.cephMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.cephMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Ceph server.', }), - longDescription: i18n.translate('kbn.server.tutorials.cephMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.cephMetrics.longDescription', { defaultMessage: 'The `ceph` Metricbeat module fetches internal metrics from Ceph. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchem euiIconType: 'logoCeph', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.cephMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.cephMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts index 49db6882e97ff..303dbd9a9d856 100644 --- a/src/plugins/home/server/tutorials/cisco_logs/index.ts +++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts @@ -34,14 +34,14 @@ export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'ciscoLogs', - name: i18n.translate('kbn.server.tutorials.ciscoLogs.nameTitle', { + name: i18n.translate('home.tutorials.ciscoLogs.nameTitle', { defaultMessage: 'Cisco', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.ciscoLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.ciscoLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from Cisco ASA firewalls.', }), - longDescription: i18n.translate('kbn.server.tutorials.ciscoLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.ciscoLogs.longDescription', { defaultMessage: 'This is a module for Cisco network device’s logs. Currently \ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or read from a file. \ @@ -55,7 +55,7 @@ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or r dashboards: [], application: { path: '/app/siem', - label: i18n.translate('kbn.server.tutorials.ciscoLogs.artifacts.dashboards.linkLabel', { + label: i18n.translate('home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel', { defaultMessage: 'SIEM App', }), }, diff --git a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts index 9ef4af2ecf161..10f0eb3e4f34f 100644 --- a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts +++ b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts @@ -32,14 +32,14 @@ import { export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'cloudwatchLogs', - name: i18n.translate('kbn.server.tutorials.cloudwatchLogs.nameTitle', { + name: i18n.translate('home.tutorials.cloudwatchLogs.nameTitle', { defaultMessage: 'AWS Cloudwatch logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.cloudwatchLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.cloudwatchLogs.shortDescription', { defaultMessage: 'Collect Cloudwatch logs with Functionbeat.', }), - longDescription: i18n.translate('kbn.server.tutorials.cloudwatchLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.cloudwatchLogs.longDescription', { defaultMessage: 'Collect Cloudwatch logs by deploying Functionbeat to run as \ an AWS Lambda function. \ diff --git a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts index 67aa6e95fca8f..a8146e024a37e 100644 --- a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts @@ -33,14 +33,14 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori const moduleName = 'cockroachdb'; return { id: 'cockroachdbMetrics', - name: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.nameTitle', { + name: i18n.translate('home.tutorials.cockroachdbMetrics.nameTitle', { defaultMessage: 'CockroachDB metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.cockroachdbMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CockroachDB server.', }), - longDescription: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.cockroachdbMetrics.longDescription', { defaultMessage: 'The `cockroachdb` Metricbeat module fetches monitoring metrics from CockroachDB. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori { id: 'e3ba0c30-9766-11e9-9eea-6f554992ec1f', linkLabel: i18n.translate( - 'kbn.server.tutorials.cockroachdbMetrics.artifacts.dashboards.linkLabel', + 'home.tutorials.cockroachdbMetrics.artifacts.dashboards.linkLabel', { defaultMessage: 'CockroachDB metrics dashboard', } diff --git a/src/plugins/home/server/tutorials/consul_metrics/index.ts b/src/plugins/home/server/tutorials/consul_metrics/index.ts index ac9592a0c7c94..8b12f38274ee9 100644 --- a/src/plugins/home/server/tutorials/consul_metrics/index.ts +++ b/src/plugins/home/server/tutorials/consul_metrics/index.ts @@ -33,14 +33,14 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'consul'; return { id: 'consulMetrics', - name: i18n.translate('kbn.server.tutorials.consulMetrics.nameTitle', { + name: i18n.translate('home.tutorials.consulMetrics.nameTitle', { defaultMessage: 'Consul metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.consulMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.consulMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the Consul server.', }), - longDescription: i18n.translate('kbn.server.tutorials.consulMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.consulMetrics.longDescription', { defaultMessage: 'The `consul` Metricbeat module fetches monitoring metrics from Consul. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch dashboards: [ { id: '496910f0-b952-11e9-a579-f5c0a5d81340', - linkLabel: i18n.translate( - 'kbn.server.tutorials.consulMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Consul metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.consulMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Consul metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/coredns_logs/index.ts b/src/plugins/home/server/tutorials/coredns_logs/index.ts index 1b8267f05d6ac..e2f976c0f377b 100644 --- a/src/plugins/home/server/tutorials/coredns_logs/index.ts +++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts @@ -34,14 +34,14 @@ export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchem const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'corednsLogs', - name: i18n.translate('kbn.server.tutorials.corednsLogs.nameTitle', { + name: i18n.translate('home.tutorials.corednsLogs.nameTitle', { defaultMessage: 'CoreDNS logs', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.corednsLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.corednsLogs.shortDescription', { defaultMessage: 'Collect the logs created by Coredns.', }), - longDescription: i18n.translate('kbn.server.tutorials.corednsLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.corednsLogs.longDescription', { defaultMessage: 'The `coredns` Filebeat module collects the logs from \ [CoreDNS](https://coredns.io/manual/toc/). \ @@ -55,12 +55,9 @@ export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchem dashboards: [ { id: '53aa1f70-443e-11e9-8548-ab7fbe04f038', - linkLabel: i18n.translate( - 'kbn.server.tutorials.corednsLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'CoreDNS logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.corednsLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'CoreDNS logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/coredns_metrics/index.ts b/src/plugins/home/server/tutorials/coredns_metrics/index.ts index e0e5d6b783163..ad0ce4a58c738 100644 --- a/src/plugins/home/server/tutorials/coredns_metrics/index.ts +++ b/src/plugins/home/server/tutorials/coredns_metrics/index.ts @@ -33,14 +33,14 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'coredns'; return { id: 'corednsMetrics', - name: i18n.translate('kbn.server.tutorials.corednsMetrics.nameTitle', { + name: i18n.translate('home.tutorials.corednsMetrics.nameTitle', { defaultMessage: 'CoreDNS metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.corednsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CoreDNS server.', }), - longDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.corednsMetrics.longDescription', { defaultMessage: 'The `coredns` Metricbeat module fetches monitoring metrics from CoreDNS. \ [Learn more]({learnMoreLink}).', @@ -51,7 +51,7 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc euiIconType: '/plugins/kibana/home/tutorial_resources/logos/coredns.svg', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.corednsMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.corednsMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts index 7e60be2043387..66b70ba2fb456 100644 --- a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts +++ b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts @@ -33,15 +33,15 @@ export function couchbaseMetricsSpecProvider(context: TutorialContext): Tutorial const moduleName = 'couchbase'; return { id: 'couchbaseMetrics', - name: i18n.translate('kbn.server.tutorials.couchbaseMetrics.nameTitle', { + name: i18n.translate('home.tutorials.couchbaseMetrics.nameTitle', { defaultMessage: 'Couchbase metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.couchbaseMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.couchbaseMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Couchbase.', }), - longDescription: i18n.translate('kbn.server.tutorials.couchbaseMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.couchbaseMetrics.longDescription', { defaultMessage: 'The `couchbase` Metricbeat module fetches internal metrics from Couchbase. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function couchbaseMetricsSpecProvider(context: TutorialContext): Tutorial euiIconType: 'logoCouchbase', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.couchbaseMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.couchbaseMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts index 51a3f9f2b1811..e1423e96b1d47 100644 --- a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts @@ -33,14 +33,14 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'couchdb'; return { id: 'couchdbMetrics', - name: i18n.translate('kbn.server.tutorials.couchdbMetrics.nameTitle', { + name: i18n.translate('home.tutorials.couchdbMetrics.nameTitle', { defaultMessage: 'CouchDB metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.couchdbMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.couchdbMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the CouchdB server.', }), - longDescription: i18n.translate('kbn.server.tutorials.couchdbMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.couchdbMetrics.longDescription', { defaultMessage: 'The `couchdb` Metricbeat module fetches monitoring metrics from CouchDB. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc { id: '496910f0-b952-11e9-a579-f5c0a5d81340', linkLabel: i18n.translate( - 'kbn.server.tutorials.couchdbMetrics.artifacts.dashboards.linkLabel', + 'home.tutorials.couchdbMetrics.artifacts.dashboards.linkLabel', { defaultMessage: 'CouchDB metrics dashboard', } diff --git a/src/plugins/home/server/tutorials/docker_metrics/index.ts b/src/plugins/home/server/tutorials/docker_metrics/index.ts index cfedd7d5c775d..4d9d0c9ee68d7 100644 --- a/src/plugins/home/server/tutorials/docker_metrics/index.ts +++ b/src/plugins/home/server/tutorials/docker_metrics/index.ts @@ -33,14 +33,14 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'docker'; return { id: 'dockerMetrics', - name: i18n.translate('kbn.server.tutorials.dockerMetrics.nameTitle', { + name: i18n.translate('home.tutorials.dockerMetrics.nameTitle', { defaultMessage: 'Docker metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.dockerMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.dockerMetrics.shortDescription', { defaultMessage: 'Fetch metrics about your Docker containers.', }), - longDescription: i18n.translate('kbn.server.tutorials.dockerMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.dockerMetrics.longDescription', { defaultMessage: 'The `docker` Metricbeat module fetches metrics from the Docker server. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch dashboards: [ { id: 'AV4REOpp5NkDleZmzKkE-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.dockerMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Docker metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.dockerMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Docker metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts index 6d52074664cb1..164214ffd749c 100644 --- a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts +++ b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts @@ -33,15 +33,15 @@ export function dropwizardMetricsSpecProvider(context: TutorialContext): Tutoria const moduleName = 'dropwizard'; return { id: 'dropwizardMetrics', - name: i18n.translate('kbn.server.tutorials.dropwizardMetrics.nameTitle', { + name: i18n.translate('home.tutorials.dropwizardMetrics.nameTitle', { defaultMessage: 'Dropwizard metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.dropwizardMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.dropwizardMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Dropwizard Java application.', }), - longDescription: i18n.translate('kbn.server.tutorials.dropwizardMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.dropwizardMetrics.longDescription', { defaultMessage: 'The `dropwizard` Metricbeat module fetches internal metrics from Dropwizard Java Application. \ [Learn more]({learnMoreLink}).', @@ -52,12 +52,9 @@ export function dropwizardMetricsSpecProvider(context: TutorialContext): Tutoria euiIconType: 'logoDropwizard', artifacts: { application: { - label: i18n.translate( - 'kbn.server.tutorials.dropwizardMetrics.artifacts.application.label', - { - defaultMessage: 'Discover', - } - ), + label: i18n.translate('home.tutorials.dropwizardMetrics.artifacts.application.label', { + defaultMessage: 'Discover', + }), path: '/app/kibana#/discover', }, dashboards: [], diff --git a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts index 1e9dd84c1f539..4369c805dc7c4 100644 --- a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts +++ b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts @@ -34,15 +34,15 @@ export function elasticsearchLogsSpecProvider(context: TutorialContext): Tutoria const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'elasticsearchLogs', - name: i18n.translate('kbn.server.tutorials.elasticsearchLogs.nameTitle', { + name: i18n.translate('home.tutorials.elasticsearchLogs.nameTitle', { defaultMessage: 'Elasticsearch logs', }), category: TutorialsCategory.LOGGING, isBeta: true, - shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.elasticsearchLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Elasticsearch.', }), - longDescription: i18n.translate('kbn.server.tutorials.elasticsearchLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.elasticsearchLogs.longDescription', { defaultMessage: 'The `elasticsearch` Filebeat module parses logs created by Elasticsearch. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function elasticsearchLogsSpecProvider(context: TutorialContext): Tutoria euiIconType: 'logoElasticsearch', artifacts: { application: { - label: i18n.translate( - 'kbn.server.tutorials.elasticsearchLogs.artifacts.application.label', - { - defaultMessage: 'Discover', - } - ), + label: i18n.translate('home.tutorials.elasticsearchLogs.artifacts.application.label', { + defaultMessage: 'Discover', + }), path: '/app/kibana#/discover', }, dashboards: [], diff --git a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts index 26f61fdc960d5..d9004e72733f9 100644 --- a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts +++ b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts @@ -33,15 +33,15 @@ export function elasticsearchMetricsSpecProvider(context: TutorialContext): Tuto const moduleName = 'elasticsearch'; return { id: 'elasticsearchMetrics', - name: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.nameTitle', { + name: i18n.translate('home.tutorials.elasticsearchMetrics.nameTitle', { defaultMessage: 'Elasticsearch metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.elasticsearchMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Elasticsearch.', }), - longDescription: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.elasticsearchMetrics.longDescription', { defaultMessage: 'The `elasticsearch` Metricbeat module fetches internal metrics from Elasticsearch. \ [Learn more]({learnMoreLink}).', @@ -52,12 +52,9 @@ export function elasticsearchMetricsSpecProvider(context: TutorialContext): Tuto euiIconType: 'logoElasticsearch', artifacts: { application: { - label: i18n.translate( - 'kbn.server.tutorials.elasticsearchMetrics.artifacts.application.label', - { - defaultMessage: 'Discover', - } - ), + label: i18n.translate('home.tutorials.elasticsearchMetrics.artifacts.application.label', { + defaultMessage: 'Discover', + }), path: '/app/kibana#/discover', }, dashboards: [], diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts index b7cdcb105eb76..ac2db66dff6b6 100644 --- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts +++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts @@ -34,14 +34,14 @@ export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSc const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'envoyproxyLogs', - name: i18n.translate('kbn.server.tutorials.envoyproxyLogs.nameTitle', { + name: i18n.translate('home.tutorials.envoyproxyLogs.nameTitle', { defaultMessage: 'Envoyproxy', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.envoyproxyLogs.shortDescription', { defaultMessage: 'Collect and parse logs received from the Envoy proxy.', }), - longDescription: i18n.translate('kbn.server.tutorials.envoyproxyLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.envoyproxyLogs.longDescription', { defaultMessage: 'This is a filebeat module for [Envoy proxy access log](https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/access_log). \ It supports both standalone deployment and Envoy proxy deployment in Kubernetes. \ @@ -55,12 +55,9 @@ It supports both standalone deployment and Envoy proxy deployment in Kubernetes. dashboards: [], application: { path: '/app/siem', - label: i18n.translate( - 'kbn.server.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'SIEM App', - } - ), + label: i18n.translate('home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'SIEM App', + }), }, exportedFields: { documentationUrl: '{config.docs.beats.filebeat}/exported-fields-envoyproxy.html', diff --git a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts index 491def597be33..d405e77918546 100644 --- a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts +++ b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts @@ -33,14 +33,14 @@ export function envoyproxyMetricsSpecProvider(context: TutorialContext): Tutoria const moduleName = 'envoyproxy'; return { id: 'envoyproxyMetrics', - name: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.nameTitle', { + name: i18n.translate('home.tutorials.envoyproxyMetrics.nameTitle', { defaultMessage: 'Envoy Proxy metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.envoyproxyMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.', }), - longDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.envoyproxyMetrics.longDescription', { defaultMessage: 'The `envoyproxy` Metricbeat module fetches monitoring metrics from Envoy Proxy. \ [Learn more]({learnMoreLink}).', diff --git a/src/plugins/home/server/tutorials/etcd_metrics/index.ts b/src/plugins/home/server/tutorials/etcd_metrics/index.ts index 53afc8ed8663e..919700356d98a 100644 --- a/src/plugins/home/server/tutorials/etcd_metrics/index.ts +++ b/src/plugins/home/server/tutorials/etcd_metrics/index.ts @@ -33,15 +33,15 @@ export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchem const moduleName = 'etcd'; return { id: 'etcdMetrics', - name: i18n.translate('kbn.server.tutorials.etcdMetrics.nameTitle', { + name: i18n.translate('home.tutorials.etcdMetrics.nameTitle', { defaultMessage: 'Etcd metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.etcdMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.etcdMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Etcd server.', }), - longDescription: i18n.translate('kbn.server.tutorials.etcdMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.etcdMetrics.longDescription', { defaultMessage: 'The `etcd` Metricbeat module fetches internal metrics from Etcd. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchem euiIconType: 'logoEtcd', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.etcdMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.etcdMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/golang_metrics/index.ts b/src/plugins/home/server/tutorials/golang_metrics/index.ts index 98e136d6f7630..c53f8b2bba281 100644 --- a/src/plugins/home/server/tutorials/golang_metrics/index.ts +++ b/src/plugins/home/server/tutorials/golang_metrics/index.ts @@ -33,15 +33,15 @@ export function golangMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'golang'; return { id: moduleName + 'Metrics', - name: i18n.translate('kbn.server.tutorials.golangMetrics.nameTitle', { + name: i18n.translate('home.tutorials.golangMetrics.nameTitle', { defaultMessage: 'Golang metrics', }), isBeta: true, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.golangMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.golangMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Golang app.', }), - longDescription: i18n.translate('kbn.server.tutorials.golangMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.golangMetrics.longDescription', { defaultMessage: 'The `{moduleName}` Metricbeat module fetches internal metrics from a Golang app. \ [Learn more]({learnMoreLink}).', @@ -55,12 +55,9 @@ export function golangMetricsSpecProvider(context: TutorialContext): TutorialSch dashboards: [ { id: 'f2dc7320-f519-11e6-a3c9-9d1f7c42b045-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.golangMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Golang metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.golangMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Golang metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts index 858c6c8ce575d..8e1c0a0da8b18 100644 --- a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts +++ b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts @@ -33,15 +33,15 @@ export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'haproxy'; return { id: 'haproxyMetrics', - name: i18n.translate('kbn.server.tutorials.haproxyMetrics.nameTitle', { + name: i18n.translate('home.tutorials.haproxyMetrics.nameTitle', { defaultMessage: 'HAProxy metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.haproxyMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.haproxyMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the HAProxy server.', }), - longDescription: i18n.translate('kbn.server.tutorials.haproxyMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.haproxyMetrics.longDescription', { defaultMessage: 'The `haproxy` Metricbeat module fetches internal metrics from HAProxy. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSc euiIconType: 'logoHAproxy', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.haproxyMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.haproxyMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts index 1228c7c56cd42..9922cb0e6341e 100644 --- a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts +++ b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts @@ -34,14 +34,14 @@ export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'ibmmqLogs', - name: i18n.translate('kbn.server.tutorials.ibmmqLogs.nameTitle', { + name: i18n.translate('home.tutorials.ibmmqLogs.nameTitle', { defaultMessage: 'IBM MQ logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.ibmmqLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.ibmmqLogs.shortDescription', { defaultMessage: 'Collect IBM MQ logs with Filebeat.', }), - longDescription: i18n.translate('kbn.server.tutorials.ibmmqLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.ibmmqLogs.longDescription', { defaultMessage: 'Collect IBM MQ logs with Filebeat. \ [Learn more]({learnMoreLink}).', values: { @@ -53,12 +53,9 @@ export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: 'ba1d8830-7c7b-11e9-9645-e37efaf5baff', - linkLabel: i18n.translate( - 'kbn.server.tutorials.ibmmqLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'IBM MQ Events', - } - ), + linkLabel: i18n.translate('home.tutorials.ibmmqLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'IBM MQ Events', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/iis_logs/index.ts b/src/plugins/home/server/tutorials/iis_logs/index.ts index 83c8cd3f6ff89..ff9996c1b0187 100644 --- a/src/plugins/home/server/tutorials/iis_logs/index.ts +++ b/src/plugins/home/server/tutorials/iis_logs/index.ts @@ -34,14 +34,14 @@ export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema { const platforms = ['WINDOWS'] as const; return { id: 'iisLogs', - name: i18n.translate('kbn.server.tutorials.iisLogs.nameTitle', { + name: i18n.translate('home.tutorials.iisLogs.nameTitle', { defaultMessage: 'IIS logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.iisLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.iisLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the IIS HTTP server.', }), - longDescription: i18n.translate('kbn.server.tutorials.iisLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.iisLogs.longDescription', { defaultMessage: 'The `iis` Filebeat module parses access and error logs created by the IIS HTTP server. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema { dashboards: [ { id: '4278ad30-fe16-11e7-a3b0-d13028918f9f-ecs', - linkLabel: i18n.translate('kbn.server.tutorials.iisLogs.artifacts.dashboards.linkLabel', { + linkLabel: i18n.translate('home.tutorials.iisLogs.artifacts.dashboards.linkLabel', { defaultMessage: 'IIS logs dashboard', }), isOverview: true, diff --git a/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts index 8376b22b371e2..6a9dba69b193f 100644 --- a/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/auditbeat_instructions.ts @@ -26,10 +26,10 @@ import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorial export const createAuditbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.osxTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.osxTitle', { defaultMessage: 'Download and install Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.osxTextPre', { defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html', @@ -42,10 +42,10 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ ], }, DEB: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTitle', { defaultMessage: 'Download and install Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTextPre', { defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html', @@ -55,7 +55,7 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{config.kibana.version}-amd64.deb', 'sudo dpkg -i auditbeat-{config.kibana.version}-amd64.deb', ], - textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).', values: { linkUrl: 'https://www.elastic.co/downloads/beats/auditbeat', @@ -63,10 +63,10 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTitle', { defaultMessage: 'Download and install Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTextPre', { defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html', @@ -76,7 +76,7 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{config.kibana.version}-x86_64.rpm', 'sudo rpm -vi auditbeat-{config.kibana.version}-x86_64.rpm', ], - textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).', values: { linkUrl: 'https://www.elastic.co/downloads/beats/auditbeat', @@ -84,28 +84,31 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.windowsTextPre', { - defaultMessage: - 'First time using Auditbeat? See the [Getting Started Guide]({guideLinkUrl}).\n\ + textPre: i18n.translate( + 'home.tutorials.common.auditbeatInstructions.install.windowsTextPre', + { + defaultMessage: + 'First time using Auditbeat? See the [Getting Started Guide]({guideLinkUrl}).\n\ 1. Download the Auditbeat Windows zip file from the [Download]({auditbeatLinkUrl}) page.\n\ 2. Extract the contents of the zip file into {folderPath}.\n\ 3. Rename the `{directoryName}` directory to `Auditbeat`.\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 might need to download and install PowerShell.\n\ 5. From the PowerShell prompt, run the following commands to install Auditbeat as a Windows service.', - values: { - folderPath: '`C:\\Program Files`', - guideLinkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html', - auditbeatLinkUrl: 'https://www.elastic.co/downloads/beats/auditbeat', - directoryName: 'auditbeat-{config.kibana.version}-windows', - }, - }), + values: { + folderPath: '`C:\\Program Files`', + guideLinkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html', + auditbeatLinkUrl: 'https://www.elastic.co/downloads/beats/auditbeat', + directoryName: 'auditbeat-{config.kibana.version}-windows', + }, + } + ), commands: ['cd "C:\\Program Files\\Auditbeat"', '.\\install-service-auditbeat.ps1'], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatInstructions.install.windowsTextPost', + 'home.tutorials.common.auditbeatInstructions.install.windowsTextPost', { defaultMessage: 'Modify the settings under {propertyName} in the {auditbeatPath} file to point to your Elasticsearch installation.', @@ -119,40 +122,40 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ }, START: { OSX: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.osxTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.osxTitle', { defaultMessage: 'Start Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.osxTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['./auditbeat setup', './auditbeat -e'], }, DEB: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.debTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.debTitle', { defaultMessage: 'Start Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.debTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.debTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['sudo auditbeat setup', 'sudo service auditbeat start'], }, RPM: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.rpmTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.rpmTitle', { defaultMessage: 'Start Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.rpmTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['sudo auditbeat setup', 'sudo service auditbeat start'], }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.windowsTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.windowsTitle', { defaultMessage: 'Start Auditbeat', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.windowsTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), @@ -161,10 +164,10 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ }, CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`auditbeat.yml`', @@ -179,7 +182,7 @@ export const createAuditbeatInstructions = (context?: TutorialContext) => ({ ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -191,10 +194,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/auditbeat/auditbeat.yml`', @@ -209,7 +212,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTextPost', { + textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -221,10 +224,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/auditbeat/auditbeat.yml`', @@ -239,7 +242,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -251,10 +254,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`C:\\Program Files\\Auditbeat\\auditbeat.yml`', @@ -270,7 +273,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', getSpaceIdForBeatsTutorial(context), ], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatInstructions.config.windowsTextPost', + 'home.tutorials.common.auditbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -289,18 +292,21 @@ and {kibanaUrlTemplate} is the URL of Kibana.', export const createAuditbeatCloudInstructions = () => ({ CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.osxTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`auditbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`auditbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatCloudInstructions.config.osxTextPost', + 'home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -308,18 +314,21 @@ export const createAuditbeatCloudInstructions = () => ({ ), }, DEB: { - title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.debTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`/etc/auditbeat/auditbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.auditbeatCloudInstructions.config.debTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`/etc/auditbeat/auditbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatCloudInstructions.config.debTextPost', + 'home.tutorials.common.auditbeatCloudInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -327,18 +336,21 @@ export const createAuditbeatCloudInstructions = () => ({ ), }, RPM: { - title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`/etc/auditbeat/auditbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`/etc/auditbeat/auditbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTextPost', + 'home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -346,11 +358,14 @@ export const createAuditbeatCloudInstructions = () => ({ ), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTitle', { - defaultMessage: 'Edit the configuration', - }), + title: i18n.translate( + 'home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle', + { + defaultMessage: 'Edit the configuration', + } + ), textPre: i18n.translate( - 'kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -360,7 +375,7 @@ export const createAuditbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -372,19 +387,19 @@ export const createAuditbeatCloudInstructions = () => ({ export function auditbeatStatusCheck() { return { - title: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.auditbeatStatusCheck.title', { defaultMessage: 'Status', }), - text: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.auditbeatStatusCheck.text', { defaultMessage: 'Check that data is received from Auditbeat', }), - btnLabel: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.auditbeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.auditbeatStatusCheck.successText', { defaultMessage: 'Data successfully received', }), - error: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.auditbeatStatusCheck.errorText', { defaultMessage: 'No data has been received yet', }), esHitsCheck: { @@ -421,7 +436,7 @@ export function onPremInstructions(platforms: readonly Platform[], context?: Tut instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.auditbeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.auditbeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -457,7 +472,7 @@ export function onPremCloudInstructions(platforms: readonly Platform[]) { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.auditbeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -490,7 +505,7 @@ export function cloudInstructions(platforms: readonly Platform[]) { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.auditbeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts index 24ba3496d2611..176a3901821f1 100644 --- a/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/filebeat_instructions.ts @@ -26,10 +26,10 @@ import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorial export const createFilebeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.install.osxTitle', { defaultMessage: 'Download and install Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.osxTextPre', { defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html', @@ -42,10 +42,10 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ ], }, DEB: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTitle', { defaultMessage: 'Download and install Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTextPre', { defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html', @@ -55,7 +55,7 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ '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: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).', values: { linkUrl: 'https://www.elastic.co/downloads/beats/filebeat', @@ -63,10 +63,10 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTitle', { defaultMessage: 'Download and install Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTextPre', { defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).', values: { linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html', @@ -76,7 +76,7 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ '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: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).', values: { linkUrl: 'https://www.elastic.co/downloads/beats/filebeat', @@ -84,10 +84,10 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.windowsTextPre', { defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({guideLinkUrl}).\n\ 1. Download the Filebeat Windows zip file from the [Download]({filebeatLinkUrl}) page.\n\ @@ -105,7 +105,7 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ }), commands: ['cd "C:\\Program Files\\Filebeat"', '.\\install-service-filebeat.ps1'], textPost: i18n.translate( - 'kbn.common.tutorials.filebeatInstructions.install.windowsTextPost', + 'home.tutorials.common.filebeatInstructions.install.windowsTextPost', { defaultMessage: 'Modify the settings under {propertyName} in the {filebeatPath} file to point to your Elasticsearch installation.', @@ -119,40 +119,40 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ }, START: { OSX: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.osxTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.start.osxTitle', { defaultMessage: 'Start Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.osxTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['./filebeat setup', './filebeat -e'], }, DEB: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.debTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.start.debTitle', { defaultMessage: 'Start Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.debTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.debTextPre', { defaultMessage: '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: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.rpmTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.start.rpmTitle', { defaultMessage: 'Start Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.rpmTextPre', { defaultMessage: '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: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.windowsTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.start.windowsTitle', { defaultMessage: 'Start Filebeat', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.windowsTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), @@ -161,10 +161,10 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ }, CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`filebeat.yml`', @@ -179,7 +179,7 @@ export const createFilebeatInstructions = (context?: TutorialContext) => ({ ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -191,10 +191,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/filebeat/filebeat.yml`', @@ -209,7 +209,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -221,10 +221,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/filebeat/filebeat.yml`', @@ -239,7 +239,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -251,10 +251,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.filebeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`C:\\Program Files\\Filebeat\\filebeat.yml`', @@ -269,16 +269,19 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTextPost', { - defaultMessage: - 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ + textPost: i18n.translate( + 'home.tutorials.common.filebeatInstructions.config.windowsTextPost', + { + defaultMessage: + 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', - values: { - passwordTemplate: '``', - esUrlTemplate: '``', - kibanaUrlTemplate: '``', - }, - }), + values: { + passwordTemplate: '``', + esUrlTemplate: '``', + kibanaUrlTemplate: '``', + }, + } + ), }, }, }); @@ -286,10 +289,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', export const createFilebeatCloudInstructions = () => ({ CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { path: '`filebeat.yml`', @@ -297,7 +300,7 @@ export const createFilebeatCloudInstructions = () => ({ }), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.filebeatCloudInstructions.config.osxTextPost', + 'home.tutorials.common.filebeatCloudInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -305,10 +308,10 @@ export const createFilebeatCloudInstructions = () => ({ ), }, DEB: { - title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.debTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { path: '`/etc/filebeat/filebeat.yml`', @@ -316,7 +319,7 @@ export const createFilebeatCloudInstructions = () => ({ }), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.filebeatCloudInstructions.config.debTextPost', + 'home.tutorials.common.filebeatCloudInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -324,10 +327,10 @@ export const createFilebeatCloudInstructions = () => ({ ), }, RPM: { - title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { path: '`/etc/filebeat/filebeat.yml`', @@ -335,7 +338,7 @@ export const createFilebeatCloudInstructions = () => ({ }), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.filebeatCloudInstructions.config.rpmTextPost', + 'home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -343,11 +346,11 @@ export const createFilebeatCloudInstructions = () => ({ ), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.filebeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -357,7 +360,7 @@ export const createFilebeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.filebeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -370,54 +373,54 @@ export const createFilebeatCloudInstructions = () => ({ export function filebeatEnableInstructions(moduleName: string) { return { OSX: { - title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTitle', { + title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), - textPre: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTextPre', { defaultMessage: 'From the installation directory, run:', }), commands: ['./filebeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTextPost', { defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.debTitle', { + title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.debTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), commands: ['sudo filebeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.debTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.debTextPost', { defaultMessage: 'Modify the settings in the `/etc/filebeat/modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.rpmTitle', { + title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.rpmTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), commands: ['sudo filebeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.rpmTextPost', { defaultMessage: 'Modify the settings in the `/etc/filebeat/modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTitle', { + title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), - textPre: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTextPre', { defaultMessage: 'From the {path} folder, run:', values: { path: `C:\\Program Files\\Filebeat` }, }), commands: ['filebeat.exe modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTextPost', { + textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTextPost', { defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.', values: { moduleName }, }), @@ -427,20 +430,20 @@ export function filebeatEnableInstructions(moduleName: string) { export function filebeatStatusCheck(moduleName: string) { return { - title: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.filebeatStatusCheck.title', { defaultMessage: 'Module status', }), - text: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.filebeatStatusCheck.text', { defaultMessage: 'Check that data is received from the Filebeat `{moduleName}` module', values: { moduleName }, }), - btnLabel: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.filebeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.filebeatStatusCheck.successText', { defaultMessage: 'Data successfully received from this module', }), - error: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.filebeatStatusCheck.errorText', { defaultMessage: 'No data has been received from this module yet', }), esHitsCheck: { @@ -482,7 +485,7 @@ export function onPremInstructions( instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.filebeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.filebeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -519,7 +522,7 @@ export function onPremCloudInstructions(moduleName: string, platforms: readonly instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.filebeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -553,7 +556,7 @@ export function cloudInstructions(moduleName: string, platforms: readonly Platfo instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.filebeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts index f8acf54ceafd9..385880ba9780f 100644 --- a/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/functionbeat_instructions.ts @@ -26,10 +26,10 @@ import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorial export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.osxTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.osxTitle', { defaultMessage: 'Download and install Functionbeat', }), - textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.install.osxTextPre', { defaultMessage: 'First time using Functionbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.functionbeat}/functionbeat-getting-started.html' }, }), @@ -40,11 +40,11 @@ export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ ], }, LINUX: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.linuxTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.linuxTitle', { defaultMessage: 'Download and install Functionbeat', }), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatInstructions.install.linuxTextPre', + 'home.tutorials.common.functionbeatInstructions.install.linuxTextPre', { defaultMessage: 'First time using Functionbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.functionbeat}/functionbeat-getting-started.html' }, @@ -57,11 +57,11 @@ export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ ], }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Functionbeat', }), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatInstructions.install.windowsTextPre', + 'home.tutorials.common.functionbeatInstructions.install.windowsTextPre', { defaultMessage: 'First time using Functionbeat? See the [Getting Started Guide]({functionbeatLink}).\n\ @@ -84,10 +84,10 @@ export const createFunctionbeatInstructions = (context?: TutorialContext) => ({ }, DEPLOY: { OSX_LINUX: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.osxTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.osxTitle', { defaultMessage: 'Deploy Functionbeat to AWS Lambda', }), - textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.osxTextPre', { defaultMessage: 'This installs Functionbeat as a Lambda function.\ The `setup` command checks the Elasticsearch configuration and loads the \ @@ -96,11 +96,11 @@ Kibana index pattern. It is normally safe to omit this command.', commands: ['./functionbeat setup', './functionbeat deploy fn-cloudwatch-logs'], }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.windowsTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.windowsTitle', { defaultMessage: 'Deploy Functionbeat to AWS Lambda', }), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatInstructions.deploy.windowsTextPre', + 'home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre', { defaultMessage: 'This installs Functionbeat as a Lambda function.\ @@ -113,10 +113,10 @@ Kibana index pattern. It is normally safe to omit this command.', }, CONFIG: { OSX_LINUX: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.config.osxTitle', { defaultMessage: 'Configure the Elastic cluster', }), - textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`functionbeat.yml`', @@ -131,23 +131,26 @@ Kibana index pattern. It is normally safe to omit this command.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTextPost', { - defaultMessage: - 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ + textPost: i18n.translate( + 'home.tutorials.common.functionbeatInstructions.config.osxTextPost', + { + defaultMessage: + 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', - values: { - passwordTemplate: '``', - esUrlTemplate: '``', - kibanaUrlTemplate: '``', - }, - }), + values: { + passwordTemplate: '``', + esUrlTemplate: '``', + kibanaUrlTemplate: '``', + }, + } + ), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.functionbeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatInstructions.config.windowsTextPre', + 'home.tutorials.common.functionbeatInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { @@ -165,7 +168,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', getSpaceIdForBeatsTutorial(context), ], textPost: i18n.translate( - 'kbn.common.tutorials.functionbeatInstructions.config.windowsTextPost', + 'home.tutorials.common.functionbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -184,11 +187,11 @@ and {kibanaUrlTemplate} is the URL of Kibana.', export const createFunctionbeatCloudInstructions = () => ({ CONFIG: { OSX_LINUX: { - title: i18n.translate('kbn.common.tutorials.functionbeatCloudInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.functionbeatCloudInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatCloudInstructions.config.osxTextPre', + 'home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -198,7 +201,7 @@ export const createFunctionbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.functionbeatCloudInstructions.config.osxTextPost', + 'home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -207,13 +210,13 @@ export const createFunctionbeatCloudInstructions = () => ({ }, WINDOWS: { title: i18n.translate( - 'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTitle', + 'home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -223,7 +226,7 @@ export const createFunctionbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -235,7 +238,7 @@ export const createFunctionbeatCloudInstructions = () => ({ export function functionbeatEnableInstructions() { const defaultTitle = i18n.translate( - 'kbn.common.tutorials.functionbeatEnableOnPremInstructions.defaultTitle', + 'home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle', { defaultMessage: 'Configure the Cloudwatch log group', } @@ -250,7 +253,7 @@ export function functionbeatEnableInstructions() { 'functionbeat.provider.aws.deploy_bucket: ', ]; const defaultTextPost = i18n.translate( - 'kbn.common.tutorials.functionbeatEnableOnPremInstructions.defaultTextPost', + 'home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost', { defaultMessage: 'Where `` is the name of the log group you want to ingest, \ @@ -262,7 +265,7 @@ Functionbeat deploy.', OSX_LINUX: { title: defaultTitle, textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatEnableOnPremInstructionsOSXLinux.textPre', + 'home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre', { defaultMessage: 'Modify the settings in the `functionbeat.yml` file.', } @@ -273,7 +276,7 @@ Functionbeat deploy.', WINDOWS: { title: defaultTitle, textPre: i18n.translate( - 'kbn.common.tutorials.functionbeatEnableOnPremInstructionsWindows.textPre', + 'home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre', { defaultMessage: 'Modify the settings in the {path} file.', values: { @@ -288,13 +291,13 @@ Functionbeat deploy.', } export function functionbeatAWSInstructions() { - const defaultTitle = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.title', { + const defaultTitle = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.title', { defaultMessage: 'Set AWS credentials', }); - const defaultPre = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.textPre', { + const defaultPre = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.textPre', { defaultMessage: 'Set your AWS account credentials in the environment:', }); - const defaultPost = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.textPost', { + const defaultPost = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.textPost', { defaultMessage: 'Where `` and `` are your account credentials and \ `us-east-1` is the desired region.', @@ -326,19 +329,19 @@ export function functionbeatAWSInstructions() { export function functionbeatStatusCheck() { return { - title: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.functionbeatStatusCheck.title', { defaultMessage: 'Functionbeat status', }), - text: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.functionbeatStatusCheck.text', { defaultMessage: 'Check that data is received from Functionbeat', }), - btnLabel: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.functionbeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.functionbeatStatusCheck.successText', { defaultMessage: 'Data successfully received from Functionbeat', }), - error: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.functionbeatStatusCheck.errorText', { defaultMessage: 'No data has been received from Functionbeat yet', }), esHitsCheck: { @@ -357,7 +360,7 @@ export function onPremInstructions(platforms: Platform[], context?: TutorialCont instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.functionbeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.functionbeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -409,7 +412,7 @@ export function onPremCloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.functionbeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -466,7 +469,7 @@ export function cloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.functionbeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts index 4221518773f6c..406bf55da4321 100644 --- a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts @@ -26,10 +26,10 @@ import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorial export const createHeartbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.osxTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.osxTitle', { defaultMessage: 'Download and install Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.osxTextPre', { defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' }, }), @@ -40,10 +40,10 @@ export const createHeartbeatInstructions = (context?: TutorialContext) => ({ ], }, DEB: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTitle', { defaultMessage: 'Download and install Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPre', { defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' }, }), @@ -51,16 +51,16 @@ export const createHeartbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-{config.kibana.version}-amd64.deb', 'sudo dpkg -i heartbeat-{config.kibana.version}-amd64.deb', ], - textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).', values: { link: 'https://www.elastic.co/downloads/beats/heartbeat' }, }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.rpmTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.rpmTitle', { defaultMessage: 'Download and install Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.rpmTextPre', { defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' }, }), @@ -68,67 +68,70 @@ export const createHeartbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-{config.kibana.version}-x86_64.rpm', 'sudo rpm -vi heartbeat-{config.kibana.version}-x86_64.rpm', ], - textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).', values: { link: 'https://www.elastic.co/downloads/beats/heartbeat' }, }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.windowsTextPre', { - defaultMessage: - 'First time using Heartbeat? See the [Getting Started Guide]({heartbeatLink}).\n\ + textPre: i18n.translate( + 'home.tutorials.common.heartbeatInstructions.install.windowsTextPre', + { + defaultMessage: + 'First time using Heartbeat? See the [Getting Started Guide]({heartbeatLink}).\n\ 1. Download the Heartbeat Windows zip file from the [Download]({elasticLink}) page.\n\ 2. Extract the contents of the zip file into {folderPath}.\n\ 3. Rename the {directoryName} directory to `Heartbeat`.\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 might need to download and install PowerShell.\n\ 5. From the PowerShell prompt, run the following commands to install Heartbeat as a Windows service.', - values: { - directoryName: '`heartbeat-{config.kibana.version}-windows`', - folderPath: '`C:\\Program Files`', - heartbeatLink: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html', - elasticLink: 'https://www.elastic.co/downloads/beats/heartbeat', - }, - }), + values: { + directoryName: '`heartbeat-{config.kibana.version}-windows`', + folderPath: '`C:\\Program Files`', + heartbeatLink: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html', + elasticLink: 'https://www.elastic.co/downloads/beats/heartbeat', + }, + } + ), commands: ['cd "C:\\Program Files\\Heartbeat"', '.\\install-service-heartbeat.ps1'], }, }, START: { OSX: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.osxTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.osxTitle', { defaultMessage: 'Start Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.osxTextPre', { defaultMessage: 'The `setup` command loads the Kibana index pattern.', }), commands: ['./heartbeat setup', './heartbeat -e'], }, DEB: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.debTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.debTitle', { defaultMessage: 'Start Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.debTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.debTextPre', { defaultMessage: 'The `setup` command loads the Kibana index pattern.', }), commands: ['sudo heartbeat setup', 'sudo service heartbeat-elastic start'], }, RPM: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.rpmTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.rpmTitle', { defaultMessage: 'Start Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.rpmTextPre', { defaultMessage: 'The `setup` command loads the Kibana index pattern.', }), commands: ['sudo heartbeat setup', 'sudo service heartbeat-elastic start'], }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.windowsTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.windowsTitle', { defaultMessage: 'Start Heartbeat', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.windowsTextPre', { defaultMessage: 'The `setup` command loads the Kibana index pattern.', }), commands: ['.\\heartbeat.exe setup', 'Start-Service heartbeat'], @@ -136,10 +139,10 @@ export const createHeartbeatInstructions = (context?: TutorialContext) => ({ }, CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`heartbeat.yml`', @@ -154,7 +157,7 @@ export const createHeartbeatInstructions = (context?: TutorialContext) => ({ ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -166,10 +169,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/heartbeat/heartbeat.yml`', @@ -184,7 +187,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTextPost', { + textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -196,10 +199,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/heartbeat/heartbeat.yml`', @@ -214,7 +217,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -226,10 +229,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`C:\\Program Files\\Heartbeat\\heartbeat.yml`', @@ -245,7 +248,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', getSpaceIdForBeatsTutorial(context), ], textPost: i18n.translate( - 'kbn.common.tutorials.heartbeatInstructions.config.windowsTextPost', + 'home.tutorials.common.heartbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -264,18 +267,21 @@ and {kibanaUrlTemplate} is the URL of Kibana.', export const createHeartbeatCloudInstructions = () => ({ CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.osxTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`heartbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`heartbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.heartbeatCloudInstructions.config.osxTextPost', + 'home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -283,18 +289,21 @@ export const createHeartbeatCloudInstructions = () => ({ ), }, DEB: { - title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.debTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`/etc/heartbeat/heartbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatCloudInstructions.config.debTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`/etc/heartbeat/heartbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.heartbeatCloudInstructions.config.debTextPost', + 'home.tutorials.common.heartbeatCloudInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -302,18 +311,21 @@ export const createHeartbeatCloudInstructions = () => ({ ), }, RPM: { - title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTextPre', { - defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', - values: { - path: '`/etc/heartbeat/heartbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre', + { + defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', + values: { + path: '`/etc/heartbeat/heartbeat.yml`', + }, + } + ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTextPost', + 'home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -321,11 +333,14 @@ export const createHeartbeatCloudInstructions = () => ({ ), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTitle', { - defaultMessage: 'Edit the configuration', - }), + title: i18n.translate( + 'home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle', + { + defaultMessage: 'Edit the configuration', + } + ), textPre: i18n.translate( - 'kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -335,7 +350,7 @@ export const createHeartbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -347,7 +362,7 @@ export const createHeartbeatCloudInstructions = () => ({ export function heartbeatEnableInstructionsOnPrem() { const defaultTitle = i18n.translate( - 'kbn.common.tutorials.heartbeatEnableOnPremInstructions.defaultTitle', + 'home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle', { defaultMessage: 'Edit the configuration - Add monitors', } @@ -359,7 +374,7 @@ export function heartbeatEnableInstructionsOnPrem() { ' schedule: "@every 10s"', ]; const defaultTextPost = i18n.translate( - 'kbn.common.tutorials.heartbeatEnableOnPremInstructions.defaultTextPost', + 'home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost', { defaultMessage: 'Where {hostTemplate} is your monitored URL, For more details on how to configure Monitors in \ @@ -373,32 +388,41 @@ export function heartbeatEnableInstructionsOnPrem() { return { OSX: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.osxTextPre', { - defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre', + { + defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', + } + ), commands: defaultCommands, textPost: defaultTextPost, }, DEB: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.debTextPre', { - defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre', + { + defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', + } + ), commands: defaultCommands, textPost: defaultTextPost, }, RPM: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.rpmTextPre', { - defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', - }), + textPre: i18n.translate( + 'home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre', + { + defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', + } + ), commands: defaultCommands, textPost: defaultTextPost, }, WINDOWS: { title: defaultTitle, textPre: i18n.translate( - 'kbn.common.tutorials.heartbeatEnableOnPremInstructions.windowsTextPre', + 'home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre', { defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', } @@ -411,7 +435,7 @@ export function heartbeatEnableInstructionsOnPrem() { export function heartbeatEnableInstructionsCloud() { const defaultTitle = i18n.translate( - 'kbn.common.tutorials.heartbeatEnableCloudInstructions.defaultTitle', + 'home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle', { defaultMessage: 'Edit the configuration - Add monitors', } @@ -423,7 +447,7 @@ export function heartbeatEnableInstructionsCloud() { ' schedule: "@every 10s"', ]; const defaultTextPost = i18n.translate( - 'kbn.common.tutorials.heartbeatEnableCloudInstructions.defaultTextPost', + 'home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost', { defaultMessage: 'For more details on how to configure Monitors in Heartbeat, read the [Heartbeat configuration docs.]({configureLink})', @@ -433,7 +457,7 @@ export function heartbeatEnableInstructionsCloud() { return { OSX: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre', { defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', }), commands: defaultCommands, @@ -441,7 +465,7 @@ export function heartbeatEnableInstructionsCloud() { }, DEB: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.debTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre', { defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', }), commands: defaultCommands, @@ -449,7 +473,7 @@ export function heartbeatEnableInstructionsCloud() { }, RPM: { title: defaultTitle, - textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre', { defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', }), commands: defaultCommands, @@ -458,7 +482,7 @@ export function heartbeatEnableInstructionsCloud() { WINDOWS: { title: defaultTitle, textPre: i18n.translate( - 'kbn.common.tutorials.heartbeatEnableCloudInstructions.windowsTextPre', + 'home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre', { defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.', } @@ -471,19 +495,19 @@ export function heartbeatEnableInstructionsCloud() { export function heartbeatStatusCheck() { return { - title: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.heartbeatStatusCheck.title', { defaultMessage: 'Heartbeat status', }), - text: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.heartbeatStatusCheck.text', { defaultMessage: 'Check that data is received from Heartbeat', }), - btnLabel: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.heartbeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.heartbeatStatusCheck.successText', { defaultMessage: 'Data successfully received from Heartbeat', }), - error: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.heartbeatStatusCheck.errorText', { defaultMessage: 'No data has been received from Heartbeat yet', }), esHitsCheck: { @@ -502,7 +526,7 @@ export function onPremInstructions(platforms: Platform[], context?: TutorialCont instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.heartbeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.heartbeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -560,7 +584,7 @@ export function onPremCloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.heartbeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -625,7 +649,7 @@ export function cloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.heartbeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/instructions/logstash_instructions.ts b/src/plugins/home/server/tutorials/instructions/logstash_instructions.ts index 9e25402abe183..3e5345565a753 100644 --- a/src/plugins/home/server/tutorials/instructions/logstash_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/logstash_instructions.ts @@ -23,11 +23,11 @@ export const createLogstashInstructions = () => ({ INSTALL: { OSX: [ { - title: i18n.translate('kbn.common.tutorials.logstashInstructions.install.java.osxTitle', { + title: i18n.translate('home.tutorials.common.logstashInstructions.install.java.osxTitle', { defaultMessage: 'Download and install the Java Runtime Environment', }), textPre: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.java.osxTextPre', + 'home.tutorials.common.logstashInstructions.install.java.osxTextPre', { defaultMessage: 'Follow the installation instructions [here]({link}).', values: { @@ -38,13 +38,13 @@ export const createLogstashInstructions = () => ({ }, { title: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.logstash.osxTitle', + 'home.tutorials.common.logstashInstructions.install.logstash.osxTitle', { defaultMessage: 'Download and install Logstash', } ), textPre: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.logstash.osxTextPre', + 'home.tutorials.common.logstashInstructions.install.logstash.osxTextPre', { defaultMessage: 'First time using Logstash? See the [Getting Started Guide]({link}).', values: { @@ -62,13 +62,13 @@ export const createLogstashInstructions = () => ({ WINDOWS: [ { title: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.java.windowsTitle', + 'home.tutorials.common.logstashInstructions.install.java.windowsTitle', { defaultMessage: 'Download and install the Java Runtime Environment', } ), textPre: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.java.windowsTextPre', + 'home.tutorials.common.logstashInstructions.install.java.windowsTextPre', { defaultMessage: 'Follow the installation instructions [here]({link}).', values: { @@ -80,13 +80,13 @@ export const createLogstashInstructions = () => ({ }, { title: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.logstash.windowsTitle', + 'home.tutorials.common.logstashInstructions.install.logstash.windowsTitle', { defaultMessage: 'Download and install Logstash', } ), textPre: i18n.translate( - 'kbn.common.tutorials.logstashInstructions.install.logstash.windowsTextPre', + 'home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre', { defaultMessage: 'First time using Logstash? See the [Getting Started Guide]({logstashLink}).\n\ diff --git a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts index 24f449cd07574..77efe0958a615 100644 --- a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts @@ -26,10 +26,10 @@ import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry export const createMetricbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { OSX: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.osxTitle', { defaultMessage: 'Download and install Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.osxTextPre', { defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' }, }), @@ -40,10 +40,10 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ ], }, DEB: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTitle', { defaultMessage: 'Download and install Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPre', { defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' }, }), @@ -51,16 +51,16 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-amd64.deb', 'sudo dpkg -i metricbeat-{config.kibana.version}-amd64.deb', ], - textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).', values: { link: 'https://www.elastic.co/downloads/beats/metricbeat' }, }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.rpmTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.rpmTitle', { defaultMessage: 'Download and install Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.rpmTextPre', { defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).', values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' }, }), @@ -68,17 +68,17 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ 'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-x86_64.rpm', 'sudo rpm -vi metricbeat-{config.kibana.version}-x86_64.rpm', ], - textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPost', { defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).', values: { link: 'https://www.elastic.co/downloads/beats/metricbeat' }, }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Metricbeat', }), textPre: i18n.translate( - 'kbn.common.tutorials.metricbeatInstructions.install.windowsTextPre', + 'home.tutorials.common.metricbeatInstructions.install.windowsTextPre', { defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({metricbeatLink}).\n\ @@ -98,7 +98,7 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ ), commands: ['cd "C:\\Program Files\\Metricbeat"', '.\\install-service-metricbeat.ps1'], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatInstructions.install.windowsTextPost', + 'home.tutorials.common.metricbeatInstructions.install.windowsTextPost', { defaultMessage: 'Modify the settings under `output.elasticsearch` in the {path} file to point to your Elasticsearch installation.', @@ -109,40 +109,40 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ }, START: { OSX: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.osxTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.osxTitle', { defaultMessage: 'Start Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.osxTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['./metricbeat setup', './metricbeat -e'], }, DEB: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.debTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.debTitle', { defaultMessage: 'Start Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.debTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.debTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['sudo metricbeat setup', 'sudo service metricbeat start'], }, RPM: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.rpmTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.rpmTitle', { defaultMessage: 'Start Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.rpmTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), commands: ['sudo metricbeat setup', 'sudo service metricbeat start'], }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.windowsTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.windowsTitle', { defaultMessage: 'Start Metricbeat', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.windowsTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), @@ -151,10 +151,10 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ }, CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`metricbeat.yml`', @@ -169,7 +169,7 @@ export const createMetricbeatInstructions = (context?: TutorialContext) => ({ ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -181,10 +181,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/metricbeat/metricbeat.yml`', @@ -199,7 +199,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -211,10 +211,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information:', values: { path: '`/etc/metricbeat/metricbeat.yml`', @@ -229,7 +229,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', ' host: ""', getSpaceIdForBeatsTutorial(context), ], - textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ and {kibanaUrlTemplate} is the URL of Kibana.', @@ -241,15 +241,18 @@ and {kibanaUrlTemplate} is the URL of Kibana.', }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.windowsTextPre', { - defaultMessage: 'Modify {path} to set the connection information:', - values: { - path: '`C:\\Program Files\\Metricbeat\\metricbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.metricbeatInstructions.config.windowsTextPre', + { + defaultMessage: 'Modify {path} to set the connection information:', + values: { + path: '`C:\\Program Files\\Metricbeat\\metricbeat.yml`', + }, + } + ), commands: [ 'output.elasticsearch:', ' hosts: [""]', @@ -260,7 +263,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.', getSpaceIdForBeatsTutorial(context), ], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatInstructions.config.windowsTextPost', + 'home.tutorials.common.metricbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -279,11 +282,11 @@ and {kibanaUrlTemplate} is the URL of Kibana.', export const createMetricbeatCloudInstructions = () => ({ CONFIG: { OSX: { - title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.osxTitle', { + title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.osxTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.osxTextPre', + 'home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -293,7 +296,7 @@ export const createMetricbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.osxTextPost', + 'home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -301,11 +304,11 @@ export const createMetricbeatCloudInstructions = () => ({ ), }, DEB: { - title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.debTitle', { + title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.debTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.debTextPre', + 'home.tutorials.common.metricbeatCloudInstructions.config.debTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -315,7 +318,7 @@ export const createMetricbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.debTextPost', + 'home.tutorials.common.metricbeatCloudInstructions.config.debTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -323,11 +326,11 @@ export const createMetricbeatCloudInstructions = () => ({ ), }, RPM: { - title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTitle', { + title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle', { defaultMessage: 'Edit the configuration', }), textPre: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTextPre', + 'home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -337,7 +340,7 @@ export const createMetricbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTextPost', + 'home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -346,13 +349,13 @@ export const createMetricbeatCloudInstructions = () => ({ }, WINDOWS: { title: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTitle', + 'home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -362,7 +365,7 @@ export const createMetricbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -375,55 +378,55 @@ export const createMetricbeatCloudInstructions = () => ({ export function metricbeatEnableInstructions(moduleName: string) { return { OSX: { - title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTitle', { + title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTextPre', { defaultMessage: 'From the installation directory, run:', }), commands: ['./metricbeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTextPost', { defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, DEB: { - title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.debTitle', { + title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.debTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), commands: ['sudo metricbeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.debTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.debTextPost', { defaultMessage: 'Modify the settings in the `/etc/metricbeat/modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, RPM: { - title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.rpmTitle', { + title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.rpmTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), commands: ['sudo metricbeat modules enable ' + moduleName], - textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.rpmTextPost', { + textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.rpmTextPost', { defaultMessage: 'Modify the settings in the `/etc/metricbeat/modules.d/{moduleName}.yml` file.', values: { moduleName }, }), }, WINDOWS: { - title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.windowsTitle', { + title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.windowsTitle', { defaultMessage: 'Enable and configure the {moduleName} module', values: { moduleName }, }), - textPre: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.windowsTextPre', { defaultMessage: 'From the {path} folder, run:', values: { path: `C:\\Program Files\\Metricbeat` }, }), commands: ['.\\metricbeat.exe modules enable ' + moduleName], textPost: i18n.translate( - 'kbn.common.tutorials.metricbeatEnableInstructions.windowsTextPost', + 'home.tutorials.common.metricbeatEnableInstructions.windowsTextPost', { defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.', values: { moduleName }, @@ -435,20 +438,20 @@ export function metricbeatEnableInstructions(moduleName: string) { export function metricbeatStatusCheck(moduleName: string) { return { - title: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.metricbeatStatusCheck.title', { defaultMessage: 'Module status', }), - text: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.metricbeatStatusCheck.text', { defaultMessage: 'Check that data is received from the Metricbeat `{moduleName}` module', values: { moduleName }, }), - btnLabel: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.metricbeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.metricbeatStatusCheck.successText', { defaultMessage: 'Data successfully received from this module', }), - error: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.metricbeatStatusCheck.errorText', { defaultMessage: 'No data has been received from this module yet', }), esHitsCheck: { @@ -473,7 +476,7 @@ export function onPremInstructions(moduleName: string, context?: TutorialContext instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.metricbeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.metricbeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -531,7 +534,7 @@ export function onPremCloudInstructions(moduleName: string) { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.metricbeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -596,7 +599,7 @@ export function cloudInstructions(moduleName: string) { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.metricbeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts b/src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts index ec66d9037eaee..d3b17410c4ffa 100644 --- a/src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/onprem_cloud_instructions.ts @@ -20,10 +20,10 @@ import { i18n } from '@kbn/i18n'; export const createTrycloudOption1 = () => ({ - title: i18n.translate('kbn.common.tutorials.premCloudInstructions.option1.title', { + title: i18n.translate('home.tutorials.common.premCloudInstructions.option1.title', { defaultMessage: 'Option 1: Try in Elastic Cloud', }), - textPre: i18n.translate('kbn.common.tutorials.premCloudInstructions.option1.textPre', { + textPre: i18n.translate('home.tutorials.common.premCloudInstructions.option1.textPre', { defaultMessage: 'Go to [Elastic Cloud]({link}). Register if you \ do not already have an account. Free 14-day trial available.\n\n\ @@ -41,10 +41,10 @@ To create a cluster, in Elastic Cloud console:\n\ }); export const createTrycloudOption2 = () => ({ - title: i18n.translate('kbn.common.tutorials.premCloudInstructions.option2.title', { + title: i18n.translate('home.tutorials.common.premCloudInstructions.option2.title', { defaultMessage: 'Option 2: Connect local Kibana to a Cloud instance', }), - textPre: i18n.translate('kbn.common.tutorials.premCloudInstructions.option2.textPre', { + textPre: i18n.translate('home.tutorials.common.premCloudInstructions.option2.textPre', { defaultMessage: 'If you are running this Kibana instance against a hosted Elasticsearch instance, \ proceed with manual setup.\n\n\ diff --git a/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts index 140292349d4c6..cc18f2ce9705d 100644 --- a/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts +++ b/src/plugins/home/server/tutorials/instructions/winlogbeat_instructions.ts @@ -26,11 +26,11 @@ import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ INSTALL: { WINDOWS: { - title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.install.windowsTitle', { + title: i18n.translate('home.tutorials.common.winlogbeatInstructions.install.windowsTitle', { defaultMessage: 'Download and install Winlogbeat', }), textPre: i18n.translate( - 'kbn.common.tutorials.winlogbeatInstructions.install.windowsTextPre', + 'home.tutorials.common.winlogbeatInstructions.install.windowsTextPre', { defaultMessage: 'First time using Winlogbeat? See the [Getting Started Guide]({winlogbeatLink}).\n\ @@ -50,7 +50,7 @@ export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ ), commands: ['cd "C:\\Program Files\\Winlogbeat"', '.\\install-service-winlogbeat.ps1'], textPost: i18n.translate( - 'kbn.common.tutorials.winlogbeatInstructions.install.windowsTextPost', + 'home.tutorials.common.winlogbeatInstructions.install.windowsTextPost', { defaultMessage: 'Modify the settings under `output.elasticsearch` in the {path} file to point to your Elasticsearch installation.', @@ -61,10 +61,10 @@ export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ }, START: { WINDOWS: { - title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.start.windowsTitle', { + title: i18n.translate('home.tutorials.common.winlogbeatInstructions.start.windowsTitle', { defaultMessage: 'Start Winlogbeat', }), - textPre: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.start.windowsTextPre', { + textPre: i18n.translate('home.tutorials.common.winlogbeatInstructions.start.windowsTextPre', { defaultMessage: 'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.', }), @@ -73,15 +73,18 @@ export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ }, CONFIG: { WINDOWS: { - title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.config.windowsTitle', { + title: i18n.translate('home.tutorials.common.winlogbeatInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.config.windowsTextPre', { - defaultMessage: 'Modify {path} to set the connection information:', - values: { - path: '`C:\\Program Files\\Winlogbeat\\winlogbeat.yml`', - }, - }), + textPre: i18n.translate( + 'home.tutorials.common.winlogbeatInstructions.config.windowsTextPre', + { + defaultMessage: 'Modify {path} to set the connection information:', + values: { + path: '`C:\\Program Files\\Winlogbeat\\winlogbeat.yml`', + }, + } + ), commands: [ 'output.elasticsearch:', ' hosts: [""]', @@ -92,7 +95,7 @@ export const createWinlogbeatInstructions = (context?: TutorialContext) => ({ getSpaceIdForBeatsTutorial(context), ], textPost: i18n.translate( - 'kbn.common.tutorials.winlogbeatInstructions.config.windowsTextPost', + 'home.tutorials.common.winlogbeatInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \ @@ -112,13 +115,13 @@ export const createWinlogbeatCloudInstructions = () => ({ CONFIG: { WINDOWS: { title: i18n.translate( - 'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTitle', + 'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTextPre', + 'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre', { defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:', values: { @@ -128,7 +131,7 @@ export const createWinlogbeatCloudInstructions = () => ({ ), commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:"'], textPost: i18n.translate( - 'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTextPost', + 'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost', { defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.', values: { passwordTemplate: '``' }, @@ -140,19 +143,19 @@ export const createWinlogbeatCloudInstructions = () => ({ export function winlogbeatStatusCheck() { return { - title: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.title', { + title: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.title', { defaultMessage: 'Module status', }), - text: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.text', { + text: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.text', { defaultMessage: 'Check that data is received from Winlogbeat', }), - btnLabel: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.buttonLabel', { + btnLabel: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.buttonLabel', { defaultMessage: 'Check data', }), - success: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.successText', { + success: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.successText', { defaultMessage: 'Data successfully received', }), - error: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.errorText', { + error: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.errorText', { defaultMessage: 'No data has been received yet', }), esHitsCheck: { @@ -177,7 +180,7 @@ export function onPremInstructions(context?: TutorialContext) { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.winlogbeat.premInstructions.gettingStarted.title', + 'home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -207,7 +210,7 @@ export function onPremCloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.winlogbeat.premCloudInstructions.gettingStarted.title', + 'home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } @@ -238,7 +241,7 @@ export function cloudInstructions() { instructionSets: [ { title: i18n.translate( - 'kbn.common.tutorials.winlogbeat.cloudInstructions.gettingStarted.title', + 'home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title', { defaultMessage: 'Getting Started', } diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts index a9058a0d65a30..e3f2124347b6b 100644 --- a/src/plugins/home/server/tutorials/iptables_logs/index.ts +++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts @@ -34,14 +34,14 @@ export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSche const platforms = ['DEB', 'RPM'] as const; return { id: 'iptablesLogs', - name: i18n.translate('kbn.server.tutorials.iptablesLogs.nameTitle', { + name: i18n.translate('home.tutorials.iptablesLogs.nameTitle', { defaultMessage: 'Iptables / Ubiquiti', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.iptablesLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.iptablesLogs.shortDescription', { defaultMessage: 'Collect and parse iptables and ip6tables logs or from Ubiqiti firewalls.', }), - longDescription: i18n.translate('kbn.server.tutorials.iptablesLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.iptablesLogs.longDescription', { defaultMessage: 'This is a module for iptables and ip6tables logs. It parses logs \ received over the network via syslog or from a file. Also, it understands the \ @@ -57,7 +57,7 @@ number and the action performed on the traffic (allow/deny).. \ dashboards: [], application: { path: '/app/siem', - label: i18n.translate('kbn.server.tutorials.iptablesLogs.artifacts.dashboards.linkLabel', { + label: i18n.translate('home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel', { defaultMessage: 'SIEM App', }), }, diff --git a/src/plugins/home/server/tutorials/kafka_logs/index.ts b/src/plugins/home/server/tutorials/kafka_logs/index.ts index acf7408cbeddf..74aa1ef772c85 100644 --- a/src/plugins/home/server/tutorials/kafka_logs/index.ts +++ b/src/plugins/home/server/tutorials/kafka_logs/index.ts @@ -34,14 +34,14 @@ export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'kafkaLogs', - name: i18n.translate('kbn.server.tutorials.kafkaLogs.nameTitle', { + name: i18n.translate('home.tutorials.kafkaLogs.nameTitle', { defaultMessage: 'Kafka logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.kafkaLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.kafkaLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Kafka.', }), - longDescription: i18n.translate('kbn.server.tutorials.kafkaLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.kafkaLogs.longDescription', { defaultMessage: 'The `kafka` Filebeat module parses logs created by Kafka. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: '943caca0-87ee-11e7-ad9c-db80de0bf8d3-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.kafkaLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Kafka logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.kafkaLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Kafka logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/kafka_metrics/index.ts b/src/plugins/home/server/tutorials/kafka_metrics/index.ts index 48a2d5ce8b47d..98be309ca89cd 100644 --- a/src/plugins/home/server/tutorials/kafka_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kafka_metrics/index.ts @@ -33,15 +33,15 @@ export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'kafka'; return { id: 'kafkaMetrics', - name: i18n.translate('kbn.server.tutorials.kafkaMetrics.nameTitle', { + name: i18n.translate('home.tutorials.kafkaMetrics.nameTitle', { defaultMessage: 'Kafka metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.kafkaMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.kafkaMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Kafka server.', }), - longDescription: i18n.translate('kbn.server.tutorials.kafkaMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.kafkaMetrics.longDescription', { defaultMessage: 'The `kafka` Metricbeat module fetches internal metrics from Kafka. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSche euiIconType: 'logoKafka', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.kafkaMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.kafkaMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/kibana_metrics/index.ts b/src/plugins/home/server/tutorials/kibana_metrics/index.ts index 66171e8bc1876..c087212c46f78 100644 --- a/src/plugins/home/server/tutorials/kibana_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kibana_metrics/index.ts @@ -33,15 +33,15 @@ export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'kibana'; return { id: 'kibanaMetrics', - name: i18n.translate('kbn.server.tutorials.kibanaMetrics.nameTitle', { + name: i18n.translate('home.tutorials.kibanaMetrics.nameTitle', { defaultMessage: 'Kibana metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.kibanaMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.kibanaMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Kibana.', }), - longDescription: i18n.translate('kbn.server.tutorials.kibanaMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.kibanaMetrics.longDescription', { defaultMessage: 'The `kibana` Metricbeat module fetches internal metrics from Kibana. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSch euiIconType: 'logoKibana', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.kibanaMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.kibanaMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts index a9300486fe639..466f713d35e06 100644 --- a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts +++ b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts @@ -33,14 +33,14 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria const moduleName = 'kubernetes'; return { id: 'kubernetesMetrics', - name: i18n.translate('kbn.server.tutorials.kubernetesMetrics.nameTitle', { + name: i18n.translate('home.tutorials.kubernetesMetrics.nameTitle', { defaultMessage: 'Kubernetes metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.kubernetesMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.kubernetesMetrics.shortDescription', { defaultMessage: 'Fetch metrics from your Kubernetes installation.', }), - longDescription: i18n.translate('kbn.server.tutorials.kubernetesMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.kubernetesMetrics.longDescription', { defaultMessage: 'The `kubernetes` Metricbeat module fetches metrics from the Kubernetes APIs. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria { id: 'AV4RGUqo5NkDleZmzKuZ-ecs', linkLabel: i18n.translate( - 'kbn.server.tutorials.kubernetesMetrics.artifacts.dashboards.linkLabel', + 'home.tutorials.kubernetesMetrics.artifacts.dashboards.linkLabel', { defaultMessage: 'Kubernetes metrics dashboard', } diff --git a/src/plugins/home/server/tutorials/logstash_logs/index.ts b/src/plugins/home/server/tutorials/logstash_logs/index.ts index 2a47a3c2e36ae..276ceedbbcc68 100644 --- a/src/plugins/home/server/tutorials/logstash_logs/index.ts +++ b/src/plugins/home/server/tutorials/logstash_logs/index.ts @@ -34,14 +34,14 @@ export function logstashLogsSpecProvider(context: TutorialContext): TutorialSche const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'logstashLogs', - name: i18n.translate('kbn.server.tutorials.logstashLogs.nameTitle', { + name: i18n.translate('home.tutorials.logstashLogs.nameTitle', { defaultMessage: 'Logstash logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.logstashLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.logstashLogs.shortDescription', { defaultMessage: 'Collect and parse debug and slow logs created by Logstash itself.', }), - longDescription: i18n.translate('kbn.server.tutorials.logstashLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.logstashLogs.longDescription', { defaultMessage: 'The `logstash` Filebeat module parses debug and slow logs created by Logstash itself. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function logstashLogsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: 'Filebeat-Logstash-Log-Dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.logstashLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Logstash logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.logstashLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Logstash logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/logstash_metrics/index.ts b/src/plugins/home/server/tutorials/logstash_metrics/index.ts index 0163b17b053a5..122f143e4b834 100644 --- a/src/plugins/home/server/tutorials/logstash_metrics/index.ts +++ b/src/plugins/home/server/tutorials/logstash_metrics/index.ts @@ -33,15 +33,15 @@ export function logstashMetricsSpecProvider(context: TutorialContext): TutorialS const moduleName = 'logstash'; return { id: moduleName + 'Metrics', - name: i18n.translate('kbn.server.tutorials.logstashMetrics.nameTitle', { + name: i18n.translate('home.tutorials.logstashMetrics.nameTitle', { defaultMessage: 'Logstash metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.logstashMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.logstashMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Logstash server.', }), - longDescription: i18n.translate('kbn.server.tutorials.logstashMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.logstashMetrics.longDescription', { defaultMessage: 'The `{moduleName}` Metricbeat module fetches internal metrics from a Logstash server. \ [Learn more]({learnMoreLink}).', @@ -53,7 +53,7 @@ export function logstashMetricsSpecProvider(context: TutorialContext): TutorialS euiIconType: 'logoLogstash', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.logstashMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.logstashMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/memcached_metrics/index.ts b/src/plugins/home/server/tutorials/memcached_metrics/index.ts index 6248ab46fcafe..1c9c9d975e4b8 100644 --- a/src/plugins/home/server/tutorials/memcached_metrics/index.ts +++ b/src/plugins/home/server/tutorials/memcached_metrics/index.ts @@ -33,15 +33,15 @@ export function memcachedMetricsSpecProvider(context: TutorialContext): Tutorial const moduleName = 'memcached'; return { id: 'memcachedMetrics', - name: i18n.translate('kbn.server.tutorials.memcachedMetrics.nameTitle', { + name: i18n.translate('home.tutorials.memcachedMetrics.nameTitle', { defaultMessage: 'Memcached metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.memcachedMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.memcachedMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Memcached server.', }), - longDescription: i18n.translate('kbn.server.tutorials.memcachedMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.memcachedMetrics.longDescription', { defaultMessage: 'The `memcached` Metricbeat module fetches internal metrics from Memcached. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function memcachedMetricsSpecProvider(context: TutorialContext): Tutorial euiIconType: 'logoMemcached', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.memcachedMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.memcachedMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts index b7234a14f075c..1a10dc3849471 100644 --- a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts @@ -33,14 +33,14 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'mongodb'; return { id: 'mongodbMetrics', - name: i18n.translate('kbn.server.tutorials.mongodbMetrics.nameTitle', { + name: i18n.translate('home.tutorials.mongodbMetrics.nameTitle', { defaultMessage: 'MongoDB metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.mongodbMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.mongodbMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from MongoDB.', }), - longDescription: i18n.translate('kbn.server.tutorials.mongodbMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.mongodbMetrics.longDescription', { defaultMessage: 'The `mongodb` Metricbeat module fetches internal metrics from the MongoDB server. \ [Learn more]({learnMoreLink}).', @@ -54,7 +54,7 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc { id: 'Metricbeat-MongoDB-ecs', linkLabel: i18n.translate( - 'kbn.server.tutorials.mongodbMetrics.artifacts.dashboards.linkLabel', + 'home.tutorials.mongodbMetrics.artifacts.dashboards.linkLabel', { defaultMessage: 'MongoDB metrics dashboard', } diff --git a/src/plugins/home/server/tutorials/mssql_metrics/index.ts b/src/plugins/home/server/tutorials/mssql_metrics/index.ts index 500d7bc0703c2..cea46c3220d5a 100644 --- a/src/plugins/home/server/tutorials/mssql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts @@ -33,14 +33,14 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'mssql'; return { id: 'mssqlMetrics', - name: i18n.translate('kbn.server.tutorials.mssqlMetrics.nameTitle', { + name: i18n.translate('home.tutorials.mssqlMetrics.nameTitle', { defaultMessage: 'Microsoft SQL Server Metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.mssqlMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.mssqlMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from a Microsoft SQL Server instance', }), - longDescription: i18n.translate('kbn.server.tutorials.mssqlMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.mssqlMetrics.longDescription', { defaultMessage: 'The `mssql` Metricbeat module fetches monitoring, log and performance metrics from a Microsoft SQL Server instance. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: 'a2ead240-18bb-11e9-9836-f37dedd3b411-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.mssqlMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Microsoft SQL Server metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.mssqlMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Microsoft SQL Server metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/munin_metrics/index.ts b/src/plugins/home/server/tutorials/munin_metrics/index.ts index a9356a9d1488c..e438d3015c77c 100644 --- a/src/plugins/home/server/tutorials/munin_metrics/index.ts +++ b/src/plugins/home/server/tutorials/munin_metrics/index.ts @@ -33,15 +33,15 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'munin'; return { id: 'muninMetrics', - name: i18n.translate('kbn.server.tutorials.muninMetrics.nameTitle', { + name: i18n.translate('home.tutorials.muninMetrics.nameTitle', { defaultMessage: 'Munin metrics', }), isBeta: true, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.muninMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.muninMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Munin server.', }), - longDescription: i18n.translate('kbn.server.tutorials.muninMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.muninMetrics.longDescription', { defaultMessage: 'The `munin` Metricbeat module fetches internal metrics from Munin. \ [Learn more]({learnMoreLink}).', @@ -51,7 +51,7 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche }), artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.muninMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.muninMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/mysql_logs/index.ts b/src/plugins/home/server/tutorials/mysql_logs/index.ts index db78e9c7b11a5..e003f4dfd47e4 100644 --- a/src/plugins/home/server/tutorials/mysql_logs/index.ts +++ b/src/plugins/home/server/tutorials/mysql_logs/index.ts @@ -34,14 +34,14 @@ export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'mysqlLogs', - name: i18n.translate('kbn.server.tutorials.mysqlLogs.nameTitle', { + name: i18n.translate('home.tutorials.mysqlLogs.nameTitle', { defaultMessage: 'MySQL logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.mysqlLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.mysqlLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by MySQL.', }), - longDescription: i18n.translate('kbn.server.tutorials.mysqlLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.mysqlLogs.longDescription', { defaultMessage: 'The `mysql` Filebeat module parses error and slow logs created by MySQL. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: 'Filebeat-MySQL-Dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.mysqlLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'MySQL logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.mysqlLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'MySQL logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/mysql_metrics/index.ts b/src/plugins/home/server/tutorials/mysql_metrics/index.ts index fa70f41a9a8b2..d18cc31512e71 100644 --- a/src/plugins/home/server/tutorials/mysql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/mysql_metrics/index.ts @@ -33,14 +33,14 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'mysql'; return { id: 'mysqlMetrics', - name: i18n.translate('kbn.server.tutorials.mysqlMetrics.nameTitle', { + name: i18n.translate('home.tutorials.mysqlMetrics.nameTitle', { defaultMessage: 'MySQL metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.mysqlMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.mysqlMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from MySQL.', }), - longDescription: i18n.translate('kbn.server.tutorials.mysqlMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.mysqlMetrics.longDescription', { defaultMessage: 'The `mysql` Metricbeat module fetches internal metrics from the MySQL server. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: '66881e90-0006-11e7-bf7f-c9acc3d3e306-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.mysqlMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'MySQL metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.mysqlMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'MySQL metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/nats_logs/index.ts b/src/plugins/home/server/tutorials/nats_logs/index.ts index f8bd0ec7fa827..3f6cb36d8d49e 100644 --- a/src/plugins/home/server/tutorials/nats_logs/index.ts +++ b/src/plugins/home/server/tutorials/nats_logs/index.ts @@ -34,15 +34,15 @@ export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema { const platforms = ['DEB', 'RPM'] as const; return { id: 'natsLogs', - name: i18n.translate('kbn.server.tutorials.natsLogs.nameTitle', { + name: i18n.translate('home.tutorials.natsLogs.nameTitle', { defaultMessage: 'NATS logs', }), category: TutorialsCategory.LOGGING, isBeta: true, - shortDescription: i18n.translate('kbn.server.tutorials.natsLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.natsLogs.shortDescription', { defaultMessage: 'Collect and parse logs created by Nats.', }), - longDescription: i18n.translate('kbn.server.tutorials.natsLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.natsLogs.longDescription', { defaultMessage: 'The `nats` Filebeat module parses logs created by Nats. \ [Learn more]({learnMoreLink}).', @@ -55,12 +55,9 @@ export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema { dashboards: [ { id: 'Filebeat-nats-overview-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.natsLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'NATS logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.natsLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'NATS logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/nats_metrics/index.ts b/src/plugins/home/server/tutorials/nats_metrics/index.ts index 0b327521354a6..27b5507ff6672 100644 --- a/src/plugins/home/server/tutorials/nats_metrics/index.ts +++ b/src/plugins/home/server/tutorials/nats_metrics/index.ts @@ -33,14 +33,14 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem const moduleName = 'nats'; return { id: 'natsMetrics', - name: i18n.translate('kbn.server.tutorials.natsMetrics.nameTitle', { + name: i18n.translate('home.tutorials.natsMetrics.nameTitle', { defaultMessage: 'NATS metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.natsMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.natsMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the Nats server.', }), - longDescription: i18n.translate('kbn.server.tutorials.natsMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.natsMetrics.longDescription', { defaultMessage: 'The `nats` Metricbeat module fetches monitoring metrics from Nats. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem dashboards: [ { id: 'Metricbeat-Nats-Dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.natsMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'NATS metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.natsMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'NATS metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/netflow/common_instructions.ts b/src/plugins/home/server/tutorials/netflow/common_instructions.ts index 194e315d92ed7..8fe24ba9c7994 100644 --- a/src/plugins/home/server/tutorials/netflow/common_instructions.ts +++ b/src/plugins/home/server/tutorials/netflow/common_instructions.ts @@ -25,51 +25,39 @@ export function createCommonNetflowInstructions() { ON_PREM: { OSX: [ { - title: i18n.translate('kbn.server.tutorials.netflow.common.config.onPrem.osxTitle', { + title: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTitle', { defaultMessage: 'Edit the configuration', }), - textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPrem.osxTextPre', - { - defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', - values: { - logstashConfigPath: '`config/logstash.yml`', - }, - } - ), + textPre: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTextPre', { + defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', + values: { + logstashConfigPath: '`config/logstash.yml`', + }, + }), commands: ['modules:', ' - name: netflow', ' var.input.udp.port: '], - textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPrem.osxTextPost', - { - defaultMessage: - 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.', - values: { - udpPort: '``', - }, - } - ), + textPost: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTextPost', { + defaultMessage: + 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.', + values: { + udpPort: '``', + }, + }), }, ], WINDOWS: [ { - title: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPrem.windowsTitle', - { - defaultMessage: 'Edit the configuration', - } - ), - textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPrem.windowsTextPre', - { - defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', - values: { - logstashConfigPath: '`config\\logstash.yml`', - }, - } - ), + title: i18n.translate('home.tutorials.netflow.common.config.onPrem.windowsTitle', { + defaultMessage: 'Edit the configuration', + }), + textPre: i18n.translate('home.tutorials.netflow.common.config.onPrem.windowsTextPre', { + defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', + values: { + logstashConfigPath: '`config\\logstash.yml`', + }, + }), commands: ['modules:', ' - name: netflow', ' var.input.udp.port: '], textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPrem.windowsTextPost', + 'home.tutorials.netflow.common.config.onPrem.windowsTextPost', { defaultMessage: 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.', @@ -85,13 +73,13 @@ export function createCommonNetflowInstructions() { OSX: [ { title: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTitle', + 'home.tutorials.netflow.common.config.onPremElasticCloud.osxTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTextPre', + 'home.tutorials.netflow.common.config.onPremElasticCloud.osxTextPre', { defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', values: { @@ -108,7 +96,7 @@ export function createCommonNetflowInstructions() { ' var.elasticsearch.password: ', ], textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTextPost', + 'home.tutorials.netflow.common.config.onPremElasticCloud.osxTextPost', { defaultMessage: 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data, \ @@ -127,13 +115,13 @@ export function createCommonNetflowInstructions() { WINDOWS: [ { title: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTitle', + 'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPre', + 'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPre', { defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', values: { @@ -150,7 +138,7 @@ export function createCommonNetflowInstructions() { ' var.elasticsearch.password: ', ], textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPost', + 'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPost', { defaultMessage: 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data, \ @@ -170,14 +158,11 @@ export function createCommonNetflowInstructions() { ELASTIC_CLOUD: { OSX: [ { - title: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTitle', - { - defaultMessage: 'Edit the configuration', - } - ), + title: i18n.translate('home.tutorials.netflow.common.config.elasticCloud.osxTitle', { + defaultMessage: 'Edit the configuration', + }), textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTextPre', + 'home.tutorials.netflow.common.config.elasticCloud.osxTextPre', { defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', values: { @@ -194,7 +179,7 @@ export function createCommonNetflowInstructions() { ' var.input.udp.port: ', ], textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTextPost', + 'home.tutorials.netflow.common.config.elasticCloud.osxTextPost', { defaultMessage: 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data and \ @@ -211,13 +196,13 @@ export function createCommonNetflowInstructions() { WINDOWS: [ { title: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTitle', + 'home.tutorials.netflow.common.config.elasticCloud.windowsTitle', { defaultMessage: 'Edit the configuration', } ), textPre: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTextPre', + 'home.tutorials.netflow.common.config.elasticCloud.windowsTextPre', { defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:', values: { @@ -234,7 +219,7 @@ export function createCommonNetflowInstructions() { ' var.input.udp.port: ', ], textPost: i18n.translate( - 'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTextPost', + 'home.tutorials.netflow.common.config.elasticCloud.windowsTextPost', { defaultMessage: 'Where {udpPort} is the UDP port on which Logstash will receive Netflow data and \ @@ -253,14 +238,14 @@ export function createCommonNetflowInstructions() { SETUP: { OSX: [ { - title: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTitle', { + title: i18n.translate('home.tutorials.netflow.common.setup.osxTitle', { defaultMessage: 'Run the Netflow module', }), - textPre: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTextPre', { + textPre: i18n.translate('home.tutorials.netflow.common.setup.osxTextPre', { defaultMessage: 'Run:', }), commands: ['./bin/logstash --modules netflow --setup'], - textPost: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTextPost', { + textPost: i18n.translate('home.tutorials.netflow.common.setup.osxTextPost', { defaultMessage: 'The {setupOption} option creates a {netflowPrefix} index pattern in Elasticsearch and imports \ Kibana dashboards and visualizations. Omit this option for subsequent runs to avoid overwriting existing dashboards.', @@ -273,14 +258,14 @@ export function createCommonNetflowInstructions() { ], WINDOWS: [ { - title: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTitle', { + title: i18n.translate('home.tutorials.netflow.common.setup.windowsTitle', { defaultMessage: 'Run the Netflow module', }), - textPre: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTextPre', { + textPre: i18n.translate('home.tutorials.netflow.common.setup.windowsTextPre', { defaultMessage: 'Run:', }), commands: ['bin\\logstash --modules netflow --setup'], - textPost: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTextPost', { + textPost: i18n.translate('home.tutorials.netflow.common.setup.windowsTextPost', { defaultMessage: 'The {setupOption} option creates a {netflowPrefix} index pattern in Elasticsearch and imports \ Kibana dashboards and visualizations. Omit this option for subsequent runs to avoid overwriting existing dashboards.', diff --git a/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts b/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts index b8fdaa7fac66d..ac64aef730004 100644 --- a/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts +++ b/src/plugins/home/server/tutorials/netflow/elastic_cloud.ts @@ -31,7 +31,7 @@ export function createElasticCloudInstructions() { return { instructionSets: [ { - title: i18n.translate('kbn.server.tutorials.netflow.elasticCloudInstructions.title', { + title: i18n.translate('home.tutorials.netflow.elasticCloudInstructions.title', { defaultMessage: 'Getting Started', }), instructionVariants: [ diff --git a/src/plugins/home/server/tutorials/netflow/index.ts b/src/plugins/home/server/tutorials/netflow/index.ts index dc0363af41610..7c6fcadcff625 100644 --- a/src/plugins/home/server/tutorials/netflow/index.ts +++ b/src/plugins/home/server/tutorials/netflow/index.ts @@ -29,10 +29,10 @@ export function netflowSpecProvider() { id: 'netflow', name: 'Netflow', category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.netflow.tutorialShortDescription', { + shortDescription: i18n.translate('home.tutorials.netflow.tutorialShortDescription', { defaultMessage: 'Collect Netflow records sent by a Netflow exporter.', }), - longDescription: i18n.translate('kbn.server.tutorials.netflow.tutorialLongDescription', { + longDescription: i18n.translate('home.tutorials.netflow.tutorialLongDescription', { defaultMessage: 'The Logstash Netflow module collects and parses network flow data, \ indexes the events into Elasticsearch, and installs a suite of Kibana dashboards. \ diff --git a/src/plugins/home/server/tutorials/netflow/on_prem.ts b/src/plugins/home/server/tutorials/netflow/on_prem.ts index d7b2dea9d6647..c7cd36d073632 100644 --- a/src/plugins/home/server/tutorials/netflow/on_prem.ts +++ b/src/plugins/home/server/tutorials/netflow/on_prem.ts @@ -31,7 +31,7 @@ export function createOnPremInstructions() { return { instructionSets: [ { - title: i18n.translate('kbn.server.tutorials.netflow.onPremInstructions.title', { + title: i18n.translate('home.tutorials.netflow.onPremInstructions.title', { defaultMessage: 'Getting Started', }), instructionVariants: [ diff --git a/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts b/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts index cf3d233be646a..c01a9a5382f88 100644 --- a/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts +++ b/src/plugins/home/server/tutorials/netflow/on_prem_elastic_cloud.ts @@ -37,7 +37,7 @@ export function createOnPremElasticCloudInstructions() { return { instructionSets: [ { - title: i18n.translate('kbn.server.tutorials.netflow.onPremElasticCloudInstructions.title', { + title: i18n.translate('home.tutorials.netflow.onPremElasticCloudInstructions.title', { defaultMessage: 'Getting Started', }), instructionVariants: [ diff --git a/src/plugins/home/server/tutorials/nginx_logs/index.ts b/src/plugins/home/server/tutorials/nginx_logs/index.ts index 894e0993b156e..756d4a171d858 100644 --- a/src/plugins/home/server/tutorials/nginx_logs/index.ts +++ b/src/plugins/home/server/tutorials/nginx_logs/index.ts @@ -34,14 +34,14 @@ export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'nginxLogs', - name: i18n.translate('kbn.server.tutorials.nginxLogs.nameTitle', { + name: i18n.translate('home.tutorials.nginxLogs.nameTitle', { defaultMessage: 'Nginx logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.nginxLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.nginxLogs.shortDescription', { defaultMessage: 'Collect and parse access and error logs created by the Nginx HTTP server.', }), - longDescription: i18n.translate('kbn.server.tutorials.nginxLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.nginxLogs.longDescription', { defaultMessage: 'The `nginx` Filebeat module parses access and error logs created by the Nginx HTTP server. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema dashboards: [ { id: '55a9e6e0-a29e-11e7-928f-5dbe6f6f5519-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.nginxLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Nginx logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.nginxLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Nginx logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/nginx_metrics/index.ts b/src/plugins/home/server/tutorials/nginx_metrics/index.ts index cf29591a47ee5..82af4d6c42dd8 100644 --- a/src/plugins/home/server/tutorials/nginx_metrics/index.ts +++ b/src/plugins/home/server/tutorials/nginx_metrics/index.ts @@ -33,14 +33,14 @@ export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'nginx'; return { id: 'nginxMetrics', - name: i18n.translate('kbn.server.tutorials.nginxMetrics.nameTitle', { + name: i18n.translate('home.tutorials.nginxMetrics.nameTitle', { defaultMessage: 'Nginx metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.nginxMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.nginxMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the Nginx HTTP server.', }), - longDescription: i18n.translate('kbn.server.tutorials.nginxMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.nginxMetrics.longDescription', { defaultMessage: 'The `nginx` Metricbeat module fetches internal metrics from the Nginx HTTP server. \ The module scrapes the server status data from the web page generated by the \ @@ -58,12 +58,9 @@ which must be enabled in your Nginx installation. \ dashboards: [ { id: '023d2930-f1a5-11e7-a9ef-93c69af7b129-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.nginxMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Nginx metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.nginxMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Nginx metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/osquery_logs/index.ts b/src/plugins/home/server/tutorials/osquery_logs/index.ts index 104af99121388..bce928519f66d 100644 --- a/src/plugins/home/server/tutorials/osquery_logs/index.ts +++ b/src/plugins/home/server/tutorials/osquery_logs/index.ts @@ -34,14 +34,14 @@ export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchem const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'osqueryLogs', - name: i18n.translate('kbn.server.tutorials.osqueryLogs.nameTitle', { + name: i18n.translate('home.tutorials.osqueryLogs.nameTitle', { defaultMessage: 'Osquery logs', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.osqueryLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.osqueryLogs.shortDescription', { defaultMessage: 'Collect the result logs created by osqueryd.', }), - longDescription: i18n.translate('kbn.server.tutorials.osqueryLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.osqueryLogs.longDescription', { defaultMessage: 'The `osquery` Filebeat module collects the JSON result logs collected by `osqueryd`. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchem dashboards: [ { id: '69f5ae20-eb02-11e7-8f04-51231daa5b05-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.osqueryLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Osquery logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.osqueryLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Osquery logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts index 397e2956161e9..a6c98fb16671f 100644 --- a/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts +++ b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts @@ -33,15 +33,15 @@ export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'php_fpm'; return { id: 'phpfpmMetrics', - name: i18n.translate('kbn.server.tutorials.phpFpmMetrics.nameTitle', { + name: i18n.translate('home.tutorials.phpFpmMetrics.nameTitle', { defaultMessage: 'PHP-FPM metrics', }), category: TutorialsCategory.METRICS, isBeta: false, - shortDescription: i18n.translate('kbn.server.tutorials.phpFpmMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.phpFpmMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from PHP-FPM.', }), - longDescription: i18n.translate('kbn.server.tutorials.phpFpmMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.phpFpmMetrics.longDescription', { defaultMessage: 'The `php_fpm` Metricbeat module fetches internal metrics from the PHP-FPM server. \ [Learn more]({learnMoreLink}).', diff --git a/src/plugins/home/server/tutorials/postgresql_logs/index.ts b/src/plugins/home/server/tutorials/postgresql_logs/index.ts index 9c041730ad5ca..def9f71c9d2df 100644 --- a/src/plugins/home/server/tutorials/postgresql_logs/index.ts +++ b/src/plugins/home/server/tutorials/postgresql_logs/index.ts @@ -34,14 +34,14 @@ export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSc const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'postgresqlLogs', - name: i18n.translate('kbn.server.tutorials.postgresqlLogs.nameTitle', { + name: i18n.translate('home.tutorials.postgresqlLogs.nameTitle', { defaultMessage: 'PostgreSQL logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.postgresqlLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.postgresqlLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by PostgreSQL.', }), - longDescription: i18n.translate('kbn.server.tutorials.postgresqlLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.postgresqlLogs.longDescription', { defaultMessage: 'The `postgresql` Filebeat module parses error and slow logs created by PostgreSQL. \ [Learn more]({learnMoreLink}).', @@ -55,7 +55,7 @@ export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSc { id: '158be870-87f4-11e7-ad9c-db80de0bf8d3-ecs', linkLabel: i18n.translate( - 'kbn.server.tutorials.postgresqlLogs.artifacts.dashboards.linkLabel', + 'home.tutorials.postgresqlLogs.artifacts.dashboards.linkLabel', { defaultMessage: 'PostgreSQL logs dashboard', } diff --git a/src/plugins/home/server/tutorials/postgresql_metrics/index.ts b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts index ad4b08f4eb34b..b16267aeb0de6 100644 --- a/src/plugins/home/server/tutorials/postgresql_metrics/index.ts +++ b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts @@ -33,15 +33,15 @@ export function postgresqlMetricsSpecProvider(context: TutorialContext): Tutoria const moduleName = 'postgresql'; return { id: 'postgresqlMetrics', - name: i18n.translate('kbn.server.tutorials.postgresqlMetrics.nameTitle', { + name: i18n.translate('home.tutorials.postgresqlMetrics.nameTitle', { defaultMessage: 'PostgreSQL metrics', }), category: TutorialsCategory.METRICS, isBeta: false, - shortDescription: i18n.translate('kbn.server.tutorials.postgresqlMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.postgresqlMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from PostgreSQL.', }), - longDescription: i18n.translate('kbn.server.tutorials.postgresqlMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.postgresqlMetrics.longDescription', { defaultMessage: 'The `postgresql` Metricbeat module fetches internal metrics from the PostgreSQL server. \ [Learn more]({learnMoreLink}).', diff --git a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts index a4533fe8ae69a..d79ce652db0d0 100644 --- a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts +++ b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts @@ -33,15 +33,15 @@ export function prometheusMetricsSpecProvider(context: TutorialContext): Tutoria const moduleName = 'prometheus'; return { id: moduleName + 'Metrics', - name: i18n.translate('kbn.server.tutorials.prometheusMetrics.nameTitle', { + name: i18n.translate('home.tutorials.prometheusMetrics.nameTitle', { defaultMessage: 'Prometheus metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.prometheusMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.prometheusMetrics.shortDescription', { defaultMessage: 'Fetch metrics from a Prometheus exporter.', }), - longDescription: i18n.translate('kbn.server.tutorials.prometheusMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.prometheusMetrics.longDescription', { defaultMessage: 'The `{moduleName}` Metricbeat module fetches metrics from Prometheus endpoint. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function prometheusMetricsSpecProvider(context: TutorialContext): Tutoria euiIconType: 'logoPrometheus', artifacts: { application: { - label: i18n.translate( - 'kbn.server.tutorials.prometheusMetrics.artifacts.application.label', - { - defaultMessage: 'Discover', - } - ), + label: i18n.translate('home.tutorials.prometheusMetrics.artifacts.application.label', { + defaultMessage: 'Discover', + }), path: '/app/kibana#/discover', }, dashboards: [], diff --git a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts index 4e2bf56632bd3..b62a7ff731420 100644 --- a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts +++ b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts @@ -33,14 +33,14 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS const moduleName = 'rabbitmq'; return { id: 'rabbitmqMetrics', - name: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.nameTitle', { + name: i18n.translate('home.tutorials.rabbitmqMetrics.nameTitle', { defaultMessage: 'RabbitMQ metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.rabbitmqMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the RabbitMQ server.', }), - longDescription: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.rabbitmqMetrics.longDescription', { defaultMessage: 'The `rabbitmq` Metricbeat module fetches internal metrics from the RabbitMQ server. \ [Learn more]({learnMoreLink}).', @@ -55,7 +55,7 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS { id: 'AV4YobKIge1VCbKU_qVo-ecs', linkLabel: i18n.translate( - 'kbn.server.tutorials.rabbitmqMetrics.artifacts.dashboards.linkLabel', + 'home.tutorials.rabbitmqMetrics.artifacts.dashboards.linkLabel', { defaultMessage: 'RabbitMQ metrics dashboard', } diff --git a/src/plugins/home/server/tutorials/redis_logs/index.ts b/src/plugins/home/server/tutorials/redis_logs/index.ts index 11fb1ef1fb3fa..27c288ce9c381 100644 --- a/src/plugins/home/server/tutorials/redis_logs/index.ts +++ b/src/plugins/home/server/tutorials/redis_logs/index.ts @@ -34,14 +34,14 @@ export function redisLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'redisLogs', - name: i18n.translate('kbn.server.tutorials.redisLogs.nameTitle', { + name: i18n.translate('home.tutorials.redisLogs.nameTitle', { defaultMessage: 'Redis logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.redisLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.redisLogs.shortDescription', { defaultMessage: 'Collect and parse error and slow logs created by Redis.', }), - longDescription: i18n.translate('kbn.server.tutorials.redisLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.redisLogs.longDescription', { defaultMessage: 'The `redis` Filebeat module parses error and slow logs created by Redis. \ For Redis to write error logs, make sure the `logfile` option, from the \ @@ -60,12 +60,9 @@ Note that the `slowlog` fileset is experimental. \ dashboards: [ { id: '7fea2930-478e-11e7-b1f0-cb29bac6bf8b-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.redisLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Redis logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.redisLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Redis logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/redis_metrics/index.ts b/src/plugins/home/server/tutorials/redis_metrics/index.ts index 0454d6846e55f..27c7780653168 100644 --- a/src/plugins/home/server/tutorials/redis_metrics/index.ts +++ b/src/plugins/home/server/tutorials/redis_metrics/index.ts @@ -33,14 +33,14 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'redis'; return { id: 'redisMetrics', - name: i18n.translate('kbn.server.tutorials.redisMetrics.nameTitle', { + name: i18n.translate('home.tutorials.redisMetrics.nameTitle', { defaultMessage: 'Redis metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.redisMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.redisMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Redis.', }), - longDescription: i18n.translate('kbn.server.tutorials.redisMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.redisMetrics.longDescription', { defaultMessage: 'The `redis` Metricbeat module fetches internal metrics from the Redis server. \ [Learn more]({learnMoreLink}).', @@ -53,12 +53,9 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: 'AV4YjZ5pux-M-tCAunxK-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.redisMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Redis metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.redisMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'Redis metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/stan_metrics/index.ts b/src/plugins/home/server/tutorials/stan_metrics/index.ts index fd1923373cbe6..9f536e68acf72 100644 --- a/src/plugins/home/server/tutorials/stan_metrics/index.ts +++ b/src/plugins/home/server/tutorials/stan_metrics/index.ts @@ -33,14 +33,14 @@ export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchem const moduleName = 'stan'; return { id: 'stanMetrics', - name: i18n.translate('kbn.server.tutorials.stanMetrics.nameTitle', { + name: i18n.translate('home.tutorials.stanMetrics.nameTitle', { defaultMessage: 'STAN metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.stanMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.stanMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from the STAN server.', }), - longDescription: i18n.translate('kbn.server.tutorials.stanMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.stanMetrics.longDescription', { defaultMessage: 'The `stan` Metricbeat module fetches monitoring metrics from STAN. \ [Learn more]({learnMoreLink}).', diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts index 8aae1daec4a5c..ac19cf0987b84 100644 --- a/src/plugins/home/server/tutorials/suricata_logs/index.ts +++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts @@ -34,14 +34,14 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'suricataLogs', - name: i18n.translate('kbn.server.tutorials.suricataLogs.nameTitle', { + name: i18n.translate('home.tutorials.suricataLogs.nameTitle', { defaultMessage: 'Suricata logs', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.suricataLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.suricataLogs.shortDescription', { defaultMessage: 'Collect the result logs created by Suricata IDS/IPS/NSM.', }), - longDescription: i18n.translate('kbn.server.tutorials.suricataLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.suricataLogs.longDescription', { defaultMessage: 'The `suricata` Filebeat module collects the logs from the \ [Suricata Eve JSON output](https://suricata.readthedocs.io/en/latest/output/eve/eve-json-format.html). \ @@ -55,12 +55,9 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: '69f5ae20-eb02-11e7-8f04-51231daa5b05', - linkLabel: i18n.translate( - 'kbn.server.tutorials.suricataLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Suricata logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.suricataLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Suricata logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/system_logs/index.ts b/src/plugins/home/server/tutorials/system_logs/index.ts index 67b2c12d01628..fc2fa4f49fd5f 100644 --- a/src/plugins/home/server/tutorials/system_logs/index.ts +++ b/src/plugins/home/server/tutorials/system_logs/index.ts @@ -34,14 +34,14 @@ export function systemLogsSpecProvider(context: TutorialContext): TutorialSchema const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'systemLogs', - name: i18n.translate('kbn.server.tutorials.systemLogs.nameTitle', { + name: i18n.translate('home.tutorials.systemLogs.nameTitle', { defaultMessage: 'System logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.systemLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.systemLogs.shortDescription', { defaultMessage: 'Collect and parse logs written by the local Syslog server.', }), - longDescription: i18n.translate('kbn.server.tutorials.systemLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.systemLogs.longDescription', { defaultMessage: 'The `system` Filebeat module collects and parses logs created by the system logging service of common \ Unix/Linux based distributions. This module is not available on Windows. \ @@ -54,12 +54,9 @@ Unix/Linux based distributions. This module is not available on Windows. \ dashboards: [ { id: 'Filebeat-syslog-dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.systemLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'System logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.systemLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'System logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/system_metrics/index.ts b/src/plugins/home/server/tutorials/system_metrics/index.ts index 82af24a151527..b0355e1118a96 100644 --- a/src/plugins/home/server/tutorials/system_metrics/index.ts +++ b/src/plugins/home/server/tutorials/system_metrics/index.ts @@ -33,14 +33,14 @@ export function systemMetricsSpecProvider(context: TutorialContext): TutorialSch const moduleName = 'system'; return { id: 'systemMetrics', - name: i18n.translate('kbn.server.tutorials.systemMetrics.nameTitle', { + name: i18n.translate('home.tutorials.systemMetrics.nameTitle', { defaultMessage: 'System metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.systemMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.systemMetrics.shortDescription', { defaultMessage: 'Collect CPU, memory, network, and disk statistics from the host.', }), - longDescription: i18n.translate('kbn.server.tutorials.systemMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.systemMetrics.longDescription', { defaultMessage: 'The `system` Metricbeat module collects CPU, memory, network, and disk statistics from the host. \ It collects system wide statistics and statistics per process and filesystem. \ @@ -53,12 +53,9 @@ It collects system wide statistics and statistics per process and filesystem. \ dashboards: [ { id: 'Metricbeat-system-overview-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.systemMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'System metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.systemMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'System metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/traefik_logs/index.ts b/src/plugins/home/server/tutorials/traefik_logs/index.ts index bba07b5279381..423023a3902e5 100644 --- a/src/plugins/home/server/tutorials/traefik_logs/index.ts +++ b/src/plugins/home/server/tutorials/traefik_logs/index.ts @@ -34,14 +34,14 @@ export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchem const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const; return { id: 'traefikLogs', - name: i18n.translate('kbn.server.tutorials.traefikLogs.nameTitle', { + name: i18n.translate('home.tutorials.traefikLogs.nameTitle', { defaultMessage: 'Traefik logs', }), category: TutorialsCategory.LOGGING, - shortDescription: i18n.translate('kbn.server.tutorials.traefikLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.traefikLogs.shortDescription', { defaultMessage: 'Collect and parse access logs created by the Traefik Proxy.', }), - longDescription: i18n.translate('kbn.server.tutorials.traefikLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.traefikLogs.longDescription', { defaultMessage: 'The `traefik` Filebeat module parses access logs created by Traefik. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchem dashboards: [ { id: 'Filebeat-Traefik-Dashboard-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.traefikLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Traefik logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.traefikLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Traefik logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/traefik_metrics/index.ts b/src/plugins/home/server/tutorials/traefik_metrics/index.ts index f9e690e949a7a..8fe81eca4c601 100644 --- a/src/plugins/home/server/tutorials/traefik_metrics/index.ts +++ b/src/plugins/home/server/tutorials/traefik_metrics/index.ts @@ -30,14 +30,14 @@ export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'traefik'; return { id: 'traefikMetrics', - name: i18n.translate('kbn.server.tutorials.traefikMetrics.nameTitle', { + name: i18n.translate('home.tutorials.traefikMetrics.nameTitle', { defaultMessage: 'Traefik metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.traefikMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.traefikMetrics.shortDescription', { defaultMessage: 'Fetch monitoring metrics from Traefik.', }), - longDescription: i18n.translate('kbn.server.tutorials.traefikMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.traefikMetrics.longDescription', { defaultMessage: 'The `traefik` Metricbeat module fetches monitoring metrics from Traefik. \ [Learn more]({learnMoreLink}).', diff --git a/src/plugins/home/server/tutorials/uptime_monitors/index.ts b/src/plugins/home/server/tutorials/uptime_monitors/index.ts index 8727af823046b..207bc0cb479be 100644 --- a/src/plugins/home/server/tutorials/uptime_monitors/index.ts +++ b/src/plugins/home/server/tutorials/uptime_monitors/index.ts @@ -32,14 +32,14 @@ import { export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'uptimeMonitors', - name: i18n.translate('kbn.server.tutorials.uptimeMonitors.nameTitle', { + name: i18n.translate('home.tutorials.uptimeMonitors.nameTitle', { defaultMessage: 'Uptime Monitors', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.uptimeMonitors.shortDescription', { + shortDescription: i18n.translate('home.tutorials.uptimeMonitors.shortDescription', { defaultMessage: 'Monitor services for their availability', }), - longDescription: i18n.translate('kbn.server.tutorials.uptimeMonitors.longDescription', { + longDescription: i18n.translate('home.tutorials.uptimeMonitors.longDescription', { defaultMessage: 'Monitor services for their availability with active probing. \ Given a list of URLs, Heartbeat asks the simple question: Are you alive? \ @@ -53,12 +53,9 @@ export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSc dashboards: [], application: { path: '/app/uptime', - label: i18n.translate( - 'kbn.server.tutorials.uptimeMonitors.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Uptime App', - } - ), + label: i18n.translate('home.tutorials.uptimeMonitors.artifacts.dashboards.linkLabel', { + defaultMessage: 'Uptime App', + }), }, exportedFields: { documentationUrl: '{config.docs.beats.heartbeat}/exported-fields.html', diff --git a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts index 944b397804b3e..fc36cfe869867 100644 --- a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts +++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts @@ -33,14 +33,14 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche const moduleName = 'uwsgi'; return { id: 'uwsgiMetrics', - name: i18n.translate('kbn.server.tutorials.uwsgiMetrics.nameTitle', { + name: i18n.translate('home.tutorials.uwsgiMetrics.nameTitle', { defaultMessage: 'uWSGI metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.uwsgiMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.uwsgiMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from the uWSGI server.', }), - longDescription: i18n.translate('kbn.server.tutorials.uwsgiMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.uwsgiMetrics.longDescription', { defaultMessage: 'The `uwsgi` Metricbeat module fetches internal metrics from the uWSGI server. \ [Learn more]({learnMoreLink}).', @@ -54,12 +54,9 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche dashboards: [ { id: '32fca290-f0af-11e7-b9ff-9f96241065de-ecs', - linkLabel: i18n.translate( - 'kbn.server.tutorials.uwsgiMetrics.artifacts.dashboards.linkLabel', - { - defaultMessage: 'uWSGI metrics dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.uwsgiMetrics.artifacts.dashboards.linkLabel', { + defaultMessage: 'uWSGI metrics dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts index 51276bd859486..3ea57cdbc0e44 100644 --- a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts +++ b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts @@ -33,14 +33,14 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'vsphere'; return { id: 'vsphereMetrics', - name: i18n.translate('kbn.server.tutorials.vsphereMetrics.nameTitle', { + name: i18n.translate('home.tutorials.vsphereMetrics.nameTitle', { defaultMessage: 'vSphere metrics', }), category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.vsphereMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.vsphereMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from vSphere.', }), - longDescription: i18n.translate('kbn.server.tutorials.vsphereMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.vsphereMetrics.longDescription', { defaultMessage: 'The `vsphere` Metricbeat module fetches internal metrics from a vSphere cluster. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc isBeta: true, artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.vsphereMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.vsphereMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/windows_event_logs/index.ts b/src/plugins/home/server/tutorials/windows_event_logs/index.ts index 9e973b054a721..5349bedb21279 100644 --- a/src/plugins/home/server/tutorials/windows_event_logs/index.ts +++ b/src/plugins/home/server/tutorials/windows_event_logs/index.ts @@ -32,15 +32,15 @@ import { export function windowsEventLogsSpecProvider(context: TutorialContext): TutorialSchema { return { id: 'windowsEventLogs', - name: i18n.translate('kbn.server.tutorials.windowsEventLogs.nameTitle', { + name: i18n.translate('home.tutorials.windowsEventLogs.nameTitle', { defaultMessage: 'Windows Event Log', }), isBeta: false, category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.windowsEventLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.windowsEventLogs.shortDescription', { defaultMessage: 'Fetch logs from the Windows Event Log.', }), - longDescription: i18n.translate('kbn.server.tutorials.windowsEventLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.windowsEventLogs.longDescription', { defaultMessage: 'Use Winlogbeat to collect the logs from the Windows Event Log. \ [Learn more]({learnMoreLink}).', @@ -51,7 +51,7 @@ export function windowsEventLogsSpecProvider(context: TutorialContext): Tutorial euiIconType: 'logoWindows', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.windowsEventLogs.artifacts.application.label', { + label: i18n.translate('home.tutorials.windowsEventLogs.artifacts.application.label', { defaultMessage: 'SIEM App', }), path: '/app/siem', diff --git a/src/plugins/home/server/tutorials/windows_metrics/index.ts b/src/plugins/home/server/tutorials/windows_metrics/index.ts index 41e005ab49d9f..fa855a82b3b77 100644 --- a/src/plugins/home/server/tutorials/windows_metrics/index.ts +++ b/src/plugins/home/server/tutorials/windows_metrics/index.ts @@ -33,15 +33,15 @@ export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSc const moduleName = 'windows'; return { id: 'windowsMetrics', - name: i18n.translate('kbn.server.tutorials.windowsMetrics.nameTitle', { + name: i18n.translate('home.tutorials.windowsMetrics.nameTitle', { defaultMessage: 'Windows metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.windowsMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.windowsMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from Windows.', }), - longDescription: i18n.translate('kbn.server.tutorials.windowsMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.windowsMetrics.longDescription', { defaultMessage: 'The `windows` Metricbeat module fetches internal metrics from Windows. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSc euiIconType: 'logoWindows', artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.windowsMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.windowsMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts index 73663ae57da86..c015545046c99 100644 --- a/src/plugins/home/server/tutorials/zeek_logs/index.ts +++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts @@ -34,14 +34,14 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { const platforms = ['OSX', 'DEB', 'RPM'] as const; return { id: 'zeekLogs', - name: i18n.translate('kbn.server.tutorials.zeekLogs.nameTitle', { + name: i18n.translate('home.tutorials.zeekLogs.nameTitle', { defaultMessage: 'Zeek logs', }), category: TutorialsCategory.SIEM, - shortDescription: i18n.translate('kbn.server.tutorials.zeekLogs.shortDescription', { + shortDescription: i18n.translate('home.tutorials.zeekLogs.shortDescription', { defaultMessage: 'Collect the logs created by Zeek/Bro.', }), - longDescription: i18n.translate('kbn.server.tutorials.zeekLogs.longDescription', { + longDescription: i18n.translate('home.tutorials.zeekLogs.longDescription', { defaultMessage: 'The `zeek` Filebeat module collects the logs from \ [Zeek](https://www.zeek.org//documentation/index.html). \ @@ -55,12 +55,9 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema { dashboards: [ { id: '7cbb5410-3700-11e9-aa6d-ff445a78330c', - linkLabel: i18n.translate( - 'kbn.server.tutorials.zeekLogs.artifacts.dashboards.linkLabel', - { - defaultMessage: 'Zeek logs dashboard', - } - ), + linkLabel: i18n.translate('home.tutorials.zeekLogs.artifacts.dashboards.linkLabel', { + defaultMessage: 'Zeek logs dashboard', + }), isOverview: true, }, ], diff --git a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts index 4556371036770..dcecbb6d4a812 100644 --- a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts +++ b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts @@ -33,15 +33,15 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial const moduleName = 'zookeeper'; return { id: moduleName + 'Metrics', - name: i18n.translate('kbn.server.tutorials.zookeeperMetrics.nameTitle', { + name: i18n.translate('home.tutorials.zookeeperMetrics.nameTitle', { defaultMessage: 'Zookeeper metrics', }), isBeta: false, category: TutorialsCategory.METRICS, - shortDescription: i18n.translate('kbn.server.tutorials.zookeeperMetrics.shortDescription', { + shortDescription: i18n.translate('home.tutorials.zookeeperMetrics.shortDescription', { defaultMessage: 'Fetch internal metrics from a Zookeeper server.', }), - longDescription: i18n.translate('kbn.server.tutorials.zookeeperMetrics.longDescription', { + longDescription: i18n.translate('home.tutorials.zookeeperMetrics.longDescription', { defaultMessage: 'The `{moduleName}` Metricbeat module fetches internal metrics from a Zookeeper server. \ [Learn more]({learnMoreLink}).', @@ -52,7 +52,7 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial }), artifacts: { application: { - label: i18n.translate('kbn.server.tutorials.zookeeperMetrics.artifacts.application.label', { + label: i18n.translate('home.tutorials.zookeeperMetrics.artifacts.application.label', { defaultMessage: 'Discover', }), path: '/app/kibana#/discover', diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 71e3bdd6c8c84..366d9408df793 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -5,7 +5,7 @@ "xpack.advancedUiActions": "plugins/advanced_ui_actions", "xpack.alerting": "legacy/plugins/alerting", "xpack.triggersActionsUI": "legacy/plugins/triggers_actions_ui", - "xpack.apm": "legacy/plugins/apm", + "xpack.apm": ["legacy/plugins/apm", "plugins/apm"], "xpack.beatsManagement": "legacy/plugins/beats_management", "xpack.canvas": "legacy/plugins/canvas", "xpack.crossClusterReplication": "legacy/plugins/cross_cluster_replication", diff --git a/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts b/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts index 8aaedc59683b1..88c22d01a527a 100644 --- a/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts +++ b/x-pack/legacy/plugins/maps/server/tutorials/ems/index.ts @@ -16,14 +16,14 @@ export function emsBoundariesSpecProvider({ }) { return () => ({ id: 'emsBoundaries', - name: i18n.translate('kbn.server.tutorials.ems.nameTitle', { + name: i18n.translate('xpack.maps.tutorials.ems.nameTitle', { defaultMessage: 'EMS Boundaries', }), category: TutorialsCategory.OTHER, - shortDescription: i18n.translate('kbn.server.tutorials.ems.shortDescription', { + shortDescription: i18n.translate('xpack.maps.tutorials.ems.shortDescription', { defaultMessage: 'Administrative boundaries from Elastic Maps Service.', }), - longDescription: i18n.translate('kbn.server.tutorials.ems.longDescription', { + longDescription: i18n.translate('xpack.maps.tutorials.ems.longDescription', { defaultMessage: '[Elastic Maps Service (EMS)](https://www.elastic.co/elastic-maps-service) \ hosts tile layers and vector shapes of administrative boundaries. \ @@ -40,10 +40,10 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou id: 'EMS', instructions: [ { - title: i18n.translate('kbn.server.tutorials.ems.downloadStepTitle', { + title: i18n.translate('xpack.maps.tutorials.ems.downloadStepTitle', { defaultMessage: 'Download Elastic Maps Service boundaries', }), - textPre: i18n.translate('kbn.server.tutorials.ems.downloadStepText', { + textPre: i18n.translate('xpack.maps.tutorials.ems.downloadStepText', { defaultMessage: '1. Navigate to Elastic Maps Service [landing page]({emsLandingPageUrl}).\n\ 2. In the left sidebar, select an administrative boundary.\n\ @@ -54,10 +54,10 @@ Indexing EMS administrative boundaries in Elasticsearch allows for search on bou }), }, { - title: i18n.translate('kbn.server.tutorials.ems.uploadStepTitle', { + title: i18n.translate('xpack.maps.tutorials.ems.uploadStepTitle', { defaultMessage: 'Index Elastic Maps Service boundaries', }), - textPre: i18n.translate('kbn.server.tutorials.ems.uploadStepText', { + textPre: i18n.translate('xpack.maps.tutorials.ems.uploadStepText', { defaultMessage: '1. Open [Elastic Maps]({newMapUrl}).\n\ 2. Click `Add layer`, then select `Upload GeoJSON`.\n\ diff --git a/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts index 1d53263917109..9c66dd299b2a5 100644 --- a/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts +++ b/x-pack/plugins/apm/server/tutorial/envs/elastic_cloud.ts @@ -38,7 +38,7 @@ export function createElasticCloudInstructions(cloudSetup?: CloudSetup) { function getApmServerInstructionSet(cloudSetup?: CloudSetup) { const cloudId = cloudSetup?.cloudId; return { - title: i18n.translate('kbn.server.tutorials.apm.apmServer.title', { + title: i18n.translate('xpack.apm.tutorial.apmServer.title', { defaultMessage: 'APM Server', }), instructionVariants: [ @@ -47,7 +47,7 @@ function getApmServerInstructionSet(cloudSetup?: CloudSetup) { instructions: [ { title: 'Enable the APM Server in the ESS console', - textPre: i18n.translate('kbn.server.tutorials.apm.elasticCloud.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.elasticCloud.textPre', { defaultMessage: 'To enable the APM Server go to [the Elastic Cloud console](https://cloud.elastic.co/deployments?q={cloudId}) and enable APM in the deployment settings. Once enabled, refresh this page.', values: { cloudId }, @@ -64,7 +64,7 @@ function getApmAgentInstructionSet(cloudSetup?: CloudSetup) { const secretToken = cloudSetup?.apm.secretToken; return { - title: i18n.translate('kbn.server.tutorials.apm.elasticCloudInstructions.title', { + title: i18n.translate('xpack.apm.tutorial.elasticCloudInstructions.title', { defaultMessage: 'APM Agents', }), instructionVariants: [ diff --git a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts index 60613d526f6a4..03cd21119b30b 100644 --- a/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts +++ b/x-pack/plugins/apm/server/tutorial/envs/on_prem.ts @@ -47,14 +47,14 @@ export function onPremInstructions({ return { instructionSets: [ { - title: i18n.translate('kbn.server.tutorials.apm.apmServer.title', { + title: i18n.translate('xpack.apm.tutorial.apmServer.title', { defaultMessage: 'APM Server', }), callOut: { - title: i18n.translate('kbn.server.tutorials.apm.apmServer.callOut.title', { + title: i18n.translate('xpack.apm.tutorial.apmServer.callOut.title', { defaultMessage: 'Important: Updating to 7.0 or higher', }), - message: i18n.translate('kbn.server.tutorials.apm.apmServer.callOut.message', { + message: i18n.translate('xpack.apm.tutorial.apmServer.callOut.message', { defaultMessage: `Please make sure your APM Server is updated to 7.0 or higher. \ You can also migrate your 6.x data with the migration assistant found in Kibana's management section.`, }), @@ -79,20 +79,20 @@ export function onPremInstructions({ }, ], statusCheck: { - title: i18n.translate('kbn.server.tutorials.apm.apmServer.statusCheck.title', { + title: i18n.translate('xpack.apm.tutorial.apmServer.statusCheck.title', { defaultMessage: 'APM Server status', }), - text: i18n.translate('kbn.server.tutorials.apm.apmServer.statusCheck.text', { + text: i18n.translate('xpack.apm.tutorial.apmServer.statusCheck.text', { defaultMessage: 'Make sure APM Server is running before you start implementing the APM agents.', }), - btnLabel: i18n.translate('kbn.server.tutorials.apm.apmServer.statusCheck.btnLabel', { + btnLabel: i18n.translate('xpack.apm.tutorial.apmServer.statusCheck.btnLabel', { defaultMessage: 'Check APM Server status', }), - success: i18n.translate('kbn.server.tutorials.apm.apmServer.statusCheck.successMessage', { + success: i18n.translate('xpack.apm.tutorial.apmServer.statusCheck.successMessage', { defaultMessage: 'You have correctly setup APM Server', }), - error: i18n.translate('kbn.server.tutorials.apm.apmServer.statusCheck.errorMessage', { + error: i18n.translate('xpack.apm.tutorial.apmServer.statusCheck.errorMessage', { defaultMessage: 'No APM Server detected. Please make sure it is running and you have updated to 7.0 or higher.', }), @@ -110,7 +110,7 @@ export function onPremInstructions({ }, }, { - title: i18n.translate('kbn.server.tutorials.apm.apmAgents.title', { + title: i18n.translate('xpack.apm.tutorial.apmAgents.title', { defaultMessage: 'APM Agents', }), instructionVariants: [ @@ -152,20 +152,20 @@ export function onPremInstructions({ }, ], statusCheck: { - title: i18n.translate('kbn.server.tutorials.apm.apmAgents.statusCheck.title', { + title: i18n.translate('xpack.apm.tutorial.apmAgents.statusCheck.title', { defaultMessage: 'Agent status', }), - text: i18n.translate('kbn.server.tutorials.apm.apmAgents.statusCheck.text', { + text: i18n.translate('xpack.apm.tutorial.apmAgents.statusCheck.text', { defaultMessage: 'Make sure your application is running and the agents are sending data.', }), - btnLabel: i18n.translate('kbn.server.tutorials.apm.apmAgents.statusCheck.btnLabel', { + btnLabel: i18n.translate('xpack.apm.tutorial.apmAgents.statusCheck.btnLabel', { defaultMessage: 'Check agent status', }), - success: i18n.translate('kbn.server.tutorials.apm.apmAgents.statusCheck.successMessage', { + success: i18n.translate('xpack.apm.tutorial.apmAgents.statusCheck.successMessage', { defaultMessage: 'Data successfully received from one or more agents', }), - error: i18n.translate('kbn.server.tutorials.apm.apmAgents.statusCheck.errorMessage', { + error: i18n.translate('xpack.apm.tutorial.apmAgents.statusCheck.errorMessage', { defaultMessage: 'No data has been received from agents yet', }), esHitsCheck: { diff --git a/x-pack/plugins/apm/server/tutorial/index.ts b/x-pack/plugins/apm/server/tutorial/index.ts index be04bf545d3fd..bb5d553b26b36 100644 --- a/x-pack/plugins/apm/server/tutorial/index.ts +++ b/x-pack/plugins/apm/server/tutorial/index.ts @@ -11,7 +11,7 @@ import apmIndexPattern from './index_pattern.json'; import { CloudSetup } from '../../../cloud/server'; import { ArtifactsSchema, TutorialsCategory } from '../../../../../src/plugins/home/server'; -const apmIntro = i18n.translate('kbn.server.tutorials.apm.introduction', { +const apmIntro = i18n.translate('xpack.apm.tutorial.introduction', { defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.', }); @@ -47,7 +47,7 @@ export const tutorialProvider = ({ { id: '8d3ed660-7828-11e7-8c47-65b845b5cfb3', linkLabel: i18n.translate( - 'kbn.server.tutorials.apm.specProvider.artifacts.dashboards.linkLabel', + 'xpack.apm.tutorial.specProvider.artifacts.dashboards.linkLabel', { defaultMessage: 'APM dashboard', } @@ -60,7 +60,7 @@ export const tutorialProvider = ({ if (isEnabled) { artifacts.application = { path: '/app/apm', - label: i18n.translate('kbn.server.tutorials.apm.specProvider.artifacts.application.label', { + label: i18n.translate('xpack.apm.tutorial.specProvider.artifacts.application.label', { defaultMessage: 'Launch APM', }), }; @@ -68,12 +68,12 @@ export const tutorialProvider = ({ return { id: 'apm', - name: i18n.translate('kbn.server.tutorials.apm.specProvider.name', { + name: i18n.translate('xpack.apm.tutorial.specProvider.name', { defaultMessage: 'APM', }), category: TutorialsCategory.OTHER, shortDescription: apmIntro, - longDescription: i18n.translate('kbn.server.tutorials.apm.specProvider.longDescription', { + longDescription: i18n.translate('xpack.apm.tutorial.specProvider.longDescription', { defaultMessage: 'Application Performance Monitoring (APM) collects in-depth \ performance metrics and errors from inside your application. \ @@ -91,7 +91,7 @@ It allows you to monitor the performance of thousands of applications in real ti previewImagePath: '/plugins/kibana/home/tutorial_resources/apm/apm.png', savedObjects, savedObjectsInstallMsg: i18n.translate( - 'kbn.server.tutorials.apm.specProvider.savedObjectsInstallMsg', + 'xpack.apm.tutorial.specProvider.savedObjectsInstallMsg', { defaultMessage: 'An APM index pattern is required for some features in the APM UI.', } diff --git a/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts b/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts index 7b8a463d0feca..d1ef92df20f6f 100644 --- a/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts +++ b/x-pack/plugins/apm/server/tutorial/instructions/apm_agent_instructions.ts @@ -8,47 +8,44 @@ import { i18n } from '@kbn/i18n'; export const createNodeAgentInstructions = (apmServerUrl = '', secretToken = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.nodeClient.install.title', { + title: i18n.translate('xpack.apm.tutorial.nodeClient.install.title', { defaultMessage: 'Install the APM agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.nodeClient.install.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.nodeClient.install.textPre', { defaultMessage: 'Install the APM agent for Node.js as a dependency to your application.', }), commands: ['npm install elastic-apm-node --save'], }, { - title: i18n.translate('kbn.server.tutorials.apm.nodeClient.configure.title', { + title: i18n.translate('xpack.apm.tutorial.nodeClient.configure.title', { defaultMessage: 'Configure the agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.nodeClient.configure.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.nodeClient.configure.textPre', { defaultMessage: 'Agents are libraries that run inside of your application process. \ APM services are created programmatically based on the `serviceName`. \ This agent supports a vararity of frameworks but can also be used with your custom stack.', }), commands: `// ${i18n.translate( - 'kbn.server.tutorials.apm.nodeClient.configure.commands.addThisToTheFileTopComment', + 'xpack.apm.tutorial.nodeClient.configure.commands.addThisToTheFileTopComment', { defaultMessage: 'Add this to the VERY top of the first file loaded in your app', } )} var apm = require('elastic-apm-node').start({curlyOpen} // ${i18n.translate( - 'kbn.server.tutorials.apm.nodeClient.configure.commands.setRequiredServiceNameComment', + 'xpack.apm.tutorial.nodeClient.configure.commands.setRequiredServiceNameComment', { defaultMessage: 'Override service name from package.json', } )} - // ${i18n.translate( - 'kbn.server.tutorials.apm.nodeClient.configure.commands.allowedCharactersComment', - { - defaultMessage: 'Allowed characters: a-z, A-Z, 0-9, -, _, and space', - } - )} + // ${i18n.translate('xpack.apm.tutorial.nodeClient.configure.commands.allowedCharactersComment', { + defaultMessage: 'Allowed characters: a-z, A-Z, 0-9, -, _, and space', + })} serviceName: '', // ${i18n.translate( - 'kbn.server.tutorials.apm.nodeClient.configure.commands.useIfApmRequiresTokenComment', + 'xpack.apm.tutorial.nodeClient.configure.commands.useIfApmRequiresTokenComment', { defaultMessage: 'Use if APM Server requires a token', } @@ -56,7 +53,7 @@ var apm = require('elastic-apm-node').start({curlyOpen} secretToken: '${secretToken}', // ${i18n.translate( - 'kbn.server.tutorials.apm.nodeClient.configure.commands.setCustomApmServerUrlComment', + 'xpack.apm.tutorial.nodeClient.configure.commands.setCustomApmServerUrlComment', { defaultMessage: 'Set custom APM Server URL (default: {defaultApmServerUrl})', values: { defaultApmServerUrl: 'http://localhost:8200' }, @@ -64,7 +61,7 @@ var apm = require('elastic-apm-node').start({curlyOpen} )} serverUrl: '${apmServerUrl}' {curlyClose})`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.nodeClient.configure.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.nodeClient.configure.textPost', { defaultMessage: 'See [the documentation]({documentationLink}) for advanced usage, including how to use with \ [Babel/ES Modules]({babelEsModulesLink}).', @@ -79,25 +76,25 @@ var apm = require('elastic-apm-node').start({curlyOpen} export const createDjangoAgentInstructions = (apmServerUrl = '', secretToken = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.djangoClient.install.title', { + title: i18n.translate('xpack.apm.tutorial.djangoClient.install.title', { defaultMessage: 'Install the APM agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.djangoClient.install.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.djangoClient.install.textPre', { defaultMessage: 'Install the APM agent for Python as a dependency.', }), commands: ['$ pip install elastic-apm'], }, { - title: i18n.translate('kbn.server.tutorials.apm.djangoClient.configure.title', { + title: i18n.translate('xpack.apm.tutorial.djangoClient.configure.title', { defaultMessage: 'Configure the agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.djangoClient.configure.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.djangoClient.configure.textPre', { defaultMessage: 'Agents are libraries that run inside of your application process. \ APM services are created programmatically based on the `SERVICE_NAME`.', }), commands: `# ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.addAgentComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.addAgentComment', { defaultMessage: 'Add the agent to the installed apps', } @@ -109,13 +106,13 @@ INSTALLED_APPS = ( ELASTIC_APM = {curlyOpen} # ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.setRequiredServiceNameComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.setRequiredServiceNameComment', { defaultMessage: 'Set required service name. Allowed characters:', } )} # ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.allowedCharactersComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.allowedCharactersComment', { defaultMessage: 'a-z, A-Z, 0-9, -, _, and space', } @@ -123,7 +120,7 @@ ELASTIC_APM = {curlyOpen} 'SERVICE_NAME': '', # ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.useIfApmServerRequiresTokenComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.useIfApmServerRequiresTokenComment', { defaultMessage: 'Use if APM Server requires a token', } @@ -131,7 +128,7 @@ ELASTIC_APM = {curlyOpen} 'SECRET_TOKEN': '${secretToken}', # ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.setCustomApmServerUrlComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment', { defaultMessage: 'Set custom APM Server URL (default: {defaultApmServerUrl})', values: { defaultApmServerUrl: 'http://localhost:8200' }, @@ -141,7 +138,7 @@ ELASTIC_APM = {curlyOpen} {curlyClose} # ${i18n.translate( - 'kbn.server.tutorials.apm.djangoClient.configure.commands.addTracingMiddlewareComment', + 'xpack.apm.tutorial.djangoClient.configure.commands.addTracingMiddlewareComment', { defaultMessage: 'To send performance metrics, add our tracing middleware:', } @@ -150,7 +147,7 @@ MIDDLEWARE = ( 'elasticapm.contrib.django.middleware.TracingMiddleware', #... )`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.djangoClient.configure.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.djangoClient.configure.textPost', { defaultMessage: 'See the [documentation]({documentationLink}) for advanced usage.', values: { documentationLink: @@ -162,25 +159,25 @@ MIDDLEWARE = ( export const createFlaskAgentInstructions = (apmServerUrl = '', secretToken = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.flaskClient.install.title', { + title: i18n.translate('xpack.apm.tutorial.flaskClient.install.title', { defaultMessage: 'Install the APM agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.flaskClient.install.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.flaskClient.install.textPre', { defaultMessage: 'Install the APM agent for Python as a dependency.', }), commands: ['$ pip install elastic-apm[flask]'], }, { - title: i18n.translate('kbn.server.tutorials.apm.flaskClient.configure.title', { + title: i18n.translate('xpack.apm.tutorial.flaskClient.configure.title', { defaultMessage: 'Configure the agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.flaskClient.configure.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.flaskClient.configure.textPre', { defaultMessage: 'Agents are libraries that run inside of your application process. \ APM services are created programmatically based on the `SERVICE_NAME`.', }), commands: `# ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.initializeUsingEnvironmentVariablesComment', + 'xpack.apm.tutorial.flaskClient.configure.commands.initializeUsingEnvironmentVariablesComment', { defaultMessage: 'initialize using environment variables', } @@ -189,30 +186,24 @@ from elasticapm.contrib.flask import ElasticAPM app = Flask(__name__) apm = ElasticAPM(app) -# ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.configureElasticApmComment', - { - defaultMessage: "or configure to use ELASTIC_APM in your application's settings", - } - )} +# ${i18n.translate('xpack.apm.tutorial.flaskClient.configure.commands.configureElasticApmComment', { + defaultMessage: "or configure to use ELASTIC_APM in your application's settings", + })} from elasticapm.contrib.flask import ElasticAPM app.config['ELASTIC_APM'] = {curlyOpen} # ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.setRequiredServiceNameComment', + 'xpack.apm.tutorial.flaskClient.configure.commands.setRequiredServiceNameComment', { defaultMessage: 'Set required service name. Allowed characters:', } )} - # ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.allowedCharactersComment', - { - defaultMessage: 'a-z, A-Z, 0-9, -, _, and space', - } - )} + # ${i18n.translate('xpack.apm.tutorial.flaskClient.configure.commands.allowedCharactersComment', { + defaultMessage: 'a-z, A-Z, 0-9, -, _, and space', + })} 'SERVICE_NAME': '', # ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.useIfApmServerRequiresTokenComment', + 'xpack.apm.tutorial.flaskClient.configure.commands.useIfApmServerRequiresTokenComment', { defaultMessage: 'Use if APM Server requires a token', } @@ -220,7 +211,7 @@ app.config['ELASTIC_APM'] = {curlyOpen} 'SECRET_TOKEN': '${secretToken}', # ${i18n.translate( - 'kbn.server.tutorials.apm.flaskClient.configure.commands.setCustomApmServerUrlComment', + 'xpack.apm.tutorial.flaskClient.configure.commands.setCustomApmServerUrlComment', { defaultMessage: 'Set custom APM Server URL (default: {defaultApmServerUrl})', values: { defaultApmServerUrl: 'http://localhost:8200' }, @@ -230,7 +221,7 @@ app.config['ELASTIC_APM'] = {curlyOpen} {curlyClose} apm = ElasticAPM(app)`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.flaskClient.configure.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.flaskClient.configure.textPost', { defaultMessage: 'See the [documentation]({documentationLink}) for advanced usage.', values: { documentationLink: @@ -242,19 +233,19 @@ apm = ElasticAPM(app)`.split('\n'), export const createRailsAgentInstructions = (apmServerUrl = '', secretToken = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.railsClient.install.title', { + title: i18n.translate('xpack.apm.tutorial.railsClient.install.title', { defaultMessage: 'Install the APM agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.railsClient.install.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.railsClient.install.textPre', { defaultMessage: 'Add the agent to your Gemfile.', }), commands: [`gem 'elastic-apm'`], }, { - title: i18n.translate('kbn.server.tutorials.apm.railsClient.configure.title', { + title: i18n.translate('xpack.apm.tutorial.railsClient.configure.title', { defaultMessage: 'Configure the agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.railsClient.configure.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.railsClient.configure.textPre', { defaultMessage: 'APM is automatically started when your app boots. Configure the agent, by creating the config file {configFile}', values: { configFile: '`config/elastic_apm.yml`' }, @@ -270,7 +261,7 @@ export const createRailsAgentInstructions = (apmServerUrl = '', secretToken = '' # Set custom APM Server URL (default: http://localhost:8200) # server_url: '${apmServerUrl || 'http://localhost:8200'}'`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.railsClient.configure.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.railsClient.configure.textPost', { defaultMessage: 'See the [documentation]({documentationLink}) for configuration options and advanced usage.\n\n', values: { @@ -282,19 +273,19 @@ export const createRailsAgentInstructions = (apmServerUrl = '', secretToken = '' export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.rackClient.install.title', { + title: i18n.translate('xpack.apm.tutorial.rackClient.install.title', { defaultMessage: 'Install the APM agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.rackClient.install.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.rackClient.install.textPre', { defaultMessage: 'Add the agent to your Gemfile.', }), commands: [`gem 'elastic-apm'`], }, { - title: i18n.translate('kbn.server.tutorials.apm.rackClient.configure.title', { + title: i18n.translate('xpack.apm.tutorial.rackClient.configure.title', { defaultMessage: 'Configure the agent', }), - textPre: i18n.translate('kbn.server.tutorials.apm.rackClient.configure.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.rackClient.configure.textPre', { defaultMessage: 'For Rack or a compatible framework (e.g. Sinatra), include the middleware in your app and start the agent.', }), @@ -309,13 +300,13 @@ export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') ElasticAPM.start( app: MySinatraApp, # ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.configure.commands.requiredComment', + 'xpack.apm.tutorial.rackClient.configure.commands.requiredComment', { defaultMessage: 'required', } )} config_file: '' # ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.configure.commands.optionalComment', + 'xpack.apm.tutorial.rackClient.configure.commands.optionalComment', { defaultMessage: 'optional, defaults to config/elastic_apm.yml', } @@ -327,23 +318,20 @@ export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') at_exit {curlyOpen} ElasticAPM.stop {curlyClose}`.split('\n'), }, { - title: i18n.translate('kbn.server.tutorials.apm.rackClient.createConfig.title', { + title: i18n.translate('xpack.apm.tutorial.rackClient.createConfig.title', { defaultMessage: 'Create config file', }), - textPre: i18n.translate('kbn.server.tutorials.apm.rackClient.createConfig.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.rackClient.createConfig.textPre', { defaultMessage: 'Create a config file {configFile}:', values: { configFile: '`config/elastic_apm.yml`' }, }), commands: `# config/elastic_apm.yml: +# ${i18n.translate('xpack.apm.tutorial.rackClient.createConfig.commands.setServiceNameComment', { + defaultMessage: 'Set service name - allowed characters: a-z, A-Z, 0-9, -, _ and space', + })} # ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.createConfig.commands.setServiceNameComment', - { - defaultMessage: 'Set service name - allowed characters: a-z, A-Z, 0-9, -, _ and space', - } - )} -# ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.createConfig.commands.defaultsToTheNameOfRackAppClassComment', + 'xpack.apm.tutorial.rackClient.createConfig.commands.defaultsToTheNameOfRackAppClassComment', { defaultMessage: "Defaults to the name of your Rack app's class.", } @@ -351,7 +339,7 @@ export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') # service_name: 'my-service' # ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.createConfig.commands.useIfApmServerRequiresTokenComment', + 'xpack.apm.tutorial.rackClient.createConfig.commands.useIfApmServerRequiresTokenComment', { defaultMessage: 'Use if APM Server requires a token', } @@ -359,14 +347,14 @@ export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') # secret_token: '${secretToken}' # ${i18n.translate( - 'kbn.server.tutorials.apm.rackClient.createConfig.commands.setCustomApmServerComment', + 'xpack.apm.tutorial.rackClient.createConfig.commands.setCustomApmServerComment', { defaultMessage: 'Set custom APM Server URL (default: {defaultServerUrl})', values: { defaultServerUrl: 'http://localhost:8200' }, } )} # server_url: '${apmServerUrl || 'http://localhost:8200'}'`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.rackClient.createConfig.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.rackClient.createConfig.textPost', { defaultMessage: 'See the [documentation]({documentationLink}) for configuration options and advanced usage.\n\n', values: { @@ -378,10 +366,10 @@ export const createRackAgentInstructions = (apmServerUrl = '', secretToken = '') export const createJsAgentInstructions = (apmServerUrl = '') => [ { - title: i18n.translate('kbn.server.tutorials.apm.jsClient.enableRealUserMonitoring.title', { + title: i18n.translate('xpack.apm.tutorial.jsClient.enableRealUserMonitoring.title', { defaultMessage: 'Enable Real User Monitoring support in APM server', }), - textPre: i18n.translate('kbn.server.tutorials.apm.jsClient.enableRealUserMonitoring.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.jsClient.enableRealUserMonitoring.textPre', { defaultMessage: 'APM Server disables RUM support by default. See the [documentation]({documentationLink}) \ for details on how to enable RUM support.', @@ -392,10 +380,10 @@ for details on how to enable RUM support.', }), }, { - title: i18n.translate('kbn.server.tutorials.apm.jsClient.installDependency.title', { + title: i18n.translate('xpack.apm.tutorial.jsClient.installDependency.title', { defaultMessage: 'Set up the Agent as a dependency', }), - textPre: i18n.translate('kbn.server.tutorials.apm.jsClient.installDependency.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.jsClient.installDependency.textPre', { defaultMessage: 'You can install the Agent as a dependency to your application with \ `npm install @elastic/apm-rum --save`.\n\n\ @@ -405,7 +393,7 @@ The Agent can then be initialized and configured in your application like this:' var apm = initApm({curlyOpen} // ${i18n.translate( - 'kbn.server.tutorials.apm.jsClient.installDependency.commands.setRequiredServiceNameComment', + 'xpack.apm.tutorial.jsClient.installDependency.commands.setRequiredServiceNameComment', { defaultMessage: 'Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)', @@ -414,7 +402,7 @@ var apm = initApm({curlyOpen} serviceName: 'your-app-name', // ${i18n.translate( - 'kbn.server.tutorials.apm.jsClient.installDependency.commands.setCustomApmServerUrlComment', + 'xpack.apm.tutorial.jsClient.installDependency.commands.setCustomApmServerUrlComment', { defaultMessage: 'Set custom APM Server URL (default: {defaultApmServerUrl})', values: { defaultApmServerUrl: 'http://localhost:8200' }, @@ -423,14 +411,14 @@ var apm = initApm({curlyOpen} serverUrl: '${apmServerUrl}', // ${i18n.translate( - 'kbn.server.tutorials.apm.jsClient.installDependency.commands.setServiceVersionComment', + 'xpack.apm.tutorial.jsClient.installDependency.commands.setServiceVersionComment', { defaultMessage: 'Set service version (required for source map feature)', } )} serviceVersion: '' {curlyClose})`.split('\n'), - textPost: i18n.translate('kbn.server.tutorials.apm.jsClient.installDependency.textPost', { + textPost: i18n.translate('xpack.apm.tutorial.jsClient.installDependency.textPost', { defaultMessage: 'Framework integrations, like React or Angular, have custom dependencies. \ See the [integration documentation]({docLink}) for more information.', @@ -441,10 +429,10 @@ See the [integration documentation]({docLink}) for more information.', }), }, { - title: i18n.translate('kbn.server.tutorials.apm.jsClient.scriptTags.title', { + title: i18n.translate('xpack.apm.tutorial.jsClient.scriptTags.title', { defaultMessage: 'Set up the Agent with Script Tags', }), - textPre: i18n.translate('kbn.server.tutorials.apm.jsClient.scriptTags.textPre', { + textPre: i18n.translate('xpack.apm.tutorial.jsClient.scriptTags.textPre', { defaultMessage: "Alternatively, you can use Script tags to set up and configure the Agent. \ Add a `