[Observability RAC] Alerts page header updates (#108110)

* [RAC] remove gear icon from manage rules button

* change text

* Change to empty button

* remove unused translations

* change href const

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
mgiota 2021-08-12 12:47:11 +02:00 committed by GitHub
parent e9ac0c6674
commit 99e73c7960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 10 deletions

View file

@ -5,7 +5,14 @@
* 2.0.
*/
import { EuiButton, EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiLink, EuiSpacer } from '@elastic/eui';
import {
EuiButtonEmpty,
EuiCallOut,
EuiFlexGroup,
EuiFlexItem,
EuiLink,
EuiSpacer,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useCallback, useMemo, useRef } from 'react';
import { useHistory } from 'react-router-dom';
@ -55,9 +62,7 @@ export function AlertsPage({ routeParams }: AlertsPageProps) {
// In a future milestone we'll have a page dedicated to rule management in
// observability. For now link to the settings page.
const manageDetectionRulesHref = prepend(
'/app/management/insightsAndAlerting/triggersActions/alerts'
);
const manageRulesHref = prepend('/app/management/insightsAndAlerting/triggersActions/alerts');
const { data: dynamicIndexPatternResp } = useFetcher(({ signal }) => {
return callObservabilityApi({
@ -116,11 +121,11 @@ export function AlertsPage({ routeParams }: AlertsPageProps) {
</>
),
rightSideItems: [
<EuiButton fill href={manageDetectionRulesHref} iconType="gear">
{i18n.translate('xpack.observability.alerts.manageDetectionRulesButtonLabel', {
defaultMessage: 'Manage detection rules',
<EuiButtonEmpty href={manageRulesHref}>
{i18n.translate('xpack.observability.alerts.manageRulesButtonLabel', {
defaultMessage: 'Manage Rules',
})}
</EuiButton>,
</EuiButtonEmpty>,
],
}}
>

View file

@ -18332,7 +18332,6 @@
"xpack.monitoring.updateLicenseButtonLabel": "ライセンスを更新",
"xpack.monitoring.updateLicenseTitle": "ライセンスの更新",
"xpack.monitoring.useAvailableLicenseDescription": "すでに新しいライセンスがある場合は、今すぐアップロードしてください。",
"xpack.observability.alerts.manageDetectionRulesButtonLabel": "検出ルールの管理",
"xpack.observability.alerts.searchBarPlaceholder": "\"domain\": \"ecommerce\" AND (\"service.name\":\"ProductCatalogService\" …)",
"xpack.observability.alerts.statusFilter.allButtonLabel": "すべて",
"xpack.observability.alerts.statusFilter.closedButtonLabel": "終了",

View file

@ -18748,7 +18748,6 @@
"xpack.monitoring.updateLicenseButtonLabel": "更新许可证",
"xpack.monitoring.updateLicenseTitle": "更新您的许可证",
"xpack.monitoring.useAvailableLicenseDescription": "如果您已经持有新的许可证,请立即上传。",
"xpack.observability.alerts.manageDetectionRulesButtonLabel": "管理检测规则",
"xpack.observability.alerts.searchBarPlaceholder": "\"domain\": \"ecommerce\" AND (\"service.name\":\"ProductCatalogService\" …)",
"xpack.observability.alerts.statusFilter.allButtonLabel": "全部",
"xpack.observability.alerts.statusFilter.closedButtonLabel": "已关闭",