(props.uuid)(state.resources);
+ return resource || { linkClass: '' };
+ })(renderLinkClass);
+
+const renderLinkTail = (dispatch: Dispatch, item: { uuid: string, tailUuid: string, tailKind: string }) => {
+ const currentLabel = resourceLabel(item.tailKind);
+ const isUnknow = currentLabel === "Unknown";
+ return (
+ { !isUnknow ? (
+ renderLink(dispatch, item.tailUuid, currentLabel)
+ ) : (
+
+ {item.tailUuid}
+
+ )}
+
);
+};
+
+const renderLink = (dispatch: Dispatch, uuid: string, label: string) =>
+ dispatch(navigateTo(uuid))}>
+ {label}: {uuid}
+ ;
+
+export const ResourceLinkTail = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const resource = getResource(props.uuid)(state.resources);
+ return {
+ item: resource || { uuid: '', tailUuid: '', tailKind: ResourceKind.NONE }
+ };
+ })((props: { item: any } & DispatchProp) =>
+ renderLinkTail(props.dispatch, props.item));
+
+const renderLinkHead = (dispatch: Dispatch, item: { uuid: string, headUuid: string, headKind: ResourceKind }) =>
+ renderLink(dispatch, item.headUuid, resourceLabel(item.headKind));
+
+export const ResourceLinkHead = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const resource = getResource(props.uuid)(state.resources);
+ return {
+ item: resource || { uuid: '', headUuid: '', headKind: ResourceKind.NONE }
+ };
+ })((props: { item: any } & DispatchProp) =>
+ renderLinkHead(props.dispatch, props.item));
+
+export const ResourceLinkUuid = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const resource = getResource(props.uuid)(state.resources);
+ return resource || { uuid: '' };
+ })(renderUuid);
+
+// Process Resources
const resourceRunProcess = (dispatch: Dispatch, uuid: string) => {
return (