mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Show announce server count (ref #470).
This commit is contained in:
parent
47b4dfa70b
commit
7530d3e257
1 changed files with 3 additions and 10 deletions
|
@ -439,16 +439,9 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
SystemInfo si = new SystemInfo();
|
SystemInfo si = new SystemInfo();
|
||||||
si.alloc = system.getLong("alloc");
|
si.alloc = system.getLong("alloc");
|
||||||
si.cpuPercent = system.getDouble("cpuPercent");
|
si.cpuPercent = system.getDouble("cpuPercent");
|
||||||
if (system.has("extAnnounceOK")) {
|
si.extAnnounceTotal = system.getInt("discoveryMethods");
|
||||||
JSONObject announce = system.getJSONObject("extAnnounceOK");
|
si.extAnnounceConnected =
|
||||||
si.extAnnounceTotal = announce.length();
|
si.extAnnounceTotal - system.getJSONObject("discoveryErrors").length();
|
||||||
for (Iterator<String> it = announce.keys(); it.hasNext(); ) {
|
|
||||||
String key = it.next();
|
|
||||||
if (announce.getBoolean(key)) {
|
|
||||||
si.extAnnounceConnected++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
si.goroutines = system.getInt("goroutines");
|
si.goroutines = system.getInt("goroutines");
|
||||||
si.myID = system.getString("myID");
|
si.myID = system.getString("myID");
|
||||||
si.sys = system.getLong("sys");
|
si.sys = system.getLong("sys");
|
||||||
|
|
Loading…
Reference in a new issue