mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
feat: remove gdc sources from run sql view
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9659 GitOrigin-RevId: cedaf4e389b7499c2b9580f3296d54cb4b56e1ed
This commit is contained in:
parent
6c615fb733
commit
3617aa4d8d
@ -629,16 +629,32 @@ RawSQL.propTypes = {
|
|||||||
statementTimeout: PropTypes.string.isRequired,
|
statementTimeout: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => {
|
||||||
...state.rawSQL,
|
const nativeSources = state.metadata.metadataObject.sources.filter(source =>
|
||||||
migrationMode: state.main.migrationMode,
|
nativeDrivers.includes(source.kind)
|
||||||
currentSchema: state.tables.currentSchema,
|
);
|
||||||
allSchemas: state.tables.allSchemas,
|
|
||||||
serverVersion: state.main.serverVersion ? state.main.serverVersion : '',
|
const sources = getDataSources(state).filter(source =>
|
||||||
sources: getDataSources(state),
|
nativeDrivers.includes(source.driver)
|
||||||
currentDataSource: state.tables.currentDataSource,
|
);
|
||||||
metadataSources: state.metadata.metadataObject.sources,
|
|
||||||
});
|
const currentDataSource = sources.find(
|
||||||
|
source => source.name === state.tables.currentDataSource
|
||||||
|
)
|
||||||
|
? state.tables.currentDataSource
|
||||||
|
: sources?.[0]?.name || '';
|
||||||
|
|
||||||
|
return {
|
||||||
|
...state.rawSQL,
|
||||||
|
migrationMode: state.main.migrationMode,
|
||||||
|
currentSchema: state.tables.currentSchema,
|
||||||
|
allSchemas: state.tables.allSchemas,
|
||||||
|
serverVersion: state.main.serverVersion ? state.main.serverVersion : '',
|
||||||
|
sources,
|
||||||
|
currentDataSource,
|
||||||
|
metadataSources: nativeSources,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const rawSQLConnector = connect => connect(mapStateToProps)(RawSQL);
|
const rawSQLConnector = connect => connect(mapStateToProps)(RawSQL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user