grafana / jsonnet-libs

Grafana Labs' Jsonnet libraries
Other
633 stars 160 forks source link

Add support for empty lists in commonlib.variables generation #1352

Closed v-zhuravlev closed 3 weeks ago

v-zhuravlev commented 3 weeks ago

Add support for empty lists commonlib.variables generation, for example:

      useCluster:
        commonlib.variables.new(
          filteringSelector=this.config.filteringSelector,
          // drop clusterLabel from groupLabels:
          groupLabels=[],
          instanceLabels=[],
          varMetric='instance:node_cpu_utilisation:rate5m',
          customAllValue='.+',
        ),