Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Link headers in reports to original graphs on graphiti

Requires setting of `graphiti_base_url` in settings.yml
  • Loading branch information...
commit 050c21afd3218f0ad3abbaa7696ad7839cfb3263 1 parent d0c020c
@quirkey quirkey authored
View
1  config/settings.yml.example
@@ -1,4 +1,5 @@
---
+graphiti_base_url: http://graphiti.pp.local
graphite_base_url: http://graphite01.pp.local
#graphite_base_url: https://user:pass@graphite01.pp.local
redis_url: localhost:6379:1/graphiti
View
2  graphiti.rb
@@ -12,11 +12,11 @@
require 'compass'
require 'typhoeus'
require 'yajl'
+require 'redised'
require 'digest/sha1'
require './lib/s3/request'
require './lib/s3/signature'
-require './lib/redised'
require './lib/metric'
require './lib/graph'
View
2  lib/dashboard.rb
@@ -82,7 +82,7 @@ def self.snapshot_graphs(slug)
if dashboard
dashboard['graphs'].each do |graph|
url = Graph.snapshot(graph['uuid'])
- snapshots << [graph['title'], url] if url
+ snapshots << [graph['uuid'], graph['title'], url] if url
end
end
snapshots
View
5 views/report.haml
@@ -1,7 +1,8 @@
%h1== Graphiti Report for #{dashboard['title']} #{time}
%hr/
-- graphs.each do |title, url|
- %h3= title
+- graphs.each do |uuid, title, url|
+ %h3
+ %a{href: "#{Graphiti.settings.graphiti_base_url}/graphs/#{uuid}"}= title
%img{src: url, alt: title}/
%hr/
Please sign in to comment.
Something went wrong with that request. Please try again.