Skip to content

Commit

Permalink
[dashboard] remove loading spinner in missing chart holder (apache#9140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo authored Feb 14, 2020
1 parent f993bdc commit b0110a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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);
});
});
5 changes: 0 additions & 5 deletions superset-frontend/src/dashboard/components/MissingChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,13 @@ 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,
};

export default function MissingChart({ height }) {
return (
<div className="missing-chart-container" style={{ height: height + 20 }}>
<div className="loading-container">
<Loading />
</div>
<div className="missing-chart-body">
{t(
'There is no chart definition associated with this component, could it have been deleted?',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit b0110a7

Please sign in to comment.