Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jul 31, 2023
1 parent f8f10f7 commit d2d3e22
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 52 deletions.
30 changes: 1 addition & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ py-lint: pre-commit
js-format:
cd superset-frontend; npm run prettier

flask-app: activate
flask-app:
flask run -p 8088 --with-threads --reload --debugger

node-app:
Expand All @@ -115,31 +115,3 @@ report-celery-beat:

admin-user:
superset fab create-admin

# Create a postgres instance using docker
# CLI: $ psql postgresql://postgres:1234@localhost:5432/postgres
# superset_config.py: SQLALCHEMY_DATABASE_URI = 'postgresql://postgres:1234@localhost:5432/postgres'
db:
# start postgres with detached mode
docker run -d -p 127.0.0.1:5432:5432 -e POSTGRES_PASSWORD="1234" --name pg postgres:alpine;\
EXIT_CODE=$$?;\
echo $$EXIT_CODE;\
echo "command exited with $$EXIT_CODE";\
if [ $$EXIT_CODE -ne "0" ]; then docker start pg; echo "DB has been created"; fi

db-stop:
docker stop pg

cache:
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest;\
EXIT_CODE=$$?;\
echo $$EXIT_CODE;\
echo "command exited with $$EXIT_CODE";\
if [ $$EXIT_CODE -ne "0" ]; then docker start redis-stack-server; echo "cache has been created"; fi

cache-stop:
docker stop redis-stack-server

# Primarily made for GH codespaces but this flow could work on your local as well
api: db cache flask-app
client: node-app
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,24 @@ export const hostField = ({
getValidation,
validationErrors,
db,
}: FieldPropTypes) => {
debugger;
return (
<ValidatedInput
id="host"
name="host"
value={db?.parameters?.host}
required={required}
hasTooltip
tooltipText={t(
'This can be either an IP address (e.g. 127.0.0.1) or a domain name (e.g. mydatabase.com).',
)}
validationMethods={{ onBlur: getValidation }}
errorMessage={validationErrors?.host}
placeholder={t('e.g. 127.0.0.1')}
className="form-group-w-50"
label={t('Host')}
onChange={changeMethods.onParametersChange}
/>
);
};
}: FieldPropTypes) => (
<ValidatedInput
id="host"
name="host"
value={db?.parameters?.host}
required={required}
hasTooltip
tooltipText={t(
'This can be either an IP address (e.g. 127.0.0.1) or a domain name (e.g. mydatabase.com).',
)}
validationMethods={{ onBlur: getValidation }}
errorMessage={validationErrors?.host}
placeholder={t('e.g. 127.0.0.1')}
className="form-group-w-50"
label={t('Host')}
onChange={changeMethods.onParametersChange}
/>
);

export const portField = ({
required,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@ export function dbReducer(
let actionPayloadJson;
const extraJson: ExtraJson = JSON.parse(trimmedState.extra || '{}');

console.log(action.type);

switch (action.type) {
case ActionType.extraEditorChange:
// "extra" payload in state is a string
Expand Down

0 comments on commit d2d3e22

Please sign in to comment.