Skip to content

Commit

Permalink
Merge pull request getredash#134 from EverythingMe/feature_roles
Browse files Browse the repository at this point in the history
Feature: control the system name
  • Loading branch information
arikfr committed Mar 12, 2014
2 parents f07428a + ae3151d commit 3b34b1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rd_ui/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--[if IE 8]> <html class="no-js lt-ie9" ng-app="redash" ng-controller='MainCtrl'> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" ng-app="redash" ng-controller='MainCtrl'> <!--<![endif]-->
<head>
<title ng-bind="'re:dash | ' + pageTitle"></title>
<title ng-bind="'{{name}} | ' + pageTitle"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

Expand All @@ -29,7 +29,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><strong>re:dash</strong></a>
<a class="navbar-brand" href="/"><strong>{{name}}</strong></a>
</div>
{% raw %}
<div class="collapse navbar-collapse navbar-ex1-collapse">
Expand Down
4 changes: 2 additions & 2 deletions rd_ui/app/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>re:dash Login</title>
<title>{{name}} Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

Expand All @@ -26,7 +26,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><strong>re:dash</strong></a>
<a class="navbar-brand" href="/"><strong>{{name}}</strong></a>
</div>
</div>
</nav>
Expand Down
4 changes: 3 additions & 1 deletion redash/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def index(**kwargs):
'permissions': current_user.permissions
}

return render_template("index.html", user=json.dumps(user), analytics=settings.ANALYTICS)
return render_template("index.html", user=json.dumps(user), name=settings.NAME,
analytics=settings.ANALYTICS)


@app.route('/login', methods=['GET', 'POST'])
Expand All @@ -70,6 +71,7 @@ def login():
return redirect(request.args.get('next') or '/')

return render_template("login.html",
name=settings.NAME,
analytics=settings.ANALYTICS,
next=request.args.get('next'),
username=request.form.get('username', ''),
Expand Down
2 changes: 2 additions & 0 deletions redash/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def parse_boolean(str):
STATSD_PORT = int(os.environ.get('REDASH_STATSD_PORT', "8125"))
STATSD_PREFIX = os.environ.get('REDASH_STATSD_PREFIX', "redash")

NAME = os.environ.get('REDASH_NAME', 're:dash')

# "pg", "graphite" or "mysql"
CONNECTION_ADAPTER = os.environ.get("REDASH_CONNECTION_ADAPTER", "pg")
# Connection string for the database that is used to run queries against. Examples:
Expand Down

0 comments on commit 3b34b1c

Please sign in to comment.