Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
8fe1009186
|
@ -1,5 +1,6 @@
|
|||
/.web-server-pid
|
||||
/app/config/parameters.yml
|
||||
/app/config/template.yml
|
||||
/src/Cadoles/CoreBundle/Command/data/core-init-01.sql
|
||||
/build/
|
||||
/phpunit.xml
|
||||
|
|
|
@ -1,127 +0,0 @@
|
|||
# This file is auto-generated during the composer install
|
||||
parameters:
|
||||
# Determine qui est le maitre de l'identitité = SQL / LDAP / SSO
|
||||
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
|
||||
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
|
||||
# Si la source est externe de fait pas de module d'inscription ni de reset de password
|
||||
# Et pas de synchronisation vers un annuaire ou vers ePortail
|
||||
masteridentity: LDAP
|
||||
|
||||
# Mode d'authentification soit SQL / LDAP / CAS / SAML
|
||||
# Pour l'instant SQL - CAS - SAML Reste à faire LDAP
|
||||
# Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL
|
||||
# Car aucune synchronisation des password n'est possible
|
||||
mode_auth: CAS
|
||||
|
||||
# Mode de registration : none / byuser / byadmin
|
||||
# none = désactivation de l'inscription mais reset de password possible
|
||||
# byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même
|
||||
# byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche
|
||||
moderegistration: none
|
||||
|
||||
# Activation module
|
||||
cron_activate: true
|
||||
portal_activate: true
|
||||
|
||||
# Information de base de l'annuaire
|
||||
ldap_host: 172.27.7.61
|
||||
ldap_port: 389
|
||||
ldap_user: cn=admin,o=gouv,c=fr
|
||||
ldap_password: eole
|
||||
ldap_basedn: o=gouv,c=fr
|
||||
|
||||
# Mise en page
|
||||
alias: ninegate
|
||||
libelle_etab: ldapbundle
|
||||
numero_etab: 0000000A
|
||||
colormain: 2c3e50 # Couleur principale
|
||||
fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale
|
||||
keyterm: 8 # Taille mini du password
|
||||
labelniveau01: Ecole # Label singulier du niveau 01 d'organisation
|
||||
labelsniveau01: Ecoles # Label pluriel du niveau 01 d'organisation
|
||||
iconniveau01: fa-building # Icon du niveau 01 d'organisation
|
||||
labelsirenniveau01: SIREN # Label SIREN
|
||||
viewniveau02: false # Gérer un niveau 02 d'organisation
|
||||
labelniveau02: niveau02 # Label singulier du niveau 02 d'organisation
|
||||
labelsniveau02: niveaus02 # Label pluriel du niveau 02 d'organisation
|
||||
iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation
|
||||
labelsiretniveau02: SIRET # Label SIRET
|
||||
|
||||
# Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire
|
||||
ldap_sync: false
|
||||
ldap_baseuser:
|
||||
ldap_baseniveau01:
|
||||
ldap_baseniveau02:
|
||||
ldap_basegroup:
|
||||
|
||||
# Si masteridentity est à LDAP = quel est le modele d'organisation
|
||||
# Si open = rien de particulier
|
||||
# Si scribe = on génére des groupes correspondant au profil / classe / niveau / option
|
||||
ldap_template: scribe
|
||||
|
||||
# Si masteridentity est à LDAP = quel champs sont à récupérer
|
||||
ldap_username: uid
|
||||
ldap_firstname: givenname
|
||||
ldap_lastname: sn
|
||||
ldap_email: mail
|
||||
ldap_usersadmin: [admin,prof.6a]
|
||||
|
||||
eportail_sync: false
|
||||
eportail_url: # /eportail
|
||||
eportail_login: # /eportail/login.php
|
||||
eportail_database_host: # 172.27.7.64
|
||||
eportail_database_port: # 3306
|
||||
eportail_database_name: # eportail
|
||||
eportail_database_user: # eportail
|
||||
eportail_database_password: # "changme"
|
||||
|
||||
# Si mode_auth = CAS
|
||||
cas_host: ldapbundle.ac-arno.fr
|
||||
cas_path:
|
||||
cas_port: 8443
|
||||
|
||||
# Si mode_aut = SAML
|
||||
saml_entityid: 'http://dev.nuonet.cadoles'
|
||||
saml_logout_url: 'http://172.27.7.67:8088/idp/profile/Logout'
|
||||
saml_idps_list: ['http://172.27.7.67:8088/idp/shibboleth']
|
||||
|
||||
# Si mode_auth = CAS ou SAML les attributs permettant de matché avec les utilisateurs
|
||||
user_attr_cas_username: username
|
||||
user_attr_cas_mail: email
|
||||
user_attr_cas_lastname: lastname
|
||||
user_attr_cas_firstname: firstname
|
||||
|
||||
user_attr_saml_username: eduPersonPrincipalName
|
||||
user_attr_saml_mail: mail
|
||||
user_attr_saml_lastname: sn
|
||||
user_attr_saml_firstname: givenName
|
||||
|
||||
mailer_port: '2525'
|
||||
mailer_encryption: null
|
||||
mailer_authmode: null
|
||||
noreply: noreply@ldapbundle.ac-arno.fr
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
dbal:
|
||||
default_connection: default
|
||||
connections:
|
||||
default:
|
||||
driver: pdo_mysql
|
||||
host: '%database_host%'
|
||||
port: '%database_port%'
|
||||
dbname: '%database_name%'
|
||||
user: '%database_user%'
|
||||
password: '%database_password%'
|
||||
charset: UTF8
|
||||
orm:
|
||||
default_entity_manager: default
|
||||
entity_managers:
|
||||
default:
|
||||
connection: default
|
||||
mappings:
|
||||
CadolesCoreBundle: ~
|
||||
CadolesCronBundle: ~
|
||||
CadolesPortalBundle: ~
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
|
|||
(-100, 'Interne', 'SIREN');
|
||||
|
||||
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}9tH17tlC86xamslwYLnhF4qiMaQqvbuL
|
||||
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}yiDxhDNog19bkfbdXAX1PH2iZWUu5eGy
|
||||
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
echo "INSTALLATION NINEGATE HORS EOLE"
|
||||
cd /var/www/html/ninegate
|
||||
|
||||
www_dir="/var/www/html"
|
||||
|
||||
yes | cp scripts/apache/ninegate.conf /etc/apache2/sites-available/
|
||||
a2ensite ninegate
|
||||
service apache2 restart
|
||||
|
||||
# Récuper les composer associés à la version de php installé
|
||||
version72=`php -r 'echo version_compare(phpversion(), "7.2.0", ">=");'`
|
||||
if [[ "$version72" == "1" ]]
|
||||
then
|
||||
cp -rf /var/www/html/ninegate/scripts/php72/composer.json /var/www/html/ninegate/composer.json
|
||||
cp -rf /var/www/html/ninegate/scripts/php72/composer.lock /var/www/html/ninegate/composer.lock
|
||||
else
|
||||
version70=`php -r 'echo version_compare(phpversion(), "7.0.0", ">=");'`
|
||||
if [[ "$version70" == "1" ]]
|
||||
then
|
||||
cp -rf /var/www/html/ninegate/scripts/php70/composer.json /var/www/html/ninegate/composer.json
|
||||
cp -rf /var/www/html/ninegate/scripts/php70/composer.lock /var/www/html/ninegate/composer.lock
|
||||
fi
|
||||
fi
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
rm -f /var/www/html/ninegate/var/logs/dev.log
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
||||
|
||||
# Nettoyage du cache
|
||||
rm /var/www/html/ninegate/var/cache -rf
|
||||
php bin/console cache:clear --env=prod --no-debug
|
||||
|
||||
# Migration si nécessaire du schéma de la base
|
||||
php bin/console doctrine:schema:update --force --env=prod --no-debug
|
||||
|
||||
# Insertion data de base
|
||||
php bin/console Core:InitData --env=prod
|
||||
php bin/console Cron:InitData --env=prod
|
||||
php bin/console Portal:InitData --env=prod
|
||||
|
||||
# Passage des scripts
|
||||
php bin/console Core:Script --env=prod
|
||||
|
||||
# Generation des assets
|
||||
bin/console assetic:dump --env=prod
|
||||
|
||||
# Copie des polices du projet dans le rep web
|
||||
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
|
||||
|
||||
bin/console Core:SetPassword admin admin
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
|
@ -0,0 +1,11 @@
|
|||
Alias /ninegate /var/www/html/ninegate/web
|
||||
|
||||
<Directory "/var/www/html/ninegate/web" >
|
||||
AllowOverride All
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
php_admin_flag allow_url_fopen On
|
||||
</Directory>
|
||||
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
# This file is auto-generated during the composer install
|
||||
parameters:
|
||||
# Determine qui est le maitre de l'identitité = SQL / LDAP / SSO
|
||||
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
|
||||
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
|
||||
# Si la source est externe de fait pas de module d'inscription ni de reset de password
|
||||
# Et pas de synchronisation vers un annuaire ou vers ePortail
|
||||
masteridentity: SQL
|
||||
|
||||
# Mode d'authentification soit SQL / LDAP / CAS / SAML
|
||||
# Pour l'instant SQL - CAS - SAML Reste à faire LDAP
|
||||
# Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL
|
||||
# Car aucune synchronisation des password n'est possible
|
||||
mode_auth: SQL
|
||||
|
||||
# Mode de registration : none / byuser / byadmin
|
||||
# none = désactivation de l'inscription mais reset de password possible
|
||||
# byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même
|
||||
# byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche
|
||||
moderegistration: byadmin
|
||||
|
||||
# Activation module
|
||||
cron_activate: true
|
||||
portal_activate: true
|
||||
module_activate: false
|
||||
page_activate: false
|
||||
item_activate: false
|
||||
alert_activate: false
|
||||
calendar_activate: false
|
||||
blog_activate: false
|
||||
project_activate: false
|
||||
flux_activate: false
|
||||
notice_activate: false
|
||||
|
||||
# Mise en page
|
||||
weburl: localhost
|
||||
alias: ninegate
|
||||
libelle_etab: ninegate
|
||||
numero_etab: ~
|
||||
colormain: 2c3e50 # Couleur principale
|
||||
fontcolorhover: FFFFFF # Couleur des polices sur fond de couleur principale
|
||||
keyterm: 8 # Taille mini du password
|
||||
labelniveau01: Département # Label singulier du niveau 01 d'organisation
|
||||
labelsniveau01: Départements # Label pluriel du niveau 01 d'organisation
|
||||
iconniveau01: fa-building # Icon du niveau 01 d'organisation
|
||||
labelsirenniveau01: SIREN # Label SIREN
|
||||
viewniveau02: true # Gérer un niveau 02 d'organisation
|
||||
labelniveau02: Service # Label singulier du niveau 02 d'organisation
|
||||
labelsniveau02: Services # Label pluriel du niveau 02 d'organisation
|
||||
iconniveau02: fa-sitemap # Icon du niveau 02 d'organisation
|
||||
labelsiretniveau02: SIRET # Label SIRET
|
||||
|
||||
mailer_port: '2525'
|
||||
mailer_encryption: null
|
||||
mailer_authmode: null
|
||||
noreply: noreply@ninegate.fr
|
||||
|
||||
websocket_activate: false
|
||||
websocket_host: localhost
|
||||
websocket_port: 5555
|
||||
websocket_portinterne: 5556
|
||||
|
||||
activate_widadminer: false
|
||||
activate_widbalado: false
|
||||
activate_widdokuwiki: false
|
||||
activate_wideconnect: false
|
||||
activate_widetherhome: false
|
||||
activate_widfluxbb: false
|
||||
activate_widgepi: false
|
||||
activate_widglpi: false
|
||||
activate_widgrr: false
|
||||
activate_widkanboard: false
|
||||
activate_widlimesurvey: false
|
||||
activate_widmindmaps: false
|
||||
activate_widmoodle: false
|
||||
activate_widnextcloud: false
|
||||
activate_widonlyoffice: false
|
||||
activate_widopensondage: false
|
||||
activate_widphpldapadmin: false
|
||||
activate_widpiwik: false
|
||||
activate_widroundcube: false
|
||||
activate_widsacoche: false
|
||||
activate_widwordpress: false
|
||||
|
||||
syncenvole_activate: false
|
||||
widbalado_activate_syncenvole: false
|
||||
widgepi_activate_syncenvole: false
|
||||
widnextcloud_activate_syncenvole: false
|
||||
widonlyoffice_sync: false
|
||||
widpiwik_activate_syncenvole: false
|
||||
widsacoche_activate_syncenvole: false
|
||||
|
||||
|
||||
|
||||
activate_widsonde: false
|
||||
widsonde_url:
|
||||
|
||||
saml_entityid: 'http://discovery'
|
||||
saml_logout_url: 'http://localhost:8088/idp/profile/Logout'
|
||||
saml_idps_list: ['http://localhost:8088/idp/shibboleth']
|
||||
|
||||
ldap_sync: false
|
||||
ldap_template: open
|
||||
ldap_host: 127.0.0.1
|
||||
ldap_port: 389
|
||||
ldap_user: cn=admin,o=gouv,c=fr
|
||||
ldap_password: ~
|
||||
ldap_basedn: o=gouv,c=fr
|
||||
ldap_baseuser:
|
||||
ldap_baseniveau01:
|
||||
ldap_baseniveau02:
|
||||
ldap_basegroup:
|
||||
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
dbal:
|
||||
default_connection: default
|
||||
connections:
|
||||
default:
|
||||
driver: pdo_mysql
|
||||
host: '%database_host%'
|
||||
port: '%database_port%'
|
||||
dbname: '%database_name%'
|
||||
user: '%database_user%'
|
||||
password: '%database_password%'
|
||||
charset: UTF8
|
||||
orm:
|
||||
default_entity_manager: default
|
||||
entity_managers:
|
||||
default:
|
||||
connection: default
|
||||
mappings:
|
||||
CadolesCoreBundle: ~
|
||||
CadolesCronBundle: ~
|
||||
CadolesPortalBundle: ~
|
||||
CadolesWebsocketBundle: ~
|
||||
|
||||
|
|
@ -22,6 +22,7 @@ class PurgeFileCommand extends Command
|
|||
private $output;
|
||||
private $filesystem;
|
||||
private $rootlog;
|
||||
private $byexec;
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
|
@ -30,7 +31,8 @@ class PurgeFileCommand extends Command
|
|||
->setDescription('Purge Files')
|
||||
->setHelp('This command Purge the obsolete Files')
|
||||
->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
->addArgument('byexec', InputArgument::OPTIONAL, 'By Cron:Exec')
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -43,6 +45,11 @@ class PurgeFileCommand extends Command
|
|||
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
|
||||
$alias = $this->container->getParameter('alias');
|
||||
|
||||
// Le script est-il executé via Cron:Exec
|
||||
$this->byexec = $input->getArgument('byexec');
|
||||
if($this->byexec=="") $this->byexec=false;
|
||||
echo "pouet".$this->byexec;
|
||||
|
||||
$this->writelnred('');
|
||||
$this->writelnred('== Core:PurgeFile');
|
||||
$this->writelnred('==========================================================================================================');
|
||||
|
@ -368,9 +375,11 @@ class PurgeFileCommand extends Command
|
|||
private function writelnred($string) {
|
||||
$this->output->writeln('<fg=red>'.$string.'</>');
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
if($this->byexec) $this->filesystem->appendToFile($this->rootlog.'exec.log', $string."\n");
|
||||
}
|
||||
private function writeln($string) {
|
||||
$this->output->writeln($string);
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
if($this->byexec) $this->filesystem->appendToFile($this->rootlog.'exec.log', $string."\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
namespace Cadoles\CronBundle\Command;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Process\Exception\ProcessFailedException;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
use Cadoles\CronBundle\Entity\Cron;
|
||||
|
||||
class CronexecCommand extends ContainerAwareCommand
|
||||
{
|
||||
private $container;
|
||||
private $em;
|
||||
private $output;
|
||||
private $filesystem;
|
||||
private $rootlog;
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('Cron:Exec')
|
||||
->setDescription("Executer les commandes présente dans le bus des commandes à exécuter à la volet")
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
|
||||
$this->container = $this->getApplication()->getKernel()->getContainer();
|
||||
$this->em = $this->container->get('doctrine')->getEntityManager();
|
||||
$this->output = $output;
|
||||
$this->filesystem = new Filesystem();
|
||||
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
|
||||
echo $this->rootlog;
|
||||
// On supprime le fichier de log spécifique à ce script
|
||||
//$this->filesystem->remove($this->rootlog."exec.log");
|
||||
$this->filesystem->dumpFile($this->rootlog.'exec.log', "");
|
||||
$this->filesystem->chown($this->rootlog.'exec.log', "www-data");
|
||||
|
||||
$cronexecs=$this->em->getRepository("CadolesCronBundle:Cronexec")->findAll();
|
||||
if($cronexecs) {
|
||||
$this->writelnred('');
|
||||
$this->writelnred('== Cron:Exec');
|
||||
$this->writelnred('==========================================================================================================');
|
||||
|
||||
foreach($cronexecs as $cron) {
|
||||
// Récupération de la commande
|
||||
$command = $this->getApplication()->find($cron->getCommand());
|
||||
|
||||
// Réccuépration des parametres
|
||||
$jsonparameter=json_decode($cron->getJsonargument(),true);
|
||||
|
||||
// Parametre id du cron actuel
|
||||
$jsonparameter["cronid"]=$cron->getId();
|
||||
$jsonparameter["byexec"]=true;
|
||||
|
||||
// Formater la chaine de parametre
|
||||
$parameter = new ArrayInput($jsonparameter);
|
||||
|
||||
// Executer la commande
|
||||
$returnCode=false;
|
||||
try{
|
||||
$returnCode = $command->run($parameter, $output);
|
||||
}
|
||||
catch(\Exception $e) {
|
||||
$this->writelnred("JOB EN ERREUR");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
private function writelnred($string) {
|
||||
$this->output->writeln('<fg=red>'.$string.'</>');
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
$this->filesystem->appendToFile($this->rootlog.'exec.log', $string."\n");
|
||||
}
|
||||
private function writeln($string) {
|
||||
$this->output->writeln($string);
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
$this->filesystem->appendToFile($this->rootlog.'exec.log', $string."\n");
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@ class MailCommand extends ContainerAwareCommand
|
|||
$this->filesystem = new Filesystem();
|
||||
$this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/";
|
||||
|
||||
$mailer_host = $this->getContainer()->getParameter('cron_activate');
|
||||
$mailer_host = $this->getContainer()->getParameter('mailer_host');
|
||||
|
||||
$this->writelnred('');
|
||||
$this->writelnred('== Cron:Mail');
|
||||
|
|
|
@ -172,6 +172,23 @@ class CronController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function cronexecAction() {
|
||||
return $this->render('CadolesCronBundle:Cron:exec.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function cronexecreadAction() {
|
||||
$kernel = $this->get('kernel');
|
||||
$path = $this->get('kernel')->getRootDir() . '/../var/logs/exec.log';
|
||||
$content = file_get_contents($path);
|
||||
|
||||
$output["data"]=$content;
|
||||
return new Response(json_encode($content), 200);
|
||||
}
|
||||
|
||||
public function logAction(Request $request, $id)
|
||||
{
|
||||
$kernel = $this->get('kernel');
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
|
||||
namespace Cadoles\CronBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Cron
|
||||
*
|
||||
* @ORM\Table(name="cronexec")
|
||||
* @ORM\Entity(repositoryClass="Cadoles\CronBundle\Repository\CronexecRepository")
|
||||
*/
|
||||
class Cronexec
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="command", type="string", nullable=false)
|
||||
* @Assert\NotBlank()
|
||||
*
|
||||
*/
|
||||
private $command;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private $jsonargument;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set command
|
||||
*
|
||||
* @param string $command
|
||||
*
|
||||
* @return Cronexec
|
||||
*/
|
||||
public function setCommand($command)
|
||||
{
|
||||
$this->command = $command;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get command
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCommand()
|
||||
{
|
||||
return $this->command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set jsonargument
|
||||
*
|
||||
* @param string $jsonargument
|
||||
*
|
||||
* @return Cronexec
|
||||
*/
|
||||
public function setJsonargument($jsonargument)
|
||||
{
|
||||
$this->jsonargument = $jsonargument;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jsonargument
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getJsonargument()
|
||||
{
|
||||
return $this->jsonargument;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Cadoles\CronBundle\Repository;
|
||||
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
class CronexecRepository extends EntityRepository
|
||||
{
|
||||
}
|
|
@ -14,6 +14,14 @@ cadoles_cron_config_exec:
|
|||
path: /config/cron/exec/{id}
|
||||
defaults: { _controller: CadolesCronBundle:Cron:exec }
|
||||
|
||||
cadoles_cron_config_cronexec:
|
||||
path: /config/cron/cronexec
|
||||
defaults: { _controller: CadolesCronBundle:Cron:cronexec }
|
||||
|
||||
cadoles_cron_config_cronexecread:
|
||||
path: /config/cron/cronexecread
|
||||
defaults: { _controller: CadolesCronBundle:Cron:cronexecread }
|
||||
|
||||
cadoles_cron_config_log:
|
||||
path: /config/cron/log/{id}
|
||||
controller: CadolesCronBundle:Cron:log
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
{% extends '@CadolesCore/base.html.twig' %}
|
||||
|
||||
{% block pagewrapper %}
|
||||
<h1 class="page-header">JOB EXEC</h1>
|
||||
<br><br>
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-pencil fa-fw"></i> Logs
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function refreshContent() {
|
||||
console.log("refresh");
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('cadoles_cron_config_cronexecread') }}",
|
||||
success: function(data, dataType)
|
||||
{
|
||||
$(".panel-body").html(data.replace(/\"/g,"").replace(/\\n/g,"<br>"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var timer=setInterval(refreshContent, 1000);
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue