Browse Source

nodeName -> name

pm2
Luke Childs 8 years ago
parent
commit
2af993b355
  1. 2
      lib/nunjuck-filters.js
  2. 2
      views/node.html

2
lib/nunjuck-filters.js

@ -50,7 +50,7 @@ const filters = {
// Encode query string // Encode query string
return `/?${querystring.encode(query)}`; return `/?${querystring.encode(query)}`;
}, },
nodeName: node => node.nickname name: node => node.nickname
|| node.fingerprint && node.fingerprint.slice(0, 8) || node.fingerprint && node.fingerprint.slice(0, 8)
|| node.hashed_fingerprint && node.hashed_fingerprint.slice(0, 8) || node.hashed_fingerprint && node.hashed_fingerprint.slice(0, 8)
}; };

2
views/node.html

@ -5,7 +5,7 @@
{% if error %} {% if error %}
<h2>{{ 'Invalid node' if error.statusCode == 400 else error.statusMessage }}</h2> <h2>{{ 'Invalid node' if error.statusCode == 400 else error.statusMessage }}</h2>
{% else %} {% else %}
<h2>{{ node.type | title }}: {{ node | nodeName }}</h2> <h2>{{ node.type | title }}: {{ node | name }}</h2>
<pre>{{ node | dump }}</pre> <pre>{{ node | dump }}</pre>
{% endif %} {% endif %}

Loading…
Cancel
Save