Skip to content
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
319 changes: 319 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.eslintrc.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules

# Build generated files
dist
lib
release
solution
temp
*.sppkg
.heft

# Coverage directory used by tools like istanbul
coverage

# OSX
.DS_Store

# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj

# Resx Generated Code
*.resx.ts

# Styles Generated Code
*.scss.ts
8 changes: 8 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"no-inline-styles": "off"
}
}
16 changes: 16 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!dist
config

gulpfile.js

release
src
temp

tsconfig.json
tslint.json

*.log

.yo-rc.json
.vscode
23 changes: 23 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Hosted workbench",
"type": "msedge",
"request": "launch",
"url": "https://{tenantDomain}/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
]
}
]
}
14 changes: 14 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Place your settings in this file to overwrite default and user settings.
{
// Configure glob patterns for excluding files and folders in the file explorer.
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/bower_components": true,
"**/coverage": true,
"**/jest-output": true,
"**/lib-amd": true,
"src/**/*.scss.ts": true
},
"typescript.tsdk": ".\\node_modules\\typescript\\lib"
}
21 changes: 21 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"@microsoft/generator-sharepoint": {
"whichFolder": "subdir",
"solutionName": "Service Health",
"componentType": "adaptiveCardExtension",
"aceTemplateType": "Generic",
"componentName": "M365 Service Health",
"plusBeta": false,
"isCreatingSolution": true,
"nodeVersion": "22.14.0",
"sdksVersions": {},
"version": "1.21.1",
"libraryName": "service-health",
"libraryId": "3afbf950-134f-4452-bfa5-d3bf0a852f1f",
"environment": "spo",
"packageManager": "npm",
"solutionShortDescription": "Service Health description",
"skipFeatureDeployment": true,
"isDomainIsolated": false
}
}
91 changes: 91 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPFx ACE Service Health

## Overview

SPFx ACE Service Health is a SharePoint Framework (SPFx) extension designed to monitor and display the health status of various services within your Microsoft 365 environment. It provides real-time visual feedback on service status, helping users and administrators quickly identify operational issues or interruptions.

## Features

- **Service Health Dashboard:** Visualizes the current status of all monitored services.
- **Status Indicators:** Uses color-coded icons (🟢, 🟡, 🔴) to represent operational, restricted, or interrupted services.
- **Detailed Status Labels:** Friendly labels for each service state (e.g., Operational, Investigating, Degradation, Interruption).

![Service Health Dashboard](./src/assets/serviceHealth01.png "Service Health Dashboard")
![Service Health Dashboard](./src/assets/serviceHealth02.PNG "Service Health Dashboard Mobile")
![Service Health Dashboard](./src/assets/serviceHealth03.PNG "Service Health Dashboard Mobile")
![Service Health Dashboard](./src/assets/serviceHealth04.PNG "Service Health Dashboard Mobile")

## Technologies Used

- **SharePoint Framework (SPFx) v1.21.1**
- **React**
- **TypeScript**
- **@fluentui/react-components** for UI consistency

## Prerequisites

- Microsoft 365 tenant with SharePoint Online
- Node.js and npm installed
- SPFx development environment set up ([Get started](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant))
- Azure FUnction deployed to provide service health data (optional, if using All usrs option selected on property pane, ) found here [SPFx-ace-service-health-azure-function](react-extension-service-health-azfn.zip)
- Permissions to deploy SPFx solutions to the SharePoint site

## Required Graph Permissions

- `ServiceHealth.Read.All` - Read service health information for all services in the tenant.

## Getting Started

1. **Clone the repository:**

```bash
git clone <your-repo-url>
```

2. **Navigate to the solution folder:**

```bash
cd SPFx-ace-service-health
```

3. **Install dependencies:**

```bash
npm install
```

4. **Run the solution locally:**

```bash
gulp serve
```

## Usage

- Deploy the extension to your SharePoint site.
- The dashboard will automatically display the health status of configured services.
- Statuses are updated in real-time and reflected with clear color-coded indicators and descriptive labels.

## Version History

| Version | Date | Comments |
| ------- | ------------| ---------------- |
| 1.0 | May 31, 2025| Initial release |

## Author

| Solution | Author(s) |
|-------------------------|--------------------------|
| ImageCard-HTML-React-Service-Health | João José Mendes |

## Disclaimer

**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

---

## References

- [SharePoint Framework Documentation](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/)
- [@fluentui/react-components](https://react.fluentui.dev/)
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
65 changes: 65 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[{
"name": "pnp-sp-fx-aces-imagecard-html-react-service-health",
"source": "pnp",
"title": "Service health - Adaptive Card Extension",
"shortDescription": "SPFx ACE Service Health is a SharePoint Framework (SPFx) extension designed to monitor and display the health status of various services within your Microsoft 365 environment.",
"url": "https://github.com/pnp/sp-dev-fx-aces/tree/main/samples/ImageCard-HTML-React-Service-Health",
"longDescription": [
"SPFx ACE Service Health is a SharePoint Framework (SPFx) extension designed to monitor and display the health status of various services within your Microsoft 365 environment."
],
"creationDateTime": "2025-05-31",
"updateDateTime": "2025-05-31",
"products": [
"SharePoint",
"Viva"
],
"metadata": [{
"key": "CLIENT-SIDE-DEV",
"value": "React"
},
{
"key": "SPFX-VERSION",
"value": "1.21.1"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ImageCard-HTML-React-Service-Health/src/assets/serviceHealth01.png",
"alt": "Preview"
},
{
"type": "image",
"order": 200,
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ImageCard-HTML-React-Service-Health/src/assets/serviceHealth02.PNG",
"alt": "Preview"
},
{
"type": "image",
"order": 300,
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ImageCard-HTML-React-Service-Health/src/assets/serviceHealth03.PNG",
"alt": "Preview"
}
],
"authors": [{
"gitHubAccount": "joaojmendes",
"pictureUrl": "https://github.com/joaojmendes.png",
"name": "João José Mendes"
}],
"references": [{
"name": "Viva Connections Extensibility guidance",
"description": "Adaptive Card Extensions are client-side components that run in the context of a SharePoint page.",
"url": "https://aka.ms/viva/connections/extensibility"
},
{
"name": "Adaptive Card Documentation",
"description": "Detailed documentation on Adaptive Cards including the Adaptive Card designer.",
"url": "https://adaptivecards.io/"
}, {
"name": "Adaptive Card Extension Design Guidance",
"description": "Design guidance for laying out Adaptive Card Extensions.",
"url": "https://docs.microsoft.com/en-us/sharepoint/dev/spfx/viva/design/design-intro"
}
]
}]
18 changes: 18 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"m-365-service-health-adaptive-card-extension": {
"components": [
{
"entrypoint": "./lib/adaptiveCardExtensions/m365ServiceHealth/M365ServiceHealthAdaptiveCardExtension.js",
"manifest": "./src/adaptiveCardExtensions/m365ServiceHealth/M365ServiceHealthAdaptiveCardExtension.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"M365ServiceHealthAdaptiveCardExtensionStrings": "lib/adaptiveCardExtensions/m365ServiceHealth/loc/{locale}.js"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "service-health",
"accessKey": "<!-- ACCESS KEY -->"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "service-health-client-side-solution",
"id": "3afbf950-134f-4452-bfa5-d3bf0a852f1f",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"webApiPermissionRequests": [
{
"resource": "Microsoft Graph",
"scope": "ServiceHealth.Read.All"
}
],
"developer": {
"name": "",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": "Undefined-1.21.1"
},
"metadata": {
"shortDescription": {
"default": "Service Health description"
},
"longDescription": {
"default": "Service Health description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "service-health Feature",
"description": "The feature that activates elements of the service-health solution.",
"id": "9e64e8cf-af40-48c3-96db-5ba0fa579813",
"version": "1.0.0.0"
}
]
},
"paths": {
"zippedPackage": "solution/service-health.sppkg"
}
}
3 changes: 3 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/config/sass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
6 changes: 6 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/config/serve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
"port": 4321,
"https": true,
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->"
}
16 changes: 16 additions & 0 deletions samples/ImageCard-HTML-React-Service-Health/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

const build = require('@microsoft/sp-build-web');

build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);

var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);

result.set('serve', result.get('serve-deprecated'));

return result;
};

build.initialize(require('gulp'));
Loading
Loading