-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...oyment/src/main/java/io/quarkiverse/temporal/deployment/devui/TemporalDevUIProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package io.quarkiverse.temporal.deployment.devui; | ||
|
||
import java.util.Objects; | ||
|
||
import io.quarkus.deployment.IsDevelopment; | ||
import io.quarkus.deployment.annotations.BuildProducer; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.devui.spi.page.CardPageBuildItem; | ||
import io.quarkus.devui.spi.page.ExternalPageBuilder; | ||
import io.quarkus.devui.spi.page.Page; | ||
import io.quarkus.devui.spi.page.PageBuilder; | ||
import io.temporal.client.WorkflowClient; | ||
|
||
/** | ||
* Dev UI card for displaying important details such Temporal version. | ||
*/ | ||
public class TemporalDevUIProcessor { | ||
|
||
@BuildStep(onlyIf = IsDevelopment.class) | ||
void createCard(BuildProducer<CardPageBuildItem> cardPageBuildItemBuildProducer) { | ||
final CardPageBuildItem card = new CardPageBuildItem(); | ||
|
||
final PageBuilder<ExternalPageBuilder> versionPage = Page.externalPageBuilder("Version") | ||
.icon("font-awesome-solid:book") | ||
.url("https://temporal.io") | ||
.doNotEmbed() | ||
.staticLabel(Objects.toString(WorkflowClient.class.getPackage().getImplementationVersion(), "?")); | ||
card.addPage(versionPage); | ||
|
||
card.setCustomCard("qwc-temporal-card.js"); | ||
|
||
cardPageBuildItemBuildProducer.produce(card); | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
extension/deployment/src/main/resources/dev-ui/qwc-temporal-card.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { LitElement, html, css} from 'lit'; | ||
import { pages } from 'build-time-data'; | ||
import 'qwc/qwc-extension-link.js'; | ||
|
||
const NAME = "Temporal"; | ||
export class QwcTemporalCard extends LitElement { | ||
|
||
static styles = css` | ||
.identity { | ||
display: flex; | ||
justify-content: flex-start; | ||
} | ||
.description { | ||
padding-bottom: 10px; | ||
} | ||
.logo { | ||
padding-bottom: 10px; | ||
margin-right: 5px; | ||
} | ||
.card-content { | ||
color: var(--lumo-contrast-90pct); | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
padding: 2px 2px; | ||
height: 100%; | ||
} | ||
.card-content slot { | ||
display: flex; | ||
flex-flow: column wrap; | ||
padding-top: 5px; | ||
} | ||
`; | ||
|
||
static properties = { | ||
description: {type: String} | ||
}; | ||
|
||
constructor() { | ||
super(); | ||
} | ||
|
||
connectedCallback() { | ||
super.connectedCallback(); | ||
} | ||
|
||
render() { | ||
return html`<div class="card-content" slot="content"> | ||
<div class="identity"> | ||
<div class="logo"> | ||
<img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOTIiIGhlaWdodD0iMTkyIiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTkyIDE5MiI+PHJlY3Qgd2lkdGg9IjE5MiIgaGVpZ2h0PSIxOTIiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xNDUyXzUzMTcpIiByeD0iMjQiLz48cGF0aCBmaWxsPSIjRjJGMkYyIiBkPSJNMTIzLjM0IDY4LjY1OTZDMTE5LjY1NSA0MS4wNDg0IDExMC4zMjcgMTggOTYgMThDODEuNjcz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uNzQxIDE2Ni4xMDMgOTYuMDA0MSAxNjYuMTAzQzg5LjI2NyAxNjYuMTAzIDgwLjUyNTMgMTUwLjY4MSA3Ni43MDYxIDEyNC4yMzhDNzYuNTIwMiAxMjIuOTM2IDc1Ljg4OTggMTE3LjU5OCA3NS43NTY0IDExNi4yNDhDNzUuMTQyMSAxMDkuOTc5IDc0Ljc3MDMgMTAzLjI0NiA3NC43NzAzIDk2Qzc0Ljc3MDMgODguNzUzNyA3NS4xNDIxIDgyLjAyMDYgNzUuNzU2NCA3NS43NDgzQzgyLjAyNDcgNzUuMTM0IDg4Ljc1NzcgNzQuNzYyMiA5Ni4wMDQxIDc0Ljc2MjJDMTAzLjI1IDc0Ljc2MjIgMTA5Ljk4MyA3NS4xMzQgMTE2LjI1MiA3NS43NDgzQzExNy42MDYgNzUuODgxNyAxMjIuOTQgNzYuNTEyMSAxMjQuMjQyIDc2LjY5OEMxNTAuNjg1IDgwLjUxNzIgMTY2LjExMSA4OS4yNjI5IDE2Ni4xMTEgOTUuOTk2QzE2Ni4xMTEgMTAyLjcyOSAxNTAuNjg1IDExMS40NzkgMTI0LjI0MiAxMTUuMjk4WiIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xNDUyXzUzMTciIHgxPSIxODMiIHgyPSIwIiB5MT0iMTkyIiB5Mj0iMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM0NDRDRTciLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNCNjY0RkYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=" | ||
alt="${NAME}" | ||
title="${NAME}" | ||
width="32" | ||
height="32"> | ||
</div> | ||
<div class="description">${this.description}</div> | ||
</div> | ||
${this._renderCardLinks()} | ||
</div> | ||
`; | ||
} | ||
|
||
_renderCardLinks(){ | ||
return html`${pages.map(page => html` | ||
<qwc-extension-link slot="link" | ||
extensionName="${NAME}" | ||
iconName="${page.icon}" | ||
displayName="${page.title}" | ||
staticLabel="${page.staticLabel}" | ||
dynamicLabel="${page.dynamicLabel}" | ||
streamingLabel="${page.streamingLabel}" | ||
path="${page.id}" | ||
?embed=${page.embed} | ||
externalUrl="${page.metadata.externalUrl}" | ||
webcomponent="${page.componentLink}" > | ||
</qwc-extension-link> | ||
`)}`; | ||
} | ||
|
||
} | ||
customElements.define('qwc-temporal-card', QwcTemporalCard); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# HTTP | ||
quarkus.http.port=8081 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters