feat: add 'hidden' option to 'coder_app' to hide app from UI (#14570)

Add 'hidden' property to 'coder_app' resource to allow hiding apps from the UI.
This commit is contained in:
Danielle Maywood
2024-09-09 14:39:32 +01:00
committed by GitHub
parent 918bea18c1
commit 25f1ddbf5e
36 changed files with 848 additions and 696 deletions
+2
View File
@@ -245,6 +245,7 @@ func AppFromProto(protoApp *proto.WorkspaceApp) (codersdk.WorkspaceApp, error) {
Threshold: protoApp.Healthcheck.Threshold,
},
Health: health,
Hidden: protoApp.Hidden,
}, nil
}
@@ -274,6 +275,7 @@ func ProtoFromApp(a codersdk.WorkspaceApp) (*proto.WorkspaceApp, error) {
Threshold: a.Healthcheck.Threshold,
},
Health: proto.WorkspaceApp_Health(health),
Hidden: a.Hidden,
}, nil
}
+2
View File
@@ -44,6 +44,7 @@ func TestManifest(t *testing.T) {
Threshold: 55555666,
},
Health: codersdk.WorkspaceAppHealthHealthy,
Hidden: false,
},
{
ID: uuid.New(),
@@ -62,6 +63,7 @@ func TestManifest(t *testing.T) {
Threshold: 22555666,
},
Health: codersdk.WorkspaceAppHealthInitializing,
Hidden: true,
},
},
DERPMap: &tailcfg.DERPMap{
+1
View File
@@ -61,6 +61,7 @@ type WorkspaceApp struct {
// Healthcheck specifies the configuration for checking app health.
Healthcheck Healthcheck `json:"healthcheck"`
Health WorkspaceAppHealth `json:"health"`
Hidden bool `json:"hidden"`
}
type Healthcheck struct {