Skip to content

Commit

Permalink
stub out termui renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
klauern committed Sep 19, 2015
1 parent 046c12b commit 9290cf3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wls/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"bytes"
"encoding/json"
"fmt"

ui "github.com/gizak/termui"
)

// Server is a specific Server instance deployed to the domain under the given AdminServer
Expand All @@ -23,6 +25,15 @@ type Server struct {
JvmProcessorLoad float64 `json:",omitempty"`
}

// NewWidget will create a termui widget
func (s *Server) NewWidget() ui.Bufferer {
uis := ui.NewPar(s.Name)
// TODO: add rest of stuff
ui.NewRow()
return uis
}

// GoString produces a GoString formatted for the console and a CLI interface.
func (s *Server) GoString() string {
var buffer bytes.Buffer
buffer.WriteString(fmt.Sprintf("Name: %-14v| State: %-14v| Health: %-55v\n", s.Name, s.State, s.Health))
Expand Down

0 comments on commit 9290cf3

Please sign in to comment.