Merge pull request #4794 from influxdata/fixes/basepath-fix
Handle basepath issue with missing slashpull/4798/head
commit
93429b3d20
|
@ -7,6 +7,7 @@
|
|||
### Bug Fixes
|
||||
|
||||
1. [#4786](https://github.com/influxdata/chronograf/pull/4786): Get protoboards from multistore if not able to find from ProtoboardsPath
|
||||
1. [#4794](https://github.com/influxdata/chronograf/pull/4794): Handle basepath issue with missing slash
|
||||
|
||||
## v1.7.2 [2018-11-08]
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@ func NewMux(opts MuxOpts, service Service) http.Handler {
|
|||
})
|
||||
|
||||
if opts.Basepath != "" {
|
||||
basePath := fmt.Sprintf("%s/", opts.Basepath)
|
||||
// Prefix any URLs found in the React assets with any configured basepath
|
||||
assets = NewDefaultURLPrefixer(opts.Basepath, assets, opts.Logger)
|
||||
assets = NewDefaultURLPrefixer(basePath, assets, opts.Logger)
|
||||
}
|
||||
|
||||
// Compress the assets with gzip if an accepted encoding
|
||||
|
|
|
@ -871,7 +871,8 @@ export const functions: FluxToolbarFunction[] = [
|
|||
],
|
||||
desc:
|
||||
'Collects values stored vertically (column-wise) in a table and aligns them horizontally (row-wise) into logical sets.',
|
||||
example: 'pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")',
|
||||
example:
|
||||
'pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")',
|
||||
category: 'Transformations',
|
||||
link:
|
||||
'https://docs.influxdata.com/flux/latest/functions/transformations/pivot',
|
||||
|
|
|
@ -6,7 +6,12 @@ export const getBasepath = () => {
|
|||
return ''
|
||||
}
|
||||
|
||||
return rootNode.getAttribute('data-basepath') || ''
|
||||
let basepath = rootNode.getAttribute('data-basepath') || ''
|
||||
if (basepath !== '') {
|
||||
basepath = basepath.slice(0, basepath.length - 1)
|
||||
}
|
||||
|
||||
return basepath
|
||||
}
|
||||
|
||||
export const stripPrefix = (pathname, basepath = getBasepath()) => {
|
||||
|
|
Loading…
Reference in New Issue