FIX: Show 'Export' button for all tabular reports. (#7838)

FIX: Show ‘Export’ button for all tabular reports. (#7838)

diff --git a/app/assets/javascripts/admin/components/admin-report.js.es6 b/app/assets/javascripts/admin/components/admin-report.js.es6
index 15f7a6e..97a82c6 100644
--- a/app/assets/javascripts/admin/components/admin-report.js.es6
+++ b/app/assets/javascripts/admin/components/admin-report.js.es6
@@ -55,7 +55,6 @@ export default Ember.Component.extend({
   showTitle: true,
   showFilteringUI: false,
   showDatesOptions: Ember.computed.alias("model.dates_filtering"),
-  showExport: Ember.computed.not("model.isTable"),
   showRefresh: Ember.computed.or(
     "showDatesOptions",
     "model.available_filters.length"
diff --git a/app/assets/javascripts/admin/templates/components/admin-report.hbs b/app/assets/javascripts/admin/templates/components/admin-report.hbs
index 7181ac3..a23223d 100644
--- a/app/assets/javascripts/admin/templates/components/admin-report.hbs
+++ b/app/assets/javascripts/admin/templates/components/admin-report.hbs
@@ -164,7 +164,7 @@
           </div>
         {{/each}}
 
-        {{#if showExport}}
+        {{#if model.isTable}}
           <div class="control">
             <div class="input">
               {{d-button
diff --git a/test/javascripts/acceptance/reports-test.js.es6 b/test/javascripts/acceptance/reports-test.js.es6
index 76bb6fa..0742116 100644
--- a/test/javascripts/acceptance/reports-test.js.es6
+++ b/test/javascripts/acceptance/reports-test.js.es6
@@ -27,3 +27,65 @@ QUnit.test("Visit reports page", async assert => {
     "List of my activities"
   );
 });
+
+QUnit.test("Visit report page", async assert => {
+  // eslint-disable-next-line
+  server.get("/admin/reports/bulk", () => [
+    200,
+    { "Content-Type": "application/json" },
+    {
+      reports: [
+        {
+          type: "staff_logins",
+          title: "Admin Logins",
+          xaxis: null,
+          yaxis: null,
+          description: "List of admin login times with locations.",
+          data: [
+            {
+              avatar_template:
+                "/letter_avatar_proxy/v4/letter/q/a4c791/{size}.png",
+              user_id: 4,
+              username: "codinghorror",
+              location: null,
+              created_at: "2019-06-10T00:00:00.000Z"
+            }
+          ],
+          start_date: "2019-06-01T00:00:00Z",
+          end_date: "2019-07-01T23:59:59Z",
+          prev_data: null,
+          prev_start_date: "2019-04-30T00:00:00Z",
+          prev_end_date: "2019-06-01T00:00:00Z",
+          prev30Days: null,
+          dates_filtering: true,
+          report_key:
+            "reports:staff_logins:20190601:20190702:[:prev_period]:50:4",
+          primary_color: "rgba(0,136,204,1)",
+          secondary_color: "rgba(0,136,204,0.1)",
+          available_filters: [],
+          labels: [
+            {
+              type: "user",
+              properties: {
+                username: "username",
+                id: "user_id",
+                avatar: "avatar_template"
+              },
+              title: "User"
+            },
+            { property: "location", title: "Location" },
+            { property: "created_at", type: "precise_date", title: "Login at" }
+          ],
+          average: false,
+          percent: false,
+          higher_is_better: true,
+          modes: ["table"],
+          limit: 50
+        }
+      ]
+    }
+  ]);
+
+  await visit("/admin/reports/staff_logins");
+  assert.ok(exists(".export-csv-btn"));
+});

GitHub sha: bfdf740a