-
👋 Hi @simPod I have a question regarding recent change in annotations. What structure should endpoint response have? Right now my endpoints returns: [
{
"text": "string",
"title": "string",
"time": "int",
"tags": ["string"]
}
] Which results in |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi, you have to return anything, that can be converted to dataframe as specified in https://github.com/simPod/GrafanaJsonDatasource#query Grafana now uses that. E.g. I think I'm returning this: [
['name' => 'Start', 'type' => 'time', 'values' => []],
['name' => 'End', 'type' => 'time', 'values' => []],
['name' => 'Tags', 'type' => 'string', 'values' => []],
['name' => 'Text', 'type' => 'string', 'values' => []],
] |
Beta Was this translation helpful? Give feedback.
-
I use timestamp with ms precision
… On 16. 10. 2021, at 1:19, Igor Cichecki ***@***.***> wrote:
Thanks for a quick answer!
After your comment I tried
[
[
{
"time": ["2021-10-12T13:45:00.000Z"],
"timeEnd": ["2021-10-14T13:45:00.000Z"],
"text": ["dummy_text"],
"title": ["dummy_title"],
}
],
]
It works, the only issue here are timestamps - they are interpreted by Grafana as 2021-01-01 01:00:00. I don't know what format is expected in response. I played with some popular date formats, so far none of them was parsed correctly.
Do you happen to have some sample timestamp? That would be really helpful.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#208 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACQAJMCDDRIDYZHKKLQKZLUHCZG5ANCNFSM5GCEKWWQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
I know but grafana AFAIK works with unix timestamp with ms. Not sure if it
can handle other formats.
…On Sat, Oct 16, 2021, 14:00 Igor Cichecki ***@***.***> wrote:
The format I used does include ms, i.e. yyyy-MM-ddTHH:mm:ss.fffZ. I also
tested ms since unix epoch if that is what you had in mind.
Either way the base is working so I will only need to figure out time
format.
Thanks for the help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#208 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQAJL773OSJOLNL6EF6HLUHFSNFANCNFSM5GCEKWWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
Hi, you have to return anything, that can be converted to dataframe as specified in https://github.com/simPod/GrafanaJsonDatasource#query Grafana now uses that.
E.g. I think I'm returning this: