feat(admin): region page redesign, resource ledger, drip and dark mode
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m46s
Foundation / image (push) Successful in 5m34s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m46s
Foundation / image (push) Successful in 5m34s
The region view adds the rules-13 drip and complete counts and totals over every life and deposit. The region page is rebuilt around the map: a KPI strip (tick pace, population, deposit capacity, region energy and matter, spent pool, next drip), layer toggles that double as the legend, zoom and a scale, and tabs for inspecting cells and deposits, resources (where each channel sits, the spent pool and each channel's next drip), actions, the running tuning and session access. The admin API serves the region tuning file read only (--region-tuning). Light and dark themes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
// evo-admin-api --listen ADDRESS:PORT --world N --jwks JSON --oidc-issuer URL
|
||||
// --audience NAME --client NAME --role NAME --assets DIR
|
||||
// --pg-passfile F --pg-service F [--region REGION=HOST:PORT ...] [--baseline-tuning F]
|
||||
// [--region-tuning F]
|
||||
//
|
||||
// --assets holds the portal's index.html, app.js and style.css. Each --region names a
|
||||
// region's operations address, whose /admin/view the portal may show; those regions adopt
|
||||
// tuning revisions. --baseline-tuning is the revamp tuning file they opened with, shown
|
||||
// until the first revision. No token is printed.
|
||||
// until the first revision; --region-tuning the region tuning file they start with, shown
|
||||
// read only. No token is printed.
|
||||
#include "evo/persistence/postgres.hpp"
|
||||
#include "evo/server/admin/admin_api.hpp"
|
||||
|
||||
@@ -35,7 +37,8 @@ void on_stop(int) {
|
||||
}
|
||||
|
||||
struct Options {
|
||||
std::string listen, jwks, oidc_issuer, audience, client, role, assets, baseline_tuning;
|
||||
std::string listen, jwks, oidc_issuer, audience, client, role, assets, baseline_tuning,
|
||||
region_tuning;
|
||||
std::uint64_t world{};
|
||||
std::map<std::uint64_t, std::string> regions; // Region to its operations address.
|
||||
persistence::PgOptions pg;
|
||||
@@ -74,6 +77,8 @@ std::optional<Options> parse(int argc, char** argv) {
|
||||
o.assets = value;
|
||||
else if (flag == "--baseline-tuning")
|
||||
o.baseline_tuning = value;
|
||||
else if (flag == "--region-tuning")
|
||||
o.region_tuning = value;
|
||||
else if (flag == "--pg-service")
|
||||
pg_service = value;
|
||||
else if (flag == "--pg-passfile")
|
||||
@@ -169,6 +174,14 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
config.baseline_tuning = std::move(*baseline);
|
||||
}
|
||||
if (!options->region_tuning.empty()) {
|
||||
auto region = read_file(options->region_tuning);
|
||||
if (!region) {
|
||||
std::puts("error region-tuning");
|
||||
return 2;
|
||||
}
|
||||
config.region_tuning = std::move(*region);
|
||||
}
|
||||
config.portal_config_json = "{\"issuer\":\"" + options->oidc_issuer + "\",\"client_id\":\"" +
|
||||
options->client + "\",\"world\":" + std::to_string(options->world) +
|
||||
"}\n";
|
||||
|
||||
Reference in New Issue
Block a user