Skip to content

Commit

Permalink
Merge pull request #2722 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release 4.1.0
  • Loading branch information
dasgarner authored Sep 3, 2024
2 parents 732a02f + ce03c27 commit a66c89c
Show file tree
Hide file tree
Showing 1,004 changed files with 33,463 additions and 28,905 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on:
branches:
- master
- develop
- kopff
- release23
- release33
- release40

jobs:
build:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ digital signage network, or single screen, open source and free to use.

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

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

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

### Branches

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

- develop: Work in progress toward 4.0.x
- kopff: Work in progress toward 4.2.x
- develop: Bug fixes for 4.1.x
- master: Currently 4.0
- release40: Bug fixes for 4.0
- release33: Bug fixes for 3.3
- release23: Bug fixes for 2.3
- release18: Archive of 1.8
Expand Down
14 changes: 7 additions & 7 deletions bin/locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,28 @@ function __($original)
$sanitizerService = new \Xibo\Helper\SanitizerService();

// Create a new base dependency service
$baseDepenencyService = new \Xibo\Service\BaseDependenciesService();
$baseDepenencyService->setConfig(new MockConfigService());
$baseDepenencyService->setStore(new MockPdoStorageServiceForModuleFactory());
$baseDepenencyService->setSanitizer($sanitizerService);
$baseDependencyService = new \Xibo\Service\BaseDependenciesService();
$baseDependencyService->setConfig(new MockConfigService());
$baseDependencyService->setStore(new MockPdoStorageServiceForModuleFactory());
$baseDependencyService->setSanitizer($sanitizerService);

$moduleFactory = new \Xibo\Factory\ModuleFactory(
'',
$pool,
$view,
new MockConfigService(),
);
$moduleFactory->useBaseDependenciesService($baseDepenencyService);
$moduleFactory->useBaseDependenciesService($baseDependencyService);
// Get all module
$modules = $moduleFactory->getAll();

$moduleTemplateFactory = new \Xibo\Factory\ModuleTemplateFactory(
$pool,
$view,
);
$moduleTemplateFactory->useBaseDependenciesService($baseDepenencyService);
$moduleTemplateFactory->useBaseDependenciesService($baseDependencyService);
// Get all module templates
$moduleTemplates = $moduleTemplateFactory->getAll();
$moduleTemplates = $moduleTemplateFactory->getAll(null, false);

// --------------
// Create translation file
Expand Down
9 changes: 9 additions & 0 deletions cypress/e2e/Layout/Editor/layout_editor_clock.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ describe('Layout Designer', function() {
it('should create a new layout and be redirected to the layout designer, add/delete analogue clock', function() {
cy.intercept('/playlist/widget/*').as('saveWidget');

cy.intercept({
method: 'DELETE',
url: '/region/*',
}).as('deleteWidget');

cy.visit('/layout/view');

cy.get('button[href="/layout"]').click();
Expand Down Expand Up @@ -76,6 +81,10 @@ describe('Layout Designer', function() {
// Delete
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_clock-analogue"]').parents('.designer-region').rightclick();
cy.get('[data-title="Delete"]').click();
cy.contains('Yes').click();

// Wait until the widget has been deleted
cy.wait('@deleteWidget');
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_clock-analogue"]').should('not.exist');
});
});
28 changes: 20 additions & 8 deletions cypress/e2e/Layout/Editor/layout_editor_dataset.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ describe('Layout Designer', function() {
// Create and alias for load dataset
cy.intercept('/dataset?start=*').as('loadDatasets');

cy.intercept({
method: 'DELETE',
url: '/region/*',
}).as('deleteWidget');

cy.visit('/layout/view');

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

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

// Wait for datasets to load
cy.wait('@loadDatasets');
cy.get('.select2-container--open').contains('test');
cy.get('.select2-container--open .select2-results > ul > li:first').contains('test').click();
cy.get('.select2-container--open').contains('8 items');
cy.get('.select2-container--open .select2-results > ul > li:first').contains('8 items').click();

cy.get('[name="lowerLimit"]').clear().type('1');
cy.get('[name="upperLimit"]').clear().type('10');
cy.get('.order-clause-row > :nth-child(2) > .form-control').select('Text', {force: true});
cy.get('.order-clause-row > :nth-child(2) > .form-control').select('Col1', {force: true});
cy.get('.order-clause-row > .btn').click();
cy.get(':nth-child(2) > :nth-child(2) > .form-control').select('Number', {force: true});
cy.get(':nth-child(2) > :nth-child(2) > .form-control').select('Col2', {force: true});

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

// Check if dataset exists exactly two columns
cy.get('#columnsOut')
.find('li')
.should('have.length', 2)

// Select columns available/ move them to columns selected
cy.get('#columnsOut>li:first').should('have.attr', 'id').and('equal', '1');
cy.get('#columnsOut>li:first')
.trigger('mousedown', {
which: 1,
Expand All @@ -80,7 +89,6 @@ describe('Layout Designer', function() {
});
cy.get('#columnsIn').click();

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

cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_dataset"]').parents('.designer-region').rightclick();
cy.get('[data-title="Delete"]').click();
cy.contains('Yes').click();

// Wait until the widget has been deleted
cy.wait('@deleteWidget');
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_dataset"]').should('not.exist');
});
});
13 changes: 11 additions & 2 deletions cypress/e2e/Layout/Editor/layout_editor_rss_ticker.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ describe('Layout Designer', function() {
});

it('should create a new layout and be redirected to the layout designer, add/delete RSS ticker widget', function() {
cy.intercept({
method: 'DELETE',
url: '/region/*',
}).as('deleteWidget');

cy.visit('/layout/view');

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

cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_rss-ticker"]').parents('.designer-region').rightclick();
cy.get('[data-title="Delete"]').click();
cy.contains('Yes').click();

// Wait until the widget has been deleted
cy.wait('@deleteWidget');
cy.get('#layout-viewer .designer-region .widget-preview[data-type="widget_rss-ticker"]').should('not.exist');
});
});
16 changes: 16 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,3 +864,19 @@ Cypress.Commands.add('openToolbarMenuForPlaylist', function(menuIdx) {
}
});
});


