Showing 2,441 of 6,157 total issues
Function contextmenu
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
contextmenu: async eventParams => {
if (onContextMenu) {
eventParams.event.stop();
const { data, treePathInfo } = eventParams;
const { treePath } = extractTreePathInfo(treePathInfo);
Function customTimeRangeEncode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const customTimeRangeEncode = (customRange: CustomRangeType): string => {
const {
sinceDatetime,
sinceMode,
sinceGrain,
Function useApiResourceFullBody
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useApiResourceFullBody<RESULT>(
endpoint: string,
): Resource<RESULT> {
const [resource, setResource] = useState<Resource<RESULT>>(initialState);
const cancelRef = useRef<() => void>(() => {});
Function useCatalogs
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useCatalogs(options: Params) {
const { dbId, onSuccess, onError } = options || {};
const [trigger] = useLazyCatalogsQuery();
const result = useCatalogsQuery(
{ dbId, forceRefresh: false },
Function getFormDataWithDashboardContext
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getFormDataWithDashboardContext = (
exploreFormData: QueryFormData,
dashboardContextFormData: JsonObject,
) => {
const filterBoxData = mergeFilterBoxToFormData(
Function transformProps
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(chartProps: ChartProps) {
const {
formData,
height,
hooks,
Function pluginContextReducer
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pluginContextReducer(
state: PluginContextType,
action: PluginAction,
): PluginContextType {
switch (action.type) {
Function renderFinishState
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderFinishState = () => {
if (!editNewDb) {
return (
<ExtraOptions
extraExtension={dbConfigExtraExtension}
Function useInitialization
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useInitialization = () => {
const [isInitialized, setIsInitialized] = useState<boolean>(false);
const filters = useFilters();
const charts = useSelector<RootState, ChartsState>(state => state.charts);
Function story
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const story = (
host: string,
mode: string | number,
width: number,
height: number,
Function componentDidMount
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
const { datasource } = this.props;
if (datasource && datasource.type === 'table') {
const dbId = datasource.database?.id;
const {
Function estimateQueryCost
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function estimateQueryCost(queryEditor) {
return (dispatch, getState) => {
const { dbId, catalog, schema, sql, selectedText, templateParams } =
getUpToDateQuery(getState(), queryEditor);
const requestSql = selectedText || sql;
Function fetchQueryEditor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchQueryEditor(queryEditor, displayLimit) {
return function (dispatch) {
SupersetClient.get({
endpoint: encodeURI(`/tabstateview/${queryEditor.id}`),
})
Function onChangeFilterField
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onChangeFilterField(filterField = {}) {
const { layout } = this.props;
const nextActiveFilterField = filterField.value;
const {
activeFilterField: currentActiveFilterField,
Function getCrossFilterDataMask
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(value: string) => {
const selected: string[] = Object.values(selectedValues);
let values: string[];
if (selected.includes(value)) {
values = selected.filter(v => v !== value);
Function constructor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('../../EchartsTimeseries'),
Function constructor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('./EchartsPie'),
Function renderSubheader
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderSubheader(maxHeight: number) {
const { bigNumber, subheader, width, bigNumberFallback } = this.props;
let fontSize = 0;
const NO_DATA_OR_HASNT_LANDED = t(
Function buildQuery
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function buildQuery(formData: HeatmapFormData) {
const { groupby, normalize_across, sort_x_axis, sort_y_axis, x_axis } =
formData;
const metric = getMetricLabel(formData.metric);
const columns = [
Function buildQuery
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function buildQuery(formData: QueryFormData) {
const { cols: groupby } = formData;
const queryContextA = buildQueryContext(formData, baseQueryObject => {
const postProcessing: PostProcessingRule[] = [];