added infras info to executions

This commit is contained in:
dcore94 2023-03-29 16:19:35 +02:00
parent 5e42d06297
commit eeaf424d8b
1 changed files with 17 additions and 0 deletions

View File

@ -45,6 +45,12 @@ class CCPExecutionHistory extends HTMLElement {
.ccp-execution-list {
min-height: 3rem;
}
.ccp-execution-list .lxd{
background-color: #dd4814;
}
.ccp-execution-list .docker{
background-color: #2496ed;
}
</style>
<template id="EXECUTIOM_LIST_TEMPLATE">
<ul name="ccp_execution_list" class="ccp-execution-list list-group border border-2">
@ -87,6 +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>
<ul>
<li></li>
</ul>
@ -437,6 +446,14 @@ class CCPExecutionHistory extends HTMLElement {
}
}
},
{
target : "span[name=infrastructure]",
apply : (e,d)=>{
e.textContent = d.infrastructure
const t = infra.type.match(/docker/i) ? "docker" : null
const t2 = !t && infra.type.match(/lxd/i) ? "lxd" : t
e.classList.add(t2)
},
{
target : "ul",
recurse : [