-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconsole_viewer.ml
More file actions
44 lines (43 loc) · 1.28 KB
/
console_viewer.ml
File metadata and controls
44 lines (43 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
open Tyxml
let console_viewer_layout instance_name unikernel_name =
let page =
Html.(
html
(head
(title (txt (Fmt.str "Console: %s" unikernel_name)))
[
meta ~a:[ a_charset "UTF-8" ] ();
meta
~a:
[
a_name "viewport";
a_content "width=device-width, initial-scale=1.0";
]
();
script
~a:[ a_src "https://unpkg.com/aos@2.3.1/dist/aos.js" ]
(txt "");
script ~a:[ a_src "/main.js" ] (txt "");
])
(body
[
textarea
~a:
[
a_id "console-output";
a_readonly ();
a_disabled ();
a_style
"width: 100%; height: 100vh; box-sizing: border-box; \
resize: none; margin: 0; padding: 10px;";
a_class
[
"bg-transparent border-0 overflow-auto \
whitespace-pre-wrap font-mono";
];
]
(txt "");
footer [];
]))
in
Format.asprintf "%a" (Html.pp ()) page