fix: cluster-manager initial loading, redirect to startPage from any "404"-route

Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Roman authored and Lauri Nevala committed 2020-08-18 11:53:25 +03:00
1 parent 7b5092d78b
commit 6f6680be98
1 file changed
+2 -2
@@ -29,7 +29,7 @@ export function hasLoadedView(clusterId: ClusterId): boolean {
return !!lensViews.get(clusterId)?.isLoaded; return !!lensViews.get(clusterId)?.isLoaded;
} }
// todo: figure out how to replace webview-tag to iframe // todo: figure out how to replace <webview>-tag to <iframe> with nodeIntegration=true
function initView(clusterId: ClusterId) { function initView(clusterId: ClusterId) {
if (!clusterId || lensViews.has(clusterId)) { if (!clusterId || lensViews.has(clusterId)) {
return; return;
@@ -102,7 +102,7 @@ export class ClusterManager extends React.Component {
<Route component={Workspaces} {...workspacesRoute}/> <Route component={Workspaces} {...workspacesRoute}/>
<Route component={AddCluster} {...addClusterRoute}/> <Route component={AddCluster} {...addClusterRoute}/>
<Route component={ClusterView} {...clusterViewRoute}/> <Route component={ClusterView} {...clusterViewRoute}/>
<Redirect exact from="/" to={this.startUrl}/> <Redirect exact to={this.startUrl}/>
</Switch> </Switch>
</main> </main>
<ClustersMenu/> <ClustersMenu/>