Admin Databases Page no longer breaks if a db is missing an rp (#1179)
* retentionPolicies could be a blank array * Update CHANGELOG * Add `retentionPolicies` to swagger docspull/10616/head
parent
23478fffa7
commit
1c1c00cd02
|
@ -12,6 +12,7 @@
|
|||
1. [#1164](https://github.com/influxdata/chronograf/pull/1164): Restore ability to save raw queries to a Dashboard Cell
|
||||
1. [#1115](https://github.com/influxdata/chronograf/pull/1115): Fix Basepath issue where content would fail to render under certain circumstances
|
||||
1. [#1173](https://github.com/influxdata/chronograf/pull/1173): Fix saving email in Kapacitor alerts
|
||||
1. [#1179](https://github.com/influxdata/chronograf/pull/1179): Admin Databases Page will render a database without retention policies
|
||||
|
||||
### Features
|
||||
1. [#1112](https://github.com/influxdata/chronograf/pull/1112): Add ability to delete a dashboard
|
||||
|
|
|
@ -16,12 +16,12 @@ type dbLinks struct {
|
|||
}
|
||||
|
||||
type dbResponse struct {
|
||||
Name string `json:"name"` // a unique string identifier for the database
|
||||
Duration string `json:"duration,omitempty"` // the duration (when creating a default retention policy)
|
||||
Replication int32 `json:"replication,omitempty"` // the replication factor (when creating a default retention policy)
|
||||
ShardDuration string `json:"shardDuration,omitempty"` // the shard duration (when creating a default retention policy)
|
||||
RPs []rpResponse `json:"retentionPolicies,omitempty"` // RPs are the retention policies for a database
|
||||
Links dbLinks `json:"links"` // Links are URI locations related to the database
|
||||
Name string `json:"name"` // a unique string identifier for the database
|
||||
Duration string `json:"duration,omitempty"` // the duration (when creating a default retention policy)
|
||||
Replication int32 `json:"replication,omitempty"` // the replication factor (when creating a default retention policy)
|
||||
ShardDuration string `json:"shardDuration,omitempty"` // the shard duration (when creating a default retention policy)
|
||||
RPs []rpResponse `json:"retentionPolicies"` // RPs are the retention policies for a database
|
||||
Links dbLinks `json:"links"` // Links are URI locations related to the database
|
||||
}
|
||||
|
||||
// newDBResponse creates the response for the /databases endpoint
|
||||
|
|
|
@ -2259,6 +2259,18 @@
|
|||
"duration": "3d",
|
||||
"replication": 3,
|
||||
"shardDuration": "3h",
|
||||
"retentionPolicies": [
|
||||
{
|
||||
"name": "weekly",
|
||||
"duration": "7d",
|
||||
"replication": 1,
|
||||
"shardDuration": "7d",
|
||||
"default": true,
|
||||
"links": {
|
||||
"self": "/chronograf/v1/ousrces/1/dbs/NOAA_water_database/rps/liquid"
|
||||
}
|
||||
}
|
||||
],
|
||||
"links": {
|
||||
"self": "/chronograf/v1/sources/1/dbs/NOAA_water_database",
|
||||
"rps": "/chronograf/v1/sources/1/dbs/NOAA_water_database/rps"
|
||||
|
@ -2282,6 +2294,12 @@
|
|||
"type": "string",
|
||||
"description": "the interval spanned by each shard group"
|
||||
},
|
||||
"retentionPolicies": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/RetentionPolicy"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
Loading…
Reference in New Issue