diff --git a/src/app/RecordingMetadata/RecordingLabelFields.tsx b/src/app/RecordingMetadata/RecordingLabelFields.tsx index 6a4871e0d..9fb62bb61 100644 --- a/src/app/RecordingMetadata/RecordingLabelFields.tsx +++ b/src/app/RecordingMetadata/RecordingLabelFields.tsx @@ -17,7 +17,18 @@ import { LoadingView } from '@app/Shared/Components/LoadingView'; import { KeyValue, keyValueToString } from '@app/Shared/Services/api.types'; import { useSubscriptions } from '@app/utils/hooks/useSubscriptions'; import { portalRoot } from '@app/utils/utils'; -import { Button, Label, LabelGroup, List, ListItem, Popover, Text, ValidatedOptions } from '@patternfly/react-core'; +import { + ActionList, + ActionListItem, + Button, + Label, + LabelGroup, + List, + ListItem, + Popover, + Text, + ValidatedOptions, +} from '@patternfly/react-core'; import { ExclamationCircleIcon, FileIcon, UploadIcon } from '@patternfly/react-icons'; import * as React from 'react'; import { useTranslation } from 'react-i18next'; @@ -116,48 +127,51 @@ export const RecordingLabelFields: React.FC = ({ <> {isUploadable && ( <> - } - bodyContent={ - <> - - {t('RecordingLabelFields.INVALID_UPLOADS', { count: invalidUploads.length })} - - - {invalidUploads.map((uploadName) => ( - }> - {uploadName} - - ))} - - - } - > - - - + + + } + bodyContent={ + <> + + {t('RecordingLabelFields.INVALID_UPLOADS', { count: invalidUploads.length })} + + + {invalidUploads.map((uploadName) => ( + }> + {uploadName} + + ))} + + + } + > + + + + + )} => { .then(JSON.parse) .then((obj) => { const labels: KeyValue[] = []; - const labelObj = obj['labels']; + const labelObj: KeyValue[] = obj['labels']; if (labelObj) { - Object.keys(labelObj).forEach((key) => { + Object.values(labelObj).forEach((keyValue) => { labels.push({ - key: key, - value: labelObj[key], + key: keyValue.key, + value: keyValue.value, }); }); return labels;