| Index: server/settings/admin/index.go
|
| diff --git a/server/settings/admin/index.go b/server/settings/admin/index.go
|
| index aa5d6d6501acd25d3c9a0c346427e5de98d7229c..c52cb3a0f080490a67936b375c83a72c2154f2a5 100644
|
| --- a/server/settings/admin/index.go
|
| +++ b/server/settings/admin/index.go
|
| @@ -1,42 +1,42 @@
|
| // Copyright 2016 The LUCI Authors. All rights reserved.
|
| // Use of this source code is governed under the Apache License, Version 2.0
|
| // that can be found in the LICENSE file.
|
|
|
| package admin
|
|
|
| import (
|
| - "net/http"
|
| "sort"
|
| "time"
|
|
|
| "github.com/dustin/go-humanize"
|
| - "github.com/julienschmidt/httprouter"
|
| - "golang.org/x/net/context"
|
|
|
| "github.com/luci/luci-go/common/clock"
|
| + "github.com/luci/luci-go/server/router"
|
| "github.com/luci/luci-go/server/settings"
|
| "github.com/luci/luci-go/server/templates"
|
| )
|
|
|
| type pageIndexEntry struct {
|
| ID string
|
| Title string
|
| }
|
|
|
| type pageIndexEntries []pageIndexEntry
|
|
|
| func (a pageIndexEntries) Len() int { return len(a) }
|
| func (a pageIndexEntries) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
| func (a pageIndexEntries) Less(i, j int) bool { return a[i].Title < a[j].Title }
|
|
|
| -func indexPage(c context.Context, rw http.ResponseWriter, r *http.Request, p httprouter.Params) {
|
| +func indexPage(ctx *router.Context) {
|
| + c, rw := ctx.Context, ctx.Writer
|
| +
|
| entries := pageIndexEntries{}
|
| for id, p := range settings.GetUIPages() {
|
| title, err := p.Title(c)
|
| if err != nil {
|
| replyError(c, rw, err)
|
| return
|
| }
|
| entries = append(entries, pageIndexEntry{
|
| ID: id,
|
| Title: title,
|
|
|