Skip to content

Commit

Permalink
CB-5578 DM: Ability to remove custom certificate (#2899)
Browse files Browse the repository at this point in the history
* CB-5578 handles url for redirect after custom domain is being deleted

* CB-5578 reverts isValidUrl

* CB-5578 pr fixes

* CB-5578 fixes for QA

* CB-5578 fixes for redirect on server url in custom certificate deletion

* CB-5578 fix import

* CB-5578 creates isValidServer file

* CB-5578 allow any protocol server url but redirect on https only

* CB-5578 fix error message in details popup

* СB-removes unneeded tranlsation

* CB-5578 pr fixes

* CB-5578 dm fix for deletion of custom certificate

* CB-5578 fix get https url helper

* CB-5578 cleanup

* CB-5578 adds status message for custom certificate deletion

* CB-5578 sends server url without protocol while custom certificate deletion

* CB-5578 pr fixes

* CB-5578 adds loader to the deletion of custom certificate

---------

Co-authored-by: kseniaguzeeva <[email protected]>
Co-authored-by: Ainur <[email protected]>
Co-authored-by: Evgenia Bezborodova <[email protected]>
  • Loading branch information
4 people authored Oct 8, 2024
1 parent 2a1adc1 commit fb1b2b2
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ import { ErrorModel, type IErrorInfo } from './ErrorModel.js';

function DisplayErrorInfo({ error }: { error: IErrorInfo }) {
const styles = useS(style);
const translate = useTranslate();

return (
<>
<div className={s(styles, { property: true })}>
{error.isHtml ? <Iframe srcDoc={error.message} /> : <div className={s(styles, { message: true })}>{error.message}</div>}
{error.isHtml ? <Iframe srcDoc={error.message} /> : <div className={s(styles, { message: true })}>{translate(error.message)}</div>}
</div>
{error.stackTrace && (
<div className={s(styles, { property: true })}>
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-blocks/src/StatusMessage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
.statusMessage {
overflow: hidden;
composes: theme-typography--caption from global;
height: 24px;
display: flex;
align-items: center;
gap: 8px;
}

.statusMessageExtended {
height: 24px;
}
.iconOrImage {
height: 24px;
width: 24px;
Expand Down
16 changes: 12 additions & 4 deletions webapp/packages/core-blocks/src/StatusMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ interface Props {
type?: ENotificationType | null;
exception?: Error | null;
className?: string;
multipleRows?: boolean;
onShowDetails?: () => void;
}

export const StatusMessage = observer<Props>(function StatusMessage({ type, message, exception = null, className, onShowDetails }) {
export const StatusMessage = observer<Props>(function StatusMessage({
type,
multipleRows = false,
message,
exception = null,
className,
onShowDetails,
}) {
const styles = useS(style);
const translate = useTranslate();
const errorDetails = useErrorDetails(exception);
Expand All @@ -51,13 +59,13 @@ export const StatusMessage = observer<Props>(function StatusMessage({ type, mess
}

return (
<div className={s(styles, { statusMessage: true }, className)}>
<div className={s(styles, { statusMessage: true, statusMessageExtended: !multipleRows }, className)}>
{message && (
<>
<IconOrImage className={s(styles, { iconOrImage: true })} icon={icon} />
<div className={s(styles, { message: true })} title={message}>
<div className={s(styles, { message: !multipleRows })} title={message}>
{onShowDetails ? (
<Link className={s(styles, { link: true })} onClick={onShowDetails}>
<Link className={s(styles, { link: !multipleRows })} onClick={onShowDetails}>
{message}
</Link>
) : (
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export * from './CommonDialog/CommonDialog/CommonDialogFooter.js';
export * from './CommonDialog/CommonDialog/CommonDialogHeader.js';
export * from './CommonDialog/CommonDialog/CommonDialogWrapper.js';
export * from './CommonDialog/ConfirmationDialog.js';
export { default as ConfirmationDialogStyles } from './CommonDialog/ConfirmationDialog.module.css';
export * from './CommonDialog/ConfirmationDialogDelete.js';
export * from './CommonDialog/RenameDialog.js';
export * from './CommonDialog/DialogsPortal.js';
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default [
['ui_errors_details', 'Details'],
['ui_search', 'Search...'],
['ui_delete', 'Delete'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Add'],
['ui_revert', 'Revert'],
['ui_undo', 'Undo'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default [
['ui_errors_details', 'Détails'],
['ui_search', 'Rechercher...'],
['ui_delete', 'Supprimer'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Ajouter'],
['ui_refresh', 'Actualiser'],
['ui_data_saving_error', 'Erreur de sauvegarde'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default [
['ui_errors_details', 'Dettagli'],
['ui_search', 'Cerca...'],
['ui_delete', 'Elimina'],
['ui_deleting', 'Deleting...'],
['ui_add', 'Aggiungi'],
['ui_revert', 'Revert'],
['ui_undo', 'Undo'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default [
['ui_errors_details', 'Информация'],
['ui_search', 'Поиск...'],
['ui_delete', 'Удалить'],
['ui_deleting', 'Удаляется...'],
['ui_add', 'Добавить'],
['ui_revert', 'Отменить изменения'],
['ui_undo', 'Отменить'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-localization/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default [
['ui_errors_details', '详情'],
['ui_search', '搜索...'],
['ui_delete', '删除'],
['ui_deleting', 'Deleting...'],
['ui_add', '添加'],
['ui_revert', '恢复'],
['ui_undo', '撤销'],
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/core-website/src/WebsiteLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* you may not use this file except in compliance with the License.
*/
export class WebsiteLinks {
static ROOT_PAGE = 'https://dbeaver.com/';
static DATA_EDITOR_DOCUMENTATION_PAGE = 'https://dbeaver.com/docs/cloudbeaver/Data-editor/';
static SQL_EDITOR_DOCUMENTATION_PAGE = 'https://dbeaver.com/docs/cloudbeaver/SQL-Editor/';
static SERVER_CONFIGURATION_RESOURCE_QUOTAS_PAGE = 'https://dbeaver.com/docs/cloudbeaver/Server-configuration/#resource-quotas';
Expand Down

0 comments on commit fb1b2b2

Please sign in to comment.