All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit ae626b77 authored by Keith Downie's avatar Keith Downie

Added 'Advanced Options' section to the Finalize page

parent 6f9f7aa7
......@@ -570,6 +570,7 @@ function CheckStep2()
global $ajax_args;
global $ISAPT, $ISPNET, $ISCLOUD, $ISEMULAB;
global $TB_PROJECT_CREATEEXPT;
$durationlimit = 16;
if (!isset($ajax_args["formfields"])) {
SPITAJAX_ERROR(-1, "Missing formfields");
......@@ -683,6 +684,16 @@ function CheckStep2()
$errors["name"] = "Already in use by another experiment";
}
}
if (!isset($formfields["duration"]) || $formfields["duration"] == "") {
$errors["duration"] = "Must set an experiment duration";
}
elseif (!ctype_digit($formfields["duration"]) ) {
$errors["duration"] = "Must be an integer between 1 and ".$durationlimit;
}
elseif (((int)$formfields["duration"]) <= 0 || ((int)$formfields["duration"]) > $durationlimit) {
$errors["duration"] = "Must be an integer between 1 and ".$durationlimit;
}
}
if (count($errors)) {
SPITAJAX_ERROR(2, $errors);
......
......@@ -232,16 +232,16 @@
<table class='table table-condensed nospaceafter border-none'
style="font-size: 14px; font-family: Arial,sans-serif;">
<tr>
<td style="padding: 0px;">
<td style="padding: 0px; border: 0;">
<span style="font-weight: bolder;">Profile:</span>
<span id='finalize_profile_name'><%= profilename %></span>
</td>
<td style="padding: 0px;">
<td style="padding: 0px; border: 0;">
<span style="font-weight: bolder;">Version:</span>
<span id='finalize_profile_version'><%= profilevers %>
</span>
</td>
<td style="padding: 0px;">
<td style="padding: 0px; border: 0;">
<button class='btn btn-primary btn-xs'
type='button'
id="show_xml_modal_button">
......@@ -356,22 +356,60 @@
</div>
<% } %>
<% if (1) { %>
<div class='form-horizontal experiment_option'>
<div class='form-group format-me'>
<div class="row">
<h5>
<a href="#advanced_options_dropdown" data-toggle="collapse">
<span class="glyphicon glyphicon-plus-sign pull-left"
style="font-weight: bold;"></span>
<span style="font-weight: bold; margin-left: 12px">Advanced Options</span>
</a>
</h5>
<div id="advanced_options_dropdown"
class="panel-collapse collapse">
<div class='form-horizontal experiment_option'>
<div class='form-group format-me'>
<label class='col-sm-4 control-label'
style='text-align: right;'>Ignore Failures:</label>
<div class='col-sm-2'>
<input id='failure_okay' type="checkbox"
value="checked"
class=''
data-key='failure_okay'
name='failure_okay'
<%= formfields.failure_okay %>>
style='text-align: right;'>Experiment Duration:</label>
<div class="col-sm-6"
data-toggle='popover'
data-delay='{hide:1500, show:500}'
data-html='true'
data-content="Sets the intial amount of time that the
experiment will run. Limit: 16 hours. If more time is needed, the duration can be extended after the
experiment has been created.">
<input id='experiment_duration'
class='form-control'
data-key='duration'
name='duration'
value='16'>
<label style='position: absolute;
top: 6px;
right: 22px;
font-weight: normal;
color: #aaa'>
hours
</label>
<label class='control-label control-error hidden'
for='duration'></label>
</div>
</div>
<label class='control-label control-error hidden'
for='failure_okay'></label>
</div>
<div class='form-horizontal experiment_option'>
<div class='form-group format-me'>
<div class="row">
<label class='col-sm-4 control-label'
style='text-align: right;'>Ignore Failures:</label>
<div class='col-sm-2'>
<input id='failure_okay' type="checkbox"
value="checked"
class=''
data-key='failure_okay'
name='failure_okay'
<%= formfields.failure_okay %>>
</div>
</div>
<label class='control-label control-error hidden'
for='failure_okay'></label>
</div>
</div>
</div>
<% } %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment