@manojkmfsi/monodog 1.1.37 → 1.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/monodog-dashboard/dist/assets/index-C08ciT3A.js +20 -0
- package/monodog-dashboard/dist/assets/index-C08ciT3A.js.map +1 -0
- package/monodog-dashboard/dist/assets/index-Dc2vaUOq.css +1 -0
- package/monodog-dashboard/{index.html → dist/index.html} +2 -1
- package/monodog-dashboard/package.json +0 -3
- package/package.json +2 -2
- package/monodog-dashboard/THEME_SYSTEM.md +0 -309
- package/monodog-dashboard/__tests__/AuthCallbackPage.test.ts +0 -138
- package/monodog-dashboard/__tests__/ConfigInspector.test.ts +0 -33
- package/monodog-dashboard/__tests__/DependencyGraph.test.ts +0 -72
- package/monodog-dashboard/__tests__/HealthStatus.test.ts +0 -69
- package/monodog-dashboard/__tests__/LoginPage.test.ts +0 -79
- package/monodog-dashboard/__tests__/PackageDetail.test.ts +0 -22
- package/monodog-dashboard/__tests__/ReleaseManager.test.tsx +0 -510
- package/monodog-dashboard/__tests__/api-client.test.ts +0 -475
- package/monodog-dashboard/__tests__/components.test.ts +0 -117
- package/monodog-dashboard/__tests__/dashboard.utils.test.ts +0 -144
- package/monodog-dashboard/__tests__/dependency.utils.test.ts +0 -125
- package/monodog-dashboard/__tests__/monorepoService.unit.test.ts +0 -103
- package/monodog-dashboard/__tests__/packages.utils.test.ts +0 -37
- package/monodog-dashboard/__tests__/pages.test.ts +0 -103
- package/monodog-dashboard/package-lock.json +0 -4587
- package/monodog-dashboard/postcss.config.js +0 -6
- package/monodog-dashboard/src/components/App.tsx +0 -36
- package/monodog-dashboard/src/components/LoadingState.tsx +0 -18
- package/monodog-dashboard/src/components/PermissionGuard.tsx +0 -92
- package/monodog-dashboard/src/components/ProtectedRoute.tsx +0 -24
- package/monodog-dashboard/src/components/configuration/Configuration.tsx +0 -91
- package/monodog-dashboard/src/components/configuration/components/BrandingSettings.tsx +0 -128
- package/monodog-dashboard/src/components/configuration/components/ConfigurationHeader.tsx +0 -34
- package/monodog-dashboard/src/components/configuration/components/ConfigurationModal.tsx +0 -20
- package/monodog-dashboard/src/components/configuration/components/ConfigurationTabs.tsx +0 -30
- package/monodog-dashboard/src/components/configuration/components/FeatureToggles.tsx +0 -66
- package/monodog-dashboard/src/components/configuration/components/GeneralSettings.tsx +0 -77
- package/monodog-dashboard/src/components/configuration/components/MonorepoSettings.tsx +0 -179
- package/monodog-dashboard/src/components/configuration/components/index.ts +0 -8
- package/monodog-dashboard/src/components/configuration/types/config.types.ts +0 -52
- package/monodog-dashboard/src/components/configuration/utils/config.utils.tsx +0 -115
- package/monodog-dashboard/src/components/main-dashboard/Dashboard.tsx +0 -242
- package/monodog-dashboard/src/components/main-dashboard/Layout.tsx +0 -112
- package/monodog-dashboard/src/components/main-dashboard/components/Header.tsx +0 -47
- package/monodog-dashboard/src/components/main-dashboard/components/PackageDistribution.tsx +0 -35
- package/monodog-dashboard/src/components/main-dashboard/components/PackageSearchFilter.tsx +0 -47
- package/monodog-dashboard/src/components/main-dashboard/components/PackageTable.tsx +0 -87
- package/monodog-dashboard/src/components/main-dashboard/components/QuickActions.tsx +0 -60
- package/monodog-dashboard/src/components/main-dashboard/components/StatsCards.tsx +0 -73
- package/monodog-dashboard/src/components/main-dashboard/components/index.ts +0 -7
- package/monodog-dashboard/src/components/main-dashboard/types/dashboard.types.ts +0 -33
- package/monodog-dashboard/src/components/main-dashboard/utils/dashboard.utils.tsx +0 -70
- package/monodog-dashboard/src/components/modules/ci-integration/CIIntegration.tsx +0 -277
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildDetails.tsx +0 -228
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildList.tsx +0 -212
- package/monodog-dashboard/src/components/modules/ci-integration/components/BuildOverview.tsx +0 -158
- package/monodog-dashboard/src/components/modules/ci-integration/components/CIIntegrationHeader.tsx +0 -38
- package/monodog-dashboard/src/components/modules/ci-integration/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/ci-integration/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/ci-integration/components/PipelineStatus.tsx +0 -223
- package/monodog-dashboard/src/components/modules/ci-integration/components/index.ts +0 -8
- package/monodog-dashboard/src/components/modules/ci-integration/types/ci.types.ts +0 -97
- package/monodog-dashboard/src/components/modules/ci-integration/utils/ci.utils.tsx +0 -264
- package/monodog-dashboard/src/components/modules/config-inspector/ConfigInspector.tsx +0 -324
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigEditor.tsx +0 -93
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigInspectorHeader.tsx +0 -36
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigPreview.tsx +0 -89
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigSidebar.tsx +0 -141
- package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigToolbar.tsx +0 -184
- package/monodog-dashboard/src/components/modules/config-inspector/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/config-inspector/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/config-inspector/components/ValidationPanel.tsx +0 -155
- package/monodog-dashboard/src/components/modules/config-inspector/components/index.ts +0 -9
- package/monodog-dashboard/src/components/modules/config-inspector/types/config.types.ts +0 -100
- package/monodog-dashboard/src/components/modules/config-inspector/utils/config.utils.tsx +0 -704
- package/monodog-dashboard/src/components/modules/dependency-graph/DependencyGraph.tsx +0 -224
- package/monodog-dashboard/src/components/modules/dependency-graph/components/CircularDependencies.tsx +0 -177
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyDetails.tsx +0 -192
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyGraphHeader.tsx +0 -30
- package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyList.tsx +0 -177
- package/monodog-dashboard/src/components/modules/dependency-graph/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphLegend.tsx +0 -89
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphStats.tsx +0 -141
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphToolbar.tsx +0 -107
- package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphVisualization.tsx +0 -179
- package/monodog-dashboard/src/components/modules/dependency-graph/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/dependency-graph/components/index.ts +0 -11
- package/monodog-dashboard/src/components/modules/dependency-graph/types/dependency.types.ts +0 -105
- package/monodog-dashboard/src/components/modules/dependency-graph/utils/dependency.utils.tsx +0 -433
- package/monodog-dashboard/src/components/modules/health-status/HealthStatus.tsx +0 -739
- package/monodog-dashboard/src/components/modules/health-status/components/ErrorState.tsx +0 -25
- package/monodog-dashboard/src/components/modules/health-status/components/HealthActions.tsx +0 -122
- package/monodog-dashboard/src/components/modules/health-status/components/HealthAlerts.tsx +0 -151
- package/monodog-dashboard/src/components/modules/health-status/components/HealthMetrics.tsx +0 -132
- package/monodog-dashboard/src/components/modules/health-status/components/HealthStatusHeader.tsx +0 -30
- package/monodog-dashboard/src/components/modules/health-status/components/LoadingState.tsx +0 -16
- package/monodog-dashboard/src/components/modules/health-status/components/OverallHealthScore.tsx +0 -122
- package/monodog-dashboard/src/components/modules/health-status/components/PackageHealthList.tsx +0 -195
- package/monodog-dashboard/src/components/modules/health-status/types/health.types.ts +0 -80
- package/monodog-dashboard/src/components/modules/health-status/utils/health.utils.tsx +0 -220
- package/monodog-dashboard/src/components/modules/packages/PackageDetail.tsx +0 -255
- package/monodog-dashboard/src/components/modules/packages/PackagesOverview.tsx +0 -166
- package/monodog-dashboard/src/components/modules/packages/components/ConfigurationTab.tsx +0 -311
- package/monodog-dashboard/src/components/modules/packages/components/DependenciesTab.tsx +0 -154
- package/monodog-dashboard/src/components/modules/packages/components/ErrorState.tsx +0 -21
- package/monodog-dashboard/src/components/modules/packages/components/HealthMetricsTab.tsx +0 -275
- package/monodog-dashboard/src/components/modules/packages/components/LoadingState.tsx +0 -14
- package/monodog-dashboard/src/components/modules/packages/components/PackageDetailHeader.tsx +0 -167
- package/monodog-dashboard/src/components/modules/packages/components/PackageDetailTabs.tsx +0 -49
- package/monodog-dashboard/src/components/modules/packages/components/PackageStats.tsx +0 -70
- package/monodog-dashboard/src/components/modules/packages/components/PackagesTable.tsx +0 -163
- package/monodog-dashboard/src/components/modules/packages/components/RecentCommitsTab.tsx +0 -90
- package/monodog-dashboard/src/components/modules/packages/components/SearchAndFilter.tsx +0 -66
- package/monodog-dashboard/src/components/modules/packages/components/index.ts +0 -12
- package/monodog-dashboard/src/components/modules/packages/types/packages.types.ts +0 -101
- package/monodog-dashboard/src/components/modules/packages/utils/packages.utils.tsx +0 -178
- package/monodog-dashboard/src/components/pipeline/JobsList.tsx +0 -83
- package/monodog-dashboard/src/components/pipeline/LogViewer.tsx +0 -392
- package/monodog-dashboard/src/components/pipeline/PipelineManager.tsx +0 -562
- package/monodog-dashboard/src/components/pipeline/WorkflowRunsList.tsx +0 -272
- package/monodog-dashboard/src/components/pipeline/WorkflowTrigger.tsx +0 -182
- package/monodog-dashboard/src/components/pipeline/utils/pipeline.utils.tsx +0 -11
- package/monodog-dashboard/src/components/publish-control/PublishControl.tsx +0 -229
- package/monodog-dashboard/src/components/publish-control/components/ChangelogViewer.tsx +0 -103
- package/monodog-dashboard/src/components/publish-control/components/ErrorState.tsx +0 -23
- package/monodog-dashboard/src/components/publish-control/components/LoadingState.tsx +0 -10
- package/monodog-dashboard/src/components/publish-control/components/PackageReleaseTable.tsx +0 -140
- package/monodog-dashboard/src/components/publish-control/components/PublishHeader.tsx +0 -30
- package/monodog-dashboard/src/components/publish-control/components/QuickActionCards.tsx +0 -56
- package/monodog-dashboard/src/components/publish-control/components/ReleaseSchedule.tsx +0 -104
- package/monodog-dashboard/src/components/publish-control/components/index.ts +0 -8
- package/monodog-dashboard/src/components/publish-control/types/publish.types.ts +0 -39
- package/monodog-dashboard/src/components/publish-control/utils/publish.utils.ts +0 -59
- package/monodog-dashboard/src/components/release-manager/ReleaseManager.tsx +0 -342
- package/monodog-dashboard/src/components/release-manager/components/ChangesetPreview.tsx +0 -123
- package/monodog-dashboard/src/components/release-manager/components/ErrorState.tsx +0 -38
- package/monodog-dashboard/src/components/release-manager/components/LoadingState.tsx +0 -18
- package/monodog-dashboard/src/components/release-manager/components/PackageSelector.tsx +0 -137
- package/monodog-dashboard/src/components/release-manager/components/PublishConfirmation.tsx +0 -150
- package/monodog-dashboard/src/components/release-manager/components/ReleaseValidation.tsx +0 -138
- package/monodog-dashboard/src/components/release-manager/components/VersionBumpSelector.tsx +0 -142
- package/monodog-dashboard/src/components/release-manager/types/index.ts +0 -9
- package/monodog-dashboard/src/components/release-manager/types/release-manager.types.ts +0 -29
- package/monodog-dashboard/src/components/setup-guide/SetupGuide.tsx +0 -96
- package/monodog-dashboard/src/components/setup-guide/components/SetupHeader.tsx +0 -24
- package/monodog-dashboard/src/components/setup-guide/components/SetupModal.tsx +0 -24
- package/monodog-dashboard/src/components/setup-guide/components/SetupProgress.tsx +0 -29
- package/monodog-dashboard/src/components/setup-guide/components/StepContent.tsx +0 -272
- package/monodog-dashboard/src/components/setup-guide/components/StepNavigation.tsx +0 -62
- package/monodog-dashboard/src/components/setup-guide/components/index.ts +0 -6
- package/monodog-dashboard/src/components/setup-guide/types/setup.types.ts +0 -38
- package/monodog-dashboard/src/components/setup-guide/utils/setup.utils.ts +0 -79
- package/monodog-dashboard/src/constants/api-config.ts +0 -81
- package/monodog-dashboard/src/constants/index.ts +0 -9
- package/monodog-dashboard/src/constants/messages.ts +0 -40
- package/monodog-dashboard/src/icons/heroicons.ts +0 -65
- package/monodog-dashboard/src/icons/index.tsx +0 -1788
- package/monodog-dashboard/src/index.css +0 -175
- package/monodog-dashboard/src/main.tsx +0 -9
- package/monodog-dashboard/src/pages/AuthCallbackPage.tsx +0 -103
- package/monodog-dashboard/src/pages/CIPage.tsx +0 -6
- package/monodog-dashboard/src/pages/ConfigPage.tsx +0 -6
- package/monodog-dashboard/src/pages/DashboardPage.tsx +0 -6
- package/monodog-dashboard/src/pages/DependenciesPage.tsx +0 -6
- package/monodog-dashboard/src/pages/HealthPage.tsx +0 -6
- package/monodog-dashboard/src/pages/LoginPage.tsx +0 -77
- package/monodog-dashboard/src/pages/PackageDetailPage.tsx +0 -6
- package/monodog-dashboard/src/pages/PackagesPage.tsx +0 -6
- package/monodog-dashboard/src/pages/PipelinePage.tsx +0 -22
- package/monodog-dashboard/src/pages/PublishPage.tsx +0 -6
- package/monodog-dashboard/src/pages/ReleaseManagerPage.tsx +0 -9
- package/monodog-dashboard/src/pages/index.ts +0 -28
- package/monodog-dashboard/src/routes/AppRouter.tsx +0 -89
- package/monodog-dashboard/src/routes/AppRouterPages.tsx +0 -56
- package/monodog-dashboard/src/routes/index.ts +0 -10
- package/monodog-dashboard/src/routes/routes.config.ts +0 -94
- package/monodog-dashboard/src/services/api/api-client.ts +0 -189
- package/monodog-dashboard/src/services/api/index.ts +0 -30
- package/monodog-dashboard/src/services/api/types/api.types.ts +0 -63
- package/monodog-dashboard/src/services/auth-context.tsx +0 -344
- package/monodog-dashboard/src/services/monorepoService.ts +0 -733
- package/monodog-dashboard/src/services/permission-context.tsx +0 -193
- package/monodog-dashboard/src/theme/COMPONENT_UPDATES.md +0 -273
- package/monodog-dashboard/src/theme/INTEGRATION.md +0 -381
- package/monodog-dashboard/src/theme/README.md +0 -239
- package/monodog-dashboard/src/theme/examples.tsx +0 -386
- package/monodog-dashboard/src/theme/index.ts +0 -402
- package/monodog-dashboard/src/theme/migration-guide.md +0 -335
- package/monodog-dashboard/src/types/auth-context.types.ts +0 -51
- package/monodog-dashboard/src/types/component.types.ts +0 -96
- package/monodog-dashboard/src/types/icons.types.ts +0 -13
- package/monodog-dashboard/src/types/index.ts +0 -68
- package/monodog-dashboard/src/types/monorepo-service.types.ts +0 -53
- package/monodog-dashboard/src/types/permission-context.types.ts +0 -49
- package/monodog-dashboard/src/types/pipeline.types.ts +0 -89
- package/monodog-dashboard/src/types/routes.types.ts +0 -12
- package/monodog-dashboard/src/utils/cookies.ts +0 -47
- package/monodog-dashboard/tailwind.config.js +0 -68
- package/monodog-dashboard/tsconfig.app.json +0 -14
- package/monodog-dashboard/tsconfig.json +0 -17
- package/monodog-dashboard/tsconfig.node.json +0 -10
- package/monodog-dashboard/vite.config.ts +0 -9
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { RocketLaunchIcon } from '../../../icons/heroicons';
|
|
3
|
-
// Import sub-components
|
|
4
|
-
import {
|
|
5
|
-
LoadingState,
|
|
6
|
-
ErrorState,
|
|
7
|
-
CIIntegrationHeader,
|
|
8
|
-
BuildOverview,
|
|
9
|
-
BuildList,
|
|
10
|
-
PipelineStatus,
|
|
11
|
-
BuildDetails,
|
|
12
|
-
} from './components';
|
|
13
|
-
|
|
14
|
-
// Import types and utilities
|
|
15
|
-
import { Build, Pipeline, CIFilters } from './types/ci.types';
|
|
16
|
-
import { calculateBuildStats, filterBuilds } from './utils/ci.utils';
|
|
17
|
-
|
|
18
|
-
// Import service and constants
|
|
19
|
-
import { monorepoService } from '../../../services/monorepoService';
|
|
20
|
-
import { DASHBOARD_ERROR_MESSAGES } from '../../../constants/messages';
|
|
21
|
-
|
|
22
|
-
// Re-export types for backward compatibility
|
|
23
|
-
export type { Build, Pipeline, CIFilters } from './types/ci.types';
|
|
24
|
-
|
|
25
|
-
// Mock pipelines data (since not included in service yet)
|
|
26
|
-
const mockPipelines: Pipeline[] = [
|
|
27
|
-
{
|
|
28
|
-
id: '1',
|
|
29
|
-
name: 'Dashboard CI',
|
|
30
|
-
packageName: 'dashboard',
|
|
31
|
-
status: 'active',
|
|
32
|
-
lastRun: '2024-01-16T09:00:00Z',
|
|
33
|
-
nextRun: '2024-01-16T10:00:00Z',
|
|
34
|
-
successRate: 95,
|
|
35
|
-
avgDuration: 420,
|
|
36
|
-
triggers: ['push', 'pull_request'],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: '2',
|
|
40
|
-
name: 'Backend CI',
|
|
41
|
-
packageName: 'backend',
|
|
42
|
-
status: 'active',
|
|
43
|
-
lastRun: '2024-01-16T08:30:00Z',
|
|
44
|
-
nextRun: '2024-01-16T09:30:00Z',
|
|
45
|
-
successRate: 88,
|
|
46
|
-
avgDuration: 900,
|
|
47
|
-
triggers: ['push', 'pull_request', 'tag'],
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: '3',
|
|
51
|
-
name: 'Utils CI',
|
|
52
|
-
packageName: 'utils',
|
|
53
|
-
status: 'paused',
|
|
54
|
-
lastRun: '2024-01-16T08:00:00Z',
|
|
55
|
-
successRate: 75,
|
|
56
|
-
avgDuration: 600,
|
|
57
|
-
triggers: ['push', 'pull_request'],
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
export default function CIIntegration() {
|
|
62
|
-
// State management
|
|
63
|
-
const [loading, setLoading] = useState(true);
|
|
64
|
-
const [error, setError] = useState<string | null>(null);
|
|
65
|
-
const [builds, setBuilds] = useState<Build[]>([]);
|
|
66
|
-
const [pipelines] = useState<Pipeline[]>(mockPipelines);
|
|
67
|
-
|
|
68
|
-
// Selection state
|
|
69
|
-
const [selectedBuild, setSelectedBuild] = useState<string | null>(null);
|
|
70
|
-
|
|
71
|
-
// Filter state
|
|
72
|
-
const [filters, setFilters] = useState<CIFilters>({
|
|
73
|
-
package: 'all',
|
|
74
|
-
status: 'all',
|
|
75
|
-
pipeline: 'all',
|
|
76
|
-
dateRange: 'all',
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// Fetch build data
|
|
80
|
-
useEffect(() => {
|
|
81
|
-
const fetchBuildData = async () => {
|
|
82
|
-
try {
|
|
83
|
-
setLoading(true);
|
|
84
|
-
const data = await monorepoService.getBuildStatus();
|
|
85
|
-
|
|
86
|
-
// Transform the data to match our Build interface
|
|
87
|
-
const transformedData: Build[] = data.map((build: Record<string, unknown>) => ({
|
|
88
|
-
id: (build.id as string) || Math.random().toString(36).substr(2, 9),
|
|
89
|
-
packageName: (build.package as string) || (build.packageName as string) || 'unknown',
|
|
90
|
-
branch: (build.branch as string) || 'main',
|
|
91
|
-
commit: (build.commit as string) || 'unknown',
|
|
92
|
-
status: (build.status as string) || 'pending',
|
|
93
|
-
startTime: (build.startTime as string) || new Date().toISOString(),
|
|
94
|
-
endTime: build.endTime as string | undefined,
|
|
95
|
-
duration: build.duration as number | undefined,
|
|
96
|
-
stages: build.stages || [],
|
|
97
|
-
triggeredBy: build.triggeredBy || 'system',
|
|
98
|
-
artifacts: build.artifacts || [],
|
|
99
|
-
}));
|
|
100
|
-
|
|
101
|
-
setBuilds(transformedData);
|
|
102
|
-
setError(null);
|
|
103
|
-
} catch (err) {
|
|
104
|
-
setError(DASHBOARD_ERROR_MESSAGES.FAILED_TO_FETCH_PACKAGES);
|
|
105
|
-
console.error('Error fetching build data:', err);
|
|
106
|
-
} finally {
|
|
107
|
-
setLoading(false);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
fetchBuildData();
|
|
112
|
-
}, []);
|
|
113
|
-
|
|
114
|
-
// Get filtered builds and statistics
|
|
115
|
-
const filteredBuilds = filterBuilds(builds, filters);
|
|
116
|
-
const stats = calculateBuildStats(builds);
|
|
117
|
-
const selectedBuildData = selectedBuild
|
|
118
|
-
? builds.find(build => build.id === selectedBuild) || null
|
|
119
|
-
: null;
|
|
120
|
-
|
|
121
|
-
// Event handlers
|
|
122
|
-
const handleRefresh = () => {
|
|
123
|
-
window.location.reload();
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const handleTriggerBuild = () => {
|
|
127
|
-
// In a real implementation, this would trigger a new build
|
|
128
|
-
console.log('Triggering new build...');
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const handleCreatePipeline = () => {
|
|
132
|
-
// In a real implementation, this would open a pipeline creation dialog
|
|
133
|
-
console.log('Creating new pipeline...');
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const handleBuildSelect = (buildId: string | null) => {
|
|
137
|
-
setSelectedBuild(buildId);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
const handlePipelineSelect = (pipelineId: string) => {
|
|
141
|
-
// In a real implementation, this would show pipeline details
|
|
142
|
-
console.log('Selected pipeline:', pipelineId);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const handlePipelineToggle = (pipelineId: string, active: boolean) => {
|
|
146
|
-
// In a real implementation, this would toggle pipeline status
|
|
147
|
-
console.log('Toggle pipeline:', pipelineId, 'active:', active);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const handleBuildCancel = (buildId: string) => {
|
|
151
|
-
// In a real implementation, this would cancel the build
|
|
152
|
-
console.log('Cancelling build:', buildId);
|
|
153
|
-
setSelectedBuild(null);
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
const handleBuildRetry = (buildId: string) => {
|
|
157
|
-
// In a real implementation, this would retry the build
|
|
158
|
-
console.log('Retrying build:', buildId);
|
|
159
|
-
setSelectedBuild(null);
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
const handleRetry = () => {
|
|
163
|
-
window.location.reload();
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// Loading state
|
|
167
|
-
if (loading) {
|
|
168
|
-
return <LoadingState />;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Error state
|
|
172
|
-
if (error) {
|
|
173
|
-
return <ErrorState error={error} onRetry={handleRetry} />;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return (
|
|
177
|
-
<div className="space-y-6">
|
|
178
|
-
{/* Header */}
|
|
179
|
-
<CIIntegrationHeader
|
|
180
|
-
onTriggerBuild={handleTriggerBuild}
|
|
181
|
-
onCreatePipeline={handleCreatePipeline}
|
|
182
|
-
/>
|
|
183
|
-
|
|
184
|
-
{/* Build Overview */}
|
|
185
|
-
<BuildOverview
|
|
186
|
-
stats={stats}
|
|
187
|
-
onRefresh={handleRefresh}
|
|
188
|
-
loading={loading}
|
|
189
|
-
/>
|
|
190
|
-
|
|
191
|
-
{/* Main Content */}
|
|
192
|
-
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
|
193
|
-
{/* Build List */}
|
|
194
|
-
<div className="lg:col-span-2">
|
|
195
|
-
<BuildList
|
|
196
|
-
builds={filteredBuilds}
|
|
197
|
-
selectedBuild={selectedBuild}
|
|
198
|
-
onBuildSelect={handleBuildSelect}
|
|
199
|
-
filters={filters}
|
|
200
|
-
onFiltersChange={setFilters}
|
|
201
|
-
/>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
{/* Pipeline Status */}
|
|
205
|
-
<div className="lg:col-span-1">
|
|
206
|
-
<PipelineStatus
|
|
207
|
-
pipelines={pipelines}
|
|
208
|
-
onPipelineSelect={handlePipelineSelect}
|
|
209
|
-
onPipelineToggle={handlePipelineToggle}
|
|
210
|
-
/>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
{/* Build Details Modal */}
|
|
215
|
-
<BuildDetails
|
|
216
|
-
build={selectedBuildData}
|
|
217
|
-
onClose={() => setSelectedBuild(null)}
|
|
218
|
-
onCancel={handleBuildCancel}
|
|
219
|
-
onRetry={handleBuildRetry}
|
|
220
|
-
/>
|
|
221
|
-
|
|
222
|
-
{/* Empty State */}
|
|
223
|
-
{filteredBuilds.length === 0 && builds.length > 0 && (
|
|
224
|
-
<div className="text-center py-12">
|
|
225
|
-
<div className="text-gray-400 text-6xl mb-4">🔨</div>
|
|
226
|
-
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
|
227
|
-
No builds found
|
|
228
|
-
</h3>
|
|
229
|
-
<p className="text-gray-600 mb-4">
|
|
230
|
-
No builds match your current filters. Try adjusting your search
|
|
231
|
-
criteria.
|
|
232
|
-
</p>
|
|
233
|
-
<button
|
|
234
|
-
onClick={() =>
|
|
235
|
-
setFilters({
|
|
236
|
-
package: 'all',
|
|
237
|
-
status: 'all',
|
|
238
|
-
pipeline: 'all',
|
|
239
|
-
dateRange: 'all',
|
|
240
|
-
})
|
|
241
|
-
}
|
|
242
|
-
className="text-blue-600 hover:text-blue-500"
|
|
243
|
-
>
|
|
244
|
-
Clear Filters
|
|
245
|
-
</button>
|
|
246
|
-
</div>
|
|
247
|
-
)}
|
|
248
|
-
|
|
249
|
-
{/* No Data State */}
|
|
250
|
-
{builds.length === 0 && !loading && (
|
|
251
|
-
<div className="text-center py-12">
|
|
252
|
-
<div className="text-gray-400 text-6xl mb-4"><RocketLaunchIcon className="w-6 h-6 text-primary-600" /></div>
|
|
253
|
-
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
|
254
|
-
No CI/CD data available
|
|
255
|
-
</h3>
|
|
256
|
-
<p className="text-gray-600 mb-4">
|
|
257
|
-
Get started by triggering your first build or setting up a pipeline.
|
|
258
|
-
</p>
|
|
259
|
-
<div className="flex justify-center space-x-4">
|
|
260
|
-
<button
|
|
261
|
-
onClick={handleTriggerBuild}
|
|
262
|
-
className="bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors"
|
|
263
|
-
>
|
|
264
|
-
Trigger Build
|
|
265
|
-
</button>
|
|
266
|
-
<button
|
|
267
|
-
onClick={handleCreatePipeline}
|
|
268
|
-
className="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
|
|
269
|
-
>
|
|
270
|
-
Create Pipeline
|
|
271
|
-
</button>
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
274
|
-
)}
|
|
275
|
-
</div>
|
|
276
|
-
);
|
|
277
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
XMarkIcon,
|
|
3
|
-
StopIcon,
|
|
4
|
-
ArrowPathIcon,
|
|
5
|
-
CheckCircleIcon,
|
|
6
|
-
XCircleIcon,
|
|
7
|
-
ClockIcon,
|
|
8
|
-
} from '../../../../icons/heroicons';
|
|
9
|
-
import { BuildDetailsProps } from '../types/ci.types';
|
|
10
|
-
import {
|
|
11
|
-
getStatusColor,
|
|
12
|
-
getStageStatusColor,
|
|
13
|
-
formatDuration,
|
|
14
|
-
formatDateTime,
|
|
15
|
-
getShortCommitHash,
|
|
16
|
-
getStageIcon,
|
|
17
|
-
} from '../utils/ci.utils';
|
|
18
|
-
|
|
19
|
-
export default function BuildDetails({
|
|
20
|
-
build,
|
|
21
|
-
onClose,
|
|
22
|
-
onCancel,
|
|
23
|
-
onRetry,
|
|
24
|
-
}: BuildDetailsProps) {
|
|
25
|
-
if (!build) return null;
|
|
26
|
-
|
|
27
|
-
const getStatusIcon = (status: string) => {
|
|
28
|
-
switch (status) {
|
|
29
|
-
case 'success':
|
|
30
|
-
return <CheckCircleIcon className="h-5 w-5 text-green-500" />;
|
|
31
|
-
case 'running':
|
|
32
|
-
return (
|
|
33
|
-
<div className="h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent" />
|
|
34
|
-
);
|
|
35
|
-
case 'pending':
|
|
36
|
-
return <ClockIcon className="h-5 w-5 text-yellow-500" />;
|
|
37
|
-
case 'failed':
|
|
38
|
-
return <XCircleIcon className="h-5 w-5 text-red-500" />;
|
|
39
|
-
case 'cancelled':
|
|
40
|
-
return <StopIcon className="h-5 w-5 text-red-500" />;
|
|
41
|
-
default:
|
|
42
|
-
return <ClockIcon className="h-5 w-5 text-gray-500" />;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
48
|
-
<div className="bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden">
|
|
49
|
-
{/* Header */}
|
|
50
|
-
<div className="flex items-center justify-between p-6 border-b border-gray-200">
|
|
51
|
-
<div className="flex items-center space-x-3">
|
|
52
|
-
{getStatusIcon(build.status)}
|
|
53
|
-
<div>
|
|
54
|
-
<h2 className="text-xl font-semibold text-gray-900">
|
|
55
|
-
{build.packageName} Build
|
|
56
|
-
</h2>
|
|
57
|
-
<p className="text-sm text-gray-600">
|
|
58
|
-
{build.branch} • {getShortCommitHash(build.commit)}
|
|
59
|
-
</p>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<div className="flex items-center space-x-2">
|
|
63
|
-
{build.status === 'running' && onCancel && (
|
|
64
|
-
<button
|
|
65
|
-
onClick={() => onCancel(build.id)}
|
|
66
|
-
className="inline-flex items-center px-3 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors"
|
|
67
|
-
>
|
|
68
|
-
<StopIcon className="w-4 h-4 mr-1" />
|
|
69
|
-
Cancel
|
|
70
|
-
</button>
|
|
71
|
-
)}
|
|
72
|
-
{(build.status === 'failed' || build.status === 'cancelled') &&
|
|
73
|
-
onRetry && (
|
|
74
|
-
<button
|
|
75
|
-
onClick={() => onRetry(build.id)}
|
|
76
|
-
className="inline-flex items-center px-3 py-2 text-sm font-medium text-green-700 bg-green-100 rounded-lg hover:bg-green-200 transition-colors"
|
|
77
|
-
>
|
|
78
|
-
<ArrowPathIcon className="w-4 h-4 mr-1" />
|
|
79
|
-
Retry
|
|
80
|
-
</button>
|
|
81
|
-
)}
|
|
82
|
-
<button
|
|
83
|
-
onClick={onClose}
|
|
84
|
-
className="text-gray-400 hover:text-gray-600 transition-colors"
|
|
85
|
-
>
|
|
86
|
-
<XMarkIcon className="w-6 h-6" />
|
|
87
|
-
</button>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
{/* Content */}
|
|
92
|
-
<div className="p-6 overflow-y-auto max-h-[70vh]">
|
|
93
|
-
{/* Build Info */}
|
|
94
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
|
95
|
-
<div className="space-y-4">
|
|
96
|
-
<div>
|
|
97
|
-
<h3 className="text-sm font-medium text-gray-700 mb-2">
|
|
98
|
-
Build Information
|
|
99
|
-
</h3>
|
|
100
|
-
<div className="space-y-2 text-sm">
|
|
101
|
-
<div className="flex justify-between">
|
|
102
|
-
<span className="text-gray-600">Status:</span>
|
|
103
|
-
<span
|
|
104
|
-
className={`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${getStatusColor(build.status)}`}
|
|
105
|
-
>
|
|
106
|
-
{build.status}
|
|
107
|
-
</span>
|
|
108
|
-
</div>
|
|
109
|
-
<div className="flex justify-between">
|
|
110
|
-
<span className="text-gray-600">Started:</span>
|
|
111
|
-
<span className="font-medium">
|
|
112
|
-
{formatDateTime(build.startTime)}
|
|
113
|
-
</span>
|
|
114
|
-
</div>
|
|
115
|
-
{build.endTime && (
|
|
116
|
-
<div className="flex justify-between">
|
|
117
|
-
<span className="text-gray-600">Ended:</span>
|
|
118
|
-
<span className="font-medium">
|
|
119
|
-
{formatDateTime(build.endTime)}
|
|
120
|
-
</span>
|
|
121
|
-
</div>
|
|
122
|
-
)}
|
|
123
|
-
{build.duration && (
|
|
124
|
-
<div className="flex justify-between">
|
|
125
|
-
<span className="text-gray-600">Duration:</span>
|
|
126
|
-
<span className="font-medium">
|
|
127
|
-
{formatDuration(build.duration)}
|
|
128
|
-
</span>
|
|
129
|
-
</div>
|
|
130
|
-
)}
|
|
131
|
-
<div className="flex justify-between">
|
|
132
|
-
<span className="text-gray-600">Triggered by:</span>
|
|
133
|
-
<span className="font-medium">{build.triggeredBy}</span>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<div className="space-y-4">
|
|
140
|
-
<div>
|
|
141
|
-
<h3 className="text-sm font-medium text-gray-700 mb-2">
|
|
142
|
-
Artifacts
|
|
143
|
-
</h3>
|
|
144
|
-
{build.artifacts.length > 0 ? (
|
|
145
|
-
<div className="space-y-1">
|
|
146
|
-
{build.artifacts.map((artifact, index) => (
|
|
147
|
-
<div key={index} className="text-sm">
|
|
148
|
-
<a
|
|
149
|
-
href="#"
|
|
150
|
-
className="text-blue-600 hover:text-blue-500 font-medium"
|
|
151
|
-
>
|
|
152
|
-
{artifact}
|
|
153
|
-
</a>
|
|
154
|
-
</div>
|
|
155
|
-
))}
|
|
156
|
-
</div>
|
|
157
|
-
) : (
|
|
158
|
-
<p className="text-sm text-gray-500">
|
|
159
|
-
No artifacts generated
|
|
160
|
-
</p>
|
|
161
|
-
)}
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
{/* Build Stages */}
|
|
167
|
-
<div>
|
|
168
|
-
<h3 className="text-lg font-medium text-gray-900 mb-4">
|
|
169
|
-
Build Stages
|
|
170
|
-
</h3>
|
|
171
|
-
<div className="space-y-4">
|
|
172
|
-
{build.stages.map((stage, index) => (
|
|
173
|
-
<div
|
|
174
|
-
key={stage.name}
|
|
175
|
-
className="border border-gray-200 rounded-lg p-4"
|
|
176
|
-
>
|
|
177
|
-
<div className="flex items-center justify-between mb-3">
|
|
178
|
-
<div className="flex items-center space-x-3">
|
|
179
|
-
<span className="text-2xl">
|
|
180
|
-
{getStageIcon(stage.name)}
|
|
181
|
-
</span>
|
|
182
|
-
<div>
|
|
183
|
-
<h4 className="text-sm font-medium text-gray-900">
|
|
184
|
-
{stage.name}
|
|
185
|
-
</h4>
|
|
186
|
-
<div className="flex items-center space-x-2 mt-1">
|
|
187
|
-
<span
|
|
188
|
-
className={`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${getStageStatusColor(stage.status)}`}
|
|
189
|
-
>
|
|
190
|
-
{stage.status}
|
|
191
|
-
</span>
|
|
192
|
-
{stage.duration && (
|
|
193
|
-
<span className="text-xs text-gray-500">
|
|
194
|
-
{formatDuration(stage.duration)}
|
|
195
|
-
</span>
|
|
196
|
-
)}
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
<div className="text-sm text-gray-500">
|
|
201
|
-
Step {index + 1} of {build.stages.length}
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
|
|
205
|
-
{/* Stage Logs */}
|
|
206
|
-
{stage.logs && stage.logs.length > 0 && (
|
|
207
|
-
<div className="mt-3">
|
|
208
|
-
<h5 className="text-xs font-medium text-gray-700 mb-2">
|
|
209
|
-
Logs
|
|
210
|
-
</h5>
|
|
211
|
-
<div className="bg-gray-900 text-gray-100 p-3 rounded-lg text-xs font-mono max-h-32 overflow-y-auto">
|
|
212
|
-
{stage.logs.map((log, logIndex) => (
|
|
213
|
-
<div key={logIndex} className="mb-1">
|
|
214
|
-
{log}
|
|
215
|
-
</div>
|
|
216
|
-
))}
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
)}
|
|
220
|
-
</div>
|
|
221
|
-
))}
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
);
|
|
228
|
-
}
|