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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 9 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 12 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 29 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)