rename builds -> bots

This commit is contained in:
Lunny Xiao
2022-11-21 16:18:12 +08:00
committed by Jason Song
parent c61ac24c1c
commit 2ecb59c092
24 changed files with 81 additions and 78 deletions

View File

@@ -0,0 +1,25 @@
<div class="issue list">
{{range .Runs}}
<li class="item df py-3">
<div class="issue-item-left df">
{{template "repo/bots/status" .Status}}
</div>
<div class="issue-item-main f1 fc df">
<div class="issue-item-top-row">
<a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{.Title}} <span class="ui label">{{RefShortName .Ref}}</span>
</a>
</div>
<div class="desc issue-item-bottom-row df ac fw my-1">
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: Commit
<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{SubStr .CommitSHA 0 10}}</a>&nbsp; pushed by {{.TriggerUser.GetDisplayName | Escape}}
</div>
</div>
<div class="issue-item-right">
<div>{{ TimeSinceUnix .Updated $.locale }}</div>
<div>{{.TakeTime}}</div>
</div>
</li>
{{end}}
</div>
{{template "base/paginate" .}}

View File

@@ -0,0 +1,49 @@
{{template "base/head" .}}
<div class="page-content repository">
{{template "repo/header" .}}
<div class="ui container">
<div class="ui grid">
<div class="four wide column">
<div class="ui fluid vertical menu">
<a class="item{{if not $.CurWorkflow}} active{{end}}" href="{{$.Link}}">All Workflows</a>
<div class="divider"></div>
{{range .workflows}}
<a class="item{{if eq .Name $.CurWorkflow}} active{{end}}" href="{{$.Link}}?workflow={{.Name}}">{{.Name}}</a>
{{end}}
</div>
</div>
<div class="twelve wide column content">
<div id="issue-filters" class="ui stackable grid">
<div class="six wide column">
{{template "repo/bots/openclose" .}}
</div>
</div>
<div id="issue-actions" class="ui stackable grid hide">
<div class="six wide column">
{{template "repo/bots/openclose" .}}
</div>
<div class="ui divider"></div>
{{/* Ten wide does not cope well and makes the columns stack.
This seems to be related to jQuery's hide/show: in fact, switching
issue-actions and issue-filters and having this ten wide will show
this one correctly, but not the other one. */}}
<div class="nine wide right aligned right floated column">
<div class="ui secondary filter stackable menu">
{{if not .Repository.IsArchived}}
<!-- Action Button -->
{{if .IsShowClosed}}
<div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.locale.Tr "repo.issues.action_open"}}</div>
{{else}}
<div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.locale.Tr "repo.issues.action_close"}}</div>
{{end}}
{{end}}
</div>
</div>
</div>
{{template "repo/bots/build_list" .}}
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

View File

@@ -0,0 +1,10 @@
<div class="ui compact tiny menu">
<a class="{{if not .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=open">
{{svg "octicon-issue-opened" 16 "mr-3"}}
{{.locale.Tr "repo.bots.open_tab" $.NumOpenRuns}}
</a>
<a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=closed">
{{svg "octicon-issue-closed" 16 "mr-3"}}
{{.locale.Tr "repo.bots.closed_tab" $.NumClosedRuns}}
</a>
</div>

View File

@@ -0,0 +1,12 @@
{{if .IsWaiting}}
<i class="commit-status circle icon gray"></i>
{{end}}
{{if .IsRunning}}
<i class="commit-status circle icon yellow"></i>
{{end}}
{{if .IsSuccess}}
<i class="commit-status check icon green"></i>
{{end}}
{{if .IsFailure}}
<i class="commit-status warning icon red"></i>
{{end}}

View File

@@ -0,0 +1,10 @@
{{template "base/head" .}}
<div class="page-content repository">
{{template "repo/header" .}}
<div id="repo-build-view" data-run-index="{{.RunIndex}}" data-job-index="{{.JobIndex}}">
</div>
</div>
{{template "base/footer" .}}