Skip to content

Commit

Permalink
curio web: Better hapi route prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 25, 2024
1 parent 826e4a7 commit 4a0d501
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions curiosrc/web/hapi/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ func Routes(r *mux.Router, deps *deps.Deps) error {
go a.watchRpc()
go a.watchActor()

r.HandleFunc("/actorsummary", a.actorSummary)
r.HandleFunc("/machines", a.indexMachines)
r.HandleFunc("/tasks", a.indexTasks)
r.HandleFunc("/taskhistory", a.indexTasksHistory)
r.HandleFunc("/pipeline-porep", a.indexPipelinePorep)
// index page (simple info)
r.HandleFunc("/simpleinfo/actorsummary", a.actorSummary)
r.HandleFunc("/simpleinfo/machines", a.indexMachines)
r.HandleFunc("/simpleinfo/tasks", a.indexTasks)
r.HandleFunc("/simpleinfo/taskhistory", a.indexTasksHistory)
r.HandleFunc("/simpleinfo/pipeline-porep", a.indexPipelinePorep)

// pipeline-porep page
r.HandleFunc("/pipeline-porep/sectors", a.pipelinePorepSectors)
Expand Down
10 changes: 5 additions & 5 deletions curiosrc/web/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2>Cluster Machines</h2>
<th>Tasks (24h)</th>
</tr>
</thead>
<tbody hx-get="/hapi/machines" hx-trigger="load,every 5s">
<tbody hx-get="/hapi/simpleinfo/machines" hx-trigger="load,every 5s">
</tbody>
</table>
</div>
Expand All @@ -84,7 +84,7 @@ <h2><a href="/pipeline_porep.html">PoRep Pipeline</a></h2>
<th>Failed</th>
</tr>
</thead>
<tbody hx-get="/hapi/pipeline-porep" hx-trigger="load,every 5s">
<tbody hx-get="/hapi/simpleinfo/pipeline-porep" hx-trigger="load,every 5s">
</tbody>
</table>
</div>
Expand All @@ -104,7 +104,7 @@ <h2>Actor Summary</h2>
<th>Wins</th>
</tr>
</thead>
<tbody hx-get="/hapi/actorsummary" hx-trigger="load,every 5s">
<tbody hx-get="/hapi/simpleinfo/actorsummary" hx-trigger="load,every 5s">
</tbody>
</table>
</div>
Expand All @@ -125,7 +125,7 @@ <h2>Recently Finished Tasks</h2>
<th>Message</th>
</tr>
</thead>
<tbody hx-get="/hapi/taskhistory" hx-trigger="load, every 2s">
<tbody hx-get="/hapi/simpleinfo/taskhistory" hx-trigger="load, every 2s">
</tbody>
</table>
</div>
Expand All @@ -141,7 +141,7 @@ <h2>Cluster Tasks</h2>
<th>Owner</th>
</tr>
</thead>
<tbody hx-get="/hapi/tasks" hx-trigger="load,every 1s">
<tbody hx-get="/hapi/simpleinfo/tasks" hx-trigger="load,every 1s">
</tbody>
</table>
</div>
Expand Down

0 comments on commit 4a0d501

Please sign in to comment.