Commit Graph

383 Commits (6cbd33b9eeb73a804e5bf572e1670c774cf566b0)

Author SHA1 Message Date
Andrew Watkins a35f045648 Update kapacitor links to include tasks and ping paths 2017-09-12 09:23:22 -07:00
Chris Goller 35248b8044 Update kapacitor AlertRule to containe most Kapacitor Task information 2017-09-09 10:19:52 -05:00
Chris Goller d1007513cd Update kapacitor rule response with dbrps, various dates, error, and executing. 2017-09-09 10:19:52 -05:00
Chris Goller 08ecc10ddb Update swagger docs with new kapacitor rule fields 2017-09-09 10:19:52 -05:00
Chris Goller bebe0f364a WIP 2017-09-09 10:19:52 -05:00
Nathan Haugo 3387c941af Bump version to 1.3.8.0 2017-09-07 16:29:56 -07:00
Tim Raymond f8580d907e Refactor set membership validation
The pattern of using a select with a list of options and a default that
returns an error isn't bad for a one-off validation:

select myProp {
  case "validOption1", "validOption2":
    // no-op
  default:
    panic("invalid!")
}

However, we're doing this multiple times in this method, so it makes
sense to pull this out into a new method to make it clearer what's
happening.

This adds a `oneOf` function that takes some property and a variadic
list of valid options and reports whether or not that property is among
that list.
2017-08-24 15:45:51 -04:00
Tim Raymond c24db57385 Add validation around Base and Scale
The Base and Scale options on axes can only be one of two parameters. We
weren't validating that this was the case. This patch ensures that Base
can only ever be "10" or "2", and Scale must be either "linear" or
"log".

Associated test coverage was also added.
2017-08-24 15:37:19 -04:00
Tim Raymond 63087a1bb8 Update Swagger for new axes options
New options were introduced to control things like scale, base, etc. on
axes and these were previously not documented. This adds documentation
of the newly supported parameters by the API.
2017-08-24 14:50:12 -04:00
Nathan Haugo 7a85e3a152 Merge 1.3.7.x 2017-08-23 16:01:30 -07:00
Nathan Haugo 5a13db41ba Bump to 1.3.7.0 2017-08-23 15:56:00 -07:00
Tim Raymond fed021ed9c Merge branch 'master' into feature/tr-kapa-rule-pagination 2017-08-23 16:44:59 -04:00
Tim Raymond f46335fb27 Remove kapacitor mock logic
This logic was originally left in place to help future test writers, but
its presence was vexing because it was not exercised in existing test
cases. It has been commented out should future tests need to leverage
it.
2017-08-23 16:39:12 -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 9b71477509 Switch KapacitorRulesGet to use Pagination
Kapacitor responses are paginated, and sometimes users have more than
the default 100 tasks that are returned from Kapacitor. This replaces
the previous Kapa client with one that automatically follows paginated
responses from Kapacitor's ListTasks endpoint and returns the full
response.

Tests for the KapacitorRulesGet endpoint had to be updated because they
did not account for "limit" and "offset", and so led to an infinite
loop with the paginated client. A correct kapacitor backend will not
have this behavior
2017-08-15 17:30:29 -04:00
Tim Raymond fcf325bbbe Add PaginatingKapacitorClient
The kapacitor client used in the kapacitor endpoints is limited to
fetching whatever limit you provide it. If you provide no limit, it
defaults to a limit of 100. We use this default behavior currently.

Some users have more than 100 tasks, so we need a client that's capable
of continually fetching tasks from Kapacitor until there are none left,
and returning the full response to the frontend.

This introduces a PaginatingKapacitorClient which does exactly that.
Also, test coverage was added around the KapacitorRulesGet endpoint,
since it was previously untested.
2017-08-15 16:55:47 -04:00
Timothy J. Raymond 246cf75ce7 Merge pull request #1866 from influxdata/bugfix/tr-missing-cell-type
Fix missing cell type
2017-08-14 14:04:36 -04:00
Tim Raymond 74f464800d Fix missing cell type
Because we are now creating new instances of dashboards when we create a
response, it's critical to copy every element of Dashboards from the
previous to the new instance.

We were not previously copying the Type field of cells, so this was
defaulting to the empty string zero value. This patch adds "Type" to the
tests and ensures that it's properly copied
2017-08-14 13:41:31 -04:00
Jared Scheib 974e9eaf7d Add 'type' to new-sources server flag example 2017-08-11 11:54:16 -07:00
Tim Raymond c77630ff49 Ensure "x", "y", and "y2" axes present
Similar to DashboardCells, this ensures that the "x", "y", and "y2" axes
are always present in a layout's cells.
2017-08-10 13:53:07 -07:00
Tim Raymond c2a5083777 Add test coverage to /layouts endpoint
In anticipation of adding Axes to cells, I wanted some test coverage to
be in place before I made the change.

