[Cloud Security] Fix benchmark rules name and API usage (#166337)

This commit is contained in:
Jordan 2023-09-14 15:40:59 +03:00 committed by GitHub
parent 1316738857
commit 2d1c7d232e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 24 deletions

View file

@ -68,8 +68,8 @@ const BenchmarkEmptyState = ({ name }: { name: string }) => (
<EuiText>
<strong>
<FormattedMessage
id="xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundTitle"
defaultMessage="No benchmark integrations found"
id="xpack.csp.benchmarks.benchmarkEmptyState.rulesNotFoundTitle"
defaultMessage="No benchmark rules found"
/>
{name && (
<FormattedMessage
@ -85,8 +85,8 @@ const BenchmarkEmptyState = ({ name }: { name: string }) => (
<EuiText>
<EuiTextColor color="subdued">
<FormattedMessage
id="xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundWithFiltersTitle"
defaultMessage="We weren't able to find any benchmark integrations with the above filters."
id="xpack.csp.benchmarks.benchmarkEmptyState.rulesNotFoundWithFiltersTitle"
defaultMessage="We weren't able to find any benchmark rules with the above filters."
/>
</EuiTextColor>
</EuiText>
@ -154,10 +154,9 @@ export const Benchmarks = () => {
data-test-subj={TEST_SUBJ.BENCHMARKS_PAGE_HEADER}
pageTitle={
<CloudPosturePageTitle
title={i18n.translate(
'xpack.csp.benchmarks.benchmarksPageHeader.benchmarkIntegrationsTitle',
{ defaultMessage: 'Benchmark Integrations' }
)}
title={i18n.translate('xpack.csp.benchmarks.benchmarksPageHeader.benchmarkRulesTitle', {
defaultMessage: 'Benchmark Rules',
})}
/>
}
rightSideItems={[<AddCisIntegrationButton />]}

View file

@ -85,8 +85,8 @@ export const Rules = ({ match: { params } }: RouteComponentProps<PageUrlParams>)
<Link to={generatePath(cloudPosturePages.benchmarks.path)}>
<EuiButtonEmpty iconType="arrowLeft" contentProps={{ style: { padding: 0 } }}>
<FormattedMessage
id="xpack.csp.rules.rulesPageHeader.benchmarkIntegrationsButtonLabel"
defaultMessage="Benchmark Integrations"
id="xpack.csp.rules.rulesPageHeader.benchmarkRulesButtonLabel"
defaultMessage="Benchmark Rules"
/>
</EuiButtonEmpty>
</Link>

View file

@ -10,6 +10,7 @@ import {
type GetOnePackagePolicyResponse,
packagePolicyRouteService,
agentPolicyRouteService,
API_VERSIONS,
} from '@kbn/fleet-plugin/common';
import { type PageUrlParams } from './rules_container';
import { useKibana } from '../../common/hooks/use_kibana';
@ -20,10 +21,14 @@ export const useCspIntegrationInfo = ({ packagePolicyId, policyId }: PageUrlPara
return useQuery(['cspRulesInfo', { packagePolicyId, policyId }], () =>
Promise.all([
http
.get<GetOnePackagePolicyResponse>(packagePolicyRouteService.getInfoPath(packagePolicyId))
.get<GetOnePackagePolicyResponse>(packagePolicyRouteService.getInfoPath(packagePolicyId), {
version: API_VERSIONS.public.v1,
})
.then((response) => response.item),
http
.get<CopyAgentPolicyResponse>(agentPolicyRouteService.getInfoPath(policyId))
.get<CopyAgentPolicyResponse>(agentPolicyRouteService.getInfoPath(policyId), {
version: API_VERSIONS.public.v1,
})
.then((response) => response.item),
])
);

View file

@ -11310,11 +11310,8 @@
"xpack.csp.awsIntegration.sharedCredentialsDescription": "Si vous utilisez différentes informations d'identification AWS pour différents outils ou applications, vous pouvez utiliser les profils pour définir plusieurs clés d'accès dans le même fichier de configuration.",
"xpack.csp.awsIntegration.temporaryKeysDescription": "Vous pouvez configurer dans AWS des informations d'identification de sécurité temporaires pour une durée spécifiée. Elles comprennent un ID de clé d'accès, une clé d'accès secrète et un jeton de sécurité, qui peut généralement être récupéré à l'aide de GetSessionToken.",
"xpack.csp.awsIntegration.temporaryKeysLabel": "Clés temporaires",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundTitle": "Aucune intégration Benchmark trouvée",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundWithFiltersTitle": "Nous n'avons trouvé aucune intégration Benchmark avec les filtres ci-dessus.",
"xpack.csp.benchmarks.benchmarkSearchField.searchPlaceholder": "Rechercher par nom d'intégration",
"xpack.csp.benchmarks.benchmarksPageHeader.addIntegrationButtonLabel": "Ajouter une intégration",
"xpack.csp.benchmarks.benchmarksPageHeader.benchmarkIntegrationsTitle": "Intégrations Benchmark",
"xpack.csp.benchmarks.benchmarksTable.agentPolicyColumnTitle": "Politique d'agent",
"xpack.csp.benchmarks.benchmarksTable.createdAtColumnTitle": "Créé",
"xpack.csp.benchmarks.benchmarksTable.createdByColumnTitle": "Créé par",
@ -11528,7 +11525,6 @@
"xpack.csp.rules.manageIntegrationButtonLabel": "Gérer l'intégration",
"xpack.csp.rules.ruleFlyout.overviewTabLabel": "Aperçu",
"xpack.csp.rules.ruleFlyout.remediationTabLabel": "Résolution",
"xpack.csp.rules.rulesPageHeader.benchmarkIntegrationsButtonLabel": "Intégrations Benchmark",
"xpack.csp.rules.rulesPageSharedValues.benchmarkTitle": "Benchmark",
"xpack.csp.rules.rulesPageSharedValues.deploymentTypeTitle": "Type de déploiement",
"xpack.csp.rules.rulesPageSharedValues.integrationTitle": "Intégration",

View file

@ -11325,11 +11325,8 @@
"xpack.csp.awsIntegration.sharedCredentialsDescription": "ツールやアプリケーションごとに異なるAWS認証情報を使用する場合、プロファイルを使用して、同じ設定ファイルに複数のアクセスキーを定義することができます。",
"xpack.csp.awsIntegration.temporaryKeysDescription": "AWSの一時的なセキュリティ認証情報は、指定した期間だけ存続するように設定することができます。アクセスキーID、シークレットアクセスキー、セキュリティトークンから構成され、通常GetSessionTokenで確認することができます。",
"xpack.csp.awsIntegration.temporaryKeysLabel": "一時キー",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundTitle": "ベンチマーク統合が見つかりません",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundWithFiltersTitle": "上記のフィルターでベンチマーク統合が見つかりませんでした。",
"xpack.csp.benchmarks.benchmarkSearchField.searchPlaceholder": "統合名で検索",
"xpack.csp.benchmarks.benchmarksPageHeader.addIntegrationButtonLabel": "統合の追加",
"xpack.csp.benchmarks.benchmarksPageHeader.benchmarkIntegrationsTitle": "ベンチマーク統合",
"xpack.csp.benchmarks.benchmarksTable.agentPolicyColumnTitle": "エージェントポリシー",
"xpack.csp.benchmarks.benchmarksTable.createdAtColumnTitle": "作成済み",
"xpack.csp.benchmarks.benchmarksTable.createdByColumnTitle": "作成者",
@ -11543,7 +11540,6 @@
"xpack.csp.rules.manageIntegrationButtonLabel": "統合を管理",
"xpack.csp.rules.ruleFlyout.overviewTabLabel": "概要",
"xpack.csp.rules.ruleFlyout.remediationTabLabel": "修正",
"xpack.csp.rules.rulesPageHeader.benchmarkIntegrationsButtonLabel": "ベンチマーク統合",
"xpack.csp.rules.rulesPageSharedValues.benchmarkTitle": "ベンチマーク",
"xpack.csp.rules.rulesPageSharedValues.deploymentTypeTitle": "デプロイタイプ",
"xpack.csp.rules.rulesPageSharedValues.integrationTitle": "統合",

View file

@ -11325,11 +11325,8 @@
"xpack.csp.awsIntegration.sharedCredentialsDescription": "如果对不同工具或应用程序使用不同的 AWS 凭据,可以使用配置文件在同一配置文件中定义多个访问密钥。",
"xpack.csp.awsIntegration.temporaryKeysDescription": "您可以在 AWS 中配置在指定持续时间内有效的临时安全凭据。它们包括访问密钥 ID、机密访问密钥和安全令牌通常使用 GetSessionToken 查找)。",
"xpack.csp.awsIntegration.temporaryKeysLabel": "临时密钥",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundTitle": "找不到基准集成",
"xpack.csp.benchmarks.benchmarkEmptyState.integrationsNotFoundWithFiltersTitle": "使用上述筛选,我们无法找到任何基准集成。",
"xpack.csp.benchmarks.benchmarkSearchField.searchPlaceholder": "按集成名称搜索",
"xpack.csp.benchmarks.benchmarksPageHeader.addIntegrationButtonLabel": "添加集成",
"xpack.csp.benchmarks.benchmarksPageHeader.benchmarkIntegrationsTitle": "基准集成",
"xpack.csp.benchmarks.benchmarksTable.agentPolicyColumnTitle": "代理策略",
"xpack.csp.benchmarks.benchmarksTable.createdAtColumnTitle": "创建时间",
"xpack.csp.benchmarks.benchmarksTable.createdByColumnTitle": "创建者",
@ -11543,7 +11540,6 @@
"xpack.csp.rules.manageIntegrationButtonLabel": "管理集成",
"xpack.csp.rules.ruleFlyout.overviewTabLabel": "概览",
"xpack.csp.rules.ruleFlyout.remediationTabLabel": "补救",
"xpack.csp.rules.rulesPageHeader.benchmarkIntegrationsButtonLabel": "基准集成",
"xpack.csp.rules.rulesPageSharedValues.benchmarkTitle": "基准",
"xpack.csp.rules.rulesPageSharedValues.deploymentTypeTitle": "部署类型",
"xpack.csp.rules.rulesPageSharedValues.integrationTitle": "集成",