Showing 2,441 of 6,157 total issues
Function CrossFilterTag
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CrossFilterTag = (props: {
filter: CrossFilterIndicator;
orientation: FilterBarOrientation;
removeCrossFilter: (filterId: number) => void;
}) => {
Function loadDatasources
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadDatasources(search: string, page: number, pageSize: number) {
const query = rison.encode({
columns: [
'id',
'table_name',
Function handleSave
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleSave = async () => {
const values: NativeFiltersForm | null = await validateForm(
form,
currentFilterId,
setCurrentFilterId,
Function expandControlConfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function expandControlConfig(
control: ControlSetItem,
controlOverrides: ControlOverrides = {},
): ExpandedControlItem {
// one of the named shared controls
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { didVerify, error, payload } = this.state;
const { children } = this.props;
return didVerify ? (
Function createDatasource
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createDatasource(vizOptions) {
return dispatch => {
dispatch(createDatasourceStarted());
const { dbId, catalog, schema, datasourceName, sql } = vizOptions;
return SupersetClient.post({
Function actions.START_QUERY
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[actions.START_QUERY]() {
let newState = { ...state };
if (action.query.sqlEditorId) {
const qe = {
...getFromArr(state.queryEditors, action.query.sqlEditorId),
Function validate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate(callback) {
let errors = [];
let dups;
const { datasource } = this.state;
Function syncTable
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function syncTable(table, tableMetadata) {
return function (dispatch) {
const sync = isFeatureEnabled(FeatureFlag.SqllabBackendPersistence)
? SupersetClient.post({
endpoint: encodeURI('/tableschemaview/'),
Function formatter
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
formatter: (params: CallbackDataParams) => {
const totals = calculateTotals(
data,
xAxisLabel,
yAxisLabel,
Function getLayer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getLayer: getLayerType<unknown> = (
formData,
payload,
onAddFilter,
setTooltip,
Function dataTabTitle
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const dataTabTitle = useMemo(() => {
if (!props.errorMessage) {
dataTabHasHadNoErrors.current = true;
}
Function CollapseButton
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const CollapseButton = useMemo(() => {
const caretIcon = panelOpen ? (
<Icons.CaretUp
iconColor={theme.colors.grayscale.base}
aria-label={t('Collapse data panel')}
Function getLayer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getLayer(
formData: QueryFormData,
payload: JsonObject,
onAddFilter: HandlerFunction,
setTooltip: (tooltip: TooltipProps['tooltip']) => void,
Function buildQuery
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function buildQuery(formData: QueryFormData) {
const { groupby } = formData;
const [column = ''] = groupby || [];
// @ts-ignore (need update interface Column )
return buildQueryContext(formData, baseQueryObject => [
Function vizTiles
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const vizTiles = useMemo(() => {
const vizTiles = [...FEATURED_CHARTS];
if (
currentSelection &&
FEATURED_CHARTS.every(
Function sortColumn
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sortColumn(col: string, sort = SortOrder.Unsorted) {
const { sortColumns } = this.props;
// default sort logic sorting string, boolean and number
const compareSort = (m: Sort, n: Sort) => {
if (typeof m === 'string') {
Function onSave
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSave = async () => {
await SupersetClient.post({
endpoint: `/api/v1/tag/bulk_create`,
jsonPayload: {
tags: tags.map(tag => ({
Function setupColors
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function setupColors(
extraCategoricalColorSchemeConfigs: ColorSchemeConfig[] = [],
extraSequentialColorSchemeConfigs: SequentialSchemeConfig[] = [],
) {
const extraCategoricalColorSchemes = extraCategoricalColorSchemeConfigs.map(
Function handleKeyDown
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
switch (event.key) {
case 'Escape':
case 'Enter':
// timing out to allow for filter selection to happen first