mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
more api work for sourcectl
This commit is contained in:
@@ -90,9 +90,25 @@ QJsonObject Dispatcher::CreateDispatcherEventNotification(QString ID, QJsonObjec
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_downloadsource"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::saveSourceLog(cLog); //save this for use later
|
||||
}
|
||||
|
||||
}else if(ID.startsWith("sysadm_sourcectl")){
|
||||
if(ID.section("::",0,0)=="sysadm_sourcectl_updatesource"){
|
||||
namesp = "sysadm"; name="soucectl";
|
||||
//No special parsing here: the git output should be available as-is
|
||||
args.insert("update_log",cLog);
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_updatesource"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::saveSourceLog(cLog); //save this for use later
|
||||
}
|
||||
}else if(ID.startsWith("sysadm_sourcectl")){
|
||||
if(ID.section("::",0,0)=="sysadm_sourcectl_deleteports"){
|
||||
namesp = "sysadm"; name="soucectl";
|
||||
//No special parsing here: the git output should be available as-is
|
||||
args.insert("update_log",cLog);
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_deleteports"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::savePortsLog(cLog); //save this for use later
|
||||
}
|
||||
}else if(ID.startsWith("sysadm_sourcectl")){
|
||||
if(ID.section("::",0,0)=="sysadm_sourcectl_downloadports"){
|
||||
namesp = "sysadm"; name="soucectl";
|
||||
//No special parsing here: the git output should be available as-is
|
||||
@@ -100,8 +116,27 @@ QJsonObject Dispatcher::CreateDispatcherEventNotification(QString ID, QJsonObjec
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_downloadports"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::savePortsLog(cLog); //save this for use later
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(ID.startsWith("sysadm_sourcectl")){
|
||||
if(ID.section("::",0,0)=="sysadm_sourcectl_updateports"){
|
||||
namesp = "sysadm"; name="soucectl";
|
||||
//No special parsing here: the git output should be available as-is
|
||||
args.insert("update_log",cLog);
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_updateports"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::savePortsLog(cLog); //save this for use later
|
||||
}
|
||||
}else if(ID.startsWith("sysadm_sourcectl")){
|
||||
if(ID.section("::",0,0)=="sysadm_sourcectl_deleteports"){
|
||||
namesp = "sysadm"; name="soucectl";
|
||||
//No special parsing here: the git output should be available as-is
|
||||
args.insert("update_log",cLog);
|
||||
}else if(full_log && ID.section("::",0,0)=="sysadm_sourcectl_deleteports"){
|
||||
//qDebug() << "Got update check process finished";
|
||||
sysadm::sourcectl::savePortsLog(cLog); //save this for use later
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Now assemble the output as needed
|
||||
if(namesp.isEmpty() || name.isEmpty()){ return QJsonObject(); } //no event
|
||||
|
||||
@@ -612,12 +612,6 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmSystemMgmtRequest(const QJso
|
||||
ok = true;
|
||||
out->insert("deviceinfo", sysadm::SysMgmt::systemDevices());
|
||||
}
|
||||
else if(act=="fetch_ports"){
|
||||
ok = true;
|
||||
QString altdir;
|
||||
if(keys.contains("ports_dir")){ altdir = in_args.toObject().value("ports_dir").toString(); }
|
||||
out->insert("fetch_ports", sysadm::SysMgmt::fetchPortsTree(altdir));
|
||||
}
|
||||
|
||||
} //end of "action" key usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user