mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Read the whole prometheus api prefix
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
496c9c62b5
commit
b989218604
@ -84,7 +84,6 @@ export default {
|
|||||||
},
|
},
|
||||||
prometheusPath: "",
|
prometheusPath: "",
|
||||||
prometheusProvider: "",
|
prometheusProvider: "",
|
||||||
prometheusProviders: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: async function() {
|
mounted: async function() {
|
||||||
@ -108,12 +107,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
parsePrometheusPath: function(path) {
|
parsePrometheusPath: function(path) {
|
||||||
let parsed = path.split(/\/|:/)
|
const parsed = path.split(/\/|:/, 3)
|
||||||
|
const apiPrefix = path.substring(parsed.join("/").length)
|
||||||
return {
|
return {
|
||||||
namespace: parsed[0],
|
namespace: parsed[0],
|
||||||
service: parsed[1],
|
service: parsed[1],
|
||||||
port: parsed[2],
|
port: parsed[2],
|
||||||
prefix: parsed[3] ? `/${parsed[3]}` : ''
|
prefix: apiPrefix
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
expandPath: function(value, event) {
|
expandPath: function(value, event) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user