From 263ad39046a3b2c701884191e687c32dde8f8693 Mon Sep 17 00:00:00 2001 From: Jen Huang Date: Mon, 8 Mar 2021 09:07:27 -0800 Subject: [PATCH] [Fleet] Surface package version used in a package policy in UI (#93712) * Surface package version used in a package policy in UI * Fix i18n --- .../package_policies/package_policies_table.tsx | 12 ++++++++++++ .../screens/detail/policies/package_policies.tsx | 14 +++----------- .../plugins/translations/translations/ja-JP.json | 1 - .../plugins/translations/translations/zh-CN.json | 1 - 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx index 550a0275f1895..eaae985df543d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx @@ -16,6 +16,7 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem, + EuiText, } from '@elastic/eui'; import { AgentPolicy, PackagePolicy } from '../../../../../types'; import { PackageIcon, ContextMenuActions } from '../../../../../components'; @@ -132,6 +133,17 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ )} {packageTitle} + {packagePolicy.package && ( + + + + + + )} ); }, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx index 53cd642a1ef78..b65aea3aa782f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/screens/detail/policies/package_policies.tsx @@ -104,18 +104,10 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps }, }, { - field: 'packagePolicy.description', - name: i18n.translate('xpack.fleet.epm.packageDetails.integrationList.description', { - defaultMessage: 'Description', + field: 'packagePolicy.package.version', + name: i18n.translate('xpack.fleet.epm.packageDetails.integrationList.version', { + defaultMessage: 'Version', }), - truncateText: true, - render(description) { - return ( - - {description} - - ); - }, }, { field: 'packagePolicy.policy_id', diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index ffc57957c5f9e..61e7e1c96b980 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -8678,7 +8678,6 @@ "xpack.fleet.epm.loadingIntegrationErrorTitle": "統合詳細の読み込みエラー", "xpack.fleet.epm.packageDetails.integrationList.agentCount": "エージェント", "xpack.fleet.epm.packageDetails.integrationList.agentPolicy": "エージェントポリシー", - "xpack.fleet.epm.packageDetails.integrationList.description": "説明", "xpack.fleet.epm.packageDetails.integrationList.loadingPoliciesMessage": "統合ポリシーを読み込んでいます...", "xpack.fleet.epm.packageDetails.integrationList.name": "統合", "xpack.fleet.epm.packageDetails.integrationList.updatedAt": "最終更新", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b31e1c37727a9..75451eda49088 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -8760,7 +8760,6 @@ "xpack.fleet.epm.loadingIntegrationErrorTitle": "加载集成详情时出错", "xpack.fleet.epm.packageDetails.integrationList.agentCount": "代理", "xpack.fleet.epm.packageDetails.integrationList.agentPolicy": "代理策略", - "xpack.fleet.epm.packageDetails.integrationList.description": "描述", "xpack.fleet.epm.packageDetails.integrationList.loadingPoliciesMessage": "正在加载集成策略……", "xpack.fleet.epm.packageDetails.integrationList.name": "集成", "xpack.fleet.epm.packageDetails.integrationList.updatedAt": "上次更新时间",