public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Shannon Sterz" <s.sterz@proxmox.com>
Cc: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] Superseded: Re: [PATCH datacenter-manager v3 2/2] api-viewer: add an api-viewer package
Date: Fri, 21 Nov 2025 17:06:56 +0100	[thread overview]
Message-ID: <DEEI2UBS5HPV.2GK463Q7C4ARY@proxmox.com> (raw)
In-Reply-To: <20251119140609.230763-11-s.sterz@proxmox.com>

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@proxmox.com>
> Tested-by: Lukas Wagner <l.wagner@proxmox.com>
> Reviewed-by: Lukas Wagner <l.wagner@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@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



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


      reply	other threads:[~2025-11-21 16:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 14:05 [pdm-devel] [PATCH datacenter-manager/proxmox{, -backup}/widget-toolkit v3 00/10] unstable flag and pdm api viewer Shannon Sterz
2025-11-19 14:05 ` [pdm-devel] [PATCH proxmox v3 1/5] router/api-macro: add unstable flag for ApiMethod Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 2/5] pve-api-types: generate array objects Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 3/5] pve-api-types: fix clippy lints Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 4/5] docgen: add docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 5/5] docgen: add support for the new stable flag Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH widget-toolkit v3 1/1] api viewer: add support for endpoints that are marked as unstable Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox-backup v3 1/2] docgen: use proxmox-rs docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox-backup v3 2/2] notifications/pbsXtoX: adapt to proxmox-apt making old_version optional Shannon Sterz
2025-11-21 16:06   ` Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH datacenter-manager v3 1/2] docgen: switch to proxmox-rs docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH datacenter-manager v3 2/2] api-viewer: add an api-viewer package Shannon Sterz
2025-11-21 16:06   ` Shannon Sterz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DEEI2UBS5HPV.2GK463Q7C4ARY@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal