Changeset 48301
- Timestamp:
- 07/04/2020 07:54:39 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/site-health.js
r48297 r48301 85 85 86 86 if ( 'critical' === issue.status ) { 87 heading = sprintf( _n( '%s critical issue', '%s critical issues', count ), '<span class="issue-count">' + count + '</span>' ); 87 heading = sprintf( 88 _n( '%s critical issue', '%s critical issues', count ), 89 '<span class="issue-count">' + count + '</span>' 90 ); 88 91 } else if ( 'recommended' === issue.status ) { 89 heading = sprintf( _n( '%s recommended improvement', '%s recommended improvements', count ), '<span class="issue-count">' + count + '</span>' ); 92 heading = sprintf( 93 _n( '%s recommended improvement', '%s recommended improvements', count ), 94 '<span class="issue-count">' + count + '</span>' 95 ); 90 96 } else if ( 'good' === issue.status ) { 91 heading = sprintf( _n( '%s item with no issues detected', '%s items with no issues detected', count ), '<span class="issue-count">' + count + '</span>' ); 97 heading = sprintf( 98 _n( '%s item with no issues detected', '%s items with no issues detected', count ), 99 '<span class="issue-count">' + count + '</span>' 100 ); 92 101 } 93 102 … … 110 119 var $progressLabel = $( '.site-health-progress-label', $wrapper ); 111 120 var $circle = $( '.site-health-progress svg #bar' ); 112 var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); 113 var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); 121 var totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + 122 parseInt( SiteHealth.site_status.issues.recommended, 0 ) + 123 ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); 124 var failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + 125 ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 ); 114 126 var val = 100 - Math.ceil( ( failedTests / totalTests ) * 100 ); 115 127
Note: See TracChangeset
for help on using the changeset viewer.