Skip to content

Commit

Permalink
asu: device and default package input
Browse files Browse the repository at this point in the history
Use separate fields for the device and default packages.
This is meant to improve attention to what packages might
brick the device.

Signed-off-by: Moritz Warning <[email protected]>
  • Loading branch information
mwarning committed Oct 7, 2024
1 parent 479f3dd commit a70fa1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion www/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ header > div {
overflow: scroll;
}

#asu-packages,
#asu-device-packages,
#asu-default-packages,
#uci-defaults-content,
#uci-defaults-group {
resize: none;
Expand Down
11 changes: 3 additions & 8 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,9 @@ <h3 id="build-title" class="tr-version-build">About this build</h3>
</div>
</div>
<div>
<h5 class="tr-packages">Installed Packages</h5>
<textarea
rows="10"
id="asu-packages"
autocomplete="off"
spellcheck="false"
autocapitalize="off"
></textarea>
<h5 class="tr-packages">Install Packages</h5>
<textarea rows="2" id="asu-device-packages"></textarea>
<textarea rows="7" id="asu-default-packages"></textarea>
</div>
<h5 class="tr-defaults">
Script to run on first boot (uci-defaults)
Expand Down
8 changes: 5 additions & 3 deletions www/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ function buildAsuRequest(request_hash) {
var body = JSON.stringify({
profile: current_device.id,
target: current_device.target,
packages: split($("#asu-packages").value),
packages: split(
$("#asu-device-packages").value + " " + $("#asu-default-packages").value
),
defaults: $("#uci-defaults-content").value,
version_code: $("#image-code").innerText,
version: $("#versions").value,
Expand Down Expand Up @@ -642,8 +644,8 @@ function updateImages(mobj) {
hide("#asu-log");
hide("#asu-buildstatus");
// Pre-select ASU packages.
$("#asu-packages").value = mobj.default_packages
.concat(mobj.device_packages)
$("#asu-device-packages").value = mobj.device_packages.join(" ");
$("#asu-default-packages").value = mobj.default_packages
.concat(config.asu_extra_packages || [])
.join(" ");
}
Expand Down

0 comments on commit a70fa1d

Please sign in to comment.