influxdb/dashboard.go

132 lines
3.4 KiB
Go
Raw Normal View History

package platform
import (
"context"
"fmt"
)
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// ErrDashboardNotFound is the error for a missing dashboard.
2018-08-27 17:09:17 +00:00
const ErrDashboardNotFound = ChronografError("dashboard not found")
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// ErrCellNotFound is the error for a missing cell.
2018-08-27 17:09:17 +00:00
const ErrCellNotFound = ChronografError("cell not found")
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// DashboardService represents a service for managing dashboard data.
type DashboardService interface {
// FindDashboardByID returns a single dashboard by ID.
FindDashboardByID(ctx context.Context, id ID) (*Dashboard, error)
// FindDashboards returns a list of dashboards that match filter and the total count of matching dashboards.
// Additional options provide pagination & sorting.
FindDashboards(ctx context.Context, filter DashboardFilter) ([]*Dashboard, int, error)
// CreateDashboard creates a new dashboard and sets b.ID with the new identifier.
CreateDashboard(ctx context.Context, b *Dashboard) error
// UpdateDashboard updates a single dashboard with changeset.
// Returns the new dashboard state after update.
UpdateDashboard(ctx context.Context, id ID, upd DashboardUpdate) (*Dashboard, error)
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// AddDashboardCell adds a cell to a dashboard.
AddDashboardCell(ctx context.Context, id ID, c *Cell, opts AddDashboardCellOptions) error
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// RemoveDashboardCell removes a dashbaord.
RemoveDashboardCell(ctx context.Context, dashboardID, cellID ID) error
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// UpdateDashboardCell replaces the dashboard cell with the provided ID.
UpdateDashboardCell(ctx context.Context, dashboardID, cellID ID, upd CellUpdate) (*Cell, error)
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// DeleteDashboard removes a dashboard by ID.
DeleteDashboard(ctx context.Context, id ID) error
// ReplaceDashboardCells replaces all cells in a dashboard
ReplaceDashboardCells(ctx context.Context, id ID, c []*Cell) error
}
// Dashboard represents all visual and query data for a dashboard
type Dashboard struct {
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
ID ID `json:"id"`
Name string `json:"name"`
Cells []*Cell `json:"cells"`
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// Cell holds positional information about a cell on dashboard and a reference to a cell.
type Cell struct {
ID ID `json:"id"`
X int32 `json:"x"`
Y int32 `json:"y"`
W int32 `json:"w"`
H int32 `json:"h"`
ViewID ID `json:"viewID"`
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// DashboardFilter is a filter for dashboards.
type DashboardFilter struct {
// TODO(desa): change to be a slice of IDs
ID *ID
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// DashboardUpdate is the patch structure for a dashboard.
type DashboardUpdate struct {
Name *string `json:"name"`
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// AddDashboardCellOptions are options for adding a dashboard.
type AddDashboardCellOptions struct {
// UsingView specifies the view that should be used as a template
// for the new cells view.
UsingView ID
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// Apply applies an update to a dashboard.
func (u DashboardUpdate) Apply(d *Dashboard) error {
if u.Name != nil {
d.Name = *u.Name
}
return nil
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// CellUpdate is the patch structure for a cell.
type CellUpdate struct {
X *int32 `json:"x"`
Y *int32 `json:"y"`
W *int32 `json:"w"`
H *int32 `json:"h"`
ViewID *ID `json:"viewID"`
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// Apply applies an update to a Cell.
func (u CellUpdate) Apply(c *Cell) error {
if u.X != nil {
c.X = *u.X
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
if u.Y != nil {
c.Y = *u.Y
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
if u.W != nil {
c.W = *u.W
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
if u.H != nil {
c.H = *u.H
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
if u.ViewID != nil {
c.ViewID = *u.ViewID
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
return nil
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
// Valid returns an error if the dashboard update is invalid.
func (u DashboardUpdate) Valid() error {
if u.Name == nil {
return fmt.Errorf("must update at least one attribute")
}
feat(platform): move chronogaf v2 dashboards to platform test(testing): add tests for dashboards and cells test(bolt): all conformance tests for dashbaords and cells fix(bolt): rename dashboardV2Bucket to dashboardBucket feat(chronograf): introduce v2 dashboards Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): add tests for v2 dashboard reducer Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): create dashboard from dashboard index Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> chore(chronograf): move tests to same level of heirarchy as file tested chronograf(chore): implement import dashboard with v2 api chore(chronograf): delete dashboards from v2 api chore(chronograf): add source health handler chore(chronograf): move sources reducer to sources dir chore(chronograf): remove stutter in notify WIP stop namespacing by sourceID chore(chronograf): no longer namespace routes under sources/:sourceID WIP move dashtimeV1 to ranges WIP remove CEO chrore(chronograf): WIP Remove CEO and QueryMaker chore(chronograf): introduce updateDashboard v2 chore(chronograf): Change cell to view A dashboard's cell object now only contains positional information for the cell in it's grid and a reference to the cell's view data. A cell's view contains all necessary information for the cell's visualization. Add react-grid-layout types chore(chronograf): introduce add cell chore(chronograf): fix type errors Not on DashboardPage feat(platform): add cell methods to dashboard service interface feat(mock): update dashboard service with cell methods feat(testing): add cell methods to testing package feat(bolt): add dashboard cell methods to bolt dashbaord service feat(http): add cell routes to dashbaord handler feat(platform): add dependent create/destroy of views from cells chore(chronograf): introduce update dashboard cells endpoint WIP update cells FE fix(http): rename Cells to cells on dashboard cells response chore(chronograf): re-introduce dashboard cell dragging feat(platform): add copy dashboard cell to dashboard service chore(platform): rename cell to view across codebase feat(bolt): add replace dashboard tests Move Layouts to Cells Introduce delete cell Fix broken test fix(platform): update route for copying a a dashboard cell UI for delete cell Introduce copy cell feat(platform): add copy view options to AddDashboardCell feat(bolt): delete views when dashboard is removed. Cleanup Fix type errors Fix links not updating Remove annotations from RefreshingGraph Sources and types work fix(platform): add TODO.go files back fix(view): rename visualizationType to type in view JSON Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> fix(dashboardTime): change dashboardID to string Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com> Co-authored-by: Michael Desa <mjdesa@gmail.com> feat(http): add dashboard api to swagger documentation review(http): fix comments and function naming feat(http): update sources swagger documentation review(http): update the swagger to reflect the implementation feat(platform): add usingView options to POST /dashboard/:id/cells
2018-08-07 20:10:05 +00:00
return nil
}