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 { .ccp-execution-list {
min-height: 3rem; min-height: 3rem;
} }
.ccp-execution-list .lxd{
background-color: #dd4814;
}
.ccp-execution-list .docker{
background-color: #2496ed;
}
</style> </style>
<template id="EXECUTIOM_LIST_TEMPLATE"> <template id="EXECUTIOM_LIST_TEMPLATE">
<ul name="ccp_execution_list" class="ccp-execution-list list-group border border-2"> <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> <span name="message" class="ml-1"></span>
</p> </p>
</summary> </summary>
<div>
<span class="badge" name="infrastructure" alt="infrastructure" title="infrastructure"></span>
</div>
<ul> <ul>
<li></li> <li></li>
</ul> </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", target : "ul",
recurse : [ recurse : [