Merge pull request +13099 from c9/revert-13098-revert-13046-multi-api-docker-create-issues

[FIXME] Fix, help debug workspace creation issues
This commit is contained in:
Lennart C. L. Kats 2016-03-29 17:39:15 +02:00
commit ab2c5d55c0
4 changed files with 17 additions and 5 deletions

6
node_modules/c9/rest_client.js generated vendored
View File

@ -44,7 +44,11 @@ function RestClient(host, port, config) {
port: port,
path: path,
method: method,
headers: headers
headers: headers,
timeout: config.timeout || 60 * 1000,
pool: config.pool || {
maxSockets: 100000,
},
};
if (config.username)
options.auth = config.username + ":" + config.password;

View File

@ -26,6 +26,8 @@ define(function(require, module, exports) {
/***** Methods *****/
function show(title, header, msg, onhide, options) {
options = options || {};
metrics.increment("dialog.error");
return plugin.queue(function(){
@ -37,13 +39,15 @@ define(function(require, module, exports) {
else {
plugin.title = title;
}
plugin.heading = options && options.isHTML ? header : util.escapeXml(header);
plugin.body = options && options.isHTML ? msg : (util.escapeXml(msg) || "")
plugin.heading = options.isHTML ? header : util.escapeXml(header);
plugin.body = options.isHTML ? msg : (util.escapeXml(msg) || "")
.replace(/\n/g, "<br />")
.replace(/(https?:\/\/[^\s]*\b)/g, "<a href='$1' target='_blank'>$1</a>");
plugin.getElement("ok").setCaption(options.yes || "OK");
plugin.update([
{ id: "dontshow", visible: options && options.showDontShow }
{ id: "dontshow", visible: options.showDontShow }
]);
plugin.once("hide", function(){

View File

@ -225,6 +225,10 @@ define(function(require, exports, module) {
callback(fatalError(res.error.message, "dashboard"));
return;
}
else if (err.code == 404) {
callback(fatalError("This workspace no longer appears to exist or failed to be created.", "dashboard"));
return;
}
else if (err.code === 428 && res.error) {
emit("restore", {
projectState: res.error.projectState,

View File

@ -253,7 +253,7 @@ define(function(require, exports, module) {
err.message = "SSH permission denied. Please review your workspace configuration.";
return showAlert("Workspace Error", "Unable to access your workspace", err.message, function() {
window.location = dashboardUrl;
});
}, { yes: "Return to dashboard" });
case "reload":
lastError = showError(err.message + ". Please reload this window.", -1);
setTimeout(function() {