Closed goller closed 5 years ago
ajax.js
is managing links
state in a way that has led to much confusion, and seems outside of the scope of what it should be concerned with.It would be good to clean up both of these so that we can straighten out how we handle links and errors throughout Chronograf.
links
request (via action creator) and store the response in ReduxIt looks to me currently like this complexity was introduced in order to make it so that an ostensibly older pattern of passing in resource
to AJAX
could be accommodated. So one simple solution to clean all of this up is to simply refactor any cases of resource
to an actual link that the server ought to provide, adding links to those provided by the server as needed.
closing due to inactivity
This code https://github.com/influxdata/chronograf/blob/master/ui/src/utils/ajax.js#L53 ended up causing issues downstream (see #1476)
@cryptoquick had an idea that we could use symbols (http://exploringjs.com/es6/ch_symbols.html) for additional properties of response objects rather than mashups.