-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
SWC-6763: integrate reworked SRC error page
- Loading branch information
Showing
11 changed files
with
96 additions
and
58 deletions.
There are no files selected for viewing
28 changes: 21 additions & 7 deletions
28
src/main/java/org/sagebionetworks/web/client/jsinterop/ErrorPageProps.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 |
---|---|---|
@@ -1,26 +1,40 @@ | ||
package org.sagebionetworks.web.client.jsinterop; | ||
|
||
import jsinterop.annotations.JsFunction; | ||
import jsinterop.annotations.JsOverlay; | ||
import jsinterop.annotations.JsPackage; | ||
import jsinterop.annotations.JsType; | ||
|
||
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") | ||
public class ErrorPageProps extends ReactComponentProps { | ||
|
||
String image; | ||
String title; | ||
String type; | ||
String message; | ||
String entityId; | ||
Double entityVersionNumber; | ||
|
||
@JsFunction | ||
public interface Callback { | ||
void run(String targetHref); | ||
} | ||
|
||
public Callback gotoPlace; | ||
|
||
@JsOverlay | ||
public static ErrorPageProps create( | ||
String image, | ||
String title, | ||
String message | ||
String type, | ||
String message, | ||
String entityId, | ||
Long entityVersion, | ||
Callback gotoPlace | ||
) { | ||
ErrorPageProps props = new ErrorPageProps(); | ||
props.image = image; | ||
props.title = title; | ||
props.type = type; | ||
props.message = message; | ||
props.entityId = entityId; | ||
props.entityVersionNumber = | ||
entityVersion != null ? entityVersion.doubleValue() : null; | ||
props.gotoPlace = gotoPlace; | ||
return props; | ||
} | ||
} |
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
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