github.com/argoproj/argo-cd@v1.8.7/ui/src/app/shared/components/connection-state-icon.tsx (about) 1 import * as React from 'react'; 2 import * as models from '../models'; 3 4 import {COLORS} from './colors'; 5 6 export const ConnectionStateIcon = (props: {state: models.ConnectionState}) => { 7 let className = ''; 8 let color = ''; 9 10 switch (props.state.status) { 11 case models.ConnectionStatuses.Successful: 12 className = 'fa fa-check-circle'; 13 color = COLORS.connection_status.successful; 14 break; 15 case models.ConnectionStatuses.Failed: 16 className = 'fa fa-times'; 17 color = COLORS.connection_status.failed; 18 break; 19 case models.ConnectionStatuses.Unknown: 20 className = 'fa fa-exclamation-circle'; 21 color = COLORS.connection_status.unknown; 22 break; 23 } 24 return <i title={props.state.message || props.state.status} className={className} style={{color}} />; 25 };