summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-30 20:06:32 +0000
committerGitHub <noreply@github.com>2021-11-30 20:06:32 +0000
commit01087e9eef21ff5ea1cebbb1e84933954671fdf2 (patch)
treeae618785a3bd46e012096683e2fd2309f87c571d /templates/admin
parentd894c90b703ce215e2319ae2e2bf95989f77805d (diff)
downloadgitea-01087e9eef21ff5ea1cebbb1e84933954671fdf2.tar.gz
gitea-01087e9eef21ff5ea1cebbb1e84933954671fdf2.zip
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>
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/monitor.tmpl28
-rw-r--r--templates/admin/process-row.tmpl20
-rw-r--r--templates/admin/process.tmpl10
3 files changed, 31 insertions, 27 deletions
diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl
index 16c4d88002..8a90f9b647 100644
--- a/templates/admin/monitor.tmpl
+++ b/templates/admin/monitor.tmpl
@@ -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">
diff --git a/templates/admin/process-row.tmpl b/templates/admin/process-row.tmpl
new file mode 100644
index 0000000000..814727e7fa
--- /dev/null
+++ b/templates/admin/process-row.tmpl
@@ -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>
diff --git a/templates/admin/process.tmpl b/templates/admin/process.tmpl
new file mode 100644
index 0000000000..719c10cead
--- /dev/null
+++ b/templates/admin/process.tmpl
@@ -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>