mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
Build optimizations (#3378)
Bumping some version, removing unused libs, ...
This commit is contained in:
committed by
GitHub
parent
48b88e5241
commit
a782d623f0
@@ -1,9 +1,14 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { github } from 'react-syntax-highlighter/dist/styles';
|
||||
|
||||
import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/dist/light';
|
||||
import sql from 'react-syntax-highlighter/dist/languages/sql';
|
||||
import github from 'react-syntax-highlighter/dist/styles/github';
|
||||
|
||||
import ModalTrigger from '../../components/ModalTrigger';
|
||||
|
||||
registerLanguage('sql', sql);
|
||||
|
||||
const defaultProps = {
|
||||
maxWidth: 50,
|
||||
maxLines: 5,
|
||||
@@ -26,8 +31,8 @@ class HighlightedSql extends React.Component {
|
||||
};
|
||||
}
|
||||
shrinkSql() {
|
||||
const sql = this.props.sql || '';
|
||||
let lines = sql.split('\n');
|
||||
const ssql = this.props.sql || '';
|
||||
let lines = ssql.split('\n');
|
||||
if (lines.length >= this.props.maxLines) {
|
||||
lines = lines.slice(0, this.props.maxLines);
|
||||
lines.push('{...}');
|
||||
|
||||
Reference in New Issue
Block a user