()
| 1511 | } |
| 1512 | |
| 1513 | const MutationStatusCount: Component = () => { |
| 1514 | const counts = createSubscribeToMutationCacheBatcher((mutationCache) => { |
| 1515 | const tally = { green: 0, yellow: 0, purple: 0, red: 0, gray: 0 } |
| 1516 | for (const mutation of mutationCache().getAll()) { |
| 1517 | tally[getMutationStatusColor(mutation.state)]++ |
| 1518 | } |
| 1519 | return tally |
| 1520 | }) |
| 1521 | |
| 1522 | return ( |
| 1523 | <div class="tsqd-style-query-status-container tsqd-query-status-container"> |
| 1524 | <QueryStatus label="Paused" color="purple" count={counts().purple} /> |
| 1525 | <QueryStatus label="Pending" color="yellow" count={counts().yellow} /> |
| 1526 | <QueryStatus label="Success" color="green" count={counts().green} /> |
| 1527 | <QueryStatus label="Error" color="red" count={counts().red} /> |
| 1528 | </div> |
| 1529 | ) |
| 1530 | } |
| 1531 | |
| 1532 | const QueryStatus: Component<QueryStatusProps> = (props) => { |
| 1533 | const { selectedQueryHash, panelWidth } = useDevtoolsState() |
nothing calls this directly
no test coverage detected