mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-12 06:24:04 -05: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) {
|
||||
"use strict";
|
||||
|
||||
Modules.TrackEvent = function() {
|
||||
Modules.TrackError = function() {
|
||||
|
||||
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
|
||||
{{ 'this' if count_of_recipients == 1 else 'these' }}
|
||||
{{ 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 %}
|
||||
Too many recipients
|
||||
{% else %}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
{% 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
|
||||
</h1>
|
||||
<p>
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
{% 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
|
||||
</h1>
|
||||
<p>
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
{% 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(
|
||||
prefix='a column called',
|
||||
prefix_plural='columns called'
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
{% 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
|
||||
your template
|
||||
</h1>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="bottom-gutter">
|
||||
{% call banner_wrapper(type='dangerous') %}
|
||||
{% 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
|
||||
</h1>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user