Documentation ¶
Index ¶
Constants ¶
View Source
const ( Short = 1 Percent = 2 Bytes = 3 Time = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SparkLine ¶
type SparkLine struct { SL *ui.Sparkline `json:"-"` From string `json:"from"` DataType int `json:"type"` Title string `json:"title"` TitleColor ui.Attribute `json:"titlecolor"` Where string `json:"where"` Height int `json:"height"` LineColor ui.Attribute `json:"linecolor"` // contains filtered or unexported fields }
SparkLine is a single stat drawn using the termui sparkline.
type SparkLines ¶
type SparkLines struct { SL *ui.Sparklines `json:"-"` Lines []*SparkLine `json:"lines"` BorderLabel string `json:"borderlabel"` Border bool `json:"border"` BorderFg ui.Attribute `json:"borderfg"` BorderBg ui.Attribute `json:"borderbg"` BorderLeft bool `json:borderleft"` BorderRight bool `json:"borderright"` BorderTop bool `json:"bordertop"` BorderBottom bool `json:"borderbottom"` BorderLabelFg ui.Attribute `json:"borderlabelfg"` BorderLabelBg ui.Attribute `json:"borderlabelbg"` Display bool `json:"display"` Bg ui.Attribute `json:"bg"` Width int `json:"width"` Height int `json:"height"` PaddingTop int `json:"paddingtop"` PaddingBottom int `json:"paddingbottom"` PaddingLeft int `json:"paddingleft"` PaddingRight int `json:"paddingright"` }
SparkLines is a collection of sparklines that can have extra ui attributes.
func NewSparkLines ¶
func NewSparkLines(db DB.DBI, s *SparkLines) *SparkLines
NewSparkLines builds a new sparkline from a partial build sparkline which should come from parsing a json dashboard.
func (*SparkLines) Update ¶
func (s *SparkLines) Update(time TS.TimeSelect)
Update will update all the data associated to the sparklines
Click to show internal directories.
Click to hide internal directories.