mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Prep Schema Analyzer for flighting (#760)
* Prepare for flighting Schema Analyzer * Rename SchemaAnalyzerComponent -> SchemaAnalyzer * Only show Schema option if notebooks enabled
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { SchemaAnalyzerComponentAdapter } from "../Notebook/SchemaAnalyzerComponent/SchemaAnalyzerComponentAdapter";
|
||||
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:schemaAnalyzerComponentAdapter" style="height: 100%"></div>';
|
||||
private schemaAnalyzerComponentAdapter: SchemaAnalyzerComponentAdapter;
|
||||
public readonly html = '<div data-bind="react:schemaAnalyzerAdapter" style="height: 100%"></div>';
|
||||
private schemaAnalyzerAdapter: SchemaAnalyzerAdapter;
|
||||
|
||||
constructor(options: NotebookTabBaseOptions) {
|
||||
super(options);
|
||||
this.schemaAnalyzerComponentAdapter = new SchemaAnalyzerComponentAdapter(
|
||||
this.schemaAnalyzerAdapter = new SchemaAnalyzerAdapter(
|
||||
{
|
||||
contentRef: undefined,
|
||||
notebookClient: NotebookTabBase.clientManager,
|
||||
@@ -17,6 +20,21 @@ export default class SchemaAnalyzerTab extends NotebookTabBase {
|
||||
);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user