Exemple #1
0
func doUI(client *rest.Client, url string, logger *log.Logger) error {
	app := ui.NewApp(client, url)
	app.SetLogger(logger)

	app.Run()
	return nil
}
Exemple #2
0
func doUI(client *rest.Client, url string, logger *log.Logger) error {
	app := ui.NewApp(client, url)
	app.SetLogger(logger)

	if e := topsl.AppInit(); e != nil {
		return e
	}
	app.Logf("Starting up user interface")
	topsl.SetApplication(app)
	app.ShowMain()
	// periodic updates please
	go func() {
		for {
			topsl.AppDraw()
			time.Sleep(time.Second)
		}
	}()
	topsl.RunApplication()
	return nil
}