fix zones list

This commit is contained in:
Peter Hormanns 2022-12-20 14:28:01 +01:00
parent 246a5192d6
commit 6196c64ce2

View File

@ -144,20 +144,6 @@ public class JsonPillarServlet extends HttpServlet {
writer.println(" }"); writer.println(" }");
} }
writer.println(" ]"); writer.println(" ]");
boolean firstLoopZones = true;
writer.println(" , \"zones\": [");
for (final String zone : dnsZones.keySet()) {
if (firstLoopZones) {
firstLoopZones = false;
writer.println(" {");
} else {
writer.println(" , {");
}
writer.println(" \"zone\": \"" + zone + "\"");
writer.println(" , \"acmeupdates\": " + dnsZones.get(zone).toString().toLowerCase());
writer.println(" }");
}
writer.println(" ]");
writer.println(" , \"pacs\": ["); writer.println(" , \"pacs\": [");
final Iterator<?> pacsIterator = pacsResult.iterator(); final Iterator<?> pacsIterator = pacsResult.iterator();
boolean firstLoopPacs = true; boolean firstLoopPacs = true;
@ -244,6 +230,20 @@ public class JsonPillarServlet extends HttpServlet {
writer.println(" }"); writer.println(" }");
} }
writer.println(" ]"); writer.println(" ]");
boolean firstLoopZones = true;
writer.println(" , \"zones\": [");
for (final String zone : dnsZones.keySet()) {
if (firstLoopZones) {
firstLoopZones = false;
writer.println(" {");
} else {
writer.println(" , {");
}
writer.println(" \"zone\": \"" + zone + "\"");
writer.println(" , \"acmeupdates\": " + dnsZones.get(zone).toString().toLowerCase());
writer.println(" }");
}
writer.println(" ]");
writer.println("}"); writer.println("}");
writer.close(); writer.close();
transaction.close(); transaction.close();