Skip to content
Snippets Groups Projects
Select Git revision
  • 71ed9b41b1cea43c56c71a4c1d1635f4b22813d3
  • master default protected
  • L2SS-1914-fix_job_dispatch
  • TMSS-3170
  • TMSS-3167
  • TMSS-3161
  • TMSS-3158-Front-End-Only-Allow-Changing-Again
  • TMSS-3133
  • TMSS-3319-Fix-Templates
  • test-fix-deploy
  • TMSS-3134
  • TMSS-2872
  • defer-state
  • add-custom-monitoring-points
  • TMSS-3101-Front-End-Only
  • TMSS-984-choices
  • SDC-1400-Front-End-Only
  • TMSS-3079-PII
  • TMSS-2936
  • check-for-max-244-subbands
  • TMSS-2927---Front-End-Only-PXII
  • Before-Remove-TMSS
  • LOFAR-Release-4_4_318 protected
  • LOFAR-Release-4_4_317 protected
  • LOFAR-Release-4_4_316 protected
  • LOFAR-Release-4_4_315 protected
  • LOFAR-Release-4_4_314 protected
  • LOFAR-Release-4_4_313 protected
  • LOFAR-Release-4_4_312 protected
  • LOFAR-Release-4_4_311 protected
  • LOFAR-Release-4_4_310 protected
  • LOFAR-Release-4_4_309 protected
  • LOFAR-Release-4_4_308 protected
  • LOFAR-Release-4_4_307 protected
  • LOFAR-Release-4_4_306 protected
  • LOFAR-Release-4_4_304 protected
  • LOFAR-Release-4_4_303 protected
  • LOFAR-Release-4_4_302 protected
  • LOFAR-Release-4_4_301 protected
  • LOFAR-Release-4_4_300 protected
  • LOFAR-Release-4_4_299 protected
41 results

test_utils.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Main.js 2.66 KiB
    import React, {useState, useEffect }  from 'react';
    import '../App.css';
    
    import { GetBaseName } from '../utils/config'
    
    import { NavigationBar } from './NavigationBar';
    import ArchivesPage from '../routes/archives/ArchivesPage';
    import DataSetsPage from '../routes/datasets/DataSetsPage';
    import TelescopesPage from '../routes/telescopes/TelescopesPage';
    import ArchiveDetails from '../routes/details/ArchiveDetails';
    import QueryPage from '../routes/query/QueryPage';
    
    import { About } from './About';
    
    import {
        BrowserRouter as Router,
        Switch,
        Route,
        useParams
    } from "react-router-dom";
    
    
    // This site has multiple pages, all of which are rendered
    // dynamically in the browser (not server rendered).
    //
    // Although the page does not ever refresh, notice how
    // React Router keeps the URL up to date as you navigate
    // through the site. This preserves the browser history,
    // making sure things like the back button and bookmarks
    // work properly.
    
    function Main () {
    
        let basename = GetBaseName()
        if (basename === undefined) {
            return null
        }
    
        return (
            // basename defines which path is is added before the routing urls.
            <Router basename={basename}>
                <div>
                    <NavigationBar/>
    
                    {/*
                     A <Switch> looks through all its children <Route>
                     elements and renders the first one whose path
                     matches the current URL. Use a <Switch> any time
                     you have multiple routes, but you want only one
                     of them to render at a time
                     */}
    
                    <Switch>
                        <Route exact path="/">
                            <QueryPage />
                        </Route>
    
                        <Route path="/telescopes">
                            <TelescopesPage />
                        </Route>
    
                        <Route path="/archives">
                            <ArchivesPage />
                        </Route>
    
                        <Route path="/datasets">
                            <DataSetsPage />
                        </Route>
    
                        <Route path="/query">
                            <QueryPage />
                        </Route>
    
                        <Route path="/about">
                            <About />
                        </Route>
    
                        <Route path="/archive/:uri" children={<DetailsForward />} />
                    </Switch>
                </div>
    
                <footer><small>ASTRON - version 0.6.4 - 27 mar 2020</small></footer>
            </Router>
        );
    }
    
    // reroute to dataproduct details
    function DetailsForward() {
        let { uri } = useParams();
    
        return (
            <ArchiveDetails uri={uri}/>
        );
    }
    
    export default Main;