Commit 8d4e0f83 by David Ormsbee

Add ANALYTICS_API_KEY to config files and dashboard analytics call

parent 33c2507a
...@@ -599,7 +599,9 @@ def instructor_dashboard(request, course_id): ...@@ -599,7 +599,9 @@ def instructor_dashboard(request, course_id):
logs and swallows errors. logs and swallows errors.
""" """
url = settings.ANALYTICS_SERVER_URL + \ url = settings.ANALYTICS_SERVER_URL + \
"get?aname={}&course_id={}".format(analytics_name, course_id) "get?aname={}&course_id={}&apikey={}".format(analytics_name,
course_id,
settings.ANALYTICS_API_KEY)
try: try:
res = requests.get(url) res = requests.get(url)
except Exception: except Exception:
......
...@@ -113,3 +113,4 @@ DATADOG_API = AUTH_TOKENS.get("DATADOG_API") ...@@ -113,3 +113,4 @@ DATADOG_API = AUTH_TOKENS.get("DATADOG_API")
# Analytics dashboard server # Analytics dashboard server
ANALYTICS_SERVER_URL = ENV_TOKENS.get("ANALYTICS_SERVER_URL") ANALYTICS_SERVER_URL = ENV_TOKENS.get("ANALYTICS_SERVER_URL")
ANALYTICS_API_KEY = AUTH_TOKENS.get("ANALYTICS_API_KEY", "")
...@@ -221,3 +221,4 @@ PEARSON_TEST_PASSWORD = "12345" ...@@ -221,3 +221,4 @@ PEARSON_TEST_PASSWORD = "12345"
########################## ANALYTICS TESTING ######################## ########################## ANALYTICS TESTING ########################
ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/" ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/"
ANALYTICS_API_KEY = ""
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment