Modern UI statistics screen: transfer history and the six curves
Section 1 lists the manager's transfers from the original's own records, section 2 the six curves of the original (its labels, weekly values and the absolute scale); the interface scales them itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
015fa65f56
commit
6054a44acf
5 files changed
+64
-5
No files matched your search
@@ -750,7 +750,7 @@ int main(int argc, char** argv) {
|
||||
for (const auto& filter : {cli::Json::Object{{"section", 3}}, cli::Json::Object{{"section", 4}, {"country", 0}},
|
||||
cli::Json::Object{{"section", 4}, {"country", 2}}, cli::Json::Object{{"section", 6}},
|
||||
cli::Json::Object{{"section", 7}}, cli::Json::Object{{"section", 7}, {"category", 1}},
|
||||
cli::Json::Object{{"section", 8}}, cli::Json::Object{{"section", 1}}}) {
|
||||
cli::Json::Object{{"section", 8}}, cli::Json::Object{{"section", 1}}, cli::Json::Object{{"section", 2}}}) {
|
||||
std::string answer = cli::dump_json(session.read_statistics_screen(filter));
|
||||
if (answer.size() > 1500) answer = answer.substr(0, 1500) + " ...";
|
||||
std::printf("statistics screen %s\n -> %s\n", cli::dump_json(filter).c_str(), answer.c_str());
|
||||
|
||||
@@ -277,6 +277,8 @@ int main(int argc, char** argv) {
|
||||
check(truth(at(transfers, "ok")) && !truth(at(transfers, "available")) && s(at(transfers, "reason")) == "not_recorded",
|
||||
"transfer history not recorded");
|
||||
check(s(at(session.read_statistics_screen(O{{"section", 9}}), "error")) == "invalid_statistics_filter", "bad section");
|
||||
const J curves = session.read_statistics_screen(O{{"section", 2}});
|
||||
check(at(curves, "series").array() && at(curves, "series").array()->size() == 6, "the six curves of the original");
|
||||
}
|
||||
} catch (const std::exception& ex) {
|
||||
std::fprintf(stderr, "FAIL: %s\n", ex.what());
|
||||
|
||||
Reference in new issue
Block a user