Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
queicherius committed Sep 30, 2020
1 parent 8dc4fb2 commit 7b9b39a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 28 deletions.
39 changes: 17 additions & 22 deletions frontend/src/ResultsRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ class ResultsRow extends Component {
return (
<tr onClick={onClick} className={className}>
<td width={400}>
<a href={data.url} target='_blank' rel='noopener noreferrer'>{data.name}</a>
<a href={data.url} target='_blank' rel='noopener noreferrer'>
{data.name}
</a>
</td>
<td>
{data.status < 400 && (
<span className='text-success oi oi-circle-check'/>
)}
{data.status < 400 && <span className='text-success oi oi-circle-check' />}

{data.status >= 400 && (
<div className='d-flex align-items-center has-tooltip'>
Expand All @@ -25,30 +25,25 @@ class ResultsRow extends Component {
<td>
{data.schemaValid === undefined && '—'}

{data.schemaValid !== undefined && data.schemaValid && (
<span className='text-success oi oi-circle-check'/>
)}
{data.schemaValid !== undefined && data.schemaValid && <span className='text-success oi oi-circle-check' />}

{data.schemaValid !== undefined && !data.schemaValid && (
<div className='has-tooltip'>
<span className='text-danger oi oi-warning'/>
<div className='status-tooltip'><pre>{data.schemaChanges}</pre></div>
</div>
)}
{data.schemaValid !== undefined &&
!data.schemaValid && (
<div className='has-tooltip'>
<span className='text-danger oi oi-warning' />
<div className='status-tooltip'>
<pre>{data.schemaChanges}</pre>
</div>
</div>
)}
</td>
<td>
<div className='d-flex align-items-center'>
{data.duration <= 10000 && (
<span className='text-success oi oi-circle-check'/>
)}
{data.duration <= 10000 && <span className='text-success oi oi-circle-check' />}

{data.duration > 10000 && data.duration <= 30000 && (
<span className='text-warning oi oi-timer'/>
)}
{data.duration > 10000 && data.duration <= 30000 && <span className='text-warning oi oi-timer' />}

{data.duration > 30000 && (
<span className='text-danger oi oi-timer'/>
)}
{data.duration > 30000 && <span className='text-danger oi oi-timer' />}

<div className='ml-2'>{data.duration !== 0 ? `${data.duration.toLocaleString()} ms` : ''}</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions worker/src/requestApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ async function requestApi (url) {

try {
json = JSON.parse(content)
} catch (err) {
}
} catch (err) {}

return {
duration: end - start,
Expand Down
5 changes: 1 addition & 4 deletions worker/src/testEndpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ async function testEndpoint (endpoint) {
return result
}

return Object.assign(
result,
endpoint.matchSchema ? matchSchema(endpoint, response.content) : {}
)
return Object.assign(result, endpoint.matchSchema ? matchSchema(endpoint, response.content) : {})
}

module.exports = testEndpoint

0 comments on commit 7b9b39a

Please sign in to comment.