Skip to content

Commit c052227

Browse files
merge changes
1 parent 1dcc84a commit c052227

File tree

3 files changed

+4
-56
lines changed

3 files changed

+4
-56
lines changed

frontend/src/components/Content.tsx

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ import FallBackDialog from './UI/FallBackDialog';
3737
import DeletePopUp from './Popups/DeletePopUp/DeletePopUp';
3838
import GraphEnhancementDialog from './Popups/GraphEnhancementDialog';
3939
import { tokens } from '@neo4j-ndl/base';
40-
import RetryConfirmationDialog from './Popups/RetryConfirmation/Index';
41-
import retry from '../services/retry';
42-
import { showErrorToast, showNormalToast, showSuccessToast } from '../utils/toasts';
4340
import axios from 'axios';
4441
import DatabaseStatusIcon from './UI/DatabaseStatusIcon';
4542
import RetryConfirmationDialog from './Popups/RetryConfirmation/Index';
@@ -595,42 +592,6 @@ const Content: React.FC<ContentProps> = ({
595592
}
596593
};
597594

598-
const retryHandler = async (filename: string, retryoption: string) => {
599-
try {
600-
setRetryLoading(true);
601-
const response = await retry(userCredentials as UserCredentials, filename, retryoption);
602-
setRetryLoading(false);
603-
if (response.data.status === 'Failure') {
604-
throw new Error(response.data.error);
605-
}
606-
const isStartFromBegining = retryoption === RETRY_OPIONS[0] || retryoption===RETRY_OPIONS[1];
607-
setFilesData((prev) => {
608-
return prev.map((f) => {
609-
return f.name === filename
610-
? {
611-
...f,
612-
status: 'Reprocess',
613-
processingProgress: isStartFromBegining ? 0 : f.processingProgress,
614-
NodesCount: isStartFromBegining ? 0 : f.NodesCount,
615-
relationshipCount: isStartFromBegining ? 0 : f.relationshipCount,
616-
}
617-
: f;
618-
});
619-
});
620-
showSuccessToast(response.data.message as string);
621-
retryOnclose();
622-
} catch (error) {
623-
setRetryLoading(false);
624-
if (error instanceof Error) {
625-
setAlertStateForRetry({
626-
showAlert: true,
627-
alertMessage: error.message,
628-
alertType: 'danger',
629-
});
630-
}
631-
}
632-
};
633-
634595
const selectedfileslength = useMemo(
635596
() => childRef.current?.getSelectedRows().length,
636597
[childRef.current?.getSelectedRows()]
@@ -979,4 +940,4 @@ const Content: React.FC<ContentProps> = ({
979940
);
980941
};
981942

982-
export default Content;
943+
export default Content;

frontend/src/components/FileTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import { ThemeWrapperContext } from '../context/ThemeWrapper';
5656
let onlyfortheFirstRender = true;
5757

5858
const FileTable = forwardRef<ChildRef, FileTableProps>((props, ref) => {
59-
const { isExpanded, connectionStatus, setConnectionStatus, onInspect } = props;
59+
const { isExpanded, connectionStatus, setConnectionStatus, onInspect, onRetry } = props;
6060
const { filesData, setFilesData, model, rowSelection, setRowSelection, setSelectedRows, setProcessedCount, queue } =
6161
useFileContext();
6262
const { userCredentials, isReadOnlyUser } = useCredentials();
@@ -946,4 +946,4 @@ const FileTable = forwardRef<ChildRef, FileTableProps>((props, ref) => {
946946
);
947947
});
948948

949-
export default FileTable;
949+
export default FileTable;

frontend/src/components/Popups/ConnectionModal/ConnectionModal.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ export default function ConnectionModal({
8484
JSON.stringify({
8585
uri: usercredential?.uri,
8686
user: usercredential?.userName,
87-
<<<<<<< HEAD
88-
password: usercredential?.password,
89-
=======
9087
password: btoa(usercredential?.password),
91-
>>>>>>> bec4bf517370161c514d6f92eaa2bcfa650e55c8
9288
database: usercredential?.database,
9389
userDbVectorIndex: 384,
9490
})
@@ -211,29 +207,20 @@ export default function ConnectionModal({
211207
if (response?.data?.status !== 'Success') {
212208
throw new Error(response.data.error);
213209
} else {
214-
<<<<<<< HEAD
215-
=======
216210
const isgdsActive = response.data.data.gds_status;
217211
const isReadOnlyUser = !response.data.data.write_access;
218212
setGdsActive(isgdsActive);
219213
setIsReadOnlyUser(isReadOnlyUser);
220-
>>>>>>> bec4bf517370161c514d6f92eaa2bcfa650e55c8
221214
localStorage.setItem(
222215
'neo4j.connection',
223216
JSON.stringify({
224217
uri: connectionURI,
225218
user: username,
226-
<<<<<<< HEAD
227-
password: password,
228-
database: database,
229-
userDbVectorIndex,
230-
=======
231219
password: btoa(password),
232220
database: database,
233221
userDbVectorIndex,
234222
isgdsActive,
235223
isReadOnlyUser,
236-
>>>>>>> bec4bf517370161c514d6f92eaa2bcfa650e55c8
237224
})
238225
);
239226
setUserDbVectorIndex(response.data.data.db_vector_dimension);
@@ -473,4 +460,4 @@ export default function ConnectionModal({
473460
</Dialog>
474461
</>
475462
);
476-
}
463+
}

0 commit comments

Comments
 (0)