diff options
| author | Shulhan <ms@kilabit.info> | 2024-07-08 00:25:11 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-07-15 00:36:07 +0700 |
| commit | e6c6a89ef014bef56d1078fcc622038d35ee2354 (patch) | |
| tree | 973072f71ba632ff6585362bc03d469e389d7b93 /_www | |
| parent | ac0c21615e9dc457995ab5bcb7161cf545887152 (diff) | |
| download | rescached-e6c6a89ef014bef56d1078fcc622038d35ee2354.tar.xz | |
internal/cmd/www: an HTTP server for testing web UI
The web user interface can be run using existing rescached server by
setting the SERVER value in class Rescached (_www/rescached.js).
Diffstat (limited to '_www')
| -rw-r--r-- | _www/rescached.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/_www/rescached.js b/_www/rescached.js index cdfa4c3..a3fdbf5 100644 --- a/_www/rescached.js +++ b/_www/rescached.js @@ -39,21 +39,22 @@ function getRRTypeName(k) { } class Rescached { + static SERVER = ""; static nanoSeconds = 1000000000; - static apiBlockd = "/api/block.d"; - static apiBlockdFetch = "/api/block.d/fetch"; + static apiBlockd = Rescached.SERVER + "/api/block.d"; + static apiBlockdFetch = Rescached.SERVER + "/api/block.d/fetch"; - static apiCaches = "/api/caches"; - static apiCachesSearch = "/api/caches/search"; + static apiCaches = Rescached.SERVER + "/api/caches"; + static apiCachesSearch = Rescached.SERVER + "/api/caches/search"; - static apiEnvironment = "/api/environment"; + static apiEnvironment = Rescached.SERVER + "/api/environment"; - static apiHostsd = "/api/hosts.d"; - static apiHostsdRR = "/api/hosts.d/rr"; + static apiHostsd = Rescached.SERVER + "/api/hosts.d"; + static apiHostsdRR = Rescached.SERVER + "/api/hosts.d/rr"; - static apiZoned = "/api/zone.d"; - static apiZonedRR = "/api/zone.d/rr"; + static apiZoned = Rescached.SERVER + "/api/zone.d"; + static apiZonedRR = Rescached.SERVER + "/api/zone.d/rr"; constructor(server) { this.blockd = {}; |
