import { StatusPending , StatusRunning , StatusOK , StatusWarning , StatusAborted , StatusError , } from '@backstage/core-components' ; import React from 'react' ; export const BuildkiteStatus = ( { status , } ) => { if ( status === undefined ) return null ; switch ( status . toLowerCase ( ) ) { case 'queued' : case 'scheduled' : return ( < > < StatusPending /> Queued < />); case 'running' : return ( < > < StatusRunning /> In progress < />); case 'unstable' : return ( < > < StatusWarning /> Unstable < />); case 'failed' : return ( < > < StatusError /> Failed < />); case 'passed' : return ( < > < StatusOK /> Completed < />); case 'canceled' : return ( < > < StatusAborted /> Aborted < />); default : return ( < > < StatusWarning /> {status} < />); } } ;