Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into AG-25263-filtering-…
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
Mizzick committed Aug 30, 2023
2 parents a50ff16 + aac36a2 commit c66d14c
Show file tree
Hide file tree
Showing 64 changed files with 1,542 additions and 240 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ In this release, the schema version has changed from 24 to 26.

### Fixed

- Missing query log entries and statistics on service restart ([#6100]).
- Occasional DNS-over-QUIC and DNS-over-HTTP/3 errors ([#6133]).
- Legacy DNS rewrites containing IPv4-mapped IPv6 addresses are now matching the
`AAAA` requests, not `A` ([#6050]).
Expand All @@ -154,6 +155,7 @@ In this release, the schema version has changed from 24 to 26.
[#6050]: https://github.com/AdguardTeam/AdGuardHome/issues/6050
[#6053]: https://github.com/AdguardTeam/AdGuardHome/issues/6053
[#6093]: https://github.com/AdguardTeam/AdGuardHome/issues/6093
[#6100]: https://github.com/AdguardTeam/AdGuardHome/issues/6100
[#6122]: https://github.com/AdguardTeam/AdGuardHome/issues/6122
[#6133]: https://github.com/AdguardTeam/AdGuardHome/issues/6133

Expand Down
15 changes: 14 additions & 1 deletion client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@
}
],
"import/prefer-default-export": "off",
"no-alert": "off"
"no-alert": "off",
"arrow-body-style": "off",
"max-len": [
"error",
120,
2,
{
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
]
}
}
2 changes: 1 addition & 1 deletion client/dev.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ".eslintrc",
"rules": {
"no-debugger":"warn",
"no-debugger":"warn"
}
}
5 changes: 5 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"redux-form": "^8.3.5",
"redux-thunk": "^2.3.0",
"string-length": "^5.0.1",
"timezones-list": "^3.0.2",
"url-polyfill": "^1.1.9"
},
"devDependencies": {
Expand Down
34 changes: 33 additions & 1 deletion client/src/__locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,5 +680,37 @@
"protection_section_label": "Protection",
"log_and_stats_section_label": "Query log and statistics",
"ignore_query_log": "Ignore this client in query log",
"ignore_statistics": "Ignore this client in statistics"
"ignore_statistics": "Ignore this client in statistics",
"schedule_services": "Pause service blocking",
"schedule_services_desc": "Configure the pause schedule of the service-blocking filter",
"schedule_services_desc_client": "Configure the pause schedule of the service-blocking filter for this client",
"schedule_desc": "Set inactivity periods for blocked services",
"schedule_invalid_select": "Start time must be before end time",
"schedule_select_days": "Select days",
"schedule_timezone": "Select a time zone",
"schedule_current_timezone": "Current time zone: {{value}}",
"schedule_time_all_day": "All day",
"schedule_modal_description": "This schedule will replace any existing schedules for the same day of the week. Each day of the week can have only one inactivity period.",
"schedule_modal_time_off": "No service blocking:",
"schedule_new": "New schedule",
"schedule_edit": "Edit schedule",
"schedule_save": "Save schedule",
"schedule_add": "Add schedule",
"schedule_remove": "Remove schedule",
"schedule_from": "From",
"schedule_to": "To",
"sunday": "Sunday",
"monday": "Monday",
"tuesday": "Tuesday",
"wednesday": "Wednesday",
"thursday": "Thursday",
"friday": "Friday",
"saturday": "Saturday",
"sunday_short": "Sun",
"monday_short": "Mon",
"tuesday_short": "Tue",
"wednesday_short": "Wed",
"thursday_short": "Thu",
"friday_short": "Fri",
"saturday_short": "Sat"
}
16 changes: 8 additions & 8 deletions client/src/actions/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ export const getAllBlockedServices = () => async (dispatch) => {
}
};

export const setBlockedServicesRequest = createAction('SET_BLOCKED_SERVICES_REQUEST');
export const setBlockedServicesFailure = createAction('SET_BLOCKED_SERVICES_FAILURE');
export const setBlockedServicesSuccess = createAction('SET_BLOCKED_SERVICES_SUCCESS');
export const updateBlockedServicesRequest = createAction('UPDATE_BLOCKED_SERVICES_REQUEST');
export const updateBlockedServicesFailure = createAction('UPDATE_BLOCKED_SERVICES_FAILURE');
export const updateBlockedServicesSuccess = createAction('UPDATE_BLOCKED_SERVICES_SUCCESS');

export const setBlockedServices = (values) => async (dispatch) => {
dispatch(setBlockedServicesRequest());
export const updateBlockedServices = (values) => async (dispatch) => {
dispatch(updateBlockedServicesRequest());
try {
await apiClient.setBlockedServices(values);
dispatch(setBlockedServicesSuccess());
await apiClient.updateBlockedServices(values);
dispatch(updateBlockedServicesSuccess());
dispatch(getBlockedServices());
dispatch(addSuccessToast('blocked_services_saved'));
} catch (error) {
dispatch(addErrorToast({ error }));
dispatch(setBlockedServicesFailure());
dispatch(updateBlockedServicesFailure());
}
};
10 changes: 5 additions & 5 deletions client/src/api/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ class Api {
}

// Blocked services
BLOCKED_SERVICES_LIST = { path: 'blocked_services/list', method: 'GET' };
BLOCKED_SERVICES_GET = { path: 'blocked_services/get', method: 'GET' };

BLOCKED_SERVICES_SET = { path: 'blocked_services/set', method: 'POST' };
BLOCKED_SERVICES_UPDATE = { path: 'blocked_services/update', method: 'PUT' };

BLOCKED_SERVICES_ALL = { path: 'blocked_services/all', method: 'GET' };

Expand All @@ -501,12 +501,12 @@ class Api {
}

getBlockedServices() {
const { path, method } = this.BLOCKED_SERVICES_LIST;
const { path, method } = this.BLOCKED_SERVICES_GET;
return this.makeRequest(path, method);
}

setBlockedServices(config) {
const { path, method } = this.BLOCKED_SERVICES_SET;
updateBlockedServices(config) {
const { path, method } = this.BLOCKED_SERVICES_UPDATE;
const parameters = {
data: config,
};
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/App/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ body {
}

.container--wrap {
min-height: calc(100vh - 160px);
min-height: calc(100vh - 372px);
}

@media screen and (min-width: 992px) {
@media screen and (min-width: 768px) {
.container--wrap {
min-height: calc(100vh - 117px);
min-height: calc(100vh - 168px);
}
}

@media screen and (max-width: 992px) {
@media screen and (min-width: 992px) {
.container--wrap {
min-height: calc(100vh);
min-height: calc(100vh - 187px);
}
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const App = () => {
<LoadingBar className="loading-bar" updateTime={1000} />
<Header />
<ProtectionTimer />
<div className="container container--wrap pb-5">
<div className="container container--wrap pb-5 pt-5">
{processing && <Loading />}
{!isCoreRunning && <div className="row row-cards">
<div className="col-lg-12">
Expand Down
Loading

0 comments on commit c66d14c

Please sign in to comment.