Skip to content

Commit

Permalink
Merge pull request #17600 from jeclrsg/hpcc-29953-files-icon-missing
Browse files Browse the repository at this point in the history
HPCC-29953 ECL Watch v9 fix file icon missing on Files list page
  • Loading branch information
GordonSmith authored Jul 19, 2023
2 parents 96dcac7 + 1f87784 commit 09a6603
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions esp/src/src-react/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { CommandBar, ContextualMenuItemType, ICommandBarItemProps, Icon, Link } from "@fluentui/react";
import { scopedLogger } from "@hpcc-js/util";
import * as WsDfu from "src/WsDfu";
import { CreateDFUQueryStore } from "src/ESPLogicalFile";
import { CreateDFUQueryStore, Get } from "src/ESPLogicalFile";
import { formatCost } from "src/Session";
import * as Utility from "src/Utility";
import { QuerySortItem } from "src/store/Store";
Expand Down Expand Up @@ -161,12 +161,13 @@ export const Files: React.FunctionComponent<FilesProps> = ({
Name: {
label: nlsHPCC.LogicalName,
formatter: React.useCallback(function (name, row) {
const file = Get(row.NodeGroup, name, row);
if (row.__hpcc_isDir) {
return name;
}
const url = "#/files/" + (row.NodeGroup ? row.NodeGroup + "/" : "") + name;
return <>
<Icon iconName={row.getStateIcon ? row.getStateIcon() : ""} />
<Icon iconName={file.getStateIcon ? file.getStateIcon() : ""} />
&nbsp;
<Link href={url}>{name}</Link>
</>;
Expand Down

0 comments on commit 09a6603

Please sign in to comment.