mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Correct an issue where "dashboard.panel.edit" fatals in the API console
Summary: Ref T13650. Currently, viewing the API console help page for this method fatals because it constructs a generic, untyped panel. As a step toward improving this, generate a concrete panel type instead. This isn't the best possible fix, see T13650 for discussion. Test Plan: Viewed "dashboard.panel.edit" API page, now saw a usable page. Maniphest Tasks: T13650 Differential Revision: https://secure.phabricator.com/D21668
This commit is contained in:
parent
ad05ee00c0
commit
a8f429cdbf
1 changed files with 11 additions and 0 deletions
|
@ -71,6 +71,17 @@ final class PhabricatorDashboardPanelEditEngine
|
||||||
return $panel;
|
return $panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function newEditableObjectForDocumentation() {
|
||||||
|
$panel = parent::newEditableObjectForDocumentation();
|
||||||
|
|
||||||
|
$text_type = id(new PhabricatorDashboardTextPanelType())
|
||||||
|
->getPanelTypeKey();
|
||||||
|
|
||||||
|
$panel->setPanelType($text_type);
|
||||||
|
|
||||||
|
return $panel;
|
||||||
|
}
|
||||||
|
|
||||||
protected function newObjectQuery() {
|
protected function newObjectQuery() {
|
||||||
return new PhabricatorDashboardPanelQuery();
|
return new PhabricatorDashboardPanelQuery();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue