Allow extensions to have external dependencies (#1018)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-10-05 16:39:58 +03:00
1 parent de3849d22c
commit 2b6f283e1b
21 files changed
+1861 -305

No files matched your search

@@ -1,11 +0,0 @@
import { RouteProps } from "react-router";
import { buildURL } from "../../navigation";
export const extensionsRoute: RouteProps = {
path: "/extensions"
}
export interface IExtensionsRouteParams {
}
export const extensionsURL = buildURL<IExtensionsRouteParams>(extensionsRoute.path);
@@ -1,4 +0,0 @@
.Extensions {
$spacing: $padding * 2;
padding: $spacing;
}
@@ -1,31 +0,0 @@
import "./extensions.scss"
import React from "react";
import { observer } from "mobx-react";
import { extensionStore } from "../../../extensions/extension-store";
import { WizardLayout } from "../layout/wizard-layout";
import { Icon } from "../icon";
@observer
export class Extensions extends React.Component {
// todo: add input-select to customize extensions loading folder(s)
renderInfoPanel() {
return (
<div className="info-panel flex gaps align-center">
<Icon material="info"/>
<p>Extensions available to install</p>
</div>
);
}
render() {
const { installed: installedExtensions } = extensionStore;
return (
<WizardLayout className="Extensions" infoPanel={this.renderInfoPanel()}>
<h2>Extensions</h2>
<pre>
{JSON.stringify(installedExtensions.toJSON(), null, 2)}
</pre>
</WizardLayout>
);
}
}
@@ -1,2 +0,0 @@
export * from "./extensions.route"
export * from "./extensions"
@@ -11,7 +11,6 @@ import { Workspaces, workspacesRoute } from "../+workspaces";
import { AddCluster, addClusterRoute } from "../+add-cluster";
import { ClusterView } from "./cluster-view";
import { ClusterSettings, clusterSettingsRoute } from "../+cluster-settings";
import { Extensions, extensionsRoute } from "../+extensions";
import { clusterViewRoute, clusterViewURL, getMatchedCluster, getMatchedClusterId } from "./cluster-view.route";
import { clusterStore } from "../../../common/cluster-store";
import { hasLoadedView, initView, lensViews, refreshViews } from "./lens-views";
@@ -64,7 +63,6 @@ export class ClusterManager extends React.Component {
<Route component={AddCluster} {...addClusterRoute} />
<Route component={ClusterView} {...clusterViewRoute} />
<Route component={ClusterSettings} {...clusterSettingsRoute} />
<Route component={Extensions} {...extensionsRoute}/>
{dynamicPages.globalPages.map(({ path, components: { Page } }) => {
return <Route key={path} path={path} component={Page}/>
})}