From 714111d08be3b726ed1154aef16f67ea239b315d Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 16:19:41 -0700
Subject: [PATCH 01/12] Add methods to register directory notices and header
links in tutorials, and use registered components when rendering tutorial
directory
---
.../components/tutorial_directory.js | 57 +++++++--
.../tutorials/tutorial_service.mock.ts | 4 +
.../tutorials/tutorial_service.test.ts | 55 --------
.../tutorials/tutorial_service.test.tsx | 119 ++++++++++++++++++
.../services/tutorials/tutorial_service.ts | 42 +++++++
5 files changed, 215 insertions(+), 62 deletions(-)
delete mode 100644 src/plugins/home/public/services/tutorials/tutorial_service.test.ts
create mode 100644 src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
diff --git a/src/plugins/home/public/application/components/tutorial_directory.js b/src/plugins/home/public/application/components/tutorial_directory.js
index 774b23af11ac8..38b5129e54903 100644
--- a/src/plugins/home/public/application/components/tutorial_directory.js
+++ b/src/plugins/home/public/application/components/tutorial_directory.js
@@ -30,6 +30,7 @@ import {
EuiTab,
EuiFlexItem,
EuiFlexGrid,
+ EuiFlexGroup,
EuiSpacer,
EuiTitle,
EuiPageBody,
@@ -227,18 +228,60 @@ class TutorialDirectoryUi extends React.Component {
);
};
+ renderNotices = () => {
+ const notices = getServices().tutorialService.getDirectoryNotices();
+ return notices.length ? (
+
+ {notices.map((notice) => (
+ {notice}
+ ))}
+
+ ) : null;
+ };
+
+ renderHeader = () => {
+ const headerLinks = getServices().tutorialService.getDirectoryHeaderLinks();
+ const notices = this.renderNotices();
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+ {headerLinks.length ? (
+
+
+ {headerLinks.map((headerLink) => (
+ {headerLink}
+ ))}
+
+
+ ) : null}
+
+ {notices ? (
+ <>
+
+ {notices}
+ >
+ ) : null}
+ >
+ );
+ };
+
render() {
return (
-
-
-
-
-
-
+ {this.renderHeader()}
-
{this.renderTabs()}
{this.renderTabContent()}
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts b/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
index bd604fb231dee..a3bfdc6d443d9 100644
--- a/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
@@ -22,6 +22,8 @@ import { TutorialService, TutorialServiceSetup } from './tutorial_service';
const createSetupMock = (): jest.Mocked => {
const setup = {
setVariable: jest.fn(),
+ registerDirectoryNotice: jest.fn(),
+ registerDirectoryHeaderLink: jest.fn(),
};
return setup;
};
@@ -30,6 +32,8 @@ const createMock = (): jest.Mocked> => {
const service = {
setup: jest.fn(),
getVariables: jest.fn(() => ({})),
+ getDirectoryNotices: jest.fn(() => []),
+ getDirectoryHeaderLinks: jest.fn(() => []),
};
service.setup.mockImplementation(createSetupMock);
return service;
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.test.ts b/src/plugins/home/public/services/tutorials/tutorial_service.test.ts
deleted file mode 100644
index f4bcd71a39e8a..0000000000000
--- a/src/plugins/home/public/services/tutorials/tutorial_service.test.ts
+++ /dev/null
@@ -1,55 +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 { TutorialService } from './tutorial_service';
-
-describe('TutorialService', () => {
- describe('setup', () => {
- test('allows multiple set calls', () => {
- const setup = new TutorialService().setup();
- expect(() => {
- setup.setVariable('abc', 123);
- setup.setVariable('def', 456);
- }).not.toThrow();
- });
-
- test('throws when same variable is set twice', () => {
- const setup = new TutorialService().setup();
- expect(() => {
- setup.setVariable('abc', 123);
- setup.setVariable('abc', 456);
- }).toThrow();
- });
- });
-
- describe('getVariables', () => {
- test('returns empty object', () => {
- const service = new TutorialService();
- expect(service.getVariables()).toEqual({});
- });
-
- test('returns last state of update calls', () => {
- const service = new TutorialService();
- const setup = service.setup();
- setup.setVariable('abc', 123);
- setup.setVariable('def', { subKey: 456 });
- expect(service.getVariables()).toEqual({ abc: 123, def: { subKey: 456 } });
- });
- });
-});
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx b/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
new file mode 100644
index 0000000000000..ca8e48c2796c1
--- /dev/null
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
@@ -0,0 +1,119 @@
+/*
+ * 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 React from 'react';
+import { TutorialService } from './tutorial_service';
+
+describe('TutorialService', () => {
+ describe('setup', () => {
+ test('allows multiple set variable calls', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.setVariable('abc', 123);
+ setup.setVariable('def', 456);
+ }).not.toThrow();
+ });
+
+ test('throws when same variable is set twice', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.setVariable('abc', 123);
+ setup.setVariable('abc', 456);
+ }).toThrow();
+ });
+
+ test('allows multiple register directory notice calls', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerDirectoryNotice('abc', () => );
+ setup.registerDirectoryNotice('def', () => );
+ }).not.toThrow();
+ });
+
+ test('throws when same directory notice is registered twice', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerDirectoryNotice('abc', () => );
+ setup.registerDirectoryNotice('abc', () => );
+ }).toThrow();
+ });
+
+ test('allows multiple register directory header link calls', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerDirectoryHeaderLink('abc', () => 123);
+ setup.registerDirectoryHeaderLink('def', () => 456);
+ }).not.toThrow();
+ });
+
+ test('throws when same directory header link is registered twice', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerDirectoryHeaderLink('abc', () => 123);
+ setup.registerDirectoryHeaderLink('abc', () => 456);
+ }).toThrow();
+ });
+ });
+
+ describe('getVariables', () => {
+ test('returns empty object', () => {
+ const service = new TutorialService();
+ expect(service.getVariables()).toEqual({});
+ });
+
+ test('returns last state of update calls', () => {
+ const service = new TutorialService();
+ const setup = service.setup();
+ setup.setVariable('abc', 123);
+ setup.setVariable('def', { subKey: 456 });
+ expect(service.getVariables()).toEqual({ abc: 123, def: { subKey: 456 } });
+ });
+ });
+
+ describe('getDirectoryNotices', () => {
+ test('returns empty array', () => {
+ const service = new TutorialService();
+ expect(service.getDirectoryNotices()).toEqual([]);
+ });
+
+ test('returns last state of register calls', () => {
+ const service = new TutorialService();
+ const setup = service.setup();
+ const notices = [() => , () => ];
+ setup.registerDirectoryNotice('abc', notices[0]);
+ setup.registerDirectoryNotice('def', notices[1]);
+ expect(service.getDirectoryNotices()).toEqual(notices);
+ });
+ });
+
+ describe('getDirectoryHeaderLinks', () => {
+ test('returns empty array', () => {
+ const service = new TutorialService();
+ expect(service.getDirectoryHeaderLinks()).toEqual([]);
+ });
+
+ test('returns last state of register calls', () => {
+ const service = new TutorialService();
+ const setup = service.setup();
+ const links = [() => 123, () => 456];
+ setup.registerDirectoryHeaderLink('abc', links[0]);
+ setup.registerDirectoryHeaderLink('def', links[1]);
+ expect(service.getDirectoryHeaderLinks()).toEqual(links);
+ });
+ });
+});
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.ts b/src/plugins/home/public/services/tutorials/tutorial_service.ts
index 38297a6437315..9a1faf2650896 100644
--- a/src/plugins/home/public/services/tutorials/tutorial_service.ts
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.ts
@@ -16,12 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
+import React from 'react';
/** @public */
export type TutorialVariables = Partial>;
+/** @public */
+export type TutorialDirectoryNoticeComponent = React.FC;
+
+/** @public */
+export type TutorialDirectoryHeaderLinkComponent = React.FC;
+
export class TutorialService {
private tutorialVariables: TutorialVariables = {};
+ private tutorialDirectoryNotices: { [key: string]: TutorialDirectoryNoticeComponent } = {};
+ private tutorialDirectoryHeaderLinks: {
+ [key: string]: TutorialDirectoryHeaderLinkComponent;
+ } = {};
public setup() {
return {
@@ -34,12 +45,43 @@ export class TutorialService {
}
this.tutorialVariables[key] = value;
},
+
+ /**
+ * Registers a component that will be rendered at the top of tutorial directory page.
+ */
+ registerDirectoryNotice: (id: string, component: TutorialDirectoryNoticeComponent) => {
+ if (this.tutorialDirectoryNotices[id]) {
+ throw new Error(`directory notice ${id} already set`);
+ }
+ this.tutorialDirectoryNotices[id] = component;
+ },
+
+ /**
+ * Registers a component that will be rendered next to tutorial directory title/header area.
+ */
+ registerDirectoryHeaderLink: (
+ id: string,
+ component: TutorialDirectoryHeaderLinkComponent
+ ) => {
+ if (this.tutorialDirectoryHeaderLinks[id]) {
+ throw new Error(`directory header link ${id} already set`);
+ }
+ this.tutorialDirectoryHeaderLinks[id] = component;
+ },
};
}
public getVariables() {
return this.tutorialVariables;
}
+
+ public getDirectoryNotices() {
+ return Object.values(this.tutorialDirectoryNotices);
+ }
+
+ public getDirectoryHeaderLinks() {
+ return Object.values(this.tutorialDirectoryHeaderLinks);
+ }
}
export type TutorialServiceSetup = ReturnType;
From 7d53f16fc6cfa39f25d4b82105ab2e8ec7c93fa6 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 16:54:11 -0700
Subject: [PATCH 02/12] Add methods to register module notices components in
tutorial pages, and use registered components when rendering tutorial page
---
.../components/tutorial/tutorial.js | 21 ++++++++++++
.../components/tutorial/tutorial.test.js | 3 ++
.../tutorials/tutorial_service.mock.ts | 2 ++
.../tutorials/tutorial_service.test.tsx | 32 +++++++++++++++++++
.../services/tutorials/tutorial_service.ts | 20 ++++++++++++
.../tutorials/lib/tutorials_registry_types.ts | 1 +
6 files changed, 79 insertions(+)
diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.js b/src/plugins/home/public/application/components/tutorial/tutorial.js
index 576f732278b8e..35c75d572ddd6 100644
--- a/src/plugins/home/public/application/components/tutorial/tutorial.js
+++ b/src/plugins/home/public/application/components/tutorial/tutorial.js
@@ -334,6 +334,26 @@ class TutorialUi extends React.Component {
}
};
+ renderModuleNotices() {
+ const notices = getServices().tutorialService.getModuleNotices();
+ if (notices.length && this.state.tutorial.moduleName) {
+ return (
+ <>
+
+
+ {notices.map((ModuleNotice) => (
+
+
+
+ ))}
+
+ >
+ );
+ } else {
+ return null;
+ }
+ }
+
render() {
let content;
if (this.state.notFound) {
@@ -382,6 +402,7 @@ class TutorialUi extends React.Component {
isBeta={this.state.tutorial.isBeta}
/>
+ {this.renderModuleNotices()}
{this.renderInstructionSetsToggle()}
diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.test.js b/src/plugins/home/public/application/components/tutorial/tutorial.test.js
index 23b0dc50018c1..9944ac4848bc6 100644
--- a/src/plugins/home/public/application/components/tutorial/tutorial.test.js
+++ b/src/plugins/home/public/application/components/tutorial/tutorial.test.js
@@ -28,6 +28,9 @@ jest.mock('../../kibana_services', () => ({
chrome: {
setBreadcrumbs: () => {},
},
+ tutorialService: {
+ getModuleNotices: () => [],
+ },
}),
}));
jest.mock('../../../../../kibana_react/public', () => {
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts b/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
index a3bfdc6d443d9..667730e25a2e3 100644
--- a/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.mock.ts
@@ -24,6 +24,7 @@ const createSetupMock = (): jest.Mocked => {
setVariable: jest.fn(),
registerDirectoryNotice: jest.fn(),
registerDirectoryHeaderLink: jest.fn(),
+ registerModuleNotice: jest.fn(),
};
return setup;
};
@@ -34,6 +35,7 @@ const createMock = (): jest.Mocked> => {
getVariables: jest.fn(() => ({})),
getDirectoryNotices: jest.fn(() => []),
getDirectoryHeaderLinks: jest.fn(() => []),
+ getModuleNotices: jest.fn(() => []),
};
service.setup.mockImplementation(createSetupMock);
return service;
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx b/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
index ca8e48c2796c1..2a60550e39d90 100644
--- a/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.test.tsx
@@ -68,6 +68,22 @@ describe('TutorialService', () => {
setup.registerDirectoryHeaderLink('abc', () => 456);
}).toThrow();
});
+
+ test('allows multiple register module notice calls', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerModuleNotice('abc', () => );
+ setup.registerModuleNotice('def', () => );
+ }).not.toThrow();
+ });
+
+ test('throws when same module notice is registered twice', () => {
+ const setup = new TutorialService().setup();
+ expect(() => {
+ setup.registerModuleNotice('abc', () => );
+ setup.registerModuleNotice('abc', () => );
+ }).toThrow();
+ });
});
describe('getVariables', () => {
@@ -116,4 +132,20 @@ describe('TutorialService', () => {
expect(service.getDirectoryHeaderLinks()).toEqual(links);
});
});
+
+ describe('getModuleNotices', () => {
+ test('returns empty array', () => {
+ const service = new TutorialService();
+ expect(service.getModuleNotices()).toEqual([]);
+ });
+
+ test('returns last state of register calls', () => {
+ const service = new TutorialService();
+ const setup = service.setup();
+ const notices = [() => , () => ];
+ setup.registerModuleNotice('abc', notices[0]);
+ setup.registerModuleNotice('def', notices[1]);
+ expect(service.getModuleNotices()).toEqual(notices);
+ });
+ });
});
diff --git a/src/plugins/home/public/services/tutorials/tutorial_service.ts b/src/plugins/home/public/services/tutorials/tutorial_service.ts
index 9a1faf2650896..538cea1c70458 100644
--- a/src/plugins/home/public/services/tutorials/tutorial_service.ts
+++ b/src/plugins/home/public/services/tutorials/tutorial_service.ts
@@ -27,12 +27,18 @@ export type TutorialDirectoryNoticeComponent = React.FC;
/** @public */
export type TutorialDirectoryHeaderLinkComponent = React.FC;
+/** @public */
+export type TutorialModuleNoticeComponent = React.FC<{
+ moduleName: string;
+}>;
+
export class TutorialService {
private tutorialVariables: TutorialVariables = {};
private tutorialDirectoryNotices: { [key: string]: TutorialDirectoryNoticeComponent } = {};
private tutorialDirectoryHeaderLinks: {
[key: string]: TutorialDirectoryHeaderLinkComponent;
} = {};
+ private tutorialModuleNotices: { [key: string]: TutorialModuleNoticeComponent } = {};
public setup() {
return {
@@ -68,6 +74,16 @@ export class TutorialService {
}
this.tutorialDirectoryHeaderLinks[id] = component;
},
+
+ /**
+ * Registers a component that will be rendered in the description of a tutorial that is associated with a module.
+ */
+ registerModuleNotice: (id: string, component: TutorialModuleNoticeComponent) => {
+ if (this.tutorialModuleNotices[id]) {
+ throw new Error(`module notice ${id} already set`);
+ }
+ this.tutorialModuleNotices[id] = component;
+ },
};
}
@@ -82,6 +98,10 @@ export class TutorialService {
public getDirectoryHeaderLinks() {
return Object.values(this.tutorialDirectoryHeaderLinks);
}
+
+ public getModuleNotices() {
+ return Object.values(this.tutorialModuleNotices);
+ }
}
export type TutorialServiceSetup = ReturnType;
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 210d563696667..a6b70cd70c02d 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
@@ -80,6 +80,7 @@ export interface TutorialSchema {
id: string;
category: TutorialsCategory;
name: string;
+ moduleName?: string;
isBeta?: boolean;
shortDescription: string;
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/display/icons;
From 4c42fef1e436b0cd5bf04b8b771666898cace484 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 16:58:00 -0700
Subject: [PATCH 03/12] Add `moduleName` field to server tutorial schema and
test fixure
---
.../home/server/services/tutorials/lib/tutorial_schema.ts | 1 +
.../home/server/services/tutorials/tutorials_registry.test.ts | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts b/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts
index 32e5483b8b070..bf28212624a4d 100644
--- a/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts
+++ b/src/plugins/home/server/services/tutorials/lib/tutorial_schema.ts
@@ -110,6 +110,7 @@ export const tutorialSchema = {
.required(),
category: Joi.string().valid(Object.values(TUTORIAL_CATEGORY)).required(),
name: Joi.string().required(),
+ moduleName: Joi.string(),
isBeta: Joi.boolean().default(false),
shortDescription: Joi.string().required(),
euiIconType: Joi.string(), // EUI icon type string, one of https://elastic.github.io/eui/#/icons
diff --git a/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts
index 8144fef2d92e4..b91a265da7d18 100644
--- a/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts
+++ b/src/plugins/home/server/services/tutorials/tutorials_registry.test.ts
@@ -54,6 +54,7 @@ const VALID_TUTORIAL: TutorialSchema = {
id: 'test',
category: 'logging' as TutorialsCategory,
name: 'new tutorial provider',
+ moduleName: 'test',
isBeta: false,
shortDescription: 'short description',
euiIconType: 'alert',
From e60287f635ea7ae3c098c973d144e9c5bed16232 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 17:30:35 -0700
Subject: [PATCH 04/12] Surface `moduleName` field from built in tutorials and
registered apm tutorial
---
src/plugins/apm_oss/server/tutorial/index.ts | 2 ++
src/plugins/home/server/tutorials/activemq_logs/index.ts | 1 +
src/plugins/home/server/tutorials/activemq_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/aerospike_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/apache_logs/index.ts | 1 +
src/plugins/home/server/tutorials/apache_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/auditbeat/index.ts | 2 ++
src/plugins/home/server/tutorials/aws_logs/index.ts | 1 +
src/plugins/home/server/tutorials/aws_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/azure_logs/index.ts | 1 +
src/plugins/home/server/tutorials/azure_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/ceph_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/cisco_logs/index.ts | 1 +
src/plugins/home/server/tutorials/cloudwatch_logs/index.ts | 2 ++
src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/consul_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/coredns_logs/index.ts | 1 +
src/plugins/home/server/tutorials/coredns_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/couchbase_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/couchdb_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/docker_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/dropwizard_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/elasticsearch_logs/index.ts | 1 +
.../home/server/tutorials/elasticsearch_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/envoyproxy_logs/index.ts | 1 +
src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/etcd_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/golang_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/googlecloud_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/haproxy_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/ibmmq_logs/index.ts | 1 +
src/plugins/home/server/tutorials/ibmmq_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/iis_logs/index.ts | 1 +
src/plugins/home/server/tutorials/iis_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/iptables_logs/index.ts | 1 +
src/plugins/home/server/tutorials/kafka_logs/index.ts | 1 +
src/plugins/home/server/tutorials/kafka_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/kibana_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/kubernetes_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/logstash_logs/index.ts | 1 +
src/plugins/home/server/tutorials/logstash_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/memcached_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/mongodb_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/mssql_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/munin_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/mysql_logs/index.ts | 1 +
src/plugins/home/server/tutorials/mysql_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/nats_logs/index.ts | 1 +
src/plugins/home/server/tutorials/nats_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/netflow/index.ts | 2 ++
src/plugins/home/server/tutorials/nginx_logs/index.ts | 1 +
src/plugins/home/server/tutorials/nginx_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/openmetrics_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/oracle_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/osquery_logs/index.ts | 1 +
src/plugins/home/server/tutorials/php_fpm_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/postgresql_logs/index.ts | 1 +
src/plugins/home/server/tutorials/postgresql_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/prometheus_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/redis_logs/index.ts | 1 +
src/plugins/home/server/tutorials/redis_metrics/index.ts | 1 +
.../home/server/tutorials/redisenterprise_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/stan_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/statsd_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/suricata_logs/index.ts | 1 +
src/plugins/home/server/tutorials/system_logs/index.ts | 1 +
src/plugins/home/server/tutorials/system_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/traefik_logs/index.ts | 1 +
src/plugins/home/server/tutorials/traefik_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/uptime_monitors/index.ts | 2 ++
src/plugins/home/server/tutorials/uwsgi_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/vsphere_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/windows_event_logs/index.ts | 2 ++
src/plugins/home/server/tutorials/windows_metrics/index.ts | 1 +
src/plugins/home/server/tutorials/zeek_logs/index.ts | 1 +
src/plugins/home/server/tutorials/zookeeper_metrics/index.ts | 1 +
77 files changed, 83 insertions(+)
diff --git a/src/plugins/apm_oss/server/tutorial/index.ts b/src/plugins/apm_oss/server/tutorial/index.ts
index aa775d007de30..42609f7d75917 100644
--- a/src/plugins/apm_oss/server/tutorial/index.ts
+++ b/src/plugins/apm_oss/server/tutorial/index.ts
@@ -26,6 +26,7 @@ import { APM_STATIC_INDEX_PATTERN_ID } from '../../common/index_pattern_constant
const apmIntro = i18n.translate('apmOss.tutorial.introduction', {
defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.',
});
+const moduleName = 'apm';
export const tutorialProvider = ({
indexPatternTitle,
@@ -68,6 +69,7 @@ export const tutorialProvider = ({
name: i18n.translate('apmOss.tutorial.specProvider.name', {
defaultMessage: 'APM',
}),
+ moduleName,
category: TutorialsCategory.OTHER,
shortDescription: apmIntro,
longDescription: i18n.translate('apmOss.tutorial.specProvider.longDescription', {
diff --git a/src/plugins/home/server/tutorials/activemq_logs/index.ts b/src/plugins/home/server/tutorials/activemq_logs/index.ts
index e85100996d4a1..c11c070637ae1 100644
--- a/src/plugins/home/server/tutorials/activemq_logs/index.ts
+++ b/src/plugins/home/server/tutorials/activemq_logs/index.ts
@@ -37,6 +37,7 @@ export function activemqLogsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.activemqLogs.nameTitle', {
defaultMessage: 'ActiveMQ logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 088c5db4c6137..e00ffb4773bea 100644
--- a/src/plugins/home/server/tutorials/activemq_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/activemq_metrics/index.ts
@@ -36,6 +36,7 @@ export function activemqMetricsSpecProvider(context: TutorialContext): TutorialS
name: i18n.translate('home.tutorials.activemqMetrics.nameTitle', {
defaultMessage: 'ActiveMQ metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.activemqMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from ActiveMQ instances.',
diff --git a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts
index 58ab2dcf0986f..c65022c1875c4 100644
--- a/src/plugins/home/server/tutorials/aerospike_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/aerospike_metrics/index.ts
@@ -36,6 +36,7 @@ export function aerospikeMetricsSpecProvider(context: TutorialContext): Tutorial
name: i18n.translate('home.tutorials.aerospikeMetrics.nameTitle', {
defaultMessage: 'Aerospike metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.aerospikeMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/apache_logs/index.ts b/src/plugins/home/server/tutorials/apache_logs/index.ts
index 434f0b0b83f98..94fa9ad1258ec 100644
--- a/src/plugins/home/server/tutorials/apache_logs/index.ts
+++ b/src/plugins/home/server/tutorials/apache_logs/index.ts
@@ -37,6 +37,7 @@ export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.apacheLogs.nameTitle', {
defaultMessage: 'Apache logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 1521c9820c400..91de90b9f6c6b 100644
--- a/src/plugins/home/server/tutorials/apache_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/apache_metrics/index.ts
@@ -36,6 +36,7 @@ export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.apacheMetrics.nameTitle', {
defaultMessage: 'Apache metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.apacheMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Apache 2 HTTP server.',
diff --git a/src/plugins/home/server/tutorials/auditbeat/index.ts b/src/plugins/home/server/tutorials/auditbeat/index.ts
index 214fda5a7cc53..44a97bfce6cef 100644
--- a/src/plugins/home/server/tutorials/auditbeat/index.ts
+++ b/src/plugins/home/server/tutorials/auditbeat/index.ts
@@ -31,11 +31,13 @@ import {
export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema {
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
+ const moduleName = 'auditbeat';
return {
id: 'auditbeat',
name: i18n.translate('home.tutorials.auditbeat.nameTitle', {
defaultMessage: 'Auditbeat',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.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 2fa22fa2c2d70..b875d93952c7a 100644
--- a/src/plugins/home/server/tutorials/aws_logs/index.ts
+++ b/src/plugins/home/server/tutorials/aws_logs/index.ts
@@ -37,6 +37,7 @@ export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema {
name: i18n.translate('home.tutorials.awsLogs.nameTitle', {
defaultMessage: 'AWS S3 based logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 c52620e150b5f..549e98280bef2 100644
--- a/src/plugins/home/server/tutorials/aws_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/aws_metrics/index.ts
@@ -36,6 +36,7 @@ export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.awsMetrics.nameTitle', {
defaultMessage: 'AWS metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.awsMetrics.shortDescription', {
defaultMessage:
diff --git a/src/plugins/home/server/tutorials/azure_logs/index.ts b/src/plugins/home/server/tutorials/azure_logs/index.ts
index 06aef411775f1..3624bea96b465 100644
--- a/src/plugins/home/server/tutorials/azure_logs/index.ts
+++ b/src/plugins/home/server/tutorials/azure_logs/index.ts
@@ -37,6 +37,7 @@ export function azureLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.azureLogs.nameTitle', {
defaultMessage: 'Azure logs',
}),
+ moduleName,
isBeta: true,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.azureLogs.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/azure_metrics/index.ts b/src/plugins/home/server/tutorials/azure_metrics/index.ts
index c11b3ac0139ba..ac92d70fc64f5 100644
--- a/src/plugins/home/server/tutorials/azure_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/azure_metrics/index.ts
@@ -36,6 +36,7 @@ export function azureMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.azureMetrics.nameTitle', {
defaultMessage: 'Azure metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.azureMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/ceph_metrics/index.ts b/src/plugins/home/server/tutorials/ceph_metrics/index.ts
index 968a0a3f66b0a..71e540454bc3a 100644
--- a/src/plugins/home/server/tutorials/ceph_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/ceph_metrics/index.ts
@@ -36,6 +36,7 @@ export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.cephMetrics.nameTitle', {
defaultMessage: 'Ceph metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.cephMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/cisco_logs/index.ts b/src/plugins/home/server/tutorials/cisco_logs/index.ts
index 2322f503b80ce..b771744a069c3 100644
--- a/src/plugins/home/server/tutorials/cisco_logs/index.ts
+++ b/src/plugins/home/server/tutorials/cisco_logs/index.ts
@@ -37,6 +37,7 @@ export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.ciscoLogs.nameTitle', {
defaultMessage: 'Cisco',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.ciscoLogs.shortDescription', {
defaultMessage: 'Collect and parse logs received from Cisco ASA firewalls.',
diff --git a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts
index 9d33d9bf786d0..fb7b07c5dc1af 100644
--- a/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts
+++ b/src/plugins/home/server/tutorials/cloudwatch_logs/index.ts
@@ -30,11 +30,13 @@ import {
} from '../../services/tutorials/lib/tutorials_registry_types';
export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSchema {
+ const moduleName = 'aws';
return {
id: 'cloudwatchLogs',
name: i18n.translate('home.tutorials.cloudwatchLogs.nameTitle', {
defaultMessage: 'AWS Cloudwatch logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.cloudwatchLogs.shortDescription', {
defaultMessage: 'Collect Cloudwatch logs with Functionbeat.',
diff --git a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
index 96c02f24e347a..1cb318c83bd34 100644
--- a/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/cockroachdb_metrics/index.ts
@@ -36,6 +36,7 @@ export function cockroachdbMetricsSpecProvider(context: TutorialContext): Tutori
name: i18n.translate('home.tutorials.cockroachdbMetrics.nameTitle', {
defaultMessage: 'CockroachDB metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.cockroachdbMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CockroachDB server.',
diff --git a/src/plugins/home/server/tutorials/consul_metrics/index.ts b/src/plugins/home/server/tutorials/consul_metrics/index.ts
index 8bf4333cb018f..e389db502a769 100644
--- a/src/plugins/home/server/tutorials/consul_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/consul_metrics/index.ts
@@ -36,6 +36,7 @@ export function consulMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.consulMetrics.nameTitle', {
defaultMessage: 'Consul metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.consulMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the Consul server.',
diff --git a/src/plugins/home/server/tutorials/coredns_logs/index.ts b/src/plugins/home/server/tutorials/coredns_logs/index.ts
index 4304fb7acb907..7fc8a2402d216 100644
--- a/src/plugins/home/server/tutorials/coredns_logs/index.ts
+++ b/src/plugins/home/server/tutorials/coredns_logs/index.ts
@@ -37,6 +37,7 @@ export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.corednsLogs.nameTitle', {
defaultMessage: 'CoreDNS logs',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.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 44bd0cb3999f6..c6589715ba9ce 100644
--- a/src/plugins/home/server/tutorials/coredns_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/coredns_metrics/index.ts
@@ -36,6 +36,7 @@ export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.corednsMetrics.nameTitle', {
defaultMessage: 'CoreDNS metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.corednsMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CoreDNS server.',
diff --git a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts
index efd59029c9c50..370541c9324d8 100644
--- a/src/plugins/home/server/tutorials/couchbase_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/couchbase_metrics/index.ts
@@ -36,6 +36,7 @@ export function couchbaseMetricsSpecProvider(context: TutorialContext): Tutorial
name: i18n.translate('home.tutorials.couchbaseMetrics.nameTitle', {
defaultMessage: 'Couchbase metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.couchbaseMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
index 1fbaa44817226..8d70fcf2a6cd7 100644
--- a/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/couchdb_metrics/index.ts
@@ -36,6 +36,7 @@ export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.couchdbMetrics.nameTitle', {
defaultMessage: 'CouchDB metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.couchdbMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CouchdB server.',
diff --git a/src/plugins/home/server/tutorials/docker_metrics/index.ts b/src/plugins/home/server/tutorials/docker_metrics/index.ts
index 8c603697c4713..2e0c3ccb642dd 100644
--- a/src/plugins/home/server/tutorials/docker_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/docker_metrics/index.ts
@@ -36,6 +36,7 @@ export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.dockerMetrics.nameTitle', {
defaultMessage: 'Docker metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.dockerMetrics.shortDescription', {
defaultMessage: 'Fetch metrics about your Docker containers.',
diff --git a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts
index 008a7a9b3a697..d74db4b2ad958 100644
--- a/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/dropwizard_metrics/index.ts
@@ -36,6 +36,7 @@ export function dropwizardMetricsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.dropwizardMetrics.nameTitle', {
defaultMessage: 'Dropwizard metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.dropwizardMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
index 515b06ea82a5e..f6c280d29f67f 100644
--- a/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
+++ b/src/plugins/home/server/tutorials/elasticsearch_logs/index.ts
@@ -37,6 +37,7 @@ export function elasticsearchLogsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.elasticsearchLogs.nameTitle', {
defaultMessage: 'Elasticsearch logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
isBeta: true,
shortDescription: i18n.translate('home.tutorials.elasticsearchLogs.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts
index ea6dcf86d23e2..38713056e0640 100644
--- a/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/elasticsearch_metrics/index.ts
@@ -36,6 +36,7 @@ export function elasticsearchMetricsSpecProvider(context: TutorialContext): Tuto
name: i18n.translate('home.tutorials.elasticsearchMetrics.nameTitle', {
defaultMessage: 'Elasticsearch metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.elasticsearchMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
index a9b9c33d61bdf..0cf032e6b90c1 100644
--- a/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
+++ b/src/plugins/home/server/tutorials/envoyproxy_logs/index.ts
@@ -37,6 +37,7 @@ export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.envoyproxyLogs.nameTitle', {
defaultMessage: 'Envoyproxy',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.envoyproxyLogs.shortDescription', {
defaultMessage: 'Collect and parse logs received from the Envoy proxy.',
diff --git a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts
index adc7a494200c1..9b453370fb802 100644
--- a/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/envoyproxy_metrics/index.ts
@@ -36,6 +36,7 @@ export function envoyproxyMetricsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.envoyproxyMetrics.nameTitle', {
defaultMessage: 'Envoy Proxy metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.envoyproxyMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.',
diff --git a/src/plugins/home/server/tutorials/etcd_metrics/index.ts b/src/plugins/home/server/tutorials/etcd_metrics/index.ts
index 2956473b6643b..48bdba5abb4b3 100644
--- a/src/plugins/home/server/tutorials/etcd_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/etcd_metrics/index.ts
@@ -36,6 +36,7 @@ export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.etcdMetrics.nameTitle', {
defaultMessage: 'Etcd metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.etcdMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/golang_metrics/index.ts b/src/plugins/home/server/tutorials/golang_metrics/index.ts
index c53f8b2bba281..e5ecbb9eb583b 100644
--- a/src/plugins/home/server/tutorials/golang_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/golang_metrics/index.ts
@@ -36,6 +36,7 @@ export function golangMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.golangMetrics.nameTitle', {
defaultMessage: 'Golang metrics',
}),
+ moduleName,
isBeta: true,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.golangMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/googlecloud_metrics/index.ts b/src/plugins/home/server/tutorials/googlecloud_metrics/index.ts
index 504ede04c12d8..42dc0720c10e0 100644
--- a/src/plugins/home/server/tutorials/googlecloud_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/googlecloud_metrics/index.ts
@@ -36,6 +36,7 @@ export function googlecloudMetricsSpecProvider(context: TutorialContext): Tutori
name: i18n.translate('home.tutorials.googlecloudMetrics.nameTitle', {
defaultMessage: 'Google Cloud metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.googlecloudMetrics.shortDescription', {
defaultMessage:
diff --git a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts
index f06dfaa93063c..49e2ec4390db9 100644
--- a/src/plugins/home/server/tutorials/haproxy_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/haproxy_metrics/index.ts
@@ -36,6 +36,7 @@ export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.haproxyMetrics.nameTitle', {
defaultMessage: 'HAProxy metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.haproxyMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
index 5739c03954def..8f67b88c3fcf2 100644
--- a/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
+++ b/src/plugins/home/server/tutorials/ibmmq_logs/index.ts
@@ -37,6 +37,7 @@ export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.ibmmqLogs.nameTitle', {
defaultMessage: 'IBM MQ logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.ibmmqLogs.shortDescription', {
defaultMessage: 'Collect IBM MQ logs with Filebeat.',
diff --git a/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts b/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
index 4f20b2d0684fc..dc941233b0233 100644
--- a/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/ibmmq_metrics/index.ts
@@ -36,6 +36,7 @@ export function ibmmqMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.ibmmqMetrics.nameTitle', {
defaultMessage: 'IBM MQ metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.ibmmqMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from IBM MQ instances.',
diff --git a/src/plugins/home/server/tutorials/iis_logs/index.ts b/src/plugins/home/server/tutorials/iis_logs/index.ts
index fee8d036db757..12411fc792e64 100644
--- a/src/plugins/home/server/tutorials/iis_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iis_logs/index.ts
@@ -37,6 +37,7 @@ export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema {
name: i18n.translate('home.tutorials.iisLogs.nameTitle', {
defaultMessage: 'IIS logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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/iis_metrics/index.ts b/src/plugins/home/server/tutorials/iis_metrics/index.ts
index 46621677a67ce..d6dc5a2e33704 100644
--- a/src/plugins/home/server/tutorials/iis_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/iis_metrics/index.ts
@@ -36,6 +36,7 @@ export function iisMetricsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.iisMetrics.nameTitle', {
defaultMessage: 'IIS Metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.iisMetrics.shortDescription', {
defaultMessage: 'Collect IIS server related metrics.',
diff --git a/src/plugins/home/server/tutorials/iptables_logs/index.ts b/src/plugins/home/server/tutorials/iptables_logs/index.ts
index fd84894dae850..b3be133767447 100644
--- a/src/plugins/home/server/tutorials/iptables_logs/index.ts
+++ b/src/plugins/home/server/tutorials/iptables_logs/index.ts
@@ -37,6 +37,7 @@ export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.iptablesLogs.nameTitle', {
defaultMessage: 'Iptables / Ubiquiti',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.iptablesLogs.shortDescription', {
defaultMessage: 'Collect and parse iptables and ip6tables logs or from Ubiqiti firewalls.',
diff --git a/src/plugins/home/server/tutorials/kafka_logs/index.ts b/src/plugins/home/server/tutorials/kafka_logs/index.ts
index 746e65b71008c..aac172520829c 100644
--- a/src/plugins/home/server/tutorials/kafka_logs/index.ts
+++ b/src/plugins/home/server/tutorials/kafka_logs/index.ts
@@ -37,6 +37,7 @@ export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.kafkaLogs.nameTitle', {
defaultMessage: 'Kafka logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 55860a3ab649a..1b0ce44db6550 100644
--- a/src/plugins/home/server/tutorials/kafka_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/kafka_metrics/index.ts
@@ -36,6 +36,7 @@ export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.kafkaMetrics.nameTitle', {
defaultMessage: 'Kafka metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kafkaMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/kibana_metrics/index.ts b/src/plugins/home/server/tutorials/kibana_metrics/index.ts
index fa966ac724a73..d595859959aca 100644
--- a/src/plugins/home/server/tutorials/kibana_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/kibana_metrics/index.ts
@@ -36,6 +36,7 @@ export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.kibanaMetrics.nameTitle', {
defaultMessage: 'Kibana metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kibanaMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
index bcea7f1221e1f..a4ce9cfab5f62 100644
--- a/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/kubernetes_metrics/index.ts
@@ -36,6 +36,7 @@ export function kubernetesMetricsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.kubernetesMetrics.nameTitle', {
defaultMessage: 'Kubernetes metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kubernetesMetrics.shortDescription', {
defaultMessage: 'Fetch metrics from your Kubernetes installation.',
diff --git a/src/plugins/home/server/tutorials/logstash_logs/index.ts b/src/plugins/home/server/tutorials/logstash_logs/index.ts
index 69e498ac59459..32982cd1055a4 100644
--- a/src/plugins/home/server/tutorials/logstash_logs/index.ts
+++ b/src/plugins/home/server/tutorials/logstash_logs/index.ts
@@ -37,6 +37,7 @@ export function logstashLogsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.logstashLogs.nameTitle', {
defaultMessage: 'Logstash logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 383273a8c365c..11272b7ceef6b 100644
--- a/src/plugins/home/server/tutorials/logstash_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/logstash_metrics/index.ts
@@ -36,6 +36,7 @@ export function logstashMetricsSpecProvider(context: TutorialContext): TutorialS
name: i18n.translate('home.tutorials.logstashMetrics.nameTitle', {
defaultMessage: 'Logstash metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.logstashMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/memcached_metrics/index.ts b/src/plugins/home/server/tutorials/memcached_metrics/index.ts
index 94451556ad34c..c724b790f84a6 100644
--- a/src/plugins/home/server/tutorials/memcached_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/memcached_metrics/index.ts
@@ -36,6 +36,7 @@ export function memcachedMetricsSpecProvider(context: TutorialContext): Tutorial
name: i18n.translate('home.tutorials.memcachedMetrics.nameTitle', {
defaultMessage: 'Memcached metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.memcachedMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
index f02695e207dd3..2f39a048f2f15 100644
--- a/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mongodb_metrics/index.ts
@@ -36,6 +36,7 @@ export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.mongodbMetrics.nameTitle', {
defaultMessage: 'MongoDB metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mongodbMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from MongoDB.',
diff --git a/src/plugins/home/server/tutorials/mssql_metrics/index.ts b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
index 4b418587f78b2..1a1f047a12848 100644
--- a/src/plugins/home/server/tutorials/mssql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mssql_metrics/index.ts
@@ -36,6 +36,7 @@ export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.mssqlMetrics.nameTitle', {
defaultMessage: 'Microsoft SQL Server Metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mssqlMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from a Microsoft SQL Server instance',
diff --git a/src/plugins/home/server/tutorials/munin_metrics/index.ts b/src/plugins/home/server/tutorials/munin_metrics/index.ts
index 3dbb34cb22031..8434d916daa1f 100644
--- a/src/plugins/home/server/tutorials/munin_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/munin_metrics/index.ts
@@ -36,6 +36,7 @@ export function muninMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.muninMetrics.nameTitle', {
defaultMessage: 'Munin metrics',
}),
+ moduleName,
euiIconType: '/plugins/home/assets/logos/munin.svg',
isBeta: true,
category: TutorialsCategory.METRICS,
diff --git a/src/plugins/home/server/tutorials/mysql_logs/index.ts b/src/plugins/home/server/tutorials/mysql_logs/index.ts
index 178a371f9212e..37bbf409b91c5 100644
--- a/src/plugins/home/server/tutorials/mysql_logs/index.ts
+++ b/src/plugins/home/server/tutorials/mysql_logs/index.ts
@@ -37,6 +37,7 @@ export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.mysqlLogs.nameTitle', {
defaultMessage: 'MySQL logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 1148caeb441f8..89f5edf22a7b6 100644
--- a/src/plugins/home/server/tutorials/mysql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/mysql_metrics/index.ts
@@ -36,6 +36,7 @@ export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.mysqlMetrics.nameTitle', {
defaultMessage: 'MySQL metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mysqlMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from MySQL.',
diff --git a/src/plugins/home/server/tutorials/nats_logs/index.ts b/src/plugins/home/server/tutorials/nats_logs/index.ts
index 17c37755b6bc3..f00ddd6ca8879 100644
--- a/src/plugins/home/server/tutorials/nats_logs/index.ts
+++ b/src/plugins/home/server/tutorials/nats_logs/index.ts
@@ -37,6 +37,7 @@ export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema {
name: i18n.translate('home.tutorials.natsLogs.nameTitle', {
defaultMessage: 'NATS logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
isBeta: true,
shortDescription: i18n.translate('home.tutorials.natsLogs.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/nats_metrics/index.ts b/src/plugins/home/server/tutorials/nats_metrics/index.ts
index bce08e85c6977..cda011297d2c6 100644
--- a/src/plugins/home/server/tutorials/nats_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/nats_metrics/index.ts
@@ -36,6 +36,7 @@ export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.natsMetrics.nameTitle', {
defaultMessage: 'NATS metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.natsMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the Nats server.',
diff --git a/src/plugins/home/server/tutorials/netflow/index.ts b/src/plugins/home/server/tutorials/netflow/index.ts
index ec0aa8953b146..5be30bbb152b7 100644
--- a/src/plugins/home/server/tutorials/netflow/index.ts
+++ b/src/plugins/home/server/tutorials/netflow/index.ts
@@ -25,9 +25,11 @@ import { createElasticCloudInstructions } from './elastic_cloud';
import { createOnPremElasticCloudInstructions } from './on_prem_elastic_cloud';
export function netflowSpecProvider() {
+ const moduleName = 'netflow';
return {
id: 'netflow',
name: 'Netflow',
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.netflow.tutorialShortDescription', {
defaultMessage: 'Collect Netflow records sent by a Netflow exporter.',
diff --git a/src/plugins/home/server/tutorials/nginx_logs/index.ts b/src/plugins/home/server/tutorials/nginx_logs/index.ts
index 37d0cc106bfe5..f357e77fc25ca 100644
--- a/src/plugins/home/server/tutorials/nginx_logs/index.ts
+++ b/src/plugins/home/server/tutorials/nginx_logs/index.ts
@@ -37,6 +37,7 @@ export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.nginxLogs.nameTitle', {
defaultMessage: 'Nginx logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 8671f7218ffc8..09031883cef1c 100644
--- a/src/plugins/home/server/tutorials/nginx_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/nginx_metrics/index.ts
@@ -36,6 +36,7 @@ export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.nginxMetrics.nameTitle', {
defaultMessage: 'Nginx metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.nginxMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Nginx HTTP server.',
diff --git a/src/plugins/home/server/tutorials/openmetrics_metrics/index.ts b/src/plugins/home/server/tutorials/openmetrics_metrics/index.ts
index eb539e15c1bcd..197821f24dddb 100644
--- a/src/plugins/home/server/tutorials/openmetrics_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/openmetrics_metrics/index.ts
@@ -36,6 +36,7 @@ export function openmetricsMetricsSpecProvider(context: TutorialContext): Tutori
name: i18n.translate('home.tutorials.openmetricsMetrics.nameTitle', {
defaultMessage: 'OpenMetrics metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.openmetricsMetrics.shortDescription', {
defaultMessage: 'Fetch metrics from an endpoint that serves metrics in OpenMetrics format.',
diff --git a/src/plugins/home/server/tutorials/oracle_metrics/index.ts b/src/plugins/home/server/tutorials/oracle_metrics/index.ts
index 3144b0a21aab5..d2ddd19b930a2 100644
--- a/src/plugins/home/server/tutorials/oracle_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/oracle_metrics/index.ts
@@ -36,6 +36,7 @@ export function oracleMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.oracleMetrics.nameTitle', {
defaultMessage: 'oracle metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.oracleMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/osquery_logs/index.ts b/src/plugins/home/server/tutorials/osquery_logs/index.ts
index 8781d6201a771..c4869a889a085 100644
--- a/src/plugins/home/server/tutorials/osquery_logs/index.ts
+++ b/src/plugins/home/server/tutorials/osquery_logs/index.ts
@@ -37,6 +37,7 @@ export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.osqueryLogs.nameTitle', {
defaultMessage: 'Osquery logs',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.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 975b549c9520b..470cfed2176fd 100644
--- a/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/php_fpm_metrics/index.ts
@@ -36,6 +36,7 @@ export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.phpFpmMetrics.nameTitle', {
defaultMessage: 'PHP-FPM metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
isBeta: false,
shortDescription: i18n.translate('home.tutorials.phpFpmMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/postgresql_logs/index.ts b/src/plugins/home/server/tutorials/postgresql_logs/index.ts
index 0c28061985819..e158dedcb03e0 100644
--- a/src/plugins/home/server/tutorials/postgresql_logs/index.ts
+++ b/src/plugins/home/server/tutorials/postgresql_logs/index.ts
@@ -37,6 +37,7 @@ export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.postgresqlLogs.nameTitle', {
defaultMessage: 'PostgreSQL logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 f9bb9d249e755..1add49c10c2a7 100644
--- a/src/plugins/home/server/tutorials/postgresql_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/postgresql_metrics/index.ts
@@ -36,6 +36,7 @@ export function postgresqlMetricsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.postgresqlMetrics.nameTitle', {
defaultMessage: 'PostgreSQL metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
isBeta: false,
shortDescription: i18n.translate('home.tutorials.postgresqlMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts
index 06e8a138049d5..900c5da7cdbe3 100644
--- a/src/plugins/home/server/tutorials/prometheus_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/prometheus_metrics/index.ts
@@ -36,6 +36,7 @@ export function prometheusMetricsSpecProvider(context: TutorialContext): Tutoria
name: i18n.translate('home.tutorials.prometheusMetrics.nameTitle', {
defaultMessage: 'Prometheus metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.prometheusMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
index a646068e4ff34..df0aa57d9feac 100644
--- a/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/rabbitmq_metrics/index.ts
@@ -36,6 +36,7 @@ export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialS
name: i18n.translate('home.tutorials.rabbitmqMetrics.nameTitle', {
defaultMessage: 'RabbitMQ metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.rabbitmqMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the RabbitMQ server.',
diff --git a/src/plugins/home/server/tutorials/redis_logs/index.ts b/src/plugins/home/server/tutorials/redis_logs/index.ts
index e017fae0499a3..785118b9e5d09 100644
--- a/src/plugins/home/server/tutorials/redis_logs/index.ts
+++ b/src/plugins/home/server/tutorials/redis_logs/index.ts
@@ -37,6 +37,7 @@ export function redisLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.redisLogs.nameTitle', {
defaultMessage: 'Redis logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 bcc4d9bb0b67b..11d05029844b2 100644
--- a/src/plugins/home/server/tutorials/redis_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/redis_metrics/index.ts
@@ -36,6 +36,7 @@ export function redisMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.redisMetrics.nameTitle', {
defaultMessage: 'Redis metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.redisMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Redis.',
diff --git a/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts b/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
index ffbb5ab75da87..0bc7769f950ed 100644
--- a/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/redisenterprise_metrics/index.ts
@@ -36,6 +36,7 @@ export function redisenterpriseMetricsSpecProvider(context: TutorialContext): Tu
name: i18n.translate('home.tutorials.redisenterpriseMetrics.nameTitle', {
defaultMessage: 'Redis Enterprise metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.redisenterpriseMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from Redis Enterprise Server.',
diff --git a/src/plugins/home/server/tutorials/stan_metrics/index.ts b/src/plugins/home/server/tutorials/stan_metrics/index.ts
index 616bc7450249e..b1ad3e9c1404a 100644
--- a/src/plugins/home/server/tutorials/stan_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/stan_metrics/index.ts
@@ -36,6 +36,7 @@ export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.stanMetrics.nameTitle', {
defaultMessage: 'STAN metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.stanMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the STAN server.',
diff --git a/src/plugins/home/server/tutorials/statsd_metrics/index.ts b/src/plugins/home/server/tutorials/statsd_metrics/index.ts
index 1dc297e78c791..9e9d7d6fd3e23 100644
--- a/src/plugins/home/server/tutorials/statsd_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/statsd_metrics/index.ts
@@ -33,6 +33,7 @@ export function statsdMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.statsdMetrics.nameTitle', {
defaultMessage: 'Statsd metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.statsdMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from statsd.',
diff --git a/src/plugins/home/server/tutorials/suricata_logs/index.ts b/src/plugins/home/server/tutorials/suricata_logs/index.ts
index 6bcfc1d43a250..eec81b9496647 100644
--- a/src/plugins/home/server/tutorials/suricata_logs/index.ts
+++ b/src/plugins/home/server/tutorials/suricata_logs/index.ts
@@ -37,6 +37,7 @@ export function suricataLogsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.suricataLogs.nameTitle', {
defaultMessage: 'Suricata logs',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.suricataLogs.shortDescription', {
defaultMessage: 'Collect the result logs created by Suricata IDS/IPS/NSM.',
diff --git a/src/plugins/home/server/tutorials/system_logs/index.ts b/src/plugins/home/server/tutorials/system_logs/index.ts
index 9bad70699a6ed..f39df25461a5f 100644
--- a/src/plugins/home/server/tutorials/system_logs/index.ts
+++ b/src/plugins/home/server/tutorials/system_logs/index.ts
@@ -37,6 +37,7 @@ export function systemLogsSpecProvider(context: TutorialContext): TutorialSchema
name: i18n.translate('home.tutorials.systemLogs.nameTitle', {
defaultMessage: 'System logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.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 ef1a84ecdbf10..6bdaaa34a9b2c 100644
--- a/src/plugins/home/server/tutorials/system_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/system_metrics/index.ts
@@ -36,6 +36,7 @@ export function systemMetricsSpecProvider(context: TutorialContext): TutorialSch
name: i18n.translate('home.tutorials.systemMetrics.nameTitle', {
defaultMessage: 'System metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.systemMetrics.shortDescription', {
defaultMessage: 'Collect CPU, memory, network, and disk statistics from the host.',
diff --git a/src/plugins/home/server/tutorials/traefik_logs/index.ts b/src/plugins/home/server/tutorials/traefik_logs/index.ts
index 1876edd6c0bf7..0a84dcb081883 100644
--- a/src/plugins/home/server/tutorials/traefik_logs/index.ts
+++ b/src/plugins/home/server/tutorials/traefik_logs/index.ts
@@ -37,6 +37,7 @@ export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchem
name: i18n.translate('home.tutorials.traefikLogs.nameTitle', {
defaultMessage: 'Traefik logs',
}),
+ moduleName,
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.traefikLogs.shortDescription', {
defaultMessage: 'Collect and parse access logs created by the Traefik Proxy.',
diff --git a/src/plugins/home/server/tutorials/traefik_metrics/index.ts b/src/plugins/home/server/tutorials/traefik_metrics/index.ts
index a97ee3ab9758a..4048719239a10 100644
--- a/src/plugins/home/server/tutorials/traefik_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/traefik_metrics/index.ts
@@ -33,6 +33,7 @@ export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.traefikMetrics.nameTitle', {
defaultMessage: 'Traefik metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.traefikMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from Traefik.',
diff --git a/src/plugins/home/server/tutorials/uptime_monitors/index.ts b/src/plugins/home/server/tutorials/uptime_monitors/index.ts
index fa854a1c23505..7366583e59778 100644
--- a/src/plugins/home/server/tutorials/uptime_monitors/index.ts
+++ b/src/plugins/home/server/tutorials/uptime_monitors/index.ts
@@ -30,11 +30,13 @@ import {
} from '../../services/tutorials/lib/tutorials_registry_types';
export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSchema {
+ const moduleName = 'uptime';
return {
id: 'uptimeMonitors',
name: i18n.translate('home.tutorials.uptimeMonitors.nameTitle', {
defaultMessage: 'Uptime Monitors',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.uptimeMonitors.shortDescription', {
defaultMessage: 'Monitor services for their availability',
diff --git a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
index bbe4ea78ee87c..f6398be3550fd 100644
--- a/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/uwsgi_metrics/index.ts
@@ -36,6 +36,7 @@ export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSche
name: i18n.translate('home.tutorials.uwsgiMetrics.nameTitle', {
defaultMessage: 'uWSGI metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.uwsgiMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the uWSGI server.',
diff --git a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
index 4450ab3040750..5e1191ffdf8ce 100644
--- a/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/vsphere_metrics/index.ts
@@ -36,6 +36,7 @@ export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.vsphereMetrics.nameTitle', {
defaultMessage: 'vSphere metrics',
}),
+ moduleName,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.vsphereMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from vSphere.',
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 c2ea9ff3015e4..80f7a58ae14be 100644
--- a/src/plugins/home/server/tutorials/windows_event_logs/index.ts
+++ b/src/plugins/home/server/tutorials/windows_event_logs/index.ts
@@ -30,11 +30,13 @@ import {
} from '../../services/tutorials/lib/tutorials_registry_types';
export function windowsEventLogsSpecProvider(context: TutorialContext): TutorialSchema {
+ const moduleName = 'windows';
return {
id: 'windowsEventLogs',
name: i18n.translate('home.tutorials.windowsEventLogs.nameTitle', {
defaultMessage: 'Windows Event Log',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.windowsEventLogs.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/windows_metrics/index.ts b/src/plugins/home/server/tutorials/windows_metrics/index.ts
index 5333a7b1badf6..18cdcdc985e54 100644
--- a/src/plugins/home/server/tutorials/windows_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/windows_metrics/index.ts
@@ -36,6 +36,7 @@ export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSc
name: i18n.translate('home.tutorials.windowsMetrics.nameTitle', {
defaultMessage: 'Windows metrics',
}),
+ moduleName,
isBeta: false,
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.windowsMetrics.shortDescription', {
diff --git a/src/plugins/home/server/tutorials/zeek_logs/index.ts b/src/plugins/home/server/tutorials/zeek_logs/index.ts
index c273a93b1b0d5..e39dcd3409490 100644
--- a/src/plugins/home/server/tutorials/zeek_logs/index.ts
+++ b/src/plugins/home/server/tutorials/zeek_logs/index.ts
@@ -37,6 +37,7 @@ export function zeekLogsSpecProvider(context: TutorialContext): TutorialSchema {
name: i18n.translate('home.tutorials.zeekLogs.nameTitle', {
defaultMessage: 'Zeek logs',
}),
+ moduleName,
category: TutorialsCategory.SECURITY_SOLUTION,
shortDescription: i18n.translate('home.tutorials.zeekLogs.shortDescription', {
defaultMessage: 'Collect the logs created by Zeek/Bro.',
diff --git a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
index ae146d192432b..a39540b7399e5 100644
--- a/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
+++ b/src/plugins/home/server/tutorials/zookeeper_metrics/index.ts
@@ -36,6 +36,7 @@ export function zookeeperMetricsSpecProvider(context: TutorialContext): Tutorial
name: i18n.translate('home.tutorials.zookeeperMetrics.nameTitle', {
defaultMessage: 'Zookeeper metrics',
}),
+ moduleName,
euiIconType: '/plugins/home/assets/logos/zookeeper.svg',
isBeta: false,
category: TutorialsCategory.METRICS,
From c8e69eefd84af125eaa8eacdeab067629e06fbff Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 18:02:39 -0700
Subject: [PATCH 05/12] Export component types
---
src/plugins/home/public/index.ts | 3 +++
src/plugins/home/public/services/tutorials/index.ts | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/plugins/home/public/index.ts b/src/plugins/home/public/index.ts
index 587dbe886d505..dc48332e052de 100644
--- a/src/plugins/home/public/index.ts
+++ b/src/plugins/home/public/index.ts
@@ -30,6 +30,9 @@ export {
FeatureCatalogueCategory,
Environment,
TutorialVariables,
+ TutorialDirectoryNoticeComponent,
+ TutorialDirectoryHeaderLinkComponent,
+ TutorialModuleNoticeComponent,
} from './services';
export * from '../common/instruction_variant';
import { HomePublicPlugin } from './plugin';
diff --git a/src/plugins/home/public/services/tutorials/index.ts b/src/plugins/home/public/services/tutorials/index.ts
index 3de1e67204d96..44f0badd531b7 100644
--- a/src/plugins/home/public/services/tutorials/index.ts
+++ b/src/plugins/home/public/services/tutorials/index.ts
@@ -17,4 +17,11 @@
* under the License.
*/
-export { TutorialService, TutorialVariables, TutorialServiceSetup } from './tutorial_service';
+export {
+ TutorialService,
+ TutorialVariables,
+ TutorialServiceSetup,
+ TutorialDirectoryNoticeComponent,
+ TutorialDirectoryHeaderLinkComponent,
+ TutorialModuleNoticeComponent,
+} from './tutorial_service';
From cbb832486fb5bdd9204498cb72822c5e8df30548 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 18:54:10 -0700
Subject: [PATCH 06/12] Add KibanaContextProvider to home plugin app render
---
.../home/public/application/application.tsx | 16 +++++++++++++---
src/plugins/home/public/plugin.ts | 2 +-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/plugins/home/public/application/application.tsx b/src/plugins/home/public/application/application.tsx
index 3729e4e2aa089..627bd10d7c2c8 100644
--- a/src/plugins/home/public/application/application.tsx
+++ b/src/plugins/home/public/application/application.tsx
@@ -20,14 +20,19 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { i18n } from '@kbn/i18n';
-import { ScopedHistory } from 'kibana/public';
+import { ScopedHistory, CoreStart } from 'kibana/public';
+import { KibanaContextProvider } from '../../../kibana_react/public';
// @ts-ignore
import { HomeApp } from './components/home_app';
import { getServices } from './kibana_services';
import './index.scss';
-export const renderApp = async (element: HTMLElement, history: ScopedHistory) => {
+export const renderApp = async (
+ element: HTMLElement,
+ coreStart: CoreStart,
+ history: ScopedHistory
+) => {
const homeTitle = i18n.translate('home.breadcrumbs.homeTitle', { defaultMessage: 'Home' });
const { featureCatalogue, chrome } = getServices();
@@ -36,7 +41,12 @@ export const renderApp = async (element: HTMLElement, history: ScopedHistory) =>
chrome.setBreadcrumbs([{ text: homeTitle }]);
- render(, element);
+ render(
+
+
+ ,
+ element
+ );
// dispatch synthetic hash change event to update hash history objects
// this is necessary because hash updates triggered by using popState won't trigger this event naturally.
diff --git a/src/plugins/home/public/plugin.ts b/src/plugins/home/public/plugin.ts
index d05fce652bd40..6859d916a61af 100644
--- a/src/plugins/home/public/plugin.ts
+++ b/src/plugins/home/public/plugin.ts
@@ -104,7 +104,7 @@ export class HomePublicPlugin
i18n.translate('home.pageTitle', { defaultMessage: 'Home' })
);
const { renderApp } = await import('./application');
- return await renderApp(params.element, params.history);
+ return await renderApp(params.element, coreStart, params.history);
},
});
kibanaLegacy.forwardApp('home', 'home');
From 08bbc0f96d696fe40d70db571c1bec42440b1713 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 18:59:38 -0700
Subject: [PATCH 07/12] Move setHttpClient to ingest manager plugin setup()
method; add home as optional plugin dep; register tutorial module notice
---
.../components/tutorial/tutorial.js | 4 +-
x-pack/plugins/ingest_manager/kibana.json | 2 +-
.../components/home_integration/index.ts | 6 ++
.../tutorial_module_notice.tsx | 66 +++++++++++++++++++
.../applications/ingest_manager/index.tsx | 3 +-
.../plugins/ingest_manager/public/plugin.ts | 13 ++++
6 files changed, 89 insertions(+), 5 deletions(-)
create mode 100644 x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
create mode 100644 x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.js b/src/plugins/home/public/application/components/tutorial/tutorial.js
index 35c75d572ddd6..5edba2385add1 100644
--- a/src/plugins/home/public/application/components/tutorial/tutorial.js
+++ b/src/plugins/home/public/application/components/tutorial/tutorial.js
@@ -341,9 +341,9 @@ class TutorialUi extends React.Component {
<>
- {notices.map((ModuleNotice) => (
+ {notices.map((ModuleNotice, index) => (
-
+
))}
diff --git a/x-pack/plugins/ingest_manager/kibana.json b/x-pack/plugins/ingest_manager/kibana.json
index 35447139607a6..4c6cb15c92e4b 100644
--- a/x-pack/plugins/ingest_manager/kibana.json
+++ b/x-pack/plugins/ingest_manager/kibana.json
@@ -5,6 +5,6 @@
"ui": true,
"configPath": ["xpack", "ingestManager"],
"requiredPlugins": ["licensing", "data", "encryptedSavedObjects"],
- "optionalPlugins": ["security", "features", "cloud"],
+ "optionalPlugins": ["security", "features", "cloud", "home"],
"extraPublicDirs": ["common"]
}
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
new file mode 100644
index 0000000000000..a4d8bb10fc8b0
--- /dev/null
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
@@ -0,0 +1,6 @@
+/*
+ * 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.
+ */
+export { TutorialModuleNotice } from './tutorial_module_notice';
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
new file mode 100644
index 0000000000000..35c0855aaacb9
--- /dev/null
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
@@ -0,0 +1,66 @@
+/*
+ * 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 React, { memo } from 'react';
+import { FormattedMessage } from '@kbn/i18n/react';
+import { EuiText, EuiLink } from '@elastic/eui';
+import { TutorialModuleNoticeComponent } from 'src/plugins/home/public';
+import { useGetPackages, useLink } from '../../hooks';
+
+export const TutorialModuleNotice: TutorialModuleNoticeComponent = memo(({ moduleName }) => {
+ const { data: packagesData, isLoading } = useGetPackages();
+ const { getHref } = useLink();
+
+ const pkgInfo =
+ !isLoading &&
+ packagesData?.response &&
+ packagesData.response.find((pkg) => pkg.name === moduleName);
+
+ if (pkgInfo) {
+ return (
+
+
+
+
+
+ ),
+ availableAsIntegrationLink: (
+
+
+
+ ),
+ blogPostLink: (
+
+
+
+ ),
+ }}
+ />
+
+
+ );
+ }
+
+ return null;
+});
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx
index 623df428b7dd9..94d3379f35e05 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/index.tsx
@@ -22,7 +22,7 @@ import { PAGE_ROUTING_PATHS } from './constants';
import { DefaultLayout, WithoutHeaderLayout } from './layouts';
import { Loading, Error } from './components';
import { IngestManagerOverview, EPMApp, AgentConfigApp, FleetApp, DataStreamApp } from './sections';
-import { DepsContext, ConfigContext, setHttpClient, useConfig } from './hooks';
+import { DepsContext, ConfigContext, useConfig } from './hooks';
import { PackageInstallProvider } from './sections/epm/hooks';
import { useCore, sendSetup, sendGetPermissionsCheck } from './hooks';
import { FleetStatusProvider } from './hooks/use_fleet_status';
@@ -260,7 +260,6 @@ export function renderApp(
startDeps: IngestManagerStartDeps,
config: IngestManagerConfigType
) {
- setHttpClient(coreStart.http);
ReactDOM.render(
Date: Tue, 7 Jul 2020 19:01:38 -0700
Subject: [PATCH 08/12] Fix key prop warnings
---
.../public/application/components/tutorial/tutorial.js | 4 ++--
.../public/application/components/tutorial_directory.js | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.js b/src/plugins/home/public/application/components/tutorial/tutorial.js
index 5edba2385add1..7d56f20ee2afa 100644
--- a/src/plugins/home/public/application/components/tutorial/tutorial.js
+++ b/src/plugins/home/public/application/components/tutorial/tutorial.js
@@ -342,8 +342,8 @@ class TutorialUi extends React.Component {
{notices.map((ModuleNotice, index) => (
-
-
+
+
))}
diff --git a/src/plugins/home/public/application/components/tutorial_directory.js b/src/plugins/home/public/application/components/tutorial_directory.js
index 38b5129e54903..6a8b6352cf04f 100644
--- a/src/plugins/home/public/application/components/tutorial_directory.js
+++ b/src/plugins/home/public/application/components/tutorial_directory.js
@@ -232,8 +232,8 @@ class TutorialDirectoryUi extends React.Component {
const notices = getServices().tutorialService.getDirectoryNotices();
return notices.length ? (
- {notices.map((notice) => (
- {notice}
+ {notices.map((notice, index) => (
+ {notice}
))}
) : null;
@@ -259,8 +259,8 @@ class TutorialDirectoryUi extends React.Component {
{headerLinks.length ? (
- {headerLinks.map((headerLink) => (
- {headerLink}
+ {headerLinks.map((headerLink, index) => (
+ {headerLink}
))}
From e6e9112e6eb3669fca374ba2652839d19fe682c8 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Tue, 7 Jul 2020 20:32:47 -0700
Subject: [PATCH 09/12] Add dismissable tutorial directory notice and
corresponding ingest manager global setting field
---
.../components/tutorial_directory.js | 22 ++--
.../common/types/models/settings.ts | 1 +
.../components/home_integration/index.ts | 1 +
.../tutorial_directory_notice.tsx | 112 ++++++++++++++++++
.../plugins/ingest_manager/public/plugin.ts | 6 +-
.../server/saved_objects/index.ts | 1 +
.../server/types/rest_spec/settings.ts | 1 +
7 files changed, 132 insertions(+), 12 deletions(-)
create mode 100644 x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
diff --git a/src/plugins/home/public/application/components/tutorial_directory.js b/src/plugins/home/public/application/components/tutorial_directory.js
index 6a8b6352cf04f..4371c369ca483 100644
--- a/src/plugins/home/public/application/components/tutorial_directory.js
+++ b/src/plugins/home/public/application/components/tutorial_directory.js
@@ -103,6 +103,7 @@ class TutorialDirectoryUi extends React.Component {
this.state = {
selectedTabId: openTab,
tutorialCards: [],
+ notices: getServices().tutorialService.getDirectoryNotices(),
};
}
@@ -231,9 +232,11 @@ class TutorialDirectoryUi extends React.Component {
renderNotices = () => {
const notices = getServices().tutorialService.getDirectoryNotices();
return notices.length ? (
-
- {notices.map((notice, index) => (
- {notice}
+
+ {notices.map((DirectoryNotice, index) => (
+
+
+
))}
) : null;
@@ -259,19 +262,16 @@ class TutorialDirectoryUi extends React.Component {
{headerLinks.length ? (
- {headerLinks.map((headerLink, index) => (
- {headerLink}
+ {headerLinks.map((HeaderLink, index) => (
+
+
+
))}
) : null}
- {notices ? (
- <>
-
- {notices}
- >
- ) : null}
+ {notices}
>
);
};
diff --git a/x-pack/plugins/ingest_manager/common/types/models/settings.ts b/x-pack/plugins/ingest_manager/common/types/models/settings.ts
index 2921808230b47..98d99911f1b3f 100644
--- a/x-pack/plugins/ingest_manager/common/types/models/settings.ts
+++ b/x-pack/plugins/ingest_manager/common/types/models/settings.ts
@@ -10,6 +10,7 @@ interface BaseSettings {
package_auto_upgrade?: boolean;
kibana_url?: string;
kibana_ca_sha256?: string;
+ has_seen_add_data_notice?: boolean;
}
export interface Settings extends BaseSettings {
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
index a4d8bb10fc8b0..c67c039da1fa2 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
@@ -3,4 +3,5 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+export { TutorialDirectoryNotice } from './tutorial_directory_notice';
export { TutorialModuleNotice } from './tutorial_module_notice';
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
new file mode 100644
index 0000000000000..253cbb8b0a619
--- /dev/null
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
@@ -0,0 +1,112 @@
+/*
+ * 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 React, { memo, useState, useCallback } from 'react';
+import styled from 'styled-components';
+import { FormattedMessage } from '@kbn/i18n/react';
+import {
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiButton,
+ EuiButtonEmpty,
+ EuiLink,
+ EuiCallOut,
+ EuiSpacer,
+} from '@elastic/eui';
+import { TutorialDirectoryNoticeComponent } from 'src/plugins/home/public';
+import { sendPutSettings, useGetSettings, useLink } from '../../hooks';
+
+const FlexItemButtonWrapper = styled(EuiFlexItem)`
+ &&& {
+ margin-bottom: 0;
+ }
+`;
+
+export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(() => {
+ const { getHref } = useLink();
+ const { data: settingsData, isLoading } = useGetSettings();
+ const [dismissedNotice, setDismissedNotice] = useState(false);
+
+ const dismissNotice = useCallback(async () => {
+ setDismissedNotice(true);
+ await sendPutSettings({
+ has_seen_add_data_notice: true,
+ });
+ }, []);
+
+ if (isLoading || settingsData?.item?.has_seen_add_data_notice || dismissedNotice) {
+ return null;
+ }
+ return (
+ <>
+
+
+
+
+ ),
+ }}
+ />
+ }
+ >
+
+
+
+
+ ),
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+ {
+ dismissNotice();
+ }}
+ >
+
+
+
+
+
+
+ >
+ );
+});
diff --git a/x-pack/plugins/ingest_manager/public/plugin.ts b/x-pack/plugins/ingest_manager/public/plugin.ts
index c56b970ecdbc7..be7ccb9431d05 100644
--- a/x-pack/plugins/ingest_manager/public/plugin.ts
+++ b/x-pack/plugins/ingest_manager/public/plugin.ts
@@ -20,7 +20,10 @@ import { PLUGIN_ID, CheckPermissionsResponse, PostIngestSetupResponse } from '..
import { IngestManagerConfigType } from '../common/types';
import { setupRouteService, appRoutesService } from '../common';
import { setHttpClient } from './applications/ingest_manager/hooks';
-import { TutorialModuleNotice } from './applications/ingest_manager/components/home_integration';
+import {
+ TutorialDirectoryNotice,
+ TutorialModuleNotice,
+} from './applications/ingest_manager/components/home_integration';
import { registerPackageConfigComponent } from './applications/ingest_manager/sections/agent_config/create_package_config_page/components/custom_package_config';
export { IngestManagerConfigType } from '../common/types';
@@ -87,6 +90,7 @@ export class IngestManagerPlugin
// Register components for home/add data integration
if (deps.home) {
+ deps.home.tutorials.registerDirectoryNotice(PLUGIN_ID, TutorialDirectoryNotice);
deps.home.tutorials.registerModuleNotice(PLUGIN_ID, TutorialModuleNotice);
}
diff --git a/x-pack/plugins/ingest_manager/server/saved_objects/index.ts b/x-pack/plugins/ingest_manager/server/saved_objects/index.ts
index b47cf4f7e7c3b..18849f1ce7a99 100644
--- a/x-pack/plugins/ingest_manager/server/saved_objects/index.ts
+++ b/x-pack/plugins/ingest_manager/server/saved_objects/index.ts
@@ -38,6 +38,7 @@ const savedObjectTypes: { [key: string]: SavedObjectsType } = {
package_auto_upgrade: { type: 'keyword' },
kibana_url: { type: 'keyword' },
kibana_ca_sha256: { type: 'keyword' },
+ has_seen_add_data_notice: { type: 'boolean', index: false },
},
},
},
diff --git a/x-pack/plugins/ingest_manager/server/types/rest_spec/settings.ts b/x-pack/plugins/ingest_manager/server/types/rest_spec/settings.ts
index f6e5fcbba7976..baee9f79d9317 100644
--- a/x-pack/plugins/ingest_manager/server/types/rest_spec/settings.ts
+++ b/x-pack/plugins/ingest_manager/server/types/rest_spec/settings.ts
@@ -13,5 +13,6 @@ export const PutSettingsRequestSchema = {
package_auto_upgrade: schema.maybe(schema.boolean()),
kibana_url: schema.maybe(schema.uri({ scheme: ['http', 'https'] })),
kibana_ca_sha256: schema.maybe(schema.string()),
+ has_seen_add_data_notice: schema.maybe(schema.boolean()),
}),
};
From 37fb2e95cdfa6c5501d46460e32ea664438cc4f1 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Wed, 8 Jul 2020 12:55:27 -0700
Subject: [PATCH 10/12] Add tutorial directory header link and tie it to the
state of the dismissible directory notice via observable
---
.../components/tutorial_directory.js | 29 +++++-----
.../components/home_integration/index.ts | 2 +-
.../tutorial_directory_notice.tsx | 54 ++++++++++++++++---
.../plugins/ingest_manager/public/plugin.ts | 2 +
4 files changed, 66 insertions(+), 21 deletions(-)
diff --git a/src/plugins/home/public/application/components/tutorial_directory.js b/src/plugins/home/public/application/components/tutorial_directory.js
index 4371c369ca483..948024ae85dda 100644
--- a/src/plugins/home/public/application/components/tutorial_directory.js
+++ b/src/plugins/home/public/application/components/tutorial_directory.js
@@ -242,13 +242,26 @@ class TutorialDirectoryUi extends React.Component {
) : null;
};
- renderHeader = () => {
+ renderHeaderLinks = () => {
const headerLinks = getServices().tutorialService.getDirectoryHeaderLinks();
+ return headerLinks.length ? (
+
+ {headerLinks.map((HeaderLink, index) => (
+
+
+
+ ))}
+
+ ) : null;
+ };
+
+ renderHeader = () => {
const notices = this.renderNotices();
+ const headerLinks = this.renderHeaderLinks();
return (
<>
-
+
@@ -259,17 +272,7 @@ class TutorialDirectoryUi extends React.Component {
- {headerLinks.length ? (
-
-
- {headerLinks.map((HeaderLink, index) => (
-
-
-
- ))}
-
-
- ) : null}
+ {headerLinks ? {headerLinks} : null}
{notices}
>
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
index c67c039da1fa2..bab6049198249 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/index.ts
@@ -3,5 +3,5 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-export { TutorialDirectoryNotice } from './tutorial_directory_notice';
+export { TutorialDirectoryNotice, TutorialDirectoryHeaderLink } from './tutorial_directory_notice';
export { TutorialModuleNotice } from './tutorial_module_notice';
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
index 253cbb8b0a619..da8c2feb2b551 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
@@ -3,7 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
-import React, { memo, useState, useCallback } from 'react';
+import React, { memo, useState, useCallback, useEffect } from 'react';
+import { BehaviorSubject } from 'rxjs';
import styled from 'styled-components';
import { FormattedMessage } from '@kbn/i18n/react';
import {
@@ -15,7 +16,10 @@ import {
EuiCallOut,
EuiSpacer,
} from '@elastic/eui';
-import { TutorialDirectoryNoticeComponent } from 'src/plugins/home/public';
+import {
+ TutorialDirectoryNoticeComponent,
+ TutorialDirectoryHeaderLinkComponent,
+} from 'src/plugins/home/public';
import { sendPutSettings, useGetSettings, useLink } from '../../hooks';
const FlexItemButtonWrapper = styled(EuiFlexItem)`
@@ -24,6 +28,11 @@ const FlexItemButtonWrapper = styled(EuiFlexItem)`
}
`;
+const tutorialDirectoryNoticeState$ = new BehaviorSubject({
+ settingsDataLoaded: false,
+ hasSeenNotice: false,
+});
+
export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(() => {
const { getHref } = useLink();
const { data: settingsData, isLoading } = useGetSettings();
@@ -36,10 +45,17 @@ export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(()
});
}, []);
- if (isLoading || settingsData?.item?.has_seen_add_data_notice || dismissedNotice) {
- return null;
- }
- return (
+ useEffect(() => {
+ tutorialDirectoryNoticeState$.next({
+ settingsDataLoaded: !isLoading,
+ hasSeenNotice: Boolean(dismissedNotice || settingsData?.item?.has_seen_add_data_notice),
+ });
+ }, [isLoading, settingsData, dismissedNotice]);
+
+ const hasSeenNotice =
+ isLoading || settingsData?.item?.has_seen_add_data_notice || dismissedNotice;
+
+ return !hasSeenNotice ? (
<>
>
- );
+ ) : null;
+});
+
+export const TutorialDirectoryHeaderLink: TutorialDirectoryHeaderLinkComponent = memo(() => {
+ const { getHref } = useLink();
+ const [noticeState, setNoticeState] = useState({
+ settingsDataLoaded: false,
+ hasSeenNotice: false,
+ });
+
+ useEffect(() => {
+ const subscription = tutorialDirectoryNoticeState$.subscribe((value) => setNoticeState(value));
+ return () => {
+ subscription.unsubscribe();
+ };
+ }, []);
+
+ return noticeState.settingsDataLoaded && noticeState.hasSeenNotice ? (
+
+
+
+ ) : null;
});
diff --git a/x-pack/plugins/ingest_manager/public/plugin.ts b/x-pack/plugins/ingest_manager/public/plugin.ts
index be7ccb9431d05..172ad2df210c3 100644
--- a/x-pack/plugins/ingest_manager/public/plugin.ts
+++ b/x-pack/plugins/ingest_manager/public/plugin.ts
@@ -22,6 +22,7 @@ import { setupRouteService, appRoutesService } from '../common';
import { setHttpClient } from './applications/ingest_manager/hooks';
import {
TutorialDirectoryNotice,
+ TutorialDirectoryHeaderLink,
TutorialModuleNotice,
} from './applications/ingest_manager/components/home_integration';
import { registerPackageConfigComponent } from './applications/ingest_manager/sections/agent_config/create_package_config_page/components/custom_package_config';
@@ -91,6 +92,7 @@ export class IngestManagerPlugin
// Register components for home/add data integration
if (deps.home) {
deps.home.tutorials.registerDirectoryNotice(PLUGIN_ID, TutorialDirectoryNotice);
+ deps.home.tutorials.registerDirectoryHeaderLink(PLUGIN_ID, TutorialDirectoryHeaderLink);
deps.home.tutorials.registerModuleNotice(PLUGIN_ID, TutorialModuleNotice);
}
From 71b810944381fa40ae56c60f5a4fb0b3999fced9 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Wed, 8 Jul 2020 13:07:44 -0700
Subject: [PATCH 11/12] Put spacing inside module notice component itself
---
.../components/tutorial/tutorial.js | 17 ++--
.../tutorial_module_notice.tsx | 85 ++++++++++---------
2 files changed, 53 insertions(+), 49 deletions(-)
diff --git a/src/plugins/home/public/application/components/tutorial/tutorial.js b/src/plugins/home/public/application/components/tutorial/tutorial.js
index 7d56f20ee2afa..8139bc6d38ab1 100644
--- a/src/plugins/home/public/application/components/tutorial/tutorial.js
+++ b/src/plugins/home/public/application/components/tutorial/tutorial.js
@@ -338,16 +338,13 @@ class TutorialUi extends React.Component {
const notices = getServices().tutorialService.getModuleNotices();
if (notices.length && this.state.tutorial.moduleName) {
return (
- <>
-
-
- {notices.map((ModuleNotice, index) => (
-
-
-
- ))}
-
- >
+
+ {notices.map((ModuleNotice, index) => (
+
+
+
+ ))}
+
);
} else {
return null;
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
index 35c0855aaacb9..e052627ea6ebb 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_module_notice.tsx
@@ -5,7 +5,7 @@
*/
import React, { memo } from 'react';
import { FormattedMessage } from '@kbn/i18n/react';
-import { EuiText, EuiLink } from '@elastic/eui';
+import { EuiText, EuiLink, EuiSpacer } from '@elastic/eui';
import { TutorialModuleNoticeComponent } from 'src/plugins/home/public';
import { useGetPackages, useLink } from '../../hooks';
@@ -20,45 +20,52 @@ export const TutorialModuleNotice: TutorialModuleNoticeComponent = memo(({ modul
if (pkgInfo) {
return (
-
-
-
-
-
- ),
- availableAsIntegrationLink: (
-
-
-
- ),
- blogPostLink: (
-
-
-
- ),
- }}
- />
-
-
+ values={{
+ notePrefix: (
+
+
+
+ ),
+ availableAsIntegrationLink: (
+
+
+
+ ),
+ blogPostLink: (
+
+
+
+ ),
+ }}
+ />
+
+
+ >
);
}
From f101ec7294292eaf46cf2eff00b3a1bc481af7f0 Mon Sep 17 00:00:00 2001
From: Jen Huang
Date: Wed, 8 Jul 2020 13:39:17 -0700
Subject: [PATCH 12/12] Check if ingest manager is available in current space
---
.../home_integration/tutorial_directory_notice.tsx | 8 +++++---
.../home_integration/tutorial_module_notice.tsx | 7 ++++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
index da8c2feb2b551..553623380dcc0 100644
--- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
+++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/home_integration/tutorial_directory_notice.tsx
@@ -20,7 +20,7 @@ import {
TutorialDirectoryNoticeComponent,
TutorialDirectoryHeaderLinkComponent,
} from 'src/plugins/home/public';
-import { sendPutSettings, useGetSettings, useLink } from '../../hooks';
+import { sendPutSettings, useGetSettings, useLink, useCapabilities } from '../../hooks';
const FlexItemButtonWrapper = styled(EuiFlexItem)`
&&& {
@@ -35,6 +35,7 @@ const tutorialDirectoryNoticeState$ = new BehaviorSubject({
export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(() => {
const { getHref } = useLink();
+ const { show: hasIngestManager } = useCapabilities();
const { data: settingsData, isLoading } = useGetSettings();
const [dismissedNotice, setDismissedNotice] = useState(false);
@@ -55,7 +56,7 @@ export const TutorialDirectoryNotice: TutorialDirectoryNoticeComponent = memo(()
const hasSeenNotice =
isLoading || settingsData?.item?.has_seen_add_data_notice || dismissedNotice;
- return !hasSeenNotice ? (
+ return hasIngestManager && !hasSeenNotice ? (
<>
{
const { getHref } = useLink();
+ const { show: hasIngestManager } = useCapabilities();
const [noticeState, setNoticeState] = useState({
settingsDataLoaded: false,
hasSeenNotice: false,
@@ -141,7 +143,7 @@ export const TutorialDirectoryHeaderLink: TutorialDirectoryHeaderLinkComponent =
};
}, []);
- return noticeState.settingsDataLoaded && noticeState.hasSeenNotice ? (
+ return hasIngestManager && noticeState.settingsDataLoaded && noticeState.hasSeenNotice ? (
{
- const { data: packagesData, isLoading } = useGetPackages();
const { getHref } = useLink();
+ const { show: hasIngestManager } = useCapabilities();
+ const { data: packagesData, isLoading } = useGetPackages();
const pkgInfo =
!isLoading &&
packagesData?.response &&
packagesData.response.find((pkg) => pkg.name === moduleName);
- if (pkgInfo) {
+ if (hasIngestManager && pkgInfo) {
return (
<>