fix(package): behave with missing thresholds object
This commit is contained in:
parent
0317d6a862
commit
01686b8e60
@ -99,10 +99,10 @@ export default class Plan {
|
|||||||
this._excludedHosts = excludedHosts
|
this._excludedHosts = excludedHosts
|
||||||
this._thresholds = {
|
this._thresholds = {
|
||||||
cpu: {
|
cpu: {
|
||||||
critical: numberOrDefault(thresholds.cpu, DEFAULT_CRITICAL_THRESHOLD_CPU)
|
critical: numberOrDefault(thresholds && thresholds.cpu, DEFAULT_CRITICAL_THRESHOLD_CPU)
|
||||||
},
|
},
|
||||||
memoryFree: {
|
memoryFree: {
|
||||||
critical: numberOrDefault(thresholds.memoryFree, DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE) * 1024
|
critical: numberOrDefault(thresholds && thresholds.memoryFree, DEFAULT_CRITICAL_THRESHOLD_MEMORY_FREE) * 1024
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user