diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-card.js b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-card.js index d9dc80322ee09..ab8d18230050e 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-card.js +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-card.js @@ -1,18 +1,22 @@ import { QwcHotReloadElement, html, css} from 'qwc-hot-reload-element'; import { pages } from 'build-time-data'; import { JsonRpc } from 'jsonrpc'; -import 'echarts-gauge-grade'; import '@vaadin/icon'; +import 'qwc/qwc-extension-link.js'; export class QwcResteasyReactiveCard extends QwcHotReloadElement { jsonRpc = new JsonRpc(this); static styles = css` - .graph { - height: 200px; + .score { + font-size: 4em; + text-align: center; + color: var(--lumo-primary-text-color); + text-shadow: 2px 1px 0 var(--lumo-contrast-10pct); } + .extensionLink { - color: var(--lumo-contrast); + color: var(--lumo-contrast) !important; font-size: small; cursor: pointer; text-decoration: none; @@ -20,9 +24,16 @@ export class QwcResteasyReactiveCard extends QwcHotReloadElement { .extensionLink:hover { filter: brightness(80%); } + a, a:link, a:visited, a:hover, a:active{ + color: var(--lumo-primary-color); + } `; static properties = { + extensionName: {attribute: true}, + description: {attribute: true}, + guide: {attribute: true}, + namespace: {attribute: true}, _pages: {state: false}, _latestScores: {state: true}, }; @@ -43,22 +54,35 @@ export class QwcResteasyReactiveCard extends QwcHotReloadElement { render() { if(this._latestScores){ - return html`
- - -
+ if(this._latestScores.endpoints){ + return html`
+ ${this._latestScores.score} % +
${this._renderPagesLinks()}`; + }else{ + return html`${this.description} +

No endpoints detected. + Learn how you can add Endpoints

`; + } } } _renderPagesLinks(){ - return html` - - ${this._pages[0].title} - `; + return html`${this._pages.map(page => html` + + + `)}`; } hotReload(){ diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-endpoint-scores.js b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-endpoint-scores.js index 6d3e44dc0f2d5..18c917308ca09 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-endpoint-scores.js +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/resources/dev-ui/qwc-resteasy-reactive-endpoint-scores.js @@ -94,9 +94,13 @@ export class QwcResteasyReactiveEndpointScores extends QwcHotReloadElement { render() { if(this._latestScores){ - return html`${this._latestScores.endpoints.map(endpoint=>{ - return html`${this._renderEndpoint(endpoint)}`; - })}`; + if(this._latestScores.endpoints){ + return html`${this._latestScores.endpoints.map(endpoint=>{ + return html`${this._renderEndpoint(endpoint)}`; + })}`; + }else{ + return html`

No endpoints detected

`; + } } } diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js index a293a348dbeec..889828259026d 100644 --- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js +++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js @@ -91,11 +91,12 @@ export class QwcExtensions extends observeState(LitElement) { _renderCustomCardContent(extension){ import(extension.card.componentRef); - let customCardCode = `<${extension.card.componentName} class="card-content" slot="content" + extensionName="${extension.name}" description="${extension.description}" + guide="${extension.guide}" namespace="${extension.namespace}"> `;