diff --git a/package.json b/package.json index e4e95ed..6ffd8b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reverse-proxy-frontend", - "version": "1.4.14", + "version": "1.4.15", "private": true, "description": "Reverse proxy frontend application", "author": { diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index b6f4d27..2591c2b 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -123,6 +123,10 @@ "Description": "Description", "Profile": "Profile" } + }, + "ExcludeFromAnalytics": { + "Label": "Exclude from analytics", + "Tooltip": "Exclude this forward from analytics. This will prevent the reverse proxy from collecting any data about this forward." } } }, diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json index cf2bbd7..b5507e3 100644 --- a/public/locales/ro/translations.json +++ b/public/locales/ro/translations.json @@ -114,6 +114,10 @@ "Description": "Descriere", "Profile": "Profil" } + }, + "ExcludeFromAnalytics": { + "Label": "Exclude din analitice", + "Tooltip": "Exclude această redirecționare din analitice. Aceasta va împiedica reverse proxy-ul să colecteze date despre această redirecționare." } } }, diff --git a/src/features/forwards/options/components/advanced/ForwardOptionsAdvancedComponent.js b/src/features/forwards/options/components/advanced/ForwardOptionsAdvancedComponent.js index 1253594..fff964f 100644 --- a/src/features/forwards/options/components/advanced/ForwardOptionsAdvancedComponent.js +++ b/src/features/forwards/options/components/advanced/ForwardOptionsAdvancedComponent.js @@ -8,6 +8,7 @@ import SpecificHeadersCard from "./specificHeaders/SpecificHeadersCard"; import UpstreamSchemeCard from "./upstreamScheme/UpstreamSchemeCard"; import SslPolicyCard from "./sslPolicy/SslPolicyCard"; import IpFilteringCard from "./ipFiltering/IpFilteringCard"; +import ExcludeAnalyticsCard from "./analytics/ExcludeAnalyticsCard"; const ForwardOptionsAdvancedComponent = ({ options }) => { return ( @@ -60,6 +61,12 @@ const ForwardOptionsAdvancedComponent = ({ options }) => {
)} + {options.excludeFromAnalytics && ( + <> + +
+ + )} ); }; diff --git a/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsCard.js b/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsCard.js new file mode 100644 index 0000000..5ffb238 --- /dev/null +++ b/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsCard.js @@ -0,0 +1,27 @@ +import React from "react"; +import PropTypes from "prop-types"; +import ExpandableCard from "../../../../../../components/common/ExpandableCard"; +import { useTranslation } from "react-i18next"; +import ExcludeAnalyticsSummary from "./ExcludeAnalyticsSummary"; +import CancelScheduleSendIcon from "@material-ui/icons/CancelScheduleSend"; + +const ExcludeAnalyticsCard = ({ enabled }) => { + const { t } = useTranslation(); + + return ( + } + title={t("Forward.Options.ExcludeFromAnalytics.Label")} + subtitle={t("Forward.Options.ExcludeFromAnalytics.Tooltip")} + Summary={} + expandable={false} + Content={
...
} + /> + ); +}; + +ExcludeAnalyticsCard.propTypes = { + enabled: PropTypes.bool.isRequired +}; + +export default ExcludeAnalyticsCard; diff --git a/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsSummary.js b/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsSummary.js new file mode 100644 index 0000000..618a5af --- /dev/null +++ b/src/features/forwards/options/components/advanced/analytics/ExcludeAnalyticsSummary.js @@ -0,0 +1,24 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { Grid } from "@material-ui/core"; +import { useTranslation } from "react-i18next"; +import ActiveIcon from "../../../../../../components/common/ActiveIcon"; + +const TrailingSlashSummary = ({ enabled }) => { + const { t } = useTranslation(); + + return ( + + + {`${t("General.Enabled")}: `} + + + + ); +}; + +TrailingSlashSummary.propTypes = { + enabled: PropTypes.bool.isRequired +}; + +export default TrailingSlashSummary; diff --git a/src/features/forwards/options/components/simple/ForwardOptionsComponent.js b/src/features/forwards/options/components/simple/ForwardOptionsComponent.js index 4766641..870299d 100644 --- a/src/features/forwards/options/components/simple/ForwardOptionsComponent.js +++ b/src/features/forwards/options/components/simple/ForwardOptionsComponent.js @@ -68,6 +68,11 @@ const ForwardOptionsComponent = ({ title, options }) => { label: "Forward.Options.IpFiltering.Label", tooltip: "Forward.Options.IpFiltering.Tooltip", active: !!options.ipFiltering + }, + { + label: "Forward.Options.ExcludeFromAnalytics.Label", + tooltip: "Forward.Options.ExcludeFromAnalytics.Tooltip", + active: !!options.excludeFromAnalytics } ], [options]