twaek terminal monitor

c9
nightwing 2015-03-04 11:24:34 +04:00
rodzic 8a32d89a6f
commit 6186fdf212
4 zmienionych plików z 39 dodań i 26 usunięć

Wyświetl plik

@ -97,7 +97,7 @@
"c9.ide.run": "#f5a056e6ce", "c9.ide.run": "#f5a056e6ce",
"c9.ide.run.build": "#915e48b363", "c9.ide.run.build": "#915e48b363",
"c9.ide.save": "#a32a8f4346", "c9.ide.save": "#a32a8f4346",
"c9.ide.terminal.monitor": "#df9936daa2", "c9.ide.terminal.monitor": "#9dc6678798",
"c9.ide.theme.flat": "#5c7c27ab74", "c9.ide.theme.flat": "#5c7c27ab74",
"c9.ide.threewaymerge": "#229382aa0b", "c9.ide.threewaymerge": "#229382aa0b",
"c9.ide.undo": "#b028bcb4d5", "c9.ide.undo": "#b028bcb4d5",

Wyświetl plik

@ -50,29 +50,29 @@ define(function(require, exports, module) {
oldOnError.apply(this, arguments); oldOnError.apply(this, arguments);
}; };
//Catch all APF Routed errors // Catch all APF Routed errors
// ui.addEventListener("error", function(e) { // ui.addEventListener("error", function(e) {
// var errorInfo = { // var errorInfo = {
// agent : navigator.userAgent, // agent : navigator.userAgent,
// type : "APF Error", // type : "APF Error",
// message : e.message, // message : e.message,
// tgt : e.currentTarget && e.currentTarget.serialize(), // tgt : e.currentTarget && e.currentTarget.serialize(),
// url : e.url, // url : e.url,
// state : e.state, // state : e.state,
// e : e.error, // e : e.error,
// workspaceId : plugin.workspaceId // workspaceId : plugin.workspaceId
// }; // };
//
// emit("error", errorInfo); // emit("error", errorInfo);
//
// http.request("/api/debug", { // http.request("/api/debug", {
// method : "POST", // method : "POST",
// contentType : "application/json", // contentType : "application/json",
// body : errorInfo // body : errorInfo
// }, function(err) { // }, function(err) {
// if (err) console.error(err); // if (err) console.error(err);
// }); // });
// }); // });
} }
} }
@ -87,8 +87,11 @@ define(function(require, exports, module) {
// }); // });
} }
function reportError(exception) { function reportError(exception, customData) {
console.error(exception.stack || exception); if (customData)
console.error(exception, customData);
else
console.error(exception.stack || exception);
submitError(exception); submitError(exception);
} }
@ -98,6 +101,10 @@ define(function(require, exports, module) {
load(); load();
}); });
plugin.on("unload", function(){
loaded = false;
});
/***** Register and define API *****/ /***** Register and define API *****/
plugin.freezePublicAPI({ plugin.freezePublicAPI({

Wyświetl plik

@ -158,6 +158,10 @@ define(function(require, exports, module) {
if (!/(https?|ftp|file):/.test(href)) { if (!/(https?|ftp|file):/.test(href)) {
href = "http://" + 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) if (e.metaKey || e.ctrlKey)
window.open(href); window.open(href);
else else

Wyświetl plik

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