INNER CODE UNIT · TypeScript

step

akuity/kargo · ui/src/features/stage/utils/index.ts:121

  let step = Math.floor(colors.length / sortedObjects.length);
  if (step < 1) {
    step = 1;
  }
  let i = 0;
  for (const object of sortedObjects) {
    const id = object?.metadata?.name;
    if (!id || finalMap[id]) {
      continue;
    }
    finalMap[id] = colors[i];
    i = i + step;
  }
  return finalMap;
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…