Skip to content

Add icons and sync button for autopilot devices #3533

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 1 commit into from
Jan 31, 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
29 changes: 29 additions & 0 deletions src/components/bulk-actions-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@ import PropTypes from "prop-types";
import ChevronDownIcon from "@heroicons/react/24/outline/ChevronDownIcon";
import { Button, Link, ListItemText, Menu, MenuItem, SvgIcon } from "@mui/material";
import { usePopover } from "../hooks/use-popover";
import { FilePresent, Laptop, Mail, Share, Shield, ShieldMoon } from "@mui/icons-material";
import { GlobeAltIcon, UsersIcon, ServerIcon } from "@heroicons/react/24/outline";

function getIconByName(iconName) {
switch (iconName) {
case "GlobeAltIcon":
return <GlobeAltIcon />;
case "Mail":
return <Mail />;
case "UsersIcon":
return <UsersIcon />;
case "FilePresent":
return <FilePresent />;
case "ServerIcon":
return <ServerIcon />;
case "Laptop":
return <Laptop />;
case "Share":
return <Share />;
case "Shield":
return <Shield />;
case "ShieldMoon":
return <ShieldMoon />;
default:
return null;
}
}

export const BulkActionsMenu = (props) => {
const { buttonName, sx, row, actions = [], ...other } = props;
Expand Down Expand Up @@ -55,12 +82,14 @@ export const BulkActionsMenu = (props) => {
target="_blank"
rel="noreferrer"
>
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
<ListItemText primary={action.label} />
</MenuItem>
);
} else {
return (
<MenuItem key={index} onClick={action.onClick}>
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
<ListItemText primary={action.label} />
</MenuItem>
);
Expand Down
34 changes: 17 additions & 17 deletions src/data/portals.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "cog"
"icon": "GlobeAltIcon"
},
{
"label": "Exchange Portal",
Expand All @@ -15,7 +15,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "mail-bulk"
"icon": "Mail"
},
{
"label": "Entra Portal",
Expand All @@ -24,7 +24,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "users"
"icon": "UsersIcon"
},
{
"label": "Teams Portal",
Expand All @@ -33,7 +33,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "comments"
"icon": "FilePresent"
},
{
"label": "Azure Portal",
Expand All @@ -42,7 +42,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "server"
"icon": "ServerIcon"
},
{
"label": "Intune Portal",
Expand All @@ -51,7 +51,16 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "laptop-code"
"icon": "Laptop"
},
{
"label": "SharePoint Admin",
"name": "SharePoint_Admin",
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "Share"
},
{
"label": "Security Portal",
Expand All @@ -60,7 +69,7 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "shield-alt"
"icon": "Shield"
},
{
"label": "Compliance Portal",
Expand All @@ -69,15 +78,6 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "shield-alt"
},
{
"label": "SharePoint Admin",
"name": "SharePoint_Admin",
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "book"
"icon": "ShieldMoon"
}
]
7 changes: 6 additions & 1 deletion src/pages/cipp/settings/tenants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import tabOptions from "./tabOptions";
import { Button, SvgIcon } from "@mui/material";
import { CippApiDialog } from "/src/components/CippComponents/CippApiDialog";
import { useDialog } from "/src/hooks/use-dialog";
import { Sync } from "@mui/icons-material";
import { Sync, Block, PlayArrow, RestartAlt, Delete, Add } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Tenants - Backend";
Expand All @@ -17,6 +17,7 @@ const Page = () => {
label: "Exclude Tenants",
type: "POST",
url: `/api/ExecExcludeTenant?AddExclusion=true`,
icon: <Block />,
data: { value: "customerId" },
confirmText: "Are you sure you want to exclude these tenants?",
multiPost: false,
Expand All @@ -25,6 +26,7 @@ const Page = () => {
label: "Include Tenants",
type: "POST",
url: `/api/ExecExcludeTenant?RemoveExclusion=true`,
icon: <Add />,
data: { value: "customerId" },
confirmText: "Are you sure you want to include these tenants?",
multiPost: false,
Expand All @@ -33,6 +35,7 @@ const Page = () => {
label: "Refresh CPV Permissions",
type: "POST",
url: `/api/ExecCPVPermissions`,
icon: <PlayArrow />,
data: { TenantFilter: "customerId" },
confirmText: "Are you sure you want to refresh the CPV permissions for these tenants?",
multiPost: false,
Expand All @@ -41,6 +44,7 @@ const Page = () => {
label: "Reset CPV Permissions",
type: "POST",
url: `/api/ExecCPVPermissions?&ResetSP=true`,
icon: <RestartAlt />,
data: { TenantFilter: "customerId" },
confirmText:
"Are you sure you want to reset the CPV permissions for these tenants? (This will delete the Service Principal and re-add it.)",
Expand All @@ -50,6 +54,7 @@ const Page = () => {
label: "Remove Tenant",
type: "POST",
url: `/api/ExecRemoveTenant`,
icon: <Delete />,
data: { TenantID: "customerId" },
confirmText: "Are you sure you want to remove this tenant?",
multiPost: false,
Expand Down
8 changes: 6 additions & 2 deletions src/pages/email/administration/contacts/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Edit } from "@mui/icons-material";
import { Edit, PersonAdd } from "@mui/icons-material";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
Expand Down Expand Up @@ -40,7 +40,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/administration/contacts/add">
<Button
component={Link}
href="/email/administration/contacts/add"
startIcon={<PersonAdd />}
>
Add contact
</Button>
</>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import Link from "next/link";
import { Button } from "@mui/material";
import { Add } from "@mui/icons-material";

import {
Archive,
Expand Down Expand Up @@ -269,7 +270,11 @@ const Page = () => {
filters={filterList}
cardButton={
<>
<Button component={Link} href="/email/administration/mailboxes/addshared">
<Button
component={Link}
startIcon={<Add />}
href="/email/administration/mailboxes/addshared"
>
Add Shared Mailbox
</Button>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
import TrashIcon from "@heroicons/react/24/outline/TrashIcon";
import { PlaylistAdd } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Tenant Allow/Block Lists";
Expand Down Expand Up @@ -50,7 +51,11 @@ const Page = () => {
}}
cardButton={
<>
<Button component={Link} href="/email/administration/tenant-allow-block-lists/add">
<Button
component={Link}
href="/email/administration/tenant-allow-block-lists/add"
startIcon={<PlaylistAdd />}
>
Add Entry
</Button>
</>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/email/resources/management/list-rooms/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import { AddHomeWork } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Rooms";
Expand All @@ -12,7 +13,11 @@ const Page = () => {
apiUrl="/api/ListRooms"
simpleColumns={["displayName", "building", "floorNumber", "capacity", "bookingType"]}
cardButton={
<Button component={Link} href="/email/resources/management/list-rooms/add">
<Button
component={Link}
href="/email/resources/management/list-rooms/add"
startIcon={<AddHomeWork />}
>
Add Room
</Button>
}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/email/resources/management/room-lists/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Visibility } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Room Lists";
const apiUrl = "/api/ListRoomLists"
const apiUrl = "/api/ListRoomLists";

const actions = [
{
label: "View included Rooms",
link: `/email/resources/management/room-lists/list/view?roomAddress=[emailAddress]`,
color: "info",
icon: <Visibility />,
},
];

Expand Down
8 changes: 6 additions & 2 deletions src/pages/email/spamfilter/list-connectionfilter/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import { Book } from "@mui/icons-material";
import { Book, AddModerator } from "@mui/icons-material";
import Link from "next/link";

const Page = () => {
Expand Down Expand Up @@ -45,7 +45,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/spamfilter/list-connectionfilter/add">
<Button
component={Link}
href="/email/spamfilter/list-connectionfilter/add"
startIcon={<AddModerator />}
>
Deploy ConnectionFilter
</Button>
</>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/email/spamfilter/list-spamfilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button } from "@mui/material";
import { Book, Block, Check } from "@mui/icons-material";
import { TrashIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
import { RocketLaunch } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Spam Filters";
Expand Down Expand Up @@ -100,7 +101,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/spamfilter/list-spamfilter/add">
<Button
component={Link}
href="/email/spamfilter/list-spamfilter/add"
startIcon={<RocketLaunch />}
>
Deploy Spamfilter
</Button>
</>
Expand Down
10 changes: 9 additions & 1 deletion src/pages/email/tools/mailbox-restores/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import { RestoreFromTrash, PlayArrow, Pause, Delete } from "@mui/icons-material";
import MailboxRestoreDetails from "../../../../components/CippComponents/MailboxRestoreDetails";

const Page = () => {
Expand All @@ -12,6 +13,7 @@ const Page = () => {
label: "Resume Restore Request",
type: "POST",
url: "/api/ExecMailboxRestore",
icon: <PlayArrow />,
data: {
TenantFilter: "Tenant",
Identity: "Identity",
Expand All @@ -24,6 +26,7 @@ const Page = () => {
label: "Suspend Restore Request",
type: "POST",
url: "/api/ExecMailboxRestore",
icon: <Pause />,
data: {
TenantFilter: "Tenant",
Identity: "Identity",
Expand All @@ -36,6 +39,7 @@ const Page = () => {
label: "Remove Restore Request",
type: "POST",
url: "/api/ExecMailboxRestore",
icon: <Delete />,
data: {
TenantFilter: "Tenant",
Identity: "Identity",
Expand Down Expand Up @@ -63,7 +67,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/tools/mailbox-restores/add">
<Button
component={Link}
href="/email/tools/mailbox-restores/add"
startIcon={<RestoreFromTrash />}
>
New Restore Job
</Button>
</>
Expand Down
Loading
Loading