All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev-ui.qwc-cxf-services.js Maven / Gradle / Ivy

The newest version!
import { LitElement, html, css} from 'lit';
import 'qui-card';
import '@vaadin/progress-bar';
import '@vaadin/grid';
import { columnBodyRenderer } from '@vaadin/grid/lit.js';
import { JsonRpc } from 'jsonrpc';
import 'qui-ide-link';

/**
 * This component shows the list of Service endpoints
 */
export class QwcCxfServices extends LitElement {
    jsonRpc = new JsonRpc(this);

    static styles = css`
        .cxf-table {
          height: 100%;
          padding-bottom: 10px;
        }

        code {
          font-size: 85%;
        }

        .service-sei {
          color: var(--lumo-contrast-50pct);
        }

        :host {
            display: flex;
            flex-direction:column;
            gap: 20px;
            padding-left: 10px;
            padding-right: 10px;
        }
        .nothing-found {
            padding: 5px;
        }`;

    static properties = {
        _services: {state: true}
    };

    constructor() {
        super();
        this._services = null;
    }

    connectedCallback() {
        super.connectedCallback();
        this.jsonRpc.getServices().then(jsonRpcResponse => {
            this._services = jsonRpcResponse.result;
        });
    }

    render() {
        if (this._services) {
            if (this._services.length > 0) {
                return this._renderServiceList();
            }else {
                return html`
No service endpoints found
`; } } else { return html``; } } _renderServiceList(){ return html` `; } _classNameRenderer(service){ /* service.sei always the same as service.className ${service.sei} */ return html` ${service.implementor} `; } _wsdlRenderer(service) { return html`${service.path}?wsdl`; } } customElements.define('qwc-cxf-services', QwcCxfServices);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy