K-Phoen / grabana

User-friendly Go library for building Grafana dashboards
MIT License
680 stars 69 forks source link

DefaultAll method for variable/custom #237

Closed rifler closed 8 months ago

rifler commented 9 months ago

Current behaviour

dashboard.VariableAsCustom(
  "env",
  custom.Values(podEnvsMap),
  custom.IncludeAll(),
  custom.AllValue(".*"),
  custom.Default("$__all"),
)

Expected behaviour

dashboard.VariableAsCustom(
  "env",
  custom.Values(podEnvsMap),
  custom.IncludeAll(),
  custom.AllValue(".*"),
  custom.DefaultAll,
)