Skip to content

Commit

Permalink
[Fleet] Surface package version used in a package policy in UI (elast…
Browse files Browse the repository at this point in the history
…ic#93712)

* Surface package version used in a package policy in UI

* Fix i18n
  • Loading branch information
jen-huang authored and kibanamachine committed Mar 8, 2021
1 parent c36677a commit abbb34d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
EuiButton,
EuiFlexGroup,
EuiFlexItem,
EuiText,
} from '@elastic/eui';

import { AgentPolicy, PackagePolicy } from '../../../../../types';
Expand Down Expand Up @@ -133,6 +134,17 @@ export const PackagePoliciesTable: React.FunctionComponent<Props> = ({
</EuiFlexItem>
)}
<EuiFlexItem grow={false}>{packageTitle}</EuiFlexItem>
{packagePolicy.package && (
<EuiFlexItem grow={false}>
<EuiText color="subdued" size="xs" className="eui-textNoWrap">
<FormattedMessage
id="xpack.fleet.policyDetails.packagePoliciesTable.packageVersion"
defaultMessage="v{version}"
values={{ version: packagePolicy.package.version }}
/>
</EuiText>
</EuiFlexItem>
)}
</EuiFlexGroup>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<span className="eui-textTruncate" title={description}>
{description}
</span>
);
},
},
{
field: 'packagePolicy.policy_id',
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "最終更新",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "上次更新时间",
Expand Down

0 comments on commit abbb34d

Please sign in to comment.