()
| 27 | } |
| 28 | |
| 29 | function LoadStats() { |
| 30 | var data = { |
| 31 | queries: 700, |
| 32 | slowQueries: 40, |
| 33 | timeQueries: 800, |
| 34 | timeQuerying: 50, |
| 35 | scripts: 20, |
| 36 | databasesUsed: 2, |
| 37 | failedQueries: 5 |
| 38 | } |
| 39 | $("#statsQueries").html("Queries: " + data.queries); |
| 40 | $("#statsQueries").css("border-color", data.queries >= 1000 ? Colors.danger : data.queries >= 500 ? Colors.warn : Colors.success) |
| 41 | |
| 42 | $("#statsSlowQueries").html("Slow queries: " + data.slowQueries); |
| 43 | $("#statsSlowQueries").css("border-color", data.slowQueries >= 40 ? Colors.danger : data.slowQueries >= 15 ? Colors.warn : Colors.success) |
| 44 | |
| 45 | $("#statsAverageQueries").html("Average queries: " + data.timeQueries + "ms"); |
| 46 | $("#statsAverageQueries").css("border-color", data.timeQueries >= 1000 ? Colors.danger : data.timeQueries >= 300 ? Colors.warn : Colors.success) |
| 47 | |
| 48 | $("#statsTimeQuerying").html("Time querying: " + data.timeQuerying + " s"); |
| 49 | $("#statsTimeQuerying").css("border-color", data.timeQuerying >= 100 ? Colors.danger : data.timeQuerying >= 50 ? Colors.warn : Colors.success) |
| 50 | |
| 51 | $("#statsScripts").html("Scripts: " + data.scripts); |
| 52 | $("#statsScripts").css("border-color", data.scripts >= 40 ? Colors.danger : data.scripts >= 30 ? Colors.warn : Colors.success) |
| 53 | |
| 54 | $("#statsDBCount").html("Databases used: " + data.databasesUsed); |
| 55 | $("#statsDBCount").css("border-color", data.databasesUsed >= 4 ? Colors.danger : data.databasesUsed > 2 ? Colors.warn : Colors.success) |
| 56 | |
| 57 | $("#statsFailedQueries").html("Failed queries: " + data.failedQueries); |
| 58 | $("#statsFailedQueries").css("border-color", data.failedQueries >= 10 ? Colors.danger : data.failedQueries >= 5 ? Colors.warn : Colors.success) |
| 59 | } |
| 60 | |
| 61 | function CloseResourceModal() { |
| 62 | $(".popup_container").removeClass("animate__fadeInUp"); |
nothing calls this directly
no outgoing calls
no test coverage detected