Skip to content

Commit

Permalink
webaccess: port network configuration to NetworkManager
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Feb 4, 2024
1 parent d245b68 commit fa51c43
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 368 deletions.
10 changes: 3 additions & 7 deletions webaccess/res/networkconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ function systemCmd(cmd, iface, mode, addr, mask, gw, ssid, wpapsk)
}

function showStatic(iface, enable) {
var divName = iface + "StaticFields";
var obj=document.getElementById(divName);
if (enable === true) {
obj.style.visibility="visible";
} else {
obj.style.visibility="hidden";
}
document.getElementById(iface + "IPaddr").disabled = !enable;
document.getElementById(iface + "Netmask").disabled = !enable;
document.getElementById(iface + "Gateway").disabled = !enable;
}

function applyParams(iface) {
Expand Down
2 changes: 1 addition & 1 deletion webaccess/src/webaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void WebAccess::slotHandleWebSocketRequest(QHttpConnection *conn, QString data)

if (cmdList.at(1) == "NETWORK")
{
if (m_netConfig->updateNetworkFile(cmdList) == true)
if (m_netConfig->updateNetworkSettings(cmdList) == true)
{
QString wsMessage = QString("ALERT|" + tr("Network configuration changed. Reboot to apply the changes."));
conn->webSocketWrite(QHttpConnection::TextFrame, wsMessage.toUtf8());
Expand Down

0 comments on commit fa51c43

Please sign in to comment.