-
Notifications
You must be signed in to change notification settings - Fork 72
Conversation
@@ -31,6 +31,8 @@ export function QueryEditor(props: Props) { | |||
useMount(async () => { | |||
const profileTypes = await props.datasource.getProfileTypes(); | |||
setProfileTypes(profileTypes); | |||
// todo remove me. | |||
console.log(await props.datasource.getLabelNames()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joey-grafana This is how to use it, we should probably do this on demand when trying to select name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but take a look at my comment 🙂
pkg/firedb/head.go
Outdated
result := lo.Reject(values, func(name string, _ int) bool { | ||
return strings.HasPrefix(name, "__") | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not too sure about this, e.g. prometheus returns _name_
on the equivalent endpoint.
$ curl -s https://prometheus.demo.do.prometheus.io/api/v1/labels | jq .
{
"status": "success",
"data": [
"__name__",
"action",
"address",
[...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok may be we can leave it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave them they should be filtered out by the UI though @joey-grafana anything that start with __
should not be shown on the ui.
Adds a label names API
This adds a label names API to fire and the datasource too.