|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Screen status |
| 4 | +parent: Content Structure |
| 5 | +nav_order: 8 |
| 6 | +--- |
| 7 | + |
| 8 | +# Screen status |
| 9 | + |
| 10 | +## Preamble |
| 11 | + |
| 12 | +Screen status consists of 2 elements. Tracking latest request from a screen client. |
| 13 | +This data is collected and exposed through the API. |
| 14 | + |
| 15 | +The other part is in the admin where the data can be exposed to the user. |
| 16 | + |
| 17 | +## Setup |
| 18 | + |
| 19 | +### API |
| 20 | + |
| 21 | +Enable tracking latest requests from the screen clients in the API by setting the following values in `.env.local`: |
| 22 | + |
| 23 | +```dotenv |
| 24 | +TRACK_SCREEN_INFO=true |
| 25 | +# Data will only be updated with this interval: |
| 26 | +TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS=300 |
| 27 | +``` |
| 28 | + |
| 29 | +In the infrastructure files these variables can be set by the environment variables: |
| 30 | + |
| 31 | +```dotenv |
| 32 | +APP_TRACK_SCREEN_INFO=true |
| 33 | +APP_TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS=300 |
| 34 | +``` |
| 35 | + |
| 36 | +### Admin |
| 37 | + |
| 38 | +Set the following value in public/config.json to enable showing screen status information in the Admin. |
| 39 | + |
| 40 | +```json |
| 41 | +{ |
| 42 | + "showScreenStatus": true |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +In the infrastructure files this variable can be set by the environment variable: |
| 47 | + |
| 48 | +```dotenv |
| 49 | +APP_SHOW_SCREEN_STATUS=true |
| 50 | +``` |
| 51 | + |
| 52 | +## List view |
| 53 | + |
| 54 | +In the list view of screens, there is a column called "Status". |
| 55 | + |
| 56 | +This column shows the status of the connection of a "screen" in the administration and an |
| 57 | +actual "machine" running the screen data. |
| 58 | + |
| 59 | +This status can be: |
| 60 | + |
| 61 | +* "+ Tilkobl": The screen is not connected to a machine. |
| 62 | +* ✓ (green): The machine is connected and running the latest code. |
| 63 | +* i (yellow circle): The machine is not running the newest released code. |
| 64 | +* ! (red triangle): The machine has not called the API within the last hour or the access token is expired. |
| 65 | + |
| 66 | +## Screen edit view |
| 67 | + |
| 68 | +In the screen edit view, the "Tilkobling" section shows the status of the connection between the |
| 69 | +screen entity and a machine running the screen data. |
| 70 | + |
| 71 | +The status can be: |
| 72 | + |
| 73 | +* "Skærmen er tilkoblet" (green): The machine is connected and running the latest code. |
| 74 | +* "Skærmen kører ikke seneste udgivelse" (yellow circle): The machine is not running the newest released code. |
| 75 | +* "Skærmen har ikke kommunikeret i mere end en time" (red triangle): The machine has not called the API the latest hour. |
| 76 | + |
| 77 | +Furthermore, the section "Tilkobling" will show the following data: |
| 78 | + |
| 79 | +```text |
| 80 | +* Seneste kommunikation: 14/12 2024 11:35 |
| 81 | +* Version: 1.0.9 |
| 82 | +* Kodeudgivelsestidspunkt: 17/6 2024 17:26 |
| 83 | +``` |
| 84 | + |
| 85 | +This shows when the latest communication has occured, what client version the machine is running, |
| 86 | +and the time of client code release. |
0 commit comments