Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ChangelogLinks } from '@ovh-ux/manager-react-components';

export const CHANGELOG_LINKS: ChangelogLinks = {
roadmap:
'https://github.com/orgs/ovh/projects/16/views/1?sliceBy%5Bvalue%5D=Identity+and+Access+Management+%28IAM%29',
changelog:
'https://github.com/orgs/ovh/projects/16/views/6?sliceBy%5Bvalue%5D=Identity+and+Access+Management+%28IAM%29',
'feature-request':
'https://github.com/ovh/management-security-operations-roadmap/issues/new/choose',
};

export const CHANGELOG_CHAPTERS = [
'identity-security-operation',
'identity-access-management',
'identity-access-management',
];
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import {
BaseLayout,
ChangelogButton,
HeadersProps,
Notifications,
} from '@ovh-ux/manager-react-components';
import TagsListDatagrid from './components/tagsListDatagrid/TagsListDatagrid.component';
import { TagManagerContextProvider } from './TagManagerContext';
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';

export default function TagManager() {
const { t } = useTranslation('tag-manager');

const header: HeadersProps = {
title: t('title'),
description: t('description'),
changelogButton: (
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
),
};

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import React from 'react';
import '@testing-library/jest-dom';
import { describe, it, vi } from 'vitest';
import { OdsCheckbox } from '@ovhcloud/ods-components/react';
import { screen } from '@testing-library/react';
import { renderTestApp } from '@/test-utils/renderTestApp';

vi.mock('@ovh-ux/manager-react-components', async (importOriginal) => ({
Expand All @@ -25,4 +25,9 @@ describe('Tag Manager page', () => {
it('displays Tag manager', async () => {
await renderTestApp();
});

it('displays changelog button', async () => {
const { container } = await renderTestApp();
expect(container).toContainHTML('Roadmap & Changelog');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import {
BaseLayout,
ChangelogButton,
Notifications,
RedirectionGuard,
} from '@ovh-ux/manager-react-components';
Expand All @@ -19,6 +20,7 @@ import ResourcesListDatagrid from '@/components/resourcesDatagrid/ResourcesDatag
import { ResourcesDatagridContextProvider } from '@/components/resourcesDatagrid/ResourcesDatagridContext';
import AssignTagTopbar from './components/AssignTagTopbar.component';
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';

export default function AssignTag() {
const { t } = useTranslation('tag-manager');
Expand All @@ -27,6 +29,9 @@ export default function AssignTag() {

const header = {
title: t('assignMultipleToResources'),
changelogButton: (
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
),
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import {
BaseLayout,
ChangelogButton,
Notifications,
RedirectionGuard,
} from '@ovh-ux/manager-react-components';
Expand All @@ -18,16 +19,18 @@ import TagDetailTopbar from './components/TagDetailTopbar.component';
import { tagTofilter } from '@/utils/formatFiltersForApi';
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
import TagDetailActions from './components/TagDetailActions.component';
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';

export default function TagDetail() {
const { tag } = useParams();
const navigate = useNavigate();
const { t } = useTranslation('tag-manager');

const header = {
title: t('tagDetailTitle', {
tag,
}),
title: t('tagDetailTitle', { tag }),
changelogButton: (
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
),
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import {
BaseLayout,
ChangelogButton,
Notifications,
RedirectionGuard,
} from '@ovh-ux/manager-react-components';
Expand All @@ -15,6 +16,7 @@ import ResourcesListDatagrid from '@/components/resourcesDatagrid/ResourcesDatag
import { ResourcesDatagridContextProvider } from '@/components/resourcesDatagrid/ResourcesDatagridContext';
import AssignTagTopbar from '../assignTag/components/AssignTagTopbar.component';
import { Breadcrumb } from '@/components/breadcrumb/Breadcrumb.component';
import { CHANGELOG_LINKS, CHANGELOG_CHAPTERS } from '@/constants';

export default function TagDetailAssign() {
const { t } = useTranslation('tag-manager');
Expand All @@ -23,6 +25,9 @@ export default function TagDetailAssign() {

const header = {
title: t('assignTagToResources', { tag }),
changelogButton: (
<ChangelogButton links={CHANGELOG_LINKS} chapters={CHANGELOG_CHAPTERS} />
),
};

const onSuccessUrl = urls.tagDetail.replace(':tag', tag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ export default class LogsStreamsAddCtrl {
this.LogsConstants.CONSUMPTION_CAPACITY,
) &&
capabilities.maximumQuantity ===
this.LogsConstants.INDEXING_TIERING,
this.LogsConstants.INDEXING_TIERING.MEDIUM,
);
const indexingSecondStepPrice = add.plan.details.pricings.default.find(
(capabilities) =>
capabilities.capacities.includes(
this.LogsConstants.CONSUMPTION_CAPACITY,
) &&
capabilities.minimumQuantity ===
this.LogsConstants.INDEXING_TIERING + 1,
this.LogsConstants.INDEXING_TIERING.MEDIUM + 1,
);
this.indexingStoragePrice.FirstStep.price =
indexingFirstStepPrice.price.text;
Expand Down Expand Up @@ -187,17 +187,13 @@ export default class LogsStreamsAddCtrl {
return `${desc} ${price}`;
}

getIndexingPrices() {
getIndexingPrices(size, values) {
return this.$translate.instant(
'logs_streams_enable_indexing_description',
{
t0: this.indexingStoragePrice.FirstStep.price,
t1: this.LogsConstants.INDEXING_TIERING,
t2: this.indexingStoragePrice.SecondStep.price,
},
`logs_streams_enable_indexing_description_detail_${size}`,
values,
undefined,
false,
'sceParameters', // Expose devise symbol from API without sanitization
'sceParameters',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,28 @@
<oui-checkbox
id="stream_enable_indexing"
name="stream_enable_indexing"
data-description="{{ ctrl.getIndexingPrices() }}"
data-model="ctrl.stream.data.indexingEnabled"
><span data-translate="logs_streams_enable_indexing"></span>
>
<oui-checkbox-label
data-translate="logs_streams_enable_indexing"
></oui-checkbox-label>
<oui-checkbox-description>
<p
data-translate="logs_streams_enable_indexing_description"
></p>
<ul>
<li
data-translate="logs_streams_enable_indexing_description_detail_small"
data-translate-values="{t0: ctrl.LogsConstants.INDEXING_TIERING.SMALL}"
></li>
<li
data-ng-bind="ctrl.getIndexingPrices('medium', {t0: ctrl.LogsConstants.INDEXING_TIERING.SMALL + 1, t1: ctrl.LogsConstants.INDEXING_TIERING.MEDIUM, t2: ctrl.indexingStoragePrice.FirstStep.price})"
></li>
<li
data-ng-bind="ctrl.getIndexingPrices('large', {t0: ctrl.LogsConstants.INDEXING_TIERING.MEDIUM + 1, t1: ctrl.indexingStoragePrice.SecondStep.price})"
></li>
</ul>
</oui-checkbox-description>
</oui-checkbox>
</oui-field>
<div data-ng-if="ctrl.stream.data.indexingEnabled">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ export default {
STREAM: 'logs-indexed-in-gb',
},
COLDSTORAGE_INCREMENT: 1,
INDEXING_TIERING: 100,
INDEXING_TIERING: {
SMALL: 1,
MEDIUM: 100,
},
productName: 'logs',
logstash: 'LOGSTASH',
flowgger: 'FLOWGGER',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default /* @ngInject */ ($stateProvider) => {
LogsConstants.CONSUMPTION_CAPACITY,
) &&
capabilities.minimumQuantity ===
LogsConstants.INDEXING_TIERING + 1,
LogsConstants.INDEXING_TIERING.MEDIUM + 1,
);

const standardPlanPrice = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"logs_streams_update_title": "Stream bearbeiten",
"logs_streams_update_description": "Für den Stream <strong>{{ name }}</strong>",
"logs_streams_enable_indexing": "Indizierung aktivieren",
"logs_streams_enable_indexing_description": "Entdecken Sie Ihre Logs mit Graylog und OpenSearch zum Preis von {{t0}} inkl. MwSt / GB / Monat für die ersten {{t1}} GB, danach {{t2}} inkl. MwSt / GB / Monat.",
"logs_streams_enable_indexing_description": "Erkunden Sie Ihre Logs auf Graylog und OpenSearch.",
"logs_streams_no_limit": "Keine Einschränkung",
"logs_streams_enable_websocket": "WebSocket-Übertragung aktivieren",
"logs_streams_enable_websocket_description": "Verfolgen Sie den Empfang Ihrer Logs in Echtzeit über das WebSocket-Protokoll.",
Expand Down Expand Up @@ -803,5 +803,8 @@
"streams_subscriptions_resource_products_account-api": "OVHcloud Kundencenter und OVHcloud API",
"streams_subscriptions_resource_products_account-audit": "OVHcloud Audit-Logs",
"streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service",
"logs_encryption_keys_get_error": "Beim Laden der Verschlüsselungsschlüssel ist ein Fehler aufgetreten: {{message}}"
"logs_encryption_keys_get_error": "Beim Laden der Verschlüsselungsschlüssel ist ein Fehler aufgetreten: {{message}}",
"logs_streams_enable_indexing_description_detail_small": "Log-Speicher < {{t0}} GB an Logs: kostenlos",
"logs_streams_enable_indexing_description_detail_medium": "Log-Speicher von {{t0}} bis {{t1}} GB an Logs: {{t2}} inkl. MwSt./GB/Monat",
"logs_streams_enable_indexing_description_detail_large": "Log-Speicher für größere Volumen (über {{t0}} GB): {{t1}} inkl. MwSt./GB/Monat"
}
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"logs_streams_update_title": "Modify data stream",
"logs_streams_update_description": "For the <strong>{{name}}</strong> data stream",
"logs_streams_enable_indexing": "Enable indexation",
"logs_streams_enable_indexing_description": "Explore your logs on Graylog and OpenSearch ({{t0}} ex. VAT/GB/month for the first {{t1}}GB, {{t2}} ex. VAT/GB/month for larger volumes)",
"logs_streams_enable_indexing_description": "Explore your logs on Graylog and OpenSearch.",
"logs_streams_no_limit": "No limit",
"logs_streams_enable_websocket": "Enable WebSocket broadcasting",
"logs_streams_enable_websocket_description": "Monitor the logs you receive in real time, via the WebSocket protocol.",
Expand Down Expand Up @@ -803,5 +803,8 @@
"streams_subscriptions_resource_products_account-api": "OVHcloud &amp; OVHcloud API Control Panel",
"streams_subscriptions_resource_products_account-audit": "OVHcloud Logs Audit",
"streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service",
"logs_encryption_keys_get_error": "An error has occurred loading the encryption keys: {{message}}"
"logs_encryption_keys_get_error": "An error has occurred loading the encryption keys: {{message}}",
"logs_streams_enable_indexing_description_detail_small": "Log storage < {{t0}} GB of logs: Free",
"logs_streams_enable_indexing_description_detail_medium": "Log storage from {{t0}} to {{t1}} GB of logs: {{t2}} ex. VAT/GB/month",
"logs_streams_enable_indexing_description_detail_large": "Log storage for larger volumes (above {{t0}} GB): {{t1}} ex. VAT/GB/month"
}
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"logs_streams_update_title": "Modificar el flujo",
"logs_streams_update_description": "Para el flujo <strong>{{ name }}</strong>",
"logs_streams_enable_indexing": "Activar la indexación",
"logs_streams_enable_indexing_description": "Explore sus logs en Graylog y OpenSearch ({{t0}}/mes + IVA por GB para los {{t1}} primeros GB, {{t2}}/mes + IVA por GB a continuación).",
"logs_streams_enable_indexing_description": "Explore sus logs en Graylog y OpenSearch.",
"logs_streams_no_limit": "Sin límite",
"logs_streams_enable_websocket": "Activar la difusión WebSocket",
"logs_streams_enable_websocket_description": "Monitorice la recepción de sus logs en tiempo real mediante el protocolo WebSocket.",
Expand Down Expand Up @@ -803,5 +803,8 @@
"streams_subscriptions_resource_products_account-api": "Área de cliente OVHcloud y API OVHcloud",
"streams_subscriptions_resource_products_account-audit": "Audit Logs OVHcloud",
"streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes",
"logs_encryption_keys_get_error": "Se ha producido un error al cargar las claves de cifrado: {{message}}"
"logs_encryption_keys_get_error": "Se ha producido un error al cargar las claves de cifrado: {{message}}",
"logs_streams_enable_indexing_description_detail_small": "Almacenamiento de logs < {{t0}} GB de logs: Gratis",
"logs_streams_enable_indexing_description_detail_medium": "Almacenamiento de logs de {{t0}} a {{t1}} GB: {{t2}}/mes + IVA por GB",
"logs_streams_enable_indexing_description_detail_large": "Almacenamiento de logs para volúmenes mayores (por encima de {{t0}} GB): {{t1}}/mes + IVA por GB"
}
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@
"logs_streams_update_title": "Modifier le flux",
"logs_streams_update_description": "Pour le flux <strong>{{ name }}</strong>",
"logs_streams_enable_indexing": "Activer l'indexation",
"logs_streams_enable_indexing_description": "Explorez vos logs sur Graylog et OpenSearch ({{t0}} HT /Go/mois pour les {{t1}} premiers Go, {{t2}} HT /Go/mois au delà)",
"logs_streams_enable_indexing_description": "Explorez vos logs sur Graylog et OpenSearch.",
"logs_streams_enable_indexing_description_detail_small": "Stockage de logs < {{t0}} Go de logs : Offert",
"logs_streams_enable_indexing_description_detail_medium": "Stockage de logs de {{t0}} à {{t1}} Go de logs : {{t2}} HT/Go/mois",
"logs_streams_enable_indexing_description_detail_large": "Stockage de logs pour des volumes plus importants (au-delà de {{t0}} Go) : {{t1}} HT/Go/mois",
"logs_streams_no_limit": "Aucune limitation",
"logs_streams_enable_websocket": "Activer la diffusion WebSocket",
"logs_streams_enable_websocket_description": "Suivez la réception de vos logs en temps réel via le protocole WebSocket.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@
"logs_streams_update_title": "Modifier le flux",
"logs_streams_update_description": "Pour le flux <strong>{{ name }}</strong>",
"logs_streams_enable_indexing": "Activer l'indexation",
"logs_streams_enable_indexing_description": "Explorez vos logs sur Graylog et OpenSearch ({{t0}} HT /Go/mois pour les {{t1}} premiers Go, {{t2}} HT /Go/mois au delà)",
"logs_streams_enable_indexing_description": "Explorez vos logs sur Graylog et OpenSearch.",
"logs_streams_enable_indexing_description_detail_small": "Stockage de logs < {{t0}} Go de logs : Offert",
"logs_streams_enable_indexing_description_detail_medium": "Stockage de logs de {{t0}} à {{t1}} Go de logs : {{t2}} HT/Go/mois",
"logs_streams_enable_indexing_description_detail_large": "Stockage de logs pour des volumes plus importants (au-delà de {{t0}} Go) : {{t1}} HT/Go/mois",
"logs_streams_no_limit": "Aucune limitation",
"logs_streams_enable_websocket": "Activer la diffusion WebSocket",
"logs_streams_enable_websocket_description": "Suivez la réception de vos logs en temps réel via le protocole WebSocket.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
"logs_streams_update_title": "Modifica il flusso di dati",
"logs_streams_update_description": "Per il flusso di dati <strong>{{ name }}</strong>",
"logs_streams_enable_indexing": "Attiva l’indicizzazione",
"logs_streams_enable_indexing_description": "Consulta i log su Graylog ed OpenSearch ({{t0}} +IVA/GB/mese per i primi {{t1}} GB, {{t2}} +IVA/GB/mese per i successivi)",
"logs_streams_enable_indexing_description": "Scopri i tuoi log su Graylog e OpenSearch.",
"logs_streams_no_limit": "Nessun limite",
"logs_streams_enable_websocket": "Attiva la trasmissione WebSocket",
"logs_streams_enable_websocket_description": "Monitora la ricezione dei tuoi log in tempo reale tramite il protocollo WebSocket.",
Expand Down Expand Up @@ -803,5 +803,8 @@
"logs_iam_ovhcloud_iam": "IAM di OVHcloud",
"logs_iam_enable_iam": "Attivare IAM OVHcloud",
"logs_iam_policies": "Politiche IAM",
"logs_encryption_keys_get_error": "Si è verificato un errore durante il caricamento delle chiavi di crittografia: {{message}}"
"logs_encryption_keys_get_error": "Si è verificato un errore durante il caricamento delle chiavi di crittografia: {{message}}",
"logs_streams_enable_indexing_description_detail_small": "Storage di log < {{t0}} GB di log: Incluso",
"logs_streams_enable_indexing_description_detail_medium": "Storage di log da {{t0}} a {{t1}} GB di log: {{t2}} +IVA/GB/mese",
"logs_streams_enable_indexing_description_detail_large": "Storage di log per volumi maggiori (oltre {{t0}} GB): {{t1}} +IVA/GB/mese"
}
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
"logs_streams_update_title": "Modyfikuj strumień",
"logs_streams_update_description": "Dla strumienia <strong>{{name}}</strong>",
"logs_streams_enable_indexing": "Włącz indeksację",
"logs_streams_enable_indexing_description": "Przeglądaj logi w Graylog i OpenSearch ({{t0}} netto/GB/m-c za {{t1}} pierwsze/ych {{t1} GB, {{t2} netto/GB/miesiąc powyżej)",
"logs_streams_enable_indexing_description": "Przeglądanie logów w Graylog i OpenSearch.",
"logs_streams_no_limit": "Bez ograniczeń",
"logs_streams_enable_websocket": "Aktywuj komunikację przez WebSocket",
"logs_streams_enable_websocket_description": "Śledzenie otrzymywania logów w czasie rzeczywistym za pośrednictwem protokołu WebSocket",
Expand Down Expand Up @@ -803,5 +803,8 @@
"streams_subscriptions_resource_products_account-api": "Panel klienta OVHcloud &amp; OVHcloud API",
"streams_subscriptions_resource_products_account-audit": "Audyt logów OVHcloud",
"streams_subscriptions_resource_products_cloud-project-kube": "Managed Kubernetes Service",
"logs_encryption_keys_get_error": "Wystąpił błąd podczas pobierania kluczy szyfrowania: {{message}}"
"logs_encryption_keys_get_error": "Wystąpił błąd podczas pobierania kluczy szyfrowania: {{message}}",
"logs_streams_enable_indexing_description_detail_small": "Przechowywanie logów < {{t0}} GB logów: Gratis",
"logs_streams_enable_indexing_description_detail_medium": "Przechowywanie logów od {{t0}} do {{t1}} GB: {{t2}} netto/GB/m-c",
"logs_streams_enable_indexing_description_detail_large": "Przechowywanie logów dla większych wolumenów (powyżej {{t0}} GB): {{t1}} netto/GB/m-c"
}
Loading
Loading