diff --git a/.changeset/clean-drinks-poke.md b/.changeset/clean-drinks-poke.md
new file mode 100644
index 0000000000..9c57c3ac56
--- /dev/null
+++ b/.changeset/clean-drinks-poke.md
@@ -0,0 +1,6 @@
+---
+'@backstage/plugin-notifications-backend': minor
+'@backstage/plugin-notifications': minor
+---
+
+Notifications-backend URL query parameter changed from `minimal_severity` to `minimumSeverity`.
diff --git a/.changeset/wet-plants-help.md b/.changeset/wet-plants-help.md
new file mode 100644
index 0000000000..c497c68421
--- /dev/null
+++ b/.changeset/wet-plants-help.md
@@ -0,0 +1,5 @@
+---
+'@backstage/plugin-notifications': patch
+---
+
+The severity icons now get their colors from the theme.
diff --git a/plugins/notifications-backend/src/service/router.ts b/plugins/notifications-backend/src/service/router.ts
index 68fbe0bb27..30829a578b 100644
--- a/plugins/notifications-backend/src/service/router.ts
+++ b/plugins/notifications-backend/src/service/router.ts
@@ -262,9 +262,9 @@ export async function createRouter(
}
opts.createdAfter = new Date(sinceEpoch);
}
- if (req.query.minimal_severity) {
+ if (req.query.minimumSeverity) {
opts.minimumSeverity = normalizeSeverity(
- req.query.minimal_severity.toString(),
+ req.query.minimumSeverity.toString(),
);
}
diff --git a/plugins/notifications/src/api/NotificationsClient.ts b/plugins/notifications/src/api/NotificationsClient.ts
index c4fffded9e..10ad58bd92 100644
--- a/plugins/notifications/src/api/NotificationsClient.ts
+++ b/plugins/notifications/src/api/NotificationsClient.ts
@@ -68,7 +68,7 @@ export class NotificationsClient implements NotificationsApi {
queryString.append('createdAfter', options.createdAfter.toISOString());
}
if (options?.minimumSeverity !== undefined) {
- queryString.append('minimal_severity', options.minimumSeverity);
+ queryString.append('minimumSeverity', options.minimumSeverity);
}
const urlSegment = `?${queryString}`;
diff --git a/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx b/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx
index 37680db3c2..062c2ae5b7 100644
--- a/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx
+++ b/plugins/notifications/src/components/NotificationsTable/SeverityIcon.tsx
@@ -19,21 +19,39 @@ import NormalIcon from '@material-ui/icons/CheckOutlined';
import CriticalIcon from '@material-ui/icons/ErrorOutline';
import HighIcon from '@material-ui/icons/WarningOutlined';
import LowIcon from '@material-ui/icons/InfoOutlined';
+import { makeStyles } from '@material-ui/core/styles';
+
+const useStyles = makeStyles(theme => ({
+ critical: {
+ color: theme.palette.status.error,
+ },
+ high: {
+ color: theme.palette.status.warning,
+ },
+ normal: {
+ color: theme.palette.status.ok,
+ },
+ low: {
+ color: theme.palette.status.running,
+ },
+}));
export const SeverityIcon = ({
severity,
}: {
severity?: NotificationSeverity;
}) => {
+ const classes = useStyles();
+
switch (severity) {
case 'critical':
- return ;
+ return ;
case 'high':
- return ;
+ return ;
case 'low':
- return ;
+ return ;
case 'normal':
default:
- return ;
+ return ;
}
};