Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion controllers/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ module.exports = (req, res, next) => {
title = `Search results for "${req.query.s}":`;
query.search = req.query.s;
} else {
query.order = '-consensus_weight';
if (req.query.o) {
title = 'Top nodes by date first seen';
query.order = '-first_seen';
} else {
query.order = '-consensus_weight';
}
query.running = true;
}
if (req.query.p) {
Expand Down
2 changes: 2 additions & 0 deletions views/listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h2>{{ title }}</h2>
<th>Country</th>
<th>Flags</th>
<th>Type</th>
<th><a href="?o=first_seen">First Seen</a></th>
</tr>
</thead>
<tbody>
Expand All @@ -32,6 +33,7 @@ <h2>{{ title }}</h2>
{% endif %}
</td>
<td>{{ node.type | title }}</td>
<td>{{ node.first_seen }}</td>
</tr>
{% endfor %}
</tbody>
Expand Down
4 changes: 4 additions & 0 deletions views/node.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ <h3>Overview</h3>
<dd class="flag"><i class="icon-{{ flag | lower }}"></i> {{ flag }}</dd>
{% endfor %}
{% endif %}
{% if node.first_seen %}
<dt>First Seen</dt>
<dd>{{ node.first_seen }}</dd>
{% endif %}
</dl>
</section>
{% endif %}
Expand Down