Complete MySpeed service integration - #161
Conversation
… timestamp formatting
… dynamic theme colors
…history GET api/speedtests answers with the last 24 hours and ten rows unless told otherwise, so the History tab was a day and the day's list was ten tests. The list call now takes hours, limit and start, the three parameters the server reads; hour and afterId did nothing. The run call posts to api/speedtests/run alone, which is the endpoint that exists.
…, and poll the day's list less Labels follow the app's sentence case. The status poll re-reads the day's list when a run ends and once a minute, instead of every five seconds, and no longer touches its ref after the widget is gone.
|
Thanks for building this out to three tabs and checking it against a real MySpeed. It works well against mine too. I pushed some changes to your branch:
One thing left before this can go in: MySpeed can be password protected (the |
…king layer Support optional password authentication for MySpeed across models, networking, health probes, and UI. - Update ServiceKind.myspeed auth style from none to apiKey. - Send password and x-password headers via AuthInterceptor when apiKey is configured. - Register password and x-password headers in serviceAuthHeaderNames. - Switch MySpeed health probe mode to _HealthMode.authed on api/speedtests. - Render obscured optional password field in InstanceFormScreen with helper text for creation and edit settings. - Add unit and widget tests covering interceptor headers, health response interpretation, and form hydration.
|
Thank you for testing this against your instance and for pushing the parameter cleanup, sentence-casing, polling adjustments, and merge, that makes the integration much cleaner and more accurate to MySpeed's server behavior. My apologies for overlooking password protection in the initial pass. I've just pushed a commit adding full authentication support |
…rt will let it through MySpeed 1.0.9 reads a raw password header and newer builds prefer the URL-encoded x-password one, so both go out. Dart's HttpHeaders throws on a value outside printable ASCII, from inside the request, so a password with an accented or non-Latin character broke every call instead of merely missing the older header. The raw one now goes only when it fits; the header-name map says the same.
|
Thanks for the auth, that was quick, and the header choice is right: 1.0.9 reads the raw I pushed one change to your branch:
|
Overview
Implements full support for the MySpeed internet speed monitoring service, featuring a 3-tab interface (Status, History, Config), responsive polling, in-memory history diff caching, dedicated metric visualization cards, and brand asset integration.
Key Changes
1. Status Tab & Execution
/api/speedtests?hour=24).Flexibleand removed duplicate status spinner.2. History Tab & Incremental Caching
MySpeedHistoryNotifierto cache tests in memory and only pull incremental diffs on polling/tab focus, preventing performance degradation with hundreds of tests./api/speedtests/:id) with loading and error states.3. Metric Cards & Theming
MySpeedTestCardcontaining dedicated highlighted boxes for Download, Upload, and Ping.ThemeDatatokens (colors.primary,colors.secondary,colors.tertiary,colors.surfaceContainer).4. Configuration & Storage Tab
GET /api/storageendpoint withMySpeedStoragemodel to display database size and total tests stored.Insets.md(12px).5. App & Model Integration
myspeed.pngintoassets/service_icons/for the instance creation picker.ServiceKind.myspeedincore_models.EasyRefreshpull-to-refresh on all tabs.Verification
service_myspeedTests: 21 unit & widget tests passing (myspeed_api_test.dart,myspeed_home_test.dart).core_modelsTests: 19 tests passing (service_kind_test.dart, serialization).appTests: All brand icon and service render tests passing (myspeed_brand_icon_test.dart,new_services_render_test.dart).