fix: API 클라이언트 설정 원복 및 빈 테이블명 API 호출 방지

- API 클라이언트를 원래 포트 8080으로 되돌림
- loadEntityDisplayConfig에서 sourceTable/joinTable이 비어있을 때 API 호출 방지
- 불필요한 백엔드 서버 중지
This commit is contained in:
kjs 2025-09-23 17:06:23 +09:00
parent f01be49f6a
commit ad7f350f00
3 changed files with 10 additions and 2 deletions

View File

@ -1013,6 +1013,8 @@ export const DetailSettingsPanel: React.FC<DetailSettingsPanelProps> = ({
currentTable, currentTable,
columns: currentTable?.columns, columns: currentTable?.columns,
columnsLength: currentTable?.columns?.length, columnsLength: currentTable?.columns?.length,
sampleColumn: currentTable?.columns?.[0],
deptCodeColumn: currentTable?.columns?.find((col) => col.columnName === "dept_code"),
}); });
return currentTable?.columns || []; return currentTable?.columns || [];
})()} })()}

View File

@ -6,12 +6,12 @@ const getApiBaseUrl = (): string => {
const currentHost = window.location.hostname; const currentHost = window.location.hostname;
const currentPort = window.location.port; const currentPort = window.location.port;
// 로컬 개발환경: localhost:9771 또는 localhost:3000 → localhost:8080 // 로컬 개발환경: localhost:9771 또는 localhost:3000 → localhost:3001
if ( if (
(currentHost === "localhost" || currentHost === "127.0.0.1") && (currentHost === "localhost" || currentHost === "127.0.0.1") &&
(currentPort === "9771" || currentPort === "3000") (currentPort === "9771" || currentPort === "3000")
) { ) {
return "http://localhost:8080/api"; return "http://localhost:3001/api";
} }
// 서버 환경에서 localhost:5555 → 39.117.244.52:8080 // 서버 환경에서 localhost:5555 → 39.117.244.52:8080

View File

@ -370,6 +370,12 @@ export const TableListConfigPanel: React.FC<TableListConfigPanelProps> = ({
// 이미 로드된 경우 스킵 // 이미 로드된 경우 스킵
if (entityDisplayConfigs[configKey]) return; if (entityDisplayConfigs[configKey]) return;
// sourceTable과 joinTable이 모두 있어야 로드
if (!sourceTable || !joinTable) {
console.log("⚠️ sourceTable 또는 joinTable이 비어있어서 로드 스킵:", { sourceTable, joinTable });
return;
}
try { try {
// 기본 테이블과 조인 테이블의 컬럼 정보를 병렬로 로드 // 기본 테이블과 조인 테이블의 컬럼 정보를 병렬로 로드
const [sourceResult, joinResult] = await Promise.all([ const [sourceResult, joinResult] = await Promise.all([