seedling: Webui enhancements (#620)

* 🌱 Make sure webui starts on alpine

Also drop to shell when there are no providers

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Suppress verbose logging on tty

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Print WebUI address

Signed-off-by: mudler <mudler@c3os.io>

* 🎨 Update banner

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Refactor, display also interfaces

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Address feedback from review

Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
This commit is contained in:
Ettore Di Giacinto
2023-01-08 21:49:23 +01:00
committed by Itxaka
parent d59892c5c5
commit 667fd76d9d
6 changed files with 1128 additions and 741 deletions

View File

@@ -15,14 +15,18 @@ func PrintText(f string, banner string) {
f)
}
func ClearScreen() {
fmt.Print("\033c")
}
func PrintBranding(b []byte) {
brandingFile := kairos.BrandingFile("banner")
if _, err := os.Stat(brandingFile); err == nil {
f, err := os.ReadFile(brandingFile)
if err == nil {
fmt.Println(string(f))
return
}
}
utils.PrintBanner(b)
}