github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/ccl/src/routes/visualization.tsx (about) 1 // Copyright 2017 The Cockroach Authors. 2 // 3 // Licensed as a CockroachDB Enterprise file under the Cockroach Community 4 // License (the "License"); you may not use this file except in compliance with 5 // the License. You may obtain a copy of the License at 6 // 7 // https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt 8 import React from "react"; 9 import {Redirect, Route, Switch} from "react-router-dom"; 10 import ClusterViz from "src/views/clusterviz/containers/map"; 11 import NodeList from "src/views/clusterviz/containers/map/nodeList"; 12 import ClusterOverview from "src/views/cluster/containers/clusterOverview"; 13 14 export const CLUSTERVIZ_ROOT = "/overview/map"; 15 16 export default function createNodeMapRoutes(): JSX.Element { 17 return ( 18 <Route path="/overview"> 19 <ClusterOverview> 20 <Switch> 21 <Redirect exact from="/overview" to="/overview/list" /> 22 <Route path="/overview/list" component={ NodeList } /> 23 <Route path="/overview/map" component={ ClusterViz } /> 24 </Switch> 25 </ClusterOverview> 26 </Route> 27 ); 28 }