feat: add SqlConsole component with query execution and data grid rendering
This commit is contained in:
@@ -84,7 +84,14 @@ const SqlConsole: React.FC<SqlConsoleProps> = ({ initialQuery, setNotification }
|
||||
bgcolor: darkMode ? '#111827' : '#ffffff',
|
||||
}}>
|
||||
<Box sx={{ px: 3, py: 1.5, display: 'flex', alignItems: 'center', justifyContent: 'space-between', bgcolor: 'rgba(0,0,0,0.02)' }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 800 }}>SQL CONSOLE</Typography>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
||||
<Typography variant="subtitle2" sx={{ fontWeight: 800 }}>SQL CONSOLE</Typography>
|
||||
{rowCount > 0 && (
|
||||
<Box sx={{ px: 1, py: 0.2, borderRadius: 1, bgcolor: 'rgba(0, 97, 255, 0.1)', color: 'primary.main' }}>
|
||||
<Typography variant="caption" sx={{ fontWeight: 700 }}>{rowCount} rows</Typography>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
<Box sx={{ display: 'flex', gap: 1 }}>
|
||||
<Button
|
||||
variant="contained"
|
||||
@@ -112,6 +119,7 @@ const SqlConsole: React.FC<SqlConsoleProps> = ({ initialQuery, setNotification }
|
||||
<DataGrid
|
||||
rows={rows}
|
||||
columns={columns}
|
||||
rowCount={rowCount}
|
||||
loading={loading}
|
||||
sx={{ border: 'none' }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user