diff --git a/.changeset/clever-adults-add.md b/.changeset/clever-adults-add.md
new file mode 100644
index 0000000000..7da5dda4d0
--- /dev/null
+++ b/.changeset/clever-adults-add.md
@@ -0,0 +1,5 @@
+---
+'@backstage/plugin-pagerduty': patch
+---
+
+Add new `disableChangeEvents` prop to `EntityPagerDutyCard` to hide the Change Events tab and disable fetching of change events for the PagerDuty service.
diff --git a/plugins/pagerduty/api-report.md b/plugins/pagerduty/api-report.md
index dd24aa9bec..f398a6bee7 100644
--- a/plugins/pagerduty/api-report.md
+++ b/plugins/pagerduty/api-report.md
@@ -22,6 +22,7 @@ export const EntityPagerDutyCard: (
// @public (undocumented)
export type EntityPagerDutyCardProps = {
readOnly?: boolean;
+ disableChangeEvents?: boolean;
};
// @public (undocumented)
diff --git a/plugins/pagerduty/src/components/EntityPagerDutyCard/index.tsx b/plugins/pagerduty/src/components/EntityPagerDutyCard/index.tsx
index 50e6f3a096..b252069b90 100644
--- a/plugins/pagerduty/src/components/EntityPagerDutyCard/index.tsx
+++ b/plugins/pagerduty/src/components/EntityPagerDutyCard/index.tsx
@@ -30,12 +30,19 @@ export const isPluginApplicableToEntity = (entity: Entity) =>
/** @public */
export type EntityPagerDutyCardProps = {
readOnly?: boolean;
+ disableChangeEvents?: boolean;
};
/** @public */
export const EntityPagerDutyCard = (props: EntityPagerDutyCardProps) => {
- const { readOnly } = props;
+ const { readOnly, disableChangeEvents } = props;
const { entity } = useEntity();
const pagerDutyEntity = getPagerDutyEntity(entity);
- return ;
+ return (
+
+ );
};
diff --git a/plugins/pagerduty/src/components/PagerDutyCard/index.tsx b/plugins/pagerduty/src/components/PagerDutyCard/index.tsx
index bb89865c5f..332d823f1f 100644
--- a/plugins/pagerduty/src/components/PagerDutyCard/index.tsx
+++ b/plugins/pagerduty/src/components/PagerDutyCard/index.tsx
@@ -46,11 +46,12 @@ const BasicCard = ({ children }: { children: ReactNode }) => (
/** @public */
export type PagerDutyCardProps = PagerDutyEntity & {
readOnly?: boolean;
+ disableChangeEvents?: boolean;
};
/** @public */
export const PagerDutyCard = (props: PagerDutyCardProps) => {
- const { readOnly, integrationKey, name } = props;
+ const { readOnly, disableChangeEvents, integrationKey, name } = props;
const api = useApi(pagerDutyApiRef);
const [refreshIncidents, setRefreshIncidents] = useState(false);
const [refreshChangeEvents, setRefreshChangeEvents] =
@@ -169,12 +170,16 @@ export const PagerDutyCard = (props: PagerDutyCardProps) => {
refreshIncidents={refreshIncidents}
/>
-
-
-
+ <>
+ {disableChangeEvents !== true && (
+
+
+
+ )}
+ >