Commit Graph

1506 Commits (d50374c7e97ab2f7127ef6629cd5566c1855c08a)

Author SHA1 Message Date
Alex P 34316a5f45 Fix #1083 2017-03-29 16:35:53 -07:00
Alex P a468668f35 Clean up dashboards table 2017-03-29 16:35:14 -07:00
Jared Scheib 2510388651 Refactor some notifications to use consolidated dispatcher in Admin and Dashboards (#1116)
* Separate notification dispatchers from actions, share constants, simplify, clean up

* Replace 'addFlashMessage' with 'notify' pattern throughout Admin and Dashboards, clean up

* Remove semicolons

* Notify success upon AJAX success
2017-03-29 16:06:31 -07:00
Hunter Trujillo cd8df84db8 The line must be drawn here. This far, no further. 2017-03-29 14:03:52 -06:00
Hunter Trujillo fbd0ee84e3 Ran eslint fix on current codebase. Only file affected was this. 2017-03-29 13:59:32 -06:00
Jared Scheib 36cc368bf1 Auto-dismiss notification 2017-03-29 11:23:46 -07:00
Jared Scheib cb5f6fbdc8 Use try/catch with async/await 2017-03-29 10:55:16 -07:00
Jared Scheib 627d65e39f Use simpler destructuring shorthand 2017-03-29 10:53:44 -07:00
Jared Scheib ed564e4ed3 Add tests for deleteDashboard and deleteDashboardFailed 2017-03-28 20:03:33 -07:00
Jared Scheib e8b119f405 Rename action on delete dashboard failed to follow effect style rather than affect 2017-03-28 19:37:35 -07:00
Jared Scheib 6a39277a40 Fix DashboardPage to handle null values for and until loaded 2017-03-28 19:03:15 -07:00
Jared Scheib b9b28da860 Refactor DashboardsPage to load dashboards via action creator and to use mapStateToProps so delete is Reactive 2017-03-28 18:30:34 -07:00
Jared Scheib c2c805a596 DashboardsPage can now delete a dashboard (tho not reflected in UI except on refresh) 2017-03-28 17:51:34 -07:00
Jared Scheib 5b7d6bd0ae Merge remote-tracking branch 'origin/master' into 1107-refactor_delete_row 2017-03-28 16:07:10 -07:00
Jared Scheib 840f8aa472 Rename component to follow convention 2017-03-28 16:06:37 -07:00
Jared Scheib 06117edae3 Share ConfirmButtons among pages 2017-03-28 16:02:49 -07:00
Jared Scheib 1fb2b283da Refactor DeleteConfirmButtons as shared component, compose as DeleteConfirmTableCell, clean up 2017-03-28 15:59:22 -07:00
Chris Goller b39d5ee4e7 Merge branch 'master' into hotfix/windows-hosts 2017-03-28 16:19:26 -05:00
Chris Goller c2a302c43a Fix host page loading for windows systems 2017-03-28 16:01:11 -05:00
Andrew Watkins 7ee3130bba Move Header into separate component 2017-03-28 11:44:22 -07:00
lukevmorris 1f279584f3 Persist and render Dashboard Cell groupby queries (#1092)
* Rename selectStatement to buildInfluxQLQuery

* Moved `influxql/select` to `utils/influxql`

* Replace `buildQuery` with `buildInfluxQLQuery` util function

* Retain GROUP BY clause when saving cell query

* Revert "Replace `buildQuery` with `buildInfluxQLQuery` util function"

This reverts commit d932d99bfa.

* Build DashboardCell queries with buildInfluxQLQuery util

Retain old LayouRenderer.buildQuery functionality for
canned dashboards, and anything else that isn’t using
the queryConfig schema. Rename this function to make
it clear that it is legacy behavior, and that it 
should not be a dependency of any new code.

* Update CHANGELOG
2017-03-28 11:02:49 -07:00
Alex Paxton ec3ebb855a Merge pull request #1093 from influxdata/ui-polish
Custom Cursors + Other Polish
2017-03-28 10:55:15 -07:00
Chris Goller e6322616fa WIP to get windows hosts working again 2017-03-28 11:11:12 -05:00
Timothy J. Raymond 54dd3e5eee Redirect to default source when deleting sources (#1074)
* Redirect to default source on invalid source ID

When supplied with an invalid source ID, the CheckSources component
would redirect the user to a "Create Source" page. This caused
surprising behavior when a source was deleted because that source ID
would become invalid. The effect being that deleting a source brought
users immediately to the create source page, rather than back to the
sources list.

This instead redirects users to the default source when provided an
invalid source id. The backend automatically re-assigns the "default"
source, so this will always succeed, since sources are fetched again
from the backend.

The regex used is slightly dependent on URL structure that has been
stable over the lifetime of this project. Also it relies on URL
structure more than the previous redirecting implementation.

* Force sources to reload after deletion

Deleting a source invalidates the state held by the client because of
automatic re-assignment of the default source by the backend. Without
duplicating backend logic, it is impossible for the frontend to discover
the new source without reloading sources.

The ManageSources page now uses an async-action creator which deletes
the requested source and reloads all sources. The source action creators
have also been refactored to use implicit returns like other action
creators.

* Remove Dead removeSource action

removeSource is no longer used because the API invalidates its
assumptions. For more information, see 04bf3ca.

* Update Changelog with source deletion redirect fix

Users are no longer unexpectedly redirected to the "create source" page
whenever they delete a source that they are connected to.

* Return 404 when deleting non-existent source

When deleting a source, a new default is assigned automatically. If a
non-existent source ID was provided, previously this would result in a
500. This is a violation of the Swagger docs. The solution is to examine
the error and if it was an ErrSourceNotFound, invoke the notFound
handler.

* Add Error handling to source deletion

There are two kinds of errors that can be encountered when deleting a
source: a 404 and a 500 (from either the delete or the subsequent
fetch).

The 404 is a precondition failure of the action creator. The source.id
requested can be non-existent for two reasons: 1) The action creator was
passed garbage by the caller. 2) A concurrent write occurred which
silently invalidated this session's state. For the first case, we can
ensure that the caller is sane by having an assertion check that the
requested source is among some set of sources. This could be
circumvented by a caller, but chances are good that both the full set of
sources and the desired source are both available to callers of this
action creator. The second case is not an error. In this case, we should
proceed reloading sources, since the deletion that was requested has
already been performed by someone else.

Finally, 500s can only occur if there is something broken with the API.
In this situation, we provide a notification that tells the user to
check the API logs for more information.

* Remove duplicate CHANGELOG entries

These were introduced due to a naive merge conflict resolution.

* Remove assertion

This was decided to be confusing and unnecessary.

* Remove remnants of removed assertion

These were needed for an assertion that has been removed. It's no longer
necessary to pass `sources` to the action creator.
2017-03-28 08:53:11 -07:00
Alex P 3d2563b693 Merge branch 'master' into ui-polish 2017-03-27 19:01:10 -07:00
Alex P b467d53358 Comment out cell dragging css
Going to re-implement later when we have a way to differentiate between
editable and non-editable cells
2017-03-27 18:57:29 -07:00
Alex P 078e72fd78 Make custom cursors slightly smaller and higher contrast 2017-03-27 18:17:48 -07:00
Alex P b1d13d29ff Polish and small refactor of query builder styles 2017-03-27 17:27:52 -07:00
Alex P 65860b3512 Bring the cool edit mode styles out of edit mode
However does need to be scoped to “editable” cells
2017-03-27 17:23:01 -07:00
Hunter Trujillo 4312297896 No need to coerce a string into another string. 2017-03-27 18:03:06 -06:00
Hunter Trujillo 84fba8a5a0 Merge branch 'master' into bugfix/1003-hosts-loading-message
# Conflicts:
#	CHANGELOG.md
2017-03-27 17:42:57 -06:00
Hunter Trujillo e810a173ff Remove up property from HostsPage component. It does nothing. 2017-03-27 17:31:37 -06:00
Hunter Trujillo f51c0c5b54 Fix messaging for hosts page when there are no hosts. Add appropriate error messages. 2017-03-27 17:29:39 -06:00
Jared Scheib 660d764b7e (Fix) Graphs are now resizable again (#1085)
* (Fix) Graphs are now resizable again

* Update changelog
2017-03-27 15:32:40 -07:00
Andrew Watkins 9fd25569a5 Fix DBRP page bugs (#1072)
* Fix confirm button not deleting a DB

* Fix cancel delete button

* Fix no name pass on creation of RP
2017-03-27 14:14:42 -07:00
Alex P 81aef4e42a Merge branch 'master' into ui-polish 2017-03-27 12:24:58 -07:00
Alex P 74b9268a62 show Invert cursor on graphs 2017-03-27 12:24:50 -07:00
Alex P c751ccc014 Replace standard cursors with custom ones 2017-03-27 12:24:24 -07:00
Alex P e0789f1ca6 Add custom cursors and stylesheet 2017-03-27 12:23:58 -07:00
Alex P fef01356d6 Add 2 new icons to font
Solid style Crown & Server
2017-03-27 12:08:10 -07:00
Jared Scheib a694f25425 Graphs are no longer editable from a Host Page (#1069)
* Graphs can now not be edited in on a HostPage

* Update changelog
2017-03-24 17:33:48 -07:00
lukevmorris c1ba6e7983 Save and Cancel edits to dashboard name (#1065)
* Move isEditMode from Redux to component state

* Use ConfirmButtons instead of Save button

* Save and Cancel dashboard name edits with ConfirmButtons

* Handler should operate on values instead of events

* Update CHANGELOG
2017-03-24 16:56:46 -07:00
Andrew Watkins 130156dfbe Merge pull request #1063 from influxdata/dbm-polish
Fix DB manager table column sizing
2017-03-24 14:04:19 -07:00
Andrew Watkins eb3454802a Fix DB manager table column sizing
The delete RP button was not rendered if
there was only one RP for that RP's database.
This caused the table columns to render in different
sizes.  Hiding the button keep the same functionality but
preserves the sizing for the table.
2017-03-24 13:51:49 -07:00
Luke Morris a45e1a0816 Merge branch 'master' into 1060-remove_visualizations_bar 2017-03-24 13:32:25 -07:00
Luke Morris 1c2711241f Remove VisualizationSelector from Dashboard Edit Mode 2017-03-24 13:29:10 -07:00
Andrew Watkins 89f1d0b4b4 Make div a button 2017-03-24 13:26:22 -07:00
lukevmorris 148140effa NameableGraph Dropdown now contains an active Delete button (#1058)
* Dropdown now contains an active Delete button

* Prefer `filter` over `findIndex` => `slice`
2017-03-24 13:24:11 -07:00
Andrew Watkins 01ec21b483 Merge pull request #1029 from influxdata/feature/db-manager
Feature/db manager
2017-03-24 10:57:12 -07:00
Andrew Watkins 43c0961e69 Pass delete retention policy down down down 2017-03-24 10:42:59 -07:00
Andrew Watkins 8380ede50e Remove ability to update name 2017-03-24 09:49:32 -07:00
lukevmorris 2d8d546368 Create a new dashboard cell; Fix remaining bugs with Overlay (#1056)
* Relax query validation for cell endpoint

* Dashboards can now add a cell; Rebase over 950-overlay_technologies-edit

* Server now returns empty queries array when creating a new dashboard cell

* Use async/await pattern for addDashboardCell, add basic error handling

* Update names of methods and actions for editing and updating cells to match those for adding

Factor out newDefaultCell to dashboard constants

* Update CHANGELOG

* Fix bug where Overlay wouldn’t display for query-less cells

* We removed these validations
2017-03-23 17:50:21 -07:00
Jared Scheib 959b387f61 Introduce ability to edit a dashboard cell
* Correct documentation for dashboards

* Exclude .git and use 'make run-dev' in 'make continuous'

* Fix dashboard deletion bug where id serialization was wrong

* Commence creation of overlay technology, add autoRefresh props to DashboardPage

* Enhance overlay magnitude of overlay technology

* Add confirm buttons to overlay technology

* Refactor ResizeContainer to accommodate arbitrary containers

* Refactor ResizeContainer to require explicit ResizeTop and ResizeBottom for clarity

* Add markup and styles for OverlayControls

* CellEditorOverlay needs a larger minimum bottom height to accommodate more things

* Revert Visualization to not use ResizeTop or flex-box

* Remove TODO and move to issue

* Refactor CellEditorOverlay to allow selection of graph type

* Style Overlay controls, move confirm buttons to own stylesheet

* Fix toggle buttons in overlay so active is actually active

* Block user-select on a few UI items

* Update cell query shape to support Visualization and LayoutRenderer

* Code cleanup

* Repair fixture schema; update props for affected components

* Wired up selectedGraphType and activeQueryID in CellEditorOverlay

* Wire up chooseMeasurements in QueryBuilder

Pass queryActions into QueryBuilder so that DataExplorer can provide
actionCreators and CellEditorOverlay can provide functions that
modify its component state

* semicolon cleanup

* Bind all queryModifier actions to component state with a stateReducer

* Overlay Technologies™ can add and delete a query from a cell

* Semicolon cleanup

* Add conversion of InfluxQL to QueryConfig for dashboards

* Update go deps to add influxdb at af72d9b0e4ebe95be30e89b160f43eabaf0529ed

* Updated docs for dashboard query config

* Update CHANGELOG to mention InfluxQL to QueryConfig

* Make reducer’s name more specific for clarity

* Remove 'table' as graphType

* Make graph renaming prettier

* Remove duplicate DashboardQuery in swagger.json

* Fix swagger to include name and links for Cell

* Refactor CellEditorOverlay to enable graph type selection

* Add link.self to all Dashboard cells; add bolt migrations

* Make dash graph names only hover on contents

* Consolidate timeRange format patterns, clean up

* Add cell endpoints to dashboards

* Include Line + Stat in Visualization Type list

* Add cell link to dashboards

* Enable step plot and stacked graph in Visualization

* Overlay Technologies are summonable and dismissable

* OverlayTechnologies saves changes to a cell

* Convert NameableGraph to createClass for state

This was converted from a pure function to encapsulate the state of the
buttons. An attempt was made previously to store this state in Redux,
but it proved too convoluted with the current state of the reducers for
cells and dashboards. Another effort must take place to separate a cell
reducer to manage the state of an individual cell in Redux in order for
this state to be sanely kept in Redux as well.

For the time being, this state is being kept in the component for the
sake of expeditiousness, since this is needed for Dashboards to be
released. A refactor of this will occur later.

* Cells should contain a links key in server response

* Clean up console logs

* Use live data instead of a cellQuery fixture

* Update docs for dashboard creation

* DB and RP are already present in the Command field

* Fix LayoutRenderer’s understanding of query schema

* Return a new object, rather that mutate in place

* Visualization doesn’t use activeQueryID

* Selected is an object, not a string

* QueryBuilder refactored to use query index instead of query id

* CellEditorOverlay refactored to use query index instead of query id

* ConfirmButtons doesn’t need to act on an item

* Rename functions to follow convention

* Queries are no longer guaranteed to have ids

* Omit WHERE and GROUP BY clauses when saving query

* Select new query on add in OverlayTechnologies

* Add click outside to dash graph menu, style menu also

* Change context menu from ... to a caret

More consistent with the rest of the UI, better affordance

* Hide graph context menu in presentation mode

Don’t want people editing a dashboard from presentation mode

* Move graph refreshing spinner so it does not overlap with context menu

* Wire up Cell Menu to Overlay Technologies

* Correct empty dashboard type

* Refactor dashboard spec fixtures

* Test syncDashboardCell reducer

* Remove Delete button from graph dropdown menu (for now)

* Update changelog
2017-03-23 17:12:33 -07:00
Andrew Watkins 9648b66b6f Fix update retention policy 2017-03-23 17:10:13 -07:00
Andrew Watkins 635fc9824c Fix update sync 2017-03-23 17:09:47 -07:00
Andrew Watkins 7265f0f503 Remove delete for _internal db 2017-03-23 16:21:19 -07:00
Andrew Watkins 003961e016 Remove ability to delete if last RP 2017-03-23 16:12:59 -07:00
Andrew Watkins 7b0abbd604 Disable add rp button if currently adding an RP 2017-03-23 16:06:17 -07:00
Andrew Watkins 7c393d6159 Disable creation of DB when currently creating one 2017-03-23 15:58:28 -07:00
Andrew Watkins 05bdb193ef Add database naming styles 2017-03-23 15:36:48 -07:00
Andrew Watkins a502ff3e37 Remove noops from confirm db buttons 2017-03-23 15:11:03 -07:00
Andrew Watkins 9280741773 Hook up DBRP manager to backend 2017-03-23 15:06:22 -07:00
Jared Scheib 18ab8e3b91 Fix typo 2017-03-23 12:55:08 -07:00
Alex P 6a265552c0 Make Table rows slightly less condensed 2017-03-23 12:53:43 -07:00
Alex P 38cf643d4a Prevent host table headers from overlapping sort arrows 2017-03-23 12:45:27 -07:00
Andrew Watkins a2b3d6b725 Introduce create dashbaord 2017-03-23 12:24:10 -07:00
Andrew Watkins 5528377de5 Remove replication factor for OSS and simplify rf formatting 2017-03-22 17:15:45 -07:00
Alex P d7b6d3cd56 Adjust copy on create rule button to match other create buttons 2017-03-22 15:08:49 -07:00
Alex P cef05fbae3 Add create dashboard button to dashboards index 2017-03-22 15:08:26 -07:00
Andrew Watkins 84d3da7edd Update delete code requirements 2017-03-22 12:29:48 -07:00
Andrew Watkins db54e5963f Add validation for database name input 2017-03-22 10:00:21 -07:00
Andrew Watkins 5cf448e559 Add edit rp tests and refactor edit rp action 2017-03-21 17:08:02 -07:00
Andrew Watkins 585fef4f06 Add remove and add rp tests 2017-03-21 16:54:39 -07:00
Andrew Watkins e56f18154b Add remove database code test 2017-03-21 16:27:30 -07:00
Andrew Watkins 4990aa39a4 Remove redundant action 2017-03-21 16:11:42 -07:00
Andrew Watkins 38b381de87 Add database delete code test 2017-03-21 15:56:41 -07:00
Andrew Watkins a06e933467 Introduce remove database test 2017-03-21 15:51:14 -07:00
Andrew Watkins 32a5fc6de7 Add edit database test 2017-03-21 15:47:51 -07:00
Andrew Watkins 527e56bfa0 Introduce add database test 2017-03-21 15:34:13 -07:00
Andrew Watkins 2d9c26a463 Pull out default objects into constants dir 2017-03-21 15:33:30 -07:00
Andrew Watkins 2984c139a2 Fix test to use ∞ 2017-03-21 15:32:41 -07:00
Andrew Watkins d23ec6423f Use links instead of ids 2017-03-21 14:49:08 -07:00
Andrew Watkins 8e1e70ecf1 Remove default flag from default rp 2017-03-21 14:35:01 -07:00
Andrew Watkins 8aa99442d3 Fix cancel new rps 2017-03-21 14:31:00 -07:00
Andrew Watkins ba44273779 Add ∞ for infinite duration 2017-03-21 14:03:12 -07:00
Andrew Watkins ff6b9a3a21 Add rp input validation 2017-03-21 14:00:48 -07:00
Andrew Watkins b9054266f2 Change DatabaseRow to stateful to handle editing 2017-03-21 12:55:48 -07:00
Andrew Watkins 31c379f6a3 Make inputs uncontrolled 2017-03-21 10:56:51 -07:00
Andrew Watkins eab296a87d Handle new rp on click outside 2017-03-20 14:56:46 -07:00
Andrew Watkins 233a0cbaac Make rp not able to be empty 2017-03-20 14:53:49 -07:00
Andrew Watkins 338a65e21c Cancel edit rp on click outside 2017-03-20 14:53:26 -07:00
Andrew Watkins a64c3f7bcf Introduce cancel edit retention policy 2017-03-20 14:26:03 -07:00
Andrew Watkins 71a3fa47f7 Handle confirm button creation of RP 2017-03-20 11:53:00 -07:00
Andrew Watkins 9e1c4c29ef Add skeleton for retention policy creation 2017-03-17 14:56:06 -07:00
Andrew Watkins ac918a4306 Introduce remove rp from state 2017-03-17 13:48:57 -07:00
Andrew Watkins 4a3f2e1981 Introduce editing rp state 2017-03-17 11:51:42 -07:00
Andrew Watkins 7eebd623ea Remove cruft component 2017-03-15 16:25:18 -07:00
Andrew Watkins 885e40fb6e Introduce add retention policy to state 2017-03-15 16:21:38 -07:00
Andrew Watkins 94e4ea3d4b Introduce delete confirmation for database 2017-03-15 13:57:28 -07:00
Hunter Trujillo c62d19bfb3 Merge pull request #1024 from influxdata/bugfix/tr-broken-host-page
Fix Broken Host Page
2017-03-15 11:53:27 -06:00
Andrew Watkins 9d63d2ac13 Remove unnecessary handler 2017-03-15 10:00:23 -07:00
Andrew Watkins e114681ce6 Introduce skeleton for confirming and canceling db creation 2017-03-15 09:52:40 -07:00
Andrew Watkins 9e36c82d51 Merge pull request #1019 from influxdata/admin-polish
Admin Polish
2017-03-15 08:38:05 -07:00
Tim Raymond 03849bebb5 Make NameableGraph optionally editable
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.
2017-03-15 11:11:14 -04:00
Tim Raymond d8a289066e Make coords numbers in NameableGraph PropTypes
Cell coordinates were previously strings, which disagreed with how they
were being delivered from components which used NameableGraph. This
caused errors in the console.
2017-03-15 11:08:56 -04:00
Andrew Watkins f2f75a8963 Introduce add and edit database to state 2017-03-14 17:56:30 -07:00
Andrew Watkins 5dfb3d3a3e Move local components to independent files 2017-03-14 15:45:39 -07:00
Andrew Watkins 8c11ba392e Introduce addDatabase to store 2017-03-14 15:45:04 -07:00
Andrew Watkins 615f94d0f9 Move dbs and rps to redux store 2017-03-14 13:54:54 -07:00
Alex P 71393f4c60 Make Multiselect dropdown open state persist in admin tables 2017-03-14 12:06:11 -07:00
Alex P 5b88af52e1 Fix error in console for using <li> outside of <ul> 2017-03-14 12:05:43 -07:00
Alex P 6b44a5a1cd Capitalize item name in filter bar
Mo’ proppa
2017-03-14 12:05:17 -07:00
Andrew Watkins 47cdc368dd Display db and rp info 2017-03-14 11:51:25 -07:00
Hunter Trujillo 50093d18ff Add singular dashboard assertions to dashboard ui spec. 2017-03-14 11:16:07 -06:00
Hunter Trujillo 86512bda08 Can rename cell by pressing enter key. Clean up in reducers and actions. Added updateDashboardCells reducer, tested. 2017-03-14 11:01:27 -04:00
Tim Raymond aaf49d1d81 Implement NameableGraph as a stateless component
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.
2017-03-14 11:01:27 -04:00
Tim Raymond 7bb83ff9a2 Use implicit returns for dashboard action creators
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.
2017-03-14 11:01:27 -04:00
Tim Raymond 0525a8f938 Fix I/O Burn when editing cell name
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.
2017-03-14 11:01:27 -04:00
Tim Raymond 7ba45852e3 Fix Cell Rename to '' on layout change
`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.
2017-03-14 11:01:27 -04:00
Tim Raymond 3e42948dbf Alter cell renaming to use Redux for PUT
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.
2017-03-14 11:01:27 -04:00
Tim Raymond d40b9315d2 Implement Cell Renaming on Dashboards
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.
2017-03-14 11:01:27 -04:00
Andrew Watkins c3520806c0 WIP introduce database manager 2017-03-13 18:59:37 -07:00
Andrew Watkins 3da4fa1f5a Merge pull request #1012 from influxdata/feature/ent-validation
bugfix/ent validation
2017-03-13 16:49:34 -07:00
Andrew Watkins df02bf2fee Handle creation error 2017-03-13 16:39:06 -07:00
Alex P af313679aa Merge branch 'master' into alert-message-polish 2017-03-13 16:10:04 -07:00
Alex P 2561c9aeaa Move admin page styles to 1 page, join admin tabs to adjacent panel 2017-03-13 16:06:29 -07:00
Alex P ff3853f3f9 Make tables borderless 2017-03-13 15:50:38 -07:00
Alex P b923c04fc5 Make admin pages more space efficient 2017-03-13 15:50:24 -07:00
Andrew Watkins 3f08f69c3e Change replace create with update 2017-03-13 15:19:55 -07:00
Andrew Watkins 74f5961f1a Only display meta url input if enterprise
This also fixes bug #1009.
2017-03-13 15:15:43 -07:00
Andrew Watkins 5fb9fb4740 WIP only display metaURL if enterprise server 2017-03-13 14:42:05 -07:00
Andrew Watkins 9a5133577e Change ADMIN order on side nav 2017-03-13 13:28:47 -07:00
Andrew Watkins 97fee065ea Change input type to password 2017-03-13 13:28:26 -07:00
Alex P 9a3377d19a Rearranged rule message UI
Dropdown is at the top, so less likely to push down the page
2017-03-13 11:36:34 -07:00
Jared Scheib 4e2617ea24 Merge branch 'master' into feature/admin
Conflicts:
	CHANGELOG.md
	enterprise/users.go
	server/admin.go
	server/admin_test.go
	ui/.eslintrc
	ui/src/shared/constants/index.js
	ui/src/store/configureStore.js
	ui/src/style/theme/theme-dark.scss
2017-03-10 18:36:37 -08:00
Jared Scheib 45fbeb730a Return errors from AJAX 2017-03-10 17:37:45 -08:00
Jared Scheib b71f1b0cd0 Add tests for role create and update, refactor user create test 2017-03-10 16:48:56 -08:00
Jared Scheib b105f94673 Fix update dropdown when adding users, roles, and permissions (except users/roles), rename success actions for use across AJAX update requests, pass through error on AJAX update failure 2017-03-10 16:22:03 -08:00
Jared Scheib 7e43f08b5b Move admin constant to admin constants 2017-03-10 14:47:45 -08:00
Andrew Watkins c003ac0505 Remove warnings 2017-03-10 14:25:09 -08:00
Andrew Watkins f38f161646 Introduce update user 2017-03-10 14:24:15 -08:00
Andrew Watkins 864759125f Introduce update permissions for users 2017-03-10 13:30:17 -08:00
Andrew Watkins 138501d441 Remove plural 2017-03-10 13:01:22 -08:00
Andrew Watkins 8aaa6117f5 Fix tests 2017-03-10 12:52:18 -08:00
Andrew Watkins 2a2e452e2d Editing rows cleanup 2017-03-10 12:47:53 -08:00
Jared Scheib 51a7eae445 Add ability to add a role 2017-03-10 12:00:45 -08:00
Andrew Watkins e572c301c3 Merge pull request #990 from influxdata/feature/add-perms-to-users
Feature/ populate user perms from server
2017-03-10 11:36:42 -08:00
Alex P eb945719d8 Style new rows in admin tables
New users looking fly
2017-03-10 11:22:39 -08:00
Alex P 0fd4e96179 Remove commented out styles 2017-03-10 11:22:11 -08:00
Andrew Watkins ecde26ce6d Remove redundant nav item 2017-03-10 10:08:44 -08:00
Andrew Watkins aca367bdea Reintroduce hasRoles boolean 2017-03-10 10:08:26 -08:00
Andrew Watkins bf38f428dc Make roles not appear on OSS 2017-03-10 09:44:16 -08:00
Andrew Watkins dbade4bab6 Populate user permissions from server 2017-03-10 09:28:09 -08:00
Andrew Watkins 1eba2e5a1e Add LOAD_PERMISSIONS reducer logic 2017-03-10 08:40:35 -08:00
Andrew Watkins 22886d5183 Add getPermissions AJAX 2017-03-10 08:40:12 -08:00
Andrew Watkins 59b367bde6 Remove old linter overrides 2017-03-10 08:39:40 -08:00
Andrew Watkins 00d60f2034 Introduce loadPermissionsAsync action creator 2017-03-10 08:36:33 -08:00
Andrew Watkins 9a322d7b78 Add permissions to redux store 2017-03-10 08:35:51 -08:00
Andrew Watkins db019f1395 Populate role multiselect 2017-03-10 08:10:45 -08:00
Jared Scheib 9d14ad370b Fix roles bug when no users 2017-03-09 17:15:39 -08:00
Andrew Watkins 110f416bf3 Remove dup import 2017-03-09 14:52:01 -08:00
Andrew Watkins c724dca911 Add TODO 2017-03-09 14:44:55 -08:00
Andrew Watkins b5e432c764 Change order of arguments 2017-03-09 14:44:00 -08:00
Andrew Watkins f590aeaeb5 Add better name to actions 2017-03-09 14:44:00 -08:00
Andrew Watkins 703c352e21 Implement update role permissions 2017-03-09 14:43:17 -08:00
Andrew Watkins 43fb06285b Update linter to allow console.error 2017-03-09 14:43:17 -08:00
Andrew Watkins 4d15df6dbb Implement add users to roles 2017-03-09 14:43:16 -08:00
Andrew Watkins 476ea2a983 Show display all users in MultiSelect 2017-03-09 14:41:14 -08:00
Andrew Watkins 8c4a7b34a7 Merge pull request #975 from influxdata/feature/934-ew-admin_add-user
Add ability to add a new user
2017-03-09 14:17:55 -08:00
Jared Scheib bda2521d7c Rename action to redux convention 2017-03-09 13:59:10 -08:00
Jared Scheib dcaa72b57c Add tests for creating user 2017-03-09 12:48:37 -08:00
Jared Scheib b9d02d51f6 Fix confirm buttons display 2017-03-09 12:03:11 -08:00
Jared Scheib a417c72e35 Fix disable createUsers button when editing 2017-03-09 11:50:58 -08:00
Jared Scheib 760fc30f32 Clean up 2017-03-09 11:04:40 -08:00
Hunter Trujillo 0c9db03bef Merge pull request #980 from influxdata/misc-ui-polish
Shoe Polish
2017-03-09 12:02:27 -07:00
Jared Scheib 05fe3ecc79 Confirm created user, refactor editing mode, clean up 2017-03-09 11:00:00 -08:00
Alex P 8e2d67c4d6 Fix formatting 2017-03-09 10:49:53 -08:00
Jared Scheib 5efcb9a8f6 Fix deleting and editing existing users on edit with same name by using links.self as unique key 2017-03-09 10:09:05 -08:00
Tim Raymond 7ef85b6d54 Fix Flash of Unpopulated Graphs on Refresh
If a previous fetch of query results was unsuccessful, a "No Results"
message is displayed by the AutoRefresh component. When it went to fetch
results again, this would briefly be replaced by its composed compoenent
which would be instructed to show its "loading" treatment. Since "No
Results" is usually not a situation that would spontaneously change
without user intervention, this patch stores whether the previous fetch
was successful, and hides the loading treatment during subsequent
fetches if it wasn't.
2017-03-09 12:59:11 -05:00
Jared Scheib 889d553b77 addUser: Refactor to fully controlled inputs, edit user in-place, post new user successfully, simplify actions, disable Create button on editing, WIP clear editing & handle server responses 2017-03-08 17:20:57 -08:00
Alex P a2c8ab4867 Add Source Indicator to most pages 2017-03-08 16:20:30 -08:00
Alex P 9eec21e99d Change sourceIndicator to receive a string instead of an object 2017-03-08 16:20:17 -08:00
Alex P 398b29a758 Fix for #941 2017-03-08 16:00:50 -08:00
Alex P 0c2a5787c6 Create SourceIndicator component
Re-using this thing a lot
2017-03-08 13:20:50 -08:00
Alex P 19eabe5d7a Disable text selection on a ton of UI elements
much cleaner now
2017-03-08 12:17:47 -08:00
Alex P 1aa5aa1ecb Style Admin Tabs
Also modified the tabs components a bit to accept a custom class
2017-03-08 10:25:19 -08:00
Hunter Trujillo 73fcde0aba Appease the linter. 2017-03-08 05:49:57 -07:00
Jared Scheib 2f6d856c08 Add ability to add and cancel a new user, refactor UsersTable to be stateless, refactor ConfirmButtons into own file 2017-03-07 20:10:04 -08:00
Alex P b445e30843 Remove right margin on source indicator 2017-03-07 13:19:47 -08:00
Jared Scheib e15ee781c4 Add url via source to default new user 2017-03-06 23:53:38 -08:00
Jared Scheib 5faac0fa1b Merge 'origin/feature/934-ew-admin' into 'feature/934-ew-admin_add-user' 2017-03-06 23:44:39 -08:00
Jared Scheib cbe074ccdc Add test for removeAddedUser 2017-03-06 23:23:14 -08:00
Jared Scheib cf08585df9 Add test for addUser 2017-03-06 23:21:10 -08:00
Jared Scheib c450a0c7cf Fix losing url after delete 2017-03-06 23:15:16 -08:00
Jared Scheib 2081ab96bc Resolve conflicts to merge 'feature/934-ew-admin' into 'feature/934-ew-admin_add-user' 2017-03-06 23:09:51 -08:00
Jared Scheib 05da325d7c Suppress log, move constant to shared 2017-03-06 22:12:51 -08:00
Jared Scheib 63ea4d1b8b Clean up basic validation 2017-03-06 21:51:19 -08:00
Jared Scheib 2e97577605 Handle 'Enter' keypress 2017-03-06 21:50:07 -08:00
Jared Scheib 729752b5b8 Fix removing optmistically added user 2017-03-06 21:49:49 -08:00
Jared Scheib 8f89c8b4ac Clean up 2017-03-06 21:48:06 -08:00
Jared Scheib 5159d93f6f Add input placeholders and autofocus 2017-03-06 20:26:54 -08:00
Jared Scheib 9db2c4dfaf Optimistically update Users list on add, handle errors on add user, fix AJAX error handling, refactor component state handler 2017-03-06 20:14:02 -08:00
Jared Scheib c53270ffad Add ability to add a user+password and basic form validation 2017-03-06 17:33:03 -08:00
Hunter Trujillo 8e4ae37d29 Clear filter smartly 2017-03-06 17:44:49 -07:00
Hunter Trujillo 420c22db73 Handle no roles like a pro 2017-03-06 17:42:07 -07:00
Hunter Trujillo bc5893ae13 Add filtering capability to users and roles admin pages. 2017-03-06 16:46:07 -07:00
Alex P 2a632d9c36 Make rule page save button always "success" style 2017-03-06 14:43:05 -08:00
Alex P a82b98598d Re-style disabled buttons 2017-03-06 14:42:48 -08:00
Jared Scheib 8721a1cbed Track editing of new user name 2017-03-06 14:38:03 -08:00
Alex P c9d2d48944 Toggles don't wrap anymore 2017-03-06 14:26:44 -08:00
Alex P aabc1011e2 Query + button has proper margins 2017-03-06 14:26:35 -08:00
Hunter Trujillo e9dc8dddf3 Add flash message on success and error states for user removal. 2017-03-06 15:25:02 -07:00
Jared Scheib 3a9a850499 Refactor to less stateful component, add cancel and save buttons 2017-03-06 14:22:39 -08:00
Hunter Trujillo 586e660271 Reset state of delete row button when user has clicked outside. 2017-03-06 14:24:41 -07:00
Hunter Trujillo c89d5d02df Add styles improvements for deleting rows. 2017-03-06 14:22:03 -07:00
Hunter Trujillo 0fb3f56c6d Add confirmation before deleting a role or user. 2017-03-06 14:08:03 -07:00
Hunter Trujillo 2e363b2b38 Add capability to delete users. 2017-03-06 13:39:59 -07:00
Hunter Trujillo e214afba82 Add capability to delete a role. 2017-03-06 13:22:54 -07:00
Jared Scheib e7db0f474f Show input box when editing 2017-03-06 12:17:07 -08:00
Jared Scheib 630dec75d6 Add Create User button 2017-03-06 11:36:44 -08:00
Chris Goller 18553deeff Fix dashboards to use specified database 2017-03-06 13:29:26 -06:00
Jared Scheib b577515b06 Refactor to test combined appReducer, add tests for ephemeral app state reducer 2017-03-03 17:06:47 -08:00
Jared Scheib 80e6e14b0d Add test for autoRefresh reducer 2017-03-03 16:57:05 -08:00
Jared Scheib 2751a00813 Fix revert failure chain and thus: add autoRefresh with pause 2017-03-03 15:30:33 -08:00
Hunter Trujillo 7ae8fd744b Add delicious styles and yummy JSX to make lovely role component biscuits 2017-03-03 16:05:49 -07:00
Jared Scheib 09a065bae3 Merge master after messed-up revert #962 2017-03-03 14:52:37 -08:00
Hunter Trujillo 66e6840711 Merge branch 'feature/hover-glory' into feature/934-ew-admin_edit-table-rows
# Conflicts:
#	ui/src/admin/components/RolesTable.js
2017-03-03 15:43:42 -07:00
Hunter Trujillo 27c9a6e2dd Small styles changes. 2017-03-03 15:25:12 -07:00
Andrew Watkins 874e41075a Revert "Allow user to set auto-refresh interval" 2017-03-03 14:22:07 -08:00
Jared Scheib b15cac73c8 Add AutoRefresh Pause option 2017-03-03 14:20:07 -08:00
Hunter Trujillo d2782080b8 Merge commit '420d0bad806c952079d4a010461c69e21c392519' into feature/934-ew-admin_edit-table-rows 2017-03-03 15:15:22 -07:00
Andrew Watkins 225cc64453 Merge pull request #957 from influxdata/781-autorefresh_config
Allow user to set auto-refresh interval
2017-03-03 14:02:24 -08:00
Alex P 420d0bad80 Add checkboxes to list items in multi-select dropdown 2017-03-03 13:53:48 -08:00
Jared Scheib 8556b51c39 Merge remote-tracking branch 'origin/master' into 781-autorefresh_config 2017-03-03 13:35:03 -08:00
Jared Scheib 3d1aa9eac7 Refactor app ui and config reducers, clean up 2017-03-03 13:34:04 -08:00
Andrew Watkins d991c55167 Add hover css to role table rows 2017-03-03 12:33:52 -08:00
Alex P a16f8f80c1 Add pause icon to icon font 2017-03-03 11:16:49 -08:00
Jared Scheib 276d9ef274 Add RoleRow with MultiSelectDropdown 2017-03-02 17:06:44 -08:00
Jared Scheib 108884c337 Add MultiSelectDropdown to UsersTable 2017-03-02 16:30:59 -08:00
Jared Scheib 6c675a89a0 Use shared MultiSelectDropdown, lint 2017-03-02 15:42:51 -08:00
Andrew Watkins 532b63eb99 Merge branch 'feature/934-ew-users' of github.com:influxdata/chronograf into feature/934-ew-users 2017-03-02 15:04:48 -08:00
Andrew Watkins 78c7eb804d Add fix to work with enterprise 2017-03-02 15:04:36 -08:00
Jared Scheib a49ef359bb Merge pull request #947 from influxdata/feature/934-ew-users-hunter
Add stateful class MultiSelectDropdown shared component, add Tooltip, add Storybook stories for testing
2017-03-02 14:53:34 -08:00
Hunter Trujillo 82f320c5ac Forgot to save one of my files... 2017-03-02 15:11:38 -07:00
Hunter Trujillo ec23d41342 Refactor label text logic into function. Add stories for testing label text logic function. Add fancy ellipsis to long item lists. 2017-03-02 15:05:26 -07:00
Andrew Watkins 4f587028a9 Merge pull request #956 from influxdata/bugfix/846-rule-disable
Fix rule disable bug
2017-03-02 13:08:56 -08:00
Andrew Watkins 0dee8bba3f Handle no roles on users table 2017-03-02 13:06:55 -08:00
Andrew Watkins 2a6ce303a7 Move QueriesPage into admin tabs 2017-03-02 13:06:55 -08:00
Andrew Watkins 06753a596a Add move QueryPage state into redux 2017-03-02 13:06:55 -08:00
Andrew Watkins a6295cb0c3 Move QueriesTable into stateless functional component 2017-03-02 13:06:15 -08:00