added runtime info to executions

This commit is contained in:
dcore94 2023-03-29 16:59:19 +02:00
parent 5816564ee7
commit 8fa85db819
1 changed files with 12 additions and 2 deletions

View File

@ -93,8 +93,9 @@ class CCPExecutionHistory extends HTMLElement {
<span name="message" class="ml-1"></span>
</p>
</summary>
<div>
<span class="badge" name="infrastructure" alt="infrastructure" title="infrastructure"></span>
<div class="d-flex mb-1" style="gap:3px">
<span class="badge" name="infrastructure" alt="Infrastructure" title="Infrastructure"></span>
<span class="badge" name="runtime" alt="Runtime" title="Runtime"></span>
</div>
<ul>
<li></li>
@ -455,6 +456,15 @@ class CCPExecutionHistory extends HTMLElement {
e.classList.add(t2)
}
},
{
target : "span[name=runtime]",
apply : (e,d)=>{
e.textContent = d.runtime + (d.replicas && d.replicas !== "1" ? ' x ' + d.replicas : '')
const t = d.infrastructuretype.match(/docker/i) ? "docker" : null
const t2 = !t && d.infrastructuretype.match(/lxd/i) ? "lxd" : t
e.classList.add(t2)
}
},
{
target : "ul",
recurse : [