mirror of
https://github.com/portainer/portainer.git
synced 2026-06-23 04:10:29 +00:00
fix(api): update environment status field to be optional [BE-13070] (#2847)
This commit is contained in:
@@ -35,7 +35,7 @@ export function buildUrl(id?: EnvironmentId, action?: string) {
|
||||
export function toEnvironment(endpoint: PortainerEndpoint): Environment {
|
||||
return {
|
||||
...endpoint,
|
||||
Type: endpoint.Type !== 0 ? endpoint.Type : EnvironmentType.Docker,
|
||||
Type: endpoint.Type ? endpoint.Type : EnvironmentType.Docker,
|
||||
Status: endpoint.Status ?? EnvironmentStatus.Down,
|
||||
ContainerEngine: toContainerEngine(endpoint.ContainerEngine),
|
||||
TagIds: endpoint.TagIds ?? [],
|
||||
|
||||
@@ -5998,6 +5998,7 @@ export type PortainerKubernetesStorageClassConfig = {
|
||||
};
|
||||
|
||||
export type PortainerKubernetesSnapshot = {
|
||||
ClusterType?: string;
|
||||
DiagnosticsData?: PortainerDiagnosticsData;
|
||||
KubernetesVersion: string;
|
||||
NodeCount: number;
|
||||
|
||||
@@ -1875,6 +1875,7 @@ export const zPortainerDiagnosticsData = z.object({
|
||||
});
|
||||
|
||||
export const zPortainerKubernetesSnapshot = z.object({
|
||||
ClusterType: z.string().optional(),
|
||||
DiagnosticsData: zPortainerDiagnosticsData.optional(),
|
||||
KubernetesVersion: z.string(),
|
||||
NodeCount: z.int(),
|
||||
|
||||
Reference in New Issue
Block a user