mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore(deps-dev): bump oxlint from 1.48.0 to 1.49.0 in /superset-frontend (#38115)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
@@ -610,6 +610,20 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
const [emailSubject, setEmailSubject] = useState<string>('');
|
||||
const [emailError, setEmailError] = useState(false);
|
||||
|
||||
const allowedNotificationMethodsCount = useMemo(
|
||||
() =>
|
||||
allowedNotificationMethods.reduce((accum: string[], setting: string) => {
|
||||
if (
|
||||
accum.some(nm => nm.includes('slack')) &&
|
||||
setting.toLowerCase().includes('slack')
|
||||
) {
|
||||
return accum;
|
||||
}
|
||||
return [...accum, setting.toLowerCase()];
|
||||
}, []).length,
|
||||
[allowedNotificationMethods],
|
||||
);
|
||||
|
||||
const onNotificationAdd = () => {
|
||||
setNotificationSettings([
|
||||
...notificationSettings,
|
||||
@@ -2013,20 +2027,6 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
|
||||
enforceValidation();
|
||||
}, [validationStatus]);
|
||||
|
||||
const allowedNotificationMethodsCount = useMemo(
|
||||
() =>
|
||||
allowedNotificationMethods.reduce((accum: string[], setting: string) => {
|
||||
if (
|
||||
accum.some(nm => nm.includes('slack')) &&
|
||||
setting.toLowerCase().includes('slack')
|
||||
) {
|
||||
return accum;
|
||||
}
|
||||
return [...accum, setting.toLowerCase()];
|
||||
}, []).length,
|
||||
[allowedNotificationMethods],
|
||||
);
|
||||
|
||||
// Show/hide
|
||||
if (isHidden && show) {
|
||||
setIsHidden(false);
|
||||
|
||||
@@ -712,6 +712,12 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||
) ||
|
||||
{};
|
||||
|
||||
const handleClearValidationErrors = useCallback(() => {
|
||||
setValidationErrors(null);
|
||||
setHasValidated(false);
|
||||
clearError();
|
||||
}, [setValidationErrors, setHasValidated, clearError]);
|
||||
|
||||
// Test Connection logic
|
||||
const testConnection = () => {
|
||||
handleClearValidationErrors();
|
||||
@@ -773,12 +779,6 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||
[],
|
||||
);
|
||||
|
||||
const handleClearValidationErrors = useCallback(() => {
|
||||
setValidationErrors(null);
|
||||
setHasValidated(false);
|
||||
clearError();
|
||||
}, [setValidationErrors, setHasValidated, clearError]);
|
||||
|
||||
const handleParametersChange = useCallback(
|
||||
({ target }: { target: HTMLInputElement }) => {
|
||||
onChange(ActionType.ParametersChange, {
|
||||
|
||||
Reference in New Issue
Block a user