Support per-service stats control

This commit is contained in:
shamoon 2023-04-07 20:16:35 -07:00
parent 1a374dec3c
commit 7e012993d8
2 changed files with 7 additions and 5 deletions

View file

@ -236,6 +236,7 @@ export function cleanServiceGroups(groups) {
name: serviceGroup.name,
services: serviceGroup.services.map((service) => {
const cleanedService = { ...service };
if (cleanedService.showStats !== undefined) cleanedService.showStats = JSON.parse(cleanedService.showStats);
if (typeof service.weight === 'string') {
const weight = parseInt(service.weight, 10);
if (Number.isNaN(weight)) {