[pve-devel] [RFC docs] api-viewer: use our extjs package

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jul 13 12:01:54 CEST 2018


The loading of an external hosted ExtJS is from a time where we did
not have a extra ExtJS package as it still was in the pve-manager
one.
Add a dependency on libjs-extjs and a link from api-viewer/extjs to
the instalation directory of the ExtJS package, this allows to reuse
ExtJS on PVE node hosted docs and on the hosted docs from proxmox.com
at the same time.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 api-viewer/extjs      | 1 +
 api-viewer/index.html | 4 ++--
 debian/control.in     | 2 +-
 debian/pve-docs.links | 1 +
 4 files changed, 5 insertions(+), 3 deletions(-)
 create mode 120000 api-viewer/extjs
 create mode 100644 debian/pve-docs.links

diff --git a/api-viewer/extjs b/api-viewer/extjs
new file mode 120000
index 0000000..b71ec6e
--- /dev/null
+++ b/api-viewer/extjs
@@ -0,0 +1 @@
+/usr/share/javascript/extjs
\ No newline at end of file
diff --git a/api-viewer/index.html b/api-viewer/index.html
index 97ed69e..3cd1cdc 100644
--- a/api-viewer/index.html
+++ b/api-viewer/index.html
@@ -5,8 +5,8 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <title>Proxmox VE API Documentation</title>
 
-    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/classic/theme-crisp-touch/resources/theme-crisp-touch-all.css">
-   <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.1/ext-all-debug.js"></script>   
+    <link rel="stylesheet" type="text/css" href="extjs/theme-crisp/resources/theme-crisp-all.css">
+    <script type="text/javascript" src="extjs/ext-all-debug.js"></script>
     <script type="text/javascript" src="apidoc.js"></script>
 </head>
 <body></body>
diff --git a/debian/control.in b/debian/control.in
index 39f4af5..d068965 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -2,5 +2,5 @@ Source: pve-docs
 Section: perl
 Priority: extra
 Maintainer: Proxmox Support Team <support at proxmox.com>
-Build-Depends: debhelper (>= 7.0.50~), lintian
+Build-Depends: debhelper (>= 7.0.50~), lintian, libjs-extjs
 Standards-Version: 3.8.4
diff --git a/debian/pve-docs.links b/debian/pve-docs.links
new file mode 100644
index 0000000..78185f7
--- /dev/null
+++ b/debian/pve-docs.links
@@ -0,0 +1 @@
+/usr/share/javascript/extjs /usr/share/pve-docs/api-viewer/extjs
-- 
2.18.0





More information about the pve-devel mailing list