diff --git a/web/src/locales/en.po b/web/src/locales/en.po index efcba218c..e28870d4f 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -218,6 +218,22 @@ msgstr "Applications" msgid "Apps with most usage" msgstr "Apps with most usage" +#: src/pages/flows/FlowListPage.ts +msgid "" +"Are you sure you want to clear the flow cache?\n" +"This will cause all flows to be re-evaluated on their next usage." +msgstr "" +"Are you sure you want to clear the flow cache?\n" +"This will cause all flows to be re-evaluated on their next usage." + +#: src/pages/policies/PolicyListPage.ts +msgid "" +"Are you sure you want to clear the policy cache?\n" +"This will cause all policies to be re-evaluated on their next usage." +msgstr "" +"Are you sure you want to clear the policy cache?\n" +"This will cause all policies to be re-evaluated on their next usage." + #: src/elements/forms/DeleteForm.ts msgid "Are you sure you want to delete {0} {objName} ?" msgstr "Are you sure you want to delete {0} {objName} ?" @@ -530,6 +546,21 @@ msgstr "Checks if the request's user's password has been changed in the last x d msgid "Checks the value from the policy request against several rules, mostly used to ensure password strength." msgstr "Checks the value from the policy request against several rules, mostly used to ensure password strength." +#: src/pages/flows/FlowListPage.ts +msgid "Clear Flow cache" +msgstr "Clear Flow cache" + +#: src/pages/policies/PolicyListPage.ts +msgid "Clear Policy cache" +msgstr "Clear Policy cache" + +#: src/pages/flows/FlowListPage.ts +#: src/pages/flows/FlowListPage.ts +#: src/pages/policies/PolicyListPage.ts +#: src/pages/policies/PolicyListPage.ts +msgid "Clear cache" +msgstr "Clear cache" + #: src/elements/forms/HorizontalFormElement.ts msgid "Click to change value" msgstr "Click to change value" @@ -1316,6 +1347,14 @@ msgstr "Failed attempts before cancel" msgid "Failed sources" msgstr "Failed sources" +#: src/pages/flows/FlowListPage.ts +msgid "Failed to delete flow cache" +msgstr "Failed to delete flow cache" + +#: src/pages/policies/PolicyListPage.ts +msgid "Failed to delete policy cache" +msgstr "Failed to delete policy cache" + #: src/elements/forms/DeleteForm.ts msgid "Failed to delete {0}: {1}" msgstr "Failed to delete {0}: {1}" @@ -3081,6 +3120,14 @@ msgstr "Subject-alt name" msgid "Successful" msgstr "Successful" +#: src/pages/flows/FlowListPage.ts +msgid "Successfully cleared flow cache" +msgstr "Successfully cleared flow cache" + +#: src/pages/policies/PolicyListPage.ts +msgid "Successfully cleared policy cache" +msgstr "Successfully cleared policy cache" + #: src/flows/stages/authenticator_totp/AuthenticatorTOTPStage.ts msgid "Successfully copied TOTP Config." msgstr "Successfully copied TOTP Config." diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 04b7adf1e..79893082b 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -218,6 +218,18 @@ msgstr "" msgid "Apps with most usage" msgstr "" +#: +msgid "" +"Are you sure you want to clear the flow cache?\n" +"This will cause all flows to be re-evaluated on their next usage." +msgstr "" + +#: +msgid "" +"Are you sure you want to clear the policy cache?\n" +"This will cause all policies to be re-evaluated on their next usage." +msgstr "" + #: msgid "Are you sure you want to delete {0} {objName} ?" msgstr "" @@ -528,6 +540,21 @@ msgstr "" msgid "Checks the value from the policy request against several rules, mostly used to ensure password strength." msgstr "" +#: +msgid "Clear Flow cache" +msgstr "" + +#: +msgid "Clear Policy cache" +msgstr "" + +#: +#: +#: +#: +msgid "Clear cache" +msgstr "" + #: msgid "Click to change value" msgstr "" @@ -1312,6 +1339,14 @@ msgstr "" msgid "Failed sources" msgstr "" +#: +msgid "Failed to delete flow cache" +msgstr "" + +#: +msgid "Failed to delete policy cache" +msgstr "" + #: msgid "Failed to delete {0}: {1}" msgstr "" @@ -3077,6 +3112,14 @@ msgstr "" msgid "Successful" msgstr "" +#: +msgid "Successfully cleared flow cache" +msgstr "" + +#: +msgid "Successfully cleared policy cache" +msgstr "" + #: msgid "Successfully copied TOTP Config." msgstr "" diff --git a/web/src/pages/flows/FlowListPage.ts b/web/src/pages/flows/FlowListPage.ts index 3b5e1adb7..dae3f7472 100644 --- a/web/src/pages/flows/FlowListPage.ts +++ b/web/src/pages/flows/FlowListPage.ts @@ -6,6 +6,7 @@ import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/SpinnerButton"; import "../../elements/forms/DeleteForm"; import "../../elements/forms/ModalForm"; +import "../../elements/forms/ConfirmationForm"; import "./FlowForm"; import "./FlowImportForm"; import { TableColumn } from "../../elements/table/Table"; @@ -132,6 +133,24 @@ export class FlowListPage extends TablePage { ${super.renderToolbar()} - `; + { + return new FlowsApi(DEFAULT_CONFIG).flowsInstancesCacheClearCreate(); + }}> + + ${t`Clear Flow cache`} + +

+ ${t`Are you sure you want to clear the flow cache? + This will cause all flows to be re-evaluated on their next usage.`} +

+ +
+
`; } } diff --git a/web/src/pages/policies/PolicyListPage.ts b/web/src/pages/policies/PolicyListPage.ts index 93c7a15f9..f67bacedf 100644 --- a/web/src/pages/policies/PolicyListPage.ts +++ b/web/src/pages/policies/PolicyListPage.ts @@ -8,6 +8,7 @@ import "../../elements/buttons/SpinnerButton"; import "../../elements/forms/DeleteForm"; import "../../elements/forms/ModalForm"; import "../../elements/forms/ProxyForm"; +import "../../elements/forms/ConfirmationForm"; import "./PolicyTestForm"; import { TableColumn } from "../../elements/table/Table"; import { until } from "lit-html/directives/until"; @@ -150,7 +151,26 @@ export class PolicyListPage extends TablePage { }), html``)} - ${super.renderToolbar()}`; + ${super.renderToolbar()} + { + return new PoliciesApi(DEFAULT_CONFIG).policiesAllCacheClearCreate(); + }}> + + ${t`Clear Policy cache`} + +

+ ${t`Are you sure you want to clear the policy cache? + This will cause all policies to be re-evaluated on their next usage.`} +

+ +
+
`; } }