Pull request: fix client schedule update
Squashed commit of the following: commit b3c6c20aa5196053754e73db613c1c459ef9236b Merge: dfd1eff376dbeb5b97
Author: Ildar Kamalov <ik@adguard.com> Date: Tue Jan 16 13:31:45 2024 +0300 Merge branch 'master' into ADG-7988 commit dfd1eff37f5f2c02f2053bffbec4cc2e524429c3 Merge: 2de46aaf6f7995aa02
Author: Ildar Kamalov <ik@adguard.com> Date: Tue Jan 16 12:42:39 2024 +0300 Merge branch 'master' into ADG-7988 commit 2de46aaf6834389fa71806089663e72479f72717 Merge: ac5a23c191e0ff4d43
Author: Ildar Kamalov <ik@adguard.com> Date: Fri Jan 12 13:19:39 2024 +0300 Merge branch 'master' into ADG-7988 commit ac5a23c199cee65150029a307f9398e5022dd62f Author: Ildar Kamalov <ik@adguard.com> Date: Thu Jan 11 10:28:07 2024 +0300 fix error commit d0103f4556a39b7c285f216f7453178439b92165 Author: Ildar Kamalov <ik@adguard.com> Date: Wed Jan 10 19:19:22 2024 +0300 ADG-7988 fix client schedule update
This commit is contained in:
parent
6dbeb5b971
commit
9694f19efe
|
@ -71,6 +71,7 @@ In this release, the schema version has changed from 27 to 28.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Schedule display in the client settings after creating or updating.
|
||||||
- Zero value in `querylog.size_memory` disables logging ([#6570]).
|
- Zero value in `querylog.size_memory` disables logging ([#6570]).
|
||||||
- Non-anonymized IP addresses on the dashboard ([#6584]).
|
- Non-anonymized IP addresses on the dashboard ([#6584]).
|
||||||
- Maximum cache TTL requirement when editing minimum cache TTL in the Web UI
|
- Maximum cache TTL requirement when editing minimum cache TTL in the Web UI
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useMemo } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import cn from 'classnames';
|
import cn from 'classnames';
|
||||||
|
@ -21,10 +21,7 @@ export const ScheduleForm = ({
|
||||||
const onModalOpen = () => setModalOpen(true);
|
const onModalOpen = () => setModalOpen(true);
|
||||||
const onModalClose = () => setModalOpen(false);
|
const onModalClose = () => setModalOpen(false);
|
||||||
|
|
||||||
const filteredScheduleKeys = useMemo(() => (
|
const filteredScheduleKeys = schedule ? Object.keys(schedule).filter((v) => v !== 'time_zone') : [];
|
||||||
schedule ? Object.keys(schedule).filter((v) => v !== 'time_zone') : []
|
|
||||||
), [schedule]);
|
|
||||||
|
|
||||||
const scheduleMap = new Map();
|
const scheduleMap = new Map();
|
||||||
filteredScheduleKeys.forEach((day) => scheduleMap.set(day, schedule[day]));
|
filteredScheduleKeys.forEach((day) => scheduleMap.set(day, schedule[day]));
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ let Form = (props) => {
|
||||||
const [activeTabLabel, setActiveTabLabel] = useState('settings');
|
const [activeTabLabel, setActiveTabLabel] = useState('settings');
|
||||||
|
|
||||||
const handleScheduleSubmit = (values) => {
|
const handleScheduleSubmit = (values) => {
|
||||||
change('blocked_services_schedule', values);
|
change('blocked_services_schedule', { ...values });
|
||||||
};
|
};
|
||||||
|
|
||||||
const tabs = {
|
const tabs = {
|
||||||
|
|
Loading…
Reference in New Issue