@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,97 +0,0 @@
|
|
|
1
|
-
// Shared types for CI integration module components
|
|
2
|
-
|
|
3
|
-
export interface Build {
|
|
4
|
-
id: string;
|
|
5
|
-
packageName: string;
|
|
6
|
-
branch: string;
|
|
7
|
-
commit: string;
|
|
8
|
-
status: 'running' | 'success' | 'failed' | 'cancelled' | 'pending';
|
|
9
|
-
startTime: string;
|
|
10
|
-
endTime?: string;
|
|
11
|
-
duration?: number;
|
|
12
|
-
stages: BuildStage[];
|
|
13
|
-
triggeredBy: string;
|
|
14
|
-
artifacts: string[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface BuildStage {
|
|
18
|
-
name: string;
|
|
19
|
-
status: 'pending' | 'running' | 'success' | 'failed' | 'skipped';
|
|
20
|
-
duration?: number;
|
|
21
|
-
logs: string[];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface Pipeline {
|
|
25
|
-
id: string;
|
|
26
|
-
name: string;
|
|
27
|
-
packageName: string;
|
|
28
|
-
status: 'active' | 'paused' | 'failed';
|
|
29
|
-
lastRun: string;
|
|
30
|
-
nextRun?: string;
|
|
31
|
-
successRate: number;
|
|
32
|
-
avgDuration: number;
|
|
33
|
-
triggers: string[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface BuildStats {
|
|
37
|
-
total: number;
|
|
38
|
-
successful: number;
|
|
39
|
-
failed: number;
|
|
40
|
-
running: number;
|
|
41
|
-
successRate: number;
|
|
42
|
-
avgDuration: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface CIFilters {
|
|
46
|
-
package: string;
|
|
47
|
-
status: string;
|
|
48
|
-
pipeline: string;
|
|
49
|
-
dateRange: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface CIIntegrationProps {
|
|
53
|
-
onBuildTrigger?: (packageName: string) => void;
|
|
54
|
-
onPipelineCreate?: () => void;
|
|
55
|
-
onBuildCancel?: (buildId: string) => void;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface BuildOverviewProps {
|
|
59
|
-
stats: BuildStats;
|
|
60
|
-
onRefresh: () => void;
|
|
61
|
-
loading?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface BuildListProps {
|
|
65
|
-
builds: Build[];
|
|
66
|
-
selectedBuild: string | null;
|
|
67
|
-
onBuildSelect: (buildId: string | null) => void;
|
|
68
|
-
filters: CIFilters;
|
|
69
|
-
onFiltersChange: (filters: CIFilters) => void;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface PipelineStatusProps {
|
|
73
|
-
pipelines: Pipeline[];
|
|
74
|
-
onPipelineSelect: (pipelineId: string) => void;
|
|
75
|
-
onPipelineToggle: (pipelineId: string, active: boolean) => void;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface BuildDetailsProps {
|
|
79
|
-
build: Build | null;
|
|
80
|
-
onClose: () => void;
|
|
81
|
-
onCancel?: (buildId: string) => void;
|
|
82
|
-
onRetry?: (buildId: string) => void;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface StageViewerProps {
|
|
86
|
-
stages: BuildStage[];
|
|
87
|
-
selectedStage: string | null;
|
|
88
|
-
onStageSelect: (stageName: string | null) => void;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface CIControlsProps {
|
|
92
|
-
onTriggerBuild: (packageName: string) => void;
|
|
93
|
-
onCreatePipeline: () => void;
|
|
94
|
-
onRefresh: () => void;
|
|
95
|
-
loading?: boolean;
|
|
96
|
-
availablePackages: string[];
|
|
97
|
-
}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Build,
|
|
3
|
-
BuildStage,
|
|
4
|
-
Pipeline,
|
|
5
|
-
BuildStats,
|
|
6
|
-
CIFilters,
|
|
7
|
-
} from '../types/ci.types';
|
|
8
|
-
import { RocketLaunchIcon } from '../../../../icons/heroicons';
|
|
9
|
-
import { CubeIcon } from '../../../../icons/heroicons';
|
|
10
|
-
import { Cog6ToothIcon } from '../../../../icons/heroicons';
|
|
11
|
-
// Get status color classes
|
|
12
|
-
export const getStatusColor = (status: string): string => {
|
|
13
|
-
switch (status) {
|
|
14
|
-
case 'success':
|
|
15
|
-
case 'active':
|
|
16
|
-
return 'bg-green-100 text-green-800';
|
|
17
|
-
case 'running':
|
|
18
|
-
return 'bg-blue-100 text-blue-800';
|
|
19
|
-
case 'pending':
|
|
20
|
-
return 'bg-yellow-100 text-yellow-800';
|
|
21
|
-
case 'failed':
|
|
22
|
-
case 'cancelled':
|
|
23
|
-
return 'bg-red-100 text-red-800';
|
|
24
|
-
case 'paused':
|
|
25
|
-
return 'bg-gray-100 text-gray-800';
|
|
26
|
-
case 'skipped':
|
|
27
|
-
return 'bg-gray-100 text-gray-600';
|
|
28
|
-
default:
|
|
29
|
-
return 'bg-gray-100 text-gray-800';
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// Get stage status color
|
|
34
|
-
export const getStageStatusColor = (status: string): string => {
|
|
35
|
-
switch (status) {
|
|
36
|
-
case 'success':
|
|
37
|
-
return 'bg-green-100 text-green-800';
|
|
38
|
-
case 'running':
|
|
39
|
-
return 'bg-blue-100 text-blue-800';
|
|
40
|
-
case 'pending':
|
|
41
|
-
return 'bg-gray-100 text-gray-800';
|
|
42
|
-
case 'failed':
|
|
43
|
-
return 'bg-red-100 text-red-800';
|
|
44
|
-
case 'skipped':
|
|
45
|
-
return 'bg-gray-100 text-gray-600';
|
|
46
|
-
default:
|
|
47
|
-
return 'bg-gray-100 text-gray-800';
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Calculate build statistics
|
|
52
|
-
export const calculateBuildStats = (builds: Build[]): BuildStats => {
|
|
53
|
-
const total = builds.length;
|
|
54
|
-
const successful = builds.filter(b => b.status === 'success').length;
|
|
55
|
-
const failed = builds.filter(b => b.status === 'failed').length;
|
|
56
|
-
const running = builds.filter(b => b.status === 'running').length;
|
|
57
|
-
const successRate = total > 0 ? Math.round((successful / total) * 100) : 0;
|
|
58
|
-
|
|
59
|
-
// Calculate average duration for completed builds
|
|
60
|
-
const completedBuilds = builds.filter(b => b.duration);
|
|
61
|
-
const avgDuration =
|
|
62
|
-
completedBuilds.length > 0
|
|
63
|
-
? Math.round(
|
|
64
|
-
completedBuilds.reduce((sum, b) => sum + (b.duration || 0), 0) /
|
|
65
|
-
completedBuilds.length
|
|
66
|
-
)
|
|
67
|
-
: 0;
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
total,
|
|
71
|
-
successful,
|
|
72
|
-
failed,
|
|
73
|
-
running,
|
|
74
|
-
successRate,
|
|
75
|
-
avgDuration,
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// Filter builds based on criteria
|
|
80
|
-
export const filterBuilds = (builds: Build[], filters: CIFilters): Build[] => {
|
|
81
|
-
return builds.filter(build => {
|
|
82
|
-
const matchesPackage =
|
|
83
|
-
filters.package === 'all' || build.packageName === filters.package;
|
|
84
|
-
const matchesStatus =
|
|
85
|
-
filters.status === 'all' || build.status === filters.status;
|
|
86
|
-
|
|
87
|
-
// Date range filtering would be implemented here
|
|
88
|
-
const matchesDateRange = true; // Placeholder
|
|
89
|
-
|
|
90
|
-
return matchesPackage && matchesStatus && matchesDateRange;
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// Get unique package names from builds
|
|
95
|
-
export const getUniquePackages = (builds: Build[]): string[] => {
|
|
96
|
-
return [...new Set(builds.map(build => build.packageName))];
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// Get unique statuses from builds
|
|
100
|
-
export const getUniqueStatuses = (builds: Build[]): string[] => {
|
|
101
|
-
return [...new Set(builds.map(build => build.status))];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// Format duration
|
|
105
|
-
export const formatDuration = (seconds: number): string => {
|
|
106
|
-
if (seconds < 60) {
|
|
107
|
-
return `${seconds}s`;
|
|
108
|
-
} else if (seconds < 3600) {
|
|
109
|
-
const minutes = Math.floor(seconds / 60);
|
|
110
|
-
const remainingSeconds = seconds % 60;
|
|
111
|
-
return remainingSeconds > 0
|
|
112
|
-
? `${minutes}m ${remainingSeconds}s`
|
|
113
|
-
: `${minutes}m`;
|
|
114
|
-
} else {
|
|
115
|
-
const hours = Math.floor(seconds / 3600);
|
|
116
|
-
const remainingMinutes = Math.floor((seconds % 3600) / 60);
|
|
117
|
-
return remainingMinutes > 0
|
|
118
|
-
? `${hours}h ${remainingMinutes}m`
|
|
119
|
-
: `${hours}h`;
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// Format date and time
|
|
124
|
-
export const formatDateTime = (dateString: string): string => {
|
|
125
|
-
const date = new Date(dateString);
|
|
126
|
-
return date.toLocaleString('en-US', {
|
|
127
|
-
year: 'numeric',
|
|
128
|
-
month: 'short',
|
|
129
|
-
day: 'numeric',
|
|
130
|
-
hour: '2-digit',
|
|
131
|
-
minute: '2-digit',
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// Format relative time
|
|
136
|
-
export const formatRelativeTime = (dateString: string): string => {
|
|
137
|
-
const date = new Date(dateString);
|
|
138
|
-
const now = new Date();
|
|
139
|
-
const diffInMs = now.getTime() - date.getTime();
|
|
140
|
-
const diffInMinutes = Math.floor(diffInMs / (1000 * 60));
|
|
141
|
-
const diffInHours = Math.floor(diffInMinutes / 60);
|
|
142
|
-
const diffInDays = Math.floor(diffInHours / 24);
|
|
143
|
-
|
|
144
|
-
if (diffInMinutes < 1) {
|
|
145
|
-
return 'Just now';
|
|
146
|
-
} else if (diffInMinutes < 60) {
|
|
147
|
-
return `${diffInMinutes} min ago`;
|
|
148
|
-
} else if (diffInHours < 24) {
|
|
149
|
-
return `${diffInHours} hour${diffInHours > 1 ? 's' : ''} ago`;
|
|
150
|
-
} else {
|
|
151
|
-
return `${diffInDays} day${diffInDays > 1 ? 's' : ''} ago`;
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// Get build progress percentage
|
|
156
|
-
export const getBuildProgress = (build: Build): number => {
|
|
157
|
-
if (
|
|
158
|
-
build.status === 'success' ||
|
|
159
|
-
build.status === 'failed' ||
|
|
160
|
-
build.status === 'cancelled'
|
|
161
|
-
) {
|
|
162
|
-
return 100;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (build.status === 'pending') {
|
|
166
|
-
return 0;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const totalStages = build.stages.length;
|
|
170
|
-
if (totalStages === 0) return 0;
|
|
171
|
-
|
|
172
|
-
const completedStages = build.stages.filter(
|
|
173
|
-
stage =>
|
|
174
|
-
stage.status === 'success' ||
|
|
175
|
-
stage.status === 'failed' ||
|
|
176
|
-
stage.status === 'skipped'
|
|
177
|
-
).length;
|
|
178
|
-
|
|
179
|
-
const runningStages = build.stages.filter(
|
|
180
|
-
stage => stage.status === 'running'
|
|
181
|
-
).length;
|
|
182
|
-
|
|
183
|
-
// If there's a running stage, count it as half complete
|
|
184
|
-
const progress = (completedStages + runningStages * 0.5) / totalStages;
|
|
185
|
-
return Math.round(progress * 100);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
// Get stage icon
|
|
189
|
-
export const getStageIcon = (stageName: string): React.ReactNode => {
|
|
190
|
-
const name = stageName.toLowerCase();
|
|
191
|
-
if (name.includes('build') || name.includes('compile')) return '🔨';
|
|
192
|
-
if (name.includes('test')) return '🧪';
|
|
193
|
-
if (name.includes('lint') || name.includes('format')) return '✨';
|
|
194
|
-
if (name.includes('deploy') || name.includes('publish')) return <RocketLaunchIcon className="w-6 h-6 text-primary-600" />;
|
|
195
|
-
if (name.includes('security') || name.includes('audit')) return '🔒';
|
|
196
|
-
if (name.includes('install') || name.includes('dependencies')) return <CubeIcon className="w-6 h-6 text-primary-600" />;
|
|
197
|
-
return <Cog6ToothIcon className="w-6 h-6 text-primary-600" />;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
// Sort builds by different criteria
|
|
201
|
-
export const sortBuilds = (
|
|
202
|
-
builds: Build[],
|
|
203
|
-
sortBy: 'startTime' | 'duration' | 'status' | 'packageName',
|
|
204
|
-
order: 'asc' | 'desc'
|
|
205
|
-
): Build[] => {
|
|
206
|
-
return [...builds].sort((a, b) => {
|
|
207
|
-
let aValue: any;
|
|
208
|
-
let bValue: any;
|
|
209
|
-
|
|
210
|
-
switch (sortBy) {
|
|
211
|
-
case 'startTime':
|
|
212
|
-
aValue = new Date(a.startTime);
|
|
213
|
-
bValue = new Date(b.startTime);
|
|
214
|
-
break;
|
|
215
|
-
case 'duration':
|
|
216
|
-
aValue = a.duration || 0;
|
|
217
|
-
bValue = b.duration || 0;
|
|
218
|
-
break;
|
|
219
|
-
case 'status': {
|
|
220
|
-
const statusOrder = {
|
|
221
|
-
running: 0,
|
|
222
|
-
pending: 1,
|
|
223
|
-
failed: 2,
|
|
224
|
-
cancelled: 3,
|
|
225
|
-
success: 4,
|
|
226
|
-
};
|
|
227
|
-
aValue = statusOrder[a.status] || 5;
|
|
228
|
-
bValue = statusOrder[b.status] || 5;
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
case 'packageName':
|
|
232
|
-
aValue = a.packageName.toLowerCase();
|
|
233
|
-
bValue = b.packageName.toLowerCase();
|
|
234
|
-
break;
|
|
235
|
-
default:
|
|
236
|
-
return 0;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (aValue < bValue) return order === 'asc' ? -1 : 1;
|
|
240
|
-
if (aValue > bValue) return order === 'asc' ? 1 : -1;
|
|
241
|
-
return 0;
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
// Get pipeline health score
|
|
246
|
-
export const getPipelineHealth = (
|
|
247
|
-
pipeline: Pipeline
|
|
248
|
-
): 'healthy' | 'warning' | 'critical' => {
|
|
249
|
-
if (pipeline.status === 'failed') return 'critical';
|
|
250
|
-
if (pipeline.status === 'paused') return 'warning';
|
|
251
|
-
if (pipeline.successRate < 70) return 'critical';
|
|
252
|
-
if (pipeline.successRate < 85) return 'warning';
|
|
253
|
-
return 'healthy';
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
// Calculate build stage duration
|
|
257
|
-
export const calculateStageDuration = (stages: BuildStage[]): number => {
|
|
258
|
-
return stages.reduce((total, stage) => total + (stage.duration || 0), 0);
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
// Get commit short hash
|
|
262
|
-
export const getShortCommitHash = (commit: string): string => {
|
|
263
|
-
return commit.substring(0, 8);
|
|
264
|
-
};
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { DASHBOARD_ERROR_MESSAGES } from '../../../constants/messages';
|
|
3
|
-
|
|
4
|
-
// Import sub-components
|
|
5
|
-
import {
|
|
6
|
-
LoadingState,
|
|
7
|
-
ErrorState,
|
|
8
|
-
ConfigInspectorHeader,
|
|
9
|
-
ConfigSidebar,
|
|
10
|
-
ConfigToolbar,
|
|
11
|
-
ConfigEditor,
|
|
12
|
-
ValidationPanel,
|
|
13
|
-
ConfigPreview,
|
|
14
|
-
} from './components';
|
|
15
|
-
|
|
16
|
-
// Import types and utilities
|
|
17
|
-
// Import types and utilities
|
|
18
|
-
import type { ConfigFile, ConfigFilters } from './types/config.types';
|
|
19
|
-
import {
|
|
20
|
-
filterConfigs,
|
|
21
|
-
validateConfig,
|
|
22
|
-
detectLanguage,
|
|
23
|
-
maskSecrets,
|
|
24
|
-
} from './utils/config.utils';
|
|
25
|
-
import { FolderIcon } from '../../../icons/heroicons';
|
|
26
|
-
// Import service
|
|
27
|
-
import { monorepoService } from '../../../services/monorepoService';
|
|
28
|
-
|
|
29
|
-
// Re-export types for backward compatibility
|
|
30
|
-
export type { ConfigFile, ConfigFilters } from './types/config.types';
|
|
31
|
-
|
|
32
|
-
export default function ConfigInspector() {
|
|
33
|
-
// State management
|
|
34
|
-
const [loading, setLoading] = useState(true);
|
|
35
|
-
const [saving, setSaving] = useState(false);
|
|
36
|
-
const [error, setError] = useState<string | null>(null);
|
|
37
|
-
const [configFiles, setConfigFiles] = useState<ConfigFile[]>([]);
|
|
38
|
-
|
|
39
|
-
// Selection and editing state
|
|
40
|
-
const [selectedConfig, setSelectedConfig] = useState<string | null>(null);
|
|
41
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
42
|
-
const [editValue, setEditValue] = useState('');
|
|
43
|
-
|
|
44
|
-
// UI state
|
|
45
|
-
const [showSecrets, setShowSecrets] = useState(false);
|
|
46
|
-
const [filters, setFilters] = useState<ConfigFilters>({
|
|
47
|
-
section: 'all',
|
|
48
|
-
type: 'all',
|
|
49
|
-
status: 'all',
|
|
50
|
-
search: '',
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Fetch configuration files
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
const fetchConfigData = async () => {
|
|
56
|
-
try {
|
|
57
|
-
setLoading(true);
|
|
58
|
-
const data = await monorepoService.getConfigurationFiles();
|
|
59
|
-
|
|
60
|
-
// console.log('Config data from inside useEffect:', data);
|
|
61
|
-
|
|
62
|
-
// Transform the data to match our ConfigFile interface
|
|
63
|
-
const transformedData: ConfigFile[] = data.map((file: any) => ({
|
|
64
|
-
id: file.id || file.name,
|
|
65
|
-
name: file.name,
|
|
66
|
-
path: file.path || file.name,
|
|
67
|
-
type: file.type || 'text',
|
|
68
|
-
content: file.content || '',
|
|
69
|
-
size: file.content?.length || 0,
|
|
70
|
-
lastModified: file.lastModified || new Date().toISOString(),
|
|
71
|
-
hasSecrets: file.hasSecrets || false,
|
|
72
|
-
isEditable: file.isEditable !== false,
|
|
73
|
-
validation: file.validation || [],
|
|
74
|
-
}));
|
|
75
|
-
|
|
76
|
-
setConfigFiles(transformedData);
|
|
77
|
-
setError(null);
|
|
78
|
-
} catch (err) {
|
|
79
|
-
setError(DASHBOARD_ERROR_MESSAGES.FAILED_TO_FETCH_PACKAGES);
|
|
80
|
-
console.error('Error fetching config files:', err);
|
|
81
|
-
} finally {
|
|
82
|
-
setLoading(false);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
fetchConfigData();
|
|
87
|
-
}, []);
|
|
88
|
-
|
|
89
|
-
// Get filtered configurations
|
|
90
|
-
const filteredConfigs = filterConfigs(configFiles, filters);
|
|
91
|
-
|
|
92
|
-
// Get selected configuration
|
|
93
|
-
const selectedConfigData = selectedConfig
|
|
94
|
-
? configFiles.find(config => config.id === selectedConfig) || null
|
|
95
|
-
: null;
|
|
96
|
-
// console.log('selectedConfigData:', selectedConfigData);
|
|
97
|
-
|
|
98
|
-
// Event handlers
|
|
99
|
-
const handleRefresh = () => {
|
|
100
|
-
// Trigger a refresh of the data
|
|
101
|
-
window.location.reload();
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const handleConfigSelect = (configId: string) => {
|
|
105
|
-
setSelectedConfig(configId);
|
|
106
|
-
setIsEditing(false);
|
|
107
|
-
setEditValue('');
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const handleStartEdit = () => {
|
|
111
|
-
if (selectedConfigData) {
|
|
112
|
-
setIsEditing(true);
|
|
113
|
-
setEditValue(selectedConfigData.content);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// const handleSaveEdit = () => {
|
|
118
|
-
// if (selectedConfigData) {
|
|
119
|
-
// // In a real implementation, this would save to the backend
|
|
120
|
-
// console.log('Saving config:', selectedConfigData.name, editValue);
|
|
121
|
-
|
|
122
|
-
// // Update local state
|
|
123
|
-
// setConfigFiles(prev =>
|
|
124
|
-
// prev.map(config =>
|
|
125
|
-
// config.id === selectedConfig
|
|
126
|
-
// ? {
|
|
127
|
-
// ...config,
|
|
128
|
-
// content: editValue,
|
|
129
|
-
// validation: validateConfig(editValue, config.name),
|
|
130
|
-
// lastModified: new Date().toISOString(),
|
|
131
|
-
// }
|
|
132
|
-
// : config
|
|
133
|
-
// )
|
|
134
|
-
// );
|
|
135
|
-
|
|
136
|
-
// setIsEditing(false);
|
|
137
|
-
// setEditValue('');
|
|
138
|
-
// }
|
|
139
|
-
// };
|
|
140
|
-
const handleSaveEdit = async () => {
|
|
141
|
-
if (selectedConfigData && !saving) {
|
|
142
|
-
try {
|
|
143
|
-
setSaving(true);
|
|
144
|
-
setError(null);
|
|
145
|
-
|
|
146
|
-
// console.log('Saving config:', selectedConfigData.name, editValue);
|
|
147
|
-
|
|
148
|
-
// Call the backend API to save the file
|
|
149
|
-
const updatedFile = await monorepoService.saveConfigurationFile(
|
|
150
|
-
selectedConfigData.id,
|
|
151
|
-
editValue
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
// Update local state with the response from backend
|
|
155
|
-
setConfigFiles(prev =>
|
|
156
|
-
prev.map(config =>
|
|
157
|
-
config.id === selectedConfig
|
|
158
|
-
? {
|
|
159
|
-
...updatedFile,
|
|
160
|
-
// Keep the original isEditable flag
|
|
161
|
-
isEditable: config.isEditable,
|
|
162
|
-
}
|
|
163
|
-
: config
|
|
164
|
-
)
|
|
165
|
-
);
|
|
166
|
-
|
|
167
|
-
// If the currently selected config was updated, update it too
|
|
168
|
-
if (selectedConfig === selectedConfigData.id) {
|
|
169
|
-
setSelectedConfig(selectedConfigData.id); // This will trigger a re-render with updated data
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
setIsEditing(false);
|
|
173
|
-
setEditValue('');
|
|
174
|
-
|
|
175
|
-
// Show success message (you can add a toast notification here)
|
|
176
|
-
// console.log('Config file saved successfully');
|
|
177
|
-
} catch (err: any) {
|
|
178
|
-
console.error('Error saving config file:', err);
|
|
179
|
-
// Show error message to user
|
|
180
|
-
setError(`${DASHBOARD_ERROR_MESSAGES.FAILED_TO_SAVE_CONFIG}: ${err.message}`);
|
|
181
|
-
|
|
182
|
-
// You could add a toast notification here:
|
|
183
|
-
// toast.error(`Failed to save configuration: ${err.message}`);
|
|
184
|
-
} finally {
|
|
185
|
-
setSaving(false);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
const handleCancelEdit = () => {
|
|
191
|
-
setIsEditing(false);
|
|
192
|
-
setEditValue('');
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
const handleToggleSecrets = () => {
|
|
196
|
-
setShowSecrets(!showSecrets);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
const handleRetry = () => {
|
|
200
|
-
window.location.reload();
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
// Loading state
|
|
204
|
-
if (loading) {
|
|
205
|
-
return <LoadingState />;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Error state
|
|
209
|
-
if (error) {
|
|
210
|
-
return <ErrorState error={error} onRetry={handleRetry} />;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return (
|
|
214
|
-
<div className="space-y-6">
|
|
215
|
-
{/* Header */}
|
|
216
|
-
<ConfigInspectorHeader onRefresh={handleRefresh} loading={loading} />
|
|
217
|
-
|
|
218
|
-
{/* Main Content */}
|
|
219
|
-
<div className="grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]">
|
|
220
|
-
{/* Sidebar */}
|
|
221
|
-
<div className="lg:col-span-1">
|
|
222
|
-
<ConfigSidebar
|
|
223
|
-
configs={filteredConfigs}
|
|
224
|
-
selectedConfig={selectedConfig}
|
|
225
|
-
onConfigSelect={handleConfigSelect}
|
|
226
|
-
filters={filters}
|
|
227
|
-
onFiltersChange={setFilters}
|
|
228
|
-
/>
|
|
229
|
-
</div>
|
|
230
|
-
|
|
231
|
-
{/* Main Editor Area */}
|
|
232
|
-
<div className="lg:col-span-2 flex flex-col">
|
|
233
|
-
{/* Toolbar */}
|
|
234
|
-
{selectedConfigData && (
|
|
235
|
-
<div className="mb-4">
|
|
236
|
-
<ConfigToolbar
|
|
237
|
-
isEditing={isEditing}
|
|
238
|
-
canEdit={selectedConfigData.isEditable}
|
|
239
|
-
hasSecrets={selectedConfigData.hasSecrets}
|
|
240
|
-
showSecrets={showSecrets}
|
|
241
|
-
saving={saving} // Pass saving state to toolbar
|
|
242
|
-
onStartEdit={handleStartEdit}
|
|
243
|
-
onSaveEdit={handleSaveEdit}
|
|
244
|
-
onCancelEdit={handleCancelEdit}
|
|
245
|
-
onToggleSecrets={handleToggleSecrets}
|
|
246
|
-
onRefresh={handleRefresh}
|
|
247
|
-
content={isEditing ? editValue : selectedConfigData?.content} // Add this line
|
|
248
|
-
/>
|
|
249
|
-
</div>
|
|
250
|
-
)}
|
|
251
|
-
|
|
252
|
-
{/* Editor */}
|
|
253
|
-
<div className="flex-1">
|
|
254
|
-
<ConfigEditor
|
|
255
|
-
config={selectedConfigData}
|
|
256
|
-
isEditing={isEditing}
|
|
257
|
-
editValue={editValue}
|
|
258
|
-
saving={saving} // Pass saving state to editor if needed
|
|
259
|
-
onStartEdit={handleStartEdit}
|
|
260
|
-
onSaveEdit={handleSaveEdit}
|
|
261
|
-
onCancelEdit={handleCancelEdit}
|
|
262
|
-
onValueChange={setEditValue}
|
|
263
|
-
showSecrets={showSecrets}
|
|
264
|
-
onToggleSecrets={handleToggleSecrets}
|
|
265
|
-
/>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
{/* Right Panel */}
|
|
270
|
-
<div className="lg:col-span-1 space-y-6">
|
|
271
|
-
{/* Validation Panel */}
|
|
272
|
-
<ValidationPanel
|
|
273
|
-
validation={selectedConfigData?.validation || []}
|
|
274
|
-
configName={selectedConfigData?.name || 'No file selected'}
|
|
275
|
-
/>
|
|
276
|
-
|
|
277
|
-
{/* Preview Panel */}
|
|
278
|
-
{/* {selectedConfigData && !isEditing && (
|
|
279
|
-
<ConfigPreview
|
|
280
|
-
content={selectedConfigData.content}
|
|
281
|
-
language={detectLanguage(selectedConfigData.name)}
|
|
282
|
-
showSecrets={showSecrets}
|
|
283
|
-
onToggleSecrets={handleToggleSecrets}
|
|
284
|
-
/>
|
|
285
|
-
)} */}
|
|
286
|
-
</div>
|
|
287
|
-
</div>
|
|
288
|
-
|
|
289
|
-
{/* Empty State */}
|
|
290
|
-
{filteredConfigs.length === 0 && !loading && (
|
|
291
|
-
<div className="text-center py-12">
|
|
292
|
-
<div className="flex justify-center text-gray-400 text-6xl mb-4"><FolderIcon className="w-6 h-6 text-primary-600" /></div>
|
|
293
|
-
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
|
294
|
-
No configuration files found
|
|
295
|
-
</h3>
|
|
296
|
-
<p className="text-gray-600 mb-4">
|
|
297
|
-
{filters.search ||
|
|
298
|
-
filters.type !== 'all' ||
|
|
299
|
-
filters.status !== 'all'
|
|
300
|
-
? 'Try adjusting your filters to see more results.'
|
|
301
|
-
: 'No configuration files are available to inspect.'}
|
|
302
|
-
</p>
|
|
303
|
-
{(filters.search ||
|
|
304
|
-
filters.type !== 'all' ||
|
|
305
|
-
filters.status !== 'all') && (
|
|
306
|
-
<button
|
|
307
|
-
onClick={() =>
|
|
308
|
-
setFilters({
|
|
309
|
-
section: 'all',
|
|
310
|
-
type: 'all',
|
|
311
|
-
status: 'all',
|
|
312
|
-
search: '',
|
|
313
|
-
})
|
|
314
|
-
}
|
|
315
|
-
className="text-blue-600 hover:text-blue-500"
|
|
316
|
-
>
|
|
317
|
-
Clear Filters
|
|
318
|
-
</button>
|
|
319
|
-
)}
|
|
320
|
-
</div>
|
|
321
|
-
)}
|
|
322
|
-
</div>
|
|
323
|
-
);
|
|
324
|
-
}
|