Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 94fc7fb6 authored by Philippe Virouleau's avatar Philippe Virouleau
Browse files

Remove unused code

parent 4c9e903d
Branches
No related tags found
No related merge requests found
...@@ -3,12 +3,12 @@ import Tooltip from "@mui/material/Tooltip"; ...@@ -3,12 +3,12 @@ import Tooltip from "@mui/material/Tooltip";
function colorForType(type: string) { function colorForType(type: string) {
switch(type) { switch(type) {
case 'accel': case 'accel':
return 'success'; return 'success';
case 'network': case 'network':
return 'secondary'; return 'secondary';
default: default:
return undefined; return undefined;
} }
} }
......
import { Architecture, ClusterName } from '@/lib/config'; import { Architecture, ClusterName } from '@/lib/config';
import { ChangeEvent, Dispatch, SetStateAction, useEffect, useMemo, useState } from 'react'; import { ChangeEvent, Dispatch, SetStateAction, useEffect, useMemo, useState } from 'react';
import { ClusterById, ClustersBySite, LocalAccel, LocalCluster, LocalProc, MinClusterDesc, useRefapi } from '@/hooks/useRefApi'; import { ClusterById, ClustersBySite, LocalAccel, LocalCluster, MinClusterDesc, useRefapi } from '@/hooks/useRefApi';
import { GenState, TestClustersProps, getEnabledElements } from '@/lib/generation'; import { GenState, TestClustersProps, getEnabledElements } from '@/lib/generation';
import Accordion from '@mui/material/Accordion'; import Accordion from '@mui/material/Accordion';
...@@ -19,7 +19,6 @@ import ListItemIcon from '@mui/material/ListItemIcon'; ...@@ -19,7 +19,6 @@ import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText'; import ListItemText from '@mui/material/ListItemText';
import ListSubheader from '@mui/material/ListSubheader'; import ListSubheader from '@mui/material/ListSubheader';
import LoadingRefApi from './LoadingRefApi'; import LoadingRefApi from './LoadingRefApi';
import NvidiaIcon from '@/icons/NvidiaIcon';
import { ObjectMap } from '@/lib/refrepo'; import { ObjectMap } from '@/lib/refrepo';
import Stack from '@mui/material/Stack'; import Stack from '@mui/material/Stack';
import Tooltip from '@mui/material/Tooltip'; import Tooltip from '@mui/material/Tooltip';
...@@ -46,13 +45,6 @@ function AcceleratorChip({ accel } : { accel: LocalAccel }) { ...@@ -46,13 +45,6 @@ function AcceleratorChip({ accel } : { accel: LocalAccel }) {
const { vendor, model, type } = accel; const { vendor, model, type } = accel;
if (vendor === 'Nvidia') { if (vendor === 'Nvidia') {
return <FeatureChip text="NVidia" tooltip={model} type="accel" />; return <FeatureChip text="NVidia" tooltip={model} type="accel" />;
return (
<Tooltip title={model} placement="bottom">
<NvidiaIcon
sx={{ fontSize: 24 }}
/>
</Tooltip>
);
} else if (accel.vendor === 'AMD') { } else if (accel.vendor === 'AMD') {
return <FeatureChip text="AMD" tooltip={model} type="accel" />; return <FeatureChip text="AMD" tooltip={model} type="accel" />;
} else { } else {
...@@ -60,20 +52,15 @@ function AcceleratorChip({ accel } : { accel: LocalAccel }) { ...@@ -60,20 +52,15 @@ function AcceleratorChip({ accel } : { accel: LocalAccel }) {
} }
} }
function ProcChip({ proc }: { proc: LocalProc }) {
const { model, vendor } = proc;
const desc = `${vendor} - ${model}`;
return <FeatureChip type="proc" text={vendor} tooltip={model} />;
}
function FeaturesForCluster({ cluster } : { function FeaturesForCluster({ cluster } : {
cluster: LocalCluster, cluster: LocalCluster,
}) { }) {
const { model: procModel, vendor: procVendor } = cluster.proc;
return ( return (
<Stack direction="column"> <Stack direction="column">
<span>{cluster.name}</span> <span>{cluster.name}</span>
<Stack direction="row" spacing={1}> <Stack direction="row" spacing={1}>
<ProcChip proc={cluster.proc} /> <FeatureChip type="proc" text={procVendor} tooltip={procModel} />
{cluster.accel.map((a, idx) => <AcceleratorChip accel={a} key={idx} />)} {cluster.accel.map((a, idx) => <AcceleratorChip accel={a} key={idx} />)}
{cluster.network.map(n => ( {cluster.network.map(n => (
<FeatureChip text={n} key={n} type="network" /> <FeatureChip text={n} key={n} type="network" />
...@@ -265,9 +252,9 @@ function Legend() { ...@@ -265,9 +252,9 @@ function Legend() {
return ( return (
<Stack direction="row" spacing={1} sx={{ mb: 2 }}> <Stack direction="row" spacing={1} sx={{ mb: 2 }}>
<div>Legend:</div> <div>Legend:</div>
<FeatureChip type="proc" text="Processor" /> <FeatureChip type="proc" text="Processor" />
<FeatureChip type="accel" text="Accelerator" /> <FeatureChip type="accel" text="Accelerator" />
<FeatureChip type="network" text="Network" /> <FeatureChip type="network" text="Network" />
</Stack> </Stack>
); );
} }
......
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import { forwardRef } from 'react';
const NvidiaIcon = forwardRef<SVGSVGElement, SvgIconProps>(function RawNvidiaIcon(props: SvgIconProps, ref) {
return (
<SvgIcon {...props } style={{ verticalAlign: 'middle' }} ref={ref}>
<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
<circle cx="512.25" cy="512.25" r="512" style={{ fill:'#76b900' }}/>
<path d="M430.58 436.9v-33.66c3.26-.23 6.56-.41 9.92-.51 92-2.89 152.41 79.09 152.41 79.09S527.7 572.4 457.78 572.4a84.86 84.86 0 0 1-27.2-4.35V466c35.83 4.33 43 20.15 64.57 56.06l47.91-40.4s-35-45.87-93.91-45.87a170.07 170.07 0 0 0-18.56 1.1m0-111.17V376c3.3-.27 6.61-.47 9.92-.59 128-4.31 211.37 105 211.37 105s-95.79 116.42-195.57 116.42a146.92 146.92 0 0 1-25.74-2.27v31.08A169.64 169.64 0 0 0 452 627c92.85 0 160-47.42 225-103.54 10.77 8.64 54.9 29.63 64 38.83-61.83 51.76-205.91 93.48-287.59 93.48-7.87 0-15.44-.47-22.86-1.19v43.67h352.93V325.73zm0 242.31v26.52C344.69 579.26 320.85 490 320.85 490s41.24-45.69 109.73-53.08V466h-.14c-35.93-4.31-64 29.25-64 29.25s15.74 56.53 64.16 72.8M278 486.11s50.9-75.11 152.54-82.87V376C318 385 220.52 480.36 220.52 480.36S275.73 640 430.58 654.6v-29C316.95 611.34 278 486.11 278 486.11" style={{ fill:' #fff' }} />
</svg>
</SvgIcon>
);
});
export default NvidiaIcon;
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><title>AMD icon</title><path d="M18.324 9.137l1.559 1.56h2.556v2.557L24 14.814V9.137zM2 9.52l-2 4.96h1.309l.37-.982H3.9l.408.982h1.338L3.432 9.52zm4.209 0v4.955h1.238v-3.092l1.338 1.562h.188l1.338-1.556v3.091h1.238V9.52H10.47l-1.592 1.845L7.287 9.52zm6.283 0v4.96h2.057c1.979 0 2.88-1.046 2.88-2.472 0-1.36-.937-2.488-2.747-2.488zm1.237.91h.792c1.17 0 1.63.711 1.63 1.57 0 .728-.372 1.572-1.616 1.572h-.806zm-10.985.273l.791 1.932H2.008zm17.137.307l-1.604 1.603v2.25h2.246l1.604-1.607h-2.246z"/></svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Intel icon</title><path d="M7.07 10.8v3.877H5.837V9.804l2.547.002c1.08 0 1.449.764 1.449 1.456v3.415h-1.23v-3.408c0-.291-.149-.469-.513-.469H7.07zm8.389-.058c-.422 0-.748.216-.885.51-.077.167-.117.347-.118.53h1.898c-.023-.53-.263-1.04-.895-1.04zm-1.003 1.88c0 .629.393 1.095 1.094 1.095.544 0 .815-.15 1.131-.466l.762.729c-.487.481-1.001.773-1.902.773-1.18 0-2.31-.643-2.31-2.52 0-1.605.985-2.512 2.281-2.512 1.315 0 2.075 1.063 2.075 2.455v.443h-3.131v.003zm-2.268 2.047c-1.004 0-1.432-.699-1.432-1.391v-4.8h1.232v1.327h.928v.996h-.929v2.4c0 .284.135.44.429.44h.5v1.027h-.728zM4.739 9.131H3.497v-1.18h1.242v1.18zm.003 5.595c-.93-.088-1.246-.651-1.246-1.305V9.806H4.74v4.924l.002-.004zm14.805-.104c-.929-.09-1.243-.652-1.243-1.303V7.784h1.243v6.84-.002zm4.347-6.038C22.769 3.091 12.102 2.743 5.23 6.927v.462c6.865-3.528 16.604-3.508 17.491 1.55.296 1.675-.646 3.418-2.329 4.422v1.311c2.025-.742 4.105-3.147 3.502-6.088zm-12.496 9.61c-4.742.438-9.686-.251-10.377-3.957-.337-1.827.497-3.765 1.598-4.967v-.643C.632 10.37-.446 12.577.175 15.184c.792 3.345 5.035 5.239 11.509 4.609 2.563-.249 5.916-1.074 8.247-2.354v-1.816c-2.116 1.261-5.617 2.302-8.533 2.571zM20.984 8.15c0-.06-.037-.079-.116-.079h-.077v.17l.077.002c.079 0 .116-.025.116-.084V8.15zm.12.423h-.091c-.009 0-.018-.004-.021-.012l-.125-.213c-.003-.005-.013-.01-.019-.01h-.056v.212c0 .012-.009.025-.023.025h-.082c-.011 0-.021-.014-.021-.025v-.533c0-.029.012-.045.038-.048.05-.005.101-.006.152-.006.152 0 .246.046.246.188v.01c0 .09-.046.135-.114.158l.13.219c0 .006.005.012.005.018.002.007-.004.017-.019.017v.002-.002zm-.218-.709c-.226 0-.408.184-.408.41.001.227.186.409.411.408.225 0 .406-.182.409-.406-.002-.226-.185-.411-.412-.412zm0 .907c-.273 0-.495-.222-.495-.495s.222-.495.494-.495h.001c.271 0 .495.224.495.495 0 .274-.224.495-.495.495z"/></svg>
\ No newline at end of file
<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
<circle cx="512.25" cy="512.25" r="512" style="fill:#76b900"/>
<path d="M430.58 436.9v-33.66c3.26-.23 6.56-.41 9.92-.51 92-2.89 152.41 79.09 152.41 79.09S527.7 572.4 457.78 572.4a84.86 84.86 0 0 1-27.2-4.35V466c35.83 4.33 43 20.15 64.57 56.06l47.91-40.4s-35-45.87-93.91-45.87a170.07 170.07 0 0 0-18.56 1.1m0-111.17V376c3.3-.27 6.61-.47 9.92-.59 128-4.31 211.37 105 211.37 105s-95.79 116.42-195.57 116.42a146.92 146.92 0 0 1-25.74-2.27v31.08A169.64 169.64 0 0 0 452 627c92.85 0 160-47.42 225-103.54 10.77 8.64 54.9 29.63 64 38.83-61.83 51.76-205.91 93.48-287.59 93.48-7.87 0-15.44-.47-22.86-1.19v43.67h352.93V325.73zm0 242.31v26.52C344.69 579.26 320.85 490 320.85 490s41.24-45.69 109.73-53.08V466h-.14c-35.93-4.31-64 29.25-64 29.25s15.74 56.53 64.16 72.8M278 486.11s50.9-75.11 152.54-82.87V376C318 385 220.52 480.36 220.52 480.36S275.73 640 430.58 654.6v-29C316.95 611.34 278 486.11 278 486.11" style="fill:#fff"/>
</svg>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment