Can see directly the corresponding trace
This commit is contained in:
parent
1f4ce865aa
commit
3af70cf678
@ -30,6 +30,7 @@
|
||||
stats.push({
|
||||
arch: stage.arch,
|
||||
name: stage.name,
|
||||
number: stage.number,
|
||||
status: [],
|
||||
steps: [],
|
||||
});
|
||||
@ -165,7 +166,14 @@
|
||||
class:bg-warning={step.status == "pending" || step.status == "running"}
|
||||
class:bg-info={step.status == "killed"}
|
||||
>
|
||||
{step.number}. {step.name}
|
||||
<a
|
||||
href="/api/users/{grade_idx[gsi].id_user}/works/{work.id}/grades/{grade_idx[gsi].id}/traces/{gs.stages[view_step.istage].number}/{step.number}"
|
||||
target="_blank"
|
||||
title="Voir le détail de cette étape"
|
||||
>
|
||||
{step.number}.
|
||||
</a>
|
||||
{step.name}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
8
works.go
8
works.go
@ -314,7 +314,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
||||
|
||||
c.JSON(http.StatusOK, build)
|
||||
})
|
||||
gradesRoutes.GET("/traces", func(c *gin.Context) {
|
||||
gradesRoutes.GET("/traces/*path", func(c *gin.Context) {
|
||||
g := c.MustGet("grade").(*WorkGrade)
|
||||
|
||||
var u *User
|
||||
@ -331,7 +331,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
||||
return
|
||||
}
|
||||
|
||||
c.Redirect(http.StatusFound, fmt.Sprintf("%s/%s", droneEndpoint, repo.TestsRef))
|
||||
c.Redirect(http.StatusFound, fmt.Sprintf("%s/%s", droneEndpoint, repo.TestsRef)+c.Param("path"))
|
||||
})
|
||||
gradesRoutes.POST("/traces", func(c *gin.Context) {
|
||||
w := c.MustGet("work").(*Work)
|
||||
@ -353,7 +353,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
||||
|
||||
TriggerTests(c, w, repo, u)
|
||||
})
|
||||
gradesRoutes.GET("/forge", func(c *gin.Context) {
|
||||
gradesRoutes.GET("/forge/*path", func(c *gin.Context) {
|
||||
g := c.MustGet("grade").(*WorkGrade)
|
||||
|
||||
var u *User
|
||||
@ -370,7 +370,7 @@ func declareAPIAdminWorksRoutes(router *gin.RouterGroup) {
|
||||
return
|
||||
}
|
||||
|
||||
c.Redirect(http.StatusFound, strings.Replace(strings.Replace(repo.URI, ":", "/", 1), "git@", "https://", 1))
|
||||
c.Redirect(http.StatusFound, strings.Replace(strings.Replace(repo.URI, ":", "/", 1), "git@", "https://", 1)+c.Param("path"))
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user