Implement result listing from CLI

Change the schema to include ASN and Network Name in the results table
This commit is contained in:
Arturo Filastò
2018-05-03 18:40:52 +02:00
parent 0c5b6aa37c
commit ecf3370f53
9 changed files with 323 additions and 21 deletions
+5 -2
View File
@@ -40,8 +40,11 @@ func init() {
}
result, err := database.CreateResult(ctx.DB, ctx.Home, database.Result{
Name: *nettestGroup,
StartTime: time.Now().UTC(),
Name: *nettestGroup,
StartTime: time.Now().UTC(),
Country: ctx.Location.CountryCode,
NetworkName: ctx.Location.NetworkName,
ASN: fmt.Sprintf("%d", ctx.Location.ASN),
})
if err != nil {
log.Errorf("DB result error: %s", err)