From 190e0d5eda96bed393d3bc7d62704f9a29b94391 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 16 Sep 2016 08:32:59 -0700 Subject: [PATCH] [welcome] removing calendar heatmap from welcome page (#1119) --- caravel/assets/javascripts/welcome.js | 29 -------------------- caravel/templates/caravel/welcome.html | 38 ++++++++++---------------- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/caravel/assets/javascripts/welcome.js b/caravel/assets/javascripts/welcome.js index 4cc6a3c77e720..28e48a3934ef6 100644 --- a/caravel/assets/javascripts/welcome.js +++ b/caravel/assets/javascripts/welcome.js @@ -5,9 +5,7 @@ require('../stylesheets/welcome.css'); require('bootstrap'); require('datatables.net-bs'); require('../node_modules/datatables-bootstrap3-plugin/media/css/datatables-bootstrap3.css'); -require('../node_modules/cal-heatmap/cal-heatmap.css'); const d3 = require('d3'); -const CalHeatMap = require('cal-heatmap'); function modelViewTable(selector, modelView, orderCol, order) { // Builds a dataTable from a flask appbuilder api endpoint let url = '/' + modelView.toLowerCase() + '/api/read'; @@ -51,32 +49,5 @@ function modelViewTable(selector, modelView, orderCol, order) { }); } $(document).ready(function () { - d3.json('/caravel/activity_per_day', function (json) { - const ext = d3.extent(d3.values(json)); - const cal = new CalHeatMap(); - const range = 10; - const legendBounds = []; - const step = (ext[1] - ext[0]) / (range - 1); - for (let i = 0; i < range; i++) { - legendBounds.push(i * step + ext[0]); - } - cal.init({ - start: new Date().setFullYear(new Date().getFullYear() - 1), - range: 13, - data: json, - legend: legendBounds, - legendColors: [ - '#D6E685', - '#1E6823', - ], - domain: 'month', - subDomain: 'day', - itemName: 'action', - tooltip: true, - cellSize: 10, - cellPadding: 2, - domainGutter: 22, - }); - }); modelViewTable('#dash_table', 'DashboardModelViewAsync', 'changed_on', 'desc'); }); diff --git a/caravel/templates/caravel/welcome.html b/caravel/templates/caravel/welcome.html index c3a5fe66fd632..2cd3f32cc4ea4 100644 --- a/caravel/templates/caravel/welcome.html +++ b/caravel/templates/caravel/welcome.html @@ -12,34 +12,26 @@ {% block body %}
{% include 'caravel/flash_wrapper.html' %} -
-
-
-
-
-
-
-
-
-
-
-

{{ _("Dashboards") }}

-
-
-
- - -
-
+
+
+
+
+
+

{{ _("Dashboards") }}

+
+
+
+ +
-
- -
-
+
+ +
+
{% endblock %}