[pve-devel] [RFC manager 01/28] add proxmox-widget-toolkit to pve gui
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Dec 11 16:25:50 CET 2017
From: Dominik Csapak <d.csapak at proxmox.com>
we will use components from proxmox-widget-toolkit rather than
directly from pve-manager
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
PVE/Service/pveproxy.pm | 3 +++
debian/control | 1 +
www/index.html.tpl | 8 ++++++++
3 files changed, 12 insertions(+)
diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm
index 7d39900a..e9bf00ce 100755
--- a/PVE/Service/pveproxy.pm
+++ b/PVE/Service/pveproxy.pm
@@ -111,6 +111,9 @@ sub init {
'/favicon.ico' => {
file => "$basedirs->{manager}/images/favicon.ico",
},
+ '/proxmoxlib.js' => {
+ file => "/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js",
+ },
},
dirs => $dirs,
};
diff --git a/debian/control b/debian/control
index 9e399edc..5952adc3 100644
--- a/debian/control
+++ b/debian/control
@@ -54,6 +54,7 @@ Depends: apt-transport-https,
novnc-pve,
perl (>= 5.10.0-19),
postfix | mail-transport-agent,
+ proxmox-widget-toolkit (>= 1.0-8),
pve-cluster (>= 5.0-17),
pve-container,
pve-docs,
diff --git a/www/index.html.tpl b/www/index.html.tpl
index 6bbdea18..c4f4602a 100644
--- a/www/index.html.tpl
+++ b/www/index.html.tpl
@@ -23,6 +23,14 @@
<script type="text/javascript" src="/pve2/ext6/ext-all.js"></script>
<script type="text/javascript" src="/pve2/ext6/charts.js"></script>
[% END %]
+ <script type="text/javascript">
+ Proxmox = {
+ Setup: { auth_cookie_name: 'PVEAuthCookie' },
+ UserName: '[% username %]',
+ CSRFPreventionToken: '[% token %]'
+ };
+ </script>
+ <script type="text/javascript" src="/proxmoxlib.js"></script>
<script type="text/javascript" src="/pve2/js/pvemanagerlib.js?ver=[% version %]"></script>
<script type="text/javascript" src="/pve2/ext6/locale/locale-[% lang %].js"></script>
--
2.11.0
More information about the pve-devel
mailing list