Skip to content

Commit c3a3057

Browse files
Merge branch 'dev' into #2279
2 parents 06d7148 + c46ff56 commit c3a3057

File tree

204 files changed

+17618
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+17618
-0
lines changed

.github/workflows/ai-fix.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: AI Fix with Copilot
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
issue_number:
7+
description: Issue number to assign to Copilot
8+
required: true
9+
type: string
10+
issues:
11+
types: [labeled]
12+
pull_request_target:
13+
types: [opened]
14+
15+
permissions:
16+
contents: write
17+
issues: write
18+
pull-requests: write
19+
20+
jobs:
21+
ai-fix:
22+
uses: kubestellar/infra/.github/workflows/reusable-ai-fix.yml@main
23+
with:
24+
issue_number: ${{ github.event.inputs.issue_number || '' }}
25+
secrets:
26+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Copilot PR Automation
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr_number:
7+
description: PR number to process
8+
required: true
9+
type: string
10+
pull_request_target:
11+
types: [opened, synchronize, ready_for_review]
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
issues: write
17+
statuses: write
18+
19+
concurrency:
20+
group: copilot-automation-${{ github.event.pull_request.number || github.event.inputs.pr_number || github.sha }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
copilot-automation:
25+
uses: kubestellar/infra/.github/workflows/reusable-copilot-automation.yml@main
26+
with:
27+
pr_number: ${{ github.event.inputs.pr_number || '' }}
28+
secrets:
29+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/**
2+
* Active Alerts Card Configuration
3+
*
4+
* Displays currently firing alerts from Prometheus/Alertmanager.
5+
*/
6+
7+
import type { UnifiedCardConfig } from '../../lib/unified/types'
8+
9+
export const activeAlertsConfig: UnifiedCardConfig = {
10+
type: 'active_alerts',
11+
title: 'Active Alerts',
12+
category: 'alerting',
13+
description: 'Currently firing alerts across clusters',
14+
icon: 'Bell',
15+
iconColor: 'text-yellow-400',
16+
defaultWidth: 4,
17+
defaultHeight: 3,
18+
19+
isDemoData: true, // Uses demo data hook in registerHooks.ts
20+
21+
dataSource: {
22+
type: 'hook',
23+
hook: 'useActiveAlerts',
24+
},
25+
26+
stats: [
27+
{
28+
id: 'critical',
29+
icon: 'AlertTriangle',
30+
color: 'red',
31+
label: 'Critical',
32+
bgColor: 'bg-red-500',
33+
valueSource: { type: 'count', filter: 'severity=critical' },
34+
},
35+
{
36+
id: 'warning',
37+
icon: 'AlertCircle',
38+
color: 'yellow',
39+
label: 'Warning',
40+
bgColor: 'bg-yellow-500',
41+
valueSource: { type: 'count', filter: 'severity=warning' },
42+
},
43+
],
44+
45+
content: {
46+
type: 'list',
47+
columns: [
48+
{
49+
field: 'severity',
50+
header: '',
51+
width: 32,
52+
render: 'status-badge',
53+
},
54+
{
55+
field: 'alertname',
56+
header: 'Alert',
57+
primary: true,
58+
},
59+
{
60+
field: 'duration',
61+
header: 'Duration',
62+
width: 80,
63+
render: 'relative-time',
64+
},
65+
],
66+
pageSize: 6,
67+
},
68+
69+
emptyState: {
70+
icon: 'BellOff',
71+
title: 'No active alerts',
72+
message: 'All systems operating normally',
73+
variant: 'success',
74+
},
75+
76+
footer: {
77+
showTotal: true,
78+
text: 'alerts firing',
79+
},
80+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Alert Rules Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const alertRulesConfig: UnifiedCardConfig = {
7+
type: 'alert_rules',
8+
title: 'Alert Rules',
9+
category: 'alerts',
10+
description: 'Prometheus/Alertmanager alert rules',
11+
icon: 'Bell',
12+
iconColor: 'text-orange-400',
13+
defaultWidth: 6,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useAlertRules' },
16+
filters: [
17+
{ field: 'search', type: 'text', placeholder: 'Search rules...', searchFields: ['name', 'severity'], storageKey: 'alert-rules' },
18+
],
19+
content: {
20+
type: 'list',
21+
pageSize: 10,
22+
columns: [
23+
{ field: 'name', header: 'Rule', primary: true, render: 'truncate' },
24+
{ field: 'severity', header: 'Severity', render: 'status-badge', width: 80 },
25+
{ field: 'state', header: 'State', render: 'status-badge', width: 80 },
26+
{ field: 'alertsCount', header: 'Alerts', render: 'number', width: 60 },
27+
],
28+
},
29+
emptyState: { icon: 'Bell', title: 'No Alert Rules', message: 'No alert rules configured', variant: 'info' },
30+
loadingState: { type: 'list', rows: 5 },
31+
isDemoData: true,
32+
isLive: false,
33+
}
34+
export default alertRulesConfig

web/src/config/cards/app-status.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* App Status Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const appStatusConfig: UnifiedCardConfig = {
7+
type: 'app_status',
8+
title: 'Application Status',
9+
category: 'workloads',
10+
description: 'Application deployment status overview',
11+
icon: 'Package',
12+
iconColor: 'text-blue-400',
13+
defaultWidth: 4,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useAppStatus' },
16+
content: {
17+
type: 'stats-grid',
18+
stats: [
19+
{ field: 'running', label: 'Running', color: 'green' },
20+
{ field: 'pending', label: 'Pending', color: 'yellow' },
21+
{ field: 'failed', label: 'Failed', color: 'red' },
22+
],
23+
},
24+
emptyState: { icon: 'Package', title: 'No Apps', message: 'No applications found', variant: 'info' },
25+
loadingState: { type: 'stats', count: 3 },
26+
isDemoData: false,
27+
isLive: true,
28+
}
29+
export default appStatusConfig
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* ArgoCD Applications Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const argocdApplicationsConfig: UnifiedCardConfig = {
7+
type: 'argocd_applications',
8+
title: 'ArgoCD Applications',
9+
category: 'gitops',
10+
description: 'ArgoCD managed applications',
11+
icon: 'GitBranch',
12+
iconColor: 'text-orange-400',
13+
defaultWidth: 6,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useArgoCDApplications' },
16+
filters: [
17+
{ field: 'search', type: 'text', placeholder: 'Search apps...', searchFields: ['name', 'namespace', 'project'], storageKey: 'argocd-apps' },
18+
],
19+
content: {
20+
type: 'list',
21+
pageSize: 10,
22+
columns: [
23+
{ field: 'name', header: 'Application', primary: true, render: 'truncate' },
24+
{ field: 'project', header: 'Project', render: 'text', width: 100 },
25+
{ field: 'syncStatus', header: 'Sync', render: 'status-badge', width: 80 },
26+
{ field: 'healthStatus', header: 'Health', render: 'status-badge', width: 80 },
27+
],
28+
},
29+
emptyState: { icon: 'GitBranch', title: 'No Applications', message: 'No ArgoCD applications found', variant: 'info' },
30+
loadingState: { type: 'list', rows: 5 },
31+
isDemoData: true,
32+
isLive: false,
33+
}
34+
export default argocdApplicationsConfig
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* ArgoCD Health Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const argocdHealthConfig: UnifiedCardConfig = {
7+
type: 'argocd_health',
8+
title: 'ArgoCD Health',
9+
category: 'gitops',
10+
description: 'Health status of ArgoCD applications',
11+
icon: 'HeartPulse',
12+
iconColor: 'text-red-400',
13+
defaultWidth: 6,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useArgoCDHealth' },
16+
content: {
17+
type: 'stats-grid',
18+
stats: [
19+
{ field: 'healthy', label: 'Healthy', color: 'green' },
20+
{ field: 'degraded', label: 'Degraded', color: 'yellow' },
21+
{ field: 'progressing', label: 'Progressing', color: 'blue' },
22+
{ field: 'missing', label: 'Missing', color: 'red' },
23+
],
24+
},
25+
emptyState: { icon: 'HeartPulse', title: 'No Health Data', message: 'No ArgoCD health data available', variant: 'info' },
26+
loadingState: { type: 'stats', count: 4 },
27+
isDemoData: true,
28+
isLive: false,
29+
}
30+
export default argocdHealthConfig
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* ArgoCD Sync Status Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const argocdSyncStatusConfig: UnifiedCardConfig = {
7+
type: 'argocd_sync_status',
8+
title: 'ArgoCD Sync Status',
9+
category: 'gitops',
10+
description: 'Sync status of ArgoCD applications',
11+
icon: 'RefreshCw',
12+
iconColor: 'text-green-400',
13+
defaultWidth: 6,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useArgoCDSyncStatus' },
16+
content: {
17+
type: 'stats-grid',
18+
stats: [
19+
{ field: 'synced', label: 'Synced', color: 'green' },
20+
{ field: 'outOfSync', label: 'Out of Sync', color: 'yellow' },
21+
{ field: 'unknown', label: 'Unknown', color: 'gray' },
22+
],
23+
},
24+
emptyState: { icon: 'RefreshCw', title: 'No Status', message: 'No sync status available', variant: 'info' },
25+
loadingState: { type: 'stats', count: 3 },
26+
isDemoData: true,
27+
isLive: false,
28+
}
29+
export default argocdSyncStatusConfig
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Cert Manager Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const certManagerConfig: UnifiedCardConfig = {
7+
type: 'cert_manager',
8+
title: 'Certificates',
9+
category: 'security',
10+
description: 'cert-manager certificate status',
11+
icon: 'FileKey',
12+
iconColor: 'text-green-400',
13+
defaultWidth: 4,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useCertManager' },
16+
content: {
17+
type: 'stats-grid',
18+
stats: [
19+
{ field: 'total', label: 'Total', color: 'blue' },
20+
{ field: 'ready', label: 'Ready', color: 'green' },
21+
{ field: 'expiringSoon', label: 'Expiring', color: 'yellow' },
22+
],
23+
},
24+
emptyState: { icon: 'FileKey', title: 'No Certs', message: 'No certificates found', variant: 'info' },
25+
loadingState: { type: 'stats', count: 3 },
26+
isDemoData: false,
27+
isLive: true,
28+
}
29+
export default certManagerConfig
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Chart Versions Card Configuration
3+
*/
4+
import type { UnifiedCardConfig } from '../../lib/unified/types'
5+
6+
export const chartVersionsConfig: UnifiedCardConfig = {
7+
type: 'chart_versions',
8+
title: 'Chart Versions',
9+
category: 'gitops',
10+
description: 'Available Helm chart versions',
11+
icon: 'Package',
12+
iconColor: 'text-blue-400',
13+
defaultWidth: 6,
14+
defaultHeight: 3,
15+
dataSource: { type: 'hook', hook: 'useChartVersions' },
16+
content: {
17+
type: 'list',
18+
pageSize: 10,
19+
columns: [
20+
{ field: 'name', header: 'Chart', primary: true, render: 'truncate' },
21+
{ field: 'version', header: 'Version', render: 'text', width: 80 },
22+
{ field: 'appVersion', header: 'App Ver', render: 'text', width: 80 },
23+
{ field: 'created', header: 'Created', render: 'relative-time', width: 100 },
24+
],
25+
},
26+
emptyState: { icon: 'Package', title: 'No Charts', message: 'No chart versions found', variant: 'info' },
27+
loadingState: { type: 'list', rows: 5 },
28+
isDemoData: true,
29+
isLive: false,
30+
}
31+
export default chartVersionsConfig

0 commit comments

Comments
 (0)