Skip to content

Commit

Permalink
Makefile and variables changes
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Collins <[email protected]>

panels and legends updates

Signed-off-by: Andrew Collins <[email protected]>
  • Loading branch information
afcollins committed Sep 18, 2024
1 parent 3f5a386 commit 3996873
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ format: deps

build: deps $(LIBRARY_PATH) $(outputs)

clean:
clean-all:
@echo "Cleaning up"
rm -rf $(ALLDIRS) $(TEMPLATESDIR)/vendor

clean:
@echo "Cleaning up"
rm -rf $(OUTPUTDIR)

$(BINDIR)/jsonnet:
@echo "Downloading jsonnet binary"
curl -s -L $(JSONNET) | tar xz -C $(BINDIR)
Expand Down
13 changes: 13 additions & 0 deletions assets/ocp-performance/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,21 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
+ options.legend.withShowLegend(true)
+ options.legend.withCalcs([
'mean',
'min',
'max',
])
+ options.legend.withSortBy('Max')
+ options.legend.withSortDesc(true)
+ options.legend.withPlacement('bottom'),

genericLegendCounter(title, unit, targets, gridPos):
self.generic(title, unit, targets, gridPos)
+ options.legend.withShowLegend(true)
+ options.legend.withCalcs([
'first',
'min',
'max',
'last',
])
+ options.legend.withSortBy('Max')
+ options.legend.withSortDesc(true)
Expand Down
3 changes: 1 addition & 2 deletions assets/ocp-performance/variables.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ local var = g.dashboard.variable;

{
datasource:
var.datasource.new('datasource', 'prometheus')
+ var.datasource.withRegex('/^Cluster Prometheus$/'),
var.datasource.new('datasource', 'prometheus'),

master_node:
var.query.new('_master_node')
Expand Down

0 comments on commit 3996873

Please sign in to comment.