Commit Graph

987 Commits (25152c5a3a0a4f678231506c65873f6bfc83aa7b)

Author SHA1 Message Date
Jared Scheib f21b347f4b Fix new log viewer config response underlying struct
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-09 17:37:30 -07:00
Alirie Gray 779f88199a Update swagger docs with refactored organization config API
Add definitions for Config and Organization Config
Replace /:section route with /auth and /org_config/logviewer

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:37:30 -07:00
Jared Scheib ae475c7ae8 Add OrganizationConfigStore & refactor org config to be per org
As previously implemented, OrganizationConfig was a global
object. This refactor adds the organization id to context for
every request, even when auth is disabled, so that org id
can be used to get/update an organization config.

Along those lines, this also removes OrganizationConfigStore
.Initialize and replaces .Get with .FindOrCreate, handling
the creation of organization configs upon first attempted
access.

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:36:19 -07:00
Jared Scheib ecb5347597 WIP Refactor log viewer config to be nested under organizations
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-09 17:36:19 -07:00
Alirie Gray 2319ac3ff8 Replace name "LogViewerUIConfig" with "LogViewerConfig" 2018-07-09 17:36:19 -07:00
Alirie Gray c33d4aa856 Add comments and refactored map syntax for validLogViewerUIConfig
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:36:19 -07:00
Alirie Gray 5894e8d881 Handle decoding request before retrieving config & := syntax for res
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:36:19 -07:00
Jared Scheib 571bca7743 Add & fix logViewer links in configResponse
Rename LogViewerUI to LogViewer in Config struct.
Make all instances of endpoint 'logviewer' (lowercase).
Make all instances of config.links.logViewer (camelcase).
2018-07-09 17:36:19 -07:00
Jared Scheib a546112a6f Correct two missed 'logViewer's to logviewer 2018-07-09 17:36:19 -07:00
Alirie Gray 981366c55b Change the log viewer UI config property "encoding" to "encodings"
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:36:19 -07:00
Alirie Gray 93b351f5e2 Validate log UI config on PUT, & refactor config API methods
Replaced /:section with specific hard-coded endpoints /auth
& /logviewer, and refactored service handler methods to
handle each route separately.

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:35:17 -07:00
Jared Scheib 4125399054 Add API to get/update log viewer UI config
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-09 17:35:17 -07:00
Christopher Henn 8c59019e98
Add missing brace in swagger.json
The docs at localhost:8888/docs failed to load due to an error parsing
the swagger.json file.
2018-07-09 10:44:27 -07:00
Deniz Kusefoglu d6be62dcab
Merge pull request #3817 from influxdata/tempvars/map-type-upload
Tempvars/map type upload
2018-07-03 15:32:44 -07:00
ebb-tide 9e960535b8 Add map as a template variable value type to the backend 2018-07-02 17:45:44 -07:00
Alirie Gray d8f707747c
Merge pull request #3814 from influxdata/feat/add-debug-endpoints
feat(server): add profiling routes to chronograf server
2018-07-02 15:48:49 -07:00
Michael Desa a9df1583ae feat(server): add profiling routes to chronograf server
In order to diagnose why the dashbords page we'll need to profile
chronograf. This commit adds the debug routes to chronograf.
2018-07-02 15:19:34 -07:00
Brandon Farmer c41bec0216 Remove concurrency from source authentication test 2018-07-02 14:30:08 -07:00
Brandon Farmer 934c4abab8 Use json ldap configuration over toml 2018-07-02 14:17:32 -07:00
Brandon Farmer 7fb22ebb8f Remove ldap specific endpoint
- LDAP information is now attached to source
2018-07-02 11:24:29 -07:00
Brandon Farmer 241d030ebe Make authentication method available in sources 2018-07-02 11:24:29 -07:00
Brandon Farmer e2734a0d03 Add endpoint for determining if ldap is enabled 2018-07-02 11:24:29 -07:00
Andrew Watkins 104a04316c
Merge pull request #3782 from influxdata/chore/fe-templating
Move template replacement to the frontend
2018-06-28 14:47:07 -07:00
Alirie Gray e94af3abe8 Add position property to LogViewerUIColumn Swagger definition 2018-06-28 13:41:12 -07:00
Andrew Watkins 3ff9eef934 Remove tempVars from backend queries response 2018-06-28 13:19:32 -07:00
Alirie Gray 28240034e5 Simplify LogViewerUIColumn Swagger definition
Combine mappings and formatting into "encoding."

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-06-28 13:07:40 -07:00
Andrew Watkins aa06c280f1 Remove template variable replacement from the backend 2018-06-28 12:42:28 -07:00
Alirie Gray 90a9520ce7 Add examples for LogViewerUIConfig/Column to Swagger docs 2018-06-28 11:27:46 -07:00
Jared Scheib 1e7f39bee2 Iterate on data models for Log Viewer UI config API
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-06-28 10:59:48 -07:00
Andrew Watkins 49d7998d08 Return query duration from /query endpoint 2018-06-27 17:05:35 -07:00
Alirie Gray d2c4f616b3 Simplify Swagger config API & add AuthConfig definition
Co-Authored-By: Jared Scheib <jared.scheib@gmail.com>
2018-06-27 15:17:14 -07:00
Alirie Gray 4f8a29d8dc Simplify log viewer UI config models in Swagger
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-06-27 15:07:17 -07:00
Alirie Gray 438c80abc1 Add a swagger definition for UI config settings and API Routes
Specifically, this adds a definition for getting and updating
the log viewer UI Settings, i.e. severityColors,
columns, and severityColumnFormat.

Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-06-26 17:12:00 -07:00
Christopher Henn 3e9de95d3f
Remove unused "query" template type 2018-06-20 09:17:12 -07:00
Christopher Henn 0ced327a2a
Fix failing template test 2018-06-19 16:37:02 -07:00
Christopher Henn 2a494b4f75
Support persisting "influxql" template variables 2018-06-19 16:24:40 -07:00
Iris Scholten 3722925a0b Update swagger 2018-06-19 14:57:48 -07:00
Iris Scholten 4ee1405dae Add map as a valid type of template variables in api 2018-06-19 14:50:16 -07:00
Jared Scheib edccd447c5 Allow hyphens and underscores in basepath 2018-06-15 17:05:01 -07:00
Andrew Watkins ed4a6f24e5
Change IFQL to Flux 2018-06-05 10:57:19 -07:00
Michael Desa 9b8e2facce Use platform query package instead of ifql package 2018-05-31 14:48:27 -04:00
Chris Goller f74f5a378f feat(server/services): add metadata for services 2018-05-21 10:45:28 -07:00
Chris Goller 45a981911d feat(server/services): add source id and source link to all services 2018-05-21 10:45:28 -07:00
Chris Goller 5cd8cc7cdd feat(server/services): add generic services scoped under server 2018-05-21 10:45:27 -07:00
Brandon Farmer 0c55409d98 Fix issues with slack multi node
- Alerts not persisting workspace
- Error when saving handler with empty nickname
- Allow users to add multiple empty rules

Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
2018-05-17 11:38:44 -07:00
ebb-tide 351a53884b Release 1.5.0.0 2018-05-15 17:36:04 -07:00
Brandon Farmer be59607a35 Don't override name for alert rules 2018-05-14 09:54:57 -07:00
Jared Scheib 15cef57e53
Merge pull request #3386 from influxdata/feature/kapa_kafka_alert_node
Feature/kapa kafka alert node
2018-05-11 11:09:17 -07:00
Brandon Farmer 587f8b269f Fixes issue with saving tickscript name 2018-05-10 16:33:42 -07:00
Jared Scheib 6edceb0b32 Fix kapa test by including kafka alert node 2018-05-10 13:22:29 -07:00
Jared Scheib 6e743901c8 Update swagger 2018-05-10 13:02:26 -07:00
Jared Scheib 42beb1adc7 Add support for Kafka alert node 2018-05-09 16:32:06 -07:00
Iris Scholten d3d209feaf
Merge pull request #3402 from influxdata/bugfix/upload-icon-missing
Upload Icon Appears even with basepath
2018-05-08 14:21:16 -07:00
Iris Scholten 28641e3336 Update url prefixer to ignore svgs
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2018-05-08 13:55:24 -07:00
Iris Scholten 13bf3132f0 Update swagger with opsgenie2 and pagerduty2 2018-05-08 09:58:50 -07:00
Iris Scholten a54e8c76bd Update chronograf backend with OpsGenie2 2018-05-03 11:00:26 -07:00
ebb-tide d26062ee57 Fix server tests 2018-04-30 17:24:59 -07:00
ebb-tide 2cf1e1af4d Implement Decimal Place Setting 2018-04-30 11:59:14 -07:00
ebb-tide 6ecd527f01 Merge branch 'master' into table/field-options 2018-04-24 14:31:27 -07:00
Iris Scholten 558bcaf413
Merge pull request #3290 from influxdata/add-pager-duty-v2
Add pager duty v2 in UI
2018-04-24 11:16:00 -07:00
Brandon Farmer 2ce7d8e3ee Test & refactor basepath validation into dedicated fn 2018-04-23 17:02:00 -07:00
Jared Scheib 42d912397b Comment WithContext fn for context 2018-04-23 16:47:35 -07:00
Iris Scholten ac8a265a0f Update KapacitorRulesGet test to include PagerDuty2 2018-04-23 14:12:56 -07:00
Iris Scholten e4fe7a6a2a Merge branch 'master' into add-pager-duty-v2 2018-04-23 14:00:17 -07:00
Jared Scheib 58559f3b71 Clean up regexp guard logic for valid basepath 2018-04-20 19:01:23 -07:00
Jared Scheib 9904575680 Rename PrefixedRedirect to FlushingHandler & comment
It's not clear whether this code is necessary, but investigating
this was outside of the scope of this PR.
2018-04-20 18:40:09 -07:00
Jared Scheib c23d75396f Refactor interceptingResponseWrite Flusher for clarity
Co-authored-by: Daniel Nelson <daniel.nelson@influxdb.com>
2018-04-20 18:40:09 -07:00
Jared Scheib a5adbdfc8d Remove basepath var & arg from PrefixedRedirect 2018-04-20 18:40:09 -07:00
Jared Scheib ece8bad9f0 Remove prefix-routes & clean up basepath var and flag use
Now, if basepath is set, it will be prefixed to all routes.
There is no more additional option of prefix-routes.
2018-04-20 18:40:09 -07:00
Jared Scheib b9f2029bb2 Match basepath against regexp to ensure proper format 2018-04-20 18:40:09 -07:00
Jared Scheib eaefe0da63 Fail server if basepath contains trailing or starting '/' 2018-04-20 18:39:49 -07:00
Jared Scheib 68d9d6610b Fix logout link with basepath
Remove double-prefixing by removing the prefixing
logic of the InterceptingResponseWriter.

