Remove Unused Tabs (#450)
This commit is contained in:
parent
7cbf7202b0
commit
2d2d8b6efe
|
@ -200,7 +200,6 @@ src/Explorer/Tabs/QueryTab.test.ts
|
||||||
src/Explorer/Tabs/QueryTab.ts
|
src/Explorer/Tabs/QueryTab.ts
|
||||||
src/Explorer/Tabs/QueryTablesTab.ts
|
src/Explorer/Tabs/QueryTablesTab.ts
|
||||||
src/Explorer/Tabs/ScriptTabBase.ts
|
src/Explorer/Tabs/ScriptTabBase.ts
|
||||||
src/Explorer/Tabs/SparkMasterTab.ts
|
|
||||||
src/Explorer/Tabs/StoredProcedureTab.ts
|
src/Explorer/Tabs/StoredProcedureTab.ts
|
||||||
src/Explorer/Tabs/TabComponents.ts
|
src/Explorer/Tabs/TabComponents.ts
|
||||||
src/Explorer/Tabs/TabsBase.ts
|
src/Explorer/Tabs/TabsBase.ts
|
||||||
|
|
|
@ -355,7 +355,7 @@ export enum CollectionTabKind {
|
||||||
Notebook = 13 /* Deprecated */,
|
Notebook = 13 /* Deprecated */,
|
||||||
Terminal = 14,
|
Terminal = 14,
|
||||||
NotebookV2 = 15,
|
NotebookV2 = 15,
|
||||||
SparkMasterTab = 16,
|
SparkMasterTab = 16 /* Deprecated */,
|
||||||
Gallery = 17,
|
Gallery = 17,
|
||||||
NotebookViewer = 18,
|
NotebookViewer = 18,
|
||||||
Schema = 19,
|
Schema = 19,
|
||||||
|
|
|
@ -20,10 +20,6 @@ describe("Component Registerer", () => {
|
||||||
expect(ko.components.isRegistered("graph-style")).toBe(true);
|
expect(ko.components.isRegistered("graph-style")).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should register collapsible-panel component", () => {
|
|
||||||
expect(ko.components.isRegistered("collapsible-panel")).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should register json-editor component", () => {
|
it("should register json-editor component", () => {
|
||||||
expect(ko.components.isRegistered("json-editor")).toBe(true);
|
expect(ko.components.isRegistered("json-editor")).toBe(true);
|
||||||
});
|
});
|
||||||
|
@ -69,10 +65,6 @@ describe("Component Registerer", () => {
|
||||||
expect(ko.components.isRegistered("terminal-tab")).toBe(true);
|
expect(ko.components.isRegistered("terminal-tab")).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should register spark-master-tab component", () => {
|
|
||||||
expect(ko.components.isRegistered("spark-master-tab")).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should register mongo-shell-tab component", () => {
|
it("should register mongo-shell-tab component", () => {
|
||||||
expect(ko.components.isRegistered("mongo-shell-tab")).toBe(true);
|
expect(ko.components.isRegistered("mongo-shell-tab")).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import * as ko from "knockout";
|
import * as ko from "knockout";
|
||||||
import * as PaneComponents from "./Panes/PaneComponents";
|
import * as PaneComponents from "./Panes/PaneComponents";
|
||||||
import * as TabComponents from "./Tabs/TabComponents";
|
import * as TabComponents from "./Tabs/TabComponents";
|
||||||
import { CollapsiblePanelComponent } from "./Controls/CollapsiblePanel/CollapsiblePanelComponent";
|
|
||||||
import { DiffEditorComponent } from "./Controls/DiffEditor/DiffEditorComponent";
|
import { DiffEditorComponent } from "./Controls/DiffEditor/DiffEditorComponent";
|
||||||
import { DynamicListComponent } from "./Controls/DynamicList/DynamicListComponent";
|
import { DynamicListComponent } from "./Controls/DynamicList/DynamicListComponent";
|
||||||
import { EditorComponent } from "./Controls/Editor/EditorComponent";
|
import { EditorComponent } from "./Controls/Editor/EditorComponent";
|
||||||
|
@ -17,7 +16,6 @@ ko.components.register("input-typeahead", new InputTypeaheadComponent());
|
||||||
ko.components.register("new-vertex-form", NewVertexComponent);
|
ko.components.register("new-vertex-form", NewVertexComponent);
|
||||||
ko.components.register("error-display", new ErrorDisplayComponent());
|
ko.components.register("error-display", new ErrorDisplayComponent());
|
||||||
ko.components.register("graph-style", GraphStyleComponent);
|
ko.components.register("graph-style", GraphStyleComponent);
|
||||||
ko.components.register("collapsible-panel", new CollapsiblePanelComponent());
|
|
||||||
ko.components.register("editor", new EditorComponent());
|
ko.components.register("editor", new EditorComponent());
|
||||||
ko.components.register("json-editor", new JsonEditorComponent());
|
ko.components.register("json-editor", new JsonEditorComponent());
|
||||||
ko.components.register("diff-editor", new DiffEditorComponent());
|
ko.components.register("diff-editor", new DiffEditorComponent());
|
||||||
|
@ -39,7 +37,6 @@ ko.components.register("mongo-shell-tab", new TabComponents.MongoShellTab());
|
||||||
ko.components.register("conflicts-tab", new TabComponents.ConflictsTab());
|
ko.components.register("conflicts-tab", new TabComponents.ConflictsTab());
|
||||||
ko.components.register("notebookv2-tab", new TabComponents.NotebookV2Tab());
|
ko.components.register("notebookv2-tab", new TabComponents.NotebookV2Tab());
|
||||||
ko.components.register("terminal-tab", new TabComponents.TerminalTab());
|
ko.components.register("terminal-tab", new TabComponents.TerminalTab());
|
||||||
ko.components.register("spark-master-tab", new TabComponents.SparkMasterTab());
|
|
||||||
ko.components.register("gallery-tab", new TabComponents.GalleryTab());
|
ko.components.register("gallery-tab", new TabComponents.GalleryTab());
|
||||||
ko.components.register("notebook-viewer-tab", new TabComponents.NotebookViewerTab());
|
ko.components.register("notebook-viewer-tab", new TabComponents.NotebookViewerTab());
|
||||||
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
import * as ko from "knockout";
|
|
||||||
import template from "./collapsible-panel-component.html";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper class for ko component registration
|
|
||||||
*/
|
|
||||||
export class CollapsiblePanelComponent {
|
|
||||||
constructor() {
|
|
||||||
return {
|
|
||||||
viewModel: CollapsiblePanelViewModel,
|
|
||||||
template,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parameters for this component
|
|
||||||
*/
|
|
||||||
interface CollapsiblePanelParams {
|
|
||||||
collapsedTitle: ko.Observable<string>;
|
|
||||||
expandedTitle: ko.Observable<string>;
|
|
||||||
isCollapsed?: ko.Observable<boolean>;
|
|
||||||
collapseToLeft?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Collapsible panel:
|
|
||||||
* Contains a header with [>] button to collapse and an title ("expandedTitle").
|
|
||||||
* Collapsing the panel:
|
|
||||||
* - shrinks width to narrow amount
|
|
||||||
* - hides children
|
|
||||||
* - shows [<]
|
|
||||||
* - shows vertical title ("collapsedTitle")
|
|
||||||
* - the default behavior is to collapse to the right (ie, place this component on the right or use "collapseToLeft" parameter)
|
|
||||||
*
|
|
||||||
* How to use in your markup:
|
|
||||||
* <collapsible-panel params="{ collapsedTitle:'Properties', expandedTitle:'Expanded properties' }">
|
|
||||||
* <!-- add your markup here: the ko context is the same as outside of collapsible-panel (ie $data) -->
|
|
||||||
* </collapsible-panel>
|
|
||||||
*
|
|
||||||
* Use the optional "isCollapsed" parameter to programmatically collapse/expand the pane from outside the component.
|
|
||||||
* Use the optional "collapseToLeft" parameter to collapse to the left.
|
|
||||||
*/
|
|
||||||
class CollapsiblePanelViewModel {
|
|
||||||
public params: CollapsiblePanelParams;
|
|
||||||
private isCollapsed: ko.Observable<boolean>;
|
|
||||||
|
|
||||||
public constructor(params: CollapsiblePanelParams) {
|
|
||||||
this.params = params;
|
|
||||||
this.isCollapsed = params.isCollapsed || ko.observable(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public toggleCollapse(): void {
|
|
||||||
this.isCollapsed(!this.isCollapsed());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
<div class="collapsiblePanel" data-bind="css: { paneCollapsed:isCollapsed() }">
|
|
||||||
<div class="panelHeader" data-bind="visible: !isCollapsed()">
|
|
||||||
<span
|
|
||||||
class="collapsedIconContainer collapseExpandButton"
|
|
||||||
data-bind="click:toggleCollapse, css: { 'pull-right':params.collapseToLeft }"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
class="collapsedIcon imgVerticalAlignment"
|
|
||||||
src="/imgarrowlefticon.svg"
|
|
||||||
alt="Collapse"
|
|
||||||
data-bind="css: { expanded:!isCollapsed(), iconMirror:params.collapseToLeft }"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
class="expandedTitle"
|
|
||||||
data-bind="text: params.expandedTitle, css:{ iconSpacer:!params.collapseToLeft }"
|
|
||||||
></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapsibleNav nav" data-bind="visible:isCollapsed">
|
|
||||||
<ul class="nav">
|
|
||||||
<li class="collapsedBtn collapseExpandButton">
|
|
||||||
<span class="collapsedIconContainer" data-bind="click: toggleCollapse">
|
|
||||||
<img
|
|
||||||
class="collapsedIcon"
|
|
||||||
src="/imgarrowlefticon.svg"
|
|
||||||
data-bind="css: { expanded:!isCollapsed(), iconMirror:params.collapseToLeft }"
|
|
||||||
alt="Expand"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
<span class="rotatedInner" data-bind="click: toggleCollapse">
|
|
||||||
<span data-bind="text: params.collapsedTitle"></span>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panelContent" data-bind="visible:!isCollapsed()">
|
|
||||||
<!-- ko with:$parent -->
|
|
||||||
<!-- ko template: { nodes: $componentTemplateNodes } -->
|
|
||||||
<!-- /ko -->
|
|
||||||
<!-- /ko -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<div style="width: 100%; height: 100%; margin-left: 3px" data-bind="attr: { id: tabId }">
|
|
||||||
<!-- This runs the NotebookApp hosted by DataExplorer -->
|
|
||||||
<iframe
|
|
||||||
style="width: 100%; height: 100%; border: none"
|
|
||||||
data-bind="setTemplateReady: true, attr: { src: sparkMasterSrc }, visible: !!sparkMasterSrc()"
|
|
||||||
></iframe>
|
|
||||||
</div>
|
|
|
@ -1,35 +0,0 @@
|
||||||
import * as ko from "knockout";
|
|
||||||
import * as DataModels from "../../Contracts/DataModels";
|
|
||||||
import * as ViewModels from "../../Contracts/ViewModels";
|
|
||||||
import TabsBase from "./TabsBase";
|
|
||||||
import Explorer from "../Explorer";
|
|
||||||
|
|
||||||
interface SparkMasterTabOptions extends ViewModels.TabOptions {
|
|
||||||
clusterConnectionInfo: DataModels.SparkClusterConnectionInfo;
|
|
||||||
container: Explorer;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class SparkMasterTab extends TabsBase {
|
|
||||||
public sparkMasterSrc: ko.Observable<string>;
|
|
||||||
|
|
||||||
private _clusterConnectionInfo: DataModels.SparkClusterConnectionInfo;
|
|
||||||
private _container: Explorer;
|
|
||||||
|
|
||||||
constructor(options: SparkMasterTabOptions) {
|
|
||||||
super(options);
|
|
||||||
super.onActivate.bind(this);
|
|
||||||
this._container = options.container;
|
|
||||||
this._clusterConnectionInfo = options.clusterConnectionInfo;
|
|
||||||
const sparkMasterEndpoint =
|
|
||||||
this._clusterConnectionInfo &&
|
|
||||||
this._clusterConnectionInfo.endpoints &&
|
|
||||||
this._clusterConnectionInfo.endpoints.find(
|
|
||||||
(endpoint) => endpoint.kind === DataModels.SparkClusterEndpointKind.SparkUI
|
|
||||||
);
|
|
||||||
this.sparkMasterSrc = ko.observable<string>(sparkMasterEndpoint && sparkMasterEndpoint.endpoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getContainer() {
|
|
||||||
return this._container;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
import DocumentsTabTemplate from "./DocumentsTab.html";
|
import DocumentsTabTemplate from "./DocumentsTab.html";
|
||||||
import ConflictsTabTemplate from "./ConflictsTab.html";
|
import ConflictsTabTemplate from "./ConflictsTab.html";
|
||||||
import GraphTabTemplate from "./GraphTab.html";
|
import GraphTabTemplate from "./GraphTab.html";
|
||||||
import SparkMasterTabTemplate from "./SparkMasterTab.html";
|
|
||||||
import NotebookV2TabTemplate from "./NotebookV2Tab.html";
|
import NotebookV2TabTemplate from "./NotebookV2Tab.html";
|
||||||
import TerminalTabTemplate from "./TerminalTab.html";
|
import TerminalTabTemplate from "./TerminalTab.html";
|
||||||
import MongoDocumentsTabTemplate from "./MongoDocumentsTab.html";
|
import MongoDocumentsTabTemplate from "./MongoDocumentsTab.html";
|
||||||
|
@ -60,15 +59,6 @@ export class GraphTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SparkMasterTab {
|
|
||||||
constructor() {
|
|
||||||
return {
|
|
||||||
viewModel: TabComponent,
|
|
||||||
template: SparkMasterTabTemplate,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class NotebookV2Tab {
|
export class NotebookV2Tab {
|
||||||
constructor() {
|
constructor() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
"./src/Definitions/plotly.js-cartesian-dist.d-min.ts",
|
"./src/Definitions/plotly.js-cartesian-dist.d-min.ts",
|
||||||
"./src/Definitions/svg.d.ts",
|
"./src/Definitions/svg.d.ts",
|
||||||
"./src/Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.ts",
|
"./src/Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.ts",
|
||||||
"./src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts",
|
|
||||||
"./src/Explorer/Controls/GitHub/GitHubStyleConstants.ts",
|
"./src/Explorer/Controls/GitHub/GitHubStyleConstants.ts",
|
||||||
"./src/Explorer/Controls/InputTypeahead/InputTypeahead.ts",
|
"./src/Explorer/Controls/InputTypeahead/InputTypeahead.ts",
|
||||||
"./src/Explorer/Controls/SmartUi/InputUtils.ts",
|
"./src/Explorer/Controls/SmartUi/InputUtils.ts",
|
||||||
|
|
Loading…
Reference in New Issue