Mailinglist Archive: yast-commit (1914 mails)

< Previous Next >
[yast-commit] <web-client> basesystem : tests limits for beeing nil
  • From: Bjoern Geuken <bgeuken@xxxxxxx>
  • Date: Wed, 2 Sep 2009 15:48:58 +0200
  • Message-id: <E1Mlexk-0003ph-Uv@xxxxxxxxxxxxxxxx>
ref: refs/heads/basesystem
commit 63c4a7b1f3b794f880078526f8a3a0101e461991
Author: Bjoern Geuken <bgeuken@xxxxxxx>
Date: Wed Sep 2 15:48:58 2009 +0200

tests limits for beeing nil
---
.../status/app/controllers/status_controller.rb | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/plugins/status/app/controllers/status_controller.rb
b/plugins/status/app/controllers/status_controller.rb
index 2199e66..2178362 100644
--- a/plugins/status/app/controllers/status_controller.rb
+++ b/plugins/status/app/controllers/status_controller.rb
@@ -20,10 +20,13 @@ class StatusController < ApplicationController
count = 0
data_list = label.map{ |v| count+=1; [count,v.to_f/divisor]}
@data_group[group].merge!({metric_name => data_list})
- count = 0
#TODO: implement maximum and minimum format
- @limits_list[label].merge!({:min => limits["min"].map{ |l| count+=1;
[count,l.to_f/divisor]}} if limits["min"]
- @limits_list[label].merge!({:max => limits["max"].map{ |l| count+=1;
[count,l.to_f/divisor]}} if limits["max"]
+ if limits
+ count = 0
+ @limits_list[label] = Hash.new
+ @limits_list[label].merge!({:min => limits["min"].map{ |l| count+=1;
[count,l.to_f/divisor]}}) if limits["min"]
+ @limits_list[label].merge!({:max => limits["max"].map{ |l| count+=1;
[count,l.to_f/divisor]}}) if limits["max"]
+ end
# @data["/#{group}/#{metric_name}/..."] = data_list
end

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages