-
Notifications
You must be signed in to change notification settings - Fork 256
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
WIP Add conversion of InfluxQL to QueryConfig for dashboards #1035
Merged
lukevmorris
merged 38 commits into
950-overlay_technologies-edit
from
feature/parse-to-query-config
Mar 21, 2017
Merged
WIP Add conversion of InfluxQL to QueryConfig for dashboards #1035
lukevmorris
merged 38 commits into
950-overlay_technologies-edit
from
feature/parse-to-query-config
Mar 21, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dropdown is at the top, so less likely to push down the page
This also fixes bug #1009.
Alert Message Polish
bugfix/ent validation
This is an initial implementation of cell renaming on dashboards. It maintains its state locally to the component and reuses the onPositionChange handler provided by the DashboardPage container component to persist changes to the cells. Redux wasn't used in this implementation because it was something we wanted to refactor into, which will happen in subsequent commits. There is a known bug in this implementation where cell names are overwritten with an empty string when the dashboard initially loads and when the cell layout changes.
Cell renaming was previously done without using any of the existing Redux logic. This goes against the ethos of the rest of the code used for dashboards. This commit is an initial attempt to bring NameableGraph into compliance with that.
`l.name` was being copied from the cells provided by React Grid Layout, which have no concept of name, which is why this was undefined. This caused cells to be renamed '' whenever the layout changed or the page was reloaded.
Previously, editing a cell name caused a PUT to the API for every character typed by the user when renaming a cell. This was obviously not ideal, but kept the initial implementation simple. This limits PUTs to update cells to only when blur events happen on the <input>. This is accomplished by maintaining the state of the input field within the component and using a separate handler for the onBlur to actually PUT the dashboard using a handler provided by the caller.
Implicit returns are more concise here, and considered more idiomatic. Also, async action creators have been collected together and moved towards the end of the file for ease of navigation.
NameableGraph is now a stateless component, with all its ephemeral state held within Redux. This improves its testability, and two tests have been added for the two needed Reducer cases. Also, since NameableGraph's behavior is entirely controlled by its props, the component itself can be tested, though this has not yet been done.
…ns. Added updateDashboardCells reducer, tested.
Mo’ proppa
Allow Renaming Cells on Dashboards
Cell coordinates were previously strings, which disagreed with how they were being delivered from components which used NameableGraph. This caused errors in the console.
This allows the renameability of NameableGraph to be controlled by the presence of any one of the editing handler functions. Since we don't pass any of these when rendering a HostPage, those graphs will have static names, and will prevent the user from editing the names of those graphs to no avail. Also, because the handlers were marked required, it caused the HostPage to entirely break, which is fixed by this commit.
Admin Polish
Fix Broken Host Page
Fix reporting stats to update uptime
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connect #950
The problem
We need a way to convert InfluxQL to the frontend QueryConfig JSON structure. QueryConfig is not able to fully represent InfluxQL.
The Solution
Use the Influx 1.1 Parser to parse the InfluxQL into the QueryConfig.