()
| 181 | } |
| 182 | |
| 183 | const runAgain = async () => { |
| 184 | const confirmPayload = { |
| 185 | title: `Run Again`, |
| 186 | description: `Initiate Rerun for Evaluation ${evaluation.name}?`, |
| 187 | confirmButtonName: 'Yes', |
| 188 | cancelButtonName: 'No' |
| 189 | } |
| 190 | const isConfirmed = await confirm(confirmPayload) |
| 191 | |
| 192 | if (isConfirmed) { |
| 193 | runAgainApi.request(evaluation?.id) |
| 194 | enqueueSnackbar({ |
| 195 | message: "Evaluation '" + evaluation.name + "' is running. Redirecting to evaluations page.", |
| 196 | options: { |
| 197 | key: new Date().getTime() + Math.random(), |
| 198 | variant: 'success', |
| 199 | action: (key) => ( |
| 200 | <Button style={{ color: 'white' }} onClick={() => closeSnackbar(key)}> |
| 201 | <IconX /> |
| 202 | </Button> |
| 203 | ) |
| 204 | } |
| 205 | }) |
| 206 | navigate(`/evaluations`) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | const URLpath = document.location.pathname.toString().split('/') |
| 211 | const evalId = URLpath[URLpath.length - 1] === 'evaluation_rows' ? '' : URLpath[URLpath.length - 1] |
nothing calls this directly
no test coverage detected