perfdata_for: type: value -> label
This commit is contained in:
parent
27d4db6782
commit
21031daf8e
|
@ -97,12 +97,11 @@ module NSCA
|
||||||
end
|
end
|
||||||
|
|
||||||
def perfdata_for label
|
def perfdata_for label
|
||||||
if value.is_a? PerformanceData::Base
|
if label.is_a? PerformanceData::Base
|
||||||
label
|
label
|
||||||
else
|
else
|
||||||
perfdata_label = perfdata_label.to_sym
|
perfdata_label = perfdata_label.to_sym
|
||||||
cl = self.class.perfdatas[perfdata_label]
|
self.class.perfdatas[perfdata_label] || PerformanceData::Base.new( perfdata_label)
|
||||||
cl || PerformanceData::Base.new( perfdata_label)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue