Skip to content

Status page: include the jobs of sub-assets (optional) - #2500

Merged
nhoening merged 7 commits into
mainfrom
feature/2447-status-page-child-asset-jobs
Sep 10, 2026
Merged

nhoening merged 7 commits into
mainfrom
feature/2447-status-page-child-asset-jobs

Conversation

@Ahmad-Wahid

@Ahmad-Wahid Ahmad-Wahid commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • The jobs tab of an asset's status page now also lists the jobs of the asset's sub-assets, so a site asset shows everything that happened below it, even when schedules are triggered on a child.
  • A toggle on that tab ("Include jobs of sub-assets") switches this off; the choice is stored in the user's session, and the default is on. The toggle only appears for assets that have sub-assets.
  • [GET] /assets/(id)/jobs takes a new include_child_assets query parameter (default true), and a new [POST] /assets/status_page_child_jobs records the session preference.
  • Added changelog item in documentation/changelog.rst

Example:

image

How to test

test_build_asset_jobs_data_includes_child_assets, test_get_jobs_of_child_assets, test_update_status_page_child_jobs and test_status_page_include_child_assets_toggle.

Related Items

Closes #2447


Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

🤖 Generated with Claude Code

Ahmad-Wahid and others added 3 commits September 9, 2026 02:39
Context:
- Issue #2447: it is not always clear on which level a schedule is triggered,
  so someone looking at a site asset misses the jobs that ran on its children.

Change:
- Let build_asset_jobs_data() walk the asset's offspring, which the jobs
  endpoint does by default and skips on include_child_assets=false.
- Offer the choice on the jobs tab of the status page, for assets that have
  sub-assets, and remember it in the user's session, as we do for the tab itself.
- Add POST /api/v3_0/assets/status_page_child_jobs to record that preference.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Context:
- Issue #2447 lets the jobs tab of a status page report what happened on the
  asset's sub-assets as well.

Change:
- Assert that a parent asset reports a job triggered on its child, both from
  build_asset_jobs_data() and from the jobs endpoint, and that both leave it
  out when the child assets are excluded.
- Assert that the page offers the choice only where there are sub-assets, that
  it defaults to including them, and that it follows the session.
- Assert that the new endpoint stores the choice in the session.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Ahmad-Wahid
Ahmad-Wahid requested a review from nhoening September 9, 2026 07:49
@Ahmad-Wahid Ahmad-Wahid self-assigned this Sep 9, 2026
@Ahmad-Wahid Ahmad-Wahid added the UI label Sep 9, 2026
@Ahmad-Wahid Ahmad-Wahid added this to the 1.1.0 milestone Sep 9, 2026

@nhoening nhoening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!
I only would now include a column in the table to indicate which asset the job happened on.

Context:
- Review on PR #2500: now that a site asset lists the jobs of everything below
  it, the table should say which asset each job happened on. The Entity column
  does not answer that for a sensor job, whose sensor may sit on any descendant.

Change:
- Report asset_id and asset_name per job, taken from the asset the job was
  collected from rather than the one that was asked about, and show them in a
  new Asset column, linking to that asset.
- Escape the cells that carry user-defined names, which the Asset column needs
  and which the Entity column and the status tooltip were missing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
@Ahmad-Wahid
Ahmad-Wahid requested a review from nhoening September 9, 2026 14:31

@nhoening nhoening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the asset column.
Now I want the same on the sensor data side of things (there, we can also inpsect sensors from other/sub assets)

Ahmad-Wahid and others added 3 commits September 10, 2026 11:42
The only conflict was in the generated OpenAPI spec, resolved by regenerating it from the merged code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Context:
- Review on PR #2500: the sensor data tab lists sensors from sub-assets and from
  the flex context, which can sit on any asset, so it needs the same Asset column
  the jobs tab just got. It only named the asset inside the sensor's tooltip.

Change:
- Report asset_id next to the asset_name a sensor's status already carried, and
  give the table an Asset column linking to that asset, dropping the asset from
  the tooltip that the column now answers.
- Escape the cells carrying user-defined names here as well.
- Refresh a row by its keys rather than by cell index, so that adding a column
  cannot silently write to the wrong one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Nicolas Höning <nicolas@seita.nl>

