{{/* Copyright (c) ClaceIO, LLC */}} {{/* SPDX-License-Identifier: Apache-2.0 */}} {{/* Apps list page (/apps): apps grouped by their managing sync plus an unmanaged section, count stats double as declarative/imperative filters. HTMX partial: block app_groups */}} {{ template "head" . }}
{{ template "drawer_toggle" }}
{{ template "page_progress" }}
{{ block "app_groups" . }}
{{ template "flash_alerts" .Data }} {{ if .Data.SyncResult }} {{ template "sync_result" .Data.SyncResult }} {{ end }} {{ if eq .Data.Tab "promote" }}

Pending promotion

staging has changes which are not promoted to prod yet
{{ if .Data.TabApps }} {{ template "app_table" (dict "Apps" .Data.TabApps "AppPath" .AppPath "Perms" .Data.Perms "ShowActions" true "RowAction" "promote") }} {{ else }}

{{ if or .Data.Query .Data.Filter }} No matching apps are pending promotion {{ else }} Nothing to promote - prod matches staging for all apps {{ end }}

{{ end }}
{{ else if eq .Data.Tab "approval" }}

Needs approval

apps requesting plugin permissions which are not approved yet
{{ if .Data.TabApps }} {{ template "app_table" (dict "Apps" .Data.TabApps "AppPath" .AppPath "Perms" .Data.Perms "ShowActions" true "RowAction" "approve") }} {{ else }}

{{ if or .Data.Query .Data.Filter }} No matching apps are waiting on permission approval {{ else }} No apps are waiting on permission approval {{ end }}

{{ end }}
{{ else }} {{ range .Data.Groups }}
{{ if eq .sync.state "Failing" }} {{ else if eq .sync.state "Disabled" }} {{ else }} {{ end }}

{{ .sync.repo }}

{{ if .sync.branch }} {{ .sync.branch }} {{ end }} {{ len .apps }} apps{{ if .sync.last_exec }} · synced {{ template "time_ago" .sync.last_exec }} {{ end }}
sync detail
{{ template "app_table" (dict "Apps" .apps "AppPath" $.AppPath "Perms" $.Data.Perms "ShowActions" true) }}
{{ end }} {{ if .Data.Unmanaged }}

Unmanaged apps

created via UI/CLI - not applied by any sync source
{{ template "app_table" (dict "Apps" .Data.Unmanaged "AppPath" .AppPath "Perms" .Data.Perms "ShowActions" true) }}
{{ end }} {{ if and (not .Data.Groups) (not .Data.Unmanaged) }}
{{ if or .Data.Query .Data.Filter }}

No apps match {{ if .Data.Query }} "{{ .Data.Query }}" {{ else }} the current filter {{ end }}

{{ else }}

No apps installed yet

+ New app {{ end }}
{{ end }} {{ end }} {{ end }}
{{ template "sidebar" . }}