// #r "nuget: Farmer" open Farmer open Farmer.Builders /// TimeZone let timezoneInfo = // System.TimeZoneInfo.FindSystemTimeZoneById "W. Europe Standard Time" // Germany // System.TimeZoneInfo.FindSystemTimeZoneById "Central Standard Time" // US Central time System.TimeZoneInfo.FindSystemTimeZoneById "GMT Standard Time" // UK /// Azure ARM-template dasboard that creates a clock of selected timezone let clockPart (tz:System.TimeZoneInfo): Farmer.Arm.Dashboard.LensMetadata = { ``type`` = "Extension/HubsExtension/PartType/ClockPart" settings = {| content = {| settings = {| timezoneId = tz.Id timeFormat = "HH:mm" version = 1 |} |} |} |> box inputs = [] filters = None asset = Unchecked.defaultof isAdapter = System.Nullable() defaultMenuItemId = null } /// Positins in the screen let positions : Farmer.Arm.Dashboard.LensPosition list = [ { x = 5; y = 3; colSpan = 2; rowSpan = 2 } ] let lenspart = clockPart timezoneInfo let dashboardGraph = dashboard { name "Monitoring-clock" title "Monitoring-clock" add_custom_lens({ position = positions.Head; metadata = lenspart }) } //let deployment = arm { // location deployLocation // add_resource dashboardGraph // // ... //}