diff --git a/.eslintignore b/.eslintignore index 4e9f18f57..b84affcd7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -138,7 +138,6 @@ src/Explorer/Panes/AddDatabasePane.test.ts src/Explorer/Panes/AddDatabasePane.ts src/Explorer/Panes/BrowseQueriesPane.ts src/Explorer/Panes/CassandraAddCollectionPane.ts -src/Explorer/Panes/ClusterLibraryPane.ts src/Explorer/Panes/ContextualPaneBase.ts src/Explorer/Panes/DeleteCollectionConfirmationPane.test.ts src/Explorer/Panes/DeleteCollectionConfirmationPane.ts @@ -146,7 +145,6 @@ src/Explorer/Panes/DeleteDatabaseConfirmationPane.test.ts src/Explorer/Panes/DeleteDatabaseConfirmationPane.ts src/Explorer/Panes/ExecuteSprocParamsPane.ts src/Explorer/Panes/GraphStylingPane.ts -src/Explorer/Panes/LibraryManagePane.ts src/Explorer/Panes/LoadQueryPane.ts src/Explorer/Panes/NewVertexPane.ts src/Explorer/Panes/PaneComponents.ts @@ -332,10 +330,6 @@ src/Explorer/Controls/Directory/DirectoryListComponent.test.tsx src/Explorer/Controls/Directory/DirectoryListComponent.tsx src/Explorer/Controls/Editor/EditorReact.tsx src/Explorer/Controls/InputTypeahead/InputTypeaheadComponent.tsx -src/Explorer/Controls/LibraryManagement/ClusterLibraryGrid.tsx -src/Explorer/Controls/LibraryManagement/ClusterLibraryGridAdapter.tsx -src/Explorer/Controls/LibraryManagement/LibraryManage.tsx -src/Explorer/Controls/LibraryManagement/LibraryManageComponentAdapter.tsx src/Explorer/Controls/Notebook/NotebookTerminalComponent.test.tsx src/Explorer/Controls/Notebook/NotebookTerminalComponent.tsx src/Explorer/Controls/NotebookViewer/NotebookMetadataComponent.tsx diff --git a/src/Contracts/ViewModels.ts b/src/Contracts/ViewModels.ts index 4e3f51377..34061d385 100644 --- a/src/Contracts/ViewModels.ts +++ b/src/Contracts/ViewModels.ts @@ -148,8 +148,6 @@ export interface Explorer { uploadFilePane: UploadFilePane; stringInputPane: StringInputPane; setupNotebooksPane: SetupNotebooksPane; - libraryManagePane: ContextualPane; - clusterLibraryPane: ContextualPane; gitHubReposPane: ContextualPane; publishNotebookPaneAdapter: ReactAdapter; @@ -230,11 +228,8 @@ export interface Explorer { openGallery: (notebookUrl?: string, galleryItem?: IGalleryItem, isFavorite?: boolean) => void; openNotebookViewer: (notebookUrl: string) => void; notebookWorkspaceManager: NotebookWorkspaceManager; - sparkClusterManager: SparkClusterManager; mostRecentActivity: MostRecentActivity; initNotebooks: (databaseAccount: DataModels.DatabaseAccount) => Promise; - deleteCluster(): void; - openSparkMasterTab(): Promise; handleOpenFileAction(path: string): Promise; // Notebook operations @@ -275,26 +270,6 @@ export interface KernelConnectionMetadata { notebookConnectionInfo: DataModels.NotebookWorkspaceConnectionInfo; } -export interface SparkClusterManager { - getClustersAsync(cosmosAccountResourceId: string): Promise; - getClusterAsync(cosmosAccountResourceId: string, clusterId: string): Promise; - createClusterAsync(cosmosAccountResourceId: string, cluster: Partial): Promise; - updateClusterAsync( - cosmosAccountResourceId: string, - clusterId: string, - sparkCluster: DataModels.SparkCluster - ): Promise; - deleteClusterAsync(cosmosAccountResourceId: string, clusterId: string): Promise; - getClusterConnectionInfoAsync( - cosmosAccountResourceId: string, - clusterId: string - ): Promise; - getLibrariesAsync(cosmosdbResourceId: string): Promise; - getLibraryAsync(cosmosdbResourceId: string, libraryName: string): Promise; - addLibraryAsync(cosmosdbResourceId: string, libraryName: string, library: Library): Promise; - deleteLibraryAsync(cosmosdbResourceId: string, libraryName: string): Promise; -} - export interface ArcadiaResourceManager { getWorkspacesAsync(arcadiaResourceId: string): Promise; getWorkspaceAsync(arcadiaResourceId: string, workspaceId: string): Promise; diff --git a/src/Explorer/ComponentRegisterer.test.ts b/src/Explorer/ComponentRegisterer.test.ts index f8418597d..049650dcf 100644 --- a/src/Explorer/ComponentRegisterer.test.ts +++ b/src/Explorer/ComponentRegisterer.test.ts @@ -123,12 +123,4 @@ describe("Component Registerer", () => { it("should register throughput-input component", () => { expect(ko.components.isRegistered("throughput-input")).toBe(true); }); - - it("should register library-manage-pane component", () => { - expect(ko.components.isRegistered("library-manage-pane")).toBe(true); - }); - - it("should register cluster-library-pane component", () => { - expect(ko.components.isRegistered("cluster-library-pane")).toBe(true); - }); }); diff --git a/src/Explorer/ComponentRegisterer.ts b/src/Explorer/ComponentRegisterer.ts index a4a77e7f9..2325237b3 100644 --- a/src/Explorer/ComponentRegisterer.ts +++ b/src/Explorer/ComponentRegisterer.ts @@ -78,6 +78,4 @@ ko.components.register("browse-queries-pane", new PaneComponents.BrowseQueriesPa ko.components.register("upload-file-pane", new PaneComponents.UploadFilePaneComponent()); ko.components.register("string-input-pane", new PaneComponents.StringInputPaneComponent()); ko.components.register("setup-notebooks-pane", new PaneComponents.SetupNotebooksPaneComponent()); -ko.components.register("library-manage-pane", new PaneComponents.LibraryManagePaneComponent()); -ko.components.register("cluster-library-pane", new PaneComponents.ClusterLibraryPaneComponent()); ko.components.register("github-repos-pane", new PaneComponents.GitHubReposPaneComponent()); diff --git a/src/Explorer/Controls/LibraryManagement/ClusterLibraryGrid.tsx b/src/Explorer/Controls/LibraryManagement/ClusterLibraryGrid.tsx deleted file mode 100644 index bda5b249c..000000000 --- a/src/Explorer/Controls/LibraryManagement/ClusterLibraryGrid.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import * as React from "react"; -import { DetailsList, IColumn, SelectionMode } from "office-ui-fabric-react/lib/DetailsList"; -import { Library } from "../../../Contracts/DataModels"; - -export interface ClusterLibraryItem extends Library { - installed: boolean; -} - -export interface ClusterLibraryGridProps { - libraryItems: ClusterLibraryItem[]; - onInstalledChanged: (libraryName: string, installed: boolean) => void; -} - -export function ClusterLibraryGrid(props: ClusterLibraryGridProps): JSX.Element { - const onInstalledChanged = (e: React.FormEvent) => { - const target = e.target; - const libraryName = (target as any).dataset.name; - const checked = (target as any).checked; - return props.onInstalledChanged(libraryName, checked); - }; - - const columns: IColumn[] = [ - { - key: "name", - name: "Name", - fieldName: "name", - minWidth: 150 - }, - { - key: "installed", - name: "Installed", - minWidth: 100, - onRender: (item: ClusterLibraryItem) => { - return ; - } - } - ]; - - return ; -} diff --git a/src/Explorer/Controls/LibraryManagement/ClusterLibraryGridAdapter.tsx b/src/Explorer/Controls/LibraryManagement/ClusterLibraryGridAdapter.tsx deleted file mode 100644 index 968bf6e36..000000000 --- a/src/Explorer/Controls/LibraryManagement/ClusterLibraryGridAdapter.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import * as React from "react"; -import { ReactAdapter } from "../../../Bindings/ReactBindingHandler"; -import { ClusterLibraryGrid, ClusterLibraryGridProps } from "./ClusterLibraryGrid"; - -export class ClusterLibraryGridAdapter implements ReactAdapter { - public parameters: ko.Observable; - - public renderComponent(): JSX.Element { - return ; - } -} diff --git a/src/Explorer/Controls/LibraryManagement/LibraryManage.tsx b/src/Explorer/Controls/LibraryManagement/LibraryManage.tsx deleted file mode 100644 index bb51144f2..000000000 --- a/src/Explorer/Controls/LibraryManagement/LibraryManage.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import * as React from "react"; -import DeleteIcon from "../../../../images/delete.svg"; -import { Button } from "office-ui-fabric-react/lib/Button"; -import { DetailsList, IColumn, SelectionMode } from "office-ui-fabric-react/lib/DetailsList"; -import { Library } from "../../../Contracts/DataModels"; -import { Label } from "office-ui-fabric-react/lib/Label"; -import { SparkLibrary } from "../../../Common/Constants"; -import { TextField } from "office-ui-fabric-react/lib/TextField"; - -export interface LibraryManageComponentProps { - addProps: { - nameProps: LibraryAddNameTextFieldProps; - urlProps: LibraryAddUrlTextFieldProps; - buttonProps: LibraryAddButtonProps; - }; - gridProps: LibraryManageGridProps; -} - -export function LibraryManageComponent(props: LibraryManageComponentProps): JSX.Element { - const { - addProps: { nameProps, urlProps, buttonProps }, - gridProps - } = props; - return ( -
-
- - - -
-
- - -
-
- ); -} - -export interface LibraryManageGridProps { - items: Library[]; - onLibraryDeleteClick: (libraryName: string) => void; -} - -function LibraryManageGrid(props: LibraryManageGridProps): JSX.Element { - const columns: IColumn[] = [ - { - key: "name", - name: "Name", - fieldName: "name", - minWidth: 200 - }, - { - key: "delete", - name: "Delete", - minWidth: 60, - onRender: (item: Library) => { - const onDelete = () => { - props.onLibraryDeleteClick(item.name); - }; - return ( - - Delete - - ); - } - } - ]; - return ; -} - -export interface LibraryAddButtonProps { - disabled: boolean; - onLibraryAddClick: (event: React.FormEvent) => void; -} - -function LibraryAddButton(props: LibraryAddButtonProps): JSX.Element { - return ( -