kopia lustrzana https://github.com/c9/core
twaek terminal monitor
rodzic
8a32d89a6f
commit
6186fdf212
|
@ -97,7 +97,7 @@
|
|||
"c9.ide.run": "#f5a056e6ce",
|
||||
"c9.ide.run.build": "#915e48b363",
|
||||
"c9.ide.save": "#a32a8f4346",
|
||||
"c9.ide.terminal.monitor": "#df9936daa2",
|
||||
"c9.ide.terminal.monitor": "#9dc6678798",
|
||||
"c9.ide.theme.flat": "#5c7c27ab74",
|
||||
"c9.ide.threewaymerge": "#229382aa0b",
|
||||
"c9.ide.undo": "#b028bcb4d5",
|
||||
|
|
|
@ -50,29 +50,29 @@ define(function(require, exports, module) {
|
|||
oldOnError.apply(this, arguments);
|
||||
};
|
||||
|
||||
//Catch all APF Routed errors
|
||||
// ui.addEventListener("error", function(e) {
|
||||
// var errorInfo = {
|
||||
// agent : navigator.userAgent,
|
||||
// type : "APF Error",
|
||||
// message : e.message,
|
||||
// tgt : e.currentTarget && e.currentTarget.serialize(),
|
||||
// url : e.url,
|
||||
// state : e.state,
|
||||
// e : e.error,
|
||||
// workspaceId : plugin.workspaceId
|
||||
// };
|
||||
//
|
||||
// emit("error", errorInfo);
|
||||
//
|
||||
// http.request("/api/debug", {
|
||||
// method : "POST",
|
||||
// contentType : "application/json",
|
||||
// body : errorInfo
|
||||
// }, function(err) {
|
||||
// if (err) console.error(err);
|
||||
// });
|
||||
// });
|
||||
// Catch all APF Routed errors
|
||||
// ui.addEventListener("error", function(e) {
|
||||
// var errorInfo = {
|
||||
// agent : navigator.userAgent,
|
||||
// type : "APF Error",
|
||||
// message : e.message,
|
||||
// tgt : e.currentTarget && e.currentTarget.serialize(),
|
||||
// url : e.url,
|
||||
// state : e.state,
|
||||
// e : e.error,
|
||||
// workspaceId : plugin.workspaceId
|
||||
// };
|
||||
|
||||
// emit("error", errorInfo);
|
||||
|
||||
// http.request("/api/debug", {
|
||||
// method : "POST",
|
||||
// contentType : "application/json",
|
||||
// body : errorInfo
|
||||
// }, function(err) {
|
||||
// if (err) console.error(err);
|
||||
// });
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,11 @@ define(function(require, exports, module) {
|
|||
// });
|
||||
}
|
||||
|
||||
function reportError(exception) {
|
||||
console.error(exception.stack || exception);
|
||||
function reportError(exception, customData) {
|
||||
if (customData)
|
||||
console.error(exception, customData);
|
||||
else
|
||||
console.error(exception.stack || exception);
|
||||
submitError(exception);
|
||||
}
|
||||
|
||||
|
@ -98,6 +101,10 @@ define(function(require, exports, module) {
|
|||
load();
|
||||
});
|
||||
|
||||
plugin.on("unload", function(){
|
||||
loaded = false;
|
||||
});
|
||||
|
||||
/***** Register and define API *****/
|
||||
|
||||
plugin.freezePublicAPI({
|
||||
|
|
|
@ -158,6 +158,10 @@ define(function(require, exports, module) {
|
|||
if (!/(https?|ftp|file):/.test(href)) {
|
||||
href = "http://" + href;
|
||||
}
|
||||
href = href.replace(/(^https?:\/\/)(0.0.0.0|localhost)(?=:|\/|$)/, function(_, protocol, host) {
|
||||
host = c9.hostname || window.location.host;
|
||||
return protocol + host.replace(/:\d+/, "");
|
||||
});
|
||||
if (e.metaKey || e.ctrlKey)
|
||||
window.open(href);
|
||||
else
|
||||
|
|
|
@ -738,6 +738,8 @@ define(function(require, exports, module) {
|
|||
terminal.on("afterWrite", function() {
|
||||
clearTmuxBorders(terminal);
|
||||
});
|
||||
|
||||
session.getEmitter().sticky("terminalReady", session);
|
||||
}
|
||||
|
||||
/***** Lifecycle *****/
|
||||
|
|
Ładowanie…
Reference in New Issue