Fix the logout link route for its handler to not
include a basepath prefix.

Remove obsolete tests for prefixing redirector.

Co-authored-by: Michael Desa <mjdesa@gmail.com>
2018-04-20 16:58:41 -07:00
Iris Scholten 9181810ed8 Update Swagger with fieldOptions and Timeformat change and precision 2018-04-20 13:41:34 -07:00
Iris Scholten cdb7164df0 Move timeFormat from TableOptions to DashboardCell in the Server
Update tests according to the change
2018-04-19 17:32:28 -07:00
Iris Scholten 87ad2278de Update go tests by removing FieldNames from TableOptions and adding FieldOptions to DashboardCell
Add precision to sortBy values
2018-04-18 17:08:26 -07:00
Jared Scheib c9daa0c1d2 Update swagger to include defaultRP
Backfill source fields that were missing to swagger as well.

Co-authored-by: Iris Scholten <ischolten.is@gmail.com>
2018-04-18 12:34:36 -07:00
Iris Scholten c56382255e Create Test for proxying InfluxDb
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-04-13 14:34:57 -07:00
Jared Scheib 91042ef91a WIP Test Influx proxy API 2018-04-13 11:22:33 -07:00
Jared Scheib 3754fa6dfa Test UpdateSource (including defaultRP)
Uses a test server to mock the server responses
necessary for update.

