Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-5645 [EE\AWS] Change the instruction in the Version update tab #3017

Merged
2 changes: 1 addition & 1 deletion webapp/packages/core-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@cloudbeaver/core-dialogs": "^0",
"@cloudbeaver/core-events": "^0",
"@cloudbeaver/core-executor": "^0",
"@cloudbeaver/core-links": "^0",
"@cloudbeaver/core-localization": "^0",
"@cloudbeaver/core-navigation-tree": "^0",
"@cloudbeaver/core-product": "^0",
Expand All @@ -52,7 +53,6 @@
"@cloudbeaver/core-version": "^0",
"@cloudbeaver/core-version-update": "^0",
"@cloudbeaver/core-view": "^0",
"@cloudbeaver/core-website": "^0",
"mobx": "^6",
"react": "^18",
"react-dom": "^18"
Expand Down
4 changes: 2 additions & 2 deletions webapp/packages/core-bootstrap/src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { coreConnectionsManifest } from '@cloudbeaver/core-connections';
import { coreDIManifest, type PluginManifest } from '@cloudbeaver/core-di';
import { coreDialogsManifest } from '@cloudbeaver/core-dialogs';
import { coreEventsManifest } from '@cloudbeaver/core-events';
import { coreLinksManifest } from '@cloudbeaver/core-links';
import { coreLocalizationManifest } from '@cloudbeaver/core-localization';
import { coreNavigationTree } from '@cloudbeaver/core-navigation-tree';
import { coreProductManifest } from '@cloudbeaver/core-product';
Expand All @@ -38,7 +39,6 @@ import { coreUIManifest } from '@cloudbeaver/core-ui';
import { coreVersionManifest } from '@cloudbeaver/core-version';
import { coreVersionUpdateManifest } from '@cloudbeaver/core-version-update';
import { coreViewManifest } from '@cloudbeaver/core-view';
import { coreWebsiteManifest } from '@cloudbeaver/core-website';

