Skip to content

Commit

Permalink
Add new sentry-js setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 12, 2024
1 parent 3a0716f commit 74ed8d4
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 55 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ requests==2.32.1
python-cas==1.6.0
django-cas-ng==5.0.0

raven==6.10.0
sentry-sdk==2.16.0
django-statsd-mozilla==0.4.0
django-smoketest==1.2.0
Expand All @@ -74,7 +73,7 @@ django-impersonate==1.9.1
django-ga-context==0.1.0
django-smtp-ssl==1.0

ctlsettings==0.3.5
ctlsettings==0.4.1

pbr==6.1.0
PyYAML==6.0.1 # MIT
Expand Down
1 change: 1 addition & 0 deletions smart_sa/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'stagingcontext.staging_processor',
'ctlsettings.context_processors.env',
'gacontext.ga_processor',
'django.template.context_processors.csrf',
"smart_sa.intervention.views.inject_deployment",
Expand Down
108 changes: 55 additions & 53 deletions smart_sa/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>Masivukeni: {% block title %}{% endblock %}</title>
<title>Masivukeni: {% block title %}{% endblock %}</title>

<link href="{{STATIC_URL}}css/masivukeni.css" rel="stylesheet" type="text/css" />
<link href="{{STATIC_URL}}css/masivukeni.css" rel="stylesheet" type="text/css" />
<link href="{{STATIC_URL}}css/print.css" rel="stylesheet" media="print" />

{% block css %}{% endblock %}
{% block js %}{% endblock %}
{% block feeds %}{% endblock %}
{% include "ctlsettings/sentry_js.html" %}

{% block css %}{% endblock %}
{% block js %}{% endblock %}
{% block feeds %}{% endblock %}
<link rel="stylesheet" href="https://search.sites.columbia.edu/cu-privacy-notice/cu-privacy-notice.css" />
<script src="https://search.sites.columbia.edu/cu-privacy-notice/cu-privacy-notice.js"></script>

{% if GA_CODE %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{GA_CODE}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{GA_CODE}}', { 'anonymize_ip': true });
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{GA_CODE}}', { 'anonymize_ip': true });
</script>
{% endif %}
</head>
Expand All @@ -33,56 +35,56 @@

<div id="container">

<div id="header">
<h1>
{% if user.is_authenticated %}
<a href="/" id="masivukeni-home" onclick="if(document.completeactivity){document.completeactivity.next.value=this.href;document.completeactivity.submit();return false}">Masivukeni</a>
{% else %}
<a href="/" id="masivukeni-home">Masivukeni</a>
{% endif %}
</h1>
<div id="header">

<h1>
{% if user.is_authenticated %}
<a href="/" id="masivukeni-home" onclick="if(document.completeactivity){document.completeactivity.next.value=this.href;document.completeactivity.submit();return false}">Masivukeni</a>
{% else %}
<a href="/" id="masivukeni-home">Masivukeni</a>
{% endif %}
</h1>

<img class="logo" src="{{STATIC_URL}}images/logo_masivukeni.png">
<div id="nav-header">
<ul>
{% block editcontentnav %}{% endblock %}
<li>
{% if user.is_authenticated %}

<div id="nav-header">

<ul>

{% block editcontentnav %}{% endblock %}

<li>
{% if user.is_authenticated %}
<a class="loginlogout loginlogout-remote" href="/accounts/logout/" onclick="if(confirm('Are you sure that you would like to delete all data from this session?')){if(document.completeactivity){document.completeactivity.next.value=this.href;document.completeactivity.submit();return false}} else {return false}"><button id="btn-logout">Clear My Data</button></a>
<a class="loginlogout loginlogout-remote" href="/accounts/logout/?next=/" onclick="if(document.completeactivity){document.completeactivity.next.value=this.href;document.completeactivity.submit();return false}"><button id="btn-logout">Log Out</button></a>
{% else %}
{% endif %}
</ul>
</div>
</div>

{% block breadcrumb-main %}
{% endblock %}
{% block breadcrumb-session %}
{% endblock %}
{% else %}
{% endif %}
</ul>

</div>

</div>

{% block breadcrumb-main %}
{% endblock %}

{% block breadcrumb-session %}
{% endblock %}

<div id="contentcontainer">
{% block content %}{% endblock %}
{% block content %}{% endblock %}
</div>

<div id="footer">
{% if deployment.is_online %}
<a href="/">About</a>
|
<a href="/credits/">Credits</a>
|
<a href="mailto:ccnmtl-masivukeni@columbia.edu">Contact</a>
{% endif %}
{% block footer %}{% endblock %}
</div>
{% if deployment.is_online %}
<a href="/">About</a>
|
<a href="/credits/">Credits</a>
|
<a href="mailto:ccnmtl-masivukeni@columbia.edu">Contact</a>
{% endif %}
{% block footer %}{% endblock %}
</div>

</div>

Expand Down

0 comments on commit 74ed8d4

Please sign in to comment.