diff --git a/src/webui/src/webui_utils.js b/src/webui/src/webui_utils.js index 4f09ef0..fe99f05 100644 --- a/src/webui/src/webui_utils.js +++ b/src/webui/src/webui_utils.js @@ -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 = ''; @@ -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; } }