Skip to content

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Repository files navigation

SIRI-SX Situation Monitor

Demo URL: https://opentdatach.github.io/siri-sx/monitor/setup

This is an application for inspecting SIRI-SX situation messages and embedding the passenger information published by one action owner.

It provides an overview of passenger-information messages, highlights invalid data and offers a simple view that can be embedded in other websites.

References

The DTOs and application model are based on the SIRI-SX schema used by the Swiss public-transport implementation and the following official resources:

TypeScript developers can browse the SIRI-SX DTO definitions used by this application. They are application-scoped source definitions, not a separately published npm package.

Application pages

Embedded message page (/)

The minimal, iframe-friendly message view. It has no application header or footer and renders one card for every PublishingAction belonging to the owner specified in the URL.

The feed is filtered by OwnerRef while it is streamed. Matching actions are then checked against the parsed model before being displayed. Unplanned situations have an Unplanned badge. The data is refreshed every minute.

An owner query parameter is required. Without it, the page displays an error.

Messages on this page are ordered by the following criteria:

  1. unplanned before planned
  2. priority ascending (P3 before P4)
  3. active publishing actions before inactive publishing actions when their planned status and priority are the same

For example:

Unplanned P3 — active
Unplanned P3 — inactive
Unplanned P4 — active
Unplanned P4 — inactive
Planned P3 — active
Planned P3 — inactive

Setup and explorer (/setup)

The full SIRI-SX explorer used to find and preview messages. It provides:

  • PROD and INT feed selection
  • message and invalid-situation views
  • filters for priority, operator, action owner, source, cause, scope and perspective
  • language and passenger-text-size selection
  • validation, active-now and unplanned filters
  • free-text search
  • situation, publishing-action, passenger-information and affected-entity details
  • a Preview messages link beside each action owner

Embedding the message view

Hosted example:

https://opentdatach.github.io/siri-sx/monitor/?owner=ch:1:sboid:100170

HTML iframe example:

<iframe
  src="https://opentdatach.github.io/siri-sx/monitor/?owner=ch%3A1%3Asboid%3A100170&amp;lang=fr&amp;text_size=small"
  title="Passenger information"
  width="100%"
  height="600"
  loading="lazy"
></iframe>

Query parameters

Parameter Required Accepted values Default Description
owner Yes A SIRI OwnerRef, for example ch:1:sboid:100170 None Displays only publishing actions owned by this organisation. Missing or empty values produce an error.
stage No prod, int (case-insensitive) prod Selects the SIRI-SX environment. Invalid values produce an error.
lang No de, en, fr, it de Selects the localized passenger-information text. Missing or invalid values use German.
text_size No small, medium, large large Selects the passenger-information content size. Missing or invalid values use large.
perspective No A SIRI perspective, for example general or stopPoint general Displays actions containing the selected perspective. An action may contain additional perspectives.

Default parameters may be omitted. For example, the following URLs are equivalent:

/?owner=ch:1:sboid:100170
/?owner=ch:1:sboid:100170&stage=prod&lang=de&text_size=large&perspective=general

Local development

Install dependencies and start the development server:

npm install
npm start

The application is then available at:

http://localhost:4200/
http://localhost:4200/setup

To preview a specific owner's messages locally:

http://localhost:4200/?owner=ch:1:sboid:100170

Build

npm run build

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages