Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ahmad Nassri
committed
Mar 5, 2015
1 parent
d7b50be
commit 6fea6c1
Showing
14 changed files
with
265 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: npm config set httpconsole:port_mask 80 && npm start | ||
web: npm start |
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
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,4 +1,5 @@ | ||
extends layout.jade | ||
|
||
block content | ||
h1 404 | ||
div.container | ||
h1 404 |
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,24 +1,25 @@ | ||
extends ../layout.jade | ||
|
||
block content | ||
form | ||
div.form-group | ||
label(for='exampleInputEmail1') Email address | ||
input.form-control(type='email', placeholder='Enter email') | ||
div.container | ||
form | ||
div.form-group | ||
label(for='exampleInputEmail1') Email address | ||
input.form-control(type='email', placeholder='Enter email') | ||
|
||
div.form-group | ||
label(for='exampleInputPassword1') Password | ||
input.form-control(type='password', placeholder='Password') | ||
div.form-group | ||
label(for='exampleInputPassword1') Password | ||
input.form-control(type='password', placeholder='Password') | ||
|
||
div.form-group | ||
label(for='exampleInputFile') File input | ||
input(type='file') | ||
p.help-block Example block-level help text here. | ||
div.form-group | ||
label(for='exampleInputFile') File input | ||
input(type='file') | ||
p.help-block Example block-level help text here. | ||
|
||
div.checkbox | ||
label | ||
input(type='checkbox') | ||
| Check me out | ||
div.checkbox | ||
label | ||
input(type='checkbox') | ||
| Check me out | ||
|
||
button.btn.btn-default(type='submit') Submit | ||
button.btn.btn-default(type='submit') Submit | ||
|
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,21 +1,22 @@ | ||
extends ../layout.jade | ||
|
||
block content | ||
pre: code= YAML.stringify(data, 6, 2) | ||
div.container | ||
pre: code= YAML.stringify(data, 6, 2) | ||
|
||
for entry in data.log.entries | ||
div | ||
strong #{entry.request.method} | ||
span (#{entry.request.bodySize} bytes) | ||
span From #{entry.clientIPAddress} | ||
for entry in data.log.entries | ||
div | ||
strong #{entry.request.method} | ||
span (#{entry.request.bodySize} bytes) | ||
span From #{entry.clientIPAddress} | ||
|
||
h6 Headers | ||
pre: code | ||
- for header in entry.request.headers | ||
| #{header.name}: #{header.value} 
 | ||
h6 Headers | ||
pre: code | ||
- for header in entry.request.headers | ||
| #{header.name}: #{header.value} 
 | ||
|
||
h6 postData | ||
pre: code= YAML.stringify(entry.request.postData, 2, 2) | ||
h6 postData | ||
pre: code= YAML.stringify(entry.request.postData, 2, 2) | ||
|
||
h6 Query | ||
pre: code= YAML.stringify(entry.request.queryString, 2, 2) | ||
h6 Query | ||
pre: code= YAML.stringify(entry.request.queryString, 2, 2) |
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,12 +1,13 @@ | ||
extends ../layout.jade | ||
|
||
block content | ||
ul(class='nav nav-tabs') | ||
li(class='active'): a(href='#home', data-toggle='tab') YAML | ||
li: a(href='#json', data-toggle='tab') JSON | ||
li: a(href='#xml', data-toggle='tab') XML | ||
div.container | ||
ul(class='nav nav-tabs') | ||
li(class='active'): a(href='#home', data-toggle='tab') YAML | ||
li: a(href='#json', data-toggle='tab') JSON | ||
li: a(href='#xml', data-toggle='tab') XML | ||
|
||
div(class='tab-content') | ||
div(class='tab-pane active', id='home'): pre: code= data.yaml | ||
div(class='tab-pane', id='json'): pre: code= data.json | ||
div(class='tab-pane', id='xml'): pre: code= data.xml | ||
div(class='tab-content') | ||
div(class='tab-pane active', id='home'): pre: code= data.yaml | ||
div(class='tab-pane', id='json'): pre: code= data.json | ||
div(class='tab-pane', id='xml'): pre: code= data.xml |
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,41 +1,49 @@ | ||
extends layout.jade | ||
|
||
block content | ||
if (data) | ||
ul(class='nav nav-pills') | ||
li.active: a(href='#yaml', data-toggle='tab') YAML | ||
li: a(href='#json', data-toggle='tab') JSON | ||
li: a(href='#xml', data-toggle='tab') XML | ||
div.container | ||
if (!data) | ||
div.alert.alert-warning No data | ||
|
||
hr | ||
else | ||
div#preview | ||
button(class='btn btn-default btn-clipboard', data-clipboard-target='#{target}'): i.fa.fa-copy | ||
|
||
p calling <code>http://#{hostname}#{path}</code> with an <code>Accept</code> header with the value: | ||
select | ||
for value, key in {yaml: 'application/x-yaml', json: 'application/json', 'xml': 'application/xml'} | ||
option(value= key)= value | ||
| will result in the content below: | ||
ul.nav.nav-tabs | ||
li.active: a(href='#json', data-toggle='tab') JSON | ||
li: a(href='#yaml', data-toggle='tab') YAML | ||
li: a(href='#xml', data-toggle='tab') XML | ||
|
||
div(class='tab-content') | ||
div(id='yaml').tab-pane.active.fade.in | ||
pre: code= data.yaml | ||
div.tab-content | ||
div(id='json').tab-pane.active.fade.in | ||
pre: code= data.json | ||
|
||
div(id='json').tab-pane.fade | ||
pre: code= data.json | ||
div(id='yaml').tab-pane.fade | ||
pre: code= data.yaml | ||
|
||
div(id='xml').tab-pane.fade | ||
pre: code= data.xml | ||
div(id='xml').tab-pane.fade | ||
pre: code= data.xml | ||
|
||
p for more info, review the | ||
a(href='/docs#' + path.replace('/', '-') + '-') documentation | ||
br | ||
|
||
//- hr | ||
//- p Try this request with | ||
p: em You're viewing the HTML output, try calling this endpoint with an #[code Accept] header with one of the values: #[code application/x-yaml], #[code application/json], #[code application/xml] | ||
|
||
block scripts | ||
script(type='text/javascript'). | ||
$('select').on('click', function () { | ||
event.preventDefault(); | ||
|
||
$('[href=#' + $(this).val() + ']').tab('show') | ||
$(function() { | ||
ZeroClipboard.config({ | ||
swfPath: '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.swf', | ||
forceHandCursor: true, | ||
trustedDomains: [window.location.host, "cdnjs.cloudflare.com"] | ||
}); | ||
|
||
new ZeroClipboard($('.btn-clipboard')); | ||
|
||
// select first tab | ||
$('.nav-tabs a:first').tab('show'); | ||
|
||
// highlight the code | ||
$('.tab-content pre code').each(function (i, block) { | ||
hljs.highlightBlock(block); | ||
}); | ||
}); | ||
|
Oops, something went wrong.