Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension Info - Expose other information about Java and Git #45129

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export class QwcInfo extends LitElement {
<vaadin-icon icon="font-awesome-brands:java"></vaadin-icon>
<table class="table">
<tr><td class="row-header">Version</td><td>${java.version}</td></tr>
<tr><td class="row-header">Vendor</td><td>${java.vendor}</td></tr>
<tr><td class="row-header">Vendor Version</td><td>${java.vendorVersion}</td></tr>
</table>
</div>
</qui-card>`;
Expand Down Expand Up @@ -151,7 +153,8 @@ export class QwcInfo extends LitElement {
_renderOptionalData(git){
if(typeof git.commit.id !== "string"){
return html`<tr><td class="row-header">Commit User</td><td>${git.commit.user.name} &lt;${git.commit.user.email}&gt;</td></tr>
<tr><td class="row-header">Commit Message</td><td>${unsafeHTML(this._replaceNewLine(git.commit.id.message.full))}</td></tr>`
<tr><td class="row-header">Commit Message</td><td>${unsafeHTML(this._replaceNewLine(git.commit.id.message.full))}</td></tr>
<tr><td class="row-header">Remote URL</td><td>${unsafeHTML(git.remote)}</td></tr>`
}
}

Expand All @@ -165,6 +168,8 @@ export class QwcInfo extends LitElement {
return html`<qui-card header="Build">
<div class="cardContent" slot="content">
<table class="table">
<tr><td class="row-header">Quarkus</td><td>${build.quarkusVersion}</td></tr>
<tr><td class="row-header">App Name</td><td>${unsafeHTML(build.name)}</td></tr>
<tr><td class="row-header">Group</td><td>${build.group}</td></tr>
<tr><td class="row-header">Artifact</td><td>${build.artifact}</td></tr>
<tr><td class="row-header">Version</td><td>${build.version}</td></tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,7 @@ public void test() {

assertNotNull(javaInfo);
assertNotNull(javaInfo.version());
assertNotNull(javaInfo.vendor());
assertNotNull(javaInfo.vendorVersion());
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
package io.quarkus.info;

/**
* This interface provides information about the Java runtime.
*
* @see io.quarkus.info.runtime.InfoRecorder
* @see io.quarkus.info.runtime.JavaInfoContributor
*/
public interface JavaInfo {

/**
* Return the Java runtime version.
*
* @return string that represent the Java version
*/
String version();

/**
* Return the Java vendor.
*
* @return string that represent the Java vendor
*/
String vendor();

/**
* Return the Java vendor runtime version.
*
* @return string that represent the Java vendor version
*/
String vendorVersion();
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ public JavaInfo get() {
public String version() {
return JavaInfoContributor.getVersion();
}

@Override
public String vendor() {
return JavaInfoContributor.getVendor();
}

@Override
public String vendorVersion() {
return JavaInfoContributor.getVendorVersion();
}
};
}
};
Expand Down
Loading