[pve-devel] [PATCH 2/3] Add extra /manager5 url route to serve local javascript files

Emmanuel Kasper e.kasper at proxmox.com
Tue Apr 14 13:28:19 CEST 2015


Provided you symlink the manager5 directory to your git repository,
this will allow to test javascript changes by simply reloading
the page, without calling "make install" in between.
For instance, if you have your pve-manager code in $HOME/pve/pve-manager,
you can do

ln -s $HOME/pve/pve-manager/www/manager5 /usr/share/pve-manager/manager5

and you can serve javascript files directly from your copy of the source repo

curl -k -s -o /dev/null -w "%{http_code}" https://localhost:8006/pve2/manager5/Utils.js && printf "\n"
200

Not that at the momment this is only meant for Ext 5 development

Signed-off-by: Emmanuel Kasper <e.kasper at proxmox.com>
---
 bin/pveproxy | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/pveproxy b/bin/pveproxy
index bcec0f9..fe25a80 100755
--- a/bin/pveproxy
+++ b/bin/pveproxy
@@ -93,6 +93,7 @@ sub init {
     add_dirs($dirs, '/pve2/touch/', '/usr/share/pve-manager/touch/');
     add_dirs($dirs, '/pve2/ext4/', '/usr/share/pve-manager/ext4/');
     add_dirs($dirs, '/pve2/ext5/', '/usr/share/pve-manager/ext5/');
+    add_dirs($dirs, '/pve2/manager5/', '/usr/share/pve-manager/manager5/');
     add_dirs($dirs, '/pve2/images/' => '/usr/share/pve-manager/images/');
     add_dirs($dirs, '/pve2/css/' => '/usr/share/pve-manager/css/');
     add_dirs($dirs, '/pve2/js/' => '/usr/share/pve-manager/js/');
-- 
2.1.4




More information about the pve-devel mailing list