use of io.jpom.model.data.AgentWhitelist in project Jpom by dromara.
the class NginxService method tree.
/**
* 获取nginx树型图列表
*
* @return JSONArray
*/
public JSONArray tree() {
JSONArray treeArray = new JSONArray();
AgentWhitelist agentWhitelist = whitelistDirectoryService.getWhitelist();
if (agentWhitelist == null) {
return treeArray;
}
List<String> ngxDirectory = agentWhitelist.getNginx();
if (ngxDirectory == null) {
return treeArray;
}
for (String str : ngxDirectory) {
JSONObject object = addChild(str, "");
if (object != null) {
object.put("title", str);
// object.put("spread", true);
treeArray.add(object);
}
}
return treeArray;
}
Aggregations