Skip to content

FIX: Enhance transport rule page with icons and fix templating #3377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/pages/email/connectionfilter/list-templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ const Page = () => {
const pageTitle = "Connection filter Templates";

const actions = [
{
label: "View Template",
icon: <EyeIcon />, // Placeholder for the view icon
color: "success",
offCanvas: true,
},
{
label: "Delete Template",
type: "POST",
url: "/api/RemoveConnectionfilterTemplate",
data: { ID: "GUID" },
confirmText: "Do you want to delete the template?",
icon: <TrashIcon />, // Placeholder for the delete icon
icon: <TrashIcon />,
color: "danger",
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Page = () => {
ID: "GUID",
},
confirmText: "Do you want to delete the template?",
icon: <TrashIcon />, // Placeholder for delete icon
icon: <TrashIcon />,
color: "danger",
},
];
Expand Down
6 changes: 0 additions & 6 deletions src/pages/email/spamfilter/list-templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ const Page = () => {
const pageTitle = "Spamfilter Templates";

const actions = [
{
label: "View Template",
icon: <EyeIcon />, // Placeholder for the view icon
color: "success",
offCanvas: true,
},
{
label: "Delete Template",
type: "POST",
Expand Down
20 changes: 17 additions & 3 deletions src/pages/email/transport/list-rules/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import { Book, DoDisturb, Done } from "@mui/icons-material";
import { TrashIcon } from "@heroicons/react/24/outline";
import Link from "next/link";

const Page = () => {
Expand All @@ -11,8 +13,9 @@ const Page = () => {
label: "Create template based on rule",
type: "POST",
url: "/api/AddTransportTemplate",
data: {}, // No extra data was specified for this action in the original file
postEntireRow: true,
confirmText: "Are you sure you want to create a template based on this rule?",
icon: <Book />,
},
{
label: "Enable Rule",
Expand All @@ -23,6 +26,7 @@ const Page = () => {
GUID: "Guid",
},
confirmText: "Are you sure you want to enable this rule?",
icon: <Done />,
},
{
label: "Disable Rule",
Expand All @@ -33,6 +37,7 @@ const Page = () => {
GUID: "Guid",
},
confirmText: "Are you sure you want to disable this rule?",
icon: <DoDisturb />,
},
{
label: "Delete Rule",
Expand All @@ -43,15 +48,24 @@ const Page = () => {
},
confirmText: "Are you sure you want to delete this rule?",
color: "danger",
icon: <TrashIcon />,
},
];

const offCanvas = {
extendedInfoFields: ["CreatedBy", "LastModifiedBy", "WhenChanged", "Description", "Guid"],
extendedInfoFields: [
"Guid",
"CreatedBy",
"LastModifiedBy",
"WhenChanged",
"Name",
"Comments",
"Description",
],
actions: actions,
};

const simpleColumns = ["Name", "State", "Mode", "RuleErrorAction", "WhenChanged"];
const simpleColumns = ["Name", "State", "Mode", "RuleErrorAction", "WhenChanged", "Comments"];

return (
<CippTablePage
Expand Down
8 changes: 1 addition & 7 deletions src/pages/email/transport/list-templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@ const Page = () => {
const pageTitle = "Transport Rule Templates";

const actions = [
{
label: "View Template",
icon: <EyeIcon />, // Placeholder icon for developer customization
color: "success",
offCanvas: true,
},
{
label: "Delete Template",
type: "POST",
url: "/api/RemoveTransportRuleTemplate",
data: { ID: "GUID" },
confirmText: "Do you want to delete the template?",
icon: <TrashIcon />, // Placeholder icon for developer customization
icon: <TrashIcon />,
color: "danger",
},
];
Expand Down
Loading