Переработано окно эндпоинта, добавлены элементы дебага, добавлена возможность сохранять и загружать конфигурацию эндпоинта, добавлено отображение ошибок при загрузке конфигурации. Исправлены мелкие баги.
This commit is contained in:
@@ -11,6 +11,7 @@ interface SqlEditorProps {
|
||||
onChange: (value: string) => void;
|
||||
databaseId?: string;
|
||||
height?: string;
|
||||
tabId?: string;
|
||||
}
|
||||
|
||||
// Cache for schema with 5-minute expiration
|
||||
@@ -138,7 +139,7 @@ function getFkSuggestions(
|
||||
return suggestions;
|
||||
}
|
||||
|
||||
export default function SqlEditor({ value, onChange, databaseId, height }: SqlEditorProps) {
|
||||
export default function SqlEditor({ value, onChange, databaseId, height, tabId }: SqlEditorProps) {
|
||||
const editorRef = useRef<any>(null);
|
||||
const monacoRef = useRef<Monaco | null>(null);
|
||||
|
||||
@@ -325,7 +326,8 @@ export default function SqlEditor({ value, onChange, databaseId, height }: SqlEd
|
||||
<div className="border border-gray-300 rounded-lg overflow-hidden" style={{ height: height || '100%' }}>
|
||||
<Editor
|
||||
height="100%"
|
||||
defaultLanguage="sql"
|
||||
language="sql"
|
||||
path={tabId}
|
||||
value={value}
|
||||
onChange={(value) => onChange(value || '')}
|
||||
onMount={handleEditorDidMount}
|
||||
|
||||
Reference in New Issue
Block a user