Update the placeholder URL for dedicated (#5527)
* update the placeholder URL for dedicated * added dedicated URL migrationpull/5528/head
parent
e851b0089e
commit
5c7d3407ad
|
@ -3,6 +3,6 @@
|
||||||
variables:
|
variables:
|
||||||
baseurl:
|
baseurl:
|
||||||
enum:
|
enum:
|
||||||
- 'cluster-id.influxdb.io'
|
- 'cluster-id.a.influxdb.io'
|
||||||
default: 'cluster-id.influxdb.io'
|
default: 'cluster-id.a.influxdb.io'
|
||||||
description: InfluxDB Cloud Dedicated URL
|
description: InfluxDB Cloud Dedicated URL
|
||||||
|
|
|
@ -17,8 +17,8 @@ servers:
|
||||||
variables:
|
variables:
|
||||||
baseurl:
|
baseurl:
|
||||||
enum:
|
enum:
|
||||||
- cluster-id.influxdb.io
|
- cluster-id.a.influxdb.io
|
||||||
default: cluster-id.influxdb.io
|
default: cluster-id.a.influxdb.io
|
||||||
description: InfluxDB Cloud Dedicated URL
|
description: InfluxDB Cloud Dedicated URL
|
||||||
security:
|
security:
|
||||||
- BearerAuthentication: []
|
- BearerAuthentication: []
|
||||||
|
@ -1996,7 +1996,7 @@ components:
|
||||||
# Use the --user option with `--user username:DATABASE_TOKEN` syntax
|
# Use the --user option with `--user username:DATABASE_TOKEN` syntax
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
curl --get "http://cluster-id.influxdb.io/query" \
|
curl --get "http://cluster-id.a.influxdb.io/query" \
|
||||||
--user "":"DATABASE_TOKEN" \
|
--user "":"DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
@ -2024,8 +2024,8 @@ components:
|
||||||
### Syntax
|
### Syntax
|
||||||
|
|
||||||
```http
|
```http
|
||||||
https://cluster-id.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
|
https://cluster-id.a.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
|
||||||
https://cluster-id.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
|
https://cluster-id.a.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
@ -2041,7 +2041,7 @@ components:
|
||||||
# ?p=DATABASE_TOKEN
|
# ?p=DATABASE_TOKEN
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--data-urlencode "p=DATABASE_TOKEN" \
|
--data-urlencode "p=DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
@ -2078,7 +2078,7 @@ components:
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
```
|
```
|
||||||
|
@ -2109,7 +2109,7 @@ components:
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||||
--header "Authorization: Token DATABASE_TOKEN" \
|
--header "Authorization: Token DATABASE_TOKEN" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
```
|
```
|
||||||
|
|
|
@ -1980,7 +1980,7 @@ components:
|
||||||
# Use the --user option with `--user username:DATABASE_TOKEN` syntax
|
# Use the --user option with `--user username:DATABASE_TOKEN` syntax
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
curl --get "http://cluster-id.influxdb.io/query" \
|
curl --get "http://cluster-id.a.influxdb.io/query" \
|
||||||
--user "":"DATABASE_TOKEN" \
|
--user "":"DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
@ -2008,8 +2008,8 @@ components:
|
||||||
### Syntax
|
### Syntax
|
||||||
|
|
||||||
```http
|
```http
|
||||||
https://cluster-id.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
|
https://cluster-id.a.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN
|
||||||
https://cluster-id.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
|
https://cluster-id.a.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
@ -2025,7 +2025,7 @@ components:
|
||||||
# ?p=DATABASE_TOKEN
|
# ?p=DATABASE_TOKEN
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--data-urlencode "p=DATABASE_TOKEN" \
|
--data-urlencode "p=DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
@ -2062,7 +2062,7 @@ components:
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
```
|
```
|
||||||
|
@ -2093,7 +2093,7 @@ components:
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||||
--header "Authorization: Token DATABASE_TOKEN" \
|
--header "Authorization: Token DATABASE_TOKEN" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
```
|
```
|
||||||
|
|
|
@ -93,7 +93,7 @@ var defaultUrls = {
|
||||||
oss: 'http://localhost:8086',
|
oss: 'http://localhost:8086',
|
||||||
cloud: 'https://us-west-2-1.aws.cloud2.influxdata.com',
|
cloud: 'https://us-west-2-1.aws.cloud2.influxdata.com',
|
||||||
serverless: 'https://us-east-1-1.aws.cloud2.influxdata.com',
|
serverless: 'https://us-east-1-1.aws.cloud2.influxdata.com',
|
||||||
dedicated: 'cluster-id.influxdb.io',
|
dedicated: 'cluster-id.a.influxdb.io',
|
||||||
clustered: 'cluster-host.com',
|
clustered: 'cluster-host.com',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ var placeholderUrls = {
|
||||||
oss: 'http://localhost:8086',
|
oss: 'http://localhost:8086',
|
||||||
cloud: 'https://cloud2.influxdata.com',
|
cloud: 'https://cloud2.influxdata.com',
|
||||||
serverless: 'https://cloud2.influxdata.com',
|
serverless: 'https://cloud2.influxdata.com',
|
||||||
dedicated: 'cluster-id.influxdb.io',
|
dedicated: 'cluster-id.a.influxdb.io',
|
||||||
clustered: 'cluster-host.com',
|
clustered: 'cluster-host.com',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ var placeholderUrls = {
|
||||||
var elementSelector = '.article--content pre:not(.preserve)';
|
var elementSelector = '.article--content pre:not(.preserve)';
|
||||||
|
|
||||||
// Return the page context (cloud, serverless, oss/enterprise, dedicated, clustered, other)
|
// Return the page context (cloud, serverless, oss/enterprise, dedicated, clustered, other)
|
||||||
function context () {
|
function context() {
|
||||||
if (/\/influxdb\/cloud\//.test(window.location.pathname)) {
|
if (/\/influxdb\/cloud\//.test(window.location.pathname)) {
|
||||||
return 'cloud';
|
return 'cloud';
|
||||||
} else if (/\/influxdb\/cloud-serverless/.test(window.location.pathname)) {
|
} else if (/\/influxdb\/cloud-serverless/.test(window.location.pathname)) {
|
||||||
|
@ -37,12 +37,12 @@ function context () {
|
||||||
|
|
||||||
// Retrieve the user's InfluxDB preference (cloud or oss) from the influxdb_pref session cookie
|
// Retrieve the user's InfluxDB preference (cloud or oss) from the influxdb_pref session cookie
|
||||||
// Default is cloud.
|
// Default is cloud.
|
||||||
function getURLPreference () {
|
function getURLPreference() {
|
||||||
return getPreference('influxdb_url');
|
return getPreference('influxdb_url');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the user's selected InfluxDB preference (cloud or oss)
|
// Set the user's selected InfluxDB preference (cloud or oss)
|
||||||
function setURLPreference (preference) {
|
function setURLPreference(preference) {
|
||||||
setPreference('influxdb_url', preference);
|
setPreference('influxdb_url', preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ function setURLPreference (preference) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Store URLs in the urls session cookies
|
// Store URLs in the urls session cookies
|
||||||
function storeUrl (context, newUrl, prevUrl) {
|
function storeUrl(context, newUrl, prevUrl) {
|
||||||
urlsObj = {};
|
urlsObj = {};
|
||||||
urlsObj['prev_' + context] = prevUrl;
|
urlsObj['prev_' + context] = prevUrl;
|
||||||
urlsObj[context] = newUrl;
|
urlsObj[context] = newUrl;
|
||||||
|
@ -71,20 +71,20 @@ function storeUrl (context, newUrl, prevUrl) {
|
||||||
|
|
||||||
// Store custom URL in the url session cookie.
|
// Store custom URL in the url session cookie.
|
||||||
// Used to populate the custom URL field
|
// Used to populate the custom URL field
|
||||||
function storeCustomUrl (customUrl) {
|
function storeCustomUrl(customUrl) {
|
||||||
setInfluxDBUrls({ custom: customUrl });
|
setInfluxDBUrls({ custom: customUrl });
|
||||||
$('input#custom[type=radio]').val(customUrl);
|
$('input#custom[type=radio]').val(customUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a URL in the urls session cookie to an empty string
|
// Set a URL in the urls session cookie to an empty string
|
||||||
// Used to clear the form when custom url input is left empty
|
// Used to clear the form when custom url input is left empty
|
||||||
function removeCustomUrl () {
|
function removeCustomUrl() {
|
||||||
removeInfluxDBUrl('custom');
|
removeInfluxDBUrl('custom');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store a product URL in the urls session cookie
|
// Store a product URL in the urls session cookie
|
||||||
// Used to populate the custom URL field
|
// Used to populate the custom URL field
|
||||||
function storeProductUrl (product, productUrl) {
|
function storeProductUrl(product, productUrl) {
|
||||||
urlsObj = {};
|
urlsObj = {};
|
||||||
urlsObj[product] = productUrl;
|
urlsObj[product] = productUrl;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ function storeProductUrl (product, productUrl) {
|
||||||
|
|
||||||
// Set a product URL in the urls session cookie to an empty string
|
// Set a product URL in the urls session cookie to an empty string
|
||||||
// Used to clear the form when dedicated url input is left empty
|
// Used to clear the form when dedicated url input is left empty
|
||||||
function removeProductUrl (product) {
|
function removeProductUrl(product) {
|
||||||
removeInfluxDBUrl(product);
|
removeInfluxDBUrl(product);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ function removeProductUrl (product) {
|
||||||
|
|
||||||
// Preserve URLs in codeblocks that come just after or are inside a div
|
// Preserve URLs in codeblocks that come just after or are inside a div
|
||||||
// with the class, .keep-url
|
// with the class, .keep-url
|
||||||
function addPreserve () {
|
function addPreserve() {
|
||||||
$('.keep-url').each(function () {
|
$('.keep-url').each(function () {
|
||||||
// For code blocks with no syntax highlighting
|
// For code blocks with no syntax highlighting
|
||||||
$(this).next('pre').addClass('preserve');
|
$(this).next('pre').addClass('preserve');
|
||||||
|
@ -119,7 +119,7 @@ function addPreserve () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the currently selected URLs from the urls session cookie.
|
// Retrieve the currently selected URLs from the urls session cookie.
|
||||||
function getUrls () {
|
function getUrls() {
|
||||||
var storedUrls = getInfluxDBUrls();
|
var storedUrls = getInfluxDBUrls();
|
||||||
var currentCloudUrl = storedUrls.cloud;
|
var currentCloudUrl = storedUrls.cloud;
|
||||||
var currentOSSUrl = storedUrls.oss;
|
var currentOSSUrl = storedUrls.oss;
|
||||||
|
@ -138,7 +138,7 @@ function getUrls () {
|
||||||
|
|
||||||
// Retrieve the previously selected URLs from the from the urls session cookie.
|
// Retrieve the previously selected URLs from the from the urls session cookie.
|
||||||
// This is used to update URLs whenever you switch between browser tabs.
|
// This is used to update URLs whenever you switch between browser tabs.
|
||||||
function getPrevUrls () {
|
function getPrevUrls() {
|
||||||
var storedUrls = getInfluxDBUrls();
|
var storedUrls = getInfluxDBUrls();
|
||||||
var prevCloudUrl = storedUrls.prev_cloud;
|
var prevCloudUrl = storedUrls.prev_cloud;
|
||||||
var prevOSSUrl = storedUrls.prev_oss;
|
var prevOSSUrl = storedUrls.prev_oss;
|
||||||
|
@ -156,7 +156,7 @@ function getPrevUrls () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate through code blocks and update InfluxDB urls
|
// Iterate through code blocks and update InfluxDB urls
|
||||||
function updateUrls (prevUrls, newUrls) {
|
function updateUrls(prevUrls, newUrls) {
|
||||||
var preference = getURLPreference();
|
var preference = getURLPreference();
|
||||||
var prevUrlsParsed = {
|
var prevUrlsParsed = {
|
||||||
oss: {},
|
oss: {},
|
||||||
|
@ -244,7 +244,7 @@ function updateUrls (prevUrls, newUrls) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function replaceWholename (startStr, endStr, replacement) {
|
function replaceWholename(startStr, endStr, replacement) {
|
||||||
var startsWithSeparator = new RegExp('[/.]');
|
var startsWithSeparator = new RegExp('[/.]');
|
||||||
var endsWithSeparator = new RegExp('[-.:]');
|
var endsWithSeparator = new RegExp('[-.:]');
|
||||||
if (
|
if (
|
||||||
|
@ -278,7 +278,7 @@ function updateUrls (prevUrls, newUrls) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append the URL selector button to each codeblock containing a placeholder URL
|
// Append the URL selector button to each codeblock containing a placeholder URL
|
||||||
function appendUrlSelector () {
|
function appendUrlSelector() {
|
||||||
var appendToUrls = [
|
var appendToUrls = [
|
||||||
placeholderUrls.oss,
|
placeholderUrls.oss,
|
||||||
placeholderUrls.cloud,
|
placeholderUrls.cloud,
|
||||||
|
@ -290,15 +290,15 @@ function appendUrlSelector () {
|
||||||
getBtnText = (context) => {
|
getBtnText = (context) => {
|
||||||
contextText = {
|
contextText = {
|
||||||
'oss/enterprise': 'Change InfluxDB URL',
|
'oss/enterprise': 'Change InfluxDB URL',
|
||||||
'cloud': 'InfluxDB Cloud Region',
|
cloud: 'InfluxDB Cloud Region',
|
||||||
'serverless': 'InfluxDB Cloud Region',
|
serverless: 'InfluxDB Cloud Region',
|
||||||
'dedicated': 'Set Dedicated cluster URL',
|
dedicated: 'Set Dedicated cluster URL',
|
||||||
'clustered': 'Set InfluxDB cluster URL',
|
clustered: 'Set InfluxDB cluster URL',
|
||||||
'other': 'InfluxDB Cloud or OSS?'
|
other: 'InfluxDB Cloud or OSS?',
|
||||||
}
|
};
|
||||||
|
|
||||||
return contextText[context]
|
return contextText[context];
|
||||||
}
|
};
|
||||||
|
|
||||||
appendToUrls.forEach(function (url) {
|
appendToUrls.forEach(function (url) {
|
||||||
$(elementSelector).each(function () {
|
$(elementSelector).each(function () {
|
||||||
|
@ -344,7 +344,7 @@ $('.url-trigger').click(function (e) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the selected URL radio buttons to :checked
|
// Set the selected URL radio buttons to :checked
|
||||||
function setRadioButtons () {
|
function setRadioButtons() {
|
||||||
currentUrls = getUrls();
|
currentUrls = getUrls();
|
||||||
$('input[name="influxdb-cloud-url"][value="' + currentUrls.cloud + '"]').prop(
|
$('input[name="influxdb-cloud-url"][value="' + currentUrls.cloud + '"]').prop(
|
||||||
'checked',
|
'checked',
|
||||||
|
@ -426,7 +426,7 @@ $('input[name="influxdb-clustered-url"]').change(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Toggle preference tabs
|
// Toggle preference tabs
|
||||||
function togglePrefBtns (el) {
|
function togglePrefBtns(el) {
|
||||||
preference = el.length ? el.attr('id').replace('pref-', '') : 'cloud';
|
preference = el.length ? el.attr('id').replace('pref-', '') : 'cloud';
|
||||||
prefUrls = $('#' + preference + '-urls');
|
prefUrls = $('#' + preference + '-urls');
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ $('#pref-tabs .pref-tab').click(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Select preference tab from cookie
|
// Select preference tab from cookie
|
||||||
function showPreference () {
|
function showPreference() {
|
||||||
var preference = getPreference('influxdb_url');
|
var preference = getPreference('influxdb_url');
|
||||||
prefTab = $('#pref-' + preference);
|
prefTab = $('#pref-' + preference);
|
||||||
togglePrefBtns(prefTab);
|
togglePrefBtns(prefTab);
|
||||||
|
@ -457,7 +457,7 @@ showPreference();
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Validate custom URLs
|
// Validate custom URLs
|
||||||
function validateUrl (url) {
|
function validateUrl(url) {
|
||||||
/** validDomain = (Named host | IPv6 host | IPvFuture host)(:Port)? **/
|
/** validDomain = (Named host | IPv6 host | IPvFuture host)(:Port)? **/
|
||||||
var validDomain = new RegExp(
|
var validDomain = new RegExp(
|
||||||
`([a-z0-9\-._~%]+` +
|
`([a-z0-9\-._~%]+` +
|
||||||
|
@ -505,19 +505,19 @@ function validateUrl (url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show validation errors
|
// Show validation errors
|
||||||
function showValidationMessage (validation) {
|
function showValidationMessage(validation) {
|
||||||
$('#custom-url').addClass('error');
|
$('#custom-url').addClass('error');
|
||||||
$('#custom-url').attr('data-message', validation.error);
|
$('#custom-url').attr('data-message', validation.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide validation messages and replace the message attr with empty string
|
// Hide validation messages and replace the message attr with empty string
|
||||||
function hideValidationMessage () {
|
function hideValidationMessage() {
|
||||||
$('#custom-url').removeClass('error').attr('data-message', '');
|
$('#custom-url').removeClass('error').attr('data-message', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the custom URL cookie and apply the change
|
// Set the custom URL cookie and apply the change
|
||||||
// If the custom URL field is empty, it defaults to the OSS default
|
// If the custom URL field is empty, it defaults to the OSS default
|
||||||
function applyCustomUrl () {
|
function applyCustomUrl() {
|
||||||
var custUrl = $('#custom-url-field').val();
|
var custUrl = $('#custom-url-field').val();
|
||||||
let urlValidation = validateUrl(custUrl);
|
let urlValidation = validateUrl(custUrl);
|
||||||
if (custUrl.length > 0) {
|
if (custUrl.length > 0) {
|
||||||
|
@ -540,7 +540,7 @@ function applyCustomUrl () {
|
||||||
|
|
||||||
// Set the product URL cookie and apply the change
|
// Set the product URL cookie and apply the change
|
||||||
// If the product URL field is empty, it defaults to the product default
|
// If the product URL field is empty, it defaults to the product default
|
||||||
function applyProductUrl (product) {
|
function applyProductUrl(product) {
|
||||||
var productUrl = $(`#${product}-url-field`).val();
|
var productUrl = $(`#${product}-url-field`).val();
|
||||||
let urlValidation = validateUrl(productUrl);
|
let urlValidation = validateUrl(productUrl);
|
||||||
if (productUrl.length > 0) {
|
if (productUrl.length > 0) {
|
||||||
|
@ -605,7 +605,7 @@ $(urlValueElements).blur(function () {
|
||||||
/** Delay execution of a function `fn` for a number of milliseconds `ms`
|
/** Delay execution of a function `fn` for a number of milliseconds `ms`
|
||||||
* e.g., delay a validation handler to avoid annoying the user.
|
* e.g., delay a validation handler to avoid annoying the user.
|
||||||
*/
|
*/
|
||||||
function delay (fn, ms) {
|
function delay(fn, ms) {
|
||||||
let timer = 0;
|
let timer = 0;
|
||||||
return function (...args) {
|
return function (...args) {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
@ -613,7 +613,7 @@ function delay (fn, ms) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleUrlValidation () {
|
function handleUrlValidation() {
|
||||||
let url = $(urlValueElements).val();
|
let url = $(urlValueElements).val();
|
||||||
let urlValidation = validateUrl(url);
|
let urlValidation = validateUrl(url);
|
||||||
if (urlValidation.valid) {
|
if (urlValidation.valid) {
|
||||||
|
@ -658,3 +658,13 @@ if (cloudUrls.includes(referrerHost)) {
|
||||||
setURLPreference('cloud');
|
setURLPreference('cloud');
|
||||||
showPreference();
|
showPreference();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//////////////////////////// Dedicated URL Migration ///////////////////////////
|
||||||
|
///////////////////////// REMOVE AFTER AUGUST 22, 2024 /////////////////////////
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
if (getUrls().dedicated == 'cluster-id.influxdb.io') {
|
||||||
|
storeUrl('dedicated', 'cluster-id.a.influxdb.io', getUrls().dedicated);
|
||||||
|
updateUrls(getPrevUrls(), getUrls());
|
||||||
|
}
|
||||||
|
|
|
@ -6,16 +6,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Get notification ID
|
// Get notification ID
|
||||||
function notificationID (el) {
|
function notificationID(el) {
|
||||||
return $(el).attr('id');
|
return $(el).attr('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show notifications that are within scope and haven't been read
|
// Show notifications that are within scope and haven't been read
|
||||||
function showNotifications () {
|
function showNotifications() {
|
||||||
$('#docs-notifications > .notification').each(function () {
|
$('#docs-notifications > .notification').each(function () {
|
||||||
// Check if the path includes paths defined in the data-scope attribute
|
// Check if the path includes paths defined in the data-scope attribute
|
||||||
// of the notification html element
|
// of the notification html element
|
||||||
function inScope (path, scope) {
|
function inScope(path, scope) {
|
||||||
for (let i = 0; i < scope.length; i++) {
|
for (let i = 0; i < scope.length; i++) {
|
||||||
if (path.includes(scope[i])) {
|
if (path.includes(scope[i])) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -24,14 +24,14 @@ function showNotifications () {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function excludePage (path, exclude) {
|
function excludePage(path, exclude) {
|
||||||
if (exclude[0].length > 0) {
|
if (exclude[0].length > 0) {
|
||||||
for (let i = 0; i < exclude.length; i++) {
|
for (let i = 0; i < exclude.length; i++) {
|
||||||
if (path.includes(exclude[i])) {
|
if (path.includes(exclude[i])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,8 +41,6 @@ function showNotifications () {
|
||||||
var pageExcluded = excludePage(window.location.pathname, exclude);
|
var pageExcluded = excludePage(window.location.pathname, exclude);
|
||||||
var notificationRead = notificationIsRead(notificationID(this), 'message');
|
var notificationRead = notificationIsRead(notificationID(this), 'message');
|
||||||
|
|
||||||
console.log(pageExcluded)
|
|
||||||
|
|
||||||
if (pageInScope && !pageExcluded && !notificationRead) {
|
if (pageInScope && !pageExcluded && !notificationRead) {
|
||||||
$(this).show().animate({ right: 0, opacity: 1 }, 200, 'swing');
|
$(this).show().animate({ right: 0, opacity: 1 }, 200, 'swing');
|
||||||
}
|
}
|
||||||
|
@ -50,7 +48,7 @@ function showNotifications () {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide a notification and set the notification as read
|
// Hide a notification and set the notification as read
|
||||||
function hideNotification (el) {
|
function hideNotification(el) {
|
||||||
$(el)
|
$(el)
|
||||||
.closest('.notification')
|
.closest('.notification')
|
||||||
.animate({ height: 0, opacity: 0 }, 200, 'swing', function () {
|
.animate({ height: 0, opacity: 0 }, 200, 'swing', function () {
|
||||||
|
|
|
@ -26,7 +26,7 @@ list_code_example: |
|
||||||
|
|
||||||
func Query() error {
|
func Query() error {
|
||||||
client, err := influxdb3.New(influxdb3.ClientConfig{
|
client, err := influxdb3.New(influxdb3.ClientConfig{
|
||||||
Host: "https://cluster-id.influxdb.io",
|
Host: "https://cluster-id.a.influxdb.io",
|
||||||
Token: "DATABASE_TOKEN",
|
Token: "DATABASE_TOKEN",
|
||||||
Database: "DATABASE_NAME",
|
Database: "DATABASE_NAME",
|
||||||
})
|
})
|
||||||
|
|
|
@ -486,7 +486,7 @@ Follow these steps to build and run the application using Docker:
|
||||||
```sh
|
```sh
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg DATABASE_NAME=INFLUX_DATABASE \
|
--build-arg DATABASE_NAME=INFLUX_DATABASE \
|
||||||
--build-arg HOST=cluster-id.influxdb.io \
|
--build-arg HOST={{% influxdb/host %}}\
|
||||||
--build-arg TOKEN=INFLUX_TOKEN \
|
--build-arg TOKEN=INFLUX_TOKEN \
|
||||||
-t javaflight .
|
-t javaflight .
|
||||||
```
|
```
|
||||||
|
|
|
@ -26,7 +26,7 @@ list_code_example: |
|
||||||
|
|
||||||
func Query() error {
|
func Query() error {
|
||||||
client, err := influxdb3.New(influxdb3.ClientConfig{
|
client, err := influxdb3.New(influxdb3.ClientConfig{
|
||||||
Host: "https://cluster-id.influxdb.io",
|
Host: "https://cluster-host.com",
|
||||||
Token: "DATABASE_TOKEN",
|
Token: "DATABASE_TOKEN",
|
||||||
Database: "DATABASE_NAME",
|
Database: "DATABASE_NAME",
|
||||||
})
|
})
|
||||||
|
|
|
@ -487,7 +487,7 @@ Follow these steps to build and run the application using Docker:
|
||||||
```sh
|
```sh
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg DATABASE_NAME=INFLUX_DATABASE \
|
--build-arg DATABASE_NAME=INFLUX_DATABASE \
|
||||||
--build-arg HOST=cluster-id.influxdb.io \
|
--build-arg HOST={{% influxdb/host %}} \
|
||||||
--build-arg TOKEN=INFLUX_TOKEN \
|
--build-arg TOKEN=INFLUX_TOKEN \
|
||||||
-t javaflight .
|
-t javaflight .
|
||||||
```
|
```
|
||||||
|
|
|
@ -56,7 +56,7 @@ influxdb_cloud_dedicated:
|
||||||
latest: cloud-dedicated
|
latest: cloud-dedicated
|
||||||
link: "https://www.influxdata.com/contact-sales-form/"
|
link: "https://www.influxdata.com/contact-sales-form/"
|
||||||
latest_cli: 2.9.3
|
latest_cli: 2.9.3
|
||||||
placeholder_host: cluster-id.influxdb.io
|
placeholder_host: cluster-id.a.influxdb.io
|
||||||
|
|
||||||
influxdb_clustered:
|
influxdb_clustered:
|
||||||
name: InfluxDB Clustered
|
name: InfluxDB Clustered
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
]
|
]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Load footer.js -->
|
|
||||||
<script type="text/javascript" src="{{ $footerjs.RelPermalink }}"></script>
|
|
||||||
|
|
||||||
{{ if .Page.HasShortcode "diagram" }}
|
{{ if .Page.HasShortcode "diagram" }}
|
||||||
<!-- Load mermaid.js for diagrams -->
|
<!-- Load mermaid.js for diagrams -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||||
|
@ -77,4 +74,7 @@
|
||||||
<!-- Load code placeholders js when code-placeholders shortcode is present -->
|
<!-- Load code placeholders js when code-placeholders shortcode is present -->
|
||||||
{{ if .Page.HasShortcode "code-placeholders" }}
|
{{ if .Page.HasShortcode "code-placeholders" }}
|
||||||
<script type="text/javascript" src="{{ $codePlaceholdersjs.RelPermalink }}"></script>
|
<script type="text/javascript" src="{{ $codePlaceholdersjs.RelPermalink }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Load footer.js -->
|
||||||
|
<script type="text/javascript" src="{{ $footerjs.RelPermalink }}"></script>
|
|
@ -150,7 +150,7 @@
|
||||||
{{ else if $isServerless }}
|
{{ else if $isServerless }}
|
||||||
{{ template "productSection" dict "product" .Site.Data.influxdb_urls.cloud "formID" "serverless" "filterServerless" true }}
|
{{ template "productSection" dict "product" .Site.Data.influxdb_urls.cloud "formID" "serverless" "filterServerless" true }}
|
||||||
{{ else if $isDedicated }}
|
{{ else if $isDedicated }}
|
||||||
{{ template "productSpecificForm" dict "product" nil "formID" "dedicated" "placeholder" "cluster-id.influxdb.io" }}
|
{{ template "productSpecificForm" dict "product" nil "formID" "dedicated" "placeholder" "cluster-id.a.influxdb.io" }}
|
||||||
{{ else if $isClustered }}
|
{{ else if $isClustered }}
|
||||||
{{ template "productSpecificForm" dict "product" nil "formID" "clustered" "placeholder" "cluster-host.com" }}
|
{{ template "productSpecificForm" dict "product" nil "formID" "clustered" "placeholder" "cluster-host.com" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--user "":"DATABASE_TOKEN" \
|
--user "":"DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# to query the InfluxDB v1 API
|
# to query the InfluxDB v1 API
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||||
--header 'Content-type: application/json' \
|
--header 'Content-type: application/json' \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl -i "https://cluster-id.influxdb.io/write?db=DATABASE_NAME&precision=ms" \
|
curl -i "https://cluster-id.a.influxdb.io/write?db=DATABASE_NAME&precision=ms" \
|
||||||
--header "Authorization: Bearer DATABASE_TOKEN" \
|
--header "Authorization: Bearer DATABASE_TOKEN" \
|
||||||
--header "Content-type: text/plain; charset=utf-8" \
|
--header "Content-type: text/plain; charset=utf-8" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1682358973500'
|
--data-binary 'home,room=kitchen temp=72 1682358973500'
|
|
@ -3,6 +3,6 @@
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post 'https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s' \
|
curl --request post 'https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s' \
|
||||||
--header 'Authorization: Bearer DATABASE_TOKEN' \
|
--header 'Authorization: Bearer DATABASE_TOKEN' \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# ?p=DATABASE_TOKEN
|
# ?p=DATABASE_TOKEN
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--data-urlencode "p=DATABASE_TOKEN" \
|
--data-urlencode "p=DATABASE_TOKEN" \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# to query the InfluxDB v1 API
|
# to query the InfluxDB v1 API
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --get "https://cluster-id.influxdb.io/query" \
|
curl --get "https://cluster-id.a.influxdb.io/query" \
|
||||||
--header "Authorization: Token DATABASE_TOKEN" \
|
--header "Authorization: Token DATABASE_TOKEN" \
|
||||||
--header 'Content-type: application/json' \
|
--header 'Content-type: application/json' \
|
||||||
--data-urlencode "db=DATABASE_NAME" \
|
--data-urlencode "db=DATABASE_NAME" \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl -i "https://cluster-id.influxdb.io/write?db=DATABASE_NAME&precision=ms" \
|
curl -i "https://cluster-id.a.influxdb.io/write?db=DATABASE_NAME&precision=ms" \
|
||||||
--header "Authorization: Token DATABASE_TOKEN" \
|
--header "Authorization: Token DATABASE_TOKEN" \
|
||||||
--header "Content-type: text/plain; charset=utf-8" \
|
--header "Content-type: text/plain; charset=utf-8" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1682358973500'
|
--data-binary 'home,room=kitchen temp=72 1682358973500'
|
|
@ -3,6 +3,6 @@
|
||||||
# to write data.
|
# to write data.
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
curl --request post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
curl --request post "https://cluster-id.a.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||||
--header "Authorization: Token DATABASE_TOKEN" \
|
--header "Authorization: Token DATABASE_TOKEN" \
|
||||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||||
|
|
Loading…
Reference in New Issue