Skip to content

Commit

Permalink
Merge pull request #45129 from amusarra/feature/ext-info
Browse files Browse the repository at this point in the history
Extension Info - Expose other information about Java and Git
  • Loading branch information
geoand authored Dec 16, 2024
2 parents 0997246 + b7ad29c commit e0e74f1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
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

0 comments on commit e0e74f1

Please sign in to comment.