mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
consolidate name & display name fields, closes #115
This commit is contained in:
@@ -11,8 +11,8 @@ function buildOptions(networks: TNetwork[]) {
|
||||
return networks.map(net => {
|
||||
const label = net.display_name;
|
||||
const options = net.locations.map(loc => ({
|
||||
label: loc.display_name,
|
||||
value: loc.name,
|
||||
label: loc.name,
|
||||
value: loc._id,
|
||||
group: net.display_name,
|
||||
}));
|
||||
return { label, options };
|
||||
|
@@ -45,7 +45,7 @@ export const Results: React.FC = () => {
|
||||
<Result
|
||||
index={i}
|
||||
device={device}
|
||||
key={device.name}
|
||||
key={device._id}
|
||||
queryLocation={loc.value}
|
||||
queryVrf={queryVrf.value}
|
||||
queryType={queryType.value}
|
||||
|
@@ -66,7 +66,7 @@ const _Result: React.ForwardRefRenderFunction<HTMLDivElement, TResult> = (props:
|
||||
]);
|
||||
|
||||
if (typeof data !== 'undefined') {
|
||||
responses.merge({ [device.name]: data });
|
||||
responses.merge({ [device._id]: data });
|
||||
}
|
||||
|
||||
const cacheLabel = useStrf(web.text.cache_icon, { time: data?.timestamp }, [data?.timestamp]);
|
||||
@@ -148,8 +148,8 @@ const _Result: React.ForwardRefRenderFunction<HTMLDivElement, TResult> = (props:
|
||||
|
||||
return (
|
||||
<AnimatedAccordionItem
|
||||
id={device.name}
|
||||
ref={ref}
|
||||
id={device._id}
|
||||
isDisabled={isLoading}
|
||||
exit={{ opacity: 0, y: 300 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
@@ -169,12 +169,12 @@ const _Result: React.ForwardRefRenderFunction<HTMLDivElement, TResult> = (props:
|
||||
errorMsg={errorMsg}
|
||||
errorLevel={errorLevel}
|
||||
runtime={data?.runtime ?? 0}
|
||||
title={device.display_name}
|
||||
title={device.name}
|
||||
/>
|
||||
</AccordionButton>
|
||||
<HStack py={2} spacing={1}>
|
||||
{isStructuredOutput(data) && data.level === 'success' && tableComponent && (
|
||||
<Path device={device.name} />
|
||||
<Path device={device._id} />
|
||||
)}
|
||||
<CopyButton copyValue={copyValue} isDisabled={isLoading} />
|
||||
<RequeryButton requery={refetch} isDisabled={isLoading} />
|
||||
|
Reference in New Issue
Block a user