This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ type indexData struct {
358
358
Authenticated bool
359
359
User User
360
360
URI string
361
- AllResults bool
361
+ ActiveOnly bool
362
362
Submission submission
363
363
scanData
364
364
}
@@ -469,7 +469,7 @@ func index(w http.ResponseWriter, r *http.Request) {
469
469
ip := q .Get ("ip" )
470
470
firstSeen := q .Get ("firstseen" )
471
471
lastSeen := q .Get ("lastseen" )
472
- _ , allResults := q ["all " ]
472
+ _ , activeOnly := q ["active " ]
473
473
474
474
results , err := resultData (ip , firstSeen , lastSeen )
475
475
if err != nil {
@@ -487,7 +487,7 @@ func index(w http.ResponseWriter, r *http.Request) {
487
487
Authenticated : true ,
488
488
User : user ,
489
489
URI : r .URL .Path ,
490
- AllResults : allResults ,
490
+ ActiveOnly : activeOnly ,
491
491
Submission : sub ,
492
492
scanData : results ,
493
493
}
Original file line number Diff line number Diff line change 62
62
</ div >
63
63
</ form >
64
64
< a class ="btn btn-primary navbar-btn " href ="/job "> New scan</ a >
65
- < a class ="btn btn-{{ if not .AllResults }}success{{ else }}default{{ end }} navbar-btn " href ="/{{ if not .AllResults }}?all {{ end }} "> Active only</ a >
65
+ < a class ="btn btn-{{ if not .ActiveOnly }}success{{ else }}default{{ end }} navbar-btn " href ="/{{ if not .ActiveOnly }}?active {{ end }} "> Active only</ a >
66
66
{{ end }}
67
67
{{- if ne .User.Email "" }}
68
68
< ul class ="nav navbar-nav navbar-right ">
Original file line number Diff line number Diff line change 14
14
</ tr >
15
15
</ thead >
16
16
< tbody >
17
+ {{- $ActiveOnly := .ActiveOnly }}
17
18
{{- range .Results }}
18
19
< tr >
20
+ {{- if not (and $ActiveOnly .Gone) }}
19
21
< td >
20
22
{{- if .New }}< span class ="label label-danger "> New</ span > {{ end -}}
21
23
{{- if .Gone }}< span class ="label label-success "> Gone</ span > {{ end -}}
26
28
< td > {{ .Proto }}</ td >
27
29
< td > {{ .FirstSeen }}</ td >
28
30
< td > {{ .LastSeen }}</ td >
31
+ {{- end }}
29
32
</ tr >
30
33
{{- else }}
31
34
< div class ="panel panel-warning center-block " style ="width: 25% ">
You can’t perform that action at this time.
0 commit comments