mirror of
https://github.com/unraid/webgui.git
synced 2026-04-29 14:29:24 -05:00
Merge pull request #905 from Squidly271/dockerRequires
Docker: Support CA tag <Requires>
This commit is contained in:
@@ -225,6 +225,7 @@ if ($_GET['xmlTemplate']) {
|
||||
}
|
||||
$arrConfig['Name'] = strip_tags($arrConfig['Name']);
|
||||
$arrConfig['Description'] = strip_tags($arrConfig['Description']);
|
||||
$arrConfig['Requires'] = strip_tags($arrConfig['Requires']);
|
||||
}
|
||||
}
|
||||
if (!empty($dockercfg['DOCKER_APP_UNRAID_PATH']) && file_exists($dockercfg['DOCKER_APP_UNRAID_PATH'])) {
|
||||
@@ -734,6 +735,18 @@ _(Overview)_:
|
||||
|
||||
:docker_client_overview_help:
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="basic">
|
||||
_(Additional Requirements)_:
|
||||
: <span id="contRequires" class="boxed blue-text"></span>
|
||||
|
||||
</div>
|
||||
<div markdown="1" class="advanced">
|
||||
_(Additional Requirements)_:
|
||||
: <textarea name="contRequires" spellcheck="false" cols="80" Rows="3" style="width:56%"></textarea>
|
||||
|
||||
:docker_client_additional_requirements_help:
|
||||
|
||||
</div>
|
||||
|
||||
<div markdown="1" class="<?=$showAdditionalInfo?>">
|
||||
@@ -1046,6 +1059,15 @@ function load_contOverview() {
|
||||
new_overview = marked(new_overview);
|
||||
new_overview = new_overview.replaceAll("\n","<br>"); // has to be after marked
|
||||
$("#contDescription").html(new_overview);
|
||||
|
||||
var new_requires = $("textarea[name='contRequires']").val();
|
||||
new_requires = new_requires.replaceAll("[","<").replaceAll("]",">");
|
||||
// Handle code block being created by authors indenting (manually editing the xml and spacing)
|
||||
new_requires = new_requires.replaceAll(" "," ");
|
||||
new_requires = marked(new_requires);
|
||||
new_requires = new_requires.replaceAll("\n","<br>"); // has to be after marked
|
||||
new_requires = new_requires ? new_requires : "<em>_(None Listed)_</em>";
|
||||
$("#contRequires").html(new_requires);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
@@ -45,6 +45,7 @@ function postToXML($post, $setOwnership=false) {
|
||||
$xml->DateInstalled = xml_encode(time());
|
||||
$xml->DonateText = xml_encode($post['contDonateText']);
|
||||
$xml->DonateLink = xml_encode($post['contDonateLink']);
|
||||
$xml->Requires = xml_encode($post['contRequires']);
|
||||
|
||||
// V1 compatibility
|
||||
$xml->Description = xml_encode($post['contOverview']);
|
||||
@@ -120,6 +121,7 @@ function xmlToVar($xml) {
|
||||
$out['CPUset'] = xml_decode($xml->CPUset);
|
||||
$out['DonateText'] = xml_decode($xml->DonateText);
|
||||
$out['DonateLink'] = xml_decode($xml->DonateLink);
|
||||
$out['Requires'] = xml_decode($xml->Requires);
|
||||
$out['Config'] = [];
|
||||
if (isset($xml->Config)) {
|
||||
foreach ($xml->Config as $config) {
|
||||
|
||||
Reference in New Issue
Block a user