Commit Graph

257 Commits (61d8a1c975e47c3f01f47e6249f242b03cd5e10c)

Author SHA1 Message Date
Jared Scheib adce9f159c Merge pull request #2435 from influxdata/multitenancy_prevent_bad_add_org_user
Prevent unintended update of existing user on Add; fix duplicate User & Org creation client UX
2017-12-04 14:15:27 -08:00
Jared Scheib 4cb40dee33 Change ErrOrganizationNameTaken to ErrOrganizationAlreadyExists for consistency 2017-11-30 20:12:00 -08:00
Jared Scheib 76b61a146e Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-11-30 19:07:40 -08:00
deniz kusefoglu 851149b397 Rename AlertHandlers to AlertNodes 2017-11-30 16:16:44 -08:00
Chris Goller 8821dd1c56 Update alert rules to remove Alert and AlertNode
Signed-off-by: Deniz Kusefoglu <denizk@gmail.com>
2017-11-30 16:32:47 -06:00
Chris Goller 180d3b0cdc Add kapacitor alert handler definitions 2017-11-30 16:32:47 -06:00
Michael Desa ff9dd97026 Add Num to UsersStore interface 2017-11-30 12:55:59 -05:00
Michael Desa 57b876ad36 Unscope sources by role
Previously, as a misunderstanding of
https://github.com/influxdata/chronograf/issues/1915 we allowed
sources to be scoped by role within an organization. This was incorrect.
We no longer user the roles implementation of a chronograf.SourcesStore
and just use the organizations store.

We've left the code around a roles SourcesStore in place, since it may
be useful to us in the future. It may be worth removing if it is
determined that this behavior is not desirable.
2017-11-29 17:32:41 -05:00
Chris Goller 3a07920d4c Merge branch 'master' into gauge-cell-type
Conflicts:
	bolt/internal/internal.pb.go
	bolt/internal/internal.proto
	server/cells.go
2017-11-27 16:08:42 -06:00
Andrew Watkins bde2e11cc1 Format TimeShift struct property descriptions 2017-11-21 10:37:07 -08:00
Chris Goller 8181e1eaf7 Add colors to all cells 2017-11-21 12:16:23 -06:00
Jared Scheib 59fb016a4e Merge branch 'master' into multitenancy 2017-11-14 00:05:18 -08:00
Luke Morris 9eccded4b2 Reuse chronograf.Organization type 2017-11-10 18:31:30 -08:00
Luke Morris 6d2c7e18d1 Rename whitelistOnly => public 2017-11-10 18:23:41 -08:00
Michael Desa b110a28278 Add WhitelistOnly to organizations
Fix adding default role to organization
2017-11-10 15:57:48 -05:00
Andrew Watkins e98e1896ae WIP Add shifts to queryConifg on backend 2017-11-10 11:06:48 -08:00
Michael Desa 9920f5e90e Ensure users name, provider, and scheme are unique 2017-11-10 12:29:17 -05:00
Chris Goller d41a89debf Refactor and simplify auto group by (:interval:) template variable 2017-11-09 10:02:24 -08:00
Chris Goller 3f87dd6e77 Refactor and simplify auto group by (:interval:) template variable 2017-11-08 11:27:35 -06:00
Michael Desa d40a374274 Add comments suggested from PR review
Add tests to server/stores_test.go
2017-11-07 13:59:40 -05:00
Michael Desa 8ded387a81 Add Role to chronograf.Source 2017-11-06 11:24:10 -05:00
Michael Desa 7200aaf9f9 Add default org logic to OrganizationsStore
Update resource handlers to appropriate consume default organization IDs
2017-11-06 10:14:12 -05:00
Michael Desa 292143f01b Add comment to default role in chronograf.go 2017-11-06 09:46:00 -05:00
Michael Desa 63f7d8205c Add default role to chronograf.Organization 2017-11-06 09:46:00 -05:00
Michael Desa b67b2e8d6e Fix over-stringification of organization on roles 2017-11-02 21:52:30 -04:00
Michael Desa f95a2963db Merge pull request #2215 from influxdata/multitenancy_add_orgs_to_me
Add CurrentOrganization & Organizations to me resp
2017-11-02 15:38:49 -04:00
Michael Desa bf22d1d57d Ensure uniqueness of organization names in bolt 2017-11-02 13:04:41 -04:00
Michael Desa 311c68f457 Add CurrentOrganization & Organizations to me resp
Remove CurrentOrganization from chronograf.User
2017-11-02 11:59:53 -04:00
Michael Desa e7a94c18d6 Add comments throughout codebase 2017-11-01 12:30:42 -04:00
Michael Desa f863bf2042 Add support for super admin 2017-10-31 18:27:24 -04:00
Michael Desa d6a0ab3488 Change OrganizationID to Organization in Roles
Fix formatting of proto file
2017-10-30 12:28:57 -04:00
Jared Scheib d6d3463208 Merge remote-tracking branch 'origin/multitenancy' into multitenancy_orgs
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-26 18:21:30 -04:00
Michael Desa 5e08464ecf Provide route to change current users organization
Add current Organization to JWT.
Use OrganizationUsersStore to retrieve Users that are not me.

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-26 18:06:52 -04:00
Nathan Haugo c720f8a9cb Merge pull request #2140 from influxdata/feature/kapa-insecure
Add insecure ssl support to connect to kapacitor
2017-10-26 10:40:28 -04:00
Jared Scheib cf530eddc6 Update Organization comments on resources
Remove `omitempty` on Organization field

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-25 14:56:08 -04:00
Michael de Sa e56299e72f Remove Organization from bolt Stores
Previously, each store depended on having an organization set on the
implentation of a store. This was used to segment different
organizations into different buckets. This PR undoes that work.

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-25 14:29:14 -04:00
Michael Desa e909ce9a1e Add Organizations to Dashboards 2017-10-25 14:00:06 -04:00
Michael Desa 57468b5fbe Add Organization to layouts 2017-10-25 12:52:56 -04:00
Michael Desa 71decb761e Add Organization to chronograf.Server 2017-10-25 12:42:50 -04:00
Michael Desa ef079a1899 Add Organization to Sources 2017-10-25 11:51:15 -04:00
Jared Scheib aa8742662f Merge branch 'master' into multitenancy 2017-10-24 17:58:15 -07:00
Jared Scheib 3b2818688a Make all Store names plural for consistency 2017-10-24 15:54:24 -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
Andrew Watkins 4353f8ac86 Merge pull request #2128 from influxdata/feature/qc-v2-alias
FEATURE:  queryConfig v2 && custom field alias persistence
2017-10-20 20:32:33 -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
Michael de Sa 30096623f9 Define Organization and OrganizationsStore
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-20 10:10:38 -04:00
Chris Goller 1b6724122c Add insecure ssl support to connect to kapacitor 2017-10-19 22:48:31 -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 8d472646cd Fix wrong authorization level on selected routes
Fix leaking of username on failed authorization

