Merge remote-tracking branch 'origin/devel' into devel

This commit is contained in:
Serge Rider
2020-11-06 17:22:00 +03:00
3 changed files with 9 additions and 5 deletions
@@ -23,13 +23,16 @@ import { IConnectionFormModel } from './IConnectionFormModel';
@injectable()
export class ConnectionFormController
implements IInitializableController {
@observable connectionType: EConnectionType;
@observable isSaving: boolean;
@observable readonly metadata: Map<string, any>;
readonly afterSave: IExecutor<string>;
@computed get isDisabled(): boolean {
get connectionType(): EConnectionType {
return this.model.connection.useUrl ? EConnectionType.URL : EConnectionType.Parameters;
}
get isDisabled(): boolean {
return this.isSaving;
}
@@ -46,7 +49,6 @@ implements IInitializableController {
private notificationService: NotificationService,
private dbDriverResource: DBDriverResource
) {
this.connectionType = EConnectionType.Parameters;
this.isSaving = false;
this.metadata = new Map<string, any>();
this.afterSave = new Executor();
@@ -65,7 +67,7 @@ implements IInitializableController {
}
setType = (type: EConnectionType): void => {
this.connectionType = type;
this.model.connection.useUrl = type === EConnectionType.URL;
};
save = async (): Promise<void> => {
@@ -6,6 +6,7 @@ fragment AdminConnection on ConnectionInfo {
template
connected
useUrl
readOnly
saveCredentials
+2 -1
View File
@@ -1164,7 +1164,7 @@ export type NavGetStructContainersQueryVariables = Exact<{
export interface NavGetStructContainersQuery { navGetStructContainers: { catalogList: Array<Pick<DatabaseObjectInfo, 'name' | 'description' | 'type' | 'features'>>; schemaList: Array<Pick<DatabaseObjectInfo, 'name' | 'description' | 'type' | 'features'>> } }
export type AdminConnectionFragment = (
Pick<ConnectionInfo, 'id' | 'name' | 'description' | 'driverId' | 'template' | 'connected' | 'readOnly' | 'saveCredentials' | 'host' | 'port' | 'databaseName' | 'url' | 'properties' | 'features' | 'authNeeded' | 'authModel' | 'supportedDataFormats'>
Pick<ConnectionInfo, 'id' | 'name' | 'description' | 'driverId' | 'template' | 'connected' | 'useUrl' | 'readOnly' | 'saveCredentials' | 'host' | 'port' | 'databaseName' | 'url' | 'properties' | 'features' | 'authNeeded' | 'authModel' | 'supportedDataFormats'>
& { origin: ObjectOriginInfoFragment; authProperties: Array<Pick<ObjectPropertyInfo, 'id' | 'value' | 'features'>> }
);
@@ -1459,6 +1459,7 @@ export const AdminConnectionFragmentDoc = `
driverId
template
connected
useUrl
readOnly
saveCredentials
host