Differential D25040 Diff 97 src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | if (!$panel) { | ||||
} | } | ||||
} | } | ||||
$panel_type = $panel->getImplementation(); | $panel_type = $panel->getImplementation(); | ||||
if (!$panel_type) { | if (!$panel_type) { | ||||
return $this->renderErrorPanel( | return $this->renderErrorPanel( | ||||
$panel->getName(), | $panel->getName(), | ||||
pht( | pht( | ||||
'This panel has type "%s", but that panel type is not known to '. | 'This panel has type "%s", but that panel type is unknown.', | ||||
'Phabricator.', | |||||
$panel->getPanelType())); | $panel->getPanelType())); | ||||
} | } | ||||
try { | try { | ||||
$this->detectRenderingCycle($panel); | $this->detectRenderingCycle($panel); | ||||
if ($this->enableAsyncRendering) { | if ($this->enableAsyncRendering) { | ||||
if ($panel_type->shouldRenderAsync()) { | if ($panel_type->shouldRenderAsync()) { | ||||
▲ Show 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | if ($this->parentPanelPHIDs === null) { | ||||
throw new PhutilInvalidStateException('setParentPanelPHIDs'); | throw new PhutilInvalidStateException('setParentPanelPHIDs'); | ||||
} | } | ||||
$max_depth = 4; | $max_depth = 4; | ||||
if (count($this->parentPanelPHIDs) >= $max_depth) { | if (count($this->parentPanelPHIDs) >= $max_depth) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'To render more than %s levels of panels nested inside other '. | 'To render more than %s levels of panels nested inside other '. | ||||
'panels, purchase a subscription to Phabricator Gold.', | 'panels, purchase a subscription to %s Gold.', | ||||
new PhutilNumber($max_depth))); | new PhutilNumber($max_depth), | ||||
PlatformSymbols::getPlatformServerName())); | |||||
} | } | ||||
if (in_array($panel->getPHID(), $this->parentPanelPHIDs)) { | if (in_array($panel->getPHID(), $this->parentPanelPHIDs)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'You awake in a twisting maze of mirrors, all alike. '. | 'You awake in a twisting maze of mirrors, all alike. '. | ||||
'You are likely to be eaten by a graph cycle. '. | 'You are likely to be eaten by a graph cycle. '. | ||||
'Should you escape alive, you resolve to be more careful about '. | 'Should you escape alive, you resolve to be more careful about '. | ||||
Show All 15 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0