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.
- data/.gitignore +10 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -15
- data/Gemfile.lock +44 -42
- data/README.md +123 -49
- data/Rakefile +16 -26
- data/bin/visage-app +17 -4
- data/features/cli.feature +10 -3
- data/features/json.feature +37 -0
- data/features/step_definitions/{visage_steps.rb → cli_steps.rb} +1 -1
- data/features/step_definitions/json_steps.rb +50 -8
- data/features/step_definitions/site_steps.rb +1 -1
- data/features/support/config/default/profiles.yaml +335 -0
- data/features/{data → support}/config/with_no_profiles/.stub +0 -0
- data/features/support/config/with_no_profiles/profiles.yaml +0 -0
- data/features/support/config/with_old_profile_yaml/profiles.yaml +116 -0
- data/features/support/env.rb +2 -3
- data/lib/visage-app.rb +35 -25
- data/lib/visage-app/collectd/json.rb +115 -118
- data/lib/visage-app/collectd/rrds.rb +25 -19
- data/lib/visage-app/helpers.rb +17 -0
- data/lib/visage-app/profile.rb +18 -25
- data/lib/visage-app/public/images/caution.png +0 -0
- data/lib/visage-app/public/images/ok.png +0 -0
- data/lib/visage-app/public/images/questions.png +0 -0
- data/lib/visage-app/public/javascripts/builder.js +607 -0
- data/lib/visage-app/public/javascripts/graph.js +179 -142
- data/lib/visage-app/public/javascripts/message.js +520 -0
- data/lib/visage-app/public/javascripts/mootools-core-1.4.0-full-compat.js +6285 -0
- data/lib/visage-app/public/javascripts/mootools-more-1.4.0.1.js +6399 -0
- data/lib/visage-app/public/stylesheets/message.css +61 -0
- data/lib/visage-app/public/stylesheets/screen.css +149 -38
- data/lib/visage-app/version.rb +5 -0
- data/lib/visage-app/views/builder.haml +38 -49
- data/lib/visage-app/views/builder_form.haml +14 -0
- data/lib/visage-app/views/layout.haml +5 -2
- data/lib/visage-app/views/profile.haml +44 -25
- data/visage-app.gemspec +29 -132
- metadata +93 -150
- data/VERSION +0 -1
- data/features/builder.feature +0 -16
- data/lib/visage-app/collectd/profile.rb +0 -36
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.0
|
data/features/builder.feature
DELETED
@@ -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
|