summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-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>