Commit f2b2b7cb authored by ale's avatar ale

Rename the public URL

The global HTTP handler overrides /debug.
parent f27b4cf7
Pipeline #8325 failed with stages
in 1 minute and 16 seconds
......@@ -49,7 +49,7 @@ var (
<td colspan="3"></td>
{{end}}
<td>{{$d.DatasetID}}</td>
<td><a href="/debug/source?dataset={{$d.DatasetSource}}">
<td><a href="/dataset?source={{$d.DatasetSource}}">
{{$d.DatasetSource}}</a></td>
<td>{{$d.DatasetTotalFiles}}</td>
<td>{{humanBytes $d.DatasetTotalBytes}}
......
......@@ -33,12 +33,12 @@ func TestDebugPage(t *testing.T) {
resp.Body.Close()
// Source debug page.
resp, err = http.Get(srv.URL + "/debug/source?dataset=file")
resp, err = http.Get(srv.URL + "/dataset?source=file")
if err != nil {
t.Fatalf("Get(/debug/source): %v", err)
t.Fatalf("Get(/dataset): %v", err)
}
if resp.StatusCode != 200 {
t.Errorf("Get(/debug/source): %s", resp.Status)
t.Errorf("Get(/dataset): %s", resp.Status)
io.Copy(os.Stderr, resp.Body) // nolint
}
resp.Body.Close()
......
......@@ -52,7 +52,7 @@ func (s *httpServer) Handler() http.Handler {
m := http.NewServeMux()
m.HandleFunc("/api/add_dataset", s.handleAddDataset)
m.HandleFunc("/api/find_atoms", s.handleFindAtoms)
m.HandleFunc("/debug/source", s.handleDebugSource)
m.HandleFunc("/dataset", s.handleDebugSource)
m.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.NotFound(w, r)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment