-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3354 from kris6673/gal
Add Global Address List report page and update API methods to POST
- Loading branch information
Showing
3 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { Layout as DashboardLayout } from "/src/layouts/index.js"; | ||
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx"; | ||
|
||
const Page = () => { | ||
const actions = [ | ||
{ | ||
label: "Unhide from Global Address List", | ||
type: "POST", | ||
url: "/api/ExecHideFromGAL", | ||
data: { | ||
HideFromGAL: false, | ||
ID: "PrimarySmtpAddress", | ||
}, | ||
confirmText: "Are you sure you want to show this mailbox in the Global Address List?", | ||
}, | ||
{ | ||
label: "Hide from Global Address List", | ||
type: "POST", | ||
url: "/api/ExecHideFromGAL", | ||
data: { | ||
HideFromGAL: true, | ||
ID: "PrimarySmtpAddress", | ||
}, | ||
confirmText: "Are you sure you want to hide this mailbox from the Global Address List?", | ||
}, | ||
]; | ||
|
||
const offCanvas = { | ||
extendedInfoFields: [ | ||
"HiddenFromAddressListsEnabled", | ||
"ExternalDirectoryObjectId", | ||
"DisplayName", | ||
"PrimarySmtpAddress", | ||
"RecipientType", | ||
"RecipientTypeDetails", | ||
"IsDirSynced", | ||
"SKUAssigned", | ||
"EmailAddresses", | ||
], | ||
actions: actions, | ||
}; | ||
|
||
const filters = [ | ||
{ | ||
filterName: "Hidden from GAL", | ||
value: [{ id: "HiddenFromAddressListsEnabled", value: "Yes" }], | ||
type: "column", | ||
}, | ||
{ | ||
filterName: "Shown in GAL", | ||
value: [{ id: "HiddenFromAddressListsEnabled", value: "No" }], | ||
type: "column", | ||
}, | ||
{ | ||
filterName: "Cloud only mailboxes", | ||
value: [{ id: "IsDirSynced", value: "No" }], | ||
type: "column", | ||
}, | ||
]; | ||
|
||
return ( | ||
<CippTablePage | ||
title="Global Address List" | ||
apiUrl="/api/ListGlobalAddressList" | ||
actions={actions} | ||
offCanvas={offCanvas} | ||
filters={filters} | ||
simpleColumns={[ | ||
"HiddenFromAddressListsEnabled", | ||
"DisplayName", | ||
"PrimarySmtpAddress", | ||
"RecipientTypeDetails", | ||
"IsDirSynced", | ||
]} | ||
/> | ||
); | ||
}; | ||
|
||
Page.getLayout = (page) => <DashboardLayout>{page}</DashboardLayout>; | ||
|
||
export default Page; |