Co-authored-by Iris Scholten <ischolten.is@gmail.com>
2018-04-12 17:54:21 -07:00
Jared Scheib 4d70b5d171 Include source defaultRP in UpdateSource
Co-authored-by Iris Scholten <ischolten.is@gmail.com>
2018-04-12 16:00:49 -07:00
Iris Scholten c3bed99a92 Complete test for get SourcesID
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-04-11 14:20:02 -07:00
Iris Scholten 8d7107093c WIP create test for getting a source with no defaultRP
Co-authored-by Jared Scheib <jared.scheib@gmail.com>
2018-04-11 13:34:58 -07:00
Iris Scholten 3c1f6e6233 WIP add pagerduty2 to backend 2018-04-09 14:40:05 -07:00
Andrew Watkins 7c0fc49225 Display arguments and thier values
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2018-04-05 10:02:42 -07:00
Jared Scheib 3ffaa55aee
Merge pull request #2832 from influxdata/feature/rest-measurements
Add API for measurements with pagination
2018-04-04 16:55:48 -07:00
Jared Scheib 207fb0a49b
Merge branch 'master' into feature/rest-measurements 2018-04-04 16:21:16 -07:00
Jared Scheib 78e219b43f Test Measurements api for 'prev' link when offset > limit 2018-04-04 16:19:54 -07:00
Jared Scheib 8f0c5d6055 Remove redundant limit value check from newMeasurementsLinks 2018-04-04 15:33:26 -07:00
Brandon Farmer e447471404 If a org is missing then don't add it to list
Requests to /me and deleting organization can result in a race condition
2018-04-04 15:25:58 -07:00
Brandon Farmer 5770d5e6f7 Only add stateChangesOnly to new rules
- New rules default to a blank id
- Check for blank id before adding stateChangesOnly
2018-04-04 14:26:16 -07:00
Jared Scheib 8ccf582acc Rename db & rp vars & url params for clarity & consistency
Updates swagger as well.
Clarify that instead of dbid and rpid, these values are names.
Rename the var for the Databases service to dbsvc.
2018-04-04 14:22:08 -07:00
Jared Scheib 982fa38fc1 Rename database function arguments for consistency 2018-04-04 13:25:45 -07:00
Andrew Watkins b127d2d96a
Merge pull request #3118 from influxdata/bugfix/flash-notifications
Bugfix/flash notifications
2018-04-04 11:13:17 -07:00
Luke Morris 9eb7a8cdd4 Reintroduce :interval: work
This reverts commit 4b54081cf8.

