Added first/last buttons to debug pages
This commit is contained in:
parent
189b7d269c
commit
c06b536123
|
@ -68,6 +68,7 @@ func serveDebugHtml(args []string, index *Index, paginate bool) httprouter.Handl
|
|||
}
|
||||
}
|
||||
if pageLength != 0 {
|
||||
var firstPage int = 1
|
||||
var lastPage int
|
||||
|
||||
if fileCount%int(pageLength) == 0 {
|
||||
|
@ -97,6 +98,9 @@ func serveDebugHtml(args []string, index *Index, paginate bool) httprouter.Handl
|
|||
nextPage = fileCount / int(pageLength)
|
||||
}
|
||||
|
||||
htmlBody.WriteString(fmt.Sprintf("<button onclick=\"window.location.href = '/html/%d';\">First</button>",
|
||||
firstPage))
|
||||
|
||||
htmlBody.WriteString(fmt.Sprintf("<button onclick=\"window.location.href = '/html/%d';\"%s>Prev</button>",
|
||||
prevPage,
|
||||
prevStatus))
|
||||
|
@ -104,6 +108,9 @@ func serveDebugHtml(args []string, index *Index, paginate bool) httprouter.Handl
|
|||
htmlBody.WriteString(fmt.Sprintf("<button onclick=\"window.location.href = '/html/%d';\"%s>Next</button>",
|
||||
nextPage,
|
||||
nextStatus))
|
||||
|
||||
htmlBody.WriteString(fmt.Sprintf("<button onclick=\"window.location.href = '/html/%d';\">Last</button>",
|
||||
lastPage))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Version string = "0.66.1"
|
||||
Version string = "0.66.2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue