From b0110a74e7ef8f32f7e572f96efcd07f79fc5831 Mon Sep 17 00:00:00 2001 From: Grace Guo Date: Fri, 14 Feb 2020 09:01:47 -0800 Subject: [PATCH] [dashboard] remove loading spinner in missing chart holder (#9140) --- .../javascripts/dashboard/components/MissingChart_spec.jsx | 6 ------ superset-frontend/src/dashboard/components/MissingChart.jsx | 5 ----- .../src/dashboard/stylesheets/components/chart.less | 6 ++---- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/superset-frontend/spec/javascripts/dashboard/components/MissingChart_spec.jsx b/superset-frontend/spec/javascripts/dashboard/components/MissingChart_spec.jsx index b9adcbac2..5a1eeae22 100644 --- a/superset-frontend/spec/javascripts/dashboard/components/MissingChart_spec.jsx +++ b/superset-frontend/spec/javascripts/dashboard/components/MissingChart_spec.jsx @@ -19,7 +19,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import Loading from '../../../../src/components/Loading'; import MissingChart from '../../../../src/dashboard/components/MissingChart'; describe('MissingChart', () => { @@ -37,9 +36,4 @@ describe('MissingChart', () => { const wrapper = setup(); expect(wrapper.find('.missing-chart-body')).toHaveLength(1); }); - - it('renders a Loading', () => { - const wrapper = setup(); - expect(wrapper.find(Loading)).toHaveLength(1); - }); }); diff --git a/superset-frontend/src/dashboard/components/MissingChart.jsx b/superset-frontend/src/dashboard/components/MissingChart.jsx index 34d3d2da8..e46f100e3 100644 --- a/superset-frontend/src/dashboard/components/MissingChart.jsx +++ b/superset-frontend/src/dashboard/components/MissingChart.jsx @@ -20,8 +20,6 @@ import PropTypes from 'prop-types'; import React from 'react'; import { t } from '@superset-ui/translation'; -import Loading from '../../components/Loading'; - const propTypes = { height: PropTypes.number.isRequired, }; @@ -29,9 +27,6 @@ const propTypes = { export default function MissingChart({ height }) { return (
-
- -
{t( 'There is no chart definition associated with this component, could it have been deleted?', diff --git a/superset-frontend/src/dashboard/stylesheets/components/chart.less b/superset-frontend/src/dashboard/stylesheets/components/chart.less index 3858884e1..44ef5dc06 100644 --- a/superset-frontend/src/dashboard/stylesheets/components/chart.less +++ b/superset-frontend/src/dashboard/stylesheets/components/chart.less @@ -29,14 +29,12 @@ flex-direction: column; align-items: center; overflow-y: auto; + justify-content: center; .missing-chart-body { font-size: @font-size-s; - } - - .loading-container { position: relative; - height: 40%; + display: flex; } }