{{/* Copyright (c) ClaceIO, LLC */}} {{/* SPDX-License-Identifier: Apache-2.0 */}} {{/* App create/update form (/apps/create, /apps/update). Create supports a Validate (dry run) step and a post-create permission approval step */}} {{ template "head" . }}
{{ template "drawer_toggle" }}
{{ template "page_progress" }} {{ block "op_form" . }}
{{ template "error_alert" .Data.Error }} {{ if eq .Data.Step "approve" }} {{ if not .Data.Error }} {{ end }} {{ template "perms_card" (dict "Review" .Data.Review "Note" "Approving grants the plugin and permission usage listed above") }}
Approve later
{{ else if and (eq .Data.Mode "update") (not .Data.App) }}

The app could not be loaded

Back to apps
{{ else }} {{ template "validation_alert" (dict "Validated" .Data.Validated "Value" .Data.Values.path "Suffix" "is ready to be created" "BreakAll" true) }} {{ if .Data.Validated }} {{ template "perms_card" (dict "Review" .Data.Review "Note" "These permissions will need approval when the app is created") }} {{ end }} {{ if eq .Data.Mode "update" }}
Source
{{ .Data.App.source_url }}
Version
v{{ .Data.App.version }}
Spec
{{ if .Data.App.spec }}{{ .Data.App.spec }}{{ else }}-{{ end }}
Branch
{{ if .Data.App.git_branch }} {{ .Data.App.git_branch }} {{ else }} - {{ end }}
{{ end }}
{{ if eq .Data.Mode "create" }}

Path where the app is served, optionally with a domain

Git url or a directory on the server

App spec to use when the source has no app.star, for example python-flask or static

{{ end }}

default uses the server's app_default_auth setting

Parameters {{ template "kv_table" (dict "Field" "params" "AppPath" .AppPath "Prefix" "appparam" "CanCreate" (index .Data.Perms "secret:create") "CanDelete" (index .Data.Perms "secret:delete") "Rows" .Data.Values.params_rows "KeyPlaceholder" "SMTP_HOST" "ValuePlaceholder" "smtp.example.com" "AddLabel" "Add parameter") }}

The lock button encrypts a value into the secrets store and uses the secret reference instead. {{ if eq .Data.Mode "update" }} Removing a row deletes the parameter. {{ end }}

Service bindings {{ $opts := .Data.BindingOptions }}
{{ range .Data.Values.bindings }} {{ template "binding_row" (dict "Options" $opts "Selected" .) }} {{ end }} {{ if or $opts.services $opts.bindings .Data.Values.bindings }} {{ else }}

No services or bindings are configured

{{ end }}

Bind the app to a service (an auto binding is created for the app) or to an existing binding

{{ if eq .Data.Mode "update" }} {{ end }}
Cancel {{ if eq .Data.Mode "create" }} {{ else }} {{ end }}
{{ end }}
{{ end }}
{{ template "sidebar" . }}
{{/* binding_row is one service bindings row: a select over the configured services (binding to a service creates an auto binding for the app) and the existing base/derived binding paths. Context: dict with Options (the BindingOptions lists) and optional Selected. A selected value missing from the lists (e.g. a CLI-created reference) is kept as an extra option */}} {{ define "binding_row" }} {{ $sel := or .Selected "" }} {{ $found := not $sel }}
{{/* min-w-0: a select's min-content width is its widest option text (long binding paths), which would defeat flex shrinking on mobile */}}
{{ end }}