Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Aggregator autovalue and remove aggregator fix #77

Closed

Conversation

jsabin
Copy link

@jsabin jsabin commented Oct 15, 2018

If you add 2 or more aggregators to a Grafana panel, delete the first, the other will show having the interval and alignment from the first aggregator rather than the one you just entered.

The fix is to directly call the getVisibleParameters() method from the controller. I believe this was not working because the UI was not refreshing the controller state ($scope.apply() not being called).

Also, fixed autoValue to correctly set the sampling unit.

Eric Hatch and others added 30 commits May 25, 2016 14:22
…trl.js to make downsampling none when creating a new dashboard
…and dateMath.parse was no longer working. Fix is in the datasource.js file.
…-zmon/kairosdb-datasource into zalando-zmon-remove-downsampling-option
…loop

If templateSrv does not find the variable to replace, it 'might' return $ which causes infinite
loop. Use replaceCount to limit to at most 10 replacement.
all urls are stores in jsonData.urls which can be found in instanceSettings in the datasource.js.
Use urls only when multi mode is turn on.
… with grafana type

look into example of graphite
https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/graphite/config_ctrl.ts
, and find that datasourceSrv can use loadDatasource which returns backendSrv (might have a better
way to just import but currently do not know how to), and use $http from backendSrv to get all
datasources list, and filter to only store kairosdatasource in jsonData.allKarirosDatasource.
…atasource instead of backendSrv

Realized that datasourceSrv has more general functionality then backendSrv which is during
construction
…rrors

Check Inspect Nectwork to see ossibly unhandled rejection:
{"err":{"data":null,"status":-1,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"api/datasources/proxy/19/api/v1/datapoints/query/tags","requestId":"1.kairosdb.http.ingest_time.host.metricKeyValueLookup","data":{"metrics":[{"name":"kairosdb.http.ingest_time"}],"cache_time":0,"start_absolute":0},"retry":0,"timeout":{},"headers":{"X-Grafana-Org-Id":1,"Accept":"application/json,
text/plain,
*/*","Content-Type":"application/json;charset=utf-8"}},"statusText":""},"cancelled":true}
datasourceRequest are using a specific requestId to track either to cancel request or not. Use
unique datasource ID to make each request unique.
Ewocker and others added 28 commits February 27, 2018 15:03
Merging second pull request from Yu-An:

Alias fix by replace plus master
…ster

Revert "Alias fix by replace plus master"
…-templating branch from github/grafana/kairosdb-datasource repo.
…er than using a separate drop down for the value and the unit.
…but there are data points without the tag value. The UI would not let you select the tag. This was also confusing for a single valued tag because it looked (from the UI) like the tag value was selected when in fact it was not.
If you add 2 or more aggregators to a Grafana panel, delete the first, the other will show it as having the interval and alignment from the first aggregator rather than the one you just entered.

The fix is to directly call the getVisibleParameters() method from the controller. I believe this was not working because the UI was not refreshing the controller state ($scope.apply() not being called).

Also, fixed autoValue to correctly set the sampling unit. I probably broke this in my last set of changes.
@jsabin
Copy link
Author

jsabin commented Oct 15, 2018

I did not do this correctly. Closing the pull request.

@jsabin jsabin closed this Oct 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants