-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature]: Add Wazuh help links as extension in Kibana help menu (#3170)
* feat(frontend): Add Wazuh help links as an extension in Kibana help menu * fix(changelog): Add PR to changelog * fix(changelog): Fix PR number and link * fix(help-links): Replace component and removed color styles from Wazuh lunk in the Kibana help button
- Loading branch information
Showing
7 changed files
with
118 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Wazuh app - Add the plugin help links as extension in Kibana help menu | ||
* Copyright (C) 2015-2021 Wazuh, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Find more information about this on the LICENSE file. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
EuiIcon, | ||
} from '@elastic/eui'; | ||
import { version } from '../../package.json'; | ||
import { getChrome, getHttp} from '../kibana-services'; | ||
import { | ||
WAZUH_LINK_DOCUMENTATION, | ||
WAZUH_LINK_GITHUB, | ||
WAZUH_LINK_GOOGLE_GROUPS, | ||
WAZUH_LINK_SLACK | ||
} from '../../common/constants'; | ||
|
||
const appVersionMajorDotMinor = version.split('.').slice(0, 2).join('.'); | ||
|
||
export function addHelpMenuToAppChrome(){ | ||
getChrome().setHelpExtension({ | ||
appName: 'Wazuh support', | ||
links: [ | ||
{ | ||
linkType: 'custom', | ||
href: `${WAZUH_LINK_DOCUMENTATION}/${appVersionMajorDotMinor}`, | ||
content: <span><EuiIcon type={getHttp().basePath.prepend('/plugins/wazuh/assets/icon_blue.svg')}></EuiIcon> Documentation</span> | ||
}, | ||
{ | ||
linkType: 'custom', | ||
href: WAZUH_LINK_SLACK, | ||
content: <span><EuiIcon type='logoSlack'></EuiIcon> Slack channel</span> | ||
}, | ||
{ | ||
linkType: 'custom', | ||
href: WAZUH_LINK_GITHUB, | ||
content: <span><EuiIcon type='logoGithub'></EuiIcon> Projects on Github</span> | ||
}, | ||
{ | ||
linkType: 'custom', | ||
href: WAZUH_LINK_GOOGLE_GROUPS, | ||
content: <span><EuiIcon type={getHttp().basePath.prepend('/plugins/wazuh/assets/icon_google_groups.svg')}></EuiIcon> Google Group</span> | ||
} | ||
] | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * as OdfeUtils from './odfe-utils'; | ||
|
||
export { checkPluginVersion } from './check-plugin-version'; | ||
export { checkPluginVersion } from './check-plugin-version'; | ||
|
||
export { addHelpMenuToAppChrome } from './add_help_menu_to_app'; |