layouts/shortcodes/cloud_regions.html
{{ $type := .Get "type" | default "table" }} {{ $scratch := newScratch }} {{ if eq $type "table"}} {{ range .Site.Data.influxdb_urls.cloud.providers }} {{ $scratch.Set "title" .name }} {{ if not (in .name .short_name) }} {{ $scratch.Set "title" (print .name " (" .short_name ")")}} {{ end }} {{ $title := $scratch.Get "title" }} {{ $titleID := anchorize $title }}
Region | Location | URL(s) | {{ range .regions }} | {{ .name }} | {{ .location }} | {{ if .clusters }} {{ range .clusters }}
{{ .name }}: {{ .url }}
{{ end }} {{ else }} {{ .url }} {{ end }} | {{ end }} {{ end }} {{ else if eq $type "list" }} {{ range .Site.Data.influxdb_urls.cloud.providers }} {{ $scratch.Set "title" .name }} {{ if not (in .name .short_name) }} {{ $scratch.Set "title" (print .name " (" .short_name ")")}} {{ end }} {{ $title := $scratch.Get "title" }} - {{ $title }} {{ range .regions }} - {{ .name }} {{ end }} {{ end }} {{ else if eq $type "iox-list" }} {{ range where .Site.Data.influxdb_urls.cloud.providers "iox" true }} {{ $scratch.Set "title" .name }} {{ if not (in .name .short_name) }} {{ $scratch.Set "title" (print .name " (" .short_name ")")}} {{ end }} {{ $title := $scratch.Get "title" }} - {{ $title }} {{ range where .regions "iox" true }} - {{ .name }} {{ end }} {{ end }} {{ else if eq $type "iox-table"}} {{ range where .Site.Data.influxdb_urls.cloud.providers "iox" true }} {{ $scratch.Set "title" .name }} {{ if not (in .name .short_name) }} {{ $scratch.Set "title" (print .name " (" .short_name ")")}} {{ end }} {{ $title := $scratch.Get "title" }} {{ $titleID := anchorize $title }}
Region | Location | URL(s) | {{ range where .regions "iox" true }} | {{ .name }} | {{ .location }} | {{ if .clusters }} {{ range .clusters }}
{{ .name }}: {{ .url }}
{{ end }} {{ else }} {{ .url }} {{ end }} | {{ end }} {{ end }} {{ end }}