mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-16 14:50:15 +08:00
* CB-4598 npe fix * CB-4561 refactor: connection info resource * CB-4561 refactor: connection info resource * CB-4561 load credentials from secret in initConnection * CB-4561 merge devel * CB-4561 allow initial team secrets test * CB-4561 remove ability to use any secret in test connection * CB-4561 feat: shared credentials management * CB-4561 feat: connection secret authentication * CB-4561 little fix * CB-4561 feat: shared credentials * CB-4561 chore: remove save credentials checkbox for shared credentials * CB-4561 fix: send saved state for shared connection credentials * CB-4561 feat: change shared secret authentication description * CB-4561 fix: pr review comments * CB-4561 fix: disable connection test for shared connections in distributed env * CB-4561 fix: types --------- Co-authored-by: Aleksandr Skoblikov <aleksandr.skoblikov@dbeaver.com> Co-authored-by: mr-anton-t <42037741+mr-anton-t@users.noreply.github.com>
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
/*
|
|
* 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 { observer } from 'mobx-react-lite';
|
|
|
|
import { Container, ObjectPropertyInfoForm } from '@cloudbeaver/core-blocks';
|
|
import type { ObjectPropertyInfo } from '@cloudbeaver/core-sdk';
|
|
import { isSafari } from '@cloudbeaver/core-utils';
|
|
|
|
interface Props {
|
|
credentials?: Record<string, any>;
|
|
defaultCredentials?: Record<string, any>;
|
|
properties: ReadonlyArray<ObjectPropertyInfo>;
|
|
readonly?: boolean;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const ConnectionAuthModelCredentialsForm = observer<Props>(function ConnectionAuthModelCredentialsForm({
|
|
credentials,
|
|
defaultCredentials,
|
|
properties,
|
|
readonly,
|
|
disabled,
|
|
}) {
|
|
return (
|
|
<Container wrap gap hideEmpty>
|
|
<ObjectPropertyInfoForm
|
|
autofillToken={isSafari ? 'section-connection-authentication section-secrets' : 'new-password'}
|
|
properties={properties}
|
|
state={credentials}
|
|
defaultState={defaultCredentials}
|
|
disabled={disabled}
|
|
readOnly={readonly}
|
|
showRememberTip
|
|
hideEmptyPlaceholder
|
|
tiny
|
|
/>
|
|
</Container>
|
|
);
|
|
});
|