Add comment to chronograf.UserQuery

Fix logic in hasPrivilege method
2017-10-18 15:45:06 -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
Chris Goller 340e19f79a Update upper bound relative duration template expansion of :interval: 2017-10-17 14:26:26 -05:00
Nathan Haugo fe2173d6c5 Remove debugging lines and add case for less than 1 ms 2017-10-16 16:23:22 -05:00
Nathan Haugo 0491a7685b Made changes due to review 2017-10-16 16:15:12 -05:00
Chris Goller 7b786657aa Rename queryConfig field to Value and support top/bottom 2017-10-16 10:56:12 -05:00
Nathan Haugo b87befa0b3 Add support for millisecond groupbys 2017-10-11 13:14:44 -07:00
Chris Goller 6d6a2d4a2a WIP supporting integers/floats for influxql arguments 2017-10-11 14:45:01 -05:00
Chris Goller 8e9d5cbc2c Update queryConfig arguments to be optional in JSON response 2017-10-10 23:32:08 -05:00
Chris Goller 3c1b09704e Refactor query config field arguments to be fields 2017-10-10 18:04:45 -05:00
Chris Goller 3ba1a4c94d Refactor queryConfig to have field aliases and function arguments 2017-10-10 17:01:50 -05: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
Nathan Haugo 4d4a49103f Remove debugging artifacts 2017-10-04 12:51:58 -07:00
Nathan Haugo 9280ba9cbc Merge branch 'master' into feature/port-1.3.8.x-pixel 2017-10-04 12:47:23 -07:00
Nathan Haugo 6cbd33b9ee Fix tests for the updated group by time logic 2017-10-03 16:31:51 -07:00
Nathan Haugo 20360d44cc Port changes from 1.3.8.x for pixels per graph to master 2017-10-03 15:53:33 -07:00
Chris Goller 0e6a06d663 Update dashboard cells to have optional data source URI. 2017-10-02 12:50:42 -07:00
Chris Goller 35248b8044 Update kapacitor AlertRule to containe most Kapacitor Task information 2017-09-09 10:19:52 -05:00
Jared Scheib a8d0b763c3 Add Fill prop to chronograf queryConfig 2017-09-05 18:40:40 -04:00
Tim Raymond f50c4aebe0 Update commenting on new axis options
Existing comments were deemed unclear or inconsistent with convention.
2017-08-24 15:59:46 -07:00
Tim Raymond b08aa236bb Add Scale attribute to Cell Axis
This allows clients to specify the magnitude of numbers found on a
particular axis.
2017-08-24 15:59:42 -07:00
Tim Raymond a0555cf9fe 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-24 15:59:41 -07:00
Tim Raymond 8c1a091f62 Add nanosecond precision to :interval: calc
The UI for selecting time ranges produces nanosecond-precision times
for the template variables in the absolute time range. The regex for
absolute time ranges previously did not account for this precision,
which caused it to break.

