github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/models/targets.ts (about) 1 import { z } from 'zod'; 2 3 const healthModel = z.enum(['up', 'down', 'unknown']); 4 const targetModel = z.object({ 5 discoveredLabels: z.record(z.string()), 6 labels: z.record(z.string()), 7 job: z.string(), 8 url: z.string(), 9 lastError: z.optional(z.string()), 10 lastScrape: z.string(), 11 lastScrapeDuration: z.string(), 12 health: healthModel, 13 }); 14 export const targetsModel = z.array(targetModel); 15 16 export type Target = z.infer<typeof targetModel>; 17 export type Health = z.infer<typeof healthModel>;