Commit Graph

117 Commits (e0f4ac74d10c25c49292a5796e74f77bac299c76)

Author SHA1 Message Date
Michael de Sa 7a45bba4f7 Place user role consts and vars in server package
This also decouples the bolt tests from the server package.

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-16 18:43:56 -05:00
Michael de Sa 00004a33da Use cmp.Diff for user equality comparison
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-16 16:46:20 -05:00
Michael de Sa 8fe197b02f Clean up redundant error checks
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-16 14:33:47 -05:00
Michael de Sa 255541ee0a Add name to bolt UsersStore test
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 20:01:35 -04:00
Michael de Sa 71ca669283 Make chronograf user roles explicit vars
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:58:45 -04:00
Michael de Sa 250eb9b730 Factor out code in common bolt UsersStore tests
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:52:34 -04:00
Michael de Sa e25ac2045c Use numberic style ID in UsersStore Get test
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:37:51 -04:00
Jared Scheib 7b8e424f03 Regenerate protoc to remove formatting changes
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:33:46 -04:00
Jared Scheib ac9984c799 Remove unused concept of RolesStore
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:33:31 -04:00
Michael de Sa 924c890862 Refactor bolt UsersStore to use ID instead of name
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:33:16 -04:00
Michael de Sa f1a496b449 Add tests for updating user in boltdb
Adds tests for updating roles, provider, and scheme

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:32:54 -04:00
Michael de Sa 4761f4454c Set ID on retrieved user from boltdb
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:32:35 -04:00
Michael de Sa 7f4af358ae Add roles to boltdb UsersStore
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:31:44 -04:00
Jared Scheib 5947427e3f Update bolt UsersStore for updated chronograf User
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:31:26 -04:00
Michael Desa 334a3c5d34 Refactor bolt.RolesStore to use bolt.UsersStore
Add definitions for user roles and permissions in chronograf package

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:31:15 -04:00
Michael de Sa c4eedd8c47 Remove old bolt implementation of RoleStore
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:31:06 -04:00
Jared Scheib 385a534ae2 Refactor Roles & Protobuf to be part of User msg
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:30:50 -04:00
Michael Desa b7e7aa9c5d WIP: Add BoltDB implementation of RolesStore
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:30:34 -04:00
Jared Scheib e1bd08838f Add Role and Permission messages to protobuf
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-12 19:30:09 -04:00
Jared Scheib 35d6f0b8c3 Use string IDs in JSON res and req for Users
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-10 12:27:55 -07:00
Jared Scheib 37183d871c Implement CRUD routes & operations for Chronograf User
Move source Users code into source_users and source_users_test files.
Use the UsersStore for both InfluxDB and Chronograf users.

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-09 14:16:24 -07:00
Chris Goller 486a5bfb33 Update dashboard cells to have optional data source URI. 2017-10-02 12:50:42 -07:00
Andrew Watkins 1ab6e55965 Update tests for scale to default to linear 2017-08-24 09:23:22 -07:00
Andrew Watkins 72cba23a44 Default scale to 'linear' 2017-08-23 21:08:17 -07:00
Tim Raymond e3d8aeead5 Add Axes to Cells on Layouts
This allows a creator of a layout to specify the visible extents of
graphs for individual cells. For example, a cell displaying a
percentage could be limited to values between 0 and 100.

Existing canned layouts need to updated as a separate step. However,
this adds support for Axes to appear in them as well.
2017-08-23 16:08:32 -07:00
Tim Raymond 5eeb520175 Add Scale attribute to Cell Axis
This allows clients to specify the magnitude of numbers found on a
particular axis.
2017-08-23 15:58:28 -07:00
Tim Raymond 7266cd75e6 Add Prefix, Suffix, and Base to Axes
We would like to add additional user-configurable options to the display
of axes on Dashboards. This adds three fields to expand settings that
the frontend can persist through the API.

One field of interest here is the "Base" field which controls when and
how axes transition the display of values such as bytes, kilobytes,
megabytes, etc. By default, it's returned from the API as "10" to
indicate decimal, but can be set to anything the frontend wishes--the
immediate differing value will be "2" for the aforementioned use case.
2017-08-23 15:58:28 -07:00
Tim Raymond 42556a9f5e
Add Label to Layout Cells' Axes
We added a Label to DashboardCells' Axes. This brings Layout Cells into
parity with them.
2017-08-10 13:53:00 -07:00
Tim Raymond 8674368da6
Update Bounds to follow string format
We updated DashboardCell to use string bounds rather than the [2]int64{}
we were using before. This brings the Layout cells to parity with that
2017-08-10 13:52:51 -07:00
Tim Raymond 2f63c1222e
Add Axes to Cells on Layouts
This allows a creator of a layout to specify the visible extents of
graphs for individual cells. For example, a cell displaying a
percentage could be limited to values between 0 and 100.

Existing canned layouts need to updated as a separate step. However,
this adds support for Axes to appear in them as well.
2017-08-10 13:52:43 -07:00
Tim Raymond 63cddc96e4 Merge branch 'master' into feature/1602-graph-bounds-setting
Also removed LegacyBounds marshaling since it was no longer necessary

Conflicts resolved:
	bolt/internal/internal.go
	bolt/internal/internal.pb.go
	bolt/internal/internal.proto
	bolt/internal/internal_test.go
	chronograf.go
	server/cells_test.go
	server/dashboards_test.go
	server/swagger.json
2017-08-02 11:29:29 -04:00
Tim Raymond 89c0d84a8d
Add Label to DashboardCell Axis
It's useful for the frontend to be able to specify a label on a
particular axis. This adds a property to Axis to facilitate that.
2017-08-02 11:12:47 -04:00
Tim Raymond d6322ae8f1
Return nothing from previously set bounds
Previously, if bounds were not set, the default value that would be
returned was ["0", "0"], which is incorrect. This now returns [] when
there was nothing set for a particular axis.
2017-08-02 10:58:01 -04:00
Tim Raymond 0a042e2e0f
Convert Axis Bounds to []string
Due to various limitations with the previous implementation of Bounds as
a [2]int64{}, we've decided to change this to a []string{}. This will
allow clients to store arbitrary data specifying a bound and interpret
it as they wish.
2017-07-31 16:35:53 -04:00
Tim Raymond d94911f1b3 Add tests for Dashboard protobuf & misc renaming
There were previously no tests around Dashboard serialization to
protobuf, so this patch adds coverage for that. Also, the `go-cmp`
package has been introduced to replace our usage of `reflect.DeepEqual`
going forward because it has better comparison features that make it
more stable across Go versions and produces nice diffs in tests when
they fail, reducing the need for debug lines and manual inspection.
2017-07-24 14:04:23 -04:00
Tim Raymond bab3c7fa6a s/DashboardRange/Axis, format protobufs, 64-bit
"Axis" is a more consistent and appropriate name. Also, the formatting
the protobufs was all over the place, so this has been made consistent
using a first-column \t. Furthermore, a vim modeline was added to the
bottom to make it easier for editors to autoconfigure themselves to the
right format, since protobufs are not something that we edit everyday.

Also, 32-bit values have been substituted for 64-bit values in Protobuf
definitions.
2017-07-24 14:03:48 -04:00
Tim Raymond 068d0b1383 Add Axes to Dashboard Cells
The frontend would like to store viewport information for each cell so
that visualizations are zoomed to the proper extents upon rendering.
This adds a property to cells called "axes" which takes the following
shape:

```
{
   "axes" : {
      "y" : {
         "bounds" : [
            0,
            2
         ]
      },
      "y2" : {
         "bounds" : [
            1,
            3
         ]
      }
   }
}
```

Bounds specify the visible range for the axis, and are a 2-tuple of the
form [lower, upper]. Bounds are not implicitly inclusive or
exclusive--that determination is left for clients to make. Also, there
are no restrictions on the naming of axes.
2017-07-24 13:45:28 -04:00
Tim Raymond 7e6ddaaa9f
Add tests for Dashboard protobuf & misc renaming
There were previously no tests around Dashboard serialization to
protobuf, so this patch adds coverage for that. Also, the `go-cmp`
package has been introduced to replace our usage of `reflect.DeepEqual`
going forward because it has better comparison features that make it
more stable across Go versions and produces nice diffs in tests when
they fail, reducing the need for debug lines and manual inspection.
2017-07-21 11:11:30 -04:00
Tim Raymond b5f2bea66f
s/DashboardRange/Axis, format protobufs, 64-bit
"Axis" is a more consistent and appropriate name. Also, the formatting
the protobufs was all over the place, so this has been made consistent
using a first-column \t. Furthermore, a vim modeline was added to the
bottom to make it easier for editors to autoconfigure themselves to the
right format, since protobufs are not something that we edit everyday.

Also, 32-bit values have been substituted for 64-bit values in Protobuf
definitions.
2017-07-20 14:42:51 -04:00
Tim Raymond e513e61481
Add Axes to Dashboard Cells
The frontend would like to store viewport information for each cell so
that visualizations are zoomed to the proper extents upon rendering.
This adds a property to cells called "axes" which takes the following
shape:

```
{
   "axes" : {
      "y" : {
         "bounds" : [
            0,
            2
         ]
      },
      "y2" : {
         "bounds" : [
            1,
            3
         ]
      }
   }
}
```

Bounds specify the visible range for the axis, and are a 2-tuple of the
form [lower, upper]. Bounds are not implicitly inclusive or
exclusive--that determination is left for clients to make. Also, there
are no restrictions on the naming of axes.
2017-07-19 10:46:32 -04:00
Chris Goller c2adec4709 Add JWT shared secret influxdb auth
Refactor --new-sources to simplify adding shared secrets
2017-07-19 01:39:06 -05:00
Tim Raymond 45402f476d Add support for :autoGroupBy: template variable
This adds support for dynamic template variables that compute something
about themselves given some additional context.
2017-06-13 14:59:56 -04:00
Andrew Watkins 014103adf6 Resolve conflicts
Conflicts:
	ui/src/utils/influxql.js
2017-05-05 10:01:26 -07:00
Hunter Trujillo a7303e4354 Fix Go compiled file. 2017-04-26 15:29:20 -06:00
Hunter Trujillo 0d1c416c98 Merge branch 'master' into feature/template-variables
# Conflicts:
#	bolt/internal/internal.pb.go
#	ui/src/CheckSources.js
#	ui/src/dashboards/actions/index.js
#	ui/src/dashboards/containers/DashboardPage.js
#	ui/src/data_explorer/components/Visualization.js
#	ui/src/shared/components/AutoRefresh.js
#	ui/src/shared/components/Dropdown.js
2017-04-25 17:08:55 -06:00
Jade McGough 12f6a69e87 DRY bolt/servers.go code 2017-04-21 13:07:32 -07:00
Jade McGough 87af3b44a4 persist the currently active kapacitor in boltdb 2017-04-21 12:42:35 -07:00
Chris Goller 66662dcbc2 Fix whitespace in proto 2017-04-20 14:35:59 -05:00
Chris Goller 9d22d53259 Add template variables to bolt storage 2017-04-20 14:31:29 -05:00
Chris Goller e83d95b937 Update kapacitors rule's to use AST and kapacitor directly 2017-04-05 20:04:42 -05:00