-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
Copy pathsetHelpExtension.ts
33 lines (31 loc) · 994 Bytes
/
setHelpExtension.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* 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 url from 'url';
import { i18n } from '@kbn/i18n';
import { CoreStart } from 'kibana/public';
export function setHelpExtension({ chrome, http }: CoreStart) {
chrome.setHelpExtension({
appName: i18n.translate('xpack.apm.feedbackMenu.appName', {
defaultMessage: 'APM',
}),
links: [
{
linkType: 'discuss',
href: 'https://discuss.elastic.co/c/apm',
},
{
linkType: 'custom',
href: url.format({
pathname: http.basePath.prepend('/app/kibana'),
hash: '/management/stack/upgrade_assistant',
}),
content: i18n.translate('xpack.apm.helpMenu.upgradeAssistantLink', {
defaultMessage: 'Upgrade assistant',
}),
},
],
});
}