Improve artifact availability UX
CI / php-store (push) Waiting to run
CI / python-components (push) Waiting to run

This commit is contained in:
2026-08-24 22:42:56 +02:00
parent 3028bf522c
commit 0440b6a48f
12 changed files with 85 additions and 23 deletions
+8 -2
View File
@@ -83,12 +83,16 @@ class PluginDetailView(StorePermissionMixin, View):
except StoreClientError as exc:
raise Http404(redact_text(exc)) from exc
state = _plugin_state(plugin, set(django_settings.PLUGINS))
installable_releases = plugin.installable_releases(
runtime.netbox_version,
require_approval_marker=runtime.execution_mode == "agent",
)
actions: list[str] = []
if not state["installed"]:
if plugin.approved:
if plugin.approved and installable_releases:
actions.append("install")
else:
if plugin.approved:
if plugin.approved and installable_releases:
actions.append("update")
if state["enabled"]:
actions.append("disable")
@@ -107,7 +111,9 @@ class PluginDetailView(StorePermissionMixin, View):
"state": state,
"actions": actions,
"releases": releases,
"has_installable_release": bool(installable_releases),
"local_status": local_status,
"runtime": runtime,
},
)