master #18

Merged
m.lettere merged 12 commits from master into prod 2024-06-14 12:47:54 +02:00
1 changed files with 26 additions and 60 deletions
Showing only changes of commit 992e085a76 - Show all commits

View File

@ -207,36 +207,32 @@ class CCPExecutionHistory extends HTMLElement {
</summary> </summary>
<ul class="ccp-execution-list list-group" style="list-style:none"> <ul class="ccp-execution-list list-group" style="list-style:none">
<li class="ccp-execution-item ccp-archived-execution-item list-group-item-secondary my-2 p-2" draggable="true"> <li class="ccp-execution-item ccp-archived-execution-item list-group-item-secondary my-2 p-2" draggable="true">
<details> <span name="version" class="badge badge-primary"></span>
<summary> <span name="status" class="ml-1 badge"></span>
<span name="version" class="badge badge-primary"></span> <div class="d-flex float-right" style="gap: 3px 5px;flex-wrap:wrap;">
<span name="status" class="ml-1 badge"></span> <button name="restore" title="${this.getLabel("restore_execution_help")}" class="btn btn-primary ccp-toolbar-button ccp-toolbar-button-small">
<div class="d-flex float-right" style="gap: 3px 5px;flex-wrap:wrap;"> <svg viewBox="0 -960 960 960" width="24px" fill="#5f6368">
<button name="restore" title="${this.getLabel("restore_execution_help")}" class="btn btn-primary ccp-toolbar-button ccp-toolbar-button-small"> <path d="M480-250q78 0 134-56t56-134q0-78-56-134t-134-56q-38 0-71 14t-59 38v-62h-60v170h170v-60h-72q17-18 41-29t51-11q54 0 92 38t38 92q0 54-38 92t-92 38q-44 0-77-25.5T356-400h-62q14 65 65.5 107.5T480-250ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm0-80h480v-446L526-800H240v640Zm0 0v-640 640Z"/>
<svg viewBox="0 -960 960 960" width="24px" fill="#5f6368"> </svg>
<path d="M480-250q78 0 134-56t56-134q0-78-56-134t-134-56q-38 0-71 14t-59 38v-62h-60v170h170v-60h-72q17-18 41-29t51-11q54 0 92 38t38 92q0 54-38 92t-92 38q-44 0-77-25.5T356-400h-62q14 65 65.5 107.5T480-250ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm0-80h480v-446L526-800H240v640Zm0 0v-640 640Z"/> </button>
</svg> <button name="delete" title="${this.getLabel("delete_help")}" class="btn btn-danger ccp-toolbar-button ccp-toolbar-button-small">
</button> <svg viewBox="0 0 24 24">
<button name="delete" title="${this.getLabel("delete_help")}" class="btn btn-danger ccp-toolbar-button ccp-toolbar-button-small"> <path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"></path>
<svg viewBox="0 0 24 24"> </svg>
<path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"></path> </button>
</svg> </div>
</button> <p name="createstart" class="font-weight-light font-italic" style="margin-top:revert">
</div> <span name="created"></span>.
<p name="createstart" class="font-weight-light font-italic" style="margin-top:revert"> <span name="started" class="ml-1"></span>
<span name="created"></span>. </p>
<span name="started" class="ml-1"></span> <p name="message" class="font-weight-light font-italic" style="margin-top:revert">
</p> <span name="updated"></span>:
<p name="message" class="font-weight-light font-italic" style="margin-top:revert"> <span name="message" class="ml-1"></span>
<span name="updated"></span>: </p>
<span name="message" class="ml-1"></span> <div class="d-flex flex-wrap" style="gap:3px; overflow:hidden">
</p> <span style="text-overflow:ellipsis" class="badge badge-light text-info border border-info" name="infrastructure" alt="${this.getLabel("infrastructure_help")}" title="${this.getLabel("infrastructure_help")}"></span>
</summary> <span class="badge" name="runtime" alt="${this.getLabel("runtime_help")}" title="${this.getLabel("runtime_help")}"></span>
<div class="d-flex flex-wrap" style="gap:3px; overflow:hidden"> </div>
<span style="text-overflow:ellipsis" class="badge badge-light text-info border border-info" name="infrastructure" alt="${this.getLabel("infrastructure_help")}" title="${this.getLabel("infrastructure_help")}"></span>
<span class="badge" name="runtime" alt="${this.getLabel("runtime_help")}" title="${this.getLabel("runtime_help")}"></span>
</div>
</details>
</li> </li>
</ul> </ul>
</details> </details>
@ -1002,21 +998,6 @@ class CCPExecutionHistory extends HTMLElement {
}, },
recurse : [ recurse : [
{
target : "details",
apply : (e,d)=>{
e.alt = e.title = d.id
if(sessionStorage.getItem("arch_" + d.id) === "open") e.open = "open";
else e.removeAttribute("open");
},
on_toggle : ev=>{
if(ev.target.open){
sessionStorage.setItem("arch_" + ev.currentTarget.alt, 'open')
}else{
sessionStorage.removeItem("arch_" + ev.currentTarget.alt)
}
}
},
{ {
target : "span[name=version]", target : "span[name=version]",
apply : (e,d)=>{ apply : (e,d)=>{
@ -1090,21 +1071,6 @@ class CCPExecutionHistory extends HTMLElement {
const t3 = !t2 && infratype.match(/galaxy/i) ? "galaxy" : t const t3 = !t2 && infratype.match(/galaxy/i) ? "galaxy" : t
e.classList.add(t3) e.classList.add(t3)
} }
},
{
target : "button[name=codegen]",
apply : (e,d)=>e.setAttribute("data-index", d.id),
on_click: (ev)=>{
const id = ev.target.getAttribute("data-index")
const langsel = ev.target.parentElement.querySelector("select[name=language-selector]")
const lang = langsel.value
const ext = langsel.selectedOptions[0].getAttribute("data-ext")
this.generateCode(id, lang, `${id}.${ext}`)
}
},
{
target : "a[name=direct_link_execution]",
apply : (e,d)=>e.href = window.location.origin + window.location.pathname + "?execution=" + d.id
} }
] ]
} }