-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from RafalWilinski/status-codes
Introduce Status Codes chart & fix undefined _view error in Chart.js
- Loading branch information
Showing
7 changed files
with
143 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const request = require('request'); | ||
|
||
const requestUrl = 'http://localhost:3000/return-status/'; | ||
const interval = 50; | ||
|
||
const makeDummyCall = () => setTimeout(() => { | ||
const code = 200 + Math.random() * 399; | ||
request.get(`${requestUrl}${code}`); | ||
makeDummyCall(); | ||
}, interval); | ||
|
||
makeDummyCall(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,103 @@ | ||
* { | ||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif; | ||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif; | ||
} | ||
|
||
h1 { | ||
font-size: 3em; | ||
color: #222222; | ||
margin: 0; | ||
font-size: 3em; | ||
color: #222; | ||
margin: 0; | ||
} | ||
|
||
h5 { | ||
margin: 0; | ||
color: #888888; | ||
margin: 0; | ||
color: #888; | ||
} | ||
|
||
h6 { | ||
margin: 0; | ||
} | ||
|
||
p { | ||
font-size: 0.7em; | ||
color: #888888; | ||
font-size: 0.7em; | ||
color: #888; | ||
} | ||
|
||
span { | ||
cursor: pointer; | ||
font-size: 10px; | ||
margin-left: 5px; | ||
border: 1px solid #DDD; | ||
padding: 3px 10px 4px 10px; | ||
cursor: pointer; | ||
font-size: 10px; | ||
margin-left: 5px; | ||
border: 1px solid #DDD; | ||
padding: 3px 10px 4px 10px; | ||
} | ||
|
||
canvas { | ||
width: 400px; | ||
height: 100px; | ||
width: 400px; | ||
height: 100px; | ||
} | ||
|
||
.content { | ||
width: 600px; | ||
margin: auto; | ||
width: 600px; | ||
margin: auto; | ||
} | ||
|
||
.active { | ||
background: #eeeeee; | ||
background: #eeeeee; | ||
} | ||
|
||
.stats-column { | ||
flex: 0 0 200px; | ||
flex: 0 0 200px; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 20px; | ||
height: 100px; | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 20px; | ||
height: 100px; | ||
} | ||
|
||
.chart-container { | ||
width: 400px; | ||
height: 100px; | ||
width: 400px; | ||
height: 100px; | ||
} | ||
|
||
.footer { | ||
position: fixed; | ||
margin: auto; | ||
text-align: center; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
position: fixed; | ||
margin: auto; | ||
text-align: center; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
|
||
.span-controls { | ||
float: right; | ||
float: right; | ||
} | ||
|
||
.status-code { | ||
margin-top: 2px; | ||
} | ||
|
||
.status-code:before { | ||
content: ''; | ||
display: inline-block; | ||
width: 8px; | ||
height: 8px; | ||
border-radius: 8px; | ||
margin-right: 10px; | ||
} | ||
|
||
.status-code-2xx:before { | ||
background-color: #75D701; | ||
} | ||
|
||
.status-code-3xx:before { | ||
background-color: #47b8e0; | ||
} | ||
|
||
.status-code-4xx:before { | ||
background-color: #ffc952; | ||
} | ||
|
||
.status-code-5xx:before { | ||
background-color: #E53A40; | ||
} |