Showing 2,441 of 6,157 total issues
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { isPublished, userCanEdit, userCanSave } = this.props;
// Show everybody the draft badge
if (!isPublished) {
Function shouldComponentUpdate
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shouldComponentUpdate(nextProps, nextState) {
// this logic mostly pertains to chart resizing. we keep a copy of the dimensions in
// state so that we can buffer component size updates and only update on the final call
// which improves performance significantly
if (
Function filterTree
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
filterTree() {
// Reset nodes back to unfiltered state
if (!this.state.searchText) {
this.setState(prevState => {
const { activeFilterField, checkedFilterFields, filterScopeMap } =
Function DeckGLScreenGrid
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DeckGLScreenGrid = (props: DeckGLScreenGridProps) => {
const containerRef = useRef<DeckGLContainerHandle>();
const getAdjustedViewport = useCallback(() => {
const features = props.payload.data.features || [];
Function AdvancedFrame
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function AdvancedFrame(props: FrameComponentProps) {
const advancedRange = getAdvancedRange(props.value || '');
const [since, until] = advancedRange.split(SEPARATOR);
if (advancedRange !== props.value) {
props.onChange(getAdvancedRange(props.value || ''));
Function useFavoriteStatus
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useFavoriteStatus(
type: 'chart' | 'dashboard' | 'tag',
ids: Array<string | number>,
handleErrorMsg: (message: string) => void,
) {
Function queryPane
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const queryPane = () => {
const { aceEditorHeight, southPaneHeight } =
getAceEditorAndSouthPaneHeights(height, northPercent, southPercent);
return (
<Split
Function loadDatabases
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async (
search: string,
page: number,
pageSize: number,
): Promise<{
Function getRelatedCharts
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getRelatedCharts(
filters: Record<
string,
AppliedNativeFilterType | AppliedCrossFilterType | Filter
>,
Function reactify
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function reactify<Props extends object>(
renderFn: RenderFuncType<Props>,
callbacks?: LifeCycleCallbacks,
): ComponentClass<Props & ReactifyProps> {
class ReactifiedComponent extends Component<Props & ReactifyProps> {
Function drawBarValues
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function drawBarValues(svg, data, stacked, axisFormat) {
const format = getNumberFormatter(axisFormat);
const countSeriesDisplayed = data.filter(d => !d.disabled).length;
const totalStackedValues =
stacked && data.length !== 0
Function SankeyLoop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SankeyLoop(element, props) {
const { data, width, height, colorScheme, sliceId } = props;
const color = CategoricalColorNamespace.getScale(colorScheme);
const margin = { ...defaultMargin, ...props.margin };
const innerWidth = width - margin.left - margin.right;
Function runQuery
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function runQuery(query) {
return function (dispatch) {
dispatch(startQuery(query));
const postPayload = {
client_id: query.id,
Function ViewQueryModal
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ViewQueryModal: FC<Props> = props => {
const [result, setResult] = useState<Result[]>([]);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
Function Component
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Component = (props: DropdownContainerProps) => {
const [items, setItems] = useState<ItemsType>([]);
const [overflowingState, setOverflowingState] = useState<OverflowingState>();
const containerRef = useRef<Ref>(null);
const onOverflowingStateChange = useCallback(
Function handleDashboardEdit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleDashboardEdit(edits: Dashboard) {
return SupersetClient.get({
endpoint: `/api/v1/dashboard/${edits.id}`,
}).then(
({ json = {} }) => {
Function finestTemporalGrain
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function finestTemporalGrain(
values: any[],
useLocalTime = false,
) {
const format = useLocalTime ? timeFormat : utcFormat;
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
className,
width,
height,
Function create
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create(context) {
const warned = [];
return {
TemplateElement(node) {
const rawValue = node?.value?.raw;
Function MOVE_COMPONENT
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[MOVE_COMPONENT](state, action) {
const {
payload: { dropResult },
} = action;
const { source, destination, dragging, position } = dropResult;