mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
chore(sqllab): Cleanup /tables/... endpoint (#21284)
This commit is contained in:
@@ -31,7 +31,6 @@ const createProps = (props = {}) => ({
|
||||
id: 1,
|
||||
database_name: 'main',
|
||||
backend: 'sqlite',
|
||||
allow_multi_schema_metadata_fetch: false,
|
||||
},
|
||||
schema: 'test_schema',
|
||||
handleError: jest.fn(),
|
||||
|
||||
@@ -112,9 +112,9 @@ export interface TableOption {
|
||||
}
|
||||
|
||||
export const TableOption = ({ table }: { table: Table }) => {
|
||||
const { label, type, extra } = table;
|
||||
const { value, type, extra } = table;
|
||||
return (
|
||||
<TableLabel title={label}>
|
||||
<TableLabel title={value}>
|
||||
{type === 'view' ? (
|
||||
<Icons.Eye iconSize="m" />
|
||||
) : (
|
||||
@@ -133,7 +133,7 @@ export const TableOption = ({ table }: { table: Table }) => {
|
||||
size="l"
|
||||
/>
|
||||
)}
|
||||
{label}
|
||||
{value}
|
||||
</TableLabel>
|
||||
);
|
||||
};
|
||||
@@ -286,9 +286,7 @@ const TableSelector: FunctionComponent<TableSelectorProps> = ({
|
||||
);
|
||||
|
||||
function renderTableSelect() {
|
||||
const disabled =
|
||||
(currentSchema && !formMode && readOnly) ||
|
||||
(!currentSchema && !database?.allow_multi_schema_metadata_fetch);
|
||||
const disabled = (currentSchema && !formMode && readOnly) || !currentSchema;
|
||||
|
||||
const header = sqlLabMode ? (
|
||||
<FormLabel>{t('See table schema')}</FormLabel>
|
||||
|
||||
Reference in New Issue
Block a user