mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Fix Deployment DAUs to work with local timezones (#7647)
* chore: Add timezone param to DAU SQL query * Merge DAUs response * Pass time offsets to metricscache
This commit is contained in:
@@ -24,14 +24,15 @@ curl -X GET http://coder-server:8080/api/v2/insights/daus \
|
||||
"amount": 0,
|
||||
"date": "2019-08-24T14:15:22Z"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tz_hour_offset": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentDAUsResponse](schemas.md#codersdkdeploymentdausresponse) |
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DAUsResponse](schemas.md#codersdkdausresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
+21
-38
@@ -1719,6 +1719,27 @@ CreateParameterRequest is a structure used to create a new parameter value for a
|
||||
| `amount` | integer | false | | |
|
||||
| `date` | string | false | | |
|
||||
|
||||
## codersdk.DAUsResponse
|
||||
|
||||
```json
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"amount": 0,
|
||||
"date": "2019-08-24T14:15:22Z"
|
||||
}
|
||||
],
|
||||
"tz_hour_offset": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ----------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `entries` | array of [codersdk.DAUEntry](#codersdkdauentry) | false | | |
|
||||
| `tz_hour_offset` | integer | false | | |
|
||||
|
||||
## codersdk.DERP
|
||||
|
||||
```json
|
||||
@@ -2131,25 +2152,6 @@ CreateParameterRequest is a structure used to create a new parameter value for a
|
||||
| `config` | [codersdk.DeploymentValues](#codersdkdeploymentvalues) | false | | |
|
||||
| `options` | array of [clibase.Option](#clibaseoption) | false | | |
|
||||
|
||||
## codersdk.DeploymentDAUsResponse
|
||||
|
||||
```json
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"amount": 0,
|
||||
"date": "2019-08-24T14:15:22Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| --------- | ----------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `entries` | array of [codersdk.DAUEntry](#codersdkdauentry) | false | | |
|
||||
|
||||
## codersdk.DeploymentStats
|
||||
|
||||
```json
|
||||
@@ -4008,25 +4010,6 @@ Parameter represents a set value for the scope.
|
||||
| ---------------- | ---------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `[any property]` | [codersdk.TransitionStats](#codersdktransitionstats) | false | | |
|
||||
|
||||
## codersdk.TemplateDAUsResponse
|
||||
|
||||
```json
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"amount": 0,
|
||||
"date": "2019-08-24T14:15:22Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| --------- | ----------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `entries` | array of [codersdk.DAUEntry](#codersdkdauentry) | false | | |
|
||||
|
||||
## codersdk.TemplateExample
|
||||
|
||||
```json
|
||||
|
||||
@@ -801,15 +801,16 @@ curl -X GET http://coder-server:8080/api/v2/templates/{template}/daus \
|
||||
"amount": 0,
|
||||
"date": "2019-08-24T14:15:22Z"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tz_hour_offset": 0
|
||||
}
|
||||
```
|
||||
|
||||
### Responses
|
||||
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------ |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.TemplateDAUsResponse](schemas.md#codersdktemplatedausresponse) |
|
||||
| Status | Meaning | Description | Schema |
|
||||
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
|
||||
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DAUsResponse](schemas.md#codersdkdausresponse) |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user