Summary:
Ref T4986. Ref T4983. Panels will soon be able to contain other panels, either via Remarkup (`{W1}`) or maybe through new types of meta-panels.
Allow panels to detect that they are being rendered very deeply and/or within themselves.
Test Plan: Faked some errors, got failed panel renders. Since panels can't //really// contain other panels yet, this doesn't really have an impact.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: chad, epriestley
Maniphest Tasks: T4983, T4986
Differential Revision: https://secure.phabricator.com/D9140
19 lines
474 B
JavaScript
19 lines
474 B
JavaScript
/**
|
|
* @provides javelin-behavior-dashboard-async-panel
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-workflow
|
|
*/
|
|
|
|
JX.behavior('dashboard-async-panel', function(config) {
|
|
var panel = JX.$(config.panelID);
|
|
panel.style.opacity = '0.5';
|
|
|
|
new JX.Workflow(config.uri)
|
|
.setData({parentPanelPHIDs: config.parentPanelPHIDs.join(',')})
|
|
.setHandler(function(r) {
|
|
JX.DOM.replace(panel, JX.$H(r.panelMarkup));
|
|
})
|
|
.start();
|
|
});
|