-
Notifications
You must be signed in to change notification settings - Fork 70
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
Display stored procedures in graphs #639
Conversation
@@ -20,7 +21,7 @@ export class DocDBStoredProceduresTreeItem extends DocDBTreeItemBase<ProcedureMe | |||
public readonly contextValue: string = DocDBStoredProceduresTreeItem.contextValue; | |||
public readonly childTypeLabel: string = "Stored Procedure"; | |||
|
|||
constructor(endpoint: string, masterKey: string, private _collection: DocDBCollectionTreeItem, isEmulator: boolean) { | |||
constructor(endpoint: string, masterKey: string, private _collection: DocDBCollectionTreeItem | GraphCollectionTreeItem, isEmulator: boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the change made to DocDBStoredProcedure
is minimal, hence it doesn't warrant any refactoring.
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is not the clearest. Would GraphViewTreeItem be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think GraphTreeItem is fine.
public hasMoreChildren(): boolean { | ||
return false; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see some repeated code, but not enough to make a DocDBCollectionTreeItemBase
as opposed to DocDBDatabaseTreeItemBase
Also, see #414 - I did not want to perpetuate that.
What does it look like with mongo? I remember talking about this structure a while back and the original thought included a "documents" node, did that go away? |
|
@@ -18,7 +19,7 @@ export class DocDBStoredProcedureTreeItem implements IAzureTreeItem { | |||
public readonly contextValue: string = DocDBStoredProcedureTreeItem.contextValue; | |||
public readonly commandId: string = 'cosmosDB.openStoredProcedure'; | |||
|
|||
constructor(private _endpoint: string, private _masterKey: string, private _isEmulator: boolean, private _collection: DocDBCollectionTreeItem, public procedure: ProcedureMeta) { | |||
constructor(private _endpoint: string, private _masterKey: string, private _isEmulator: boolean, private _collection: DocDBCollectionTreeItem | GraphCollectionTreeItem, public procedure: ProcedureMeta) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offline feedback: The only reason _collection is required is for the DocumentClient here. Consider:
- An interface type to handle this.
- Passing just the client.
- Passing merely the getDocumentClient. This feels weird to me because a parameterless function storing state seems obfuscated if I were to debug this later.
@StephenWeatherford was there anything else I missed?
Commit performs option 2 from this previous comment |
Ping |
Fixes #422
Extension:
Portal:
Leaving some comments at places I would like some clarification.