From 4c92ec6e445ed486cb3d4a7a21a3b781a7557530 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 8 Mar 2021 14:19:51 -0500 Subject: [PATCH] [Fleet] Surface package version used in a package policy in UI (#93712) (#93967) * Surface package version used in a package policy in UI * Fix i18n Co-authored-by: Jen Huang --- .../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 423ea052be41b..899c457bbd9f9 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'; @@ -133,6 +134,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 1349a48b315ff..a573cd49e61ce 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 @@ -106,18 +106,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 6e0ec861f34bd..7f973ba23ea7a 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -8544,7 +8544,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 37b5019a231f2..c2d237c8204dd 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -8625,7 +8625,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": "上次更新时间",