From 1b657cc0ffcb9b8a9f881fc4f8e1b5c0a3bff0f4 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 7 Nov 2024 13:31:10 +0200 Subject: [PATCH] Increased maximum length of displayed error message --- cvat-ui/src/components/cvat-app.tsx | 5 ++++- cvat-ui/src/config.tsx | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index a9be65a055d1..ff9d2e1637b3 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -398,18 +398,21 @@ class CVATApplication extends React.PureComponent{title} ), duration: null, - description: errorLength > 300 ? 'Open the Browser Console to get details' : {error}, + description: errorLength > appConfig.MAXIMUM_NOTIFICATION_MESSAGE_LENGTH ? + 'Open the Browser Console to get details' : {error}, }); if (shouldLog) { diff --git a/cvat-ui/src/config.tsx b/cvat-ui/src/config.tsx index 7e0b404b093a..05732d9e83ce 100644 --- a/cvat-ui/src/config.tsx +++ b/cvat-ui/src/config.tsx @@ -108,6 +108,7 @@ const DEFAULT_GOOGLE_CLOUD_STORAGE_LOCATIONS: string[][] = [ ['NAM4', 'US-CENTRAL1 and US-EAST1'], ]; +const MAXIMUM_NOTIFICATION_MESSAGE_LENGTH = 600; // all above will be sent to console const HEALTH_CHECK_RETRIES = 10; const HEALTH_CHECK_PERIOD = 3000; // ms const HEALTH_CHECK_REQUEST_TIMEOUT = 15000; // ms @@ -190,4 +191,5 @@ export default { REQUEST_SUCCESS_NOTIFICATION_DURATION, BLACKLISTED_GO_BACK_PATHS, PAID_PLACEHOLDER_CONFIG, + MAXIMUM_NOTIFICATION_MESSAGE_LENGTH, };