mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -229,5 +229,6 @@ func dbAppToProto(dbApp database.WorkspaceApp, agent database.WorkspaceAgent, ow
|
||||
Threshold: dbApp.HealthcheckThreshold,
|
||||
},
|
||||
Health: agentproto.WorkspaceApp_Health(healthRaw),
|
||||
Hidden: dbApp.Hidden,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ func TestGetManifest(t *testing.T) {
|
||||
Subdomain: false,
|
||||
SharingLevel: database.AppSharingLevelPublic,
|
||||
Health: database.WorkspaceAppHealthDisabled,
|
||||
Hidden: false,
|
||||
},
|
||||
{
|
||||
ID: uuid.New(),
|
||||
@@ -102,6 +103,7 @@ func TestGetManifest(t *testing.T) {
|
||||
HealthcheckUrl: "http://localhost:4321/health",
|
||||
HealthcheckInterval: 20,
|
||||
HealthcheckThreshold: 5,
|
||||
Hidden: true,
|
||||
},
|
||||
}
|
||||
scripts = []database.WorkspaceAgentScript{
|
||||
@@ -182,6 +184,7 @@ func TestGetManifest(t *testing.T) {
|
||||
Threshold: apps[0].HealthcheckThreshold,
|
||||
},
|
||||
Health: agentproto.WorkspaceApp_HEALTHY,
|
||||
Hidden: false,
|
||||
},
|
||||
{
|
||||
Id: apps[1].ID[:],
|
||||
@@ -200,6 +203,7 @@ func TestGetManifest(t *testing.T) {
|
||||
Threshold: 0,
|
||||
},
|
||||
Health: agentproto.WorkspaceApp_DISABLED,
|
||||
Hidden: false,
|
||||
},
|
||||
{
|
||||
Id: apps[2].ID[:],
|
||||
@@ -218,6 +222,7 @@ func TestGetManifest(t *testing.T) {
|
||||
Threshold: apps[2].HealthcheckThreshold,
|
||||
},
|
||||
Health: agentproto.WorkspaceApp_UNHEALTHY,
|
||||
Hidden: true,
|
||||
},
|
||||
}
|
||||
protoScripts = []*agentproto.WorkspaceAgentScript{
|
||||
|
||||
Reference in New Issue
Block a user