Skip to content

Commit

Permalink
return rows
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi committed Feb 19, 2021
1 parent ba40293 commit 3383694
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
24 changes: 0 additions & 24 deletions superset-frontend/src/SqlLab/components/ResultSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { debounce } from 'lodash';
import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace';
import { SaveDatasetModal } from 'src/SqlLab/components/SaveDatasetModal';
import { put as updateDatset } from 'src/api/dataset';
import Icon from 'src/components/Icon';
import Loading from '../../components/Loading';
import ExploreCtasResultsButton from './ExploreCtasResultsButton';
import ExploreResultsButton from './ExploreResultsButton';
Expand Down Expand Up @@ -484,32 +483,9 @@ export default class ResultSet extends React.PureComponent<

rowsReturned() {
const { query } = this.props;
let limitMessage;
const message = query.sql
.split(' ')
.filter((limit: string) => limit === 'LIMIT');
if (message.length > 0) {
limitMessage = t(
`The number of rows displayed is limited to %s by the query.`,
query.rows,
);
} else if (query.queryLimit === query.rows) {
limitMessage = t(
`The number of rows displayed is limited to %s by the limit dropdown.`,
query.queryLimit,
);
}

let limitWarning = null;
if (query.results?.displayLimitReached) {
limitWarning = <Icon className="ReturnedRowsImage" name="warning" />;
}
return (
<div className="ReturnedRows">
{console.log(query)}
{limitWarning}
<span>{t(`%s rows returned`, query.results.data.length)}</span>
<span className="LimitMessage">{limitMessage}</span>
</div>
);
}
Expand Down
13 changes: 0 additions & 13 deletions superset-frontend/src/SqlLab/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -381,19 +381,6 @@ div.tablePopover {
margin-bottom: -32px;
font-size: 13px;
line-height: 24px;

span {
margin-left: 8px;
}

.ReturnedRowsImage {
color: #FF7F43;
vertical-align: bottom;
}

.LimitMessage{
color: #8E94B0;
}
}

.result-set-error-message {
Expand Down

0 comments on commit 3383694

Please sign in to comment.