Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template issue #27

Closed
hagen1778 opened this issue Nov 24, 2017 · 1 comment
Closed

template issue #27

hagen1778 opened this issue Nov 24, 2017 · 1 comment

Comments

@hagen1778
Copy link
Collaborator

Aleksey Shirokikh, [23.11.17 20:28]
@alexanderzobnin а можно в шаблонизатор графаны подставить такое вот
select
dictGetString('managedobject', 'name', managed_object) AS text,
managed_object as value
from
noc.subscriber
group by managed_object

Aleksey Shirokikh, [23.11.17 20:28]
я хочу выбирать красивое имя а в квери подставлять то чо надо

Aleksey Shirokikh, [23.11.17 20:29]
это запрос в кх

Alexander Zobnin, [23.11.17 20:29]
это SQL датасорс?

Aleksey Shirokikh, [23.11.17 20:30]
нет это vertamedia/ch

Aleksey Shirokikh, [23.11.17 20:33]
сейчас возвращается оба результата

Aleksey Shirokikh, [23.11.17 20:33]
что очевидно не помогает

Aleksey Shirokikh, [23.11.17 20:33]
и я смотрю на
https://github.com/Vertamedia/clickhouse-grafana/blob/5e8adabfb6c9e396f08c638d44cbb8306ef3df60/specs/lib/template_srv_stub.ts
и будто бы да

Alexander Zobnin, [23.11.17 20:34]
Видимо, нет, посмотрел в их код, они возвращают { text: value}

Aleksey Shirokikh, [23.11.17 20:34]
а как надо что бы да ?

Alexander Zobnin, [23.11.17 20:41]
Чтобы {text: myText, value: myValue}

Alexander Zobnin, [23.11.17 20:42]
Как здесь https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/postgres/response_parser.ts#L62

@hagen1778
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant