Skip to content

Commit 00c0312

Browse files
committed
Fix empty udn name
1 parent 78adca2 commit 00c0312

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

pkg/handler/k8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (h *Handlers) GetUDNIdss(ctx context.Context) func(w http.ResponseWriter, r
5656
}
5757
for _, udn := range udns {
5858
md := udn.Object["metadata"].(map[string]interface{})
59-
values = append(values, fmt.Sprintf("%s.%s", md["namespace"], md["name"]))
59+
values = append(values, fmt.Sprintf("%s/%s", md["namespace"], md["name"]))
6060
}
6161
writeJSON(w, http.StatusOK, utils.NonEmpty(utils.Dedup(values)))
6262
}

web/src/components/drawer/record/record-field.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,18 @@ export const RecordField: React.FC<RecordFieldProps> = ({
218218
const nthContainer = (children: (JSX.Element | undefined)[], asChild = true, childIcon = true, forcedSize?: Size) => {
219219
return (
220220
<Flex className={`record-field-flex-container ${forcedSize || size}`} flex={{ default: 'flex_1' }}>
221-
{children.length > 0
222-
? children.map((c, i) => {
223-
const child = c ? c : emptyText();
224-
if (i > 0 && asChild && childIcon) {
225-
const arrow = <span className="child-arrow">{'↪'}</span>;
226-
return sideBySideContainer(arrow, child, 'flexNone', 'flex_1', 'nowrap');
227-
}
228-
return child;
229-
})
230-
: <Text className="text-muted record-field-value">{t('n/a')}</Text>}
221+
{children.length > 0 ? (
222+
children.map((c, i) => {
223+
const child = c ? c : emptyText();
224+
if (i > 0 && asChild && childIcon) {
225+
const arrow = <span className="child-arrow">{'↪'}</span>;
226+
return sideBySideContainer(arrow, child, 'flexNone', 'flex_1', 'nowrap');
227+
}
228+
return child;
229+
})
230+
) : (
231+
<Text className="text-muted record-field-value">{t('n/a')}</Text>
232+
)}
231233
</Flex>
232234
);
233235
};

0 commit comments

Comments
 (0)