Skip to content

Commit a66c89c

Browse files
authored
Merge pull request #2722 from xibosignage/develop
Release 4.1.0
2 parents 732a02f + ce03c27 commit a66c89c

File tree

1,004 files changed

+33463
-28905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,004 files changed

+33463
-28905
lines changed

.github/workflows/build-container.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ on:
55
branches:
66
- master
77
- develop
8+
- kopff
89
- release23
910
- release33
11+
- release40
1012

1113
jobs:
1214
build:

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ digital signage network, or single screen, open source and free to use.
1616

1717
[![Licence](https://img.shields.io/github/license/xibosignage/xibo-cms)]()
1818

19-
Copyright (C) 2006-2023 Xibo Signage Ltd and Contributors.
19+
Copyright (C) 2006-2024 Xibo Signage Ltd and Contributors.
2020

2121
Xibo is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
2222
License as published by the Free Software Foundation, either version 3 of the License, or any later version.
@@ -69,10 +69,12 @@ git clone git@github.com:<your_id>/xibo-cms.git xibo-cms
6969

7070
### Branches
7171

72-
We maintain the following branches. To contribute to Xibo please also use the `develop` branch as your base.
72+
We maintain the following branches. To contribute to Xibo please use the `develop` branch as your base.
7373

74-
- develop: Work in progress toward 4.0.x
74+
- kopff: Work in progress toward 4.2.x
75+
- develop: Bug fixes for 4.1.x
7576
- master: Currently 4.0
77+
- release40: Bug fixes for 4.0
7678
- release33: Bug fixes for 3.3
7779
- release23: Bug fixes for 2.3
7880
- release18: Archive of 1.8

bin/locale.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,28 +95,28 @@ function __($original)
9595
$sanitizerService = new \Xibo\Helper\SanitizerService();
9696

9797
// Create a new base dependency service
98-
$baseDepenencyService = new \Xibo\Service\BaseDependenciesService();
99-
$baseDepenencyService->setConfig(new MockConfigService());
100-
$baseDepenencyService->setStore(new MockPdoStorageServiceForModuleFactory());
101-
$baseDepenencyService->setSanitizer($sanitizerService);
98+
$baseDependencyService = new \Xibo\Service\BaseDependenciesService();
99+
$baseDependencyService->setConfig(new MockConfigService());
100+
$baseDependencyService->setStore(new MockPdoStorageServiceForModuleFactory());
101+
$baseDependencyService->setSanitizer($sanitizerService);
102102

103103
$moduleFactory = new \Xibo\Factory\ModuleFactory(
104104
'',
105105
$pool,
106106
$view,
107107
new MockConfigService(),
108108
);
109-
$moduleFactory->useBaseDependenciesService($baseDepenencyService);
109+
$moduleFactory->useBaseDependenciesService($baseDependencyService);
110110
// Get all module
111111
$modules = $moduleFactory->getAll();
112112

113113
$moduleTemplateFactory = new \Xibo\Factory\ModuleTemplateFactory(
114114
$pool,
115115
$view,
116116
);
117-
$moduleTemplateFactory->useBaseDependenciesService($baseDepenencyService);
117+
$moduleTemplateFactory->useBaseDependenciesService($baseDependencyService);
118118
// Get all module templates
119-
$moduleTemplates = $moduleTemplateFactory->getAll();
119+
$moduleTemplates = $moduleTemplateFactory->getAll(null, false);
120120

121121
// --------------
122122
// Create translation file

cypress/e2e/Layout/Editor/layout_editor_clock.cy.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ describe('Layout Designer', function() {
2828
it('should create a new layout and be redirected to the layout designer, add/delete analogue clock', function() {
2929
cy.intercept('/playlist/widget/*').as('saveWidget');
3030

31+
cy.intercept({
32+
method: 'DELETE',
33+
url: '/region/*',
34+
}).as('deleteWidget');
35+
3136
cy.visit('/layout/view');
3237

3338
cy.get('button[href="/layout"]').click();
@@ -76,6 +81,10 @@ describe('Layout Designer', function() {
7681
// Delete
7782
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_clock-analogue"]').parents('.designer-region').rightclick();
7883
cy.get('[data-title="Delete"]').click();
84+
cy.contains('Yes').click();
85+
86+
// Wait until the widget has been deleted
87+
cy.wait('@deleteWidget');
7988
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_clock-analogue"]').should('not.exist');
8089
});
8190
});

cypress/e2e/Layout/Editor/layout_editor_dataset.cy.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ describe('Layout Designer', function() {
2929
// Create and alias for load dataset
3030
cy.intercept('/dataset?start=*').as('loadDatasets');
3131

32+
cy.intercept({
33+
method: 'DELETE',
34+
url: '/region/*',
35+
}).as('deleteWidget');
36+
3237
cy.visit('/layout/view');
3338

3439
cy.get('button[href="/layout"]').click();
@@ -50,25 +55,29 @@ describe('Layout Designer', function() {
5055
cy.wait('@loadDatasets');
5156

5257
// Type the dataset name
53-
cy.get('.select2-container--open input[type="search"]').type('test');
58+
cy.get('.select2-container--open input[type="search"]').type('8 items');
5459

5560
// Wait for datasets to load
5661
cy.wait('@loadDatasets');
57-
cy.get('.select2-container--open').contains('test');
58-
cy.get('.select2-container--open .select2-results > ul > li:first').contains('test').click();
59-
62+
cy.get('.select2-container--open').contains('8 items');
63+
cy.get('.select2-container--open .select2-results > ul > li:first').contains('8 items').click();
64+
6065
cy.get('[name="lowerLimit"]').clear().type('1');
6166
cy.get('[name="upperLimit"]').clear().type('10');
62-
cy.get('.order-clause-row > :nth-child(2) > .form-control').select('Text', {force: true});
67+
cy.get('.order-clause-row > :nth-child(2) > .form-control').select('Col1', {force: true});
6368
cy.get('.order-clause-row > .btn').click();
64-
cy.get(':nth-child(2) > :nth-child(2) > .form-control').select('Number', {force: true});
69+
cy.get(':nth-child(2) > :nth-child(2) > .form-control').select('Col2', {force: true});
6570

6671
// -------------
6772
// -------------Appearance Tab
6873
cy.get('.nav-link[href="#appearanceTab"]').click();
6974

75+
// Check if dataset exists exactly two columns
76+
cy.get('#columnsOut')
77+
.find('li')
78+
.should('have.length', 2)
79+
7080
// Select columns available/ move them to columns selected
71-
cy.get('#columnsOut>li:first').should('have.attr', 'id').and('equal', '1');
7281
cy.get('#columnsOut>li:first')
7382
.trigger('mousedown', {
7483
which: 1,
@@ -80,7 +89,6 @@ describe('Layout Designer', function() {
8089
});
8190
cy.get('#columnsIn').click();
8291

83-
cy.get('#columnsOut>li:first').should('have.attr', 'id').and('equal', '2');
8492
cy.get('#columnsOut>li:first')
8593
.trigger('mousedown', {
8694
which: 1,
@@ -99,6 +107,10 @@ describe('Layout Designer', function() {
99107

100108
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_dataset"]').parents('.designer-region').rightclick();
101109
cy.get('[data-title="Delete"]').click();
110+
cy.contains('Yes').click();
111+
112+
// Wait until the widget has been deleted
113+
cy.wait('@deleteWidget');
102114
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_dataset"]').should('not.exist');
103115
});
104116
});

cypress/e2e/Layout/Editor/layout_editor_rss_ticker.cy.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ describe('Layout Designer', function() {
2626
});
2727

2828
it('should create a new layout and be redirected to the layout designer, add/delete RSS ticker widget', function() {
29+
cy.intercept({
30+
method: 'DELETE',
31+
url: '/region/*',
32+
}).as('deleteWidget');
33+
2934
cy.visit('/layout/view');
3035

3136
cy.get('button[href="/layout"]').click();
@@ -64,12 +69,16 @@ describe('Layout Designer', function() {
6469
cy.get('[name="itemImageFit"]').select('Fill', {force: true});
6570
cy.get('[name="effect"]').select('Fade', {force: true});
6671
cy.get('[name="speed"]').clear().type('500');
67-
cy.get('.cke_editable_inline').focus().clear();
68-
cy.get('.cke_editable_inline').type('No data to show').trigger('change');
72+
// Update CKEditor value
73+
cy.updateCKEditor('noDataMessage', 'No data to show');
6974
cy.get('[name="copyright"]').clear().type('Xibo').trigger('change');
7075

7176
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_rss-ticker"]').parents('.designer-region').rightclick();
7277
cy.get('[data-title="Delete"]').click();
78+
cy.contains('Yes').click();
79+
80+
// Wait until the widget has been deleted
81+
cy.wait('@deleteWidget');
7382
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_rss-ticker"]').should('not.exist');
7483
});
7584
});

cypress/support/commands.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,3 +864,19 @@ Cypress.Commands.add('openToolbarMenuForPlaylist', function(menuIdx) {
864864
}
865865
});
866866
});
867+
868+
869+
/**
870+
* Update data on CKEditor instance
871+
* @param {string} ckeditorId
872+
* @param {string} value
873+
*/
874+
Cypress.Commands.add('updateCKEditor', function(ckeditorId, value) {
875+
cy.get('textarea[name="' + ckeditorId + '"]').invoke('prop', 'id').then((id) => {
876+
cy.window().then((win) => {
877+
win.formHelpers.getCKEditorInstance(
878+
id,
879+
).setData(value);
880+
});
881+
});
882+
});
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
/*
3+
* Copyright (C) 2023 Xibo Signage Ltd
4+
*
5+
* Xibo - Digital Signage - https://xibosignage.com
6+
*
7+
* This file is part of Xibo.
8+
*
9+
* Xibo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* any later version.
13+
*
14+
* Xibo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
use Phinx\Migration\AbstractMigration;
24+
25+
/**
26+
* Migrations for new real-time data
27+
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
28+
*/
29+
class RealTimeDataMigration extends AbstractMigration
30+
{
31+
public function change(): void
32+
{
33+
$this->table('dataset')
34+
->addColumn('isRealTime', 'integer', [
35+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
36+
'default' => 0,
37+
'null' => false,
38+
])
39+
->save();
40+
41+
$this->table('schedule')
42+
->addColumn('dataSetId', 'integer', [
43+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
44+
'default' => null,
45+
'null' => true
46+
])
47+
->addColumn('dataSetParams', 'text', [
48+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_REGULAR,
49+
'default' => null,
50+
'null' => true
51+
])
52+
->addForeignKey('dataSetId', 'dataset', 'dataSetId')
53+
->save();
54+
}
55+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
/*
3+
* Copyright (C) 2023 Xibo Signage Ltd
4+
*
5+
* Xibo - Digital Signage - https://xibosignage.com
6+
*
7+
* This file is part of Xibo.
8+
*
9+
* Xibo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* any later version.
13+
*
14+
* Xibo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
use Phinx\Migration\AbstractMigration;
24+
25+
/**
26+
* Migrations for schedule criteria
27+
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
28+
*/
29+
class ScheduleCriteriaMigration extends AbstractMigration
30+
{
31+
public function change(): void
32+
{
33+
$this->table('schedule_criteria')
34+
->addColumn('eventId', 'integer', [
35+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
36+
'null' => false,
37+
])
38+
->addColumn('type', 'string', [
39+
'limit' => 20,
40+
'null' => false,
41+
])
42+
->addColumn('metric', 'string', [
43+
'limit' => 20,
44+
'null' => false,
45+
])
46+
->addColumn('condition', 'string', [
47+
'limit' => 20,
48+
'null' => false,
49+
])
50+
->addColumn('value', 'string', [
51+
'limit' => 255,
52+
'null' => false,
53+
])
54+
->addForeignKey('eventId', 'schedule', 'eventId')
55+
->save();
56+
}
57+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
/*
3+
* Copyright (C) 2024 Xibo Signage Ltd
4+
*
5+
* Xibo - Digital Signage - https://xibosignage.com
6+
*
7+
* This file is part of Xibo.
8+
*
9+
* Xibo is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Affero General Public License as published by
11+
* the Free Software Foundation, either version 3 of the License, or
12+
* any later version.
13+
*
14+
* Xibo is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Affero General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Affero General Public License
20+
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
23+
use Phinx\Migration\AbstractMigration;
24+
25+
/**
26+
* Migrations for adding user supplied module templates
27+
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
28+
*/
29+
class UserModuleTemplatesMigration extends AbstractMigration
30+
{
31+
public function change(): void
32+
{
33+
$this->table('module_templates')
34+
->addColumn('templateId', 'string', [
35+
'limit' => 50,
36+
'null' => false,
37+
])
38+
->addColumn('dataType', 'string', [
39+
'limit' => 50,
40+
'null' => false,
41+
])
42+
->addColumn('xml', 'text', [
43+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_MEDIUM,
44+
'null' => false,
45+
])
46+
->addColumn('enabled', 'integer', [
47+
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
48+
'null' => false,
49+
'default' => 1,
50+
])
51+
->addColumn('ownerId', 'integer')
52+
->addForeignKey('ownerId', 'user', 'userId')
53+
->save();
54+
55+
$this->table('permissionentity')
56+
->insert([
57+
['entity' => 'Xibo\Entity\ModuleTemplate']
58+
])
59+
->save();
60+
}
61+
}

0 commit comments

Comments
 (0)