mirror of
https://dev.azure.com/tstanciu94/ReverseProxy/_git/ReverseProxy_Frontend
synced 2025-08-05 17:22:36 +03:00
Add ExcludeFromAnalytics feature with translations and UI components
This commit is contained in:
parent
346f280796
commit
21040b0158
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reverse-proxy-frontend",
|
"name": "reverse-proxy-frontend",
|
||||||
"version": "1.4.14",
|
"version": "1.4.15",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Reverse proxy frontend application",
|
"description": "Reverse proxy frontend application",
|
||||||
"author": {
|
"author": {
|
||||||
|
@ -123,6 +123,10 @@
|
|||||||
"Description": "Description",
|
"Description": "Description",
|
||||||
"Profile": "Profile"
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -114,6 +114,10 @@
|
|||||||
"Description": "Descriere",
|
"Description": "Descriere",
|
||||||
"Profile": "Profil"
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -8,6 +8,7 @@ import SpecificHeadersCard from "./specificHeaders/SpecificHeadersCard";
|
|||||||
import UpstreamSchemeCard from "./upstreamScheme/UpstreamSchemeCard";
|
import UpstreamSchemeCard from "./upstreamScheme/UpstreamSchemeCard";
|
||||||
import SslPolicyCard from "./sslPolicy/SslPolicyCard";
|
import SslPolicyCard from "./sslPolicy/SslPolicyCard";
|
||||||
import IpFilteringCard from "./ipFiltering/IpFilteringCard";
|
import IpFilteringCard from "./ipFiltering/IpFilteringCard";
|
||||||
|
import ExcludeAnalyticsCard from "./analytics/ExcludeAnalyticsCard";
|
||||||
|
|
||||||
const ForwardOptionsAdvancedComponent = ({ options }) => {
|
const ForwardOptionsAdvancedComponent = ({ options }) => {
|
||||||
return (
|
return (
|
||||||
@ -60,6 +61,12 @@ const ForwardOptionsAdvancedComponent = ({ options }) => {
|
|||||||
<br />
|
<br />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{options.excludeFromAnalytics && (
|
||||||
|
<>
|
||||||
|
<ExcludeAnalyticsCard enabled={options.excludeFromAnalytics} />
|
||||||
|
<br />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -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 (
|
||||||
|
<ExpandableCard
|
||||||
|
Icon={<CancelScheduleSendIcon />}
|
||||||
|
title={t("Forward.Options.ExcludeFromAnalytics.Label")}
|
||||||
|
subtitle={t("Forward.Options.ExcludeFromAnalytics.Tooltip")}
|
||||||
|
Summary={<ExcludeAnalyticsSummary enabled={enabled} />}
|
||||||
|
expandable={false}
|
||||||
|
Content={<div>...</div>}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ExcludeAnalyticsCard.propTypes = {
|
||||||
|
enabled: PropTypes.bool.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ExcludeAnalyticsCard;
|
@ -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 (
|
||||||
|
<Grid container>
|
||||||
|
<Grid item xs={6} sm={3} md={3}>
|
||||||
|
{`${t("General.Enabled")}: `}
|
||||||
|
<ActiveIcon active={enabled} />
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
TrailingSlashSummary.propTypes = {
|
||||||
|
enabled: PropTypes.bool.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TrailingSlashSummary;
|
@ -68,6 +68,11 @@ const ForwardOptionsComponent = ({ title, options }) => {
|
|||||||
label: "Forward.Options.IpFiltering.Label",
|
label: "Forward.Options.IpFiltering.Label",
|
||||||
tooltip: "Forward.Options.IpFiltering.Tooltip",
|
tooltip: "Forward.Options.IpFiltering.Tooltip",
|
||||||
active: !!options.ipFiltering
|
active: !!options.ipFiltering
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Forward.Options.ExcludeFromAnalytics.Label",
|
||||||
|
tooltip: "Forward.Options.ExcludeFromAnalytics.Tooltip",
|
||||||
|
active: !!options.excludeFromAnalytics
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[options]
|
[options]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user