mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Notebooks Gallery (#59)
* Initial commit * Address PR comments * Move notebook related stuff to NotebookManager and dynamically load it * Add New gallery callout and other UI tweaks * Update test snapshot
This commit is contained in:
@@ -5,6 +5,7 @@ import { JunoClient } from "../Juno/JunoClient";
|
||||
import { GitHubConnector, IGitHubConnectorParams } from "./GitHubConnector";
|
||||
import { GitHubOAuthService } from "./GitHubOAuthService";
|
||||
import { ConsoleDataType } from "../Explorer/Menus/NotificationConsole/NotificationConsoleComponent";
|
||||
import NotebookManager from "../Explorer/Notebook/NotebookManager";
|
||||
|
||||
const sampleDatabaseAccount: ViewModels.DatabaseAccount = {
|
||||
id: "id",
|
||||
@@ -32,10 +33,12 @@ describe("GitHubOAuthService", () => {
|
||||
originalDataExplorer = window.dataExplorer;
|
||||
window.dataExplorer = {
|
||||
...originalDataExplorer,
|
||||
gitHubOAuthService,
|
||||
logConsoleData: (data): void =>
|
||||
data.type === ConsoleDataType.Error ? console.error(data.message) : console.log(data.message)
|
||||
} as ViewModels.Explorer;
|
||||
window.dataExplorer.notebookManager = new NotebookManager();
|
||||
window.dataExplorer.notebookManager.junoClient = junoClient;
|
||||
window.dataExplorer.notebookManager.gitHubOAuthService = gitHubOAuthService;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -17,7 +17,7 @@ window.addEventListener("message", (event: MessageEvent) => {
|
||||
const msg = event.data;
|
||||
if (msg.type === GitHubConnectorMsgType) {
|
||||
const params = msg.data as IGitHubConnectorParams;
|
||||
window.dataExplorer.gitHubOAuthService.finishOAuth(params);
|
||||
window.dataExplorer.notebookManager?.gitHubOAuthService.finishOAuth(params);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user