groundwork for influxdb url select
parent
4d10f27c3b
commit
e7d191a4a1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,15 @@
|
|||
var url = "https://us-west-2-1.aws.cloud2.influxdata.com"
|
||||
|
||||
// Create a way for users to select their region
|
||||
// store the region url as a cookie
|
||||
|
||||
// set a session cookie for the url
|
||||
// If the session cookie isn't defined, don't do anything
|
||||
|
||||
function updateUrls() {
|
||||
$(".article--content pre").each(function() {
|
||||
$(this).html($(this).html().replace("http://localhost:9999", url));
|
||||
});
|
||||
}
|
||||
|
||||
updateUrls()
|
|
@ -15,18 +15,7 @@ Use the URLs below to interact with your InfluxDB Cloud instances with the
|
|||
[InfluxDB API](/v2.0/reference/api/), [InfluxDB client libraries](/v2.0/reference/api/client-libraries/),
|
||||
[`influx` CLI](/v2.0/reference/cli/influx/), or [Telegraf](/v2.0/write-data/use-telegraf/).
|
||||
|
||||
## Amazon Web Services (AWS)
|
||||
|
||||
| Region | URL |
|
||||
|:------ |:--- |
|
||||
| US West (Oregon) | https://us-west-2-1.aws.cloud2.influxdata.com |
|
||||
| EU Frankfurt | https://eu-central-1-1.aws.cloud2.influxdata.com |
|
||||
|
||||
## Google Cloud Platform (GCP)
|
||||
|
||||
| Region | URL |
|
||||
|:------ |:--- |
|
||||
| US Central (Iowa) | https://us-central1-1.gcp.cloud2.influxdata.com/ |
|
||||
{{< cloud_urls >}}
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
oss:
|
||||
product: InfluxDB OSS
|
||||
name: localhost:9999
|
||||
url: http://localhost:9999
|
||||
|
||||
cloud:
|
||||
product: InfluxDB Cloud
|
||||
providers:
|
||||
- name: Amazon Web Services
|
||||
short_name: AWS
|
||||
regions:
|
||||
- name: US West (Orgeon)
|
||||
url: https://us-west-2-1.aws.cloud2.influxdata.com
|
||||
- name: EU Frankfort
|
||||
url: https://eu-central-1-1.aws.cloud2.influxdata.com
|
||||
- name: Google Cloud Platform
|
||||
short_name: GCP
|
||||
regions:
|
||||
- name: US Central (Iowa)
|
||||
url: https://us-central1-1.gcp.cloud2.influxdata.com
|
|
@ -1,4 +1,8 @@
|
|||
{{ $currentVersion := (index (findRE "[^/]+.*?" .RelPermalink) 0) }}
|
||||
|
||||
<!-- InfluxDB URL modal -->
|
||||
{{ partial "footer/influxdb-url-modal.html" . }}
|
||||
|
||||
<!-- Docsearch JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
||||
<script>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<div class="url-selector" style="background: #fff; padding: 1rem;">
|
||||
{{ range sort .Site.Data.influxdb_urls "product" "desc" }}
|
||||
<h4>{{ .product }}</h4>
|
||||
{{ if .name }}
|
||||
<ul><li data-url="{{ .url }}">{{ .name }}</li></ul>
|
||||
{{ end }}
|
||||
{{ if .providers }}
|
||||
{{ range .providers }}
|
||||
<strong>{{ if .short_name}}{{ .short_name }}{{ else }}{{ .name }}{{ end }}</strong>
|
||||
<ul>
|
||||
{{ range .regions }}
|
||||
<li data-url="{{ .url }}">{{ .name }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
|
@ -2,6 +2,7 @@
|
|||
{{ $contentInteractions := resources.Get "js/content-interactions.js" }}
|
||||
{{ $searchInteractions := resources.Get "js/search-interactions.js" }}
|
||||
{{ $telegrafFilters := resources.Get "js/telegraf-filters.js" }}
|
||||
{{ $footerjs := slice $versionSelector $contentInteractions $searchInteractions $telegrafFilters | resources.Concat "js/footer.bundle.js" }}
|
||||
{{ $regionURLs := resources.Get "js/region-url.js" }}
|
||||
{{ $footerjs := slice $versionSelector $contentInteractions $searchInteractions $telegrafFilters $regionURLs | resources.Concat "js/footer.bundle.js" }}
|
||||
|
||||
<script type="text/javascript" src="{{ $footerjs.RelPermalink }}" ></script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }}
|
||||
{{ $jquery := resources.Get "js/jquery-3.5.0.min.js" }}
|
||||
{{ $cookies := resources.Get "js/js.cookie.js" }}
|
||||
{{ $themes := resources.Get "js/docs-themes.js" }}
|
||||
{{ $sidebar := resources.Get "js/sidebar-toggle.js" }}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{{ range .Site.Data.influxdb_urls.cloud.providers }}
|
||||
{{ $scratch := newScratch }}
|
||||
{{ $scratch.Set "title" .name }}
|
||||
{{ if .short_name }}
|
||||
{{ $scratch.Set "title" (print .name " (" .short_name ")")}}
|
||||
{{ end }}
|
||||
{{ $title := $scratch.Get "title" }}
|
||||
{{ $titleID := anchorize $title }}
|
||||
<h2 id="{{ $titleID }}">{{ $title }}</h2></strong>
|
||||
<table>
|
||||
<thead>
|
||||
<th align="left">Region</th>
|
||||
<th align="left">URL</th>
|
||||
</thead>
|
||||
{{ range .regions }}
|
||||
<tr>
|
||||
<td>{{ .name }}</td>
|
||||
<td><a href="{{ .url }}">{{ .url }}</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }}
|
Loading…
Reference in New Issue