Closed nxtCoder19 closed 1 month ago
This pull request adds functionality to display a "No Logs and Metrics" banner when a cluster is offline or when dealing with template applications. The changes primarily affect the logs and metrics routes for both regular applications and managed services.
sequenceDiagram
participant User
participant LogsAndMetrics
participant NoLogsAndMetricsBanner
User->>LogsAndMetrics: Access logs and metrics page
alt Cluster is offline or template app
LogsAndMetrics->>NoLogsAndMetricsBanner: Render banner
NoLogsAndMetricsBanner-->>User: Display "No Logs and Metrics" message
else Cluster is online
LogsAndMetrics-->>User: Display logs and metrics
end
classDiagram
class NoLogsAndMetricsBanner {
+NoLogsAndMetricsBanner(title: string, description: string)
}
NoLogsAndMetricsBanner --> motion: uses
NoLogsAndMetricsBanner --> Pulsable: uses
NoLogsAndMetricsBanner --> EmptyState: uses
NoLogsAndMetricsBanner --> SmileySad: uses
NoLogsAndMetricsBanner --> Wrapper: uses
Change | Details | Files |
---|---|---|
Implement cluster status check and conditional rendering of NoLogsAndMetricsBanner |
|
src/apps/console/routes/_main+/$account+/env+/$environment+/app+/$app+/logs-n-metrics/route.tsx src/apps/console/routes/_main+/$account+/msvc+/$msv+/logs-n-metrics/route.tsx |
Create new NoLogsAndMetricsBanner component |
|
src/apps/console/page-components/no-logs-banner.tsx |
Update imports and add new dependencies |
|
src/apps/console/routes/_main+/$account+/env+/$environment+/app+/$app+/logs-n-metrics/route.tsx src/apps/console/routes/_main+/$account+/msvc+/$msv+/logs-n-metrics/route.tsx |
Summary by Sourcery
Add a feature to display a banner indicating the unavailability of logs and metrics when the application is not associated with a cluster or when the cluster is offline. Enhance the system by checking the cluster's status to conditionally render logs and metrics.
New Features:
Enhancements: