home: Hide specific instances from home page
This commit is contained in:
parent
52dbfbf56e
commit
a74149f4ef
2 changed files with 5 additions and 1 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{range .Instances}}
|
{{range .Instances}}
|
||||||
{{ if .Running }}
|
{{ if and .Running (not .NoPrefixes) }}
|
||||||
<div class="pure-u-1-3">
|
<div class="pure-u-1-3">
|
||||||
<h3>{{.Slug}}</h3>
|
<h3>{{.Slug}}</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,10 @@ type LastEdit struct {
|
||||||
func (bs BundleStatistics) LastEdit() (le LastEdit) {
|
func (bs BundleStatistics) LastEdit() (le LastEdit) {
|
||||||
for _, bundle := range bs.Bundles {
|
for _, bundle := range bs.Bundles {
|
||||||
time := bundle.LastEdit.Time()
|
time := bundle.LastEdit.Time()
|
||||||
|
// skip invalid times
|
||||||
|
if time.Unix() <= 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if time.After(le.Time) {
|
if time.After(le.Time) {
|
||||||
le.Valid = true
|
le.Valid = true
|
||||||
le.Time = time
|
le.Time = time
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue