Simpler entry of locally discovered nodes

This involved 3 commits, but each is dependent on the one before so I thought it worth combining them into a single pull request.

Worth mentioning a change to "discovery.All()" function. A grep showed it was only used by the rest API, which always failed because the return value could not be converted to JSON. It emitted some types exclusively made up of private members (cacheEntry). I thought there was more downside in exposing the internally used bytes compared with re-packinging the data as strings, which would have resulted in a second stage of convertion in the web API function anyway.

Use of a datalist in the GUI was chosen as it doesn't alter the design of the interface, although there is no support for a datalist in Windows Mobile or Safari, so this might need improving at some point, nevertheless I hope it's worth including as it stands for now.

PS: This is my first commit pull request on github ever.
Yeah, on reflection I think you're right, I'll look up how that's done.

On 14/10/14 16:13, Audrius Butkevicius wrote:
>
> In internal/discover/discover.go:
>
> > @@ -169,13 +169,15 @@ func (d *Discoverer) Hint(device string, addrs []string) {
> >  	})
> >  }
> >
> > -func (d *Discoverer) All() map[protocol.DeviceID][]cacheEntry {
> > +func (d *Discoverer) All() map[string][]string {
>
> I'd rather implement |MarshalJSON| interface on both protocol.DeviceID 
> (should already be implemented maybe?) and cacheEntry (I assume 
> returns an empty {} now, so perhaps it's just a matter of changing the 
> variable capitalization and it would return sensible stuff)
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/syncthing/syncthing/pull/848/files#r18835057>.
>