multispark

package
v0.0.0-...-a321ef9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2016 License: MIT Imports: 10 Imported by: 0

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 MultiSpark

type MultiSpark struct {
	From  string `json:"from"`
	Where string `json:"where"`

	SL.SparkLines

	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"`
	AutoColor     bool         `json:"autocolor"`
	DataType      int          `json:"type"`
	LineColor     ui.Attribute `json:"linecolor"`
	TitleColor    ui.Attribute `json:"titlecolor"`
	// contains filtered or unexported fields
}

MultiSpark is a collection of sparklines generated based on tags from an influxdb query.

func NewMultiSpark

func NewMultiSpark(db DB.DBI, ms *MultiSpark) *MultiSpark

NewMultiSpark builds a multispark from a partial multispark that has been generated from a json dashboard.

func (*MultiSpark) SetDataAndTitle

func (s *MultiSpark) SetDataAndTitle(time string, groupBy string)

SetDatAndTitle will update all the data for all sparklines in the multispark.

func (*MultiSpark) Update

func (s *MultiSpark) Update(time TS.TimeSelect)

Update a multispark will requery influxdb to update the sparklines.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL