feat: add repo_url to app data and update frontend to conditionally display Git Pull button
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
fabcfceb6d
commit
ea0f99b442
3 changed files with 4 additions and 2 deletions
|
|
@ -535,7 +535,7 @@ function renderAppCard(app) {
|
|||
<button class="btn-sm btn-primary" data-action="deploy" data-app="${app.name}">Deploy</button>
|
||||
<button class="btn-sm" data-action="restart" data-app="${app.name}">Restart</button>
|
||||
<button class="btn-sm" data-action="stop" data-app="${app.name}">Stop</button>
|
||||
<button class="btn-sm" data-action="repo-pull" data-app="${app.name}">Git Pull</button>
|
||||
${app.repo_url ? `<button class="btn-sm" data-action="repo-pull" data-app="${app.name}">Git Pull</button>` : ""}
|
||||
<button class="btn-sm btn-danger" data-action="remove" data-app="${app.name}">Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||
"domains": fields[1],
|
||||
"upstream": fields[2],
|
||||
"auth": fields[3].replace("auth=", ""),
|
||||
"repo_url": fields[4] if len(fields) >= 5 else "",
|
||||
})
|
||||
self._json(200, {"ok": True, "apps": apps})
|
||||
return
|
||||
|
|
|
|||
|
|
@ -601,7 +601,8 @@ cmd_list() {
|
|||
# shellcheck disable=SC1090
|
||||
source "${mf}"
|
||||
local domains="${APP_DOMAINS:-${APP_DOMAIN}}"
|
||||
echo "${APP_NAME} ${domains} ${APP_UPSTREAM} auth=${APP_AUTH_PROTECTED}"
|
||||
local repo_info="${APP_REPO_URL:-}"
|
||||
echo "${APP_NAME} ${domains} ${APP_UPSTREAM} auth=${APP_AUTH_PROTECTED} ${repo_info}"
|
||||
done
|
||||
|
||||
if [[ "${found}" -eq 0 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue