Skip to content
Open
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
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 @@ -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
Loading