:interval: represents a duration now

queryConfig must recognize both :interval: forms

Another case to consider

Fix broken links in CHANGELOG

Rudimentary migration system w/ :interval: migration

Only looking for :interval: now

Server can expect time(:interval:) from now on

Repair go specs
2018-04-03 16:52:34 -07:00
Andrew Watkins 8f770c4636 Update server tests 2018-04-03 16:38:52 -07:00
Jared Scheib 0f0e1b60ac Add swagger docs for new /measurements API, response, & structs 2018-04-03 16:04:16 -07:00
Jared Scheib 1a0a02c612 Test GetMeasurements overrides offset less than 0 with offset 0 2018-04-03 16:04:16 -07:00
Jared Scheib e2e0b9749c Test GetMeasurements overrides limit <= 0 with limit 100 2018-04-03 16:04:16 -07:00
Jared Scheib 55e8f5cbd8 Test GetMeasurements fails on invalid offset value provided 2018-04-03 16:04:16 -07:00
Jared Scheib 786d345ee2 Test GetMeasurements fails on invalid limit value provided 2018-04-03 16:04:16 -07:00
Jared Scheib 214c57c5d7 Test GetMeasurements with no offset or limit 2018-04-03 16:04:16 -07:00
Jared Scheib 3727caf5fd WIP Test GetMeasurements
Create Databases mocks
Add comments to chronograf.Databases methods
2018-04-03 16:04:16 -07:00
Jared Scheib eb4d07f4ae Change AllMeasurements to GetMeasurements to be precise & update comment 2018-04-03 16:04:16 -07:00
Chris Goller a5722da2a7 Add measurements with pagination 2018-04-03 16:04:16 -07:00
Andrew Watkins 5f5a8c2ee5 Introduce /health endpoint 2018-04-03 15:58:33 -07:00
Andrew Watkins 118cbcd0bd
Merge pull request #3112 from influxdata/bugfix/influxdb-delete-user-role
Bugfix: Delete UserRole and handle providing no roles or permissions
2018-04-03 12:02:27 -07:00
nathan haugo c94bb8d6ce Update for 1.4.3.1 2018-04-02 17:50:32 -07:00
Andrew Watkins 518bd60f00 Fix server validation 2018-04-02 17:09:31 -07:00
Alex P 88706be6dc Merge branch 'master' into moar-colors-n-stuff 2018-04-02 11:51:27 -07:00
ebb-tide de22496613 Merge branch 'master' into feature/table-graph-polish 2018-03-29 18:56:10 -07:00
ebb-tide b38b812867 Change swagger a tad 2018-03-29 18:52:35 -07:00
Jared Scheib 183a194215
Merge pull request #2656 from influxdata/swagger-1.4.0.0
Update Swagger for most multiorganization & multiuser changes
2018-03-29 17:01:53 -07:00
Jared Scheib 6d93ee470f Further disambiguate Invalid JSON vs Invalid data schema 2018-03-29 16:53:13 -07:00
Jared Scheib 7a85c9be1c Update superAdmin description 2018-03-29 16:43:10 -07:00
Jared Scheib ccce4a6226 Remove -Chronograf suffix from User & Role 2018-03-29 16:40:35 -07:00
Jared Scheib 04251c01d8 Add 'InfluxDB-' prefix to User, Role, Permission, & Allowance 2018-03-29 16:39:13 -07:00
Jared Scheib 50feb5b138 Remove obsolete 'public' property from organizations 2018-03-29 16:18:19 -07:00
Brandon Farmer d5a6f4a75d Fix tests related to new ifql ast link
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
2018-03-29 16:06:10 -07:00
Brandon Farmer 178b366191 Func item triggers a handler when it is clicked
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
Co-authored-by: Andrew Watkins<andrew.watkinz@gmail.com>
2018-03-29 16:06:10 -07:00
Andrew Watkins ad7d96d697 Add endpoint for raw string conversion to AST
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2018-03-29 16:04:37 -07:00
Andrew Watkins 6e35370751 Change /suggestions response format to include params
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
2018-03-29 16:03:26 -07:00
Andrew Watkins 81ea6506ab Provide links to ifql api 2018-03-29 16:01:01 -07:00
Brandon Farmer 7ee78603ee Update revision for ifql and fix tests 2018-03-29 16:01:01 -07:00
Brandon Farmer 83c3813d7e Add endpoints for ifql function suggestions
Co-authored-by: Brandon Farmer <bthesorceror@gmail.com>
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
2018-03-29 16:01:01 -07:00
Jared Scheib 0fb86814f6 Correct typo 2018-03-29 15:45:21 -07:00
Jared Scheib 1898c0847e Properly use enums to limit valid role strings 2018-03-29 15:44:04 -07:00
Jared Scheib 0e44b94a24 Improve descriptions of /organization(s) & /user(s) API 2018-03-29 15:39:20 -07:00
Jared Scheib 3a01d46ce7 Replace multiorganization & multiuser tags with organizations & users 2018-03-29 14:04:39 -07:00
Jared Scheib 0aaa2771d1 Prettier 2018-03-29 14:00:24 -07:00
ebb-tide fbce63b8b1 Update Swagger 2018-03-29 13:25:48 -07:00
Alex P b35d668a41 Merge branch 'master' into moar-colors-n-stuff 2018-03-29 10:26:27 -07:00
Iris Scholten d542c2e8a2 Merge branch '1.4.3.x' 2018-03-28 18:26:00 -07:00
Jared Scheib d1735ce433 Change useidtoken to use-id-token for consistency 2018-03-28 13:31:24 -07:00
Iris Scholten 2b7d2fbc1d update versions with bumpversion 2018-03-28 11:34:23 -07:00
Benjamin Schweizer 2aeb0f7c8a added USE_ID_TOKEN option, defaulting off 2018-03-28 15:51:10 +02:00
Benjamin Schweizer 0a98d1c7b7 Merge branch 'master' of https://github.com/influxdata/chronograf 2018-03-28 13:30:05 +02:00
Iris Scholten ed5119f2ba respond to review 2018-03-27 14:28:59 -07:00
Iris Scholten b251829ccb respond to review 2018-03-27 14:27:01 -07:00
Iris Scholten 4f6de052d7 update swagger.json with tableOptions info 2018-03-27 11:45:57 -07:00
Alex P 347c27b1f4 Add "Scale" type to accepted cell color types 2018-03-26 19:09:09 -07:00
Jared Scheib de90bfedef Test for existing superadmin user in Principal auth0 group 2018-03-23 16:58:09 -07:00
Jared Scheib f3b9f6777a Update existing user's superAdmin status in bolt if in Principal auth0 group 2018-03-23 16:53:08 -07:00
Jared Scheib f1cadf6191 Add server test for Chronograf not private & user is in auth0 superadmin group 2018-03-23 16:26:20 -07:00
Jared Scheib c449d34ec1 Add expected defaultRole to test data organization & currentOrganization 2018-03-23 15:54:46 -07:00
Jared Scheib dd2c600c78 Update 'private' language to make consistent with current behavior of app 2018-03-23 15:45:11 -07:00
Jared Scheib 3dbab1a9b5 Remove extraneous fmt.Print statements 2018-03-23 15:03:01 -07:00
Jared Scheib 50849b11ef Extend test data with case where user has multiple Principal Groups 2018-03-23 15:00:09 -07:00
Jared Scheib 4227ce17dc Fix Auth0SuperAdminOrg server option description to indicate only one org is acceptable 2018-03-23 14:53:43 -07:00
Michael Desa 0cde581538 Add tests for mapProviderToSuperAdmin 2018-03-23 16:12:18 -04:00
Michael Desa 2345723d03 Add mapPrincipalToSuperAdmin function
The function grants a super superadmin status if the user belongs to a
particular auth0 organization and adds them to the default organization.
2018-03-23 15:48:34 -04:00