security update devel, metatag
This commit is contained in:
+3
-1
@@ -62,7 +62,9 @@ class ToolbarController extends ControllerBase {
|
||||
*
|
||||
* @param Profile $profile
|
||||
*
|
||||
* @return array
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function toolbarAction(Profile $profile) {
|
||||
$this->profiler->disable();
|
||||
|
||||
+10
-2
@@ -43,8 +43,16 @@ class DatabaseDataCollector extends DataCollector implements DrupalDataCollector
|
||||
public function collect(Request $request, Response $response, \Exception $exception = NULL) {
|
||||
$connections = [];
|
||||
foreach (Database::getAllConnectionInfo() as $key => $info) {
|
||||
$database = Database::getConnection('default', $key);
|
||||
$connections[$key] = $database->getLogger()->get('webprofiler');
|
||||
try {
|
||||
$database = Database::getConnection('default', $key);
|
||||
|
||||
if ($database->getLogger()) {
|
||||
$connections[$key] = $database->getLogger()->get('webprofiler');
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
// There was some error during database connection, maybe a stale
|
||||
// configuration in settings.php or wrong values used for a migration.
|
||||
}
|
||||
}
|
||||
|
||||
$this->data['connections'] = array_keys($connections);
|
||||
|
||||
+7
-2
@@ -7,6 +7,13 @@ namespace Drupal\webprofiler\DataCollector;
|
||||
*/
|
||||
trait DrupalDataCollectorTrait {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function reset() {
|
||||
$this->data = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -47,8 +54,6 @@ trait DrupalDataCollectorTrait {
|
||||
* @param $method
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function getMethodData($class, $method) {
|
||||
$class = is_object($class) ? get_class($class) : $class;
|
||||
|
||||
+2
-2
@@ -41,11 +41,11 @@ class FormsDataCollector extends DataCollector implements DrupalDataCollectorInt
|
||||
* @return array
|
||||
*/
|
||||
public function getForms() {
|
||||
return $this->data['forms'];
|
||||
return (!empty($this->data['forms']) && is_array($this->data['forms'])) ? $this->data['forms'] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return int
|
||||
*/
|
||||
public function getFormsCount() {
|
||||
return count($this->getForms());
|
||||
|
||||
+32
-2
@@ -51,7 +51,8 @@ class RequestDataCollector extends BaseRequestDataCollector implements DrupalDat
|
||||
/**
|
||||
* @param $service_id
|
||||
* @param $callable
|
||||
* @param $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
*
|
||||
*/
|
||||
public function addAccessCheck($service_id, $callable, Request $request) {
|
||||
$this->accessCheck[$request->getPathInfo()][] = [
|
||||
@@ -71,7 +72,7 @@ class RequestDataCollector extends BaseRequestDataCollector implements DrupalDat
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getPanelSummary() {
|
||||
return $this->data['status_code'].' '.$this->data['status_text'];
|
||||
return $this->data['status_code'] . ' ' . $this->data['status_text'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,4 +81,33 @@ class RequestDataCollector extends BaseRequestDataCollector implements DrupalDat
|
||||
public function getIcon() {
|
||||
return 'iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAQAAADYBBcfAAACvElEQVR42tVTbUhTYRTerDCnKVoUUr/KCZmypA9Koet0bXNLJ5XazDJ/WFaCUY0pExRZXxYiJgsxWWjkaL+yK+po1gjyR2QfmqWxtBmaBtqWGnabT++c11Fu4l/P4VzOPc95zoHznsNZodIbLDdRcKnc1Bu8DAK45ZsOnykQNMopsNooLxCknb0cDq5vml9FtHiIgpBR0R6iihYyFMTDt2Lg56ObPkI6TMGXSof1EV67IqCwisJSWliFAG/E0CfFIiebdNypcxi/1zgyFiIiZ3sJQr0RQx5frLa6k7SOKRo3oMFNR5t62h2rttKXEOKFqDCxtXNmmBokO2KKTlp3IdWuT2dYRNGKwEXEBCcL172G5FG0aIxC0kR9PBTVH1kkwQn+IqJnCE33EalVzT9GJQS1tAdD3CKicJYFrxqx7W2ejCEdZy1FiC5tZxHhLJKOZaRdQJAyV/YAvDliySALHxmxR4Hqe2iwvaOR/CEuZYJFSgYhVbZRkA8KGdEktrqnqra90NndCdkt77fjIHIhexOrfO6O3bbbOj/rqu5IptgyR3sU93QbOYhquZK4MCDp0Ina/PLsu5JvbCTRaapUdUmIV/RzoMdsk/0hWRNdAvKOmvqlN0drsJbJf1P4YsQ5lGrJeuosiOUgbOC8cto3LfOXTdVd7BqZsQKbse+0jUL6WPcesqs4MNSUTQAxGjwFiC8m3yzmqwHJBWYKBJ9WNqW/dHkpU/osch1Yj5RJfXPfSEe/2UPsN490NPfZG5CKyJmcV5ayHyzy7BMqsXfuHhGK/cjAIeSpR92gehR55D8TcQhDEKJwytBJ4fr4NULvrEM8NszfJPyxDoHYAQ1oPCWmIX4gifmDS/DV2DKeb25FHWr76yEG7/9L4YFPeiQQ4/8LkgJ8Et+NncTCsYqzXAEXa7CWdPZzGWdlyV+vST0JanfPvwAAAABJRU5ErkJggg==';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|string
|
||||
*/
|
||||
public function getData() {
|
||||
// Drupal 8.5+ uses Symfony 3.4.x that changes the way the Request data are
|
||||
// collected. Data is altered with \Symfony\Component\HttpKernel\DataCollector\DataCollector::cloneVar.
|
||||
// The stored data (of type \Symfony\Component\VarDumper\Cloner\Data) is
|
||||
// suitable to be converted to a string by a Dumper (\Symfony\Component\VarDumper\Dumper\DataDumperInterface).
|
||||
// In our implementation however we need that data as an array, to be later
|
||||
// converted in a json response by a REST endpoint. We need to refactor the
|
||||
// whole way Web Profiler works to allow that. At the moment we just
|
||||
// retrieve the raw Data value and do some string manipulation to clean the
|
||||
// output a bit.
|
||||
|
||||
$data = $this->data->getValue(TRUE);
|
||||
unset($data['request_attributes']['_route_params']);
|
||||
unset($data['request_attributes']['_access_result']);
|
||||
|
||||
$route_object = [];
|
||||
foreach($data['request_attributes']['_route_object'] as $key => $result) {
|
||||
$key = str_replace("\0", '', $key);
|
||||
$key = str_replace('Symfony\Component\Routing\Route', 'Symfony\Component\Routing\Route::', $key);
|
||||
$route_object[$key] = $result;
|
||||
}
|
||||
$data['request_attributes']['_route_object'] = $route_object;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\webprofiler\Entity\Decorators\Config;
|
||||
|
||||
use Drupal\image\ImageStyleStorageInterface;
|
||||
|
||||
/**
|
||||
* Class ImageStyleStorageDecorator
|
||||
*/
|
||||
class ImageStyleStorageDecorator extends ConfigEntityStorageDecorator implements ImageStyleStorageInterface {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setReplacementId($name, $replacement) {
|
||||
return $this->getOriginalObject()->setReplacementId($name, $replacement);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getReplacementId($name) {
|
||||
return $this->getOriginalObject()->getReplacementId($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function clearReplacementId($name) {
|
||||
return $this->getOriginalObject()->clearReplacementId($name);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
use Drupal\Core\Entity\EntityViewBuilderInterface;
|
||||
use Drupal\Core\Plugin\DefaultPluginManager;
|
||||
use Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator;
|
||||
use Drupal\webprofiler\Entity\Decorators\Config\ImageStyleStorageDecorator;
|
||||
use Drupal\webprofiler\Entity\Decorators\Config\RoleStorageDecorator;
|
||||
use Drupal\webprofiler\Entity\Decorators\Config\ShortcutSetStorageDecorator;
|
||||
use Drupal\webprofiler\Entity\Decorators\Config\VocabularyStorageDecorator;
|
||||
@@ -98,6 +99,9 @@ class EntityManagerWrapper extends DefaultPluginManager implements EntityTypeMan
|
||||
case 'shortcut_set':
|
||||
return new ShortcutSetStorageDecorator($handler);
|
||||
break;
|
||||
case 'image_style':
|
||||
return new ImageStyleStorageDecorator($handler);
|
||||
break;
|
||||
default:
|
||||
return new ConfigEntityStorageDecorator($handler);
|
||||
break;
|
||||
|
||||
+27
-6
@@ -170,10 +170,18 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
|
||||
* @param $priority
|
||||
*/
|
||||
private function addCalledListener($definition, $event_name, $priority) {
|
||||
$this->calledListeners[$event_name][$priority][] = [
|
||||
'class' => get_class($definition['callable'][0]),
|
||||
'method' => $definition['callable'][1],
|
||||
];
|
||||
if ($this->isClosure($definition['callable'])) {
|
||||
$this->calledListeners[$event_name][$priority][] = [
|
||||
'class' => 'Closure',
|
||||
'method' => '',
|
||||
];
|
||||
}
|
||||
else {
|
||||
$this->calledListeners[$event_name][$priority][] = [
|
||||
'class' => get_class($definition['callable'][0]),
|
||||
'method' => $definition['callable'][1],
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($this->notCalledListeners[$event_name][$priority] as $key => $listener) {
|
||||
if (isset($listener['service'])) {
|
||||
@@ -182,12 +190,25 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (get_class($listener['callable'][0]) == get_class($definition['callable'][0]) && $listener['callable'][1] == $definition['callable'][1]) {
|
||||
unset($this->notCalledListeners[$event_name][$priority][$key]);
|
||||
if ($this->isClosure($listener['callable'])) {
|
||||
if (is_callable($listener['callable'], TRUE, $listenerCallableName) && is_callable($definition['callable'], TRUE, $definitionCallableName)) {
|
||||
if ($listenerCallableName == $definitionCallableName) {
|
||||
unset($this->notCalledListeners[$event_name][$priority][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (get_class($listener['callable'][0]) == get_class($definition['callable'][0]) && $listener['callable'][1] == $definition['callable'][1]) {
|
||||
unset($this->notCalledListeners[$event_name][$priority][$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function isClosure($t) {
|
||||
return is_object($t) && ($t instanceof \Closure);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\webprofiler\EventSubscriber;
|
||||
|
||||
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
|
||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Symfony\Component\HttpKernel\Profiler\Profiler;
|
||||
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class ProfilerSubscriber implements EventSubscriberInterface {
|
||||
|
||||
protected $profiler;
|
||||
|
||||
protected $matcher;
|
||||
|
||||
protected $onlyException;
|
||||
|
||||
protected $onlyMasterRequests;
|
||||
|
||||
protected $exception;
|
||||
|
||||
protected $profiles;
|
||||
|
||||
protected $requestStack;
|
||||
|
||||
protected $parents;
|
||||
|
||||
/**
|
||||
* @param Profiler $profiler A Profiler instance
|
||||
* @param RequestStack $requestStack A RequestStack instance
|
||||
* @param RequestMatcherInterface|null $matcher A RequestMatcher instance
|
||||
* @param bool $onlyException True if the profiler only collects data when an
|
||||
* exception occurs, false otherwise
|
||||
* @param bool $onlyMasterRequests True if the profiler only collects data
|
||||
* when the request is a master request, false otherwise
|
||||
*/
|
||||
public function __construct(Profiler $profiler, RequestStack $requestStack, RequestMatcherInterface $matcher = NULL, $onlyException = FALSE, $onlyMasterRequests = FALSE) {
|
||||
$this->profiler = $profiler;
|
||||
$this->matcher = $matcher;
|
||||
$this->onlyException = (bool) $onlyException;
|
||||
$this->onlyMasterRequests = (bool) $onlyMasterRequests;
|
||||
$this->profiles = new \SplObjectStorage();
|
||||
$this->parents = new \SplObjectStorage();
|
||||
$this->requestStack = $requestStack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the onKernelException event.
|
||||
*/
|
||||
public function onKernelException(GetResponseForExceptionEvent $event) {
|
||||
if ($this->onlyMasterRequests && !$event->isMasterRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->exception = $event->getException();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the onKernelResponse event.
|
||||
*/
|
||||
public function onKernelResponse(FilterResponseEvent $event) {
|
||||
$master = $event->isMasterRequest();
|
||||
if ($this->onlyMasterRequests && !$master) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->onlyException && NULL === $this->exception) {
|
||||
return;
|
||||
}
|
||||
|
||||
$request = $event->getRequest();
|
||||
$exception = $this->exception;
|
||||
$this->exception = NULL;
|
||||
|
||||
if (NULL !== $this->matcher && !$this->matcher->matches($request)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$profile = $this->profiler->collect($request, $event->getResponse(), $exception)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->profiles[$request] = $profile;
|
||||
|
||||
$this->parents[$request] = $this->requestStack->getParentRequest();
|
||||
}
|
||||
|
||||
public function onKernelFinishRequest(FinishRequestEvent $event) {
|
||||
// attach children to parents
|
||||
foreach ($this->profiles as $request) {
|
||||
if (NULL !== $parentRequest = $this->parents[$request]) {
|
||||
if (isset($this->profiles[$parentRequest])) {
|
||||
$this->profiles[$parentRequest]->addChild($this->profiles[$request]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// save profiles
|
||||
foreach ($this->profiles as $request) {
|
||||
$this->profiler->saveProfile($this->profiles[$request]);
|
||||
}
|
||||
|
||||
$this->profiles = new \SplObjectStorage();
|
||||
$this->parents = new \SplObjectStorage();
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents() {
|
||||
return [
|
||||
KernelEvents::RESPONSE => ['onKernelResponse', -100],
|
||||
KernelEvents::EXCEPTION => 'onKernelException',
|
||||
KernelEvents::FINISH_REQUEST => ['onKernelFinishRequest', -1024],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,8 @@ class ConfigForm extends ConfigFormBase {
|
||||
'#open' => FALSE,
|
||||
];
|
||||
|
||||
$form['purge']['purge'] = [
|
||||
$form['purge']['actions'] = ['#type' => 'actions'];
|
||||
$form['purge']['actions']['purge'] = [
|
||||
'#type' => 'submit',
|
||||
'#value' => $this->t('Purge'),
|
||||
'#submit' => [[$this, 'purge']],
|
||||
|
||||
@@ -36,8 +36,18 @@ class HttpClientMiddleware {
|
||||
return function ($handler) {
|
||||
return function (RequestInterface $request, array $options) use ($handler) {
|
||||
|
||||
$options['on_stats'] = function (TransferStats $stats) use ($request) {
|
||||
// If on_stats callback is already set then save it
|
||||
// and call it after ours.
|
||||
if (isset($options['on_stats'])) {
|
||||
$next = $options['on_stats'];
|
||||
}
|
||||
else {
|
||||
$next = function(TransferStats $stats) {};
|
||||
}
|
||||
|
||||
$options['on_stats'] = function (TransferStats $stats) use ($request, $next) {
|
||||
$request->stats = $stats;
|
||||
$next($stats);
|
||||
};
|
||||
|
||||
return $handler($request, $options)->then(
|
||||
|
||||
@@ -91,4 +91,14 @@ class MailManagerWrapper extends DefaultPluginManager implements MailManagerInte
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Must call getInstance on the decorated MailManager.
|
||||
* @see https://www.drupal.org/node/2625554
|
||||
*/
|
||||
public function getInstance(array $options) {
|
||||
return $this->mailManager->getInstance($options);
|
||||
}
|
||||
}
|
||||
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/**
|
||||
* This file was generated via php core/scripts/generate-proxy-class.php
|
||||
* 'Drupal\webprofiler\Command\ListCommand'
|
||||
* "modules/contrib/devel/webprofiler/src".
|
||||
*/
|
||||
|
||||
namespace Drupal\webprofiler\ProxyClass\Command {
|
||||
|
||||
/**
|
||||
* Provides a proxy class for \Drupal\webprofiler\Command\ListCommand.
|
||||
*
|
||||
* @see \Drupal\Component\ProxyBuilder
|
||||
*/
|
||||
class ListCommand {
|
||||
|
||||
use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
|
||||
|
||||
/**
|
||||
* The id of the original proxied service.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $drupalProxyOriginalServiceId;
|
||||
|
||||
/**
|
||||
* The real proxied service, after it was lazy loaded.
|
||||
*
|
||||
* @var \Drupal\webprofiler\Command\ListCommand
|
||||
*/
|
||||
protected $service;
|
||||
|
||||
/**
|
||||
* The service container.
|
||||
*
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* Constructs a ProxyClass Drupal proxy object.
|
||||
*
|
||||
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
||||
* The container.
|
||||
* @param string $drupal_proxy_original_service_id
|
||||
* The service ID of the original service.
|
||||
*/
|
||||
public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) {
|
||||
$this->container = $container;
|
||||
$this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lazy loads the real service from the container.
|
||||
*
|
||||
* @return object
|
||||
* Returns the constructed real service.
|
||||
*/
|
||||
protected function lazyLoadItself() {
|
||||
if (!isset($this->service)) {
|
||||
$this->service = $this->container->get($this->drupalProxyOriginalServiceId);
|
||||
}
|
||||
|
||||
return $this->service;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function showMessage($output, $message, $type = 'info') {
|
||||
return $this->lazyLoadItself()->showMessage($output, $message, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function ignoreValidationErrors() {
|
||||
return $this->lazyLoadItself()->ignoreValidationErrors();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setApplication(\Symfony\Component\Console\Application $application = NULL) {
|
||||
return $this->lazyLoadItself()->setApplication($application);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setHelperSet(\Symfony\Component\Console\Helper\HelperSet $helperSet) {
|
||||
return $this->lazyLoadItself()->setHelperSet($helperSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getHelperSet() {
|
||||
return $this->lazyLoadItself()->getHelperSet();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getApplication() {
|
||||
return $this->lazyLoadItself()->getApplication();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isEnabled() {
|
||||
return $this->lazyLoadItself()->isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function run(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) {
|
||||
return $this->lazyLoadItself()->run($input, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setCode(callable $code) {
|
||||
return $this->lazyLoadItself()->setCode($code);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function mergeApplicationDefinition($mergeArgs = TRUE) {
|
||||
return $this->lazyLoadItself()->mergeApplicationDefinition($mergeArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setDefinition($definition) {
|
||||
return $this->lazyLoadItself()->setDefinition($definition);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDefinition() {
|
||||
return $this->lazyLoadItself()->getDefinition();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getNativeDefinition() {
|
||||
return $this->lazyLoadItself()->getNativeDefinition();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addArgument($name, $mode = NULL, $description = '', $default = NULL) {
|
||||
return $this->lazyLoadItself()
|
||||
->addArgument($name, $mode, $description, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addOption($name, $shortcut = NULL, $mode = NULL, $description = '', $default = NULL) {
|
||||
return $this->lazyLoadItself()
|
||||
->addOption($name, $shortcut, $mode, $description, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setName($name) {
|
||||
return $this->lazyLoadItself()->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setProcessTitle($title) {
|
||||
return $this->lazyLoadItself()->setProcessTitle($title);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() {
|
||||
return $this->lazyLoadItself()->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setHidden($hidden) {
|
||||
return $this->lazyLoadItself()->setHidden($hidden);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isHidden() {
|
||||
return $this->lazyLoadItself()->isHidden();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setDescription($description) {
|
||||
return $this->lazyLoadItself()->setDescription($description);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDescription() {
|
||||
return $this->lazyLoadItself()->getDescription();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setHelp($help) {
|
||||
return $this->lazyLoadItself()->setHelp($help);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getHelp() {
|
||||
return $this->lazyLoadItself()->getHelp();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getProcessedHelp() {
|
||||
return $this->lazyLoadItself()->getProcessedHelp();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setAliases($aliases) {
|
||||
return $this->lazyLoadItself()->setAliases($aliases);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getAliases() {
|
||||
return $this->lazyLoadItself()->getAliases();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSynopsis($short = FALSE) {
|
||||
return $this->lazyLoadItself()->getSynopsis($short);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addUsage($usage) {
|
||||
return $this->lazyLoadItself()->addUsage($usage);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getUsages() {
|
||||
return $this->lazyLoadItself()->getUsages();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getHelper($name) {
|
||||
return $this->lazyLoadItself()->getHelper($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setContainer($container) {
|
||||
return $this->lazyLoadItself()->setContainer($container);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function has($key) {
|
||||
return $this->lazyLoadItself()->has($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($key) {
|
||||
return $this->lazyLoadItself()->get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setTranslator($translator) {
|
||||
return $this->lazyLoadItself()->setTranslator($translator);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function trans($key) {
|
||||
return $this->lazyLoadItself()->trans($key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
<option value="1">{{ 'Yes'|t }}</option>
|
||||
<option value="0">{{ 'No'|t }}</option>
|
||||
</select>
|
||||
<label for="edit-type" class="panel__filter-label">{{ 'Slow queryes'|t }}</label>
|
||||
<label for="edit-type" class="panel__filter-label">{{ 'Slow queries'|t }}</label>
|
||||
</div>
|
||||
<div class="panel__filter--select">
|
||||
<select id="edit-database" class="js--live-filter">
|
||||
|
||||
+7
-1
@@ -44,7 +44,13 @@
|
||||
<tr>
|
||||
<td><%= event_name %></td>
|
||||
<% if( listener.clazz ) { %>
|
||||
<td><%= Drupal.webprofiler.helpers.classLink(listener.clazz) %></td>
|
||||
<td>
|
||||
<% if( listener.class == "Closure" ) { %>
|
||||
<%= "Closure" %>
|
||||
<% } else { %>
|
||||
<%= Drupal.webprofiler.helpers.classLink(listener.clazz) %>
|
||||
<% } %>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td><%= listener.service[0] %>::<%= listener.service[1] %></td>
|
||||
<% } %>
|
||||
|
||||
+19
-9
@@ -46,9 +46,10 @@
|
||||
|
||||
<% if (!_.isEmpty(data.request_query)) { %>
|
||||
<div class="panel__container">
|
||||
<h3>GET parameters</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'GET Parameters'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -65,9 +66,10 @@
|
||||
|
||||
<% if (!_.isEmpty(data.request_request)) { %>
|
||||
<div class="panel__container">
|
||||
<h3>POST parameters</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'POST Parameters'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -83,18 +85,20 @@
|
||||
<% } %>
|
||||
|
||||
<div class="panel__container">
|
||||
<h3>Request attributes</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Attributes'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% _.each( data.request_attributes, function( item, key ){ %>
|
||||
<tr>
|
||||
<td><%- key %></td>
|
||||
|
||||
<% if(key == '_controller') { %>
|
||||
<td><%= Drupal.webprofiler.helpers.classLink(data.controller) %></td>
|
||||
<% } else if(key == '_form') { %>
|
||||
<td><%= Drupal.webprofiler.helpers.classLink(data.controller) %></td>
|
||||
<% } else { %>
|
||||
<td><%= Drupal.webprofiler.helpers.frm(item) %></td>
|
||||
<% } %>
|
||||
@@ -106,9 +110,10 @@
|
||||
|
||||
<% if (!_.isEmpty(data.request_cookies)) { %>
|
||||
<div class="panel__container">
|
||||
<h3>Cookies</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Cookies'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -124,9 +129,10 @@
|
||||
<% } %>
|
||||
|
||||
<div class="panel__container">
|
||||
<h3>Request headers</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Request headers'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -142,16 +148,18 @@
|
||||
|
||||
<% if (!_.isEmpty(data.content)) { %>
|
||||
<div class="panel__container">
|
||||
<h3>Raw content</h3>
|
||||
<div class="h--word-broken"><%- data.content %></div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (!_.isEmpty(data.access_check)) { %>
|
||||
<div class="panel__container">
|
||||
<h3>Access check</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Path'|t }}</th>
|
||||
<th>{{ 'Access check'|t }}</th>
|
||||
<th>{{ 'Service'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% _.each(data.access_check, function(items, key){ %>
|
||||
@@ -170,9 +178,10 @@
|
||||
<% } %>
|
||||
|
||||
<div class="panel__container">
|
||||
<h3>Server Parameters</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Server Parameters'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -187,9 +196,10 @@
|
||||
</div>
|
||||
|
||||
<div class="panel__container">
|
||||
<h3>Response headers</h3>
|
||||
<table class="table--duo">
|
||||
<thead>
|
||||
<th>{{ 'Response headers'|t }}</th>
|
||||
<th>{{ 'Name'|t }}</th>
|
||||
<th>{{ 'Value'|t }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<tr>
|
||||
<td><%- item.id %></td>
|
||||
<td><%- item.current_display %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.build_time) %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.execute_time) %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.render_time) %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.build_time, 's') %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.execute_time, 's') %></td>
|
||||
<td><%- Drupal.webprofiler.helpers.printTime(item.render_time, 's') %></td>
|
||||
<td><a href="<%- item.route %>">{{ 'Edit'|t }}</a></td>
|
||||
</tr>
|
||||
<% }); %>
|
||||
|
||||
@@ -7,10 +7,10 @@ configure: webprofiler.settings
|
||||
tags:
|
||||
- developer
|
||||
dependencies:
|
||||
- devel
|
||||
- devel:devel
|
||||
|
||||
# Information added by Drupal.org packaging script on 2017-10-05
|
||||
version: '8.x-1.2'
|
||||
# Information added by Drupal.org packaging script on 2019-01-29
|
||||
version: '8.x-2.0'
|
||||
core: '8.x'
|
||||
project: 'devel'
|
||||
datestamp: 1507197848
|
||||
datestamp: 1548799386
|
||||
|
||||
@@ -46,7 +46,7 @@ services:
|
||||
|
||||
# event subscribers
|
||||
webprofiler.profiler_listener:
|
||||
class: Symfony\Component\HttpKernel\EventListener\ProfilerListener
|
||||
class: Drupal\webprofiler\EventSubscriber\ProfilerSubscriber
|
||||
arguments: ['@profiler', '@request_stack', '@?webprofiler.matcher', '%webprofiler.only_exceptions%', '%webprofiler.only_master_requests%']
|
||||
tags:
|
||||
- { name: event_subscriber }
|
||||
|
||||
Reference in New Issue
Block a user