Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dd8bcce
Updated the template class to be reusable. Created data-readiness com…
gudatta Aug 2, 2026
f0e094b
Updated the interface to create the pages within a specified folder.
gudatta Aug 2, 2026
4a441a7
Created the templates and added the images for the site configuration…
gudatta Aug 2, 2026
b17164e
Fixed issue w/ action buttons.
gudatta Aug 2, 2026
1769e19
Fixed header.
gudatta Aug 2, 2026
5d61ed3
Added image references.
gudatta Aug 2, 2026
4804a6b
Fixed reference.
gudatta Aug 2, 2026
0b4f777
Added the image references.
gudatta Aug 2, 2026
e697005
Updated the app permissions.
gudatta Aug 2, 2026
b5c7118
Updated the ignore file.
gudatta Aug 2, 2026
92712c3
Added the last 2 pages to generate.
gudatta Aug 2, 2026
6aed263
Updated the order and only to update the main page in a new tab after…
gudatta Aug 3, 2026
cfa3bba
Renamed the pages.
gudatta Aug 3, 2026
23e5857
Added missing references to the images. Updated the upload image logi…
gudatta Aug 3, 2026
200d1e3
Fixed reference to images.
gudatta Aug 3, 2026
8e0e47a
Updated the loading dialog.
gudatta Aug 3, 2026
43acd29
Added code to update the link references.
gudatta Aug 3, 2026
189218f
Updated the lib.
gudatta Aug 7, 2026
803621f
Enable debug.
gudatta Aug 7, 2026
0d38139
Updated the m365 groups to include the group information on error. Th…
gudatta Aug 7, 2026
9f5e463
Updated the m365 group logic to try to get the member and owner info …
gudatta Aug 7, 2026
a716144
Updated the logic for getting the group information. Calling 3 apis i…
gudatta Aug 7, 2026
64e9258
Updated logging.
gudatta Aug 7, 2026
68dda85
Removed debugger.
gudatta Aug 7, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
src/**/*.html
*lock*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"adm-zip": "^0.5.18",
"datatables.net": "^3.0.0",
"datatables.net-bs5": "^3.0.0",
"dattatable": "^2.11.76",
"dattatable": "^2.11.81",
"exceljs": "^4.4.0",
"fast-xml-parser": "^5.9.3",
"gd-sprest-bs": "^10.15.91",
Expand Down
62 changes: 48 additions & 14 deletions spfx/src/webparts/siteAdmin/SiteAdminWebPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,62 @@ import { BaseClientSideWebPart, WebPartContext } from '@microsoft/sp-webpart-bas
import type { IReadonlyTheme } from '@microsoft/sp-component-base';
import * as strings from 'SiteAdminWebPartStrings';

// Include the asset files for the page generator
// Images to include in the SPFx package
const imageReferences = [
require("./assets/956444907.png"),
require("./assets/4222049231.png"),
require("./assets/34722779.png"),
require("./assets/82759635.png"),
require("./assets/178240801.png"),
require("./assets/394511437.png"),
require("./assets/459558559.png"),
require("./assets/704156399.png"),
require("./assets/734992370.png"),
require("./assets/782453716.png"),
require("./assets/860781773.png"),
require("./assets/878621426.png"),
require("./assets/926485291.png"),
require("./assets/956444907.png"),
require("./assets/1004145298.png"),
require("./assets/1034045247.png"),
require("./assets/1036008522.png"),
require("./assets/1051374010.png"),
require("./assets/1366143702.png"),
require("./assets/1392219256.png"),
require("./assets/1439995666.png"),
require("./assets/2403381788.png"),
require("./assets/1539840079.png"),
require("./assets/1753774094.png"),
require("./assets/1920538907.png"),
require("./assets/1937731342.png"),
require("./assets/1952315463.png"),
require("./assets/2009954068.png"),
require("./assets/394511437.png"),
require("./assets/178240801.png"),
require("./assets/2243122120.png"),
require("./assets/2299432232.png"),
require("./assets/2403381788.png"),
require("./assets/2492974796.png"),
require("./assets/878621426.png"),
require("./assets/3639654909.png"),
require("./assets/2498076700.png"),
require("./assets/2892564598.png"),
require("./assets/2897641524.png"),
require("./assets/2928770881.png"),
require("./assets/2930042662.png"),
require("./assets/2978296301.png"),
require("./assets/3004706479.png"),
require("./assets/3007540558.png"),
require("./assets/3039756776.png"),
require("./assets/3194998129.png"),
require("./assets/3249223301.png"),
require("./assets/3423846637.png"),
require("./assets/734992370.png"),
require("./assets/3510901274.png"),
require("./assets/3517625209.png"),
require("./assets/3539902807.png"),
require("./assets/3602715702.png"),
require("./assets/3608935117.png"),
require("./assets/3614134656.png"),
require("./assets/1004145298.png"),
require("./assets/3639654909.png"),
require("./assets/3672734863.png"),
require("./assets/3707825808.png"),
require("./assets/3194998129.png"),
require("./assets/782453716.png"),
require("./assets/926485291.png"),
require("./assets/2498076700.png"),
require("./assets/3608935117.png"),
require("./assets/3772245627.png"),
require("./assets/3795830073.png"),
require("./assets/4007861782.png"),
require("./assets/4193189816.png")
]

