github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/services/frontend-service/src/ui/components/RolloutStatusDescription/RolloutStatusDescription.tsx (about) 1 /*This file is part of kuberpult. 2 3 Kuberpult is free software: you can redistribute it and/or modify 4 it under the terms of the Expat(MIT) License as published by 5 the Free Software Foundation. 6 7 Kuberpult is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 MIT License for more details. 11 12 You should have received a copy of the MIT License 13 along with kuberpult. If not, see <https://directory.fsf.org/wiki/License:Expat>. 14 15 Copyright 2023 freiheit.com*/ 16 import { RolloutStatus } from '../../../api/api'; 17 18 export const RolloutStatusDescription: React.FC<{ status: RolloutStatus }> = (props) => { 19 const { status } = props; 20 switch (status) { 21 case RolloutStatus.ROLLOUT_STATUS_SUCCESFUL: 22 return <span className="rollout__description_successful">✓ Done</span>; 23 case RolloutStatus.ROLLOUT_STATUS_PROGRESSING: 24 return <span className="rollout__description_progressing">↻ In progress</span>; 25 case RolloutStatus.ROLLOUT_STATUS_PENDING: 26 return <span className="rollout__description_pending">⧖ Pending</span>; 27 case RolloutStatus.ROLLOUT_STATUS_ERROR: 28 return <span className="rollout__description_error">! Failed</span>; 29 case RolloutStatus.ROLLOUT_STATUS_UNHEALTHY: 30 return <span className="rollout__description_unhealthy">⚠ Unhealthy</span>; 31 } 32 return <span className="rollout__description_unknown">? Unknown</span>; 33 };