forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#42171 from phillip-kruger/not-found-cont…
…ribution Allow extensions to contribute actions to the error page
- Loading branch information
Showing
9 changed files
with
106 additions
and
15 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
core/runtime/src/main/java/io/quarkus/runtime/ErrorPageAction.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,5 @@ | ||
package io.quarkus.runtime; | ||
|
||
public record ErrorPageAction(String name, String url) { | ||
|
||
} |
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
19 changes: 19 additions & 0 deletions
19
core/runtime/src/main/resources/META-INF/template-html-builder.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
.../deployment/src/main/java/io/quarkus/vertx/http/deployment/ErrorPageActionsBuildItem.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,29 @@ | ||
package io.quarkus.vertx.http.deployment; | ||
|
||
import java.util.List; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
import io.quarkus.runtime.ErrorPageAction; | ||
|
||
/** | ||
* Allows extensions to contribute an action (button) to the error page | ||
*/ | ||
public final class ErrorPageActionsBuildItem extends MultiBuildItem { | ||
private final List<ErrorPageAction> actions; | ||
|
||
public ErrorPageActionsBuildItem(String name, String url) { | ||
this(new ErrorPageAction(name, url)); | ||
} | ||
|
||
public ErrorPageActionsBuildItem(ErrorPageAction errorPageAction) { | ||
this(List.of(errorPageAction)); | ||
} | ||
|
||
public ErrorPageActionsBuildItem(List<ErrorPageAction> errorPageAction) { | ||
this.actions = errorPageAction; | ||
} | ||
|
||
public List<ErrorPageAction> getActions() { | ||
return actions; | ||
} | ||
} |
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
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
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