diff --git a/webapp/packages/core-links/src/GithubLinks.ts b/webapp/packages/core-links/src/GithubLinks.ts index 13394514f8..1324ee37fc 100644 --- a/webapp/packages/core-links/src/GithubLinks.ts +++ b/webapp/packages/core-links/src/GithubLinks.ts @@ -9,12 +9,4 @@ export const GITHUB_LINKS = { CLOUDBEAVER_REPO: 'https://github.com/dbeaver/cloudbeaver', EE_DEPLOY_UPDATE: 'https://github.com/dbeaver/cloudbeaver-deploy?tab=readme-ov-file#updating-the-cluster', TE_DEPLOY_UPDATE: 'https://github.com/dbeaver/team-edition-deploy?tab=readme-ov-file#server-version-update', - - getDeployUpdateLink(distributed: boolean) { - if (distributed) { - return GITHUB_LINKS.TE_DEPLOY_UPDATE; - } - - return GITHUB_LINKS.EE_DEPLOY_UPDATE; - }, }; diff --git a/webapp/packages/core-links/src/WebsiteLinks.ts b/webapp/packages/core-links/src/WebsiteLinks.ts index 245acb1321..c8b7b1fb28 100644 --- a/webapp/packages/core-links/src/WebsiteLinks.ts +++ b/webapp/packages/core-links/src/WebsiteLinks.ts @@ -11,6 +11,7 @@ export const WEBSITE_LINKS = { SQL_EDITOR_DOCUMENTATION_PAGE: 'https://dbeaver.com/docs/cloudbeaver/SQL-Editor/', SERVER_CONFIGURATION_RESOURCE_QUOTAS_PAGE: 'https://dbeaver.com/docs/cloudbeaver/Server-configuration/#resource-quotas', DATABASE_NAVIGATOR_DOCUMENTATION_PAGE: 'https://dbeaver.com/docs/cloudbeaver/Database-Navigator/', + AWS_DEPLOY_UPDATE_PAGE: 'https://dbeaver.com/docs/cloudbeaver/Managing-CloudBeaver-server-on-AWS/#version-update-procedure', ENTERPRISE_BUY_PRODUCT_PAGE: 'https://dbeaver.com/products/cloudbeaver-enterprise/', TEAM_EDITION_BUY_PRODUCT_PAGE: 'https://dbeaver.com/products/team-edition/', diff --git a/webapp/packages/core-localization/src/locales/en.ts b/webapp/packages/core-localization/src/locales/en.ts index f777b8a70f..1fdb2d02ae 100644 --- a/webapp/packages/core-localization/src/locales/en.ts +++ b/webapp/packages/core-localization/src/locales/en.ts @@ -114,7 +114,7 @@ export default [ ['ui_close_others', 'Close others'], ['ui_close_all_to_the_right', 'Close all to the Right'], ['ui_close_all_to_the_left', 'Close all to the Left'], - ['ui_or', 'Or'], + ['ui_or', 'or'], ['ui_download', 'Download'], ['ui_download_file', 'Download file'], ['ui_upload', 'Upload'], diff --git a/webapp/packages/core-localization/src/locales/fr.ts b/webapp/packages/core-localization/src/locales/fr.ts index 6d4d2311ea..2b68c71825 100644 --- a/webapp/packages/core-localization/src/locales/fr.ts +++ b/webapp/packages/core-localization/src/locales/fr.ts @@ -108,7 +108,7 @@ export default [ ['ui_close_others', 'Fermer les autres'], ['ui_close_all_to_the_right', 'Fermer tout à droite'], ['ui_close_all_to_the_left', 'Fermer tout à gauche'], - ['ui_or', 'Ou'], + ['ui_or', 'ou'], ['ui_download', 'Télécharger'], ['ui_download_file', 'Télécharger le fichier'], ['ui_upload', 'Importer'], diff --git a/webapp/packages/core-localization/src/locales/it.ts b/webapp/packages/core-localization/src/locales/it.ts index fb07e30843..657bb91fb1 100644 --- a/webapp/packages/core-localization/src/locales/it.ts +++ b/webapp/packages/core-localization/src/locales/it.ts @@ -104,7 +104,7 @@ export default [ ['ui_close_others', 'Close others'], ['ui_close_all_to_the_right', 'Close all to the Right'], ['ui_close_all_to_the_left', 'Close all to the Left'], - ['ui_or', 'Or'], + ['ui_or', 'or'], ['ui_download', 'Download'], ['ui_download_file', 'Download file'], ['ui_upload', 'Upload'], diff --git a/webapp/packages/core-localization/src/locales/ru.ts b/webapp/packages/core-localization/src/locales/ru.ts index 25f79b64b4..8fa57ca071 100644 --- a/webapp/packages/core-localization/src/locales/ru.ts +++ b/webapp/packages/core-localization/src/locales/ru.ts @@ -110,7 +110,7 @@ export default [ ['ui_close_others', 'Закрыть другие'], ['ui_close_all_to_the_right', 'Закрыть все справа'], ['ui_close_all_to_the_left', 'Закрыть все слева'], - ['ui_or', 'Или'], + ['ui_or', 'или'], ['ui_download', 'Cкачать'], ['ui_download_file', 'Скачать файл'], ['ui_upload', 'Загрузить'], diff --git a/webapp/packages/core-version-update/src/BaseUpdateInstruction.tsx b/webapp/packages/core-version-update/src/BaseUpdateInstruction.tsx index fbd1a954db..c274118133 100644 --- a/webapp/packages/core-version-update/src/BaseUpdateInstruction.tsx +++ b/webapp/packages/core-version-update/src/BaseUpdateInstruction.tsx @@ -5,13 +5,17 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { Link, useTranslate } from '@cloudbeaver/core-blocks'; +import { Link, Text, useTranslate } from '@cloudbeaver/core-blocks'; import type { InstructionComponent } from './VersionUpdateService.js'; export const BaseUpdateInstruction: InstructionComponent = function UpdateInstruction({ version, containerId, link, className }) { const translate = useTranslate(); + if (!link) { + return {translate('version_update_instruction_link_not_provided')}; + } + return (
{translate('version_update_instruction')}{' '} diff --git a/webapp/packages/core-version-update/src/VersionUpdateService.ts b/webapp/packages/core-version-update/src/VersionUpdateService.ts index 6f0835bee0..612ce5d78b 100644 --- a/webapp/packages/core-version-update/src/VersionUpdateService.ts +++ b/webapp/packages/core-version-update/src/VersionUpdateService.ts @@ -5,14 +5,14 @@ * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import { computed, makeObservable } from 'mobx'; +import { computed, makeObservable, observable } from 'mobx'; import { injectable } from '@cloudbeaver/core-di'; import { type IVersion, VersionResource, VersionService } from '@cloudbeaver/core-version'; interface IInstructionProps { version: IVersion; - link: string; + link: string | null; containerId?: string; className?: string; } @@ -23,6 +23,7 @@ export type InstructionComponent = React.FunctionComponent; export class VersionUpdateService { generalInstructionsGetter: (() => React.FC) | null = null; versionInstructionGetter: (() => InstructionComponent) | null; + instructionLink: string | null; get newVersionAvailable() { if (!this.versionService.current || !this.versionResource.latest) { @@ -37,12 +38,18 @@ export class VersionUpdateService { private readonly versionResource: VersionResource, ) { this.versionInstructionGetter = null; + this.instructionLink = null; makeObservable(this, { newVersionAvailable: computed, + instructionLink: observable.ref, }); } + registerInstructionLink(link: string): void { + this.instructionLink = link; + } + registerVersionInstruction(componentGetter: () => InstructionComponent): void { this.versionInstructionGetter = componentGetter; } diff --git a/webapp/packages/core-version-update/src/locales/en.ts b/webapp/packages/core-version-update/src/locales/en.ts index f40821f42e..a0ef2f6b6c 100644 --- a/webapp/packages/core-version-update/src/locales/en.ts +++ b/webapp/packages/core-version-update/src/locales/en.ts @@ -16,4 +16,5 @@ export default [ ['version_update_info', 'Info'], ['version_update_instruction', 'To update version, please follow'], ['version_update_instruction_link', 'the instructions'], + ['version_update_instruction_link_not_provided', 'Instructions link is not provided. Please contact support.'], ]; diff --git a/webapp/packages/core-version-update/src/locales/fr.ts b/webapp/packages/core-version-update/src/locales/fr.ts index 9defcbf0c0..149f2bf1c7 100644 --- a/webapp/packages/core-version-update/src/locales/fr.ts +++ b/webapp/packages/core-version-update/src/locales/fr.ts @@ -16,4 +16,5 @@ export default [ ['version_update_info', 'Info'], ['version_update_instruction', 'To update version, please follow'], ['version_update_instruction_link', 'the instructions'], + ['version_update_instruction_link_not_provided', 'Instructions link is not provided. Please contact support.'], ]; diff --git a/webapp/packages/core-version-update/src/locales/it.ts b/webapp/packages/core-version-update/src/locales/it.ts index f40821f42e..a0ef2f6b6c 100644 --- a/webapp/packages/core-version-update/src/locales/it.ts +++ b/webapp/packages/core-version-update/src/locales/it.ts @@ -16,4 +16,5 @@ export default [ ['version_update_info', 'Info'], ['version_update_instruction', 'To update version, please follow'], ['version_update_instruction_link', 'the instructions'], + ['version_update_instruction_link_not_provided', 'Instructions link is not provided. Please contact support.'], ]; diff --git a/webapp/packages/core-version-update/src/locales/ru.ts b/webapp/packages/core-version-update/src/locales/ru.ts index 4d1fd361fb..c80e956b4c 100644 --- a/webapp/packages/core-version-update/src/locales/ru.ts +++ b/webapp/packages/core-version-update/src/locales/ru.ts @@ -16,4 +16,5 @@ export default [ ['version_update_info', 'Информация'], ['version_update_instruction', 'Чтобы обновить версию, следуйте'], ['version_update_instruction_link', 'инструкциям'], + ['version_update_instruction_link_not_provided', 'Ссылка на инструкции не предоставлена. Обратитесь в службу поддержки.'], ]; diff --git a/webapp/packages/core-version-update/src/locales/zh.ts b/webapp/packages/core-version-update/src/locales/zh.ts index 82fd807d3b..16b21adb3f 100644 --- a/webapp/packages/core-version-update/src/locales/zh.ts +++ b/webapp/packages/core-version-update/src/locales/zh.ts @@ -16,4 +16,5 @@ export default [ ['version_update_info', '信息'], ['version_update_instruction', 'To update version, please follow'], ['version_update_instruction_link', 'the instructions'], + ['version_update_instruction_link_not_provided', 'Instructions link is not provided. Please contact support.'], ]; diff --git a/webapp/packages/plugin-version-update-administration/src/VersionSelector.tsx b/webapp/packages/plugin-version-update-administration/src/VersionSelector.tsx index 93e71461e7..aac3aa5532 100644 --- a/webapp/packages/plugin-version-update-administration/src/VersionSelector.tsx +++ b/webapp/packages/plugin-version-update-administration/src/VersionSelector.tsx @@ -10,7 +10,6 @@ import { useEffect, useState } from 'react'; import { Combobox, Container, Group, GroupItem, GroupTitle, s, useS, useTranslate } from '@cloudbeaver/core-blocks'; import { useService } from '@cloudbeaver/core-di'; -import { GITHUB_LINKS } from '@cloudbeaver/core-links'; import { ServerConfigResource } from '@cloudbeaver/core-root'; import { type IVersion, VersionResource } from '@cloudbeaver/core-version'; import { VersionUpdateService } from '@cloudbeaver/core-version-update'; @@ -39,6 +38,7 @@ export const VersionSelector = observer(function VersionSelector({ versio const version = versions.find(v => v.number === selected); const Instruction = versionUpdateService.versionInstructionGetter?.(); + const instructionLink = versionUpdateService.instructionLink; return ( @@ -56,7 +56,7 @@ export const VersionSelector = observer(function VersionSelector({ versio {version && Instruction && (