Backed out changeset 463a6a947862 (bug 1005755)

This commit is contained in:
Sebastian Hengst 2017-10-16 15:05:14 +02:00
parent de0f85f0a4
commit 8115404ff5

View File

@ -92,35 +92,18 @@ function NetworkEventMessage({
const xhr = isXHR
? dom.span({ className: "xhr" }, l10n.getStr("webConsoleXhrIndicator"))
: null;
const requestUrl = dom.a({ className: "url", title: request.url, onClick: toggle },
const url = dom.a({ className: "url", title: request.url, onClick: toggle },
request.url.replace(/\?.+/, ""));
const statusBody = statusInfo
? dom.a({ className: "status", onClick: toggle }, statusInfo)
: null;
const messageBody = [method, xhr, requestUrl, statusBody];
// API consumed by Net monitor UI components. Most of the method
// are not needed in context of the Console panel (atm) and thus
// let's just provide empty implementation.
// Individual methods might be implemented step by step as needed.
let connector = {
viewSourceInDebugger: (url, line) => {
serviceContainer.onViewSourceInDebugger({url, line});
},
getLongString: () => {},
getTabTarget: () => {},
getNetworkRequest: () => {},
sendHTTPRequest: () => {},
setPreferences: () => {},
triggerActivity: () => {},
};
const messageBody = [method, xhr, url, statusBody];
// Only render the attachment if the network-event is
// actually opened (performance optimization).
const attachment = open && dom.div({className: "network-info devtools-monospace"},
TabboxPanel({
connector,
activeTabId: networkMessageActiveTabId,
request: networkMessageUpdate,
sourceMapService: serviceContainer.sourceMapService,