Skip to content

Commit

Permalink
HPCC-31167 ECL Watch v9 fix deleting files from XRef
Browse files Browse the repository at this point in the history
Fix issue on Found, Lost or Orphan File lists preventing deletion

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Jan 29, 2024
1 parent f8d4b22 commit f7f784e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions esp/src/src-react/components/XrefFoundFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const XrefFoundFiles: React.FunctionComponent<XrefFoundFilesProps> = ({
const columns = React.useMemo((): FluentColumns => {
return {
check: { width: 27, selectorType: "checkbox" },
name: { width: 180, label: nlsHPCC.Name },
Name: { width: 360, label: nlsHPCC.Name },
modified: { width: 80, label: nlsHPCC.Modified },
parts: { width: 80, label: nlsHPCC.Parts },
size: { width: 80, label: nlsHPCC.Size }
Expand All @@ -57,7 +57,7 @@ export const XrefFoundFiles: React.FunctionComponent<XrefFoundFilesProps> = ({
if (rows.length) {
setData(rows.map((item, idx) => {
return {
name: item.Name,
Name: item.Name,
modified: item.Modified,
parts: item.Parts,
size: item.Size
Expand All @@ -72,7 +72,7 @@ export const XrefFoundFiles: React.FunctionComponent<XrefFoundFilesProps> = ({
const [AttachConfirm, setShowAttachConfirm] = useConfirm({
title: nlsHPCC.Attach,
message: nlsHPCC.AddTheseFilesToDali,
items: selection.map(file => file.name),
items: selection.map(file => file.Name),
onSubmit: React.useCallback(() => {
WsDFUXref.DFUXRefArrayAction(selection, nlsHPCC.Attach, name, "Found")
.then(response => {
Expand All @@ -86,7 +86,7 @@ export const XrefFoundFiles: React.FunctionComponent<XrefFoundFilesProps> = ({
const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({
title: nlsHPCC.Delete,
message: nlsHPCC.DeleteSelectedFiles,
items: selection.map(file => file.name),
items: selection.map(file => file.Name),
onSubmit: React.useCallback(() => {
WsDFUXref.DFUXRefArrayAction(selection, nlsHPCC.Delete, name, "Found")
.then(response => {
Expand Down Expand Up @@ -127,7 +127,7 @@ export const XrefFoundFiles: React.FunctionComponent<XrefFoundFilesProps> = ({
<>
<FluentGrid
data={data}
primaryID={"name"}
primaryID={"Name"}
sort={{ attribute: "modified", descending: false }}
columns={columns}
setSelection={setSelection}
Expand Down
8 changes: 4 additions & 4 deletions esp/src/src-react/components/XrefLostFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const XrefLostFiles: React.FunctionComponent<XrefLostFilesProps> = ({
const columns = React.useMemo((): FluentColumns => {
return {
check: { width: 27, selectorType: "checkbox" },
name: { width: 180, label: nlsHPCC.Name },
Name: { width: 360, label: nlsHPCC.Name },
modified: { width: 80, label: nlsHPCC.Modified },
numParts: { width: 80, label: nlsHPCC.TotalParts },
size: { width: 80, label: nlsHPCC.Size },
Expand All @@ -60,7 +60,7 @@ export const XrefLostFiles: React.FunctionComponent<XrefLostFilesProps> = ({
if (rows.length) {
setData(rows.map((item, idx) => {
return {
name: item.Name,
Name: item.Name,
modified: item.Modified,
numParts: item.Numparts,
size: item.Size,
Expand All @@ -78,7 +78,7 @@ export const XrefLostFiles: React.FunctionComponent<XrefLostFilesProps> = ({
const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({
title: nlsHPCC.Delete,
message: nlsHPCC.DeleteSelectedFiles,
items: selection.map(file => file.name),
items: selection.map(file => file.Name),
onSubmit: React.useCallback(() => {
WsDFUXref.DFUXRefArrayAction(selection, "DeleteLogical", name, "Lost")
.then(response => {
Expand Down Expand Up @@ -115,7 +115,7 @@ export const XrefLostFiles: React.FunctionComponent<XrefLostFilesProps> = ({
<>
<FluentGrid
data={data}
primaryID={"name"}
primaryID={"Name"}
sort={{ attribute: "modified", descending: false }}
columns={columns}
setSelection={setSelection}
Expand Down
8 changes: 4 additions & 4 deletions esp/src/src-react/components/XrefOrphanFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const XrefOrphanFiles: React.FunctionComponent<XrefOrphanFilesProps> = ({
const columns = React.useMemo((): FluentColumns => {
return {
check: { width: 27, selectorType: "checkbox" },
name: { width: 180, label: nlsHPCC.Name },
Name: { width: 360, label: nlsHPCC.Name },
modified: { width: 80, label: nlsHPCC.Modified },
partsFound: { width: 80, label: nlsHPCC.PartsFound },
totalParts: { width: 80, label: nlsHPCC.TotalParts },
Expand All @@ -57,7 +57,7 @@ export const XrefOrphanFiles: React.FunctionComponent<XrefOrphanFilesProps> = ({
if (rows.length) {
setData(rows.map((item, idx) => {
return {
name: item.Name,
Name: item.Name,
modified: item.Modified,
partsFound: item.PartsFound,
totalParts: item.TotalParts,
Expand All @@ -77,7 +77,7 @@ export const XrefOrphanFiles: React.FunctionComponent<XrefOrphanFilesProps> = ({
const [DeleteConfirm, setShowDeleteConfirm] = useConfirm({
title: nlsHPCC.Delete,
message: nlsHPCC.DeleteSelectedFiles,
items: selection.map(file => file.name),
items: selection.map(file => file.Name),
onSubmit: React.useCallback(() => {
WsDFUXref.DFUXRefArrayAction(selection, nlsHPCC.Delete, name, "Orphan")
.then(response => {
Expand Down Expand Up @@ -110,7 +110,7 @@ export const XrefOrphanFiles: React.FunctionComponent<XrefOrphanFilesProps> = ({
<>
<FluentGrid
data={data}
primaryID={"name"}
primaryID={"Name"}
sort={{ attribute: "modified", descending: false }}
columns={columns}
setSelection={setSelection}
Expand Down

0 comments on commit f7f784e

Please sign in to comment.