Skip to content

Commit

Permalink
feat: code quality corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpearsonHO committed Sep 17, 2024
1 parent 9ad3e5c commit ef5fae6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ local createDocsTextPanel(dashboardName) =
// Creates a common set of Grafana dashboard tags for dashboard discovery.
// @param config The global config for the product having its standard tags created.
// @returns string of comma seperated dashboard tags.
local createDashboardTags(config) =
"product:%(product)s,owner:%(owner)s,mac-version:%(macVersion)s" % {
product: config.product,
owner: config.owner,
macVersion: config.macVersion,
local createDashboardTags(config) =
'product:%(product)s,owner:%(owner)s,mac-version:%(macVersion)s' % {
product: config.product,
owner: config.owner,
macVersion: config.macVersion,
};

// Creates the description for an SLI
Expand Down
4 changes: 2 additions & 2 deletions monitoring-as-code/src/dashboards/detail-dashboard.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// what the service is doing

// MaC imports
local stringFormattingFunctions = import '../util/string-formatting-functions.libsonnet';
local macConfig = import '../mac-config.libsonnet';
local stringFormattingFunctions = import '../util/string-formatting-functions.libsonnet';
local dashboardFunctions = import './dashboard-standard-elements.libsonnet';

// Grafana imports
Expand Down Expand Up @@ -301,7 +301,7 @@ local createDetailDashboard(journeyKey, config, links, sliSpecList) =
dashboard.new(
title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product, journeyKey, 'detail'])),
uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product, journeyKey, 'detail']),
tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['journey:'+journeyKey, 'view:detail'],
tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['journey:' + journeyKey, 'view:detail'],
schemaVersion=18,
editable=true,
time_from='now-3h',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ local createJourneyDashboards(config, sliList, links) =
dashboard.new(
title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product, journeyKey])),
uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product, journeyKey]),
tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['journey:'+journeyKey, 'view:journey'],
tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['journey:' + journeyKey, 'view:journey'],
schemaVersion=18,
editable=true,
time_from='now-3h',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ local createProductDashboard(config, sliList, links) =
dashboard.new(
title=stringFormattingFunctions.capitaliseFirstLetters(std.join(' / ', [macConfig.macDashboardPrefix.title, config.product])),
uid=std.join('-', [macConfig.macDashboardPrefix.uid, config.product]),
tags=std.split(dashboardFunctions.createDashboardTags(config), ",") + ['view:product'],
tags=std.split(dashboardFunctions.createDashboardTags(config), ',') + ['view:product'],
schemaVersion=18,
editable=true,
time_from='now-3h',
Expand Down

0 comments on commit ef5fae6

Please sign in to comment.