This updates the regex to consider the nanosecond parts of an
RFC3339Nano timestamp and updates the associated tests. The Gobular link
has also been updated to a fresh playground used to debug this issue.
2017-08-24 11:37:25 -04:00
Timothy J. Raymond 61bffeb7cb Merge pull request #1859 from influxdata/feature/tr-layout-cell-axes
Add Axes to Layout Cells
2017-08-16 16:45:26 -04:00
Tim Raymond f6e1be290c 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 228920fde4 Add absolute time range support to :interval:
Previously, users of the :interval: macro were restricted to using a
relative time range in their queries, or the :dashboardTime: macro. This
permits users to also supply an absolute time range in the form of:

time > '2017-01-01T00:00:00Z' and time < '2017-06-01T00:00:00Z'
2017-08-08 11:09:51 -07:00
Tim Raymond a6be00d4f3 Remove omitempty from Axis Label
If the key is always present in the response, it's easier for the front
end to perform tests on contents of its key.
2017-08-02 13:08:33 -04:00
Tim Raymond 532a6a8c48 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 e545f91d8f 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 2ff3e27e1f 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 ede85f6964 Enforce only "x", "y", and "y2" axes
For the forseeable future, we will only be using the "x", "y", and "y2"
axes, even though the underlying serialization can support arbitrary
axes (for the future).

This ensures that only "x", "y", and "y2" axes are present and updates
the Swagger docs to reflect that fact
2017-07-24 14:06:15 -04:00
Tim Raymond a5bdc5ff61 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 cbbfd312ca 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 ee6a2fa54b Enforce only "x", "y", and "y2" axes
For the forseeable future, we will only be using the "x", "y", and "y2"
axes, even though the underlying serialization can support arbitrary
axes (for the future).

This ensures that only "x", "y", and "y2" axes are present and updates
the Swagger docs to reflect that fact
2017-07-21 12:09:49 -04:00
Tim Raymond 617fc38b14 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 f05c1d0774 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 8dc08278bd Add JWT shared secret influxdb auth
Refactor --new-sources to simplify adding shared secrets
2017-07-19 01:39:06 -05:00
Hunter Trujillo 025af5c1ca Merge branch 'master' into feature/1482-custom-time-range
# Conflicts:
#	ui/src/style/pages/dashboards.scss
2017-07-10 16:09:14 -06:00
Hunter Trujillo 7846beff3f Fix quoting around timeStamps. Affects server code. 2017-07-10 15:33:48 -06:00
Jared Scheib d7e73f55ad Move NewSources input prep to server
Signed-off-by: Tim Raymond <tim@timraymond.com>
2017-07-06 14:12:07 -07:00
Jared Scheib e61ffaa6a3 Clarify comment 2017-07-06 13:47:39 -07:00
Jared Scheib c455592103 Remove check on already existing Kapacitor
Clean up conditionals by refactoring to use loop label.
Incidentally this also fixed a bug that would not allow
a Kapacitor server to be added by the same name as one
that already existed, allowing the check to be removed
as well.
2017-07-06 12:18:33 -07:00
Jared Scheib f49badf4f0 Clean up conditionals 2017-07-06 12:04:34 -07:00
Jared Scheib 340ed6f40e Move throwaway parsing type into NewSources 2017-07-06 11:57:02 -07:00
Jared Scheib 3c3602a724 Update error messages to use plural 2017-07-06 11:48:14 -07:00
Jared Scheib 0c0d1a0e78 Log info if source already exists 2017-07-06 11:19:10 -07:00
Jared Scheib 52e65be69d Successfully persist new source and kapa via server flag
Move this to after BoltDb connection is opened
2017-07-05 18:12:08 -07:00
Luke Morris 68af7508d4 Tested + fixed bug in GROUP BY interval calculation 2017-06-16 15:54:15 -07:00
Tim Raymond a129fc29c0 Documentation++
Improve spellingz and document what "resolution" actually means in the
context of a query
2017-06-15 20:42:46 -04:00
Tim Raymond & Jared Scheib 5ce8a9dea5 Remove stubbed-out auto group by option
This was present for testing in development and is no longer needed.
2017-06-15 17:43:16 -04:00