Skip to content

Commit

Permalink
remove console log
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jun 21, 2023
1 parent 97cddfe commit f4fb07b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
}

// only do validation for non ssh tunnel connections
console.log(dbToUpdate);
if (!dbToUpdate?.ssh_tunnel) {
// make sure that button spinner animates
setLoading(true);
Expand Down
1 change: 0 additions & 1 deletion superset-frontend/src/types/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ export default interface Database {
server_cert: string;
sqlalchemy_uri: string;
catalog: object;
ssh_tunnel: object;
}
7 changes: 5 additions & 2 deletions superset-frontend/src/views/CRUD/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import Chart, { Slice } from 'src/types/Chart';
import copyTextToClipboard from 'src/utils/copy';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import SupersetText from 'src/utils/textUtils';
import { FavoriteStatus, ImportResourceName, DatabaseObject } from './types';
import { DatabaseObject } from 'src/features/databases/types';
import { FavoriteStatus, ImportResourceName } from './types';

interface ListViewResourceState<D extends object = any> {
loading: boolean;
Expand Down Expand Up @@ -753,7 +754,9 @@ export function useDatabaseValidation() {
.catch(e => {
if (typeof e.json === 'function') {
return e.json().then(({ errors = [] }: JsonObject) => {
if (database?.ssh_tunnel) {
if (database?.parameters?.ssh) {
// when ssh tunnel is enabled we don't want to render any validation errors
setValidationErrors([]);
return [];
}
const parsedErrors = errors
Expand Down

0 comments on commit f4fb07b

Please sign in to comment.