Expand Down
Binary file added spfx/src/webparts/siteAdmin/assets/1034045247.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/1036008522.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/1392219256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/1539840079.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/1753774094.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/1952315463.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/2243122120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/2299432232.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/2897641524.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/2928770881.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3004706479.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3007540558.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3039756776.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3249223301.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3510901274.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3539902807.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spfx/src/webparts/siteAdmin/assets/3602715702.png
Binary file added spfx/src/webparts/siteAdmin/assets/3672734863.png
Binary file added spfx/src/webparts/siteAdmin/assets/3772245627.png
Binary file added spfx/src/webparts/siteAdmin/assets/3795830073.png
Binary file added spfx/src/webparts/siteAdmin/assets/4007861782.png
Binary file added spfx/src/webparts/siteAdmin/assets/4222049231.png
Binary file added spfx/src/webparts/siteAdmin/assets/82759635.png
Binary file added spfx/src/webparts/siteAdmin/assets/860781773.png
95 changes: 52 additions & 43 deletions src/m365Groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,53 +84,62 @@ export class M365Groups {

// Loads the m365 group
private static loadGroupById(groupId: string): PromiseLike<Types.SP.Directory.GroupOData> {
let group: Types.SP.Directory.GroupOData = { id: groupId } as Types.SP.Directory.GroupOData;

// Return a promise
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
// Get the group information
let ds = DirectorySession().group(groupId);
ds.query({
Select: ["calendarUrl", "displayName", "id", "isPublic", "mail"]
}).execute(group => {
// Save the group information
this._groups[group.id] = group;
}, () => {
// Error loading this group
this._errorGroupIds[groupId] = true;
let getGroupInfo = (): PromiseLike<void> => {
return new Promise(resolve => {
DirectorySession().group(groupId).query({
Select: ["calendarUrl", "displayName", "id", "isPublic", "mail"]
}).execute(group => {
// Update the group information
group.calendarUrl = group.calendarUrl;
group.displayName = group.displayName;
group.id = group.id;
group.isPublic = group.isPublic;
group.mail = group.mail;

// Resolve the group information
resolve();
}, () => {
// Error loading this group
this._errorGroupIds[groupId] = true;

// Reject the request
reject();
});
// Resolve the group information
resolve();
});
});
}

// Get the group members/owner information
let getGroupUsers = (member: boolean): PromiseLike<void> => {
return new Promise(resolve => {
DirectorySession().group(groupId)[member ? "members" : "owners"]().query({
GetAllItems: true,
Top: 5000,
Select: ["principalName", "id", "displayName", "mail"]
}).execute(users => {
// Set the users
group[member ? "members" : "owners"] = users as any;

// Resolve the users
resolve();
}, () => {
// Resolve the request
resolve();
}, true);
});
}

// Get the group information, members and users
Promise.all([getGroupInfo(), getGroupUsers(true), getGroupUsers(false)]).then(() => {
// Set the group
this._groups[group.id] = group;

// Get the group members
ds.members().query({
GetAllItems: true,
Top: 5000,
Select: ["principalName", "id", "displayName", "mail"]
}).execute(members => {
// Add the group information to the mapper
this._groups[groupId].members = members as any;
}, () => {
// Try the next group
resolve(null);
}, true);

// Get the group owners
ds.owners().query({
GetAllItems: true,
Top: 5000,
Select: ["principalName", "id", "displayName", "mail"]
}).execute(owners => {
// Add the group information to the mapper
this._groups[groupId].owners = owners as any;
}, () => {
// Try the next group
resolve(null);
}, true);

// Wait for the requests to complete
ds.done(() => {
// Try the next group
resolve(this._groups[groupId]);
// Resolve the request
resolve(this._groups[group.id]);
});
});
}
Expand Down
Loading
Loading