Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite3af618

Browse files
feat: add 'hidden' option to 'coder_app' to hide app from UI
1 parent208a5be commite3af618

File tree

29 files changed

+719
-630
lines changed

29 files changed

+719
-630
lines changed

‎agent/proto/agent.pb.go

Lines changed: 384 additions & 374 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎agent/proto/agent.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ message WorkspaceApp {
4141
UNHEALTHY=4;
4242
}
4343
Healthhealth=12;
44+
boolhidden=13;
4445
}
4546

4647
messageWorkspaceAgentScript {

‎coderd/agentapi/manifest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,5 +229,6 @@ func dbAppToProto(dbApp database.WorkspaceApp, agent database.WorkspaceAgent, ow
229229
Threshold:dbApp.HealthcheckThreshold,
230230
},
231231
Health:agentproto.WorkspaceApp_Health(healthRaw),
232+
Hidden:dbApp.Hidden,
232233
},nil
233234
}

‎coderd/apidoc/docs.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/db2sdk/db2sdk.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
517517
Threshold:dbApp.HealthcheckThreshold,
518518
},
519519
Health:codersdk.WorkspaceAppHealth(dbApp.Health),
520+
Hidden:dbApp.Hidden,
520521
})
521522
}
522523
returnapps

‎coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ func WorkspaceApp(t testing.TB, db database.Store, orig database.WorkspaceApp) d
547547
HealthcheckThreshold:takeFirst(orig.HealthcheckThreshold,60),
548548
Health:takeFirst(orig.Health,database.WorkspaceAppHealthHealthy),
549549
DisplayOrder:takeFirst(orig.DisplayOrder,1),
550+
Hidden:orig.Hidden,
550551
})
551552
require.NoError(t,err,"insert app")
552553
returnresource

‎coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7291,6 +7291,7 @@ func (q *FakeQuerier) InsertWorkspaceApp(_ context.Context, arg database.InsertW
72917291
HealthcheckInterval:arg.HealthcheckInterval,
72927292
HealthcheckThreshold:arg.HealthcheckThreshold,
72937293
Health:arg.Health,
7294+
Hidden:arg.Hidden,
72947295
DisplayOrder:arg.DisplayOrder,
72957296
}
72967297
q.workspaceApps=append(q.workspaceApps,workspaceApp)

‎coderd/database/dump.sql

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTERTABLE workspace_apps DROP COLUMN hidden;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTERTABLE workspace_apps ADD COLUMN hiddenbooleanNOT NULL DEFAULT false;
2+
3+
COMMENTON COLUMNworkspace_apps.hidden
4+
IS'Determines if the app is displayed in user interfaces.'

‎coderd/database/models.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries.sql.go

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries/workspaceapps.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ INSERT INTO
2828
healthcheck_interval,
2929
healthcheck_threshold,
3030
health,
31-
display_order
31+
display_order,
32+
hidden
3233
)
3334
VALUES
34-
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) RETURNING*;
35+
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING*;
3536

3637
-- name: UpdateWorkspaceAppHealthByID :exec
3738
UPDATE

‎coderd/provisionerdserver/provisionerdserver.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,6 +1918,7 @@ func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.
19181918
HealthcheckThreshold:app.Healthcheck.Threshold,
19191919
Health:health,
19201920
DisplayOrder:int32(app.Order),
1921+
Hidden:app.Hidden,
19211922
})
19221923
iferr!=nil {
19231924
returnxerrors.Errorf("insert app: %w",err)

‎codersdk/agentsdk/convert.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ func AppFromProto(protoApp *proto.WorkspaceApp) (codersdk.WorkspaceApp, error) {
245245
Threshold:protoApp.Healthcheck.Threshold,
246246
},
247247
Health:health,
248+
Hidden:protoApp.Hidden,
248249
},nil
249250
}
250251

@@ -274,6 +275,7 @@ func ProtoFromApp(a codersdk.WorkspaceApp) (*proto.WorkspaceApp, error) {
274275
Threshold:a.Healthcheck.Threshold,
275276
},
276277
Health:proto.WorkspaceApp_Health(health),
278+
Hidden:a.Hidden,
277279
},nil
278280
}
279281

‎codersdk/workspaceapps.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type WorkspaceApp struct {
6161
// Healthcheck specifies the configuration for checking app health.
6262
HealthcheckHealthcheck`json:"healthcheck"`
6363
HealthWorkspaceAppHealth`json:"health"`
64+
Hiddenbool`json:"hidden"`
6465
}
6566

6667
typeHealthcheckstruct {

‎docs/reference/api/agents.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/builds.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp