Commit Graph

250 Commits (c5bce2ae7f158ba30c88ad3022af8eea1ab70180)

Author SHA1 Message Date
Jade McGough f42f7166f9 fix bugs 2016-12-15 11:27:06 -08:00
Jade McGough 417e923fe6 dashboard, not dashboards 2016-12-15 00:50:38 -08:00
Jade McGough 899fcbce86 be sure to create dashboardsbucket in bolt 2016-12-15 00:49:43 -08:00
Jade McGough bdf65400f2 formatting 2016-12-14 12:12:20 -08:00
Jade McGough 77cab972a6 add update func to dashboards 2016-12-14 00:12:36 -08:00
Jade McGough de0efa0b27 omg it compiled 2016-12-13 23:56:26 -08:00
Jade McGough 16327a87d7 wow did it actually just compile? 2016-12-13 23:22:54 -08:00
Jade McGough 582bde4657 fix errors 2016-12-13 22:57:52 -08:00
Jade McGough 282394c01d fix issues in dashboards internal 2016-12-13 16:19:42 -08:00
Jade McGough 2bdedc0683 update internal.pb.go 2016-12-13 03:07:24 -08:00
Jade McGough 39ba29b893 add and get methods for dashboard 2016-12-13 02:44:19 -08:00
Jade McGough 76fb9a95c4 add marshal/unmarshal for dashboards 2016-12-13 02:25:26 -08:00
Jade McGough 9ba8820c42 WIP 2016-12-08 19:28:40 -08:00
Jade McGough dc95ca2b6e add type to cell interface 2016-12-06 02:48:12 -08:00
Jade McGough f0767d4505 add type to marshal/unmarshal 2016-12-05 21:46:30 -08:00
Jade McGough 5088c76a12 add type to Cell 2016-12-05 21:27:47 -08:00
Chris Goller 38394152d6 Update layout ylabel and yrange to be properties of the query. 2016-11-30 14:13:15 -08:00
Chris Goller 761ec9d66d Add ylabels and yranges to layouts 2016-11-30 14:04:32 -08:00
Tim Raymond 4ba7e10931 Fix template layout ordering
This divides templates into two classes: autoflow and static. This is
controlled by a boolean "autoflow" property on templates. Any autoflow
templates that will be rendered for a host, have their cells arranged in
a left-to-right, top-to-bottom fashion.

Static templates, are assumed to have precise positioning information
for their graphs. The only adjustment made to them will be a translation
of their Y coords so they do not overlap other layouts.

The autoflow templates, after processing, become a static layout as
defined above and are positioned accordingly.
2016-11-29 17:41:19 -05:00
Will Piers c749203b11 Dont render routes if user is not authenticated 2016-11-21 14:20:33 -07:00
Will Piers fe14fd74e3 Add users endpoints/storage plus me endpoint 2016-11-21 14:19:57 -07:00
Chris Goller 8f890378e2 Fix tab spacing in protobuf and swagger 2016-11-18 16:07:53 -06:00
Chris Goller 6067d5aaa8 Update sources endpoint to take optional telegraf database name. 2016-11-18 16:07:53 -06:00
Chris Goller 50044a8e89 Fix problems found by https://github.com/dominikh/go-staticcheck 2016-11-14 11:04:32 -06:00
Chris Goller 6484509b56 Merge pull request #403 from influxdata/bugfix/tr-singular-default-source
Make API guarantee one default source at all times
2016-11-08 11:57:13 -06:00
Tim Raymond b0860ca903 Make argument order of setRandomDefault consistent
Most of the other private CRUD methods have a consistent argument order
of a context, a source, then a transaction. setRandomDefault had two of
these args transposed, so this swaps them to be consistent with the rest
of the methods.
2016-11-08 12:29:29 -05:00
Tim Raymond d4f2434399 Make context.Context the first argument
This is the convention.
2016-11-08 12:14:06 -05:00
Tim Raymond b8e335fbee Prevent deadlocks with source default enforcement
Previously, the logic to enforce on default source relied on the
public-facing CRUD methods already provided by SourcesStore. This was
prone to deadlocks due to the possibility of acquiring a transaction
within a transaction.  This extracts the logic that was performed within
the transactions of each CRUD action and makes the private methods that
receive a *bolt.Tx.  This allows the convenience methods that enforce
default source to use this private API and provide the transaction from
its caller. This ensures that there is only ever one transaction
acquired by each expored
CRUD method.
2016-11-08 12:09:35 -05:00
Chris Goller 8d97980aad Add wheres to layouts 2016-11-07 20:35:46 -06:00
Tim Raymond 493befbdc7 Enforce default constraints on first/last source
Whenver sources are present, there should be exactly one default source.
Prior to this commit, it was possible to add the first source as a
non-default source and circumvent this invariant. This unfortunately
requires a bit of special-casing logic in s.Add and requires a query to
fetch the number of sources currently persisted.

