Extensible welcome page (#2637)

* welcome/landing page

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* fix integration tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-04-27 11:24:39 +03:00
1 parent 1f854d0a0f
commit b1274cbb33
22 files changed
+147 -820

No files matched your search

@@ -48,7 +48,7 @@ export class BottomBar extends React.Component {
<div className="BottomBar flex gaps">
<div id="catalog-link" data-test-id="catalog-link" className="flex gaps align-center" onClick={() => navigate(catalogURL())}>
<Icon smallest material="view_list"/>
<span className="workspace-name" data-test-id="current-workspace-name">Catalog</span>
<span className="catalog-link" data-test-id="catalog-link">Catalog</span>
</div>
{this.renderRegisteredItems()}
</div>
@@ -5,7 +5,7 @@ import { Redirect, Route, Switch } from "react-router";
import { comparer, reaction } from "mobx";
import { disposeOnUnmount, observer } from "mobx-react";
import { BottomBar } from "./bottom-bar";
import { Catalog, catalogRoute, catalogURL } from "../+catalog";
import { Catalog, catalogRoute } from "../+catalog";
import { Preferences, preferencesRoute } from "../+preferences";
import { AddCluster, addClusterRoute } from "../+add-cluster";
import { ClusterView } from "./cluster-view";
@@ -17,6 +17,7 @@ import { Extensions, extensionsRoute } from "../+extensions";
import { getMatchedClusterId } from "../../navigation";
import { HotbarMenu } from "../hotbar/hotbar-menu";
import { EntitySettings, entitySettingsRoute } from "../+entity-settings";
import { Welcome, welcomeRoute, welcomeURL } from "../+welcome";
@observer
export class ClusterManager extends React.Component {
@@ -43,16 +44,13 @@ export class ClusterManager extends React.Component {
lensViews.clear();
}
get startUrl() {
return catalogURL();
}
render() {
return (
<div className="ClusterManager">
<main>
<div id="lens-views"/>
<Switch>
<Route component={Welcome} {...welcomeRoute} />
<Route component={Catalog} {...catalogRoute} />
<Route component={Preferences} {...preferencesRoute} />
<Route component={Extensions} {...extensionsRoute} />
@@ -65,7 +63,7 @@ export class ClusterManager extends React.Component {
<Route key={url} path={url} component={Page} />
))
}
<Redirect exact to={this.startUrl}/>
<Redirect exact to={welcomeURL()}/>
</Switch>
</main>
<HotbarMenu/>