visage-app 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/.gitignore +10 -0
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile +1 -15
  4. data/Gemfile.lock +44 -42
  5. data/README.md +123 -49
  6. data/Rakefile +16 -26
  7. data/bin/visage-app +17 -4
  8. data/features/cli.feature +10 -3
  9. data/features/json.feature +37 -0
  10. data/features/step_definitions/{visage_steps.rb → cli_steps.rb} +1 -1
  11. data/features/step_definitions/json_steps.rb +50 -8
  12. data/features/step_definitions/site_steps.rb +1 -1
  13. data/features/support/config/default/profiles.yaml +335 -0
  14. data/features/{data → support}/config/with_no_profiles/.stub +0 -0
  15. data/features/support/config/with_no_profiles/profiles.yaml +0 -0
  16. data/features/support/config/with_old_profile_yaml/profiles.yaml +116 -0
  17. data/features/support/env.rb +2 -3
  18. data/lib/visage-app.rb +35 -25
  19. data/lib/visage-app/collectd/json.rb +115 -118
  20. data/lib/visage-app/collectd/rrds.rb +25 -19
  21. data/lib/visage-app/helpers.rb +17 -0
  22. data/lib/visage-app/profile.rb +18 -25
  23. data/lib/visage-app/public/images/caution.png +0 -0
  24. data/lib/visage-app/public/images/ok.png +0 -0
  25. data/lib/visage-app/public/images/questions.png +0 -0
  26. data/lib/visage-app/public/javascripts/builder.js +607 -0
  27. data/lib/visage-app/public/javascripts/graph.js +179 -142
  28. data/lib/visage-app/public/javascripts/message.js +520 -0
  29. data/lib/visage-app/public/javascripts/mootools-core-1.4.0-full-compat.js +6285 -0
  30. data/lib/visage-app/public/javascripts/mootools-more-1.4.0.1.js +6399 -0
  31. data/lib/visage-app/public/stylesheets/message.css +61 -0
  32. data/lib/visage-app/public/stylesheets/screen.css +149 -38
  33. data/lib/visage-app/version.rb +5 -0
  34. data/lib/visage-app/views/builder.haml +38 -49
  35. data/lib/visage-app/views/builder_form.haml +14 -0
  36. data/lib/visage-app/views/layout.haml +5 -2
  37. data/lib/visage-app/views/profile.haml +44 -25
  38. data/visage-app.gemspec +29 -132
  39. metadata +93 -150
  40. data/VERSION +0 -1
  41. data/features/builder.feature +0 -16
  42. data/lib/visage-app/collectd/profile.rb +0 -36
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.0
@@ -1,16 +0,0 @@
1
- Feature: Build profiles
2
- To find out how particular systems are performing
3
- A user
4
- Must be able to select a host
5
- And some metrics
6
- And see a page of graphs
7
-
8
- Scenario: Build a simple profile
9
- When I go to /builder
10
- And I fill in "hosts" with "*"
11
- And I fill in "metrics" with "*"
12
- And I press "metrics"
13
- And I fill in "profile_name" with "all on all"
14
- And I press "create"
15
- Then I should see a list of graphs
16
- And I should see a profile heading
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'yaml'
4
- require 'ostruct'
5
-
6
- class CollectdProfile
7
-
8
- def initialize(opts={})
9
- @profile = opts[:profile]
10
- end
11
-
12
- class << self
13
-
14
- attr_accessor :profiles
15
-
16
- def get(id)
17
- id.gsub!(/\s+/, '+')
18
- if found = @profiles.find {|p| p[1]["splat"] == id }
19
- OpenStruct.new(found[1])
20
- else
21
- nil
22
- end
23
- end
24
-
25
- def all
26
- # here be ugliness
27
- profiles = @profiles.to_a.sort_by { |profile|
28
- profile[1]["order"]
29
- }.map { |profile|
30
- OpenStruct.new(profile[1].merge({'name' => profile[0]}))
31
- }
32
- end
33
-
34
- end
35
-
36
- end