import { Link } from "react-router"

export default function(props: any){
    let s = `status-indicator ${['error', 'running'][props.status]}`
    return(
    <Link to={'/details/'+props.metadata.name} 
          style={{textDecoration: 'none'}}
          state={{metadata: props.metadata}}>
        <div className="machine-card">
            <span className="label-name">{props.metadata.name}</span>
            <div className={s}></div>
        </div>
    </Link>
    )
}