From f2612c20e5b8b994621d11e771a386d9bee17a4e Mon Sep 17 00:00:00 2001 From: Yash Oswal Date: Fri, 23 Jan 2026 13:00:32 +0530 Subject: [PATCH] fix(devtools): improve permission feedback in ScheduledTasksContent Updated the `ScheduledTasksContent` component to provide better visual feedback when a user lacks permission to run a task. A new `CreateNotAllowed` component displays a disabled block icon with a tooltip instead of the default error behavior. Signed-off-by: Yash Oswal --- .changeset/small-jars-lick.md | 5 +++++ .../ScheduledTasksContent/ScheduledTasksContent.tsx | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .changeset/small-jars-lick.md diff --git a/.changeset/small-jars-lick.md b/.changeset/small-jars-lick.md new file mode 100644 index 0000000000..b2160eb7f7 --- /dev/null +++ b/.changeset/small-jars-lick.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-devtools': patch +--- + +Fixes an issue where a user lacking permission to schedule tasks can now easily see the issue through a custom icon + tooltip. diff --git a/plugins/devtools/src/components/Content/ScheduledTasksContent/ScheduledTasksContent.tsx b/plugins/devtools/src/components/Content/ScheduledTasksContent/ScheduledTasksContent.tsx index 2d4abd56ef..7517cf8ea5 100644 --- a/plugins/devtools/src/components/Content/ScheduledTasksContent/ScheduledTasksContent.tsx +++ b/plugins/devtools/src/components/Content/ScheduledTasksContent/ScheduledTasksContent.tsx @@ -35,6 +35,7 @@ import { alertApiRef, configApiRef, useApi } from '@backstage/core-plugin-api'; import RefreshIcon from '@material-ui/icons/Refresh'; import NightsStay from '@material-ui/icons/NightsStay'; import ErrorIcon from '@material-ui/icons/Error'; +import BlockIcon from '@material-ui/icons/Block'; import CircularProgress from '@material-ui/core/CircularProgress'; import { ScheduledTaskDetailPanel } from './ScheduledTaskDetailedPanel'; import { RequirePermission } from '@backstage/plugin-permission-react'; @@ -89,6 +90,12 @@ const StatusDisplay = ({ ); +const CreateNotAllowed = () => ( + + + +); + /** @public */ export const ScheduledTasksContent = () => { const classes = useStyles(); @@ -198,7 +205,10 @@ export const ScheduledTasksContent = () => { { title: 'Actions', render: (rowData: TaskApiTasksResponse) => ( - + } + > { ), sorting: false, width: '10%', + align: 'center', }, ];