@@ -284,13 +285,13 @@ const renderLinkTail = (dispatch: Dispatch, item: { uuid: string, tailUuid: stri
const currentLabel = resourceLabel(item.tailKind);
const isUnknow = currentLabel === "Unknown";
return (
- { !isUnknow ? (
- renderLink(dispatch, item.tailUuid, currentLabel)
- ) : (
+ {!isUnknow ? (
+ renderLink(dispatch, item.tailUuid, currentLabel)
+ ) : (
{item.tailUuid}
- )}
+ )}
);
};
@@ -400,7 +401,7 @@ export const ResourceFileSize = connect(
})((props: { fileSize?: number }) => renderFileSize(props.fileSize));
const renderOwner = (owner: string) =>
-
+
{owner}
;
@@ -410,6 +411,14 @@ export const ResourceOwner = connect(
return { owner: resource ? resource.ownerUuid : '' };
})((props: { owner: string }) => renderOwner(props.owner));
+export const ResourceOwnerName = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const resource = getResource(props.uuid)(state.resources);
+ const ownerNameState = state.ownerName;
+ const ownerName = ownerNameState.find(it => it.uuid === resource!.ownerUuid);
+ return { owner: ownerName ? ownerName!.name : resource!.ownerUuid };
+ })((props: { owner: string }) => renderOwner(props.owner));
+
const renderType = (type: string) =>
{resourceLabel(type)}