[pdm-devel] Superseded: Re: [PATCH datacenter-manager v3 2/2] api-viewer: add an api-viewer package
Shannon Sterz
s.sterz at proxmox.com
Fri Nov 21 17:06:56 CET 2025
Superseded-by: https://lore.proxmox.com/pdm-devel/20251121160447.381730-1-s.sterz@proxmox.com/
On Wed Nov 19, 2025 at 3:06 PM CET, Shannon Sterz wrote:
> this can be installed as a suggested package and will then be served
> at `https://$pdm-host::8443/docs/api-viewer/apidoc.js`.
>
> Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
> Tested-by: Lukas Wagner <l.wagner at proxmox.com>
> Reviewed-by: Lukas Wagner <l.wagner at proxmox.com>
> ---
> Makefile | 1 +
> debian/control | 13 +++++++++
> ...xmox-datacenter-manager-api-viewer.install | 1 +
> docs/api-viewer/Makefile | 27 +++++++++++++++++++
> docs/api-viewer/index.html | 16 +++++++++++
> 5 files changed, 58 insertions(+)
> create mode 100644 debian/proxmox-datacenter-manager-api-viewer.install
> create mode 100644 docs/api-viewer/Makefile
> create mode 100644 docs/api-viewer/index.html
>
> diff --git a/Makefile b/Makefile
> index b2f794a..ca721eb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -82,6 +82,7 @@ install: $(COMPILED_BINS) $(SHELL_COMPLETION_FILES)
> $(foreach i,$(ZSH_COMPLETIONS), \
> install -m644 $(COMPLETION_DIR)/$(i) $(DESTDIR)$(ZSHCOMPDIR)/ ;)
> make -C services install
> + make -C docs/api-viewer install
>
> $(COMPILED_BINS): .do-cargo-build
> .do-cargo-build:
> diff --git a/debian/control b/debian/control
> index 65700ae..ab813df 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -125,6 +125,7 @@ Build-Depends: cargo:native,
> librust-zstd-0.13+default-dev,
> libstd-rust-dev,
> libsystemd-dev,
> + proxmox-widget-toolkit-dev,
> rustc:native,
> Maintainer: Proxmox Support Team <support at proxmox.com>
> Standards-Version: 4.6.1
> @@ -143,6 +144,7 @@ Depends: proxmox-mini-journalreader,
> ${misc:Depends},
> ${shlibs:Depends},
> Recommends: proxmox-datacenter-manager-client, proxmox-datacenter-manager-ui,
> +Suggests: proxmox-datacenter-manager-api-viewer,
> Description: Manage multiple Proxmox VE cluster and other Proxmox projects
> This package provides the API daemons of the Proxmox Datacenter Manager (PDM)
> which allows one to add multiple Proxmox VE and Proxmox Backup Server
> @@ -155,3 +157,14 @@ Depends: ${misc:Depends}, ${shlibs:Depends},
> Description: CLI Client for the Proxmox Datacenter Manager
> This package provides the CLI client that can interface with a Proxmox
> Datacenter Manager (PDM) instance.
> +
> +Package: proxmox-datacenter-manager-api-viewer
> +Architecture: any
> +Multi-Arch: allowed
> +Depends: fonts-font-awesome,
> + libjs-extjs (>= 7~),
> + proxmox-widget-toolkit,
> + ${misc:Depends},
> + ${shlibs:Depends},
> +Recommends: proxmox-datacenter-manager,
> +Description: API Viewer for the Proxmox Datacenter Manager.
> diff --git a/debian/proxmox-datacenter-manager-api-viewer.install b/debian/proxmox-datacenter-manager-api-viewer.install
> new file mode 100644
> index 0000000..0e4d9df
> --- /dev/null
> +++ b/debian/proxmox-datacenter-manager-api-viewer.install
> @@ -0,0 +1 @@
> +usr/share/doc/proxmox-datacenter-manager/html
> diff --git a/docs/api-viewer/Makefile b/docs/api-viewer/Makefile
> new file mode 100644
> index 0000000..c64bfbb
> --- /dev/null
> +++ b/docs/api-viewer/Makefile
> @@ -0,0 +1,27 @@
> +DOCDIR = /usr/share/doc/proxmox-datacenter-manager
> +
> +API_VIEWER_SOURCES= \
> + index.html \
> + apidoc.js
> +
> +API_VIEWER_FILES := \
> + apidata.js \
> + /usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js
> +
> +ifeq ($(BUILD_MODE), release)
> +COMPILEDIR := ../../target/release
> +else
> +COMPILEDIR := ../../target/debug
> +endif
> +
> +.PHONY: install
> +install: ${API_VIEWER_SOURCES}
> + install -dm 0755 $(DESTDIR)$(DOCDIR)/html/api-viewer
> + install -m 0644 ${API_VIEWER_SOURCES} $(DESTDIR)$(DOCDIR)/html/api-viewer
> +
> +apidata.js: ${COMPILEDIR}/docgen
> + ${COMPILEDIR}/docgen apidata.js >$@
> +
> +apidoc.js: ${API_VIEWER_FILES}
> + cat ${API_VIEWER_FILES} >$@.tmp
> + mv $@.tmp $@
> diff --git a/docs/api-viewer/index.html b/docs/api-viewer/index.html
> new file mode 100644
> index 0000000..2bf97c5
> --- /dev/null
> +++ b/docs/api-viewer/index.html
> @@ -0,0 +1,16 @@
> +<!DOCTYPE html>
> +<html>
> + <head>
> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
> + <title>Proxmox Datacenter Manager API Documentation</title>
> +
> + <link rel="stylesheet" type="text/css" href="/extjs/theme-crisp/resources/theme-crisp-all.css">
> + <link rel="stylesheet" type="text/css" href="/proxmox-extjs-widget-toolkit/css/ext6-pmx.css" />
> + <link rel="stylesheet" type="text/css" media="(prefers-color-scheme: dark)" href="/proxmox-extjs-widget-toolkit/themes/theme-proxmox-dark.css" />
> + <link rel="stylesheet" type="text/css" href="/fontawesome/css/font-awesome.css" />
> + <script type="text/javascript" src="/extjs/ext-all.js"></script>
> + <script type="text/javascript" src="apidoc.js"></script>
> +</head>
> +<body></body>
> +</html>
> --
> 2.47.3
More information about the pdm-devel
mailing list