diff --git a/workspaces/augment/plugins/augment/src/components/AdminPanels/KagentiPanels/AgentLifecycleDetail.tsx b/workspaces/augment/plugins/augment/src/components/AdminPanels/KagentiPanels/AgentLifecycleDetail.tsx
index 7f41dcd2f0..909a605ada 100644
--- a/workspaces/augment/plugins/augment/src/components/AdminPanels/KagentiPanels/AgentLifecycleDetail.tsx
+++ b/workspaces/augment/plugins/augment/src/components/AdminPanels/KagentiPanels/AgentLifecycleDetail.tsx
@@ -38,6 +38,7 @@ import {
getLifecycleStep,
} from './lifecycleTransitions';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
+import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import { useApi, configApiRef, fetchApiRef } from '@backstage/core-plugin-api';
import type { KagentiAgentSummary } from '@red-hat-developer-hub/backstage-plugin-augment-common';
import { normalizeLifecycleStage } from '@red-hat-developer-hub/backstage-plugin-augment-common';
@@ -71,6 +72,7 @@ export interface AgentLifecycleDetailProps {
agent: KagentiAgentSummary;
onBack: () => void;
onChatWithAgent?: (agentId: string) => void;
+ isAdmin?: boolean;
}
/**
@@ -81,6 +83,7 @@ export function AgentLifecycleDetail({
agent,
onBack,
onChatWithAgent,
+ isAdmin = false,
}: AgentLifecycleDetailProps) {
const theme = useTheme();
const isDark = theme.palette.mode === 'dark';
@@ -280,71 +283,122 @@ export function AgentLifecycleDetail({
flexShrink: 0,
}}
>
- {lifecycleStage !== 'retired' && (
-
-
- ) : (
- nextTransition.icon
- )
- }
- disabled={publishLoading}
- onClick={handleLifecycleAction}
- sx={{
- textTransform: 'none',
- fontWeight: 600,
- fontSize: '0.8rem',
- borderRadius: borderRadius.sm,
- }}
- >
- {nextTransition.label}
-
-
- )}
- {lifecycleStage === 'retired' && (
-
-
- ) : (
-
- )
- }
- disabled={publishLoading}
- onClick={handleLifecycleAction}
- sx={{
- textTransform: 'none',
- fontWeight: 600,
- fontSize: '0.8rem',
- borderRadius: borderRadius.sm,
- }}
- >
- Reactivate
-
-
- )}
- {hasBuild && (
-
- }
- disabled={buildTriggering}
- onClick={() => void handleTriggerBuild()}
- sx={{ textTransform: 'none', borderRadius: borderRadius.sm }}
- >
- {buildTriggering ? 'Building...' : 'Rebuild'}
-
-
+ {isAdmin ? (
+ <>
+ {lifecycleStage !== 'retired' && (
+
+
+ ) : (
+ nextTransition.icon
+ )
+ }
+ disabled={publishLoading}
+ onClick={handleLifecycleAction}
+ sx={{
+ textTransform: 'none',
+ fontWeight: 600,
+ fontSize: '0.8rem',
+ borderRadius: borderRadius.sm,
+ }}
+ >
+ {nextTransition.label}
+
+
+ )}
+ {lifecycleStage === 'retired' && (
+
+
+ ) : (
+
+ )
+ }
+ disabled={publishLoading}
+ onClick={handleLifecycleAction}
+ sx={{
+ textTransform: 'none',
+ fontWeight: 600,
+ fontSize: '0.8rem',
+ borderRadius: borderRadius.sm,
+ }}
+ >
+ Reactivate
+
+
+ )}
+ {hasBuild && (
+
+ }
+ disabled={buildTriggering}
+ onClick={() => void handleTriggerBuild()}
+ sx={{
+ textTransform: 'none',
+ borderRadius: borderRadius.sm,
+ }}
+ >
+ {buildTriggering ? 'Building...' : 'Rebuild'}
+
+
+ )}
+ >
+ ) : (
+ <>
+ {lifecycleStage === 'draft' && (
+
+
+ ) : (
+
+ )
+ }
+ disabled={publishLoading}
+ onClick={handleLifecycleAction}
+ sx={{
+ textTransform: 'none',
+ fontWeight: 600,
+ fontSize: '0.8rem',
+ borderRadius: borderRadius.sm,
+ }}
+ >
+ Submit for Review
+
+
+ )}
+ {lifecycleStage !== 'draft' && (
+ }
+ label={
+ lifecycleStage === 'review'
+ ? 'Awaiting admin approval'
+ : lifecycleStage.charAt(0).toUpperCase() +
+ lifecycleStage.slice(1)
+ }
+ size="small"
+ variant="outlined"
+ color={lifecycleStage === 'review' ? 'info' : 'default'}
+ sx={{ fontWeight: 500, fontSize: '0.78rem' }}
+ />
+ )}
+ >
)}
{onChatWithAgent && (