mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[InfraUI] Add Discuss feedback links to Infrastructure and Logs (#29519)
* Add header_feedback_link component * Replace beta -> feedback link in Waffle Map * Replace beta badge -> feedback link in logs
This commit is contained in:
parent
2510ccb0ae
commit
4d6bfd6b26
3 changed files with 39 additions and 4 deletions
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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 { EuiHeaderSection, EuiLink } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
interface InfraHeaderFeedbackLinkProps {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export const InfraHeaderFeedbackLink: React.SFC<InfraHeaderFeedbackLinkProps> = ({ url }) => (
|
||||
<VerticallyCenteredHeaderSection side="right">
|
||||
<EuiLink href={url} target="_blank" rel="noopener noreferrer">
|
||||
<FormattedMessage
|
||||
id="xpack.infra.headerFeedbackLink.feedbackText"
|
||||
defaultMessage="Feedback"
|
||||
/>
|
||||
</EuiLink>
|
||||
</VerticallyCenteredHeaderSection>
|
||||
);
|
||||
|
||||
const VerticallyCenteredHeaderSection = styled(EuiHeaderSection)`
|
||||
padding-left: ${props => props.theme.eui.euiSizeS};
|
||||
padding-right: ${props => props.theme.eui.euiSizeS};
|
||||
align-items: center;
|
||||
`;
|
|
@ -15,7 +15,7 @@ import { EmptyPage } from '../../components/empty_page';
|
|||
import { Header } from '../../components/header';
|
||||
import { ColumnarPage } from '../../components/page';
|
||||
|
||||
import { InfrastructureBetaBadgeHeaderSection } from '../../components/beta_badge_header_section';
|
||||
import { InfraHeaderFeedbackLink } from '../../components/header_feedback_link';
|
||||
import { WithWaffleFilterUrlState } from '../../containers/waffle/with_waffle_filters';
|
||||
import { WithWaffleOptionsUrlState } from '../../containers/waffle/with_waffle_options';
|
||||
import { WithWaffleTimeUrlState } from '../../containers/waffle/with_waffle_time';
|
||||
|
@ -35,7 +35,11 @@ export const HomePage = injectI18n(
|
|||
|
||||
return (
|
||||
<ColumnarPage>
|
||||
<Header appendSections={<InfrastructureBetaBadgeHeaderSection />} />
|
||||
<Header
|
||||
appendSections={
|
||||
<InfraHeaderFeedbackLink url="https://discuss.elastic.co/c/infrastructure" />
|
||||
}
|
||||
/>
|
||||
<WithSource>
|
||||
{({
|
||||
derivedIndexPattern,
|
||||
|
|
|
@ -14,7 +14,7 @@ import { EmptyPage } from '../../components/empty_page';
|
|||
import { Header } from '../../components/header';
|
||||
import { ColumnarPage } from '../../components/page';
|
||||
|
||||
import { LogsBetaBadgeHeaderSection } from '../../components/beta_badge_header_section';
|
||||
import { InfraHeaderFeedbackLink } from '../../components/header_feedback_link';
|
||||
import { WithLogFilterUrlState } from '../../containers/logs/with_log_filter';
|
||||
import { WithLogMinimapUrlState } from '../../containers/logs/with_log_minimap';
|
||||
import { WithLogPositionUrlState } from '../../containers/logs/with_log_position';
|
||||
|
@ -36,7 +36,7 @@ export const LogsPage = injectI18n(
|
|||
return (
|
||||
<ColumnarPage>
|
||||
<Header
|
||||
appendSections={<LogsBetaBadgeHeaderSection />}
|
||||
appendSections={<InfraHeaderFeedbackLink url="https://discuss.elastic.co/c/logs" />}
|
||||
breadcrumbs={[
|
||||
{
|
||||
text: intl.formatMessage({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue