Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ a.plain-link {
}

.error-boundary {
white-space: pre-wrap;
color: var(--error-color);
}

.error-color {
color: var(--error-color);
color: var(--error-color);
}

/* OverlayScrollbars styling */
Expand Down
6 changes: 2 additions & 4 deletions frontend/app/modals/conntypeahead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ function createS3SuggestionItems(
// behavior
return s3Profiles.map((profileName) => {
const connStatus = connStatusMap.get(profileName);
const connColorNum = computeConnColorNum(connStatus);
const item: SuggestionConnectionItem = {
status: "connected",
icon: "arrow-right-arrow-left",
iconColor:
connStatus?.status == "connected" ? `var(--conn-icon-color-${connColorNum})` : "var(--grey-text-color)",
icon: "database",
iconColor: "var(--accent-color)",
value: profileName,
label: profileName,
current: profileName == connection,
Expand Down
10 changes: 9 additions & 1 deletion frontend/app/view/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,11 @@ export class PreviewModel implements ViewModel {
const fileName = fileInfo?.name;
const connErr = getFn(this.connectionError);
const editMode = getFn(this.editMode);
const genErr = getFn(this.errorMsgAtom);

if (!fileInfo) {
return { errorStr: `Load Error: ${genErr?.text}` };
}
if (connErr != "") {
return { errorStr: `Connection Error: ${connErr}` };
}
Expand Down Expand Up @@ -1072,10 +1076,14 @@ function PreviewView({
const filePath = useAtomValue(model.metaFilePath);
const [errorMsg, setErrorMsg] = useAtom(model.errorMsgAtom);
const connection = useAtomValue(model.connectionImmediate);
const fileInfo = useAtomValue(model.statFile);

useEffect(() => {
if (!fileInfo) {
return;
}
setErrorMsg(null);
}, [connection, filePath]);
}, [connection, filePath, fileInfo]);

if (connStatus?.status != "connected") {
return null;
Expand Down
Loading