Skip to content

Commit 8498ef6

Browse files
committed
Merge branch 'release/2.4.0'
2 parents 348c9fb + 386d19e commit 8498ef6

File tree

16 files changed

+499
-5
lines changed

16 files changed

+499
-5
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,6 @@ CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS=300
105105
###< Calendar Api Feed Source ###
106106

107107
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS=300
108+
109+
TRACK_SCREEN_INFO=false
110+
TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS=300

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [2.4.0] - 2025-03-31
8+
9+
- [#238](https://github.com/os2display/display-api-service/pull/238)
10+
- Added screen status to infrastructure.
11+
- [#232](https://github.com/os2display/display-api-service/pull/232)
12+
- Updated user emails in readme.
13+
- [#227](https://github.com/os2display/display-api-service/pull/227)
14+
- Added screen status to cache and endpoint for exposing screen status.
15+
716
## [2.3.0] - 2025-03-24
817

918
- [#235](https://github.com/os2display/display-api-service/pull/234)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ docker compose exec phpfpm bin/console doctrine:migrations:migrate
104104
docker compose exec phpfpm bin/console hautelook:fixtures:load --no-interaction
105105
```
106106

107-
The fixtures have an admin user: <john@example.com> with the password: apassword
108-
The fixtures have an editor user: <hans@editor.com> with the password: apassword
107+
The fixtures have an admin user: <admin@example.com> with the password: apassword
108+
The fixtures have an editor user: <editor@example.com> with the password: apassword
109109
The fixtures have the image-text template, and two screen layouts:
110110
full screen and "two boxes".
111111

config/api_platform/screen.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ resources:
7070
ApiPlatform\Metadata\GetCollection:
7171
filters:
7272
- 'App\Filter\MultipleSearchFilter'
73+
- 'screen.screen_user_exists_filter'
74+
- 'screen.screen_user_latest_request_filter'
7375
- 'entity.blameable_filter'
7476
- 'entity.order_filter'
7577
- 'created.at.order_filter'
@@ -100,7 +102,6 @@ resources:
100102
content:
101103
application/ld+json:
102104
examples:
103-
104105
headers: {}
105106

106107
ApiPlatform\Metadata\Post:

config/packages/cache.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ framework:
3030
# Default expire set to 1 day
3131
default_lifetime: 86400
3232

33+
# Creates a "screen.status.cache" service ($screenStatusCache)
34+
screen.status.cache:
35+
adapter: cache.adapter.redis
36+
# Default expire set to infinity
37+
default_lifetime: 0
38+
3339
# Creates an "interactive_slide.cache" service
3440
interactive_slide.cache:
3541
adapter: cache.adapter.redis

config/packages/test/cache.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ framework:
77
auth.screen.cache:
88
adapter: cache.adapter.filesystem
99
default_lifetime: 3600
10+
screen.status.cache:
11+
adapter: cache.adapter.filesystem
12+
default_lifetime: 0

config/services.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ services:
1717
# @see https://api-platform.com/docs/core/state-processors/#hooking-into-the-built-in-state-processors
1818
$persistProcessor: '@api_platform.doctrine.orm.state.persist_processor'
1919
$removeProcessor: '@api_platform.doctrine.orm.state.remove_processor'
20+
$trackScreenInfo: '%env(bool:TRACK_SCREEN_INFO)%'
21+
$trackScreenInfoUpdateIntervalSeconds: '%env(TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS)%'
2022

2123
_instanceof:
2224
App\Feed\FeedTypeInterface:
@@ -299,6 +301,16 @@ services:
299301
tags: ['api_platform.filter']
300302
arguments: [ { fullName: 'partial', email: 'partial' } ]
301303

304+
screen.screen_user_exists_filter:
305+
parent: 'api_platform.doctrine.orm.exists_filter'
306+
tags: ['api_platform.filter']
307+
arguments: [ { screenUser: ~ } ]
308+
309+
screen.screen_user_latest_request_filter:
310+
parent: 'api_platform.doctrine.orm.date_filter'
311+
tags: ['api_platform.filter']
312+
arguments: [ { screenUser.latestRequest: ~ } ]
313+
302314
# App filters for Api Platform
303315
App\Filter\PublishedFilter:
304316
tags: ['api_platform.filter']

infrastructure/itkdev/display-api-service/etc/confd/templates/env.local.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS={{ getenv "APP_CALENDAR_API_FEED_S
6464
###< Calendar Api Feed Source ###
6565

6666
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS={{ getenv "APP_EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS" "300" }}
67+
68+
TRACK_SCREEN_INFO={{ getenv "APP_TRACK_SCREEN_INFO" "false" }}
69+
TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS={{ getenv "APP_TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS" "300" }}

infrastructure/os2display/display-api-service/etc/confd/templates/env.local.tmpl

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ CALENDAR_API_FEED_SOURCE_CACHE_EXPIRE_SECONDS={{ getenv "CALENDAR_API_FEED_SOURC
6464
###< Calendar Api Feed Source ###
6565

6666
EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS={{ getenv "APP_EVENTDATABASE_API_V2_CACHE_EXPIRE_SECONDS" "300" }}
67+
68+
TRACK_SCREEN_INFO={{ getenv "APP_TRACK_SCREEN_INFO" "false" }}
69+
TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS={{ getenv "APP_TRACK_SCREEN_INFO_UPDATE_INTERVAL_SECONDS" "300" }}

migrations/Version20240506084815.php

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DoctrineMigrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
/**
11+
* Add fields for tracking client status.
12+
*/
13+
final class Version20240506084815 extends AbstractMigration
14+
{
15+
public function getDescription(): string
16+
{
17+
return '';
18+
}
19+
20+
public function up(Schema $schema): void
21+
{
22+
$this->addSql('ALTER TABLE screen_user ADD release_timestamp INT DEFAULT NULL, ADD release_version VARCHAR(255) DEFAULT NULL, ADD latest_request DATETIME DEFAULT NULL, ADD client_meta JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
23+
}
24+
25+
public function down(Schema $schema): void
26+
{
27+
$this->addSql('ALTER TABLE screen_user DROP release_timestamp, DROP release_version, DROP latest_request, DROP client_meta');
28+
}
29+
}

public/api-spec-v2.json

+124
Original file line numberDiff line numberDiff line change
@@ -3854,6 +3854,76 @@
38543854
"explode": false,
38553855
"allowReserved": false
38563856
},
3857+
{
3858+
"name": "exists[screenUser]",
3859+
"in": "query",
3860+
"description": "",
3861+
"required": false,
3862+
"deprecated": false,
3863+
"allowEmptyValue": false,
3864+
"schema": {
3865+
"type": "boolean"
3866+
},
3867+
"style": "form",
3868+
"explode": false,
3869+
"allowReserved": false
3870+
},
3871+
{
3872+
"name": "screenUser.latestRequest[before]",
3873+
"in": "query",
3874+
"description": "",
3875+
"required": false,
3876+
"deprecated": false,
3877+
"allowEmptyValue": false,
3878+
"schema": {
3879+
"type": "string"
3880+
},
3881+
"style": "form",
3882+
"explode": false,
3883+
"allowReserved": false
3884+
},
3885+
{
3886+
"name": "screenUser.latestRequest[strictly_before]",
3887+
"in": "query",
3888+
"description": "",
3889+
"required": false,
3890+
"deprecated": false,
3891+
"allowEmptyValue": false,
3892+
"schema": {
3893+
"type": "string"
3894+
},
3895+
"style": "form",
3896+
"explode": false,
3897+
"allowReserved": false
3898+
},
3899+
{
3900+
"name": "screenUser.latestRequest[after]",
3901+
"in": "query",
3902+
"description": "",
3903+
"required": false,
3904+
"deprecated": false,
3905+
"allowEmptyValue": false,
3906+
"schema": {
3907+
"type": "string"
3908+
},
3909+
"style": "form",
3910+
"explode": false,
3911+
"allowReserved": false
3912+
},
3913+
{
3914+
"name": "screenUser.latestRequest[strictly_after]",
3915+
"in": "query",
3916+
"description": "",
3917+
"required": false,
3918+
"deprecated": false,
3919+
"allowEmptyValue": false,
3920+
"schema": {
3921+
"type": "string"
3922+
},
3923+
"style": "form",
3924+
"explode": false,
3925+
"allowReserved": false
3926+
},
38573927
{
38583928
"name": "createdBy",
38593929
"in": "query",
@@ -11328,6 +11398,15 @@
1132811398
"null"
1132911399
]
1133011400
},
11401+
"status": {
11402+
"type": [
11403+
"array",
11404+
"null"
11405+
],
11406+
"items": {
11407+
"type": "string"
11408+
}
11409+
},
1133111410
"modifiedBy": {
1133211411
"type": "string"
1133311412
},
@@ -11403,6 +11482,15 @@
1140311482
"null"
1140411483
]
1140511484
},
11485+
"status": {
11486+
"type": [
11487+
"array",
11488+
"null"
11489+
],
11490+
"items": {
11491+
"type": "string"
11492+
}
11493+
},
1140611494
"relationsChecksum": {
1140711495
"type": "object"
1140811496
}
@@ -11470,6 +11558,15 @@
1147011558
"null"
1147111559
]
1147211560
},
11561+
"status": {
11562+
"type": [
11563+
"array",
11564+
"null"
11565+
],
11566+
"items": {
11567+
"type": "string"
11568+
}
11569+
},
1147311570
"modifiedBy": {
1147411571
"type": "string"
1147511572
},
@@ -11580,6 +11677,15 @@
1158011677
"null"
1158111678
]
1158211679
},
11680+
"status": {
11681+
"type": [
11682+
"array",
11683+
"null"
11684+
],
11685+
"items": {
11686+
"type": "string"
11687+
}
11688+
},
1158311689
"modifiedBy": {
1158411690
"type": "string"
1158511691
},
@@ -11794,6 +11900,15 @@
1179411900
"null"
1179511901
]
1179611902
},
11903+
"status": {
11904+
"type": [
11905+
"array",
11906+
"null"
11907+
],
11908+
"items": {
11909+
"type": "string"
11910+
}
11911+
},
1179711912
"modifiedBy": {
1179811913
"type": "string"
1179911914
},
@@ -11904,6 +12019,15 @@
1190412019
"null"
1190512020
]
1190612021
},
12022+
"status": {
12023+
"type": [
12024+
"array",
12025+
"null"
12026+
],
12027+
"items": {
12028+
"type": "string"
12029+
}
12030+
},
1190712031
"relationsChecksum": {
1190812032
"type": "object"
1190912033
}

0 commit comments

Comments
 (0)