Skip to content

Commit

Permalink
Added screen bundle to admin (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj authored May 20, 2019
1 parent 541962b commit 879c649
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 58 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 6.1.0

* Added screen-bundle.

## 6.0.0

* Upgraded to symfony 3.4.
Expand Down
1 change: 1 addition & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function registerBundles()
new Os2Display\AdminBundle\Os2DisplayAdminBundle(),
new Os2Display\DefaultTemplateBundle\Os2DisplayDefaultTemplateBundle(),
new Os2Display\CampaignBundle\Os2DisplayCampaignBundle(),
new Os2Display\ScreenBundle\Os2DisplayScreenBundle(),
];

if (in_array($this->getEnvironment(), ['dev', 'test', 'acceptance'], true)) {
Expand Down
40 changes: 40 additions & 0 deletions app/DoctrineMigrations/Version20190516084538.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20190516084538 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE ik_public_screen (id INT AUTO_INCREMENT NOT NULL, user INT DEFAULT NULL, screen_id INT DEFAULT NULL, public_url VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, INDEX IDX_351DDC778D93D649 (user), UNIQUE INDEX UNIQ_351DDC7741A67722 (screen_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE ik_public_channel (id INT AUTO_INCREMENT NOT NULL, user INT DEFAULT NULL, channel_id INT DEFAULT NULL, public_url VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, INDEX IDX_4AAB0BC98D93D649 (user), UNIQUE INDEX UNIQ_4AAB0BC972F5A1AA (channel_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE ik_public_screen ADD CONSTRAINT FK_351DDC778D93D649 FOREIGN KEY (user) REFERENCES fos_user_user (id)');
$this->addSql('ALTER TABLE ik_public_screen ADD CONSTRAINT FK_351DDC7741A67722 FOREIGN KEY (screen_id) REFERENCES ik_screen (id)');
$this->addSql('ALTER TABLE ik_public_channel ADD CONSTRAINT FK_4AAB0BC98D93D649 FOREIGN KEY (user) REFERENCES fos_user_user (id)');
$this->addSql('ALTER TABLE ik_public_channel ADD CONSTRAINT FK_4AAB0BC972F5A1AA FOREIGN KEY (channel_id) REFERENCES ik_channel (id)');
}

/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE ik_public_screen');
$this->addSql('DROP TABLE ik_public_channel');
}
}
2 changes: 2 additions & 0 deletions app/config/config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ framework:
resource: '%kernel.project_dir%/app/config/routing_dev.yml'
strict_requirements: true
profiler: { only_exceptions: false }
session:
save_path: '/var/lib/php/sessions'

web_profiler:
toolbar: '%debug_toolbar%'
Expand Down
4 changes: 4 additions & 0 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ os2display_admin:
os2display_campaign:
resource: "@Os2DisplayCampaignBundle/Resources/config/routing.yml"
prefix: /

os2display_screen:
resource: "@Os2DisplayScreenBundle/Resources/config/routing.yml"
prefix: /
4 changes: 4 additions & 0 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

screen_bundle_public:
pattern: ^/screen/public/(.*)
security: false

api_screen_activate:
pattern: ^/api/screen/activate
security: false
Expand Down
26 changes: 3 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,14 @@
"os2display/campaign-bundle": "~2.0",
"os2display/core-bundle": "~2.0",
"os2display/default-template-bundle": "~1.1",
"os2display/media-bundle": "~2.0"
"os2display/media-bundle": "~2.0",
"os2display/screen-bundle": "~1.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"repositories": {
"os2display/media-bundle": {
"type": "vcs",
"url": "https://github.com/os2display/media-bundle"
},
"os2display/core-bundle": {
"type": "vcs",
"url": "https://github.com/os2display/core-bundle"
},
"os2display/admin-bundle": {
"type": "vcs",
"url": "https://github.com/os2display/admin-bundle"
},
"os2display/default-template-bundle": {
"type": "vcs",
"url": "https://github.com/os2display/default-template-bundle"
},
"os2display/campaign-bundle": {
"type": "vcs",
"url": "https://github.com/os2display/campaign-bundle"
}
},
"repositories": {},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
Expand Down
84 changes: 51 additions & 33 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions update_bundles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
bold=$(tput bold)
normal=$(tput sgr0)

composer="$(which composer)"
php -d memory_limit=-1 $composer update symfony/symfony os2display/core-bundle os2display/admin-bundle os2display/default-template-bundle os2display/media-bundle os2display/campaign-bundle
php -d memory_limit=-1 $(which composer) update symfony/symfony os2display/core-bundle os2display/admin-bundle os2display/default-template-bundle os2display/media-bundle os2display/campaign-bundle os2display/screen-bundle

0 comments on commit 879c649

Please sign in to comment.