Skip to content

Commit

Permalink
Merge branch 'master' into add/sql-formatter-params
Browse files Browse the repository at this point in the history
  • Loading branch information
guidopetri committed Feb 6, 2024
2 parents 9703a5e + ab39283 commit dcbb8cf
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 38 deletions.
1 change: 0 additions & 1 deletion .ci/docker-compose.ci.yml → .ci/compose.ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '2.2'
services:
redash:
build: ../
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2.2"
x-redash-service: &redash-service
build:
context: ../
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-22.04
needs: backend-lint
env:
COMPOSE_FILE: .ci/docker-compose.ci.yml
COMPOSE_FILE: .ci/compose.ci.yaml
COMPOSE_PROJECT_NAME: redash
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
runs-on: ubuntu-22.04
needs: frontend-lint
env:
COMPOSE_FILE: .ci/docker-compose.cypress.yml
COMPOSE_FILE: .ci/compose.cypress.yaml
COMPOSE_PROJECT_NAME: cypress
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict = true
25 changes: 3 additions & 22 deletions client/app/pages/dashboards/components/ShareDashboardDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,28 +118,9 @@ class ShareDashboardDialog extends React.Component {
/>
</Form.Item>
{dashboard.public_url && (
<>
<Form.Item>
<Alert
message={
<div>
Custom rule for hiding filter components when sharing links:
<br />
You can hide filter components by appending `&hide_filter={"{{"} component_name{"}}"}` to the
sharing URL.
<br />
Example: http://{"{{"}ip{"}}"}:{"{{"}port{"}}"}/public/dashboards/{"{{"}id{"}}"}
?p_country=ghana&p_site=10&hide_filter=country
</div>
}
type="warning"
/>
</Form.Item>

<Form.Item label="Secret address" {...this.formItemProps}>
<InputWithCopy value={dashboard.public_url} data-test="SecretAddress" />
</Form.Item>
</>
<Form.Item label="Secret address" {...this.formItemProps}>
<InputWithCopy value={dashboard.public_url} data-test="SecretAddress" />
</Form.Item>
)}
</Form>
</Modal>
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml → compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This configuration file is for the **development** setup.
# For a production example please refer to getredash/setup repository on GitHub.
version: "2.2"
x-redash-service: &redash-service
build:
context: .
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redash-client",
"version": "24.01.0-dev",
"version": "24.02.0-dev",
"description": "The frontend part of Redash.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -35,6 +35,7 @@
},
"engines": {
"node": ">14.16.0 <17.0.0",
"npm": "please-use-yarn",
"yarn": "^1.22.10"
},
"author": "Redash Contributors",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ force-exclude = '''

[tool.poetry]
name = "redash"
version = "24.01.0-dev"
version = "24.02.0-dev"
description = "Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data."
authors = ["Arik Fraimovich <arik@redash.io>"]
# to be added to/removed from the mailing list, please reach out to Arik via the above email or Discord
Expand Down
2 changes: 1 addition & 1 deletion redash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from redash.destinations import import_destinations
from redash.query_runner import import_query_runners

__version__ = "24.01.0-dev"
__version__ = "24.02.0-dev"


if os.environ.get("REMOTE_DEBUG"):
Expand Down
2 changes: 1 addition & 1 deletion redash/query_runner/cass.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_ssl_options_dict(protocol, cert_path=None):
return ssl_options


def json_encoder(dec, o):
def custom_json_encoder(dec, o):
if isinstance(o, sortedset):
return list(o)
return None
Expand Down
2 changes: 1 addition & 1 deletion redash/query_runner/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}


def json_encoder(dec, o):
def custom_json_encoder(dec, o):
if isinstance(o, ObjectId):
return str(o)
elif isinstance(o, Timestamp):
Expand Down
2 changes: 1 addition & 1 deletion redash/query_runner/pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}


def json_encoder(dec, o):
def custom_json_encoder(dec, o):
if isinstance(o, Range):
# From: https://github.com/psycopg/psycopg2/pull/779
if o._bounds is None:
Expand Down
7 changes: 2 additions & 5 deletions redash/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,11 @@ def generate_token(length):
return "".join(rand.choice(chars) for x in range(length))


json_encoders = [m.custom_json_encoder for m in sys.modules if hasattr(m, "custom_json_encoder")]


class JSONEncoder(json.JSONEncoder):
"""Adapter for `json.dumps`."""

def __init__(self, **kwargs):
self.encoders = json_encoders
self.encoders = [m.custom_json_encoder for m in sys.modules.values() if hasattr(m, "custom_json_encoder")]
super().__init__(**kwargs)

def default(self, o):
Expand Down Expand Up @@ -111,7 +108,7 @@ def default(self, o):
elif isinstance(o, bytes):
result = binascii.hexlify(o).decode()
else:
result = super(JSONEncoder, self).default(o)
result = super().default(o)
return result


Expand Down

0 comments on commit dcbb8cf

Please sign in to comment.