mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Fixing async server tree (#22511)
* Changing look of new OE * Fixing styling * Fixing moving of connected profile * Fixing drag and drop where treenodes delete connection nodes * Fixing Deleting and disconnecting in AsyncServerTree * Adding constant for OE timeout * Updated interfaces * Removing test compilation errors * Fixing most events in async server tree * Fixing connection pane styling * Fixing find node function * Fixing some more operations * Fixing some ops * All operations done * Fixed active connections * Fixed data source * Adding support for setting parents * code cleanup * Fixing icon styling issues * Fix errors * Fixing comment * Fixing spacing * Adding explanation to OE service. * Reverting server delegate changes * Reverting styling * reverting more styling change * reverting more styling * Fixing has children * Fixing drag and drop to tree nodes * fixing drag and drop * reverting timing * fixing drag and drop * cleaning some code * Fixed server and group moving * spell check * consolidating some logic * Fixed whitespace * fixing moving to root group
This commit is contained in:
@@ -85,6 +85,17 @@ export const SERVICE_ID = 'connectionManagementService';
|
||||
|
||||
export const IConnectionManagementService = createDecorator<IConnectionManagementService>(SERVICE_ID);
|
||||
|
||||
export interface ConnectionElementMovedParams {
|
||||
source: ConnectionProfile | ConnectionProfileGroup;
|
||||
oldGroupId: string;
|
||||
newGroupId: string;
|
||||
}
|
||||
|
||||
export interface ConnectionProfileEditedParams {
|
||||
profile: ConnectionProfile;
|
||||
oldProfileId: string;
|
||||
}
|
||||
|
||||
export interface IConnectionManagementService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
@@ -96,6 +107,25 @@ export interface IConnectionManagementService {
|
||||
onConnectionChanged: Event<IConnectionParams>;
|
||||
onLanguageFlavorChanged: Event<azdata.DidChangeLanguageFlavorParams>;
|
||||
|
||||
// Event Emitters for async tree
|
||||
/**
|
||||
* Connection Profile events.
|
||||
*/
|
||||
onConnectionProfileCreated: Event<ConnectionProfile>;
|
||||
onConnectionProfileEdited: Event<ConnectionProfileEditedParams>;
|
||||
onConnectionProfileDeleted: Event<ConnectionProfile>;
|
||||
onConnectionProfileMoved: Event<ConnectionElementMovedParams>;
|
||||
onConnectionProfileConnected: Event<ConnectionProfile>;
|
||||
onConnectionProfileDisconnected: Event<ConnectionProfile>;
|
||||
/**
|
||||
* Connection Profile Group events.
|
||||
*/
|
||||
onConnectionProfileGroupCreated: Event<ConnectionProfileGroup>;
|
||||
onConnectionProfileGroupEdited: Event<ConnectionProfileGroup>;
|
||||
onConnectionProfileGroupDeleted: Event<ConnectionProfileGroup>;
|
||||
onConnectionProfileGroupMoved: Event<ConnectionElementMovedParams>;
|
||||
// End of Event Emitters for async tree
|
||||
|
||||
// Properties
|
||||
providerNameToDisplayNameMap: { [providerDisplayName: string]: string };
|
||||
|
||||
@@ -159,6 +189,8 @@ export interface IConnectionManagementService {
|
||||
|
||||
getConnectionGroups(providers?: string[]): ConnectionProfileGroup[];
|
||||
|
||||
getConnectionGroupById(id: string): ConnectionProfileGroup | undefined;
|
||||
|
||||
getRecentConnections(providers?: string[]): ConnectionProfile[];
|
||||
|
||||
clearRecentConnectionsList(): void;
|
||||
|
||||
@@ -126,6 +126,8 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
public getChildren(): (ConnectionProfile | ConnectionProfileGroup)[] {
|
||||
let allChildren: (ConnectionProfile | ConnectionProfileGroup)[] = [];
|
||||
this._childConnections.forEach((conn) => {
|
||||
conn.parent = this;
|
||||
conn.groupId = this.id;
|
||||
allChildren.push(conn);
|
||||
});
|
||||
|
||||
@@ -234,4 +236,8 @@ export class ConnectionProfileGroup extends Disposable implements IConnectionPro
|
||||
}
|
||||
return subgroups;
|
||||
}
|
||||
|
||||
public static createConnectionProfileGroup(group: IConnectionProfileGroup, parentGroup: ConnectionProfileGroup | undefined): ConnectionProfileGroup {
|
||||
return new ConnectionProfileGroup(group.name, parentGroup, group.id, group.color, group.description);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,17 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
onDeleteConnectionProfile = undefined!;
|
||||
onLanguageFlavorChanged = undefined!;
|
||||
|
||||
public onConnectionProfileCreated: Event<any> = Event.None;
|
||||
public onConnectionProfileEdited: Event<any> = Event.None;
|
||||
public onConnectionProfileDeleted: Event<any> = Event.None;
|
||||
public onConnectionProfileMoved: Event<any> = Event.None;
|
||||
public onConnectionProfileConnected: Event<any> = Event.None;
|
||||
public onConnectionProfileDisconnected: Event<any> = Event.None;
|
||||
public onConnectionProfileGroupCreated: Event<any> = Event.None;
|
||||
public onConnectionProfileGroupEdited: Event<any> = Event.None;
|
||||
public onConnectionProfileGroupDeleted: Event<any> = Event.None;
|
||||
public onConnectionProfileGroupMoved: Event<any> = Event.None;
|
||||
|
||||
public get onConnect(): Event<any> {
|
||||
return Event.None;
|
||||
}
|
||||
@@ -90,6 +101,10 @@ export class TestConnectionManagementService implements IConnectionManagementSer
|
||||
return [];
|
||||
}
|
||||
|
||||
getConnectionGroupById(id: string): ConnectionProfileGroup | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getActiveConnections(providers?: string[]): ConnectionProfile[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user