fix(system-hub): Add missing renderHealthGauge method
- TypeError: this.renderHealthGauge is not a function - Added renderHealthGauge method to render health score gauge - Takes score, scoreClass, scoreLabel parameters - Displays score/100, label, and progress bar with appropriate styling Method creates: - Health score display (e.g., 85/100) - Status label (Excellent/Good/Warning/Critical) - Progress bar with color-coded fill based on health class
This commit is contained in:
parent
3841e1f1b4
commit
941308c596
@ -88,6 +88,22 @@ return view.extend({
|
||||
]);
|
||||
},
|
||||
|
||||
renderHealthGauge: function(score, scoreClass, scoreLabel) {
|
||||
return E('div', { 'class': 'sh-health-gauge sh-health-' + scoreClass }, [
|
||||
E('div', { 'class': 'sh-health-score' }, [
|
||||
E('span', { 'class': 'sh-health-score-value' }, score),
|
||||
E('span', { 'class': 'sh-health-score-max' }, '/100')
|
||||
]),
|
||||
E('div', { 'class': 'sh-health-label' }, scoreLabel),
|
||||
E('div', { 'class': 'sh-health-progress' }, [
|
||||
E('div', {
|
||||
'class': 'sh-health-progress-fill sh-health-progress-' + scoreClass,
|
||||
'style': 'width: ' + score + '%'
|
||||
})
|
||||
])
|
||||
]);
|
||||
},
|
||||
|
||||
renderStatsOverview: function() {
|
||||
var score = this.healthData.score || 0;
|
||||
var scoreClass = score >= 80 ? 'excellent' : (score >= 60 ? 'good' : (score >= 40 ? 'warning' : 'critical'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user