({ flow }: { flow: Flow })
| 202 | } |
| 203 | |
| 204 | function ExportButton({ flow }: { flow: Flow }) { |
| 205 | const hasSingleFlowSelected = useAppSelector( |
| 206 | (state) => state.flows.selected.length === 1, |
| 207 | ); |
| 208 | return ( |
| 209 | <Dropdown |
| 210 | className="" |
| 211 | text={ |
| 212 | <Button |
| 213 | title="Export flow." |
| 214 | icon="fa-clone" |
| 215 | onClick={() => 1} |
| 216 | disabled={flow.type !== "http" || !hasSingleFlowSelected} |
| 217 | > |
| 218 | Export▾ |
| 219 | </Button> |
| 220 | } |
| 221 | options={{ placement: "bottom-start" }} |
| 222 | > |
| 223 | <MenuItem onClick={() => copy(flow, "raw_request")}> |
| 224 | Copy raw request |
| 225 | </MenuItem> |
| 226 | <MenuItem onClick={() => copy(flow, "raw_response")}> |
| 227 | Copy raw response |
| 228 | </MenuItem> |
| 229 | <MenuItem onClick={() => copy(flow, "raw")}> |
| 230 | Copy raw request and response |
| 231 | </MenuItem> |
| 232 | <MenuItem onClick={() => copy(flow, "curl")}>Copy as cURL</MenuItem> |
| 233 | <MenuItem onClick={() => copy(flow, "httpie")}> |
| 234 | Copy as HTTPie |
| 235 | </MenuItem> |
| 236 | </Dropdown> |
| 237 | ); |
| 238 | } |
| 239 | |
| 240 | const markers = { |
| 241 | ":red_circle:": "🔴", |
nothing calls this directly
no test coverage detected
searching dependent graphs…