mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Fleet] Update Fleet API doc link + remove beta badge (#154442)
### Summary This PR adds and updates documentation links and removes `beta` badges for the GA of Fleet API in 8.8.0. This includes the following changes: 1. Elastic Agent integration settings page, `API reference` tab: * Update the documentation link to https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html. * Remove the `beta` badge. 2. `Preview API request` flyout: * Add a link to the documentation to the title (cf. screenshots). * Remove the `beta` badge. Closes https://github.com/elastic/kibana/issues/152966 ### Screenshots #### Elastic Agent integration settings page, `API reference` tab - Before  #### Elastic Agent integration settings page, `API reference` tab - After  #### `Preview API request` flyout - Before  #### `Preview API request` flyout - After  ### Steps to test locally On this branch, start Kibana in dev. 1. Elastic Agent integration settings page, `API reference` tab: 1. Go to `<localKibanaUrl>/app/integrations/detail/elastic_agent-1.7.0/api-reference`. 2. Check that the `beta` badge is removed and that the `Learn more` link point to https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html. 2. `Preview API request` flyout: 1. Create a new agent policy: give it a name and click `Preview API request`. 2. Check that the `beta` badge is removed and that the title has a `Learn more about Fleet API` link that points to https://www.elastic.co/guide/en/fleet/master/fleet-api-docs.html. 3. Do the same checks when updating an agent policy, creating a package policy and updating a package policy. ### Checklist - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
This commit is contained in:
parent
0efdf351e6
commit
14222e6f03
4 changed files with 22 additions and 9 deletions
|
@ -679,6 +679,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
|
|||
packageSignatures: `${FLEET_DOCS}package-signatures.html`,
|
||||
secureLogstash: `${FLEET_DOCS}secure-logstash-connections.html`,
|
||||
agentPolicy: `${FLEET_DOCS}agent-policy.html`,
|
||||
api: `${FLEET_DOCS}fleet-api-docs.html`,
|
||||
},
|
||||
ecs: {
|
||||
guide: `${ELASTIC_WEBSITE_URL}guide/en/ecs/current/index.html`,
|
||||
|
|
|
@ -450,6 +450,7 @@ export interface DocLinks {
|
|||
onPremRegistry: string;
|
||||
secureLogstash: string;
|
||||
agentPolicy: string;
|
||||
api: string;
|
||||
}>;
|
||||
readonly ecs: {
|
||||
readonly guide: string;
|
||||
|
|
|
@ -16,7 +16,6 @@ import {
|
|||
EuiSpacer,
|
||||
EuiText,
|
||||
EuiLink,
|
||||
EuiBetaBadge,
|
||||
} from '@elastic/eui';
|
||||
import type { EuiInMemoryTableProps } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
@ -48,7 +47,7 @@ export const DocumentationPage: React.FunctionComponent<Props> = ({ packageInfo,
|
|||
defaultMessage="This documents all the inputs, streams, and variables available to use this integration programmatically via the Fleet Kibana API. {learnMore}"
|
||||
values={{
|
||||
learnMore: (
|
||||
<EuiLink href={docLinks.links.fleet.guide}>
|
||||
<EuiLink href={docLinks.links.fleet.api}>
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.epm.packageDetails.apiReference.learnMoreLink"
|
||||
defaultMessage="Learn more"
|
||||
|
@ -59,9 +58,6 @@ export const DocumentationPage: React.FunctionComponent<Props> = ({ packageInfo,
|
|||
/>
|
||||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiBetaBadge label="beta" />
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiSpacer size="m" />
|
||||
<PackageVars vars={packageInfo.vars} />
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { useCallback, useRef } from 'react';
|
||||
|
||||
import { EuiBetaBadge, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiLink, EuiText } from '@elastic/eui';
|
||||
import type { EuiButtonEmptyProps } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
|
@ -82,16 +82,31 @@ export const ApiRequestFlyout: React.FunctionComponent<ApiRequestFlyoutProps> =
|
|||
defaultMessage: 'Perform these request against Kibana',
|
||||
}),
|
||||
}) => {
|
||||
const { application, share } = useStartServices();
|
||||
const { docLinks, application, share } = useStartServices();
|
||||
|
||||
return (
|
||||
<ViewApiRequestFlyout
|
||||
// @ts-expect-error ViewApiRequestFlyout title type only allow string
|
||||
title={
|
||||
<EuiFlexGroup>
|
||||
<EuiFlexGroup alignItems="baseline">
|
||||
<EuiFlexItem grow={false}>{title}</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiBetaBadge label="beta" />
|
||||
<EuiText size="xs">
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.apiRequestFlyout.devtoolsRequestDescription"
|
||||
defaultMessage="{learnMore}"
|
||||
values={{
|
||||
learnMore: (
|
||||
<EuiLink href={docLinks.links.fleet.api}>
|
||||
<FormattedMessage
|
||||
id="xpack.fleet.apiRequestFlyout.learnMoreLink"
|
||||
defaultMessage="Learn more about Fleet API"
|
||||
/>
|
||||
</EuiLink>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue