Jared Scheib
54dff5cc4d
Clean up plurals in func comments
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 15:09:37 -07:00
Michael de Sa
04dae2629a
Test validOrganizationRoles comprehensively
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 15:08:01 -07:00
Michael de Sa
edf66aab81
Add comments to validOrganization
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 15:07:35 -07:00
Jared Scheib
4691234719
Ensure additional Users aren't created OrganizationUser.Add
...
Performs a Get against the global UsersStore, and if the User
already exists, it appends to that User instead of trying to add
the "new" User blindly.
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:53:50 -07:00
Jared Scheib
66eb1f824e
Rename userHasValidRoles to validOrganizationRoles for clarity
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:04:48 -07:00
Jared Scheib
fac9d03b09
Clarify Update methodology comment
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:04:05 -07:00
Michael de Sa
5fc62210b7
Test for error on Add Org User without context Org
...
Refactor guards in OrganizationUser bolt methods into comon func
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:53:30 -07:00
Jared Scheib
dbc08392e2
Improve test reporting for which user was deleted
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 13:45:09 -07:00
Michael de Sa
e1bdf22eba
Clean up derletion test name
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:43:25 -07:00
Michael de Sa
4d72ba6e4d
Make vars consistent
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:41:47 -07:00
Jared Scheib
18054c6645
Improve get no users test
...
Change rawWant to wantRaw
Remove fmt.Println
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 13:33:17 -07:00
Michael Desa
0aa28d7066
Add OrganizationUsersStore
...
bolt/organization_users_store contains a boltdb implementation of a
chronograf.UsersStore that filters the results based on the organization
that is set on the context.
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:29:46 -04:00
Michael de Sa
f873736c7c
Remove printing from Organization tests
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-23 12:08:49 -07:00
Jared Scheib
292bf00320
Rename Org field on stores to Organization
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-23 12:08:11 -07:00
Michael de Sa
faac66a9bd
Nest resources under Organizations
...
For each organization, we create a set of buckets for each associated
resource (sources, servers, layouts, and dashbaords).
The bucket name is the path join of the resource bucket name and the
oranizations name. If the organizations name is empty, then the bucket
name is the resource bucket name (this is backwards compatible with how
resources are currently stored).
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-20 13:50:19 -04:00
Michael Desa
de6ae41c60
Implement basic bolt OrganizationsStore
2017-10-20 11:13:13 -04:00
Jared Scheib
41386ca546
Add bolt implementation of OrganizationsStore
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-20 09:17:00 -05:00
Jared Scheib
5998923ab8
Add test coverage for Get with empty User
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-19 14:39:06 -05:00
Jared Scheib
19369b38cc
Set Scheme to be OAuth2 explicitly for all users
...
Add Provider to Users authenticated via /me
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-19 14:32:33 -05:00
Michael Desa
72640d3bd2
Add tests for retrieving user by name and provider
...
Fix incorrect error message
Cleanup old Get user test
2017-10-19 12:52:46 -04:00
Michael Desa
a0d300d280
Use new chonograf.UserStore Get method when needed
...
Refactor tests that were dependent of old implementation of UsersStore
2017-10-18 14:45:33 -04:00
Michael Desa
246e65e598
Generalize chronograf.UsersStore Get method
...
The `Get` method on the UsersStore was generalize by changing the second
parameter to a struct. This allows the Store to retrieve users by more
than simply their name.
-Get(ctx context.Context, name string) (*User, error)
+Get(ctx context.Context, q UserQuery) (*User, error)
2017-10-18 14:17:42 -04:00
Michael de Sa
c390678e43
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
1247323176
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
d9bec67e65
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
1bb3e560aa
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
506cdd0c42
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
854c5b03d4
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
22d56182cc
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
ecccfc0c72
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
09050b9c8e
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
40428588f2
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
75b0dbd43a
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
66eab84b40
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
f712d2204b
Add roles to boltdb UsersStore
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-12 19:31:44 -04:00
Jared Scheib
aedaafe426
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
fd50f2fc7e
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
3e3ca4d1a2
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
4db4ae5bcf
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
4be172d988
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
b7c78f4c56
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
2d88f15fdf
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
eb6c212023
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
0e6a06d663
Update dashboard cells to have optional data source URI.
2017-10-02 12:50:42 -07:00
Andrew Watkins
fac768c142
Update tests for scale to default to linear
2017-08-24 09:23:22 -07:00
Andrew Watkins
04f25f6915
Default scale to 'linear'
2017-08-23 21:08:17 -07:00
Tim Raymond
c6bcdcb884
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
715cdc9364
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
f6e029557b
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
4c2bb63553
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