mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Make Requests Processes and create process hierarchy. Associate OpenRepository with context. (#17125)
This PR registers requests with the process manager and manages hierarchy within the processes. Git repos are then associated with a context, (usually the request's context) - with sub commands using this context as their base context. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -65,33 +65,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pid</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Processes}}
|
||||
<tr>
|
||||
<td>{{.PID}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/cancel/{{.PID}}" data-id="{{.PID}}" data-name="{{.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{template "admin/process" .}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui small basic delete modal">
|
||||
|
20
templates/admin/process-row.tmpl
Normal file
20
templates/admin/process-row.tmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="item">
|
||||
<div class="df ac">
|
||||
<div class="content f1">
|
||||
<div class="header">{{.Process.Description}}</div>
|
||||
<div class="description"><span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.Lang}}</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<a class="delete-button icon" href="" data-url="{{.root.Link}}/cancel/{{.Process.PID}}" data-id="{{.Process.PID}}" data-name="{{.Process.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{$children := .Process.Children}}
|
||||
{{if $children}}
|
||||
<div class="divided list">
|
||||
{{range $children}}
|
||||
{{template "admin/process-row" dict "Process" . "root" $.root}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
10
templates/admin/process.tmpl
Normal file
10
templates/admin/process.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui relaxed divided list">
|
||||
{{range .Processes}}
|
||||
{{template "admin/process-row" dict "Process" . "root" $}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user