mirror of
https://github.com/unraid/webgui.git
synced 2026-01-21 09:00:19 -06:00
Selectable Start
This commit is contained in:
@@ -113,13 +113,14 @@ if (isset($_POST['contName'])) {
|
||||
goto END;
|
||||
}
|
||||
}
|
||||
$startContainer = true;
|
||||
$startContainer = filter_var($_POST['contStart'],FILTER_VALIDATE_BOOLEAN) ;
|
||||
// Remove existing container
|
||||
if ($DockerClient->doesContainerExist($Name)) {
|
||||
// attempt graceful stop of container first
|
||||
$oldContainerInfo = $DockerClient->getContainerDetails($Name);
|
||||
if (!empty($oldContainerInfo) && !empty($oldContainerInfo['State']) && !empty($oldContainerInfo['State']['Running'])) {
|
||||
// attempt graceful stop of container first
|
||||
$startContainer = true;
|
||||
stopContainer($Name);
|
||||
}
|
||||
// force kill container if still running after 10 seconds
|
||||
@@ -888,10 +889,16 @@ _(Privileged)_:
|
||||
|
||||
: <a href="javascript:addConfigPopup()"><i class="fa fa-fw fa-plus"></i> _(Add another Path, Port, Variable, Label or Device)_</a>
|
||||
|
||||
<?if ($xmlType != "edit"):?>
|
||||
|
||||
: <input type='checkbox' name='contStart' checked> <span class='orange-text'>_(Start Container After Install)_</span>
|
||||
<?endif;?>
|
||||
|
||||
|
||||
: <input type="submit" value="<?=$xmlType=='edit' ? "_(Apply)_" : " _(Apply)_ "?>"><input type="button" value="_(Done)_" onclick="done()">
|
||||
<?if ($authoringMode):?><button type="submit" name="dryRun" value="true" onclick="$('*[required]').prop('required', null);">_(Save)_</button><?endif;?>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1054,7 +1061,7 @@ function load_contOverview() {
|
||||
// Handle code block being created by authors indenting (manually editing the xml and spacing)
|
||||
new_overview = new_overview.replaceAll(" "," ");
|
||||
new_overview = marked(new_overview);
|
||||
} else
|
||||
} else
|
||||
new_overview = new_overview.replaceAll("\n","");
|
||||
$("#contDescription").html(new_overview);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user