/**
* Update data on CKEditor instance
* @param {string} ckeditorId
* @param {string} value
*/
Cypress.Commands.add('updateCKEditor', function(ckeditorId, value) {
cy.get('textarea[name="' + ckeditorId + '"]').invoke('prop', 'id').then((id) => {
cy.window().then((win) => {
win.formHelpers.getCKEditorInstance(
id,
).setData(value);
});
});
});
55 changes: 55 additions & 0 deletions db/migrations/20231128144300_real_time_data_migration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/*
* Copyright (C) 2023 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/

use Phinx\Migration\AbstractMigration;

/**
* Migrations for new real-time data
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
class RealTimeDataMigration extends AbstractMigration
{
public function change(): void
{
$this->table('dataset')
->addColumn('isRealTime', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
'default' => 0,
'null' => false,
])
->save();

$this->table('schedule')
->addColumn('dataSetId', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
'default' => null,
'null' => true
])
->addColumn('dataSetParams', 'text', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_REGULAR,
'default' => null,
'null' => true
])
->addForeignKey('dataSetId', 'dataset', 'dataSetId')
->save();
}
}
57 changes: 57 additions & 0 deletions db/migrations/20231213120700_schedule_criteria_migration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/*
* Copyright (C) 2023 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/

use Phinx\Migration\AbstractMigration;

/**
* Migrations for schedule criteria
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
class ScheduleCriteriaMigration extends AbstractMigration
{
public function change(): void
{
$this->table('schedule_criteria')
->addColumn('eventId', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
'null' => false,
])
->addColumn('type', 'string', [
'limit' => 20,
'null' => false,
])
->addColumn('metric', 'string', [
'limit' => 20,
'null' => false,
])
->addColumn('condition', 'string', [
'limit' => 20,
'null' => false,
])
->addColumn('value', 'string', [
'limit' => 255,
'null' => false,
])
->addForeignKey('eventId', 'schedule', 'eventId')
->save();
}
}
61 changes: 61 additions & 0 deletions db/migrations/20231220155800_user_module_templates_migration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/*
* Copyright (C) 2024 Xibo Signage Ltd
*
* Xibo - Digital Signage - https://xibosignage.com
*
* This file is part of Xibo.
*
* Xibo is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Xibo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
*/

use Phinx\Migration\AbstractMigration;

/**
* Migrations for adding user supplied module templates
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
class UserModuleTemplatesMigration extends AbstractMigration
{
public function change(): void
{
$this->table('module_templates')
->addColumn('templateId', 'string', [
'limit' => 50,
'null' => false,
])
->addColumn('dataType', 'string', [
'limit' => 50,
'null' => false,
])
->addColumn('xml', 'text', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_MEDIUM,
'null' => false,
])
->addColumn('enabled', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
'null' => false,
'default' => 1,
])
->addColumn('ownerId', 'integer')
->addForeignKey('ownerId', 'user', 'userId')
->save();

$this->table('permissionentity')
->insert([
['entity' => 'Xibo\Entity\ModuleTemplate']
])
->save();
}
}
Loading

0 comments on commit a66c89c

Please sign in to comment.