Skip to content

Commit

Permalink
Dev UI Open in IDE make sure lineNumber is in quotes
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger committed Nov 4, 2024
1 parent 0fbfc31 commit ebe0750
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/dev-ui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ import 'qui-ide-link';
<qui-ide-link title='Source full class name'
class='text-source'
fileName='${sourceClassNameFull}'
lineNumber=${sourceLineNumber}>[${sourceClassNameFull}]</qui-ide-link>;
lineNumber='${sourceLineNumber}'>[${sourceClassNameFull}]</qui-ide-link>;
----

https://github.com/quarkusio/quarkus/blob/582f1f78806d2268885faea7aa8f5a4d2b3f5b98/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-server-log.js#L315[Example code]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ export class QwcArcBeans extends LitElement {
${bean.nonDefaultQualifiers.map(qualifier =>
html`${this._qualifierRenderer(qualifier)}`
)}
<qui-ide-link fileName='${bean.providerType.name}'
lineNumber=0><code>${bean.providerType.name}</code></qui-ide-link>
<qui-ide-link fileName='${bean.providerType.name}'><code>${bean.providerType.name}</code></qui-ide-link>
</vaadin-vertical-layout>`;
}
Expand Down Expand Up @@ -213,4 +212,4 @@ export class QwcArcBeans extends LitElement {
});
}
}
customElements.define('qwc-arc-beans', QwcArcBeans);
customElements.define('qwc-arc-beans', QwcArcBeans);
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ export class QwcArcObservers extends LitElement {
}

_sourceRenderer(bean){
return html`<qui-ide-link fileName='${bean.declaringClass.name}'
lineNumber=0><code>${bean.declaringClass.name}</code><code class="method">#${bean.methodName}()</code></qui-ide-link>`;
return html`<qui-ide-link fileName='${bean.declaringClass.name}'><code>${bean.declaringClass.name}</code><code class="method">#${bean.methodName}()</code></qui-ide-link>`;
}

_typeRenderer(bean){
Expand Down Expand Up @@ -144,4 +143,4 @@ export class QwcArcObservers extends LitElement {
return s.replaceAll('_', ' ');
}
}
customElements.define('qwc-arc-observers', QwcArcObservers);
customElements.define('qwc-arc-observers', QwcArcObservers);
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ export class QwcArcRemovedComponents extends LitElement {
${bean.nonDefaultQualifiers.map(qualifier =>
html`${this._simpleNameRenderer(qualifier)}`
)}
<qui-ide-link fileName='${bean.providerType.name}'
lineNumber=0><code>${bean.providerType.name}</code></qui-ide-link>
<qui-ide-link fileName='${bean.providerType.name}'><code>${bean.providerType.name}</code></qui-ide-link>
</vaadin-vertical-layout>`;
}

Expand Down Expand Up @@ -204,4 +203,4 @@ export class QwcArcRemovedComponents extends LitElement {
});
}
}
customElements.define('qwc-arc-removed-components', QwcArcRemovedComponents);
customElements.define('qwc-arc-removed-components', QwcArcRemovedComponents);
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ export class QwcGrpcServices extends observeState(QwcHotReloadElement) {
}

_serviceClassRenderer(service){
return html`<qui-ide-link fileName='${service.serviceClass}'
lineNumber=0><code>${service.serviceClass}</code></qui-ide-link>`;
return html`<qui-ide-link fileName='${service.serviceClass}'><code>${service.serviceClass}</code></qui-ide-link>`;
}

_methodsRenderer(service){
Expand Down Expand Up @@ -368,4 +367,4 @@ export class QwcGrpcServices extends observeState(QwcHotReloadElement) {
return JSON.stringify(JSON.parse(content), null, 2);
}
}
customElements.define('qwc-grpc-services', QwcGrpcServices);
customElements.define('qwc-grpc-services', QwcGrpcServices);
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import java.util.Optional;
import java.util.concurrent.TimeUnit;

import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;

import io.quarkus.deployment.IsDevelopment;
Expand Down Expand Up @@ -126,7 +124,6 @@ public static void openBrowser(HttpRootPathBuildItem rp, NonApplicationRootPathB
}

StringBuilder sb = new StringBuilder("http://");
Config c = ConfigProvider.getConfig();
sb.append(host);
sb.append(":");
sb.append(port);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
_renderStacktrace(stackTraces){
return html`${stackTraces.map((stackTrace) =>
html`<br><qui-ide-link fileName='${stackTrace.className}'
lineNumber=${stackTrace.lineNumber}>${stackTrace.className}#${stackTrace.methodName}(${stackTrace.fileName}:${stackTrace.lineNumber})</qui-ide-link>`
lineNumber='${stackTrace.lineNumber}'>${stackTrace.className}#${stackTrace.methodName}(${stackTrace.fileName}:${stackTrace.lineNumber})</qui-ide-link>`
)}`;
}

Expand Down Expand Up @@ -314,8 +314,7 @@ export class QwcContinuousTesting extends QwcHotReloadElement {

_testRenderer(testLine){
let level = testLine.style ?? '';
return html`<qui-ide-link fileName='${testLine.className}'
lineNumber=0>
return html`<qui-ide-link fileName='${testLine.className}'>
<vaadin-icon class="ideIcon" icon="font-awesome-solid:code"></vaadin-icon>
</qui-ide-link>
<span class="${level}">
Expand Down Expand Up @@ -434,4 +433,4 @@ export class QwcContinuousTesting extends QwcHotReloadElement {
this._displayTags = !this._displayTags;
}
}
customElements.define('qwc-continuous-testing', QwcContinuousTesting);
customElements.define('qwc-continuous-testing', QwcContinuousTesting);
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export class QwcServerLog extends QwcAbstractLogElement {
return html`<qui-ide-link title='Source full class name'
class='text-source'
fileName='${sourceClassNameFull}'
lineNumber=${sourceLineNumber}>[${sourceClassNameFull}]</qui-ide-link>`;
lineNumber='${sourceLineNumber}'>[${sourceClassNameFull}]</qui-ide-link>`;
}
}

Expand All @@ -341,7 +341,7 @@ export class QwcServerLog extends QwcAbstractLogElement {
return html`<qui-ide-link title='Source full class name (short)'
class='text-source'
fileName='${sourceClassNameFull}'
lineNumber=${sourceLineNumber}>[${sourceClassNameFullShort}]</qui-ide-link>`;
lineNumber='${sourceLineNumber}'>[${sourceClassNameFullShort}]</qui-ide-link>`;
}
}

Expand All @@ -350,7 +350,7 @@ export class QwcServerLog extends QwcAbstractLogElement {
return html`<qui-ide-link title='Source class name'
class='text-source'
fileName='${sourceClassNameFull}'
lineNumber=${sourceLineNumber}>[${sourceClassName}]</qui-ide-link>`;
lineNumber='${sourceLineNumber}'>[${sourceClassName}]</qui-ide-link>`;
}
}

Expand All @@ -365,7 +365,7 @@ export class QwcServerLog extends QwcAbstractLogElement {
return html`<qui-ide-link title='Source file name'
class='text-file'
fileName='${sourceClassNameFull}'
lineNumber=${sourceLineNumber}>${sourceFileName}</qui-ide-link>`;
lineNumber='${sourceLineNumber}'>${sourceFileName}</qui-ide-link>`;
}
}

Expand Down

0 comments on commit ebe0750

Please sign in to comment.