Skip to content

Commit

Permalink
Make signed out layout more modular
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Mar 20, 2016
1 parent ea57175 commit fbb81b6
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 24 deletions.
1 change: 0 additions & 1 deletion docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ The follow is a list of settings and what they control:
- **REDASH_JOB_EXPIRY_TIME**: *default 3600 * 6*
- **REDASH_COOKIE_SECRET**: *default "c292a0a3aa32397cdb050e233733900f"*
- **REDASH_LOG_LEVEL**: *default "INFO"*
- **REDASH_ANALYTICS**: *default ""*
- **REDASH_MAIL_SERVER**: *default "localhost"*
- **REDASH_MAIL_PORT**: *default 25*
- **REDASH_MAIL_USE_TLS**: *default "false"*
Expand Down
3 changes: 0 additions & 3 deletions rd_ui/app/app_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ <h1><span class="glyphicon glyphicon-lock"></span></h1>
};

currentUser.isAdmin = currentUser.hasPermission('admin');


{{ analytics|safe }}

This comment has been minimized.

Copy link
@shishirsharma

shishirsharma Jul 2, 2016

What is the alternative of this feature. I want to add google analytics in Redash. What should I do.

</script>
{% include '_includes/tail.html' %}

Expand Down
2 changes: 0 additions & 2 deletions rd_ui/app/embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
var clientConfig = {{ client_config|safe }};
var visualization = {{ visualization|safe }};
var query_result = {{ query_result|safe }};

{{ analytics|safe }}
</script>

</body>
Expand Down
12 changes: 2 additions & 10 deletions rd_ui/app/signed_out_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@
</head>
<body>

<nav class="navbar navbar-default navbar-trans navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/"><img src="/images/logo_white.png"/></a>
</div>
</div>
</nav>
{% include '_includes/signed_out_navbar.html' %}

<div class="container content">
{% block content %}
Expand All @@ -37,9 +31,7 @@
<script src="/bower_components/jquery/jquery.js"></script>
<!-- endbuild -->

<script>
{{ analytics|safe }}
</script>
{% include '_includes/signed_out_tail.html' %}

</body>
</html>
1 change: 0 additions & 1 deletion redash/handlers/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def login(org_slug=None):

return render_template("login.html",
name=settings.NAME,
analytics=settings.ANALYTICS,
org_slug=org_slug,
next=next_path,
username=request.form.get('username', ''),
Expand Down
6 changes: 2 additions & 4 deletions redash/handlers/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def embed(query_id, visualization_id, org_slug=None):
base_href=base_href(),
client_config=json_dumps(client_config),
visualization=json_dumps(vis),
query_result=json_dumps(qr),
analytics=settings.ANALYTICS)
query_result=json_dumps(qr))


@routes.route(org_scoped_rule('/public/dashboards/<token>'), methods=['GET'])
Expand Down Expand Up @@ -76,7 +75,6 @@ def public_dashboard(token, org_slug=None):
}),
base_href=base_href(),
name=settings.NAME,
client_config=json.dumps(settings.COMMON_CLIENT_CONFIG),
analytics=settings.ANALYTICS)
client_config=json.dumps(settings.COMMON_CLIENT_CONFIG))

return response, 200, headers
3 changes: 1 addition & 2 deletions redash/handlers/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def index(**kwargs):
base_href=base_href(),
name=settings.NAME,
org_slug=current_org.slug,
client_config=json.dumps(client_config),
analytics=settings.ANALYTICS)
client_config=json.dumps(client_config))

return response, 200, headers

Expand Down
1 change: 0 additions & 1 deletion redash/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def all_settings():
JOB_EXPIRY_TIME = int(os.environ.get("REDASH_JOB_EXPIRY_TIME", 3600 * 6))
COOKIE_SECRET = os.environ.get("REDASH_COOKIE_SECRET", "c292a0a3aa32397cdb050e233733900f")
LOG_LEVEL = os.environ.get("REDASH_LOG_LEVEL", "INFO")
ANALYTICS = os.environ.get("REDASH_ANALYTICS", "")

# Mail settings:
MAIL_SERVER = os.environ.get('REDASH_MAIL_SERVER', 'localhost')
Expand Down
7 changes: 7 additions & 0 deletions redash/templates/_includes/signed_out_navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<nav class="navbar navbar-default navbar-trans navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/"><img src="/images/logo_white.png"/></a>
</div>
</div>
</nav>
Empty file.

0 comments on commit fbb81b6

Please sign in to comment.