Skip to content

Commit

Permalink
webui: Fix parcel build error
Browse files Browse the repository at this point in the history
Signed-off-by: Rem01Gaming <[email protected]>
  • Loading branch information
Rem01Gaming committed Sep 16, 2024
1 parent 6183b6d commit 36a0ad0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/webui/src/webui_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function populateCPUGovernors() {
if (govErrno === 0) {
const governors = govStdout.trim().split(/\s+/);
const selectElement1 = document.getElementById('cpuGovernor');
const selectElement2 = document.getElementById('cpuGovernor');
const selectElement2 = document.getElementById('cpuGovernorPerf');

selectElement1.innerHTML = '';
selectElement2.innerHTML = '';
Expand All @@ -93,19 +93,19 @@ async function populateCPUGovernors() {
const option = document.createElement('option');
option.value = gov;
option.textContent = gov;
selectElement.appendChild(option);
selectElement1.appendChild(option);
selectElement2.appendChild(option);
});

let { errno, stdout } = await exec('encore-utils get_default_cpugov');
if (errno === 0) {
const defaultGovernor = stdout.trim();
const { errno: defaultErrno, stdout: defaultStdout } = await exec('encore-utils get_default_cpugov');
if (defaultErrno === 0) {
const defaultGovernor = defaultStdout.trim();
selectElement1.value = defaultGovernor;
}

let { errno, stdout } = await exec('encore-utils get_perf_cpugov');
if (errno === 0) {
const defaultPerfGovernor = stdout.trim();
const { errno: perfErrno, stdout: perfStdout } = await exec('encore-utils get_perf_cpugov');
if (perfErrno === 0) {
const defaultPerfGovernor = perfStdout.trim();
selectElement2.value = defaultPerfGovernor;
}
}
Expand Down

0 comments on commit 36a0ad0

Please sign in to comment.