mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Track errors when uploading spreadsheets
Uses the new javascript event tracking stuff so that we can see what errors people are getting when they upload spreadsheets.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
(function(Modules) {
|
(function(Modules) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Modules.TrackEvent = function() {
|
Modules.TrackError = function() {
|
||||||
|
|
||||||
this.start = function(component) {
|
this.start = function(component) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: bad recipients" data-error-label="{{ upload_id }}">
|
||||||
You can’t send to
|
You can’t send to
|
||||||
{{ 'this' if count_of_recipients == 1 else 'these' }}
|
{{ 'this' if count_of_recipients == 1 else 'these' }}
|
||||||
{{ template_type_label }}
|
{{ template_type_label }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: too many recipients" data-error-label="{{ upload_id }}">
|
||||||
{% if original_file_name %}
|
{% if original_file_name %}
|
||||||
Too many recipients
|
Too many recipients
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
{% if recipients.too_many_rows %}
|
{% if recipients.too_many_rows %}
|
||||||
|
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Too many rows" data-error-label="{{ upload_id }}">
|
||||||
Your file has too many rows
|
Your file has too many rows
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
{% elif not count_of_recipients %}
|
{% elif not count_of_recipients %}
|
||||||
|
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="No rows" data-error-label="{{ upload_id }}">
|
||||||
Your file is missing some rows
|
Your file is missing some rows
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
{% elif not recipients.has_recipient_columns %}
|
{% elif not recipients.has_recipient_columns %}
|
||||||
|
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Missing recipient columns" data-error-label="{{ upload_id }}">
|
||||||
Your file needs {{ recipients.recipient_column_headers | formatted_list(
|
Your file needs {{ recipients.recipient_column_headers | formatted_list(
|
||||||
prefix='a column called',
|
prefix='a column called',
|
||||||
prefix_plural='columns called'
|
prefix_plural='columns called'
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
{% elif recipients.missing_column_headers %}
|
{% elif recipients.missing_column_headers %}
|
||||||
|
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Missing placeholder columns" data-error-label="{{ upload_id }}">
|
||||||
The columns in your file need to match the double brackets in
|
The columns in your file need to match the double brackets in
|
||||||
your template
|
your template
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="bottom-gutter">
|
<div class="bottom-gutter">
|
||||||
{% call banner_wrapper(type='dangerous') %}
|
{% call banner_wrapper(type='dangerous') %}
|
||||||
{% if row_errors|length == 1 %}
|
{% if row_errors|length == 1 %}
|
||||||
<h1 class='banner-title'>
|
<h1 class='banner-title' data-module="track-error" data-error-type="Bad rows" data-error-label="{{ upload_id }}">
|
||||||
There is a problem with your data
|
There is a problem with your data
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user