updated template to display server info, tested views for ping, name info etc

This commit is contained in:
Muneeb Ali
2017-03-19 23:42:05 -04:00
parent 036618b322
commit d53380ba4b
4 changed files with 52 additions and 7 deletions

View File

@@ -0,0 +1,9 @@
<html>
<body>
<div class="centered">
<h3>403 Forbidden error</h3>
<h4>This public node does not allow POST requests. Try <a href="https://github.com/blockstack/blockstack-code">deploying your own node</a> instead.</h4>
</div>
</body>
</html>

View File

@@ -1,4 +1,4 @@
{% macro docsection(api_call) %}
{% macro docsection(api_call, server_url) %}
<div>
<section>
<div class="container pull-left col-sm-12 segment-wrapper" id="{{ api_call.anchor_tag }}">
@@ -36,10 +36,10 @@
<div class="segment-code" id="identifier">
<div class="seg-code-wrap">
<h4>Definition</h4>
<pre><code class="http">{{ api_call.method }} https://api.onename.com/v1{{ api_call.path_template }}</code></pre>
<pre><code class="http">{{ api_call.method }} {{ server_url }}{{ api_call.path_template }}</code></pre>
<h4>Example Request</h4>
<pre><code class="bash">{{ api_call.example_request_bash }}</code></pre>
<pre><code class="bash">curl {{ server_url}}{{ api_call.example_request_bash }}</code></pre>
<h4>Example Response</h4>
<pre><code class="json">{{ api_call.example_response }}</code></pre>

View File

@@ -66,6 +66,13 @@
<!-- mobile .navbar-collapse - changes here need to reflect on sidebar nav -->
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right visible-xs visible-sm">
<li>
<h5 class="navheader">Node</h5>
</li>
<li>
<a href="/#node_ping">Ping</a>
</li>
<li>
<h5 class="navheader">Users</h5>
</li>

View File

@@ -32,6 +32,13 @@
<div class="pull-left sidebar hidden-xs hidden-sm">
<div class="list-group">
<a href="/#" class="list-group-item">Getting Started</a>
<h5 class="navheader">Node</h5>
<a href="/#node_ping" class="list-group-item">Ping the node</a>
<h5 class="navheader">Naming</h5>
<a href="/#naming_name_info" class="list-group-item">Get name info</a>
<a href="/#naming_name_history" class="list-group-item">Get name history</a>
<h5 class="navheader">Users</h5>
<a href="/#lookup_users" class="list-group-item">Lookup users</a>
<a href="/#search_users" class="list-group-item">Search users</a>
@@ -61,19 +68,41 @@
<div class="seg-zone-wrap">
<h3>Getting Started</h3>
<p>
Welcome to this deployment of Blockstack Core. You can read the documentation and make RESTful calls
to this node.</p>
Welcome to this deployment of Blockstack Core v{{server_info.server_version}}. You can read the documentation and make RESTful calls to this node.
</p>
<p>
<table>
<tr>
<td>Consensus hash</td>
<td>{{server_info.consensus}}</td>
</tr>
<tr>
<td>Last block seen</td>
<td>{{server_info.last_block_seen}}</td>
</tr>
<tr>
<td style="padding:0px 20px 0px 0px;">Last block processed</td>
<td>{{server_info.last_block_processed}}</td>
</tr>
</table>
</p>
<p>
Blockstack Core is free software released under a GPLv3 license. More details are <a href="https://github.com/blockstack/blockstack-core">here</a>.
</p>
</div>
</div>
</div>
</section>
</div>
{% for api_call in api_calls %}
{{ docsection(api_call) }}
{{ docsection(api_call, server_url) }}
{% endfor %}
</div>