-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathunikernel_create.ml
108 lines (108 loc) · 4.32 KB
/
unikernel_create.ml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
let unikernel_create_layout =
Tyxml_html.(
section
~a:[ a_class [ "col-span-7 p-4 bg-gray-50 my-1" ] ]
[
div
~a:[ a_class [ "px-3 flex justify-between items-center" ] ]
[
p
~a:[ a_class [ "font-bold text-gray-700" ] ]
[ txt "Deploy a Unikernel" ];
];
hr ();
div
~a:[ a_class [ "space-y-6 mt-8 p-6 max-w-5xl mx-auto" ] ]
[
p ~a:[ a_id "form-alert"; a_class [ "my-4 hidden" ] ] [];
div
[
label
~a:[ a_class [ "block text-sm font-medium" ] ]
[ txt "Name*" ];
input
~a:
[
a_input_type `Text;
a_name "name";
a_required ();
a_id "unikernel-name";
a_class
[
"ring-primary-100 mt-1.5 transition appearance-none \
block w-full px-3 py-3 rounded-xl shadow-sm border \
hover:border-primary-200\n\
\ \
focus:border-primary-300 bg-primary-50 bg-opacity-0 \
hover:bg-opacity-50 focus:bg-opacity-50 \
ring-primary-200 focus:ring-primary-200\n\
\ \
focus:ring-[1px] focus:outline-none";
];
]
();
];
div
[
label
~a:[ a_class [ "block text-sm font-medium" ] ]
[ txt "Arguments*" ];
textarea
~a:
[
a_rows 4;
a_required ();
a_name "arguments";
a_id "unikernel-arguments";
a_class
[
"ring-primary-100 mt-1.5 transition appearance-none \
block w-full px-3 py-3 rounded-xl shadow-sm border \
hover:border-primary-200\n\
\ \
focus:border-primary-300 bg-primary-50 bg-opacity-0 \
hover:bg-opacity-50 focus:bg-opacity-50 \
ring-primary-200 focus:ring-primary-200\n\
\ \
focus:ring-[1px] focus:outline-none";
];
]
(txt "");
];
div
[
label
~a:[ a_class [ "block text-sm font-medium" ] ]
[ txt "Unikernel Image Binary*" ];
input
~a:
[
a_input_type `File;
a_name "binary";
a_required ();
a_id "unikernel-binary";
a_class
[
"ring-primary-100 mt-1.5 transition appearance-none \
block w-full px-3 py-3 rounded-xl shadow-sm border \
hover:border-primary-200\n\
\ \
focus:border-primary-300 bg-primary-50 bg-opacity-0 \
hover:bg-opacity-50 focus:bg-opacity-50 \
ring-primary-200 focus:ring-primary-200\n\
\ \
focus:ring-[1px] focus:outline-none";
];
]
();
];
div
~a:[ a_class [ "flex justify-items-center mx-auto w-60" ] ]
[
Utils.button_component
~attribs:
[ a_id "deploy-button"; a_onclick "deployUnikernel()" ]
~content:(txt "Deploy") ~btn_type:`Primary_full ();
];
];
])