This covers the happy path case as well as focusing on individual
applications. To come are focusing on a measurement and a test for when
the store is unavailable.
2017-08-10 13:52:26 -07: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 e703107644 Copy missing properties from Dashboards
When creating new dashboards to set defaults, not all properties of the
dashboard were being copied. This ensures that they are so that zero
values are not used for things like the ID and Name.
2017-07-31 17:24:43 -04:00
Tim Raymond 7aad733682 Fix data races in dashboard response construction
Dashboard responses had data races because multiple goroutines were
reading and modifying dashboards before sending them out on the wire.
This patch introduces immutability in the construction of the response,
so that each goroutine is working with its own set of dashboardResponse
structs.
2017-07-31 16:36:20 -04:00
Tim Raymond 08bf8aeff5 Ensure cell bounds come back as empty array
The contract with the frontend states that bounds should come back as an
empty array instead of null when there are no bounds present. We must
explicitly specify []string{} for this to happen.
2017-07-31 16:36:16 -04:00
Tim Raymond 4391004e7f Enforce presence of "x", "y", and "y2" axes
Certain aspects of the frontend requires the presence of these three
axes, so part of the contract established is that the backend will
always provide them. Since we centralize creation of
dashboardCellResponses, this is where these axes are added to all cell
responses.

Additionally, because there was previously no coverage over the
dashboard cells endpoints, a test has been added to cover the
DashboardCells method of Service.
2017-07-31 16:36:07 -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
Chris Goller 2d8b1ef340 Release 1.3.5.0 2017-07-25 15:08:02 -05:00
Chris Goller cef0e66df0 Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05: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 db4d093a0c Update Swagger with Cell Axes
Cells now have axes which represent their visualization's viewport. This
updates the Swagger documentation to reflect this.

Things to be aware of
=====================

The form of "axes" is that of a map<string,object>, which is represented
in Swagger by an "additionalProperties" key (search for "string to model
mapping" here: https://swagger.io/specification/).
2017-07-24 14:03:48 -04:00
Jared Scheib d6db7ee084 Merge pull request #1724 from influxdata/feature/pushover_support-1680
Add Pushover alert support
2017-07-21 14:04:22 -07:00
Jared Scheib 6540ea308d Clarify BoltPath server flag help text with default path 2017-07-21 11:41:54 -07: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
Jared Scheib 200b24788b Merge branch 'master' into feature/pushover_support-1680 2017-07-20 16:23:54 -07:00
Tim Raymond a423a98d36 Update Swagger with Cell Axes
Cells now have axes which represent their visualization's viewport. This
updates the Swagger documentation to reflect this.

Things to be aware of
=====================

The form of "axes" is that of a map<string,object>, which is represented
in Swagger by an "additionalProperties" key (search for "string to model
mapping" here: https://swagger.io/specification/).
2017-07-19 11:18:01 -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
Jared Scheib fb8d5cfc8e Add Pushover to swagger 2017-07-14 16:55:59 -07:00
Hunter Trujillo 8307a3b336 I think this goes here in the swagger doc... 2017-07-10 16:18:05 -06:00
Jared Scheib 5ec506b8fb Merge branch 'master' into feature/persist_datasource_flag-1555 2017-07-07 14:45:00 -07:00
Tim Raymond a7fc16cb17 Fix bad merge conflict resolution
Duplicate definitions of the same property were present because of
confusing placement of merge conflict markers.
2017-07-07 16:59:19 -04:00
Tim Raymond 5b5dbee078 Merge master into feature/tr-auth0-organizations
Conflicts were the addition of CLI flags from a concurrent branch.
2017-07-07 16:18:01 -04:00
Jared Scheib 12f1a8ce4b Add test for creating NewSources via server flag
Move TestLogger to mocks

Signed-off-by: Tim Raymond <tim@timraymond.com>
2017-07-07 12:56:12 -07:00
Jared Scheib fea0a330eb Correct comment 2017-07-06 15:04:04 -07:00
Jared Scheib 10c317c083 Refactor process new sources into named func 2017-07-06 14:27:14 -07: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 ac0598f95c Allow server to run even if NewSources errors out 2017-07-06 12:05:05 -07:00
Jared Scheib 3c3602a724 Update error messages to use plural 2017-07-06 11:48:14 -07:00
Jared Scheib abff00f88f Add sample usage
Make flag identifier plural since JSON array of objects
2017-07-06 11:44:42 -07:00