fix(ui): fixed single column links bug (#17601)
parent
96321ff8bd
commit
207f174d75
|
@ -29,6 +29,7 @@
|
|||
1. [17404](https://github.com/influxdata/influxdb/pull/17404): Updated duplicate check error message to be more explicit and actionable
|
||||
1. [17515](https://github.com/influxdata/influxdb/pull/17515): Editing a table cell shows the proper values and respects changes
|
||||
1. [17521](https://github.com/influxdata/influxdb/pull/17521): Table view scrolling should be slightly smoother
|
||||
1. [17601](https://github.com/influxdata/influxdb/pull/17601): URL table values on single columns are being correctly parsed
|
||||
|
||||
### UI Improvements
|
||||
|
||||
|
|
|
@ -31,12 +31,13 @@ interface Props extends CellRendererProps {
|
|||
timeFormatter: (time: string) => string
|
||||
}
|
||||
|
||||
const URL_REGEXP = /(https?:\/\/[^\s]+)/g
|
||||
const URL_REGEXP = /((http|https)?:\/\/[^\s]+)/g
|
||||
|
||||
// NOTE: rip this out if you spend time any here as per:
|
||||
// https://stackoverflow.com/questions/1500260/detect-urls-in-text-with-javascript/1500501#1500501
|
||||
function asLink(str) {
|
||||
if (!URL_REGEXP.test('' + str)) {
|
||||
const isURL = `${str}`.includes('http://') || `${str}`.includes('https://')
|
||||
if (isURL === false) {
|
||||
return str
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue