Skip to content

Commit 4eb5f4e

Browse files
authored
Remove version check and all of the data sharing (#6852)
1 parent a0f5c70 commit 4eb5f4e

File tree

16 files changed

+10
-305
lines changed

16 files changed

+10
-305
lines changed
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react";
2-
import Link from "@/components/Link";
3-
import { clientConfig, currentUser } from "@/services/auth";
2+
import { clientConfig } from "@/services/auth";
43
import frontendVersion from "@/version.json";
54

65
export default function VersionInfo() {
@@ -10,15 +9,6 @@ export default function VersionInfo() {
109
Version: {clientConfig.version}
1110
{frontendVersion !== clientConfig.version && ` (${frontendVersion.substring(0, 8)})`}
1211
</div>
13-
{clientConfig.newVersionAvailable && currentUser.hasPermission("super_admin") && (
14-
<div className="m-t-10">
15-
{/* eslint-disable react/jsx-no-target-blank */}
16-
<Link href="https://version.redash.io/" className="update-available" target="_blank" rel="noopener">
17-
Update Available <i className="fa fa-external-link m-l-5" aria-hidden="true" />
18-
<span className="sr-only">(opens in a new tab)</span>
19-
</Link>
20-
</div>
21-
)}
2212
</React.Fragment>
2313
);
2414
}

client/app/components/BeaconConsent.jsx

Lines changed: 0 additions & 79 deletions
This file was deleted.

client/app/components/HelpTrigger.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const TYPES = mapValues(
2323
VALUE_SOURCE_OPTIONS: ["/user-guide/querying/query-parameters#Value-Source-Options", "Guide: Value Source Options"],
2424
SHARE_DASHBOARD: ["/user-guide/dashboards/sharing-dashboards", "Guide: Sharing and Embedding Dashboards"],
2525
AUTHENTICATION_OPTIONS: ["/user-guide/users/authentication-options", "Guide: Authentication Options"],
26-
USAGE_DATA_SHARING: ["/open-source/admin-guide/usage-data", "Help: Anonymous Usage Data Sharing"],
2726
DS_ATHENA: ["/data-sources/amazon-athena-setup", "Guide: Help Setting up Amazon Athena"],
2827
DS_BIGQUERY: ["/data-sources/bigquery-setup", "Guide: Help Setting up BigQuery"],
2928
DS_URL: ["/data-sources/querying-urls", "Guide: Help Setting up URL"],

client/app/pages/home/Home.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Link from "@/components/Link";
66
import routeWithUserSession from "@/components/ApplicationArea/routeWithUserSession";
77
import EmptyState, { EmptyStateHelpMessage } from "@/components/empty-state/EmptyState";
88
import DynamicComponent from "@/components/DynamicComponent";
9-
import BeaconConsent from "@/components/BeaconConsent";
109
import PlainButton from "@/components/PlainButton";
1110

1211
import { axios } from "@/services/axios";
@@ -89,7 +88,6 @@ export default function Home() {
8988
</DynamicComponent>
9089
<DynamicComponent name="HomeExtra" />
9190
<DashboardAndQueryFavoritesList />
92-
<BeaconConsent />
9391
</div>
9492
</div>
9593
);

client/app/pages/settings/components/GeneralSettings/BeaconConsentSettings.jsx

Lines changed: 0 additions & 38 deletions
This file was deleted.

client/app/pages/settings/components/GeneralSettings/index.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import DynamicComponent from "@/components/DynamicComponent";
44
import FormatSettings from "./FormatSettings";
55
import PlotlySettings from "./PlotlySettings";
66
import FeatureFlagsSettings from "./FeatureFlagsSettings";
7-
import BeaconConsentSettings from "./BeaconConsentSettings";
87

98
export default function GeneralSettings(props) {
109
return (
@@ -14,7 +13,6 @@ export default function GeneralSettings(props) {
1413
<FormatSettings {...props} />
1514
<PlotlySettings {...props} />
1615
<FeatureFlagsSettings {...props} />
17-
<BeaconConsentSettings {...props} />
1816
</DynamicComponent>
1917
);
2018
}

redash/app.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ def create_app():
3636
from .metrics import request as request_metrics
3737
from .models import db, users
3838
from .utils import sentry
39-
from .version_check import reset_new_version_status
4039

4140
sentry.init()
4241
app = Redash()
4342

44-
# Check and update the cached version for use by the client
45-
reset_new_version_status()
46-
4743
security.init_app(app)
4844
request_metrics.init_app(app)
4945
db.init_app(app)

redash/handlers/authentication.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
)
1616
from redash.handlers import routes
1717
from redash.handlers.base import json_response, org_scoped_rule
18-
from redash.version_check import get_latest_version
1918

2019
logger = logging.getLogger(__name__)
2120

@@ -256,15 +255,11 @@ def number_format_config():
256255

257256
def client_config():
258257
if not current_user.is_api_user() and current_user.is_authenticated:
259-
client_config = {
260-
"newVersionAvailable": bool(get_latest_version()),
258+
client_config_inner = {
261259
"version": __version__,
262260
}
263261
else:
264-
client_config = {}
265-
266-
if current_user.has_permission("admin") and current_org.get_setting("beacon_consent") is None:
267-
client_config["showBeaconConsentMessage"] = True
262+
client_config_inner = {}
268263

269264
defaults = {
270265
"allowScriptsInUserInput": settings.ALLOW_SCRIPTS_IN_USER_INPUT,
@@ -284,12 +279,12 @@ def client_config():
284279
"tableCellMaxJSONSize": settings.TABLE_CELL_MAX_JSON_SIZE,
285280
}
286281

287-
client_config.update(defaults)
288-
client_config.update({"basePath": base_href()})
289-
client_config.update(date_time_format_config())
290-
client_config.update(number_format_config())
282+
client_config_inner.update(defaults)
283+
client_config_inner.update({"basePath": base_href()})
284+
client_config_inner.update(date_time_format_config())
285+
client_config_inner.update(number_format_config())
291286

292-
return client_config
287+
return client_config_inner
293288

294289

295290
def messages():

redash/handlers/setup.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
from flask import g, redirect, render_template, request, url_for
22
from flask_login import login_user
3-
from wtforms import BooleanField, Form, PasswordField, StringField, validators
3+
from wtforms import Form, PasswordField, StringField, validators
44
from wtforms.fields.html5 import EmailField
55

66
from redash import settings
77
from redash.authentication.org_resolving import current_org
88
from redash.handlers.base import routes
99
from redash.models import Group, Organization, User, db
10-
from redash.tasks.general import subscribe
1110

1211

1312
class SetupForm(Form):
1413
name = StringField("Name", validators=[validators.InputRequired()])
1514
email = EmailField("Email Address", validators=[validators.Email()])
1615
password = PasswordField("Password", validators=[validators.Length(6)])
1716
org_name = StringField("Organization Name", validators=[validators.InputRequired()])
18-
security_notifications = BooleanField()
19-
newsletter = BooleanField()
2017

2118

2219
def create_org(org_name, user_name, email, password):
@@ -57,19 +54,13 @@ def setup():
5754
return redirect("/")
5855

5956
form = SetupForm(request.form)
60-
form.newsletter.data = True
61-
form.security_notifications.data = True
6257

6358
if request.method == "POST" and form.validate():
6459
default_org, user = create_org(form.org_name.data, form.name.data, form.email.data, form.password.data)
6560

6661
g.org = default_org
6762
login_user(user)
6863

69-
# signup to newsletter if needed
70-
if form.newsletter.data or form.security_notifications:
71-
subscribe.delay(form.data)
72-
7364
return redirect(url_for("redash.index", org_slug=None))
7465

7566
return render_template("setup.html", form=form)

redash/settings/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ def email_server_is_configured():
412412
TABLE_CELL_MAX_JSON_SIZE = int(os.environ.get("REDASH_TABLE_CELL_MAX_JSON_SIZE", 50000))
413413

414414
# Features:
415-
VERSION_CHECK = parse_boolean(os.environ.get("REDASH_VERSION_CHECK", "true"))
416415
FEATURE_DISABLE_REFRESH_QUERIES = parse_boolean(os.environ.get("REDASH_FEATURE_DISABLE_REFRESH_QUERIES", "false"))
417416
FEATURE_SHOW_QUERY_RESULTS_COUNT = parse_boolean(os.environ.get("REDASH_FEATURE_SHOW_QUERY_RESULTS_COUNT", "true"))
418417
FEATURE_ALLOW_CUSTOM_JS_VISUALIZATIONS = parse_boolean(

0 commit comments

Comments
 (0)