import React from 'react'; import type { IManifestStatus } from '@spinnaker/core'; import { Spinner, Tooltip } from '@spinnaker/core'; export interface IKubernetesManifestStatusProps { status?: { [key: string]: IManifestStatus }; } interface IStatusTooltipProps { message?: string; children: React.ReactNode; } // Status messages can come from any controller that writes the resource's status, so show them as // plain text rather than through Tooltip's Markdown rendering. function StatusTooltip({ message, children }: IStatusTooltipProps) { return {message} : undefined}>{children}; } export function ManifestStatus({ status }: IKubernetesManifestStatusProps) { if (!status) { return (
); } return (
{!status.available.state && (
Not Fully Available
)} {!status.stable.state && (
Transitioning
)} {status.paused.state && (
Rollout Paused
)}
); }