File tree 6 files changed +32
-13
lines changed 6 files changed +32
-13
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ import (
16
16
// @typescript-generate AccessURLReport
17
17
type AccessURLReport struct {
18
18
// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.
19
- Healthy bool `json:"healthy"`
20
- Severity health.Severity `json:"severity" enums:"ok,warning,error"`
21
- Warnings []string `json:"warnings"`
19
+ Healthy bool `json:"healthy"`
20
+ Severity health.Severity `json:"severity" enums:"ok,warning,error"`
21
+ Warnings []string `json:"warnings"`
22
+ Dismissed bool `json:"dismissed`
22
23
23
24
AccessURL string `json:"access_url"`
24
25
Reachable bool `json:"reachable"`
@@ -30,6 +31,8 @@ type AccessURLReport struct {
30
31
type AccessURLReportOptions struct {
31
32
AccessURL * url.URL
32
33
Client * http.Client
34
+
35
+ Dismissed bool
33
36
}
34
37
35
38
func (r * AccessURLReport ) Run (ctx context.Context , opts * AccessURLReportOptions ) {
Original file line number Diff line number Diff line change @@ -18,9 +18,10 @@ const (
18
18
// @typescript-generate DatabaseReport
19
19
type DatabaseReport struct {
20
20
// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.
21
- Healthy bool `json:"healthy"`
22
- Severity health.Severity `json:"severity" enums:"ok,warning,error"`
23
- Warnings []string `json:"warnings"`
21
+ Healthy bool `json:"healthy"`
22
+ Severity health.Severity `json:"severity" enums:"ok,warning,error"`
23
+ Warnings []string `json:"warnings"`
24
+ Dismissed bool `json:"dismissed`
24
25
25
26
Reachable bool `json:"reachable"`
26
27
Latency string `json:"latency"`
@@ -32,6 +33,8 @@ type DatabaseReport struct {
32
33
type DatabaseReportOptions struct {
33
34
DB database.Store
34
35
Threshold time.Duration
36
+
37
+ Dismissed bool
35
38
}
36
39
37
40
func (r * DatabaseReport ) Run (ctx context.Context , opts * DatabaseReportOptions ) {
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ type Report struct {
47
47
NetcheckLogs []string `json:"netcheck_logs"`
48
48
49
49
Error * string `json:"error"`
50
+
51
+ Dismissed bool `json:"dismissed`
50
52
}
51
53
52
54
// @typescript-generate RegionReport
@@ -95,6 +97,8 @@ type StunReport struct {
95
97
}
96
98
97
99
type ReportOptions struct {
100
+ Dismissed bool
101
+
98
102
DERPMap * tailcfg.DERPMap
99
103
}
100
104
Original file line number Diff line number Diff line change 7
7
"time"
8
8
9
9
"github.com/coder/coder/v2/buildinfo"
10
+ "github.com/coder/coder/v2/coderd/database"
10
11
"github.com/coder/coder/v2/coderd/healthcheck/derphealth"
11
12
"github.com/coder/coder/v2/coderd/healthcheck/health"
12
13
"github.com/coder/coder/v2/coderd/util/ptr"
@@ -60,6 +61,8 @@ type ReportOptions struct {
60
61
WorkspaceProxy WorkspaceProxyReportOptions
61
62
62
63
Checker Checker
64
+
65
+ DB database.Store
63
66
}
64
67
65
68
type defaultChecker struct {}
Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ type WebsocketReportOptions struct {
19
19
APIKey string
20
20
AccessURL * url.URL
21
21
HTTPClient * http.Client
22
+
23
+ Dismissed bool
22
24
}
23
25
24
26
// @typescript-generate WebsocketReport
25
27
type WebsocketReport struct {
26
28
// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.
27
- Healthy bool `json:"healthy"`
28
- Severity health.Severity `json:"severity" enums:"ok,warning,error"`
29
- Warnings []string `json:"warnings"`
29
+ Healthy bool `json:"healthy"`
30
+ Severity health.Severity `json:"severity" enums:"ok,warning,error"`
31
+ Warnings []string `json:"warnings"`
32
+ Dismissed bool `json:"dismissed`
30
33
31
34
Body string `json:"body"`
32
35
Code int `json:"code"`
Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ type WorkspaceProxyReportOptions struct {
19
19
// We pass this in to make it easier to test.
20
20
CurrentVersion string
21
21
WorkspaceProxiesFetchUpdater WorkspaceProxiesFetchUpdater
22
+
23
+ Dismissed bool
22
24
}
23
25
24
26
// @typescript-generate WorkspaceProxyReport
25
27
type WorkspaceProxyReport struct {
26
- Healthy bool `json:"healthy"`
27
- Severity health.Severity `json:"severity"`
28
- Warnings []string `json:"warnings"`
29
- Error * string `json:"error"`
28
+ Healthy bool `json:"healthy"`
29
+ Severity health.Severity `json:"severity"`
30
+ Warnings []string `json:"warnings"`
31
+ Error * string `json:"error"`
32
+ Dismissed bool `json:"dismissed`
30
33
31
34
WorkspaceProxies codersdk.RegionsResponse [codersdk.WorkspaceProxy ] `json:"workspace_proxies"`
32
35
}
You can’t perform that action at this time.
0 commit comments