@@ -66,17 +66,17 @@ angular.module("openshiftConsole")
66
66
// computeResource - 'cpu' or 'memory'
67
67
// defaultType - 'defaultRequest' or 'defaultLimit'
68
68
// limitRanges - collection of LimitRange objects (hash or array)
69
- var hasDefault = function ( computeResource , defaultType , limitRanges ) {
70
- var effectiveLimits = LimitRangesService . getEffectiveLimitRange ( limitRanges , computeResource , 'Container' ) ;
69
+ var hasDefault = function ( computeResource , defaultType , limitRanges , project ) {
70
+ var effectiveLimits = LimitRangesService . getEffectiveLimitRange ( limitRanges , computeResource , 'Container' , project ) ;
71
71
return ! ! effectiveLimits [ defaultType ] ;
72
72
} ;
73
73
74
- var hasDefaultRequest = function ( computeResource , limitRanges ) {
75
- return hasDefault ( computeResource , 'defaultRequest' , limitRanges ) ;
74
+ var hasDefaultRequest = function ( computeResource , limitRanges , project ) {
75
+ return hasDefault ( computeResource , 'defaultRequest' , limitRanges , project ) ;
76
76
} ;
77
77
78
- var hasDefaultLimit = function ( computeResource , limitRanges ) {
79
- return hasDefault ( computeResource , 'defaultLimit' , limitRanges ) ;
78
+ var hasDefaultLimit = function ( computeResource , limitRanges , project ) {
79
+ return hasDefault ( computeResource , 'defaultLimit' , limitRanges , project ) ;
80
80
} ;
81
81
82
82
// Is the corresponding limit value set to calculate a request?
@@ -91,7 +91,7 @@ angular.module("openshiftConsole")
91
91
92
92
// Check if the corresponding limit is set or defaulted.
93
93
return hasLimitSet ( limitComputeResource , containers ) ||
94
- hasDefaultLimit ( limitComputeResource , limitRanges ) ;
94
+ hasDefaultLimit ( limitComputeResource , limitRanges , project ) ;
95
95
} ;
96
96
97
97
// Checks if a CPU request is currently set or will be defaulted for any
@@ -105,7 +105,7 @@ angular.module("openshiftConsole")
105
105
return true ;
106
106
}
107
107
108
- if ( hasDefaultRequest ( 'cpu' , limitRanges ) ) {
108
+ if ( hasDefaultRequest ( 'cpu' , limitRanges , project ) ) {
109
109
return true ;
110
110
}
111
111
0 commit comments