diff --git a/workspaces/ui/.env b/workspaces/ui/.env index 400f50e392..6a76f8dc78 100644 --- a/workspaces/ui/.env +++ b/workspaces/ui/.env @@ -1,2 +1,3 @@ REACT_APP_TESTING_DASHBOARD=false -REACT_APP_TESTING_DASHBOARD_TEASER=false \ No newline at end of file +REACT_APP_TESTING_DASHBOARD_TEASER=false +REACT_APP_TESTING_DASHBOARD_ENDPOINT_DETAILS=false \ No newline at end of file diff --git a/workspaces/ui/.env.development b/workspaces/ui/.env.development index 92247e9df8..df72e65434 100644 --- a/workspaces/ui/.env.development +++ b/workspaces/ui/.env.development @@ -1,2 +1,3 @@ REACT_APP_TESTING_DASHBOARD=true -REACT_APP_TESTING_DASHBOARD_TEASER=false \ No newline at end of file +REACT_APP_TESTING_DASHBOARD_TEASER=false +REACT_APP_TESTING_DASHBOARD_ENDPOINT_DETAILS=true \ No newline at end of file diff --git a/workspaces/ui/src/components/dashboards/TestingDashboard.js b/workspaces/ui/src/components/dashboards/TestingDashboard.js index cbb6df029d..62911fa477 100644 --- a/workspaces/ui/src/components/dashboards/TestingDashboard.js +++ b/workspaces/ui/src/components/dashboards/TestingDashboard.js @@ -80,11 +80,14 @@ export default function TestingDashboardPage(props) { {hasCaptures ? (
- + {process.env.REACT_APP_TESTING_DASHBOARD_ENDPOINT_DETAILS === + 'true' && ( + + )} 0 ? (
    - {endpoints.map((endpoint) => ( -
  • - - { + const endpointHeader = ( +
    + -
    + {endpoint.descriptor.httpMethod} + + + {endpoint.descriptor.fullPath} + + +
    + {endpoint.counts.diffs > 0 && ( - {endpoint.descriptor.httpMethod} + {endpoint.counts.diffs} + {endpoint.counts.diffs > 1 ? ' diffs' : ' diff'} - - {endpoint.descriptor.fullPath} - - -
    - {endpoint.counts.diffs > 0 && ( - - {endpoint.counts.diffs} - {endpoint.counts.diffs > 1 ? ' diffs' : ' diff'} - + )} + {endpoint.counts.incompliant > 0 ? ( + 0 ? ( - - - {endpoint.counts.incompliant}/ - {endpoint.counts.interactions} - - {' incompliant'} - - ) : ( - - - {endpoint.counts.compliant}/ - {endpoint.counts.interactions} - - {' compliant'} - + > + + {endpoint.counts.incompliant}/ + {endpoint.counts.interactions} + + {' incompliant'} + + ) : ( + -
    - - - {currentEndpointId && endpoint.id === currentEndpointId && ( - - )} - -
  • - ))} + > + + {endpoint.counts.compliant}/ + {endpoint.counts.interactions} + + {' compliant'} + + )} +
+ + ); + return ( +
  • + + {process.env.REACT_APP_TESTING_DASHBOARD_ENDPOINT_DETAILS === + 'true' ? ( + + {endpointHeader} + + ) : ( +
    {endpointHeader}
    + )} + {currentEndpointId && endpoint.id === currentEndpointId && ( + + )} +
    +
  • + ); + })} ) : ( // @TODO: revisit this empty state