dev-ui.qwc-automatiko-function-flow.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of automatiko-function-flow-deployment Show documentation
Show all versions of automatiko-function-flow-deployment Show documentation
Function Flow Deployment module for Quarkus Extension for Automatiko Engine
import { LitElement, html, css} from 'lit';
import { columnBodyRenderer } from '@vaadin/grid/lit.js';
import { functionFlows } from 'build-time-data';
import '@vaadin/grid';
import '@vaadin/vertical-layout';
import 'qui-badge';
export class QwcAutomatikoFunctionFlow extends LitElement {
static styles = css`
.arctable {
height: 100%;
padding-bottom: 10px;
}
code {
font-size: 85%;
}
.annotation {
color: var(--lumo-contrast-50pct);
}
.producer {
color: var(--lumo-primary-text-color);
}
`;
static properties = {
_functionFlows: {state: true},
};
constructor() {
super();
this._functionFlows = functionFlows;
}
textToClipboard (text) {
var dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = text;
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
}
render() {
if (this._functionFlows) {
return html`
`;
} else {
return html`No functions found`;
}
}
_nameRenderer(func) {
return html`
${func.name}
`;
}
_endpointRenderer(func) {
return html`
${func.endpoint}
`;
}
_binaryRenderer(func) {
return html`
${func.binaryInstructions}
`;
}
_binaryCopyRenderer(func) {
return html`
this.textToClipboard(func.curlBinary)} class="button">
`;
}
_structureRenderer(func) {
return html`
${func.structuredInstructions}
`;
}
_structureCopyRenderer(func) {
return html`
this.textToClipboard(func.curlStructure)} class="button">
`;
}
}
customElements.define('qwc-automatiko-function-flow', QwcAutomatikoFunctionFlow);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy