Skip to content

Commit 17f20dc

Browse files
Merge pull request #3533 from kris6673/icons-and-autopilotsync
Add icons and sync button for autopilot devices
2 parents 8830a02 + eba21f5 commit 17f20dc

File tree

48 files changed

+337
-103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+337
-103
lines changed

src/components/bulk-actions-menu.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@ import PropTypes from "prop-types";
22
import ChevronDownIcon from "@heroicons/react/24/outline/ChevronDownIcon";
33
import { Button, Link, ListItemText, Menu, MenuItem, SvgIcon } from "@mui/material";
44
import { usePopover } from "../hooks/use-popover";
5+
import { FilePresent, Laptop, Mail, Share, Shield, ShieldMoon } from "@mui/icons-material";
6+
import { GlobeAltIcon, UsersIcon, ServerIcon } from "@heroicons/react/24/outline";
7+
8+
function getIconByName(iconName) {
9+
switch (iconName) {
10+
case "GlobeAltIcon":
11+
return <GlobeAltIcon />;
12+
case "Mail":
13+
return <Mail />;
14+
case "UsersIcon":
15+
return <UsersIcon />;
16+
case "FilePresent":
17+
return <FilePresent />;
18+
case "ServerIcon":
19+
return <ServerIcon />;
20+
case "Laptop":
21+
return <Laptop />;
22+
case "Share":
23+
return <Share />;
24+
case "Shield":
25+
return <Shield />;
26+
case "ShieldMoon":
27+
return <ShieldMoon />;
28+
default:
29+
return null;
30+
}
31+
}
532

633
export const BulkActionsMenu = (props) => {
734
const { buttonName, sx, row, actions = [], ...other } = props;
@@ -55,12 +82,14 @@ export const BulkActionsMenu = (props) => {
5582
target="_blank"
5683
rel="noreferrer"
5784
>
85+
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
5886
<ListItemText primary={action.label} />
5987
</MenuItem>
6088
);
6189
} else {
6290
return (
6391
<MenuItem key={index} onClick={action.onClick}>
92+
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
6493
<ListItemText primary={action.label} />
6594
</MenuItem>
6695
);

src/data/portals.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"variable": "customerId",
77
"target": "_blank",
88
"external": true,
9-
"icon": "cog"
9+
"icon": "GlobeAltIcon"
1010
},
1111
{
1212
"label": "Exchange Portal",
@@ -15,7 +15,7 @@
1515
"variable": "defaultDomainName",
1616
"target": "_blank",
1717
"external": true,
18-
"icon": "mail-bulk"
18+
"icon": "Mail"
1919
},
2020
{
2121
"label": "Entra Portal",
@@ -24,7 +24,7 @@
2424
"variable": "defaultDomainName",
2525
"target": "_blank",
2626
"external": true,
27-
"icon": "users"
27+
"icon": "UsersIcon"
2828
},
2929
{
3030
"label": "Teams Portal",
@@ -33,7 +33,7 @@
3333
"variable": "defaultDomainName",
3434
"target": "_blank",
3535
"external": true,
36-
"icon": "comments"
36+
"icon": "FilePresent"
3737
},
3838
{
3939
"label": "Azure Portal",
@@ -42,7 +42,7 @@
4242
"variable": "defaultDomainName",
4343
"target": "_blank",
4444
"external": true,
45-
"icon": "server"
45+
"icon": "ServerIcon"
4646
},
4747
{
4848
"label": "Intune Portal",
@@ -51,7 +51,16 @@
5151
"variable": "defaultDomainName",
5252
"target": "_blank",
5353
"external": true,
54-
"icon": "laptop-code"
54+
"icon": "Laptop"
55+
},
56+
{
57+
"label": "SharePoint Admin",
58+
"name": "SharePoint_Admin",
59+
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
60+
"variable": "customerId",
61+
"target": "_blank",
62+
"external": true,
63+
"icon": "Share"
5564
},
5665
{
5766
"label": "Security Portal",
@@ -60,7 +69,7 @@
6069
"variable": "customerId",
6170
"target": "_blank",
6271
"external": true,
63-
"icon": "shield-alt"
72+
"icon": "Shield"
6473
},
6574
{
6675
"label": "Compliance Portal",
@@ -69,15 +78,6 @@
6978
"variable": "customerId",
7079
"target": "_blank",
7180
"external": true,
72-
"icon": "shield-alt"
73-
},
74-
{
75-
"label": "SharePoint Admin",
76-
"name": "SharePoint_Admin",
77-
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
78-
"variable": "customerId",
79-
"target": "_blank",
80-
"external": true,
81-
"icon": "book"
81+
"icon": "ShieldMoon"
8282
}
8383
]