Tests have been added to cover this as well as deleting the final
source, to ensure that there aren't any odd indexing panics that might
result from trying to find another candidate default source when
deleting.
2016-11-07 18:13:23 -05:00
Tim Raymond d03d47b9ad Extract Default source enforcement logic
Enforcing the constraint that there be exactly one default source
whenever there are sources present isn't really a concern of the
traditional CRUD methods that are provided by SourcesStore. This makes
this separation a little more explicit and provides a place to glue some
documentation onto what would otherwise be a confusing bit of business
logic in the write path of SourcesStore.
2016-11-07 18:13:23 -05:00
Tim Raymond 193765ead2 Auto-set default source on Add and Delete
Previously, when adding a new default source, it was possible to create
more than one default source, since the previous default would not be unset.

Implementing this revealed another issue where deleting the default
source would leave no default set. If the default source is deleted now,
another source is chosen to be the new default.
2016-11-07 18:13:23 -05:00
Tim Raymond 4a02ad7525 Enforce single default source on update
This ensures that there will only be on default source upon setting a
new default by unsetting the default flag on all other sources. This
only happens when the source to be updated has Default set to true to
avoid a performance hit when updating other attributes.
2016-11-07 18:13:23 -05:00
Chris Goller b274363149 Add groupby options to layouts 2016-11-07 16:31:48 -06:00
Chris Goller 73cbc4abc6 Fix bolt scoping and minor kapacitor tickscript updates 2016-11-03 22:25:41 -05:00
Chris Goller a95c998300 Update to store alert information in boltdb 2016-11-03 19:52:13 -05:00
Tim Raymond 3dc2fa9592 Add I and Name to protobufs
I and Name were added to support react-grid-layout. They were added to
the chronograf types, but not to the protobuf definitions, so the only
layouts that could make use of them were the canned variety. This allows
layouts' I and Name to be persisted as well.
2016-10-28 18:03:34 -04:00
Chris Goller 12348d72cb Refactor to remove autogenerated code. 2016-10-26 22:10:52 -05:00
Chris Goller 8911b0fd78 Update name to chronograf 2016-10-20 09:39:40 -05:00
Chris Goller f6770830f9 Update layouts to use ID generation. 2016-10-10 21:00:49 -05:00
Chris Goller c9dc1d492a Add pre-canned application layout store. 2016-10-10 20:40:16 -05:00
Chris Goller 41d6341a36 Update layout to use uuid v4 string as ID parameter. 2016-10-10 17:08:52 -05:00
Chris Goller 7aec0e93bf Add ability to to filter layouts by apps or measurements. 2016-10-06 18:31:56 -05:00
Chris Goller 21ec6cd72f Add layouts endpoint and storage 2016-10-05 23:43:13 -05:00
Chris Goller 53537041a9 Fix exploration update time; fix exploration PATCH to be RFC 7396; update exploration PATCH to return 200 and body. 2016-10-04 15:33:32 -05:00
Chris Goller 5f24c1994e Update kapacitor endpoint to be scoped to sources 2016-10-04 12:49:12 -05:00
Chris Goller ab6d177dc6 Add kapacitors endpoint (persist/proxy/rest) 2016-10-04 12:48:36 -05:00
Chris Goller 2b56cae221 Add persistence to sources and use bolt by default 2016-09-30 15:39:27 -05:00
gunnaraasen 16b79cebec Update exploration store interface to return exploration on add 2016-09-29 10:24:54 -04:00
gunnaraasen e45dbdc630 Refactor the exploration store 2016-09-29 09:38:35 -04:00