1
+ <main class="w-full flex-grow p-6">
2
+ <div class="py-3">
3
+ <main class="h-full overflow-y-auto">
4
+ <div class="container mx-auto grid">
5
+ <h6 class="mb-4 font-semibold dark:text-white text-gray-900">Edit <?= $ task ['task ' ]['name ' ]; ?> </h6>
6
+ <div class="grid gap-6 mb-8 md:grid-cols-2 xl:grid-cols-1">
7
+
8
+ <div class="w-full">
9
+ <div class="coding inverse-toggle px-5 pt-4 shadow-lg text-gray-100 dark:bg-gray-800 bg-white pb-6 pt-4 rounded-lg leading-normal overflow-hidden">
10
+
11
+
12
+ <form method="post">
13
+ <input name="action" value="editTask" type="hidden">
14
+ <input name="csrf" value="<?= $ _SESSION ['cn3-wi-csrf ' ] ?> " type="hidden">
15
+ <div class="coding inverse-toggle px-5 pt-4 text-gray-100 dark:bg-gray-800 bg-white pb-6 pt-4 rounded-lg leading-normal overflow-hidden">
16
+ <div class="top mb-2 flex">
17
+ <h4 class="mb-2 font-semibold dark:text-white text-gray-900">Edit Task</h4>
18
+ </div>
19
+ <div class="flex-1 flex flex-col md:flex-row text-sm font-mono subpixel-antialiased">
20
+ <div class="w-full flex-1 mx-2">
21
+ <label for="name">Name</label>
22
+ <input placeholder="Name"
23
+ value="<?= $ task ['task ' ]['name ' ]; ?> "
24
+ id="name"
25
+ name="name"
26
+ type="text"
27
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
28
+ required
29
+ >
30
+ </div>
31
+ <div class="w-full flex-1 mx-2">
32
+ <label for="memory">Memory</label>
33
+ <input placeholder="Ram"
34
+ name="memory"
35
+ id="memory"
36
+ type="number"
37
+ min="0"
38
+ value="<?= $ task ['task ' ]['processConfiguration ' ]['maxHeapMemorySize ' ]; ?> "
39
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
40
+ required
41
+ >
42
+ </div>
43
+ <div class="w-full flex-1 mx-2">
44
+ <label for="environment">environment</label>
45
+ <select
46
+ name="environment"
47
+ id="environment"
48
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
49
+ required
50
+ >
51
+ <option disabled class="text-sm font-mono subpixel-antialiased">
52
+ Select Environment
53
+ </option>
54
+ <option value="minecraft_server" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "MINECRAFT_SERVER " ) echo "selected " ; ?>
55
+ class="text-sm font-mono subpixel-antialiased">
56
+ Minecraft Server
57
+ </option>
58
+ <option value="glowstone" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "GLOWSTONE " ) echo "selected " ; ?>
59
+ class="text-sm font-mono subpixel-antialiased">
60
+ Glowstone
61
+ </option>
62
+ <option value="nukkit" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "NUKKIT " ) echo "selected " ; ?>
63
+ class="text-sm font-mono subpixel-antialiased">
64
+ Nukkit
65
+ </option>
66
+ <option value="go_mint" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "GO_MINT " ) echo "selected " ; ?>
67
+ class="text-sm font-mono subpixel-antialiased">
68
+ Go Mint
69
+ </option>
70
+ <option value="bungeecord" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "BUNGEECORD " ) echo "selected " ; ?>
71
+ class="text-sm font-mono subpixel-antialiased">
72
+ Bungeecord
73
+ </option>
74
+ <option value="velocity" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "VELOCITY " ) echo "selected " ; ?>
75
+ class="text-sm font-mono subpixel-antialiased">
76
+ Velocity
77
+ </option>
78
+ <option value="waterdog_pe" <?php if ($ task ['task ' ]['processConfiguration ' ]['environment ' ] == "WATERDOG_PE " ) echo "selected " ; ?>
79
+ class="text-sm font-mono subpixel-antialiased">
80
+ Waterdog PE
81
+ </option>
82
+ </select>
83
+ </div>
84
+ <div class="w-full flex-1 mx-2">
85
+ <label for="nodes">Nodes</label>
86
+ <select
87
+ multiple
88
+ name="node[]"
89
+ id="nodes"
90
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
91
+ required
92
+ >
93
+ <option disabled class="text-sm font-mono subpixel-antialiased">
94
+ Select Node
95
+ </option>
96
+ <?php
97
+ $ nodes = \webinterface \main::buildDefaultRequest ("cluster " , "GET " );
98
+ foreach ($ nodes ['nodes ' ] as $ node ) { ?>
99
+ <option class="text-sm font-mono subpixel-antialiased" <?php if (in_array ($ node ['node ' ]['uniqueId ' ], $ task ['task ' ]['associatedNodes ' ])) echo "selected " ; ?>
100
+ ><?= $ node ['node ' ]['uniqueId ' ]; ?> </option>
101
+ <?php } ?>
102
+ </select>
103
+ </div>
104
+ <div class="w-full flex-1 mx-2">
105
+ <label for="groups">Groups</label>
106
+ <select
107
+ multiple
108
+ name="group[]"
109
+ id="groups"
110
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
111
+ required
112
+ >
113
+ <option disabled class="text-sm font-mono subpixel-antialiased">
114
+ Select Group
115
+ </option>
116
+ <?php
117
+ $ groups = \webinterface \main::buildDefaultRequest ("group " , "GET " );
118
+ foreach ($ groups ['groups ' ] as $ group ) { ?>
119
+ <option class="text-sm font-mono subpixel-antialiased" <?php if (in_array ($ group ['name ' ], $ task ['task ' ]['groups ' ])) echo "selected " ; ?>
120
+ ><?= $ group ['name ' ]; ?> </option>
121
+ <?php } ?>
122
+ </select>
123
+ </div>
124
+ <div class="w-full flex-1 mx-2">
125
+ <label for="port">Port</label>
126
+ <input placeholder="Port"
127
+ id="port"
128
+ name="port"
129
+ type="number"
130
+ min="0"
131
+ max="65535"
132
+ value="<?= $ task ['task ' ]['startPort ' ]; ?> "
133
+ class="my-2 p-2 dark:bg-gray-900 bg-gray-100 flex border dark:border-gray-900 border-gray-100 rounded px-2 appearance-none outline-none w-full dark:text-white text-gray-900 focus:ring-2 focus:ring-blue-600"
134
+ required
135
+ >
136
+ </div>
137
+ <div class="w-full flex-1 mx-2">
138
+ <label class="inline-flex items-center mt-3">
139
+ <input type="checkbox" name="static" class="form-checkbox h-5 w-5" <?php if ($ task ['task ' ]['staticServices ' ]) echo "checked " ; ?> >
140
+ <span class="ml-2 dark:text-white text-gray-900">Static</span>
141
+ </label>
142
+ <label class="inline-flex items-center mt-3">
143
+ <input type="checkbox" name="auto_delete_on_stop" <?php if ($ task ['task ' ]['autoDeleteOnStop ' ]) echo "checked " ; ?>
144
+ class="form-checkbox h-5 w-5">
145
+ <span class="ml-2 dark:text-white text-gray-900">AutoDeleteOnStop</span>
146
+ </label>
147
+ <label class="inline-flex items-center mt-3">
148
+ <input type="checkbox" name="maintenance" class="form-checkbox h-5 w-5" <?php if ($ task ['task ' ]['maintenance ' ]) echo "checked " ; ?> >
149
+ <span class="ml-2 dark:text-white text-gray-900">Maintenance</span>
150
+ </label>
151
+ </div>
152
+ </div>
153
+ <button type="submit"
154
+ class="h-10 bg-blue-500 text-white rounded-md px-4 py-2 m-2 hover:bg-blue-600 focus:outline-none focus:shadow-outline">
155
+ Save
156
+ </button>
157
+ </div>
158
+ </form>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ </main>
164
+ </div>
165
+ </main>
0 commit comments