@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,25 +0,0 @@
|
|
|
1
|
-
import { ExclamationTriangleIcon } from '../../../../icons/heroicons';
|
|
2
|
-
|
|
3
|
-
interface ErrorStateProps {
|
|
4
|
-
error: string;
|
|
5
|
-
onRetry?: () => void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default function ErrorState({ error, onRetry }: ErrorStateProps) {
|
|
9
|
-
return (
|
|
10
|
-
<div className="flex items-center justify-center h-64">
|
|
11
|
-
<div className="text-center">
|
|
12
|
-
<ExclamationTriangleIcon className="w-12 h-12 text-red-500 mx-auto" />
|
|
13
|
-
<p className="mt-4 text-red-600">{error}</p>
|
|
14
|
-
{onRetry && (
|
|
15
|
-
<button
|
|
16
|
-
onClick={onRetry}
|
|
17
|
-
className="mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
|
|
18
|
-
>
|
|
19
|
-
Retry
|
|
20
|
-
</button>
|
|
21
|
-
)}
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArrowPathIcon,
|
|
3
|
-
BeakerIcon,
|
|
4
|
-
ShieldCheckIcon,
|
|
5
|
-
ArrowUpIcon,
|
|
6
|
-
} from '../../../../icons/heroicons';
|
|
7
|
-
import { HealthActionsProps } from '../types/health.types';
|
|
8
|
-
|
|
9
|
-
export default function HealthActions({
|
|
10
|
-
onRefresh,
|
|
11
|
-
onRunAllTests,
|
|
12
|
-
onRunSecurityAudit,
|
|
13
|
-
onUpdateDependencies,
|
|
14
|
-
loading = false,
|
|
15
|
-
}: HealthActionsProps) {
|
|
16
|
-
const ActionButton = ({
|
|
17
|
-
onClick,
|
|
18
|
-
icon,
|
|
19
|
-
label,
|
|
20
|
-
description,
|
|
21
|
-
color = 'blue',
|
|
22
|
-
disabled = false,
|
|
23
|
-
}: {
|
|
24
|
-
onClick?: () => void;
|
|
25
|
-
icon: React.ReactNode;
|
|
26
|
-
label: string;
|
|
27
|
-
description: string;
|
|
28
|
-
color?: 'blue' | 'green' | 'yellow' | 'purple';
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
}) => {
|
|
31
|
-
const getColorClasses = () => {
|
|
32
|
-
switch (color) {
|
|
33
|
-
case 'green':
|
|
34
|
-
return 'bg-green-600 hover:bg-green-700 text-white';
|
|
35
|
-
case 'yellow':
|
|
36
|
-
return 'bg-yellow-600 hover:bg-yellow-700 text-white';
|
|
37
|
-
case 'purple':
|
|
38
|
-
return 'bg-purple-600 hover:bg-purple-700 text-white';
|
|
39
|
-
default:
|
|
40
|
-
return 'bg-blue-600 hover:bg-blue-700 text-white';
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div className="bg-white p-4 rounded-lg shadow border">
|
|
46
|
-
<div className="flex items-center space-x-3 mb-2">
|
|
47
|
-
{icon}
|
|
48
|
-
<h4 className="text-sm font-medium text-gray-900">{label}</h4>
|
|
49
|
-
</div>
|
|
50
|
-
<p className="text-xs text-gray-600 mb-3">{description}</p>
|
|
51
|
-
<button
|
|
52
|
-
onClick={onClick}
|
|
53
|
-
disabled={disabled || loading}
|
|
54
|
-
className={`w-full px-3 py-2 rounded-lg text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${getColorClasses()}`}
|
|
55
|
-
>
|
|
56
|
-
{loading ? 'Running...' : 'Run Now'}
|
|
57
|
-
</button>
|
|
58
|
-
</div>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<div className="space-y-4">
|
|
64
|
-
<h3 className="text-lg font-medium text-gray-900">Quick Actions</h3>
|
|
65
|
-
|
|
66
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
67
|
-
<ActionButton
|
|
68
|
-
onClick={onRefresh}
|
|
69
|
-
icon={<ArrowPathIcon className="h-5 w-5 text-blue-600" />}
|
|
70
|
-
label="Refresh Data"
|
|
71
|
-
description="Update all health metrics and package status"
|
|
72
|
-
color="blue"
|
|
73
|
-
/>
|
|
74
|
-
|
|
75
|
-
{onRunAllTests && (
|
|
76
|
-
<ActionButton
|
|
77
|
-
onClick={onRunAllTests}
|
|
78
|
-
icon={<BeakerIcon className="h-5 w-5 text-green-600" />}
|
|
79
|
-
label="Run All Tests"
|
|
80
|
-
description="Execute test suites for all packages"
|
|
81
|
-
color="green"
|
|
82
|
-
/>
|
|
83
|
-
)}
|
|
84
|
-
|
|
85
|
-
{onRunSecurityAudit && (
|
|
86
|
-
<ActionButton
|
|
87
|
-
onClick={onRunSecurityAudit}
|
|
88
|
-
icon={<ShieldCheckIcon className="h-5 w-5 text-yellow-600" />}
|
|
89
|
-
label="Security Audit"
|
|
90
|
-
description="Check for security vulnerabilities"
|
|
91
|
-
color="yellow"
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
|
|
95
|
-
{onUpdateDependencies && (
|
|
96
|
-
<ActionButton
|
|
97
|
-
onClick={onUpdateDependencies}
|
|
98
|
-
icon={<ArrowUpIcon className="h-5 w-5 text-purple-600" />}
|
|
99
|
-
label="Update Dependencies"
|
|
100
|
-
description="Update outdated package dependencies"
|
|
101
|
-
color="purple"
|
|
102
|
-
/>
|
|
103
|
-
)}
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
{/* Health Improvement Tips */}
|
|
107
|
-
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
|
108
|
-
<h4 className="text-sm font-medium text-blue-900 mb-2">
|
|
109
|
-
💡 Health Improvement Tips
|
|
110
|
-
</h4>
|
|
111
|
-
<div className="text-xs text-blue-800 space-y-1">
|
|
112
|
-
<div>• Maintain test coverage above 80% for better code quality</div>
|
|
113
|
-
<div>
|
|
114
|
-
• Run security audits regularly to catch vulnerabilities early
|
|
115
|
-
</div>
|
|
116
|
-
<div>• Keep dependencies up-to-date to benefit from latest fixes</div>
|
|
117
|
-
<div>• Set up automated health checks in your CI/CD pipeline</div>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ExclamationTriangleIcon,
|
|
3
|
-
XCircleIcon,
|
|
4
|
-
InformationCircleIcon,
|
|
5
|
-
XMarkIcon,
|
|
6
|
-
} from '../../../../icons/heroicons';
|
|
7
|
-
import { HealthAlertsProps } from '../types/health.types';
|
|
8
|
-
import { formatTimeAgo } from '../utils/health.utils';
|
|
9
|
-
|
|
10
|
-
export default function HealthAlerts({
|
|
11
|
-
alerts,
|
|
12
|
-
onAlertDismiss,
|
|
13
|
-
}: HealthAlertsProps) {
|
|
14
|
-
const getAlertIcon = (type: string) => {
|
|
15
|
-
switch (type) {
|
|
16
|
-
case 'error':
|
|
17
|
-
return <XCircleIcon className="h-5 w-5 text-red-500" />;
|
|
18
|
-
case 'warning':
|
|
19
|
-
return <ExclamationTriangleIcon className="h-5 w-5 text-yellow-500" />;
|
|
20
|
-
case 'info':
|
|
21
|
-
return <InformationCircleIcon className="h-5 w-5 text-blue-500" />;
|
|
22
|
-
default:
|
|
23
|
-
return <InformationCircleIcon className="h-5 w-5 text-gray-500" />;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const getAlertBgColor = (type: string) => {
|
|
28
|
-
switch (type) {
|
|
29
|
-
case 'error':
|
|
30
|
-
return 'bg-red-50 border-red-200';
|
|
31
|
-
case 'warning':
|
|
32
|
-
return 'bg-yellow-50 border-yellow-200';
|
|
33
|
-
case 'info':
|
|
34
|
-
return 'bg-blue-50 border-blue-200';
|
|
35
|
-
default:
|
|
36
|
-
return 'bg-gray-50 border-gray-200';
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getAlertTextColor = (type: string) => {
|
|
41
|
-
switch (type) {
|
|
42
|
-
case 'error':
|
|
43
|
-
return 'text-red-800';
|
|
44
|
-
case 'warning':
|
|
45
|
-
return 'text-yellow-800';
|
|
46
|
-
case 'info':
|
|
47
|
-
return 'text-blue-800';
|
|
48
|
-
default:
|
|
49
|
-
return 'text-gray-800';
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
if (alerts.length === 0) {
|
|
54
|
-
return (
|
|
55
|
-
<div className="space-y-4">
|
|
56
|
-
<h3 className="text-lg font-medium text-gray-900">Health Alerts</h3>
|
|
57
|
-
<div className="bg-green-50 border border-green-200 rounded-lg p-6 text-center">
|
|
58
|
-
<div className="text-green-400 text-4xl mb-2"></div>
|
|
59
|
-
<h4 className="text-green-800 font-medium mb-1">All Clear!</h4>
|
|
60
|
-
<p className="text-green-700 text-sm">
|
|
61
|
-
No health alerts at this time. Your monorepo is running smoothly.
|
|
62
|
-
</p>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<div className="space-y-4">
|
|
70
|
-
<div className="flex items-center justify-between">
|
|
71
|
-
<h3 className="text-lg font-medium text-gray-900">Health Alerts</h3>
|
|
72
|
-
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800">
|
|
73
|
-
{alerts.length} alert{alerts.length > 1 ? 's' : ''}
|
|
74
|
-
</span>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div className="space-y-3">
|
|
78
|
-
{alerts.map(alert => (
|
|
79
|
-
<div
|
|
80
|
-
key={alert.id}
|
|
81
|
-
className={`border rounded-lg p-4 ${getAlertBgColor(alert.type)}`}
|
|
82
|
-
>
|
|
83
|
-
<div className="flex items-start justify-between">
|
|
84
|
-
<div className="flex items-start space-x-3 flex-1">
|
|
85
|
-
{getAlertIcon(alert.type)}
|
|
86
|
-
<div className="flex-1">
|
|
87
|
-
<div className="flex items-center space-x-2 mb-1">
|
|
88
|
-
<h4
|
|
89
|
-
className={`text-sm font-medium ${getAlertTextColor(alert.type)}`}
|
|
90
|
-
>
|
|
91
|
-
{alert.title}
|
|
92
|
-
</h4>
|
|
93
|
-
{alert.packageName && (
|
|
94
|
-
<span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800">
|
|
95
|
-
{alert.packageName}
|
|
96
|
-
</span>
|
|
97
|
-
)}
|
|
98
|
-
</div>
|
|
99
|
-
<p
|
|
100
|
-
className={`text-sm ${getAlertTextColor(alert.type)} opacity-90`}
|
|
101
|
-
>
|
|
102
|
-
{alert.message}
|
|
103
|
-
</p>
|
|
104
|
-
<p className="text-xs text-gray-500 mt-2">
|
|
105
|
-
{formatTimeAgo(alert.timestamp)}
|
|
106
|
-
</p>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
{onAlertDismiss && (
|
|
111
|
-
<button
|
|
112
|
-
onClick={() => onAlertDismiss(alert.id)}
|
|
113
|
-
className="text-gray-400 hover:text-gray-600 ml-4"
|
|
114
|
-
>
|
|
115
|
-
<XMarkIcon className="h-4 w-4" />
|
|
116
|
-
</button>
|
|
117
|
-
)}
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
))}
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
{/* Summary */}
|
|
124
|
-
<div className="bg-gray-50 border border-gray-200 rounded-lg p-4">
|
|
125
|
-
<h4 className="text-sm font-medium text-gray-900 mb-2">
|
|
126
|
-
Alert Summary
|
|
127
|
-
</h4>
|
|
128
|
-
<div className="grid grid-cols-3 gap-4 text-sm">
|
|
129
|
-
<div className="text-center">
|
|
130
|
-
<div className="text-red-600 font-semibold">
|
|
131
|
-
{alerts.filter(a => a.type === 'error').length}
|
|
132
|
-
</div>
|
|
133
|
-
<div className="text-gray-600">Errors</div>
|
|
134
|
-
</div>
|
|
135
|
-
<div className="text-center">
|
|
136
|
-
<div className="text-yellow-600 font-semibold">
|
|
137
|
-
{alerts.filter(a => a.type === 'warning').length}
|
|
138
|
-
</div>
|
|
139
|
-
<div className="text-gray-600">Warnings</div>
|
|
140
|
-
</div>
|
|
141
|
-
<div className="text-center">
|
|
142
|
-
<div className="text-blue-600 font-semibold">
|
|
143
|
-
{alerts.filter(a => a.type === 'info').length}
|
|
144
|
-
</div>
|
|
145
|
-
<div className="text-gray-600">Info</div>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
);
|
|
151
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArrowTrendingUpIcon,
|
|
3
|
-
ArrowTrendingDownIcon,
|
|
4
|
-
MinusIcon,
|
|
5
|
-
} from '../../../../icons/heroicons';
|
|
6
|
-
import { HealthMetricsProps } from '../types/health.types';
|
|
7
|
-
import {
|
|
8
|
-
getStatusColor,
|
|
9
|
-
getMetricIcon,
|
|
10
|
-
formatTimeAgo,
|
|
11
|
-
} from '../utils/health.utils';
|
|
12
|
-
|
|
13
|
-
export default function HealthMetrics({
|
|
14
|
-
metrics,
|
|
15
|
-
selectedMetric,
|
|
16
|
-
onMetricSelect,
|
|
17
|
-
}: HealthMetricsProps) {
|
|
18
|
-
const getTrendIcon = (trend: string) => {
|
|
19
|
-
switch (trend) {
|
|
20
|
-
case 'up':
|
|
21
|
-
return <ArrowTrendingUpIcon className="w-4 h-4 text-green-500" />;
|
|
22
|
-
case 'down':
|
|
23
|
-
return <ArrowTrendingDownIcon className="w-4 h-4 text-red-500" />;
|
|
24
|
-
default:
|
|
25
|
-
return <MinusIcon className="w-4 h-4 text-gray-500" />;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className="space-y-4">
|
|
31
|
-
<div className="flex items-center justify-between">
|
|
32
|
-
<h3 className="text-lg font-medium text-gray-900">
|
|
33
|
-
Key Health Metrics
|
|
34
|
-
</h3>
|
|
35
|
-
<select
|
|
36
|
-
value={selectedMetric}
|
|
37
|
-
onChange={e => onMetricSelect(e.target.value)}
|
|
38
|
-
className="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
39
|
-
>
|
|
40
|
-
<option value="all">All Metrics</option>
|
|
41
|
-
{metrics.map(metric => (
|
|
42
|
-
<option key={metric.name} value={metric.name}>
|
|
43
|
-
{metric.name}
|
|
44
|
-
</option>
|
|
45
|
-
))}
|
|
46
|
-
</select>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
50
|
-
{metrics
|
|
51
|
-
.filter(
|
|
52
|
-
metric => selectedMetric === 'all' || metric.name === selectedMetric
|
|
53
|
-
)
|
|
54
|
-
.map(metric => (
|
|
55
|
-
<div
|
|
56
|
-
key={metric.name}
|
|
57
|
-
className="bg-white p-4 rounded-lg shadow border hover:shadow-md transition-shadow cursor-pointer"
|
|
58
|
-
onClick={() =>
|
|
59
|
-
onMetricSelect(
|
|
60
|
-
metric.name === selectedMetric ? 'all' : metric.name
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
>
|
|
64
|
-
<div className="flex items-center justify-between mb-3">
|
|
65
|
-
<div className="flex items-center space-x-2">
|
|
66
|
-
<span className="text-2xl">{getMetricIcon(metric.name)}</span>
|
|
67
|
-
<h4 className="text-sm font-medium text-gray-900">
|
|
68
|
-
{metric.name}
|
|
69
|
-
</h4>
|
|
70
|
-
</div>
|
|
71
|
-
<span
|
|
72
|
-
className={`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${getStatusColor(metric.status)}`}
|
|
73
|
-
>
|
|
74
|
-
{metric.status}
|
|
75
|
-
</span>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div className="flex items-baseline justify-between mb-2">
|
|
79
|
-
<div className="flex items-baseline space-x-1">
|
|
80
|
-
<span className="text-2xl font-bold text-gray-900">
|
|
81
|
-
{metric.value}
|
|
82
|
-
</span>
|
|
83
|
-
<span className="text-sm text-gray-500">{metric.unit}</span>
|
|
84
|
-
</div>
|
|
85
|
-
<div className="flex items-center space-x-1">
|
|
86
|
-
{getTrendIcon(metric.trend)}
|
|
87
|
-
<span
|
|
88
|
-
className={`text-xs font-medium ${
|
|
89
|
-
metric.trend === 'up'
|
|
90
|
-
? 'text-green-600'
|
|
91
|
-
: metric.trend === 'down'
|
|
92
|
-
? 'text-red-600'
|
|
93
|
-
: 'text-gray-600'
|
|
94
|
-
}`}
|
|
95
|
-
>
|
|
96
|
-
{metric.trend}
|
|
97
|
-
</span>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
{/* Progress Bar */}
|
|
102
|
-
<div className="w-full bg-gray-200 rounded-full h-2 mb-2">
|
|
103
|
-
<div
|
|
104
|
-
className={`h-2 rounded-full transition-all duration-300 ${
|
|
105
|
-
metric.status === 'healthy'
|
|
106
|
-
? 'bg-green-500'
|
|
107
|
-
: metric.status === 'warning'
|
|
108
|
-
? 'bg-yellow-500'
|
|
109
|
-
: 'bg-red-500'
|
|
110
|
-
}`}
|
|
111
|
-
style={{ width: `${Math.min(metric.value, 100)}%` }}
|
|
112
|
-
/>
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
<div className="text-xs text-gray-500">
|
|
116
|
-
Updated {formatTimeAgo(metric.lastUpdated)}
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
))}
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
{metrics.filter(
|
|
123
|
-
metric => selectedMetric === 'all' || metric.name === selectedMetric
|
|
124
|
-
).length === 0 && (
|
|
125
|
-
<div className="text-center py-8">
|
|
126
|
-
<div className="text-gray-400 text-4xl mb-2">📊</div>
|
|
127
|
-
<p className="text-gray-500">No metrics available</p>
|
|
128
|
-
</div>
|
|
129
|
-
)}
|
|
130
|
-
</div>
|
|
131
|
-
);
|
|
132
|
-
}
|
package/monodog-dashboard/src/components/modules/health-status/components/HealthStatusHeader.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ArrowPathIcon } from '../../../../icons/heroicons';
|
|
2
|
-
|
|
3
|
-
interface HealthStatusHeaderProps {
|
|
4
|
-
onRefresh: () => void;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default function HealthStatusHeader({
|
|
9
|
-
onRefresh,
|
|
10
|
-
loading = false,
|
|
11
|
-
}: HealthStatusHeaderProps) {
|
|
12
|
-
return (
|
|
13
|
-
<div className="flex items-center justify-between">
|
|
14
|
-
<div>
|
|
15
|
-
<h1 className="text-2xl font-bold text-gray-900">Health Status</h1>
|
|
16
|
-
<p className="text-gray-600 mt-1">
|
|
17
|
-
Monitor the health and performance of your monorepo packages
|
|
18
|
-
</p>
|
|
19
|
-
</div>
|
|
20
|
-
<button
|
|
21
|
-
onClick={onRefresh}
|
|
22
|
-
disabled={loading}
|
|
23
|
-
className="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors"
|
|
24
|
-
>
|
|
25
|
-
<ArrowPathIcon className={`w-5 h-5 ${loading ? 'animate-spin' : ''}`} />
|
|
26
|
-
<span>Refresh</span>
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface LoadingStateProps {
|
|
2
|
-
message?: string;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export default function LoadingState({
|
|
6
|
-
message = 'Loading abc data...',
|
|
7
|
-
}: LoadingStateProps) {
|
|
8
|
-
return (
|
|
9
|
-
<div className="flex items-center justify-center h-64">
|
|
10
|
-
<div className="text-center">
|
|
11
|
-
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"></div>
|
|
12
|
-
<p className="mt-4 text-gray-600">{message}</p>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
);
|
|
16
|
-
}
|
package/monodog-dashboard/src/components/modules/health-status/components/OverallHealthScore.tsx
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArrowTrendingUpIcon,
|
|
3
|
-
ArrowTrendingDownIcon,
|
|
4
|
-
MinusIcon,
|
|
5
|
-
} from '../../../../icons/heroicons';
|
|
6
|
-
import { OverallHealthProps } from '../types/health.types';
|
|
7
|
-
import {
|
|
8
|
-
getHealthScoreColor,
|
|
9
|
-
getHealthScoreBgColor,
|
|
10
|
-
} from '../utils/health.utils';
|
|
11
|
-
|
|
12
|
-
export default function OverallHealthScore({
|
|
13
|
-
score,
|
|
14
|
-
trend,
|
|
15
|
-
loading = false,
|
|
16
|
-
}: OverallHealthProps) {
|
|
17
|
-
const getTrendIcon = () => {
|
|
18
|
-
switch (trend) {
|
|
19
|
-
case 'up':
|
|
20
|
-
return <ArrowTrendingUpIcon className="w-6 h-6 text-green-500" />;
|
|
21
|
-
case 'down':
|
|
22
|
-
return <ArrowTrendingDownIcon className="w-6 h-6 text-red-500" />;
|
|
23
|
-
default:
|
|
24
|
-
return <MinusIcon className="w-6 h-6 text-gray-500" />;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const getTrendText = () => {
|
|
29
|
-
switch (trend) {
|
|
30
|
-
case 'up':
|
|
31
|
-
return 'Improving';
|
|
32
|
-
case 'down':
|
|
33
|
-
return 'Declining';
|
|
34
|
-
default:
|
|
35
|
-
return 'Stable';
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const getHealthStatus = () => {
|
|
40
|
-
if (score >= 90) return 'Excellent';
|
|
41
|
-
if (score >= 80) return 'Good';
|
|
42
|
-
if (score >= 70) return 'Fair';
|
|
43
|
-
return 'Needs Attention';
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
if (loading) {
|
|
47
|
-
return (
|
|
48
|
-
<div className="bg-white p-6 rounded-lg shadow border">
|
|
49
|
-
<div className="animate-pulse">
|
|
50
|
-
<div className="h-8 bg-gray-200 rounded w-48 mb-4"></div>
|
|
51
|
-
<div className="h-16 bg-gray-200 rounded w-32 mb-4"></div>
|
|
52
|
-
<div className="h-4 bg-gray-200 rounded w-24"></div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<div
|
|
60
|
-
className={`p-6 rounded-lg shadow border ${getHealthScoreBgColor(score)}`}
|
|
61
|
-
>
|
|
62
|
-
<div className="flex items-center justify-between mb-4">
|
|
63
|
-
<h3 className="text-lg font-medium text-gray-900">
|
|
64
|
-
Overall Health Score
|
|
65
|
-
</h3>
|
|
66
|
-
<div className="flex items-center space-x-2">
|
|
67
|
-
{getTrendIcon()}
|
|
68
|
-
<span
|
|
69
|
-
className={`text-sm font-medium ${
|
|
70
|
-
trend === 'up'
|
|
71
|
-
? 'text-green-600'
|
|
72
|
-
: trend === 'down'
|
|
73
|
-
? 'text-red-600'
|
|
74
|
-
: 'text-gray-600'
|
|
75
|
-
}`}
|
|
76
|
-
>
|
|
77
|
-
{getTrendText()}
|
|
78
|
-
</span>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div className="flex items-baseline space-x-4">
|
|
83
|
-
<div className={`text-4xl font-bold ${getHealthScoreColor(score)}`}>
|
|
84
|
-
{score}%
|
|
85
|
-
</div>
|
|
86
|
-
<div className="text-lg text-gray-600">{getHealthStatus()}</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
{/* Progress Bar */}
|
|
90
|
-
<div className="mt-4">
|
|
91
|
-
<div className="w-full bg-gray-200 rounded-full h-3">
|
|
92
|
-
<div
|
|
93
|
-
className={`h-3 rounded-full transition-all duration-500 ${
|
|
94
|
-
score >= 90
|
|
95
|
-
? 'bg-green-500'
|
|
96
|
-
: score >= 80
|
|
97
|
-
? 'bg-yellow-500'
|
|
98
|
-
: score >= 70
|
|
99
|
-
? 'bg-orange-500'
|
|
100
|
-
: 'bg-red-500'
|
|
101
|
-
}`}
|
|
102
|
-
style={{ width: `${score}%` }}
|
|
103
|
-
/>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
{/* Health Status Description */}
|
|
108
|
-
<p className="mt-3 text-sm text-gray-600">
|
|
109
|
-
{score >= 90 &&
|
|
110
|
-
'Your monorepo is in excellent health with all systems running optimally.'}
|
|
111
|
-
{score >= 80 &&
|
|
112
|
-
score < 90 &&
|
|
113
|
-
'Your monorepo is in good health with minor areas for improvement.'}
|
|
114
|
-
{score >= 70 &&
|
|
115
|
-
score < 80 &&
|
|
116
|
-
'Your monorepo health is fair but could benefit from attention to key areas.'}
|
|
117
|
-
{score < 70 &&
|
|
118
|
-
'Your monorepo needs attention. Several critical issues require immediate action.'}
|
|
119
|
-
</p>
|
|
120
|
-
</div>
|
|
121
|
-
);
|
|
122
|
-
}
|