Skip to content

Commit

Permalink
chore: TTL and S3 config related changes (SigNoz#1201)
Browse files Browse the repository at this point in the history
* fix: 🐛 convert TTL APIs to async

* chore: add archive support

* chore: update TTL async APIs according to new design

* chore: 🔥 clean removeTTL API

* fix: metrics s3 config

* feat: ttl async with polling (SigNoz#1195)

* feat: ttl state message change and time unit language changes (SigNoz#1197)

* test: ✅ update tests for async TTL api

* feat: ttl message info icon (SigNoz#1202)

* feat: ttl pr review changes

* chore: refractoring

Co-authored-by: makeavish <makeavish786@gmail.com>
Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
Co-authored-by: palash-signoz <palash@signoz.io>
Co-authored-by: Pranay Prateek <pranay@signoz.io>
  • Loading branch information
5 people committed May 25, 2022
1 parent f92e479 commit 642c6c5
Show file tree
Hide file tree
Showing 14 changed files with 557 additions and 249 deletions.
21 changes: 21 additions & 0 deletions frontend/public/locales/en-GB/generalSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"total_retention_period": "Total Retention Period",
"move_to_s3": "Move to S3\n(should be lower than total retention period)",
"status_message": {
"success": "Your last call to change retention period to {{total_retention}} {{s3_part}} was successful.",
"failed": "Your last call to change retention period to {{total_retention}} {{s3_part}} failed. Please try again.",
"pending": "Your last call to change retention period to {{total_retention}} {{s3_part}} is pending. This may take some time.",
"s3_part": "and S3 to {{s3_retention}}"
},
"retention_save_button": {
"pending": "Updating {{name}} retention period",
"success": "Save"
},
"retention_request_race_condition": "Your request to change retention period has failed, as another request is still in process.",
"retention_error_message": "There was an issue in changing the retention period for {{name}}. Please try again or reach out to support@signoz.io",
"retention_failed_message": "There was an issue in changing the retention period. Please try again or reach out to support@signoz.io",
"retention_comparison_error": "Total retention period for {{name}} can’t be lower or equal to the period after which data is moved to s3.",
"retention_null_value_error": "Retention Period for {{name}} is not set yet. Please set by choosing below",
"retention_confirmation": "Are you sure you want to change the retention period?",
"retention_confirmation_description": "This will change the amount of storage needed for saving {{name}}."
}
11 changes: 0 additions & 11 deletions frontend/public/locales/en-GB/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,5 @@
"general": "General",
"alert_channels": "Alert Channels",
"all_errors": "All Exceptions"
},
"settings": {
"total_retention_period": "Total Retention Period",
"move_to_s3": "Move to S3\n(should be lower than total retention period)",
"retention_success_message": "Congrats. The retention periods for {{name}} has been updated successfully.",
"retention_error_message": "There was an issue in changing the retention period for {{name}}. Please try again or reach out to support@signoz.io",
"retention_failed_message": "There was an issue in changing the retention period. Please try again or reach out to support@signoz.io",
"retention_comparison_error": "Total retention period for {{name}} can’t be lower or equal to the period after which data is moved to s3.",
"retention_null_value_error": "Retention Period for {{name}} is not set yet. Please set by choosing below",
"retention_confirmation": "Are you sure you want to change the retention period?",
"retention_confirmation_description": "This will change the amount of storage needed for saving metrics & traces."
}
}
21 changes: 21 additions & 0 deletions frontend/public/locales/en/generalSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"total_retention_period": "Total Retention Period",
"move_to_s3": "Move to S3\n(should be lower than total retention period)",
"status_message": {
"success": "Your last call to change retention period to {{total_retention}} {{s3_part}} was successful.",
"failed": "Your last call to change retention period to {{total_retention}} {{s3_part}} failed. Please try again.",
"pending": "Your last call to change retention period to {{total_retention}} {{s3_part}} is pending. This may take some time.",
"s3_part": "and S3 to {{s3_retention}}"
},
"retention_save_button": {
"pending": "Updating {{name}} retention period",
"success": "Save"
},
"retention_request_race_condition": "Your request to change retention period has failed, as another request is still in process.",
"retention_error_message": "There was an issue in changing the retention period for {{name}}. Please try again or reach out to support@signoz.io",
"retention_failed_message": "There was an issue in changing the retention period. Please try again or reach out to support@signoz.io",
"retention_comparison_error": "Total retention period for {{name}} can’t be lower or equal to the period after which data is moved to s3.",
"retention_null_value_error": "Retention Period for {{name}} is not set yet. Please set by choosing below",
"retention_confirmation": "Are you sure you want to change the retention period?",
"retention_confirmation_description": "This will change the amount of storage needed for saving {{name}}."
}
11 changes: 0 additions & 11 deletions frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,5 @@
"general": "General",
"alert_channels": "Alert Channels",
"all_errors": "All Exceptions"
},
"settings": {
"total_retention_period": "Total Retention Period",
"move_to_s3": "Move to S3\n(should be lower than total retention period)",
"retention_success_message": "Congrats. The retention periods for {{name}} has been updated successfully.",
"retention_error_message": "There was an issue in changing the retention period for {{name}}. Please try again or reach out to support@signoz.io",
"retention_failed_message": "There was an issue in changing the retention period. Please try again or reach out to support@signoz.io",
"retention_comparison_error": "Total retention period for {{name}} can’t be lower or equal to the period after which data is moved to s3.",
"retention_null_value_error": "Retention Period for {{name}} is not set yet. Please set by choosing below",
"retention_confirmation": "Are you sure you want to change the retention period?",
"retention_confirmation_description": "This will change the amount of storage needed for saving metrics & traces."
}
}
12 changes: 7 additions & 5 deletions frontend/src/api/settings/getRetention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps } from 'types/api/settings/getRetention';
import { PayloadProps, Props } from 'types/api/settings/getRetention';

const getRetention = async (): Promise<
SuccessResponse<PayloadProps> | ErrorResponse
> => {
const getRetention = async <T extends Props>(
props: T,
): Promise<SuccessResponse<PayloadProps<T>> | ErrorResponse> => {
try {
const response = await axios.get<PayloadProps>(`/settings/ttl`);
const response = await axios.get<PayloadProps<T>>(
`/settings/ttl?type=${props}`,
);

return {
statusCode: 200,
Expand Down
Loading

0 comments on commit 642c6c5

Please sign in to comment.