Skip to content

Commit

Permalink
fix cmdlineMenu/synoinfoMenu, fix custom kernel for RR-CUSTOM
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Jul 21, 2024
1 parent 0034888 commit 47c5f76
Show file tree
Hide file tree
Showing 19 changed files with 6,120 additions and 6,037 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
language= ''
model = ''
version = ''
kernel = ''
addons = ''
modules = ''
try:
Expand All @@ -51,6 +52,7 @@ jobs:
language = jsonbody.get('language', '')
model = jsonbody.get('model', '')
version = jsonbody.get('version', '')
kernel = jsonbody.get('kernel', '')
addons = jsonbody.get('addons', '')
modules = jsonbody.get('modules', '')
except ValueError as e:
Expand All @@ -67,6 +69,7 @@ jobs:
set_output("language", language)
set_output("model", model)
set_output("version", version)
set_output("kernel", kernel)
set_output("addons", addons)
set_output("modules", modules)

Expand Down Expand Up @@ -196,12 +199,26 @@ jobs:
exit 1
fi
if [ -n "${{ env.kernel }}" ]; then
echo -en "set kernel"
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
writeConfigKey "kernel" "${{ env.kernel }}" "${USER_CONFIG_FILE}"
echo ""
fi
sudo ./localbuild.sh config "${MODEL}" "${VERSION}"
if [ $? -ne 0 ]; then
echo "config failed"
exit 1
fi
if [ -n "${{ env.kernel }}" ]; then
echo -en "set kernel"
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
writeConfigKey "kernel" "${{ env.kernel }}" "${USER_CONFIG_FILE}"
echo ""
fi
if [ -n "${{ env.addons }}" ]; then
echo -en "set addons"
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
Expand All @@ -214,7 +231,8 @@ jobs:
done
echo ""
fi
if [ -n "${{ env.modules }}" ]; then
if [ ! "custom" = "${{ env.kernel }}" ] && [ -n "${{ env.modules }}" ]; then
echo -en "set modules"
USER_CONFIG_FILE="rr/ws/mnt/p1/user-config.yml"
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
Expand Down Expand Up @@ -250,9 +268,11 @@ jobs:
echo "" >> README.txt
echo "DSM:" >> README.txt
echo " MODEL: $(readConfigKey "model" "${USER_CONFIG_FILE}")" >> README.txt
echo " PATURL: $(readConfigKey "paturl" "${USER_CONFIG_FILE}")" >> README.txt
echo " PATSUM: $(readConfigKey "patsum" "${USER_CONFIG_FILE}")" >> README.txt
echo " MODEL: $(readConfigKey "model" "${USER_CONFIG_FILE}")" >> README.txt
echo " VERSION: $(readConfigKey "productver" "${USER_CONFIG_FILE}")" >> README.txt
echo " KERNEL: $(readConfigKey "kernel" "${USER_CONFIG_FILE}")" >> README.txt
echo " PATURL: $(readConfigKey "paturl" "${USER_CONFIG_FILE}")" >> README.txt
echo " PATSUM: $(readConfigKey "patsum" "${USER_CONFIG_FILE}")" >> README.txt
echo "" >> README.txt
echo "" >> README.txt
Expand Down
52 changes: 43 additions & 9 deletions docs/issues.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
$("#model").on("change", changeModel);
$("#version").on("change", changeVersion);
$("#language").on("change", changeVersion);
$("#kernel").on("change", chanageKernel);
$('#addons').val("acpid,mountloader,reboottoloader");
setModels();
});
Expand Down Expand Up @@ -112,6 +113,7 @@
function changeVersion() {
createAddonsBtn();
createModulesBtn();
chanageKernel();
}
function createAddonsBtn() {
var language = $("#language").val();
Expand Down Expand Up @@ -159,6 +161,24 @@
$('#modules').val(extstr.join(","));
}
}

function chanageKernel() {
var model = $("#model").val();
var version = $("#version").val();
var kernel = $("#kernel").val();
if (model == "SA6400" && version == "7.2") {
$("#kernel_item").show();
if (kernel == "custom") {
$('#modules_item').hide();
} else {
$('#modules_item').show();
}
} else {
$('#modules_item').show();
$("#kernel_item").hide();
}
}

function onclickext(type, ext) {
var btnobj = $("#btn_" + ext);
var extstr = $('#' + type).val().split(",");
Expand All @@ -185,9 +205,10 @@
let formData = new FormData(form);
var title = "custom";
var body = {};
var _parameters = ["title", "format", "language", "model", "version", "addons", "modules"];
var _parameters = ["title", "format", "language", "model", "version", "kernel", "addons", "modules"];
for (var key in _parameters) {
var name = _parameters[key];
if ($("#" + name).is(":hidden")) { continue; }
if (name == "title") {
if ($("#" + name).val()) {
title += " " + $("#" + name).val();
Expand Down Expand Up @@ -248,16 +269,17 @@
</marquee>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="title_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Title: (Please do not delete the "custom " in the title of the issue creation page.)</label>
<label class="color-fg-default text-mono f6">Title: (Please do not delete the "custom " in the title of
the issue creation page.)</label>
</div>
<div class="form-group-body">
<input class="form-control input-contrast input-sm" type="text" id="title" name="inputs[title]"
value="" />
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="format_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Format:</label>
</div>
Expand All @@ -271,7 +293,7 @@
</select>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="language_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Language:</label>
</div>
Expand All @@ -296,7 +318,7 @@
</select>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="model_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Model:</label>
</div>
Expand All @@ -307,7 +329,7 @@
</select>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="version_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Version:</label>
</div>
Expand All @@ -318,7 +340,19 @@
</select>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="kernel_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Kernel: (only "custom" supports Hyper-V, Xen.)</label>
</div>
<div class="form-group-body">
<select class="form-select form-control select-sm input-contrast" id="kernel" name="inputs[kernel]"
value="">
<option selected="selected" value="official">official</option>
<option value="custom">custom</option>
</select>
</div>
</div>
<div class="form-group mt-1 mb-2" id="addons_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Addons:</label>
<a href="https://github.com/RROrg/rr/raw/main/docs/addons.xlsx"> Details</a>
Expand All @@ -330,7 +364,7 @@
</div>
</div>
</div>
<div class="form-group mt-1 mb-2 ">
<div class="form-group mt-1 mb-2" id="modules_item">
<div class="form-group-header">
<label class="color-fg-default text-mono f6">Modules:</label>
<a href="https://github.com/RROrg/rr/raw/main/docs/modules.xlsx"> Details</a>
Expand Down
Loading

0 comments on commit 47c5f76

Please sign in to comment.