From 10d67d4d443f077990811f51668393b78dc1f209 Mon Sep 17 00:00:00 2001 From: slightlycyborg Date: Fri, 26 Jul 2019 16:34:28 +0000 Subject: [PATCH] put history_chart loader back in --- apps/block_scout_web/assets/js/lib/history_chart.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/block_scout_web/assets/js/lib/history_chart.js b/apps/block_scout_web/assets/js/lib/history_chart.js index f1463cf096..536801ae31 100644 --- a/apps/block_scout_web/assets/js/lib/history_chart.js +++ b/apps/block_scout_web/assets/js/lib/history_chart.js @@ -4,6 +4,7 @@ import humps from 'humps' import numeral from 'numeral' import { formatUsdValue } from '../lib/currency' import sassVariables from '../../css/app.scss' +import { showLoader } from '../lib/utils' const config = { type: 'line', @@ -184,6 +185,9 @@ export function createMarketHistoryChart (el) { const dataConfig = $(el).data('history_chart_config') const $chartLoading = $('[data-chart-loading-message]') + const isTimeout = true + const timeoutID = showLoader(isTimeout, $chartLoading) + const $chartError = $('[data-chart-error-message]') const chart = new MarketHistoryChart(el, 0, [], dataConfig) Object.keys(dataPaths).forEach(function (historySource) { @@ -209,6 +213,7 @@ export function createMarketHistoryChart (el) { }) .always(() => { $chartLoading.hide() + clearTimeout(timeoutID) }) }) return chart