mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-07-21 04:47:17 +01:00
b7caca1cd6
Removes the GitHub notebook-repo integration that only existed to pin/browse notebook repositories. Deletes src/GitHub/, the GitHub controls/panes, GitHubUtils, JunoUtils, and the connectToGitHub webpack entry. Decouples NotebookManager, useNotebook, the resource tree, and Explorer from GitHub wiring. Trims JunoClient's GitHub-only methods while keeping the Schema and gallery methods. Removes GitHub config fields from ConfigContext and strips the dead github:// branches from NotebookUtil. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
33 lines
983 B
TypeScript
33 lines
983 B
TypeScript
/*
|
|
* Contains all notebook related stuff meant to be dynamically loaded by explorer
|
|
*/
|
|
|
|
import { JunoClient } from "../../Juno/JunoClient";
|
|
import { userContext } from "../../UserContext";
|
|
import Explorer from "../Explorer";
|
|
import { ResourceTreeAdapter } from "../Tree/ResourceTreeAdapter";
|
|
import { NotebookContainerClient } from "./NotebookContainerClient";
|
|
|
|
export interface NotebookManagerOptions {
|
|
container: Explorer;
|
|
resourceTree: ResourceTreeAdapter;
|
|
refreshCommandBarButtons: () => void;
|
|
refreshNotebookList: () => void;
|
|
}
|
|
|
|
export default class NotebookManager {
|
|
private params: NotebookManagerOptions;
|
|
public junoClient: JunoClient;
|
|
|
|
public notebookClient: NotebookContainerClient;
|
|
|
|
public initialize(params: NotebookManagerOptions): void {
|
|
this.params = params;
|
|
this.junoClient = new JunoClient();
|
|
|
|
this.notebookClient = new NotebookContainerClient(() =>
|
|
this.params.container.initNotebooks(userContext?.databaseAccount),
|
|
);
|
|
}
|
|
}
|