Skip to content

Commit

Permalink
lets see
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Mar 13, 2023
1 parent 2ecc551 commit 5e58477
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4 # Use the sha or tag you want to point at
rev: v3.0.0-alpha.0 # Use the sha or tag you want to point at
hooks:
- id: prettier
args: ["--ignore-path=./superset-frontend/.prettierignore"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,12 @@ export const extractForecastSeriesContext = (
export const extractForecastSeriesContexts = (
seriesNames: string[],
): { [key: string]: ForecastSeriesEnum[] } =>
seriesNames.reduce(
(agg, name) => {
const context = extractForecastSeriesContext(name);
const currentContexts = agg[context.name] || [];
currentContexts.push(context.type);
return { ...agg, [context.name]: currentContexts };
},
{} as { [key: string]: ForecastSeriesEnum[] },
);
seriesNames.reduce((agg, name) => {
const context = extractForecastSeriesContext(name);
const currentContexts = agg[context.name] || [];
currentContexts.push(context.type);
return { ...agg, [context.name]: currentContexts };
}, {} as { [key: string]: ForecastSeriesEnum[] });

export const extractForecastValuesFromTooltipParams = (
params: any[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ const processColumns = memoizeOne(function processColumns(
typeof percentMetrics,
typeof columns,
];
}, isEqualColumns);
},
isEqualColumns);

/**
* Automatically set page size based on number of cells.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const StyledMenu = styled(Menu)`
font-size: ${theme.typography.sizes.s}px;
color: ${theme.colors.grayscale.base};
padding: ${theme.gridUnit}px ${theme.gridUnit * 3}px ${
theme.gridUnit
}px ${theme.gridUnit * 3}px;
theme.gridUnit
}px ${theme.gridUnit * 3}px;
}
.ant-dropdown-menu-item-selected {
color: ${theme.colors.grayscale.dark1};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const HeaderButton = styled(Button)`
const Wrapper = styled.div`
${({ theme }) => `
padding: ${theme.gridUnit * 3}px ${theme.gridUnit * 2}px ${
theme.gridUnit
}px;
theme.gridUnit
}px;
.ant-dropdown-trigger span {
padding-right: ${theme.gridUnit * 2}px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import crossFiltersSelector from './CrossFilters/selectors';
const HorizontalBar = styled.div`
${({ theme }) => `
padding: ${theme.gridUnit * 3}px ${theme.gridUnit * 2}px ${
theme.gridUnit * 3
}px ${theme.gridUnit * 4}px;
theme.gridUnit * 3
}px ${theme.gridUnit * 4}px;
background: ${theme.colors.grayscale.light5};
box-shadow: inset 0px -2px 2px -1px ${theme.colors.grayscale.light2};
`}
Expand Down
13 changes: 5 additions & 8 deletions superset-frontend/src/visualizations/TimeTable/transformProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ export default function transformProps(chartProps: TableChartProps) {
);
} else {
/* eslint-disable */
const metricMap = datasource.metrics.reduce(
(acc, current) => {
const map = acc;
map[current.metric_name] = current;
return map;
},
{} as Record<string, Metric>,
);
const metricMap = datasource.metrics.reduce((acc, current) => {
const map = acc;
map[current.metric_name] = current;
return map;
}, {} as Record<string, Metric>);
/* eslint-disable */
rows = metrics.map(metric =>
typeof metric === 'object' ? metric : metricMap[metric],
Expand Down

0 comments on commit 5e58477

Please sign in to comment.