From cde64e255bb5d0a226095a55397a73e2877ca1c1 Mon Sep 17 00:00:00 2001 From: alex <48489896+devnaumov@users.noreply.github.com> Date: Tue, 30 Jun 2026 16:42:01 +0200 Subject: [PATCH] dbeaver/pro#9586 adjust validation (#4427) * dbeaver/pro#9586 let editing of loaded truncated values * Revert "dbeaver/pro#9586 let editing of loaded truncated values" This reverts commit 6b412ef57ca95a1484f3cc0766a17f4ee57afec9. * dbeaver/pro#9586 adjust quota validation check * dbeaver/pro#9586 show limit amount --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> --- webapp/packages/core-root/src/QuotasService.ts | 8 +++----- .../src/ValuePanelPresentation/QuotaPlaceholder.tsx | 10 ++++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/webapp/packages/core-root/src/QuotasService.ts b/webapp/packages/core-root/src/QuotasService.ts index 355e95bd53..3dfb67646e 100644 --- a/webapp/packages/core-root/src/QuotasService.ts +++ b/webapp/packages/core-root/src/QuotasService.ts @@ -1,11 +1,13 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2026 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ + import { injectable } from '@cloudbeaver/core-di'; +import { isNumber } from '@dbeaver/js-helpers'; import { ServerResourceQuotasResource } from './ServerResourceQuotasResource.js'; @@ -27,10 +29,6 @@ const DEFAULT_QUOTAS: IQuotas = { sqlBinaryPreviewMaxLength: 261120, }; -function isNumber(value: any): value is number { - return typeof value === 'number'; -} - @injectable(() => [ServerResourceQuotasResource]) export class QuotasService { get quotas(): IQuotas { diff --git a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx index 53be92b6a4..2f3ab2bd45 100644 --- a/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx +++ b/webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/QuotaPlaceholder.tsx @@ -39,6 +39,12 @@ export const QuotaPlaceholder: React.FC> = observ const contentAction = model.source.getAction(resultIndex, ResultSetDataContentAction); const limitInfo = holder ? contentAction.getLimitInfo(holder) : null; + let limitText = translate('ui_limit'); + + if (limitInfo?.limitWithSize) { + limitText += ` (${limitInfo.limitWithSize})`; + } + return (
@@ -53,10 +59,10 @@ export const QuotaPlaceholder: React.FC> = observ target="_blank" indicator > - {translate('ui_limit')} + {limitText} ) : ( - translate('ui_limit') + limitText )}