mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-10-07 05:56:40 +00:00
OCI catalog verification, console start marks and log cleanup
This commit is contained in:
@@ -414,6 +414,7 @@ class Catalog:
|
||||
ui = template["catalog_ui"]
|
||||
item["hidden"] = overlay_ui.get("hidden", ui.get("hidden", False))
|
||||
item["template_status"] = template["status"]
|
||||
self._index_community_tested(item, template)
|
||||
item["automatic_install_candidate"] = compatibility[
|
||||
"automatic_install_candidate"
|
||||
]
|
||||
@@ -639,6 +640,7 @@ class Catalog:
|
||||
item = index_items[app_id]
|
||||
item["template"] = f"apps/{app_id}.json"
|
||||
item["template_status"] = template["status"]
|
||||
self._index_community_tested(item, template)
|
||||
item["automatic_install_candidate"] = template["compatibility"][
|
||||
"automatic_install_candidate"
|
||||
]
|
||||
@@ -792,6 +794,33 @@ class Catalog:
|
||||
apply_stack_support(template)
|
||||
from .gpu import apply_gpu_contract
|
||||
apply_gpu_contract(template)
|
||||
# Last, so the stack compiler does not reset it.
|
||||
self._apply_verification(app_id, template)
|
||||
|
||||
def _apply_verification(self, app_id: str, template: dict[str, Any]) -> None:
|
||||
"""Real tests recorded in verification.json, kept across regenerations."""
|
||||
path = self.catalog_dir / "verification.json"
|
||||
if not path.exists():
|
||||
return
|
||||
entry = json.loads(path.read_text(encoding="utf-8")).get("applications", {}).get(app_id)
|
||||
if not isinstance(entry, dict):
|
||||
return
|
||||
# An application that can no longer be installed is not shown as verified.
|
||||
installable = template.get("compatibility", {}).get("automatic_install_candidate", False)
|
||||
if entry.get("status") == "laboratory-validated" and installable:
|
||||
template["status"] = "laboratory-validated"
|
||||
if isinstance(entry.get("community_tested"), dict):
|
||||
template["community_tested"] = dict(entry["community_tested"])
|
||||
|
||||
@staticmethod
|
||||
def _index_community_tested(item: dict[str, Any], template: dict[str, Any]) -> None:
|
||||
"""Who tested the application for real outside the ProxMenux lab, and
|
||||
when, as recorded in its overlay."""
|
||||
tested = template.get("community_tested")
|
||||
if isinstance(tested, dict) and tested.get("by"):
|
||||
item["community_tested"] = {"by": str(tested["by"]), "date": str(tested.get("date") or "")}
|
||||
else:
|
||||
item.pop("community_tested", None)
|
||||
|
||||
@classmethod
|
||||
def _deep_merge(cls, target: dict[str, Any], overlay: dict[str, Any]) -> None:
|
||||
|
||||
@@ -167,8 +167,13 @@ def _app_detail_text(catalog: Catalog, item: dict[str, Any], template: dict[str,
|
||||
lines.append(f"{label + ':':<17} {value}")
|
||||
|
||||
row(translate("Source"), publisher(item))
|
||||
row(translate("Status"), translate("Verified by ProxMenux") if is_tested(item)
|
||||
else translate("Not yet verified by ProxMenux (beta)"))
|
||||
# Only a real test is shown; OCI manager Apps is labelled beta as a whole.
|
||||
community = item.get("community_tested") or {}
|
||||
if is_tested(item):
|
||||
row(translate("Status"), translate("Verified by ProxMenux"))
|
||||
elif community.get("by"):
|
||||
who = " · ".join(part for part in (f"@{community['by']}", community.get("date")) if part)
|
||||
row(translate("Status"), f"{translate('Tested by the community')} ({who})")
|
||||
row(translate("Architectures"), _display_architectures(ui))
|
||||
endpoints = template.get("first_run", {}).get("endpoints", [])
|
||||
if endpoints:
|
||||
|
||||
Reference in New Issue
Block a user