public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH xtermjs v2 2/4] add handlebars template
Date: Tue, 14 Jul 2020 13:51:04 +0200	[thread overview]
Message-ID: <20200714115106.30195-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20200714115106.30195-1-d.csapak@proxmox.com>

for rust projects, we do not use Perl::Template, but handlebars,
so provide a separate template for that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
new in v2
 debian/rules              |  3 ++-
 src/www/index.html.hbs.in | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 src/www/index.html.hbs.in

diff --git a/debian/rules b/debian/rules
index 6263218..2b62edd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,4 +6,5 @@
 override_dh_auto_build:
 	dh_auto_build
 	sed -e 's/@VERSION@/${VERSION}/' src/www/index.html.tpl.in > src/www/index.html.tpl
-	rm src/www/index.html.tpl.in
+	sed -e 's/@VERSION@/${VERSION}/' src/www/index.html.hbs.in > src/www/index.html.hbs
+	rm src/www/index.html.tpl.in src/www/index.html.hbs.in
diff --git a/src/www/index.html.hbs.in b/src/www/index.html.hbs.in
new file mode 100644
index 0000000..ecbea1b
--- /dev/null
+++ b/src/www/index.html.hbs.in
@@ -0,0 +1,23 @@
+<!doctype html>
+<html>
+    <head>
+	<title>{{ nodename }} - Proxmox Console</title>
+	<link rel="stylesheet" href="/xtermjs/xterm.css?version=@VERSION@" />
+	<link rel="stylesheet" href="/xtermjs/style.css?version=@VERSION@" />
+	<script src="/xtermjs/xterm.js?version=@VERSION@" ></script>
+	<script src="/xtermjs/xterm-addon-fit.js?version=@VERSION@" ></script>
+	<script src="/xtermjs/util.js?version=@VERSION@" ></script>
+    </head>
+    <body>
+	<div id="status_bar"></div>
+	<div id="wrap">
+	<div id="terminal-container"></div>
+	</div>
+	<script type="text/javascript">
+	    if (typeof(PVE) === 'undefined') PVE = {};
+	    PVE.UserName = '{{ UserName }}';
+	    PVE.CSRFPreventionToken = '{{ CSRFPreventionToken }}';
+	</script>
+	<script src="/xtermjs/main.js?version=@VERSION@" defer ></script>
+    </body>
+</html>
-- 
2.20.1





  parent reply	other threads:[~2020-07-14 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 11:51 [pve-devel] [PATCH xtermjs v2 0/4] rewrite in rust Dominik Csapak
2020-07-14 11:51 ` [pve-devel] [PATCH xtermjs v2 1/4] termproxy: " Dominik Csapak
2020-07-14 11:51 ` Dominik Csapak [this message]
2020-07-14 11:51 ` [pve-devel] [PATCH xtermjs v2 3/4] ui: improve error message handling Dominik Csapak
2020-07-14 11:51 ` [pve-devel] [PATCH xtermjs v2 4/4] ui: prevent accidental closing of terminal window Dominik Csapak

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=20200714115106.30195-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-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