Cleanup a couple backend API calls:

1) In the system manager "process info" function, use the -a flag for top so we get the whole command instead of just the first binary.
2)Cleanup a bit more of the backend of the new firewall manager.
This commit is contained in:
Ken Moore
2016-09-13 12:05:38 -04:00
parent c9f227eebc
commit 9df060fd3d
2 changed files with 4 additions and 5 deletions

View File

@@ -256,10 +256,9 @@ void Firewall::SaveOpenPorts(QList<PortInfo> openports)
file.close();
}
//Re-load/start rules (just in case - it is a smart script)
if(IsRunning())
{
QStringList args;
if(IsRunning()){ Restart(); }
/* QStringList args;
args << "/usr/local/share/pcbsd/scripts/reset-firewall";
General::RunCommand("sh",args);
}
}*/
}

View File

@@ -257,7 +257,7 @@ QJsonObject SysMgmt::memoryStats() {
QJsonObject SysMgmt::procInfo() {
QJsonObject retObject;
QStringList output;
output = General::RunCommand("top -t -n all").split("\n");
output = General::RunCommand("top -t -n -a all").split("\n");
bool inSection = false;
for(int i=0; i<output.length(); i++){
if (output.at(i).contains("PID") && output.at(i).contains("USERNAME")){