Fix: Do not list nodes without tokens in admin panel.

See: https://github.com/freifunkhamburg/ffffng/issues/15
This commit is contained in:
baldo 2016-06-22 00:06:32 +02:00
parent b4dc9e37b2
commit c08f94abda

View file

@ -105,8 +105,13 @@ angular.module('ffffng').factory('NodeResource', function (
return Resources.error(res, err); return Resources.error(res, err);
} }
var realNodes = _.filter(nodes, function (node) {
// We ignore nodes without tokens as those are only manually added ones like gateways.
return node.token;
});
var filteredNodes = Resources.filter( var filteredNodes = Resources.filter(
nodes, realNodes,
['hostname', 'nickname', 'email', 'token', 'mac', 'key'], ['hostname', 'nickname', 'email', 'token', 'mac', 'key'],
restParams restParams
); );