20 lines
612 B
TypeScript
20 lines
612 B
TypeScript
import type { RebalanceMove, RebalanceRun } from '$lib/rebalancing.js';
|
|
|
|
export const rebalanceRunLabels: Record<RebalanceRun['state'], string> = {
|
|
running: 'In progress',
|
|
stopping: 'Stopping',
|
|
done: 'Finished',
|
|
stopped: 'Stopped',
|
|
failed: 'Needs attention'
|
|
};
|
|
export const rebalanceMoveLabels: Record<RebalanceMove['state'], string> = {
|
|
planned: 'Not started',
|
|
moving: 'Moving',
|
|
done: 'Completed',
|
|
skipped: 'Skipped',
|
|
failed: 'Needs attention'
|
|
};
|
|
export function rebalanceRunHref(id: string) {
|
|
return `/capacity?rebalance=1&rebalanceRun=${encodeURIComponent(id)}`;
|
|
}
|