export const coreManifests: PluginManifest[] = [
{
Expand All @@ -64,7 +64,7 @@ export const coreManifests: PluginManifest[] = [
coreResourceManifest,
coreSDKManifest,
coreRootManifest,
coreWebsiteManifest,
coreLinksManifest,
coreBrowserSettingsManifest,
coreBrowserCookiesManifest,
coreProductManifest,
Expand Down
6 changes: 3 additions & 3 deletions webapp/packages/core-bootstrap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
{
"path": "../core-executor/tsconfig.json"
},
{
"path": "../core-links/tsconfig.json"
},
{
"path": "../core-localization/tsconfig.json"
},
Expand Down Expand Up @@ -107,9 +110,6 @@
},
{
"path": "../core-view/tsconfig.json"
},
{
"path": "../core-website/tsconfig.json"
}
],
"include": [
Expand Down
2 changes: 2 additions & 0 deletions webapp/packages/core-client-activity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
},
"peerDependencies": {},
"devDependencies": {
"@jest/globals": "^29",
"@types/jest": "^29",
"typescript": "^5"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@cloudbeaver/core-website",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to rename the package? I think both has the similar meaning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was about our website dbeaver.com, but now I can see it can be any links we have: website, github, social media, marketplaces etc. so left it as it is right now

"name": "@cloudbeaver/core-links",
"type": "module",
"sideEffects": [
"src/**/*.css",
Expand Down
21 changes: 21 additions & 0 deletions webapp/packages/core-links/src/GithubLinks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export class GithubLinks {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like its all static, we could convert it to const and function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

static CLOUDBEAVER_REPO = 'https://github.com/dbeaver/cloudbeaver';

static EE_DEPLOY_UPDATE = 'https://github.com/dbeaver/cloudbeaver-deploy?tab=readme-ov-file#updating-the-cluster';
static TE_DEPLOY_UPDATE = 'https://github.com/dbeaver/team-edition-deploy?tab=readme-ov-file#server-version-update';

static getDeployUpdateLink(distributed: boolean) {
if (distributed) {
return GithubLinks.TE_DEPLOY_UPDATE;
}

return GithubLinks.EE_DEPLOY_UPDATE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export class WebsiteLinks {
static TEAM_ARCHIVE = 'https://dbeaver.com/downloads-team';
static CONTACT_PAGE = 'https://dbeaver.com/contact/';

static GITHUB_REPOSITORY_PAGE = 'https://github.com/dbeaver/cloudbeaver';

static getTeamArchiveById(id: string) {
return `${WebsiteLinks.TEAM_ARCHIVE}/${id}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
* you may not use this file except in compliance with the License.
*/
export * from './WebsiteLinks.js';
export * from './GithubLinks.js';
export * from './manifest.js';
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/
import type { PluginManifest } from '@cloudbeaver/core-di';

export const coreWebsiteManifest: PluginManifest = {
export const coreLinksManifest: PluginManifest = {
info: {
name: 'Core Website',
name: 'Core Links',
},

providers: [],
Expand Down
2 changes: 2 additions & 0 deletions webapp/packages/core-localization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
},
"peerDependencies": {},
"devDependencies": {
"@jest/globals": "^29",
"@types/jest": "^29",
"typescript": "^5"
}
}
2 changes: 1 addition & 1 deletion webapp/packages/core-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"peerDependencies": {},
"devDependencies": {
"@cloudbeaver/core-links": "^0",
"@cloudbeaver/core-sdk": "^0",
"@cloudbeaver/core-website": "^0",
"@cloudbeaver/tests-runner": "^0",
"@jest/globals": "^29",
"@types/jest": "^29",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import { WebsiteLinks } from '@cloudbeaver/core-links';
import type { ServerConfigQuery } from '@cloudbeaver/core-sdk';
import { WebsiteLinks } from '@cloudbeaver/core-website';

import { defaultProductConfiguration } from './defaultProductConfiguration.js';

Expand Down
6 changes: 3 additions & 3 deletions webapp/packages/core-root/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
{
"path": "../core-executor/tsconfig.json"
},
{
"path": "../core-links/tsconfig.json"
},
{
"path": "../core-localization/tsconfig.json"
},
Expand All @@ -41,9 +44,6 @@
{
"path": "../core-utils/tsconfig.json"
},
{
"path": "../core-website/tsconfig.json"
},
{
"path": "../tests-runner/tsconfig.json"
}
Expand Down
6 changes: 5 additions & 1 deletion webapp/packages/core-version-update/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
"update-ts-references": "yarn run clean && typescript-resolve-references"
},
"dependencies": {
"@cloudbeaver/core-blocks": "^0",
"@cloudbeaver/core-di": "^0",
"@cloudbeaver/core-localization": "^0",
"@cloudbeaver/core-version": "^0",
"mobx": "^6"
"@cloudbeaver/core-version-update": "^0",
"mobx": "^6",
"react": "^18"
},
"peerDependencies": {},
"devDependencies": {
"@types/react": "^18",
"typescript": "^5"
}
}
27 changes: 27 additions & 0 deletions webapp/packages/core-version-update/src/BaseUpdateInstruction.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 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 { Link, useTranslate } from '@cloudbeaver/core-blocks';

import type { InstructionComponent } from './VersionUpdateService.js';

const SPLITTER = '*splitter*';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This splitter is confusing, why do we need it? Can we use \n or translate args?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split to 2 locale keys. the best we can do here


export const BaseUpdateInstruction: InstructionComponent = function UpdateInstruction({ version, containerId, link, className }) {
const translate = useTranslate();
const mainText = translate('version_update_instruction').split(SPLITTER)[0]?.trim();
const linkText = translate('version_update_instruction').split(SPLITTER)[1]?.trim();

return (
<div className={className}>
{mainText}{' '}
<Link href={link} target="_blank" rel="noopener noreferrer" inline indicator>
{linkText}
</Link>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { type IVersion, VersionResource, VersionService } from '@cloudbeaver/cor

interface IInstructionProps {
version: IVersion;
link: string;
containerId?: string;
className?: string;
}
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-version-update/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
export { manifest as coreVersionUpdateManifest } from './manifest.js';

export * from './VersionUpdateService.js';
export * from './BaseUpdateInstruction.js';
8 changes: 8 additions & 0 deletions webapp/packages/core-version-update/src/locales/en.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export default [
['version_update', 'Version update'],
['version_update_version_is_up_to_date', 'Version is up to date'],
Expand All @@ -7,4 +14,5 @@ export default [
['version_update_versions_refresh_fail', 'Versions list refresh failed'],
['version_update_how_to_update', 'How to update'],
['version_update_info', 'Info'],
['version_update_instruction', 'To update version, please follow *splitter* the instructions'],
];
1 change: 1 addition & 0 deletions webapp/packages/core-version-update/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export default [
['version_update_versions_refresh_fail', 'Échec du rafraîchissement de la liste des versions'],
['version_update_how_to_update', 'Comment mettre à jour'],
['version_update_info', 'Info'],
['version_update_instruction', 'To update version, please follow *splitter* the instructions'],
];
8 changes: 8 additions & 0 deletions webapp/packages/core-version-update/src/locales/it.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export default [
['version_update', 'Version update'],
['version_update_version_is_up_to_date', 'Version is up to date'],
Expand All @@ -7,4 +14,5 @@ export default [
['version_update_versions_refresh_fail', 'Versions list refresh failed'],
['version_update_how_to_update', 'How to update'],
['version_update_info', 'Info'],
['version_update_instruction', 'To update version, please follow *splitter* the instructions'],
];
8 changes: 8 additions & 0 deletions webapp/packages/core-version-update/src/locales/ru.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export default [
['version_update', 'Обновление версии'],
['version_update_version_is_up_to_date', 'Установлена актуальная версия'],
Expand All @@ -7,4 +14,5 @@ export default [
['version_update_versions_refresh_fail', 'Не удалось обновить список версий'],
['version_update_how_to_update', 'Как обновить версию'],
['version_update_info', 'Информация'],
['version_update_instruction', 'Чтобы обновить версию, следуйте *splitter* инструкциям'],
];
1 change: 1 addition & 0 deletions webapp/packages/core-version-update/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export default [
['version_update_versions_refresh_fail', '版本列表刷新失败'],
['version_update_how_to_update', '如何升级'],
['version_update_info', '信息'],
['version_update_instruction', 'To update version, please follow *splitter* the instructions'],
];
3 changes: 3 additions & 0 deletions webapp/packages/core-version-update/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo"
},
"references": [
{
"path": "../core-blocks/tsconfig.json"
},
{
"path": "../core-di/tsconfig.json"
},
Expand Down
3 changes: 2 additions & 1 deletion webapp/packages/core-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"@cloudbeaver/core-utils": "^0",
"mobx": "^6",
"mobx-react-lite": "^4",
"react": "^18"
"react": "^18",
"react-hotkeys-hook": "^4"
},
"peerDependencies": {},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions webapp/packages/plugin-administration/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
{
"path": "../core-connections/tsconfig.json"
},
{
"path": "../core-data-context/tsconfig.json"
},
{
"path": "../core-di/tsconfig.json"
},
Expand Down
2 changes: 1 addition & 1 deletion webapp/packages/plugin-data-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@cloudbeaver/core-dialogs": "^0",
"@cloudbeaver/core-events": "^0",
"@cloudbeaver/core-executor": "^0",
"@cloudbeaver/core-links": "^0",
"@cloudbeaver/core-localization": "^0",
"@cloudbeaver/core-navigation-tree": "^0",
"@cloudbeaver/core-resource": "^0",
Expand All @@ -36,7 +37,6 @@
"@cloudbeaver/core-ui": "^0",
"@cloudbeaver/core-utils": "^0",
"@cloudbeaver/core-view": "^0",
"@cloudbeaver/core-website": "^0",
"@cloudbeaver/plugin-codemirror6": "^0",
"@cloudbeaver/plugin-navigation-tabs": "^0",
"@cloudbeaver/plugin-object-viewer": "^0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { observer } from 'mobx-react-lite';

import { Container, Link, s, usePermission, useS, useTranslate } from '@cloudbeaver/core-blocks';
import { WebsiteLinks } from '@cloudbeaver/core-links';
import { EAdminPermission } from '@cloudbeaver/core-root';
import { WebsiteLinks } from '@cloudbeaver/core-website';

import type { IResultSetElementKey } from '../DatabaseDataModel/Actions/ResultSet/IResultSetDataKey.js';
import { ResultSetDataContentAction } from '../DatabaseDataModel/Actions/ResultSet/ResultSetDataContentAction.js';
Expand Down
6 changes: 3 additions & 3 deletions webapp/packages/plugin-data-viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
{
"path": "../core-executor/tsconfig.json"
},
{
"path": "../core-links/tsconfig.json"
},
{
"path": "../core-localization/tsconfig.json"
},
Expand Down Expand Up @@ -111,9 +114,6 @@
{
"path": "../core-view/tsconfig.json"
},
{
"path": "../core-website/tsconfig.json"
},
{
"path": "../plugin-codemirror6/tsconfig.json"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@cloudbeaver/core-projects": "^0",
"@cloudbeaver/core-resource": "^0",
"@cloudbeaver/core-ui": "^0",
"@cloudbeaver/core-utils": "^0",
"@cloudbeaver/core-view": "^0",
"@cloudbeaver/plugin-navigation-tabs": "^0",
"@cloudbeaver/plugin-top-app-bar": "^0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
{
"path": "../core-ui/tsconfig.json"
},
{
"path": "../core-utils/tsconfig.json"
},
{
"path": "../core-view/tsconfig.json"
},
Expand Down
Loading
Loading