Commit Graph

31 Commits (e4377ecd28c7b577e811edee374c0cf3a3bda1e0)

Author SHA1 Message Date
Iris Scholten 54ade11321 Stop cells with raw/no format selected from getting changed to base 10 2019-02-12 11:55:55 -08:00
Alirie Gray 246c6f15c7
Add type property to queries (#4458)
* Add type property to CellQuery model

* Make an enum for QueryType

* Add type property to Query model on backend

* Add query type checking to CEO reducer and Layout

* Update swagger.json docs
2018-09-14 16:24:17 -07:00
Deniz Kusefoglu f19323e74c Add suggestprotoboards function at dashboard step
Prevent dashboard cell axis overwriting if Bounds is empty
Add measurements field to protoboards meta
Correct comment on protoboardsStore
Add styling and copy polish to wizards
Update Protoboards to include meta.measurements
Refactor protoboard suggestion
Update Wizard tests to incorporate capitalizations
Add types to protoboardsSuggestion
Fix go tests
2018-09-06 15:51:40 -07:00
Alex Paxton fc9cd71939
Introduce Cell Notes & Note Cells (#4257)
* feat: add Note string field to dashboard cells

* wip feat: html escape cell note to help prevent XSS attack

Requires further input to make sure this is effective at its
purpose.

* Add ability to view a cell's note from the cell header

* Make styles less brittle

* Add "chat" icon for use in notes

* Position note using cell X & Y

Avoid overlap with associated cell whenever possible

* New notes are empty strings by default

* Overflow note when contents are large

* Add react-markdown package for displaying markdown

* Display markdown in cell note

* Add a cell note text editor into the CEO

* Improve cell note editor

* Use codemirror placeholder addon

* Add placeholder to note field & foundation of markdown theme

* Add Markdown Cell

* Add initial styles for markdown cell contents

* Add graphic for Note type cell

* feat: add NoteVisibility to DashboardCell

* Add basic markdown syntax highlighting in editor

* Remove comment

* Show note in cell when queries return no data

* Make exception for rule graph

* Update fixtures and resources to fix tests

* Update changelog

* feat: sanitize xss-vulnerable note html

* Polish appearance of code samples in notes and note cells

* Replace ascii with plaintext before passing to markdown renderers

* Move "display when no results toggle" above text field

Less likely to go undiscovered
2018-08-23 14:41:40 -07:00
Alex P 347c27b1f4 Add "Scale" type to accepted cell color types 2018-03-26 19:09:09 -07:00
Iris Scholten d315c6e9fa make empty axes bounds [,] instead of [] 2018-02-23 16:24:54 -08:00
Chris Goller 84b6cf4967 Update cell defaults to use empty array 2018-02-05 17:04:15 -06:00
Chris Goller 6bfc6c36b2 Fix cell race condition 2018-02-05 14:50:05 -06:00
Chris Goller a565027394 Add legend to dashboard cells 2018-02-05 14:25:57 -06:00
Alex P 8b37f02030 Merge branch 'master' into single-stat-colors-polish 2017-12-20 17:59:52 -08:00
Nathan Haugo 72a756c843
Merge pull request #2593 from influxdata/feature/dashboard-filestore
Add filesystem backed dashboard and organization stores
2017-12-19 14:36:19 -08:00
Chris Goller 45301fb012 Fix cell replacement to return query config 2017-12-19 13:43:39 -06:00
Chris Goller ac41c384f2 Add multiple dashboard stores to server 2017-12-19 10:07:07 -08:00
Alex P 43db95f2cc Allow users to toggle between coloring text or background with single stat thresholds 2017-12-14 19:07:19 -08:00
Jared Scheib 482a4de6c1 Merge branch 'master' into multitenancy 2017-12-06 19:05:16 -08:00
Jared Scheib 93f11e1325 Merge remote-tracking branch 'origin/master' into multitenancy 2017-12-05 11:43:23 -08:00
Chris Goller 6564712e9d 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 33e83254e5 Handle nil cell in validateDashboardRequest 2017-11-21 11:27:48 -08:00
Chris Goller 1d11677c5f Add colors to all cells 2017-11-21 12:16:23 -06:00
Andrew Watkins c3a4696174 Add processing of incoming queryConfig 2017-11-10 16:02:08 -08:00
Andrew Watkins 6093ddc52f WIP Add shifts to queryConifg on backend 2017-11-10 11:06:48 -08:00
Michael Desa 5f63e2738a Refactor data stores into a common interface 2017-10-31 16:41:17 -04:00
Tim Raymond d559acc0e0
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 e421bf83d4
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 45e7bd8662
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
Tim Raymond 25059c0591
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 e5331dc536
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 8bd622c491
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 ead7c103ba
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
Chris Goller e44f716543 Add initial template CRUD operations 2017-04-20 11:09:56 -05:00
Chris Goller ac0ba1334e Move dashboard cells into cells.go 2017-04-20 09:24:57 -05:00