1
- < form method ="POST " action ="{{ script_root }}/admin/chal/new " enctype ="multipart/form-data ">
2
- < div class ="form-group ">
3
- < div class ="alert alert-secondary " role ="alert ">
4
- Dynamic docker challenge that allows the player to deploy a standalone instance for this challenge.
5
- </ div >
6
- </ div >
1
+ {% extends "admin/challenges/create.html" %}
7
2
8
- < div class ="form-group ">
9
- < label for ="name "> Name< br >
10
- < small class ="form-text text-muted ">
11
- The name of your challenge
12
- </ small >
13
- </ label >
14
- < input type ="text " class ="form-control " name ="name " placeholder ="Enter challenge name ">
15
- </ div >
16
- < div class ="form-group ">
17
- < label for ="category "> Category< br >
18
- < small class ="form-text text-muted ">
19
- The category of your challenge
20
- </ small >
21
- </ label >
22
- < input type ="text " class ="form-control " name ="category " placeholder ="Enter challenge category ">
23
- </ div >
3
+ {% block header %}
4
+ < div class ="alert alert-secondary " role ="alert ">
5
+ Dynamic docker challenge allows players to deploy their per-challenge standalone instances.
6
+ </ div >
7
+ {% endblock %}
24
8
25
- < ul class ="nav nav-tabs " role ="tablist " id ="new-desc-edit ">
26
- < li class ="nav-item ">
27
- < a class ="nav-link active " href ="#new-desc-write " aria-controls ="home " role ="tab "
28
- data-toggle ="tab "> Write</ a >
29
- </ li >
30
- < li class ="nav-item ">
31
- < a class ="nav-link " href ="#new-desc-preview " aria-controls ="home " role ="tab " data-toggle ="tab "> Preview</ a >
32
- </ li >
33
- </ ul >
34
-
35
- < div class ="tab-content ">
36
- < div role ="tabpanel " class ="tab-pane active " id ="new-desc-write ">
37
- < div class ="form-group ">
38
- < label for ="message-text " class ="control-label "> Message
39
- < small class ="form-text text-muted ">
40
- Use this to give a brief introduction to your challenge. The description supports HTML and
41
- Markdown.
42
- </ small >
43
- </ label >
44
- < textarea id ="new-desc-editor " class ="form-control " name ="description " rows ="10 "> </ textarea >
45
- </ div >
46
- </ div >
47
- < div role ="tabpanel " class ="tab-pane content " id ="new-desc-preview " style ="height:234px; overflow-y: scroll; ">
48
- </ div >
49
- </ div >
50
-
51
- < div class ="form-group ">
52
- < label for ="value "> Initial Value< br >
53
- < small class ="form-text text-muted ">
54
- This is how many points the challenge is worth initially.
55
- </ small >
56
- </ label >
57
- < input type ="number " class ="form-control " name ="value " placeholder ="Enter value " required >
58
-
59
- </ div >
60
-
61
- < div class ="form-group ">
62
- < label for ="value "> Decay Limit< br >
63
- < small class ="form-text text-muted ">
64
- The amount of solves before the challenge reaches its minimum value
65
- </ small >
66
- </ label >
67
- < input type ="number " class ="form-control " name ="decay " placeholder ="Enter decay limit " required >
68
- </ div >
69
-
70
- < div class ="form-group ">
71
- < label for ="value "> Minimum Value< br >
72
- < small class ="form-text text-muted ">
73
- This is the lowest that the challenge can be worth
74
- </ small >
75
- </ label >
76
- < input type ="number " class ="form-control " name ="minimum " placeholder ="Enter minimum value " required >
77
-
78
- </ div >
79
9
10
+ {% block value %}
80
11
< div class ="form-group ">
81
- < label for ="value "> Docker Image< br >
82
- < small class ="form-text text-muted ">
83
- The docker image used to deploy
84
- </ small >
85
- </ label >
86
- < input type ="text " class ="form-control " name ="docker_image " placeholder ="Enter docker image name " required >
87
-
88
- </ div >
89
-
12
+ < label for ="value "> Docker Image< br >
13
+ < small class ="form-text text-muted ">
14
+ The docker image used to deploy
15
+ </ small >
16
+ </ label >
17
+ < input type ="text " class ="form-control " name ="docker_image " placeholder ="Enter docker image name " required >
18
+ </ div >
90
19
< div class ="form-group ">
91
- < label for ="value "> Frp Redirect Type< br >
92
- < small class ="form-text text-muted ">
93
- Decide the redirect type how frp redirect traffic
94
- </ small >
95
- </ label >
96
-
20
+ < label for ="value "> Frp Redirect Type< br >
21
+ < small class ="form-text text-muted ">
22
+ Decide the redirect type how frp redirect traffic
23
+ </ small >
24
+ </ label >
97
25
< select class ="form-control " name ="redirect_type ">
98
26
< option value ="http " selected > HTTP</ option >
99
27
< option value ="direct "> Direct</ option >
100
28
</ select >
101
- </ div >
102
-
29
+ </ div >
103
30
< div class ="form-group ">
104
- < label for ="value "> Frp Redirect Port< br >
105
- < small class ="form-text text-muted ">
106
- Decide which port in the instance that frp should redirect traffic for
107
- </ small >
108
- </ label >
109
- < input type ="number " class ="form-control " name ="redirect_port " placeholder ="Enter the port you want to open " required >
110
-
111
- </ div >
112
-
31
+ < label for ="value "> Frp Redirect Port< br >
32
+ < small class ="form-text text-muted ">
33
+ Decide which port in the instance that frp should redirect traffic for
34
+ </ small >
35
+ </ label >
36
+ < input type ="number " class ="form-control " name ="redirect_port " placeholder ="Enter the port you want to open "
37
+ required >
38
+ </ div >
113
39
< div class ="form-group ">
114
- < label for ="value "> Docker Container Memory Limit< br >
115
- < small class ="form-text text-muted ">
116
- The memory usage limit
117
- </ small >
118
- </ label >
119
- < input type ="text " class ="form-control " name ="memory_limit " placeholder ="Enter the memory limit " value ="128m " required >
120
-
121
- </ div >
122
-
40
+ < label for ="value "> Docker Container Memory Limit< br >
41
+ < small class ="form-text text-muted ">
42
+ The memory usage limit
43
+ </ small >
44
+ </ label >
45
+ < input type ="text " class ="form-control " name ="memory_limit " placeholder ="Enter the memory limit " value ="128m "
46
+ required >
47
+ </ div >
48
+ < div class ="form-group ">
49
+ < label for ="value "> Docker Container CPU Limit< br >
50
+ < small class ="form-text text-muted ">
51
+ The CPU usage limit
52
+ </ small >
53
+ </ label >
54
+ < input type ="number " class ="form-control " name ="cpu_limit " placeholder ="Enter the cpu limit " value ="0.5 "
55
+ required >
56
+ </ div >
123
57
< div class ="form-group ">
124
- < label for ="value "> Docker Container CPU Limit< br >
125
- < small class ="form-text text-muted ">
126
- The CPU usage limit
127
- </ small >
128
- </ label >
129
- < input type ="number " class ="form-control " name ="cpu_limit " placeholder ="Enter the cpu limit " value ="0.5 " required >
58
+ < label for ="value "> Initial Value< br >
59
+ < small class ="form-text text-muted ">
60
+ This is how many points the challenge is worth initially.
61
+ </ small >
62
+ </ label >
63
+ < input type ="number " class ="form-control " name ="value " placeholder ="Enter value " required >
64
+ </ div >
130
65
131
- </ div >
66
+ < div class ="form-group ">
67
+ < label for ="value "> Decay Limit< br >
68
+ < small class ="form-text text-muted ">
69
+ The amount of solves before the challenge reaches its minimum value
70
+ </ small >
71
+ </ label >
72
+ < input type ="number " class ="form-control " name ="decay " placeholder ="Enter decay limit " required >
73
+ </ div >
132
74
133
- < input type ="hidden " name ="state " value ="hidden ">
134
- < input type ="hidden " value ="dynamic_docker " name ="type " id ="chaltype ">
75
+ < div class ="form-group ">
76
+ < label for ="value "> Minimum Value< br >
77
+ < small class ="form-text text-muted ">
78
+ This is the lowest that the challenge can be worth
79
+ </ small >
80
+ </ label >
81
+ < input type ="number " class ="form-control " name ="minimum " placeholder ="Enter minimum value " required >
82
+ </ div >
135
83
136
84
< div class ="form-group ">
137
- < label for ="value "> Score Type< br >
138
- < small class ="form-text text-muted ">
139
- Decide it use dynamic score or not
140
- </ small >
141
- </ label >
85
+ < label for ="value "> Score Type< br >
86
+ < small class ="form-text text-muted ">
87
+ Decide it use dynamic score or not
88
+ </ small >
89
+ </ label >
142
90
143
91
< select class ="form-control " name ="dynamic_score ">
144
92
< option value ="0 " selected > Static Score</ option >
145
93
< option value ="1 "> Dynamic Score</ option >
146
94
</ select >
147
- </ div >
95
+ </ div >
96
+ {% endblock %}
148
97
149
- < div class ="form-group ">
150
- < button class ="btn btn-primary float-right create-challenge-submit " type ="submit "> Create</ button >
151
- </ div >
152
- </ form >
98
+ {% block type %}
99
+ < input type ="hidden " value ="dynamic_docker " name ="type " id ="chaltype ">
100
+ {% endblock %}
0 commit comments