@nhoening nhoening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nhoening
nhoening merged commit 20bf9a7 into main Sep 10, 2026
13 checks passed
@nhoening
nhoening deleted the feature/2447-status-page-child-asset-jobs branch September 10, 2026 10:29
@BelhsanHmida BelhsanHmida mentioned this pull request Sep 17, 2026
16 tasks done
Flix6x added a commit that referenced this pull request Sep 17, 2026
…er may read

The automations listing, and the jobs listing it followed (#2500), included
every asset below the requested one, on the grounds that whoever may read
an asset may read what is below it, as a child asset belongs to the same
account as its parent. That does not hold: a child asset can belong to
another account, so one organisation could list the automations and jobs
on another's assets simply by holding a parent above them. Each asset below
is now checked for read access on its own (get_readable_offspring).

The test calling build_asset_jobs_data directly now does so as the user who
owns the assets, as an anonymous caller may read none of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Flix6x added a commit that referenced this pull request Sep 17, 2026
…ssets below

Listing the assets below as well asks more of the server, so the
automations and jobs listings, and the automations and status pages, now
list only what belongs to the asset itself by default. The API takes
include-child-assets=true, and each page's switch stores the choice in
the session as before, now starting off. build_asset_jobs_data defaults
to leaving the assets below out, too.

The docs, the API changelog and the changelog entries for this PR and
for #2500, which introduced the status page's switch, say so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Flix6x added a commit that referenced this pull request Sep 22, 2026
* ui/automations: say how far off the next run is, and put the clock time on hover

Context:
- Review of #2294: the next run time can be displayed in more human form,
  like "in 6 minutes", "in 4 hours" or "tomorrow", as other pages already do.
  The precise date and time is still needed, but belongs on hover.

Change:
- Render the next run with getHumanFriendlyDeltaOrTimeStr, the helper the Created At
  column and the status and user pages already use.
- Move the precise time to the tooltip, on the automation's own clock, next to the
  timezone and the cron recurrence that produced it.
- Phrase future moments as "in 6 minutes" rather than "6 minutes from now", matching
  how the same helper already phrases "tomorrow" and "in 4 days". Every other caller
  renders a past moment, so only this column changes wording.
- Give the helper an options.fallback, and pass the schedule-clock time: beyond a week
  there is no useful relative phrasing left, and the old fallback dated the run by the
  viewer's clock rather than by the clock the automation keeps.
- Drop "(local)" from the column heading, which no longer describes what the cell shows.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: read Created At on the automation's own clock

Context:
- The Created At cell showed a friendly delta, but hovering it produced the raw stored
  timestamp in UTC, which is neither precise-looking nor the clock the rest of the row keeps.

Change:
- Spell the creation moment out in the automation's timezone on hover, as the next run
  already does, so a row mixes no clocks.
- Fall back to the same schedule-clock wording once the automation is older than a week,
  rather than dating it by the viewer's own timezone.
- Keep the stored timestamp as the tooltip when the timezone cannot be resolved.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: call the per-automation details button Info

Context:
- "Details" reads like a second Actions menu next to it, while the button only ever opens
  a read-only panel about one automation.

Change:
- Label the button Info, and rename the class, modal ids, row key and loader that name it,
  so the code reads the same as the page.
- Note that DataTables' own info option is its record count, not this column.
- Say "Could not load this automation's info" when that panel fails, matching the button.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* api/v3_0: report the configuration of an automation's data source

Context:
- The automation endpoint named the data source but said nothing about how its data generator
  was set up, so the forecaster's model, training period and regressors were invisible
  to anyone reading an automation.

Change:
- Include the data generator's stored config with the source it belongs to.
  The config is what separates one data source from another of the same model,
  so it is reported alongside the source rather than as a field of its own.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: show the data source's configuration in the Info panel

Context:
- The Info panel named the data source but not the settings it was created with,
  so a reader could not tell which model an automation forecasts with, or over what training period.

Change:
- Read the configuration under the data source it describes, since it is what separates
  this source from another one of the same model.
- Say so plainly when a source records no configuration, rather than showing an empty block.
- Rename the heading from "Data generator" to "Data source", the term the rest of the panel uses.
- Left-align preformatted blocks, which the centred modal text left hanging in mid-air.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* api/v3_0: list the automations of an asset's child assets, too

Context:
- Automations are usually defined on a sub-asset, so a site asset's automations endpoint
  reported nothing, even while plenty ran below it.
- The status page already solved the same problem for jobs, in #2500.

Change:
- Include the automations of the asset's descendants by default, and let
  include_child_assets=false narrow the listing to the asset itself, as [GET] /assets/(id)/jobs does.
  Whoever may read an asset may read its descendants, too, as a child asset belongs to the same account.
- Name the owning asset in each entry, so a listing spanning several assets stays readable.
- Add an endpoint that remembers the user's choice of scope in their session,
  next to the one the status page uses for its own toggle.
- Regenerate the OpenAPI spec.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: show what runs below this asset, too

Context:
- Automations tend to be defined on a sub-asset, so the page of a site asset looked empty
  even while plenty ran beneath it, and there was nowhere to see it all at once.

Change:
- List the automations of sub-assets by default, and name the owning asset in a column
  that links to its own automations page. The column appears only while the listing spans
  more than one asset.
- Offer the scope as a switch, but only on an asset that has children, and remember the choice
  for the next visit. This mirrors the status page's "Include jobs of sub-assets".
- Address every per-automation request at the asset that owns the automation, not at the page's
  asset. Info, Run now, Edit, the activation toggle and Delete all answered 404 on a sub-asset's
  automation otherwise, since those endpoints check that the automation belongs to the asset named.
- Rebuild rather than redraw the table when the scope changes, as the columns change with it,
  and order by where Created At actually sits, now that a column can precede it.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: keep the listing current without a manual reload

Context:
- Runs happen, and jobs change state, while the page sits open. Until now the only way
  to see any of it was to reload by hand, and nothing on screen said how old it was.

Change:
- Fetch the listing again about once a minute, and put the fresh rows into the tables that
  already stand, so the sort the user chose and the place they scrolled to both survive.
- Hold off while the tab is in the background, and catch up as soon as it comes back.
- Hold off while a panel or menu is open, so a refresh never shuts something being read,
  and never let two refreshes overlap.
- Say when the listing last came from the server, re-wording that stamp between refreshes,
  since "2 minutes ago" goes stale with no new data.
- A refresh costs the same requests a manual reload always has, one per automation for the
  job counts. A bulk endpoint for those counts would be the way to cut it, if a large asset
  ever makes it felt.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* tests: cover the automation listing's scope and its data source config

Context:
- The automations endpoint learned to report what runs below an asset, and to describe
  the data source's configuration, and the automations page learned to remember its scope.

Change:
- Check that a sub-asset's automation is listed and names its own asset, that
  include_child_assets=false narrows the listing back to the asset itself,
  and that the data source reports the configuration it was created with.
- Check that posting the page's scope records it in the session, next to the same
  test for the status page's job scope.
- Each was confirmed to fail with the behaviour it covers removed.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* tests: cover how the automations page tells the time, and whose asset a row is

Context:
- The next run is now phrased as a delta with the clock time on hover, Created At is read
  on the automation's own clock, and a row can belong to a sub-asset.

Change:
- Exercise the page's row builder against the real shared time helper, loaded the way the
  page loads it, rather than against a stand-in that could drift from it.
- Check the six-minute case the review asked for, the hover that carries the precise time,
  timezone and recurrence, the fallback to the schedule's clock beyond a week,
  and that sorting still runs on the moment rather than on the words.
- Check that Created At is read on the automation's timezone, using a moment that falls on
  a different date there than in UTC.
- Check that a row names and links the asset its automation is defined on.
- Fail the script helper loudly on an unrendered Jinja value: the two added for the scope
  reached the browser as a syntax error, which reads as every check failing at once.
- Each was confirmed to fail with the behaviour it covers removed.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* docs: describe what the automations page now shows

Context:
- The page reaches below the asset, tells the time in relative terms, keeps itself current,
  and reports the data source's configuration.

Change:
- Describe the sub-asset scope and the query parameter that narrows it.
- Describe the relative next run, what hovering gives, and the clock both time columns read on.
- Mention that the page refreshes itself, and when it holds off.
- Rename "details" to the Info panel, and say it carries the data source's configuration.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* changelog: record the automations page improvements

Context:
- The page follows up on #2294 with relative run times, a scope reaching below the asset,
  a self-refreshing listing, and a renamed Info panel that carries the data source's config.

Change:
- Add a bullet to the automations detail list in the main changelog, beside the #2294 entry.
- Open v3.0-38 in the API change log, for the new query parameter, the config on an
  automation's source, and the endpoint that remembers the page's scope.
- The PR number is not known yet, so the main changelog entry links to PR #XXXX.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* tests: follow the automations page's new markup on the asset page

Context:
- test_asset_page pins the page's rendered script, and still expected the "Next run (local)"
  column heading and the precise time in the cell.

Change:
- Expect the renamed column, and the delta the cell now renders.
- Also pin the scope parameter, the refresh timer, the Info button and the data source's
  configuration, so this test keeps covering what the page grew.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: lay the Info panel out as a panel, and stop calling the cursor UTC

Context:
- Every automation's modal is part of its row, so it sits inside the centred Info cell and
  inherited that centring: headings, values and JSON all sat in the middle of a wide panel.
  Left-aligning only the preformatted blocks had made the mismatch plainer, not better.
- The panel still labelled the cursor UTC, though #2294 began rendering it in the automation's
  own timezone. The value on screen read "+02:00" under a heading saying UTC.

Change:
- Left-align the panel, and set each heading as a small caption above the value it labels.
- Give preformatted blocks a quiet background and a height to scroll within, so a long
  forecaster config no longer pushes the sensors and parameters out of view.
- Drop "(UTC)" from the cursor heading, and say on hover which clock it is read on.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* tests: expect the Info panel's corrected cursor label

Context:
- The panel labelled the cursor UTC while rendering it in the automation's own timezone,
  and this test pinned the wrong label.

Change:
- Expect the heading without "(UTC)", and guard against the old label coming back.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* ui/automations: let a new forecast automation be configured as it is created

Context:
- The API and `flexmeasures add automation` both accept a forecaster `config` and a
  `data-generator`, but the New automation form sent neither, so a forecast automation made
  in the UI always got the default forecaster: CustomLGBM over P30D, with no regressors.
- The Info panel now shows that configuration, which made the gap plainer: you could read a
  training period you had no way to set.

Change:
- Offer a Data generator field and a Configuration (JSON) field, and send each only when filled,
  so leaving them empty still means the API's own defaults.
- Show both only for a forecast automation: a schedule automation's generator follows from the
  asset and its flex config rather than being chosen.
- Say in the field's help that these settings decide which data source the results record under,
  and that they cannot be changed afterwards.
- Report malformed JSON with the field's name and the parser's message, for the configuration
  as well as the parameters, rather than the bare "not valid JSON" the parameters gave.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* tests: cover the configuration fields on the New automation form

Context:
- The form now offers a data generator and a forecaster configuration, for forecast automations only.

Change:
- Pin the fields, the payload lines that send them, and the toggle that hides them for a
  schedule automation. Pinning only the parsing passed with the sending removed, so the
  assertions name the payload.
- Confirmed to fail with the configuration left out of the request.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* changelog: link the automations page improvements to PR #2554

Context:
- The entry was written before the pull request existed, so it linked to a placeholder,
  and it predated the configuration fields on the New automation form.

Change:
- Link to PR #2554.
- Say that a new forecast or report automation can be given its generator's configuration
  from the form, not only through the API and the CLI.

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>

* List the automations and jobs of only those assets below which the user may read

The automations listing, and the jobs listing it followed (#2500), included
every asset below the requested one, on the grounds that whoever may read
an asset may read what is below it, as a child asset belongs to the same
account as its parent. That does not hold: a child asset can belong to
another account, so one organisation could list the automations and jobs
on another's assets simply by holding a parent above them. Each asset below
is now checked for read access on its own (get_readable_offspring).

The test calling build_asset_jobs_data directly now does so as the user who
owns the assets, as an anonymous caller may read none of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Move the UI's session endpoints out of the official API, into kebab-case

The endpoints that store a user's choices in the FlexMeasures UI in their
session are not API a client should build on, and filled the Swagger docs.
All five move to a SessionAPI view in the dev blueprint, whose endpoints
are not part of the official API either:

  /api/v3_0/assets/default_asset_view            -> /api/dev/session/default-asset-view
  /api/v3_0/assets/keep_legends_below_graphs     -> /api/dev/session/keep-legends-below-graphs
  /api/v3_0/assets/status_page_tab               -> /api/dev/session/status-page-tab
  /api/v3_0/assets/status_page_child_jobs        -> /api/dev/session/status-page-child-jobs
  /api/v3_0/assets/automations_page_child_assets -> /api/dev/session/automations-page-child-assets

As their URLs change anyway, their paths and fields are kebab-case, and so
is the include-child-assets query parameter of the automations and jobs
listings. include-child-assets is no longer required by the two page
endpoints, and defaults to false, as listing the assets below as well asks
more of the server. They store what they are sent in the session directly,
rather than copying it into request.values for set_session_variables, and
their 400 responses, which the schemas' 422s made unreachable, are gone
with their Swagger docs. The session keys the templates read are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Document the move, the kebab-case parameter and the permission check, and trim the changelog entry

The API changelog's entry for v3.0-38 names include-child-assets, covers
the jobs listing too, and says only readable assets below are included,
where it claimed readers of an asset may read what is below it. The page
endpoint no longer appears there: a section at the bottom lists the
endpoints supporting the FlexMeasures UI, with a note that they are not
part of the official API and may change in any version. The automations
docs say the page refreshes once a minute, which it does, and the main
changelog entry keeps to what changed for users.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* List only an asset's own automations and jobs, unless asked for the assets below

Listing the assets below as well asks more of the server, so the
automations and jobs listings, and the automations and status pages, now
list only what belongs to the asset itself by default. The API takes
include-child-assets=true, and each page's switch stores the choice in
the session as before, now starting off. build_asset_jobs_data defaults
to leaving the assets below out, too.

The docs, the API changelog and the changelog entries for this PR and
for #2500, which introduced the status page's switch, say so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Include the assets below again by default, as #2447 asked

This reverts 095f631, which had the automations and jobs listings, and
the automations and status pages, leave the assets below out unless asked.
#2447 asked for a site asset to show what happened anywhere below it by
default, as it is often unclear at which level a schedule was triggered,
so the listings and both pages include the assets below again, with
include-child-assets=false or the page's switch to narrow them down.

The session endpoints that store a page's switch now also treat a missing
include-child-assets as true, in line with the pages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Serve the endpoints supporting the UI under /api/ui, instead of /api/dev

The dev blueprint was never under development: it holds the chart endpoints of FlexMeasures' own UI.
Those now live in flexmeasures.api.ui, under /api/ui, and the UI calls them there.
The /api/dev routes keep working, on the off chance that something outside FlexMeasures calls them, until FlexMeasures v2.
The docs page now says these endpoints are not meant for external UIs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Add a changelog entry

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Keep the two released v3 session endpoints working, undocumented

POST /api/v3_0/assets/default_asset_view and POST /api/v3_0/assets/keep_legends_below_graphs were released as part of v3 of the official API.
They keep taking their old request bodies, and store the same session keys as the endpoints that replace them under /api/ui/session,
until v4 of the official API.
They are defined next to those endpoints, so they appear in neither the v3 docs nor Swagger.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Embed an asset chart from the official API in the tutorial on building custom UIs

The tutorial embedded a sensor chart from the endpoints supporting the UI, which are not meant for external UIs.
It now embeds the toy building's chart from GET /api/v3_0/assets/<id>/chart, which shows the graphs set up for the asset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* List the snake_case names that the v3 session endpoints still take

The two released v3 session endpoints keep their request bodies until v4 of the official API,
so their field names stay on the list of names that predate the move to kebab-case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Revert the tutorial's switch to the asset chart endpoint

This reverts commit 99aefcd, to keep this PR to the move of the blueprint:
the tutorial keeps embedding a sensor chart, as the annotations page shows one too, and needs no new screenshot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Leave the endpoints supporting the UI out of the OpenAPI specs, and name the path of their chart attributes

The specs describe the official API, so the generator now skips the views defined in flexmeasures.api.ui,
under /api/ui and under their former /api/dev prefix alike.
The graphs page's dataDevPath is now chartAttributesPath, after what it fetches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Link to the chart endpoints' anchors as the docs render them

Both links ended in a dash that the rendered anchors lack, and the tutorial's spelled the path parameter without its parentheses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Spell the automation endpoints' path parameter automation-id

Flask cannot name a route variable with a dash, so the routes keep automation_id,
while the OpenAPI specs, the docstrings and the docs spell the path parameter in kebab-case, like the rest of the API.
The name of a path parameter never reaches the wire, so this changes no request or response.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129WrXeJ5gia2pctFH93BqC
Signed-off-by: F.N. Claessen <claessen@seita.nl>

---------

Signed-off-by: Mohamed Belhsan Hmida <mohamedbelhsanhmida@gmail.com>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-authored-by: F.N. Claessen <claessen@seita.nl>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include jobs of child-assets on status page (optional)

2 participants