Merge pull request +6622 from c9/better/monitor

twaek terminal monitor
c9
Nikolai Onken 2015-03-18 20:30:52 +01:00
commit 21f6ef356e
4 zmienionych plików z 39 dodań i 26 usunięć

Wyświetl plik

@ -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": "#b0b4d03280",
"c9.ide.theme.flat": "#5c7c27ab74",
"c9.ide.threewaymerge": "#229382aa0b",
"c9.ide.undo": "#b028bcb4d5",

Wyświetl plik

@ -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({

Wyświetl plik

@ -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

Wyświetl plik

@ -738,6 +738,8 @@ define(function(require, exports, module) {
terminal.on("afterWrite", function() {
clearTmuxBorders(terminal);
});
session.getEmitter().sticky("terminalReady", session);
}
/***** Lifecycle *****/