{{/* Sync detail page (/syncs/detail?id=): settings, status and the stored results of the last invocation. HTMX partial: block sync_content */}} {{ template "head" . }}
{{ template "drawer_toggle" }}
{{ block "sync_content" . }} {{ template "page_progress" }} {{ template "error_alert" .Data.Error }} {{ template "flash_alerts" .Data }} {{ if .Data.Sync }} {{ $s := .Data.Sync }}

Overview

Source {{ $s.repo }} {{ if $s.branch }} Branch {{ $s.branch }} {{ end }} {{ if $s.git_auth }} Git auth {{ $s.git_auth }} {{ end }} Trigger {{ if $s.is_scheduled }} scheduled - every {{ $s.schedule_frequency }} minutes {{ else }} webhook {{ if $s.webhook_url }} {{ $s.webhook_url }} {{ end }} {{ end }} Flags {{ range $s.flags }} {{ if eq . "clobber" }} {{ . }} {{ else }} {{ . }} {{ end }} {{ else }} staging only - no promote {{ end }} {{ if $s.reload }} Reload {{ $s.reload }} {{ end }} {{ if $s.user }} Created by {{ $s.user }} {{ if $s.create_time }} ยท {{ template "time_ago" $s.create_time }} {{ end }} {{ end }} Id {{ $s.id }}

Last invocation

{{ if $s.last_exec }} {{ template "time_ago" $s.last_exec }} {{ if $s.commit_short }} {{ $s.commit_short }} {{ end }} {{ end }} {{ if $s.failure_count }} {{ $s.failure_count }} failed runs {{ end }}
{{ if not $s.last_exec }}

This sync has not run yet

{{ else }} {{ if $s.error }} {{ end }} {{ if .Data.LastResult }} {{ $r := .Data.LastResult }}
{{ if $r.skipped_apply }} No new commit was found, the apply was skipped {{ else if not $r.changed }} {{ $r.total }} apps checked - everything matched the declared state, no changes were applied {{ else }} {{ $r.total }} apps in scope - changes applied: {{ end }}
{{ if $r.changed }}
{{ template "sync_result_row" (dict "Label" "Created" "Items" $r.created) }} {{ template "sync_result_row" (dict "Label" "Updated" "Items" $r.updated) }} {{ template "sync_result_row" (dict "Label" "Reloaded" "Items" $r.reloaded) }} {{ template "sync_result_row" (dict "Label" "Promoted" "Items" $r.promoted) }} {{ template "sync_result_row" (dict "Label" "Approved" "Items" $r.approved) }} {{ template "sync_result_row" (dict "Label" "Skipped" "Items" $r.skipped) }} {{ template "sync_result_row" (dict "Label" "Bindings +" "Items" $r.bindings_created) }} {{ template "sync_result_row" (dict "Label" "Bindings ~" "Items" $r.bindings_updated) }} {{ template "sync_result_row" (dict "Label" "Bindings โ†‘" "Items" $r.bindings_promoted) }}
{{ end }} {{ end }} {{ end }}

Apps

{{ len .Data.Apps }} apps managed by this sync all apps
{{ if .Data.AppsError }}

{{ .Data.AppsError }}

{{ else if .Data.Apps }} {{ template "app_table" (dict "Apps" .Data.Apps "AppPath" .AppPath "Perms" .Data.Perms "ShowActions" false) }} {{ else }}

No apps have been applied by this sync yet

{{ end }}
{{ end }} {{ end }}
{{ template "sidebar" . }}