8000 chore: return template data for provisioner daemons by BrunoQuaresma · Pull Request #16514 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: return template data for provisioner daemons #16514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use COALESCE
  • Loading branch information
BrunoQuaresma committed Feb 11, 2025
commit 401c9329d0487cb4dd2026ed102408cce03030dd
12 changes: 6 additions & 6 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions coderd/database/queries/provisionerdaemons.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ SELECT
current_job.job_status AS current_job_status,
previous_job.id AS previous_job_id,
previous_job.job_status AS previous_job_status,
tmpl.name AS current_job_template_name,
tmpl.display_name AS current_job_template_display_name,
tmpl.icon AS current_job_template_icon
COALESCE(tmpl.name, ''::text) AS current_job_template_name,
COALESCE(tmpl.display_name, ''::text) AS current_job_template_display_name,
COALESCE(tmpl.icon, ''::text) AS current_job_template_icon
FROM
provisioner_daemons pd
JOIN
Expand Down
6 changes: 3 additions & 3 deletions coderd/provisionerdaemons.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ func (api *API) provisionerDaemons(rw http.ResponseWriter, r *http.Request) {
currentJob = &codersdk.ProvisionerDaemonJob{
ID: dbDaemon.CurrentJobID.UUID,
Status: codersdk.ProvisionerJobStatus(dbDaemon.CurrentJobStatus.ProvisionerJobStatus),
TemplateName: dbDaemon.CurrentJobTemplateName.String,
TemplateIcon: dbDaemon.CurrentJobTemplateIcon.String,
TemplateDisplayName: dbDaemon.CurrentJobTemplateDisplayName.String,
TemplateName: dbDaemon.CurrentJobTemplateName,
TemplateIcon: dbDaemon.CurrentJobTemplateIcon,
TemplateDisplayName: dbDaemon.CurrentJobTemplateDisplayName,
}
}
if dbDaemon.PreviousJobID.Valid {
Expand Down
Loading
0