mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-04-01 15:38:45 +01:00
* Rev up prettier * Reformat * Remove deprecated tslint * Remove call to tslint and update package-lock.json
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import * as Constants from "../../Common/Constants";
|
|
import { Action } from "../../Shared/Telemetry/TelemetryConstants";
|
|
import { traceSuccess } from "../../Shared/Telemetry/TelemetryProcessor";
|
|
import { SchemaAnalyzerAdapter } from "../Notebook/SchemaAnalyzer/SchemaAnalyzerAdapter";
|
|
import NotebookTabBase, { NotebookTabBaseOptions } from "./NotebookTabBase";
|
|
|
|
export default class SchemaAnalyzerTab extends NotebookTabBase {
|
|
public readonly html = '<div data-bind="react:schemaAnalyzerAdapter" style="height: 100%"></div>';
|
|
private schemaAnalyzerAdapter: SchemaAnalyzerAdapter;
|
|
|
|
constructor(options: NotebookTabBaseOptions) {
|
|
super(options);
|
|
this.schemaAnalyzerAdapter = new SchemaAnalyzerAdapter(
|
|
{
|
|
contentRef: undefined,
|
|
notebookClient: NotebookTabBase.clientManager,
|
|
},
|
|
options.collection?.databaseId,
|
|
options.collection?.id(),
|
|
);
|
|
}
|
|
|
|
public onActivate(): void {
|
|
traceSuccess(
|
|
Action.Tab,
|
|
{
|
|
databaseName: this.collection?.databaseId,
|
|
collectionName: this.collection?.id,
|
|
dataExplorerArea: Constants.Areas.Tab,
|
|
tabTitle: "Schema",
|
|
},
|
|
this.onLoadStartKey,
|
|
);
|
|
|
|
super.onActivate();
|
|
}
|
|
|
|
protected buildCommandBarOptions(): void {
|
|
this.updateNavbarWithTabsButtons();
|
|
}
|
|
}
|