summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-07-04 13:34:51 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-07-04 13:34:51 +0200
commitb710f1c071d75d4b028c61bb6f3927c2cd4aadf5 (patch)
tree556a7f700a0a56b1f3ebfd7dd31f9093b96a01af /views
parent9b1195430a2dc636e8325ecbb7445855d9d98259 (diff)
downloadcollection-json-explorer-b710f1c071d75d4b028c61bb6f3927c2cd4aadf5.tar.gz
collection-json-explorer-b710f1c071d75d4b028c61bb6f3927c2cd4aadf5.tar.bz2
collection-json-explorer-b710f1c071d75d4b028c61bb6f3927c2cd4aadf5.tar.xz
collection-json-explorer-b710f1c071d75d4b028c61bb6f3927c2cd4aadf5.zip
o Always showing the http response, even when the body couldn't be decoded.
Diffstat (limited to 'views')
-rw-r--r--views/data.jade45
-rw-r--r--views/index.jade5
2 files changed, 23 insertions, 27 deletions
diff --git a/views/data.jade b/views/data.jade
index 9f64ddf..edaa4d6 100644
--- a/views/data.jade
+++ b/views/data.jade
@@ -128,13 +128,16 @@ block queries
div(class='controls')
input(type='submit') Execute
-block headers
- pre
- table
- each value, key in headers
- tr
- td #{key}:
- td #{value}
+block http_response
+ div(class='row-fluid')
+ pre
+ table
+ each value, key in headers
+ tr
+ td #{key}:
+ td #{value}
+ |
+ | #{rawBody}
block navbar
div(class='navbar navbar-fixed-top')
@@ -164,7 +167,6 @@ block sidebar
ul(class='nav nav-list')
if typeof err != 'undefined'
li(class='nav-header'): a(href='#error') Error
- li(class='nav-header'): a(href='#raw-body') Raw Body
else
li(class='nav-header'): a(href='#meta') Meta
each link, i in collection.links
@@ -177,22 +179,19 @@ block sidebar
each query, i in collection.queries
li: a(href='#query-' + (i + 1))
mixin get_name(query, 'Query', i)
- li(class='nav-header'): a(href='#headers') Headers
li(class='nav-header'): a(href='#formatted-body') Formatted Body
- li(class='nav-header'): a(href='#raw-body') Raw Body
+ li(class='nav-header'): a(href='#http-response') HTTP Response
block inner_content
if typeof err != 'undefined'
section(id='error')
- div(class='page-error')
+ div(class='page-header')
h1 Error
- p Error rendering #{url}
+ div(class='row-fluid')
+ p Error rendering: #{url}
+ a(class='btn btn-primary btn-mini', href=urlgenerator.render(url)) Retry
p= err
- section(id='raw-body')
- div(class='page-header')
- h1 Raw Body
- pre= rawBody
else
section(id='meta')
div(class='page-header')
@@ -208,23 +207,19 @@ block inner_content
div(class='page-header')
h1 Queries
block queries
- section(id='headers')
- div(class='page-header')
- h1 Headers
- block headers
section(id='formatted-body')
div(class='page-header')
h1 Formatted Body
pre= formattedBody
- section(id='raw-body')
- div(class='page-header')
- h1 Raw Body
- pre= rawBody
+
+ section(id='http-response')
+ div(class='page-header')
+ h1 HTTP Response
+ block http_response
block content
div(class='row-fluid')
div(class='span3')
block sidebar
div(class='span9')
- - console.log('fuck')
block inner_content
diff --git a/views/index.jade b/views/index.jade
index 913b131..f9ef5d2 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -64,7 +64,7 @@ block inner_content
h3 The Source Code
p The source code is available
- a(href='trygvis.dyndns.org/~trygvis/git/2012/06/collection+json-explorer.git') here
+ a(href='http://trygvis.dyndns.org/~trygvis/git/2012/06/collection+json-explorer.git') here
| .
div(class='span4')
@@ -77,7 +77,8 @@ block inner_content
|explorer:
a(href='http://' + host + '/render?url=http%3A%2F%2Femployee.herokuapp.com', class='label label-info') explore now!
- p The specification contains a few example collections too which you can explore:
+ p The specification contains a few example collections too which
+ | you can explore:
- var examples = [ "minimal", "collection", "item", "queries", "template", "error" ]
each example, i in examples
- var u='http://' + host + '/render?url=' + encodeURIComponent('http://' + host + '/examples/from-spec/' + example + '.collection+json')