Enable a new API call:

sysadm/systemmanager - "action" = "fetch_ports"

OPTIONAL argument: "ports_dir" = directory to place the ports tree

REST Request (example):
-------------------------------
PUT /sysadm/systemmanager
{
   "action" : "fetch_ports"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "fetch_ports"
   },
   "name" : "systemmanager",
   "id" : "fooid"
}

Response:
-------------------------------
{
  "args": {
    "fetch_ports": {
      "process_id": "system_fetch_ports_tree",
      "result": "process_started"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
Ken Moore
2017-10-04 10:37:11 -04:00
parent fba91d29c9
commit 068ef24a66

View File

@@ -449,9 +449,9 @@ QJsonObject SysMgmt::fetchPortsTree(QString altDir){
}
//Now update the tree with git
QString ID = "system_fetch_ports_tree";
DISPATCHER->queueProcess(ID, QStringList() << "cd \""+altDIR+"\"" << "git fetch" << "git pull" );
out->insert("result","process_started");
out->insert("process_id",ID);
DISPATCHER->queueProcess(ID, QStringList() << "cd \""+altDir+"\"" << "git fetch" << "git pull" );
out.insert("result","process_started");
out.insert("process_id",ID);
return out;
}