Skip to content

Commit f2a3517

Browse files
authored
Add Light and Dark url's for Grafana to the index page (#304)
* light and dark mode url links * fix the set key
1 parent 2d16c08 commit f2a3517

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

prometheus-ksonnet/lib/config.libsonnet

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
// Overrides for the nginx frontend for all these services.
1010
admin_services: std.prune([
1111
{
12-
title: 'Grafana',
12+
title: 'Grafana (Light)',
1313
path: 'grafana',
14-
params: '/?search=open',
14+
params: '/?search=open&theme=light',
15+
url: 'http://grafana.%(namespace)s.svc.%(cluster_dns_suffix)s/' % $._config,
16+
allowWebsockets: true,
17+
},
18+
{
19+
title: 'Grafana (Dark)',
20+
path: 'grafana',
21+
params: '/?search=open&theme=dark',
1522
url: 'http://grafana.%(namespace)s.svc.%(cluster_dns_suffix)s/' % $._config,
1623
allowWebsockets: true,
1724
},

prometheus-ksonnet/lib/nginx.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
local vars = {
4646
location_stanzas: [
4747
buildLocation(service)
48-
for service in $._config.admin_services
48+
for service in std.set($._config.admin_services, function(s) s.url)
4949
],
5050
locations: std.join('\n', self.location_stanzas),
5151
link_stanzas: [

0 commit comments

Comments
 (0)