src/pages/cipp/settings/tenants.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import tabOptions from "./tabOptions";
55
import { Button, SvgIcon } from "@mui/material";
66
import { CippApiDialog } from "/src/components/CippComponents/CippApiDialog";
77
import { useDialog } from "/src/hooks/use-dialog";
8-
import { Sync } from "@mui/icons-material";
8+
import { Sync, Block, PlayArrow, RestartAlt, Delete, Add } from "@mui/icons-material";
99

1010
const Page = () => {
1111
const pageTitle = "Tenants - Backend";
@@ -17,6 +17,7 @@ const Page = () => {
1717
label: "Exclude Tenants",
1818
type: "POST",
1919
url: `/api/ExecExcludeTenant?AddExclusion=true`,
20+
icon: <Block />,
2021
data: { value: "customerId" },
2122
confirmText: "Are you sure you want to exclude these tenants?",
2223
multiPost: false,
@@ -25,6 +26,7 @@ const Page = () => {
2526
label: "Include Tenants",
2627
type: "POST",
2728
url: `/api/ExecExcludeTenant?RemoveExclusion=true`,
29+
icon: <Add />,
2830
data: { value: "customerId" },
2931
confirmText: "Are you sure you want to include these tenants?",
3032
multiPost: false,
@@ -33,6 +35,7 @@ const Page = () => {
3335
label: "Refresh CPV Permissions",
3436
type: "POST",
3537
url: `/api/ExecCPVPermissions`,
38+
icon: <PlayArrow />,
3639
data: { TenantFilter: "customerId" },
3740
confirmText: "Are you sure you want to refresh the CPV permissions for these tenants?",
3841
multiPost: false,
@@ -41,6 +44,7 @@ const Page = () => {
4144
label: "Reset CPV Permissions",
4245
type: "POST",
4346
url: `/api/ExecCPVPermissions?&ResetSP=true`,
47+
icon: <RestartAlt />,
4448
data: { TenantFilter: "customerId" },
4549
confirmText:
4650
"Are you sure you want to reset the CPV permissions for these tenants? (This will delete the Service Principal and re-add it.)",
@@ -50,6 +54,7 @@ const Page = () => {
5054
label: "Remove Tenant",
5155
type: "POST",
5256
url: `/api/ExecRemoveTenant`,
57+
icon: <Delete />,
5358
data: { TenantID: "customerId" },
5459
confirmText: "Are you sure you want to remove this tenant?",
5560
multiPost: false,

src/pages/email/administration/contacts/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
3-
import { Edit } from "@mui/icons-material";
3+
import { Edit, PersonAdd } from "@mui/icons-material";
44
import { Button } from "@mui/material";
55
import Link from "next/link";
66
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
@@ -40,7 +40,11 @@ const Page = () => {
4040
simpleColumns={simpleColumns}
4141
cardButton={
4242
<>
43-
<Button component={Link} href="/email/administration/contacts/add">
43+
<Button
44+
component={Link}
45+
href="/email/administration/contacts/add"
46+
startIcon={<PersonAdd />}
47+
>
4448
Add contact
4549
</Button>
4650
</>

src/pages/email/administration/mailboxes/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import Link from "next/link";
44
import { Button } from "@mui/material";
5+
import { Add } from "@mui/icons-material";
56

67
import {
78
Archive,
@@ -269,7 +270,11 @@ const Page = () => {
269270
filters={filterList}
270271
cardButton={
271272
<>
272-
<Button component={Link} href="/email/administration/mailboxes/addshared">
273+
<Button
274+
component={Link}
275+
startIcon={<Add />}
276+
href="/email/administration/mailboxes/addshared"
277+
>
273278
Add Shared Mailbox
274279
</Button>
275280
</>

src/pages/email/administration/tenant-allow-block-lists/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import { Button } from "@mui/material";
44
import Link from "next/link";
5-
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
5+
import TrashIcon from "@heroicons/react/24/outline/TrashIcon";
6+
import { PlaylistAdd } from "@mui/icons-material";
67

78
const Page = () => {
89
const pageTitle = "Tenant Allow/Block Lists";
@@ -49,7 +50,11 @@ const Page = () => {
4950
}}
5051
cardButton={
5152
<>
52-
<Button component={Link} href="/email/administration/tenant-allow-block-lists/add">
53+
<Button
54+
component={Link}
55+
href="/email/administration/tenant-allow-block-lists/add"
56+
startIcon={<PlaylistAdd />}
57+
>
5358
Add Entry
5459
</Button>
5560
</>

src/pages/email/resources/management/list-rooms/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import { Button } from "@mui/material";
44
import Link from "next/link";
5+
import { AddHomeWork } from "@mui/icons-material";
56

67
const Page = () => {
78
const pageTitle = "Rooms";
@@ -12,7 +13,11 @@ const Page = () => {
1213
apiUrl="/api/ListRooms"
1314
simpleColumns={["displayName", "building", "floorNumber", "capacity", "bookingType"]}
1415
cardButton={
15-
<Button component={Link} href="/email/resources/management/list-rooms/add">
16+
<Button
17+
component={Link}
18+
href="/email/resources/management/list-rooms/add"
19+
startIcon={<AddHomeWork />}
20+
>
1621
Add Room
1722
</Button>
1823
}

src/pages/email/resources/management/room-lists/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
3+
import { Visibility } from "@mui/icons-material";
34

45
const Page = () => {
56
const pageTitle = "Room Lists";
6-
const apiUrl = "/api/ListRoomLists"
7+
const apiUrl = "/api/ListRoomLists";
78

89
const actions = [
910
{
1011
label: "View included Rooms",
1112
link: `/email/resources/management/room-lists/list/view?roomAddress=[emailAddress]`,
1213
color: "info",
14+
icon: <Visibility />,
1315
},
1416
];
1517

src/pages/email/spamfilter/list-connectionfilter/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Layout as DashboardLayout } from "/src/layouts/index.js";
22
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
33
import { Button } from "@mui/material";
4-
import { Book } from "@mui/icons-material";
4+
import { Book, AddModerator } from "@mui/icons-material";
55
import Link from "next/link";
66

77
const Page = () => {
@@ -45,7 +45,11 @@ const Page = () => {
4545
simpleColumns={simpleColumns}
4646
cardButton={
4747
<>
48-
<Button component={Link} href="/email/spamfilter/list-connectionfilter/add">
48+
<Button
49+
component={Link}
50+
href="/email/spamfilter/list-connectionfilter/add"
51+
startIcon={<AddModerator />}
52+
>
4953
Deploy ConnectionFilter
5054
</Button>
5155
</>

src/pages/email/spamfilter/list-spamfilter/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Button } from "@mui/material";
44
import { Book, Block, Check } from "@mui/icons-material";
55
import { TrashIcon } from "@heroicons/react/24/outline";
66
import Link from "next/link";
7+
import { RocketLaunch } from "@mui/icons-material";
78

89
const Page = () => {
910
const pageTitle = "Spam Filters";
@@ -100,7 +101,11 @@ const Page = () => {
100101
simpleColumns={simpleColumns}
101102
cardButton={
102103
<>
103-
<Button component={Link} href="/email/spamfilter/list-spamfilter/add">
104+
<Button
105+
component={Link}
106+
href="/email/spamfilter/list-spamfilter/add"
107+
startIcon={<RocketLaunch />}
108+
>
104109
Deploy Spamfilter
105110
</Button>
106111
</>

0 commit comments

Comments
 (0)