fixed mime type and removed delete button on ccpimage input

This commit is contained in:
dcore94 2023-03-07 12:38:24 +01:00
parent b5e213769d
commit c4b5f67361
2 changed files with 9 additions and 4 deletions

View File

@ -52,6 +52,12 @@ class CCPInputWidgetEditorController extends HTMLElement{
} }
} }
renderDeleteButton(){
<button data-index="${this.#index}" name="delete-input" title="Delete" class="btn btn-danger ccp-toolbar-button">
${this.#delete_icon}
</button>
}
render(input, i, reopen){ render(input, i, reopen){
this.#index = i this.#index = i
this.#input = input this.#input = input
@ -60,9 +66,7 @@ class CCPInputWidgetEditorController extends HTMLElement{
<details ${ reopen ? 'open' : ''}> <details ${ reopen ? 'open' : ''}>
<summary class="mb-3"> <summary class="mb-3">
<input class="form-control" style="width:auto;display:inline" required="required" name="id" value="${this.#input.id}" title="Id of input"/> <input class="form-control" style="width:auto;display:inline" required="required" name="id" value="${this.#input.id}" title="Id of input"/>
<button data-index="${this.#index}" name="delete-input" title="Delete" class="btn btn-danger ccp-toolbar-button"> ${ input.id !== 'ccpimage' ? this.renderDeleteButton()}
${this.#delete_icon}
</button>
</summary> </summary>
<div style="padding-left: 1rem;border-left: 1px solid gray;"> <div style="padding-left: 1rem;border-left: 1px solid gray;">
<div class="row mb-3"> <div class="row mb-3">

View File

@ -248,7 +248,7 @@ class CCPMethodEditorController extends HTMLElement{
this.#current.metadata = [] this.#current.metadata = []
this.#tmp_inputs = [ this.#tmp_inputs = [
{ {
id : "runtime", id : "ccpimage",
title : "Runtime", title : "Runtime",
description : "The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.", description : "The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.",
minOccurs : 1, minOccurs : 1,
@ -256,6 +256,7 @@ class CCPMethodEditorController extends HTMLElement{
schema : { schema : {
type : "string", type : "string",
format : "url", format : "url",
contentMediaType : "text/plain"
default : "", default : "",
readonly : true, readonly : true,
} }