Correctly update InfluxDB URLs that don't have a trailing slash or URL path (#2925)

* WIP debugging URL js

* correctly update influxdb urls without a trailing slash or url path
pull/2927/head
Scott Anderson 2021-07-27 15:24:22 -06:00 committed by GitHub
parent bdda31d6ce
commit c9dcb0c841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -191,8 +191,8 @@ function updateUrls(prevUrls, newUrls) {
.forEach(function (o) {
if (o.replace != o.with) {
$(elementSelector).each(function() {
// Lookbehind matches if o.replace is not preceded by [/.].
var hostnameOnly = new RegExp("(?<![/.])" + o.replace, "g")
// Lookbehind matches if o.replace is not preceded by :[/.].
var hostnameOnly = new RegExp("(?<!:[/.])" + o.replace, "g")
$(this).html(
$(this).html().replace(hostnameOnly, function(match) {
return o.with.host || o.with;

View File

@ -151,13 +151,13 @@ To avoid having to pass your InfluxDB [authentication token](/influxdb/cloud/sec
In a terminal, run the following command:
```sh
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance.
For more detail, see [influx config](/influxdb/cloud/reference/cli/influx/config/).
@ -211,13 +211,13 @@ To avoid having to pass your InfluxDB [authentication token](/influxdb/cloud/sec
In a terminal, run the following command:
```sh
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
# Set up a configuration profile
influx config create -n default \
-u https://cloud2.influxdata.com \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance.
For more detail, see [influx config](/influxdb/cloud/reference/cli/influx/config/).