Inform users about the newly available Corda training programs at startup and in the docsite.

This commit is contained in:
Mike Hearn
2017-02-28 16:29:21 +01:00
parent df6b9add6e
commit cc61be5b6a
4 changed files with 18 additions and 6 deletions

View File

@ -164,14 +164,21 @@ private fun drawBanner() {
// This line makes sure ANSI escapes work on Windows, where they aren't supported out of the box.
AnsiConsole.systemInstall()
val (msg1, msg2) = Emoji.renderIfSupported { messageOfTheDay() }
Emoji.renderIfSupported {
val (msg1, msg2) = messageOfTheDay()
println(Ansi.ansi().fgBrightRed().a(
println(Ansi.ansi().fgBrightRed().a(
"""
______ __
/ ____/ _________/ /___ _
/ / __ / ___/ __ / __ `/ """).fgBrightBlue().a(msg1).newline().fgBrightRed().a(
"/ /___ /_/ / / / /_/ / /_/ / ").fgBrightBlue().a(msg2).newline().fgBrightRed().a(
"""\____/ /_/ \__,_/\__,_/""").reset().newline().newline().fgBrightDefault().bold().
a("--- DEVELOPER SNAPSHOT ------------------------------------------------------------").newline().reset())
a("--- MILESTONE 9 -------------------------------------------------------------------").
newline().
newline().
a("${Emoji.books}New! ").reset().a("Training now available worldwide, see https://corda.net/corda-training/").
newline().
reset())
}
}

View File

@ -3,7 +3,7 @@ package net.corda.node.utilities
import net.corda.core.utilities.Emoji.CODE_GREEN_TICK
import net.corda.core.utilities.Emoji.CODE_NO_ENTRY
import net.corda.core.utilities.Emoji.CODE_RIGHT_ARROW
import net.corda.core.utilities.Emoji.SKULL_AND_CROSSBONES
import net.corda.core.utilities.Emoji.CODE_SKULL_AND_CROSSBONES
import net.corda.core.utilities.ProgressTracker
import net.corda.node.utilities.ANSIProgressRenderer.progressTracker
import org.apache.logging.log4j.LogManager
@ -128,7 +128,8 @@ object ANSIProgressRenderer {
var newLinesDrawn = 1 + pt.renderLevel(ansi, 0, error != null)
if (error != null) {
ansi.a("$SKULL_AND_CROSSBONES $error")
// TODO: This should be using emoji only on supported platforms.
ansi.a("$CODE_SKULL_AND_CROSSBONES $error")
ansi.eraseLine(Ansi.Erase.FORWARD)
ansi.newline()
newLinesDrawn++