<?php defined('C5_EXECUTE') or die("Access Denied."); $sh = Loader::helper('concrete/dashboard/sitemap'); ?> <?php if ($sh->canRead()) { ?> <?php $u = new User(); if ($u->isSuperUser()) { if (Queue::exists('copy_page')) { $q = Queue::get('copy_page'); if ($q->count() > 0) { ?> <div class="alert alert-warning"> <?php echo t('Page copy operations pending.'); ?> <button class="btn btn-xs btn-default pull-right" onclick="ConcreteSitemap.refreshCopyOperations()"><?php echo t('Resume Copy'); ?> </button> </div> <?php } } } ?>
$jails = new Jails(); jsonResponse(200, $jails->getJails()); }); /* Jails - List individual jail info */ $app->get('/jails/:jailname/', 'isAllowed', function ($jailname) use($app) { $jails = new Jails(); if (!$jails->exists($jailname)) { textResponse(404, 'Jail unknown'); } else { jsonResponse(200, $jails->getJail($jailname)); } }); /* Queues - info about a queue */ $app->get('/queues/:queuename/:jailname/', 'isAllowed', function ($queuename, $jailname) use($app) { $queue = new Queue($queuename, $jailname); if ($queue->exists()) { jsonResponse(200, $queue->getQueueInfo()); } else { textResponse(404, 'Queue unknown'); } }); /* Queues - Take next job */ $app->get('/queues/waitqueue/:jailname/take', 'isAllowed', function ($jailname) use($app) { $queue = new Queue('waitqueue', $jailname); $job = $queue->getNextJob(); if ($job === false) { textResponse(204); } $machine = new Machine(Session::getMachineId()); $machine->addJob($job->getJobId()); $job->set('machine', $machine->getName());