File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -76,16 +76,26 @@ func (r *ActionRunner) Type() RunnerType {
76
76
return RunnerTypeGlobal
77
77
}
78
78
79
- func (r RunnerType ) String () string {
80
- switch r {
79
+ func (rt RunnerType ) String () string {
80
+ switch rt {
81
81
case RunnerTypeGlobal :
82
82
return "Global"
83
83
case RunnerTypeOrganization :
84
84
return "Organization"
85
85
case RunnerTypeRepository :
86
86
return "Repository"
87
87
}
88
- return fmt .Sprintf ("Unknown Type %d" , r )
88
+ return fmt .Sprintf ("Unknown Type %d" , rt )
89
+ }
90
+
91
+ func (r * ActionRunner ) BelongsTo () string {
92
+ if r .RepoID != 0 {
93
+ return r .Repo .FullName ()
94
+ }
95
+ if r .OwnerID != 0 {
96
+ return r .Owner .Name
97
+ }
98
+ return ""
89
99
}
90
100
91
101
func (r * ActionRunner ) Status () runnerv1.RunnerStatus {
Original file line number Diff line number Diff line change 25
25
</div>
26
26
<div class="field gt-dib gt-mr-4 disabled">
27
27
<label>{{.locale.Tr "actions.runners.owner_type"}}</label>
28
- <span>{{.Runner.Type.String}}</span>
28
+ <span data-tooltip-content="{{.BelongsTo}}" >{{.Runner.Type.String}}</span>
29
29
</div>
30
30
</div>
31
31
Original file line number Diff line number Diff line change 65
65
<td>{{.ID}}</td>
66
66
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
67
67
<td>{{.Version}}</td>
68
- <td>{{.Type.String}}</td>
68
+ <td><span data-tooltip-content=" {{.BelongsTo}}">{{. Type.String}}<span> </td>
69
69
<td class="runner-tags">
70
70
{{range .AllLabels}}<span class="ui label">{{.}}</span>{{end}}
71
71
</td>
You can’t perform that action at this time.
0 commit comments