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
17 changes: 17 additions & 0 deletions console-extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
[
{
"type": "console.flag/model",
"properties": {
"model": {
"group": "agentic.openshift.io",
"version": "v1alpha1",
"kind": "AgenticRun"
},
"flag": "AGENTIC_RUN"
}
},
{
"type": "console.page/route",
"properties": {
"path": "/administration/cluster-update",
"component": { "$codeRef": "ClusterUpdatePage" }
},
"flags": {
"required": ["AGENTIC_RUN"]
}
},
{
Expand All @@ -14,6 +28,9 @@
"href": "/administration/cluster-update",
"perspective": "admin",
"section": "administration"
},
"flags": {
"required": ["AGENTIC_RUN"]
}
}
]
5 changes: 3 additions & 2 deletions locales/en/plugin__cluster-update-console-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"Name": "Name",
"No": "No",
"No active update plans": "No active update plans",
"No agentic runs available.": "No agentic runs available.",
"No update history available": "No update history available",
"No update plans available": "No update plans available",
"OLM operators": "OLM operators",
"OLM Operators": "OLM Operators",
"Operator": "Operator",
Expand All @@ -45,7 +45,7 @@
"Readiness checks": "Readiness checks",
"Readiness Checks": "Readiness Checks",
"Reject plan": "Reject plan",
"Review available versions, assess operator compatibility, and plan how this cluster version is newer OpenShift releases. Use Updates plan to prepare or start an update, Active update plans for in-flight work, and Update history for completed ones.": "Review available versions, assess operator compatibility, and plan how this cluster version is newer OpenShift releases. Use Updates plan to prepare or start an update, Active update plans for in-flight work, and Update history for completed ones.",
"Review available versions, assess operator compatibility, and plan your update to newer OpenShift releases. Use Updates plan to prepare or start an update and Active update plans for in-flight work.": "Review available versions, assess operator compatibility, and plan your update to newer OpenShift releases. Use Updates plan to prepare or start an update and Active update plans for in-flight work.",
"Sandbox: {{name}}": "Sandbox: {{name}}",
"Schedule for later": "Schedule for later",
"Select agentic run": "Select agentic run",
Expand All @@ -63,6 +63,7 @@
"Unknown error": "Unknown error",
"Update": "Update",
"Update history": "Update history",
"Update plans are created automatically when the cluster-version-operator detects available update paths.": "Update plans are created automatically when the cluster-version-operator detects available update paths.",
"Update to {{version}}": "Update to {{version}}",
"Update Type": "Update Type",
"Updates plan": "Updates plan",
Expand Down
24 changes: 6 additions & 18 deletions src/components/ClusterUpdatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { LightspeedAgenticRun, derivePhase } from '../models/agenticrun';
import { ClusterVersion } from '../models/clusterversion';
import UpdatePlanTab from './update-plan/UpdatePlanTab';
import ActivePlansTab from './active-plans/ActivePlansTab';
import UpdateHistoryTab from './update-history/UpdateHistoryTab';
import './ClusterUpdatePage.css';

export default function ClusterUpdatePage() {
Expand Down Expand Up @@ -64,7 +63,7 @@ export default function ClusterUpdatePage() {
</Flex>
<Content component="p" className="cluster-update-plugin__description">
{t(
'Review available versions, assess operator compatibility, and plan how this cluster version is newer OpenShift releases. Use Updates plan to prepare or start an update, Active update plans for in-flight work, and Update history for completed ones.',
'Review available versions, assess operator compatibility, and plan your update to newer OpenShift releases. Use Updates plan to prepare or start an update and Active update plans for in-flight work.',
)}
</Content>
</PageSection>
Expand Down Expand Up @@ -98,28 +97,17 @@ export default function ClusterUpdatePage() {
<Tab eventKey={0} title={<TabTitleText>{t('Updates plan')}</TabTitleText>}>
<TabContent id="updates-plan-tab">
<TabContentBody>
{activeTab === 0 && (
<UpdatePlanTab
clusterVersion={clusterVersion as ClusterVersion}
agenticRuns={agenticRuns}
/>
)}
<UpdatePlanTab
clusterVersion={clusterVersion as ClusterVersion}
agenticRuns={agenticRuns}
/>
</TabContentBody>
</TabContent>
</Tab>
<Tab eventKey={1} title={<TabTitleText>{t('Active update plans')}</TabTitleText>}>
<TabContent id="active-plans-tab">
<TabContentBody>
{activeTab === 1 && <ActivePlansTab activePlans={activePlans} />}
</TabContentBody>
</TabContent>
</Tab>
<Tab eventKey={2} title={<TabTitleText>{t('Update history')}</TabTitleText>}>
<TabContent id="update-history-tab">
<TabContentBody>
{activeTab === 2 && (
<UpdateHistoryTab clusterVersion={clusterVersion as ClusterVersion} />
)}
<ActivePlansTab activePlans={activePlans} />
</TabContentBody>
</TabContent>
</Tab>
Expand Down
16 changes: 5 additions & 11 deletions src/components/update-plan/AnalysisResultView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
getFindings,
sortFindings,
getOlmOperatorStatus,
getDecisionDisplay,
SEVERITY_LABELS,
} from '../../models/agenticrun';
import { I18N_NAMESPACE } from '../../utils/constants';
Expand All @@ -32,13 +33,6 @@ type AnalysisResultViewProps = {
analysisData: AnalysisData;
};

const decisionColors: Record<string, 'green' | 'orange' | 'red' | 'purple'> = {
recommend: 'green',
caution: 'orange',
block: 'red',
escalate: 'purple',
};

const checkStatusIcon = (status: string) => {
switch (status) {
case 'pass':
Expand Down Expand Up @@ -101,11 +95,11 @@ const AnalysisResultView: React.FC<AnalysisResultViewProps> = ({ analysisData })
<CardTitle>
{t('AI Assessment')}
<Label
color={decisionColors[readinessSummary.decision] ?? 'grey'}
color={getDecisionDisplay(readinessSummary.decision).color}
isCompact
style={{ marginLeft: '12px' }}
>
{readinessSummary.decision.toUpperCase()}
{getDecisionDisplay(readinessSummary.decision).label}
</Label>
</CardTitle>
</Card>
Expand Down Expand Up @@ -249,11 +243,11 @@ const AnalysisResultView: React.FC<AnalysisResultViewProps> = ({ analysisData })
{t('AI Assessment')}
{decision && (
<Label
color={decisionColors[decision] ?? 'grey'}
color={getDecisionDisplay(decision).color}
isCompact
style={{ marginLeft: '12px' }}
>
{decision.toUpperCase()}
{getDecisionDisplay(decision).label}
</Label>
)}
</CardTitle>
Expand Down
Loading