mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
API CHANGE
Add a new field in the output args for the sysadm/updates check for updates: "last_check":"<ISO date/time stamp>" This returns the timestamp the last time a "full" check was performed (since some checks are flagged as quick/automatic and just re-use the previous check unless a significant amount of time has passed first - 12 hours is what it is set to right now).
This commit is contained in:
@@ -59,6 +59,7 @@ QJsonObject Update::checkUpdates(bool fast) {
|
||||
General::writeTextFile(UP_UPFILE, output); //save this check for later "fast" updates
|
||||
}
|
||||
//qDebug() << "pc-updatemanager checks:" << output;
|
||||
|
||||
QString nameval;
|
||||
int pnum=1;
|
||||
for ( int i = 0; i < output.size(); i++)
|
||||
@@ -106,6 +107,7 @@ QJsonObject Update::checkUpdates(bool fast) {
|
||||
// Update status that we have updates
|
||||
retObject.insert("status", "updatesavailable");
|
||||
}
|
||||
retObject.insert("last_check",QFileInfo(UP_UPFILE).lastModified().toString(Qt::ISODate) );
|
||||
return retObject;
|
||||
}
|
||||
|
||||
@@ -276,4 +278,3 @@ QJsonObject Update::writeSettings(QJsonObject obj){
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user