-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hapifhir/org.hl7.fhir.val…
- Loading branch information
Showing
26 changed files
with
760 additions
and
43 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package api | ||
|
||
import io.ktor.client.* | ||
import io.ktor.client.features.json.* | ||
import io.ktor.client.features.json.serializer.* | ||
import kotlinx.browser.window | ||
import kotlinx.serialization.json.Json | ||
|
||
val endpoint = window.location.origin + "/" // only needed until https://github.com/ktorio/ktor/issues/1695 is resolved | ||
|
||
val jsonClient = HttpClient { | ||
install(JsonFeature) { | ||
serializer = KotlinxSerializer(kotlinx.serialization.json.Json { | ||
prettyPrint = true | ||
isLenient = true | ||
ignoreUnknownKeys = true | ||
useArrayPolymorphism = true | ||
}) | ||
} | ||
} |
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,14 @@ | ||
package api | ||
|
||
import constants.PACKAGES_SERVER_STATUS_ENDPOINT | ||
import constants.TX_SERVER_STATUS_ENDPOINT | ||
import io.ktor.client.request.* | ||
|
||
suspend fun isTerminologyServerUp(): Boolean { | ||
return jsonClient.get(urlString = endpoint + TX_SERVER_STATUS_ENDPOINT) | ||
} | ||
|
||
suspend fun isPackagesServerUp(): Boolean { | ||
return jsonClient.get(urlString = endpoint + PACKAGES_SERVER_STATUS_ENDPOINT) | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
package ui.components.footer | ||
|
||
import Polyglot | ||
import css.const.BORDER_GRAY | ||
import css.const.WHITE | ||
import css.text.TextStyle | ||
import kotlinx.css.* | ||
import model.AppScreen | ||
import react.* | ||
import styled.* | ||
import utils.Language | ||
|
||
external interface FooterProps : RProps { | ||
var language: Language //TODO | ||
var polyglot: Polyglot //TODO | ||
} | ||
|
||
class Footer : RComponent<FooterProps, RState>() { | ||
|
||
override fun RBuilder.render() { | ||
styledFooter { | ||
css { | ||
+FooterStyle.footerContainer | ||
} | ||
styledDiv { | ||
css { | ||
+FooterStyle.footerColumn | ||
} | ||
styledSpan { | ||
css { | ||
+FooterStyle.footerTitleLarge | ||
} | ||
+"validator-wrapper" | ||
} | ||
styledSpan { | ||
css { | ||
+FooterStyle.footerTitleSmall | ||
} | ||
+"running validator v5.4.3" | ||
} | ||
} | ||
styledDiv { | ||
css { | ||
+FooterStyle.footerColumn | ||
} | ||
footerLineItem { | ||
href = "https://github.com/hapifhir/org.hl7.fhir.validator-wrapper" | ||
icon = "images/github_white.png" | ||
label = "view project on github" | ||
} | ||
footerLineItem { | ||
href = "https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/issues/new/choose" | ||
icon = "images/bug_report_white.png" | ||
label = "log an issue with the team" | ||
} | ||
footerLineItem { | ||
href = | ||
"https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/releases/latest/download/validator_cli.jar" | ||
icon = "images/download_white.png" | ||
label = "download the latest cli" | ||
} | ||
} | ||
styledDiv { | ||
css { | ||
+FooterStyle.footerColumn | ||
} | ||
footerLineItem { | ||
href = "https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator" | ||
icon = "images/documentation_white.png" | ||
label = "view the validator documentation" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Convenience method for instantiating the component. | ||
*/ | ||
fun RBuilder.footer(handler: FooterProps.() -> Unit): ReactElement { | ||
return child(Footer::class) { | ||
this.attrs(handler) | ||
} | ||
} | ||
|
||
/** | ||
* CSS | ||
*/ | ||
object FooterStyle : StyleSheet("FooterStyle", isStatic = true) { | ||
private val FOOTER_HEIGHT = 200.px | ||
val footerContainer by css { | ||
display = Display.flex | ||
flexDirection = FlexDirection.row | ||
width = 100.pct | ||
height = FOOTER_HEIGHT | ||
backgroundColor = BORDER_GRAY | ||
} | ||
val footerColumn by css { | ||
width = 33.pc | ||
padding(all = 32.px) | ||
display = Display.flex | ||
flexDirection = FlexDirection.column | ||
} | ||
val footerTitleLarge by css { | ||
fontFamily = TextStyle.FONT_FAMILY_MAIN | ||
fontSize = 16.pt | ||
fontWeight = FontWeight.w800 | ||
color = WHITE | ||
} | ||
val footerTitleSmall by css { | ||
fontFamily = TextStyle.FONT_FAMILY_MAIN | ||
fontSize = 12.pt | ||
fontWeight = FontWeight.w400 | ||
color = WHITE | ||
} | ||
} |
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,75 @@ | ||
package ui.components.footer | ||
|
||
import css.const.HL7_RED | ||
import css.const.WHITE | ||
import css.text.TextStyle | ||
import kotlinx.css.* | ||
import kotlinx.css.properties.TextDecoration | ||
import react.* | ||
import styled.* | ||
|
||
external interface FooterLineItemProps : RProps { | ||
var icon: String | ||
var href: String | ||
var label: String | ||
} | ||
|
||
class FooterLineItem : RComponent<FooterLineItemProps, RState>() { | ||
|
||
override fun RBuilder.render() { | ||
styledA(href = props.href) { | ||
css { | ||
+FooterLineItemStyle.lineItem | ||
} | ||
styledImg { | ||
css { | ||
+FooterLineItemStyle.lineItemIcon | ||
} | ||
attrs { | ||
src = props.icon | ||
} | ||
} | ||
styledSpan { | ||
css { | ||
+FooterLineItemStyle.lineItemLabel | ||
} | ||
+props.label | ||
} | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Convenience method for instantiating the component. | ||
*/ | ||
fun RBuilder.footerLineItem(handler: FooterLineItemProps.() -> Unit): ReactElement { | ||
return child(FooterLineItem::class) { | ||
this.attrs(handler) | ||
} | ||
} | ||
|
||
/** | ||
* CSS | ||
*/ | ||
object FooterLineItemStyle : StyleSheet("FooterLineItemStyle", isStatic = true) { | ||
private val FOOTER_HEIGHT = 200.px | ||
val lineItem by css { | ||
display = Display.flex | ||
flexDirection = FlexDirection.row | ||
alignContent = Align.center | ||
textDecoration = TextDecoration.none | ||
margin(bottom = 6.px) | ||
} | ||
val lineItemIcon by css { | ||
alignSelf = Align.center | ||
height = 18.px | ||
} | ||
val lineItemLabel by css { | ||
fontFamily = TextStyle.FONT_FAMILY_MAIN | ||
fontSize = 12.pt | ||
margin(left = 12.px) | ||
fontWeight = FontWeight.w400 | ||
alignSelf = Align.center | ||
color = WHITE | ||
} | ||
} |
Oops, something went wrong.