mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-30 01:32:00 +01:00
24 lines
741 B
TypeScript
24 lines
741 B
TypeScript
export type ThresholdSliderMetricType = 'cpu' | 'memory' | 'disk' | 'temperature';
|
|
|
|
const THRESHOLD_SLIDER_TEXT_CLASSES: Record<ThresholdSliderMetricType, string> = {
|
|
cpu: 'text-blue-500',
|
|
memory: 'text-green-500',
|
|
disk: 'text-amber-500',
|
|
temperature: 'text-rose-500',
|
|
};
|
|
|
|
const THRESHOLD_SLIDER_FILL_CLASSES: Record<ThresholdSliderMetricType, string> = {
|
|
cpu: 'bg-blue-500',
|
|
memory: 'bg-green-500',
|
|
disk: 'bg-amber-500',
|
|
temperature: 'bg-rose-500',
|
|
};
|
|
|
|
export function getThresholdSliderTextClass(type: ThresholdSliderMetricType): string {
|
|
return THRESHOLD_SLIDER_TEXT_CLASSES[type];
|
|
}
|
|
|
|
export function getThresholdSliderFillClass(type: ThresholdSliderMetricType): string {
|
|
return THRESHOLD_SLIDER_FILL_CLASSES[type];
|
|
}
|