in cli/commands/sensor.go [96:118]
func (cmd *Sensor) list(application, entity string) {
sensors, err := entity_sensors.SensorList(cmd.network, application, entity)
if nil != err {
error_handler.ErrorExit(err)
}
var theSensors sensorList = sensors
table := terminal.NewTable([]string{"Name", "Description", "Value"})
sort.Sort(theSensors)
for _, sensor := range theSensors {
value, err := entity_sensors.SensorValue(cmd.network, application, entity, sensor.Name)
if nil != err {
error_handler.ErrorExit(err)
}
displayValue, err := stringRepresentation(value)
if nil != err {
error_handler.ErrorExit(err)
}
table.Add(sensor.Name, sensor.Description, displayValue)
}
table.Print()
}