File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
components/ProgressViewer/i18n
containers/Tenant/Diagnostics/TenantOverview/TenantStorage Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "value_of_capacity" : " {{value}} of {{capacity}}" ,
3- "no-data" : " no data"
3+ "no-data" : " No data"
44}
Original file line number Diff line number Diff line change @@ -38,11 +38,10 @@ export function ProgressWrapper({
3838 return < div className = { className } > { i18n ( 'alert_no-data' ) } </ div > ;
3939 }
4040
41- if ( numericCapacity <= 0 && capacity !== undefined ) {
42- return < div className = { className } > { i18n ( 'alert_no-data' ) } </ div > ;
43- }
44-
45- const rawPercentage = Math . floor ( ( numericValue / numericCapacity ) * MAX_PERCENTAGE ) ;
41+ const rawPercentage =
42+ numericCapacity > 0
43+ ? Math . floor ( ( numericValue / numericCapacity ) * MAX_PERCENTAGE )
44+ : MAX_PERCENTAGE ;
4645 const fillWidth = Math . max ( MIN_PERCENTAGE , rawPercentage ) ;
4746 const clampedFillWidth = Math . min ( fillWidth , MAX_PERCENTAGE ) ;
4847
@@ -54,7 +53,7 @@ export function ProgressWrapper({
5453 } , [ formatValues , value , capacity ] ) ;
5554
5655 const displayText = React . useMemo ( ( ) => {
57- if ( ! isNumeric ( numericCapacity ) || numericCapacity <= 0 ) {
56+ if ( numericCapacity <= 0 ) {
5857 return String ( valueText ) ;
5958 }
6059 return i18n ( 'value_of_capacity' , { value : valueText , capacity : capacityText } ) ;
You can’t perform that action at this time.
0 commit comments