Comments (14)
Oh! That's indeed something I can fix! 😅
from grafana-json-datasource.
Here you go:
URL: https://my-jenkins-instance.com/job/Cloud/job/attempt_iqa_promotion/job/develop/api/json
Query Parameters actual (which broke): pretty=true&tree=builds[number,result,url]{0,10}
URL Encoded (which work): pretty=true&tree=builds%5Bnumber%2Cresult%2Curl%5D%7B0%2C10%7D
Note that if I also encode '=' and '&', it doesn't work again. So only some parts need to be URL encoded.
from grafana-json-datasource.
Thank you :)
from grafana-json-datasource.
If I only have $.builds[*].number, it shows the build numbers, but somehow I cannot display result.
$.builds[*].result shows an empty table.
from grafana-json-datasource.
The JSON you posted seems to work for me:
The error you get tells me that the result of each query don't contain the same number of rows. I'm guessing that one of the number
and result
properties is sometimes missing from the builds.
from grafana-json-datasource.
Thanks for your reply. That's what I thought as well, but I just cannot get any result to show! Even if I do
from grafana-json-datasource.
I'm not sure either why it's failing for you. Could you perhaps send me the result from the Query inspector. That way I can be sure we're looking at the same data.
- Click the Query inspector button in the upper right corner of the query editor
- Click Refresh to make a new request
- Click Copy to clipboard
- Paste it in this issue
Make sure that the request doesn't contain any sensitive information before pasting it
from grafana-json-datasource.
Thanks. But that's the other thing. In query inspector, when I click refresh, it keeps loading, which I again found to be strange.
Keeps being stuck on this:
from grafana-json-datasource.
Okay, figured it out. I need to pass the URL query parameters URL encoded, else it doesn't work. Maybe something you can fix? :)
from grafana-json-datasource.
Can I ask you to provide the query parameters that broke things for you, what you had to put in there instead?
from grafana-json-datasource.
Hey i have the same situation and my URL dose not need to be encoded (http://api.gios.gov.pl/pjp-api/rest/station/findAll)
Sample JSON (Not form Jenkins but same situation):
[
{
"id": 114,
"stationName": "Wrocław - Bartnicza",
"gegrLat": "51.115933",
"gegrLon": "17.141125",
"city": {
"id": 1064,
"name": "Wrocław",
"commune": {
"communeName": "Wrocław",
"districtName": "Wrocław",
"provinceName": "DOLNOŚLĄSKIE"
}
},
"addressStreet": "ul. Bartnicza"
},
{
"id": 117,
"stationName": "Wrocław - Korzeniowskiego",
"gegrLat": "51.129378",
"gegrLon": "17.029250",
"city": {
"id": 1064,
"name": "Wrocław",
"commune": {
"communeName": "Wrocław",
"districtName": "Wrocław",
"provinceName": "DOLNOŚLĄSKIE"
}
},
"addressStreet": "ul. Wyb. J.Conrada-Korzeniowskiego 18"
}
]
When I query for single value it's working fine, but when I add more there's "Fields have different lengths" error showing.
It is only appeared when I trying to querying multiple fields.
from grafana-json-datasource.
@kubala156 I can reproduce it the JSON you've sent me. This is the result from the data source.
$.[*].id
matches recursively (just learned this myself), which also adds the city ID to the id values. I fixed it by changing it to $.[:].id
. We should document this in the README, but I need to read up on it a little more.
[
{
"name": "id",
"type": "number",
"values": [
114,
117,
1064,
1064
]
},
{
"name": "stationName",
"type": "string",
"values": [
"Wrocław - Bartnicza",
"Wrocław - Korzeniowskiego"
]
},
{
"name": "gegrLat",
"type": "string",
"values": [
"51.115933",
"51.129378"
]
},
{
"name": "gegrLon",
"type": "string",
"values": [
"17.141125",
"17.029250"
]
}
]
from grafana-json-datasource.
Closing this with a fix for @kalpik's issue where query parameters aren't encoded properly.
from grafana-json-datasource.
Fixed in v0.6.2.
from grafana-json-datasource.
Related Issues (20)
- Grafana API does not export panel annotations HOT 1
- Cannot see JSONAPI datasource in the plugin list HOT 1
- Chore: migrate to create plugin
- Suporte a paginação HOT 1
- Support multi-value variables HOT 1
- Dynamically adding fields for all JSON properties HOT 1
- Issue with multiple API calls from same chart HOT 1
- Grafana v9 - Button HOT 2
- README Shows Example that doesn't work at all [?(@.data > 'otherdata']
- Filtering in Jsonpath using Grafana multi-value variable? 'IN' operator supported? Or workarounds? HOT 1
- Audit and fix A11Y issues HOT 1
- Can't perform basic math with JSONata HOT 1
- Query error e.ArrayVector is not a constructor Getting this error after the new update. HOT 2
- Query error e.ArrayVector is not a constructor Getting this error after the new update HOT 3
- Support Sigv4 Auth
- A variable can't take another variable's value as a http request parameter if it starts with "1"
- Hope to support returning key value pairs as variables
- Show more details in console or query inspector
- TimeShift not working HOT 1
- JSON API: Bad Gateway HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-json-datasource.