You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="small no-margin">If you do not want to assign swap space to a server simply put <code>0</code> for the value, or <code>-1</code> to allow unlimited swap space. If you want to disable memory limiting on a server simply enter <code>0</code> into the memory field. We suggest leaving OOM Killer enabled unless you know what you are doing, disabling it could cause your server to hang unexpectedly.<p>
<pclass="small no-margin">If you do not want to limit CPU usage set the value to <code>0</code>. To determine a value, take the number <em>physical</em> cores and multiply it by 100. For example, on a quad core system <code>(4 * 100 = 400)</code> there is <code>400%</code> available. To limit a server to using half of a single core, you would set the value to <code>50</code>. To allow a server to use up to two physical cores, set the value to <code>200</code>. BlockIO should be a value between <code>10</code> and <code>1000</code>. Please see <ahref="https://docs.docker.com/engine/reference/run/#/block-io-bandwidth-blkio-constraint"target="_blank">this documentation</a> for more information about it.<p>
161
+
</div>
162
+
</div>
163
+
</div>
164
+
</div>
165
+
</div>
106
166
</form>
107
167
@endsection
108
168
109
169
@section('footer-scripts')
110
170
@parent
111
171
<script>
112
172
$(document).ready(function() {
113
-
$('#pLocationId').select2();
114
-
$('#pNodeId').select2();
115
-
$('#pIp').select2();
116
-
$('#pPort').select2();
173
+
$('#pLocationId').select2({
174
+
placeholder:'Select a Location',
175
+
}).change();
176
+
$('#pNodeId').select2({
177
+
placeholder:'Select a Node',
178
+
});
179
+
$('#pAllocation').select2({
180
+
placeholder:'Select a Default Allocation',
181
+
});
182
+
$('#pAllocationAdditional').select2({
183
+
placeholder:'Select Additional Allocations',
184
+
});
117
185
118
186
$('#pUserId').select2({
119
187
ajax: {
@@ -165,16 +233,22 @@ function showLoader() {
165
233
$('#allocationLoader').show();
166
234
}
167
235
236
+
var lastActiveBox =null;
237
+
$(document).on('click', function (event) {
238
+
if (lastActiveBox !==null) {
239
+
lastActiveBox.removeClass('box-primary');
240
+
}
241
+
242
+
lastActiveBox =$(event.target).closest('.box');
243
+
lastActiveBox.addClass('box-primary');
244
+
});
245
+
168
246
var currentLocation =null;
169
247
var curentNode =null;
170
-
var currentIP =null;
171
-
172
-
var NodeDataIdentifier =null;
173
248
var NodeData = [];
174
-
var AllocationsForNode =null;
175
249
176
250
$('#pLocationId').on('change', function (event) {
177
-
showLoader()
251
+
showLoader();
178
252
currentLocation =$(this).val();
179
253
currentNode =null;
180
254
@@ -185,8 +259,7 @@ function showLoader() {
185
259
data: { location: currentLocation },
186
260
}).done(function (data) {
187
261
NodeData = data;
188
-
console.log(data);
189
-
$('#pNodeId').select2({data: data});
262
+
$('#pNodeId').select2({data: data}).change();
190
263
}).fail(function (jqXHR) {
191
264
cosole.error(jqXHR);
192
265
currentLocation =null;
@@ -197,31 +270,13 @@ function showLoader() {
197
270
currentNode =$(this).val();
198
271
$.each(NodeData, function (i, v) {
199
272
if (v.id== currentNode) {
200
-
NodeDataIdentifier = i;
201
-
$('#pIp').select2({
202
-
data:$.map(v.allocations, function (item) {
203
-
return {
204
-
id:item.ip,
205
-
text:item.ip,
206
-
}
207
-
}),
208
-
})
209
-
}
210
-
});
211
-
});
212
-
213
-
$('#pIp').on('change', function (event) {
214
-
currentIP =$(this).val();
215
-
$.each(NodeData[NodeDataIdentifier].allocations, function (i, v) {
0 commit comments