go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/frontend/ui/src/views/clusters/clusters_page.tsx (about)

     1  // Copyright 2022 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  import { useParams } from 'react-router-dom';
    16  
    17  import Container from '@mui/material/Container';
    18  import Grid from '@mui/material/Grid';
    19  
    20  import ClustersTable from '@/components/clusters_table/clusters_table';
    21  import HelpTooltip from '@/components/help_tooltip/help_tooltip';
    22  import PageHeading from '@/components/headings/page_heading/page_heading';
    23  
    24  const clustersDescription = 'Clusters are groups of related test failures. LUCI Analysis\'s clusters ' +
    25    'comprise clusters identified by algorithms (based on test name or failure reason) ' +
    26    'and clusters defined by a failure association rule (where the cluster contains all failures ' +
    27    'associated with a specific bug).';
    28  
    29  const ClustersPage = () => {
    30    const { project } = useParams();
    31    return (
    32      <Container maxWidth={false}>
    33        <Grid container>
    34          <Grid item xs={8}>
    35            <PageHeading>
    36              Clusters in project {project}<HelpTooltip text={clustersDescription} />
    37            </PageHeading>
    38          </Grid>
    39        </Grid>
    40        {(project) && (
    41          <ClustersTable project={project} />
    42        )}
    43      </Container>
    44    );
    45  };
    46  
    47  export default ClustersPage;
    48