kopia lustrzana https://github.com/c9/core
Merge pull request +11031 from c9/ssh-settings-publish
reload IDE when ssh settings changepull/227/head
commit
024a0f6c34
|
@ -5,7 +5,7 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
main.consumes = [
|
||||
"Plugin", "pubsub", "vfs", "metrics", "vfs.endpoint"
|
||||
"Plugin", "pubsub", "vfs", "metrics", "vfs.endpoint", "dialog.alert"
|
||||
];
|
||||
main.provides = ["vfs.listener"];
|
||||
return main;
|
||||
|
@ -16,6 +16,7 @@ define(function(require, exports, module) {
|
|||
var vfs = imports.vfs;
|
||||
var vfsEndpoint = imports["vfs.endpoint"];
|
||||
var metrics = imports.metrics;
|
||||
var showAlert = imports["dialog.alert"].show;
|
||||
|
||||
/***** Initialization *****/
|
||||
|
||||
|
@ -35,6 +36,20 @@ define(function(require, exports, module) {
|
|||
vfsEndpoint.clearCache();
|
||||
vfs.reconnect();
|
||||
}
|
||||
else if (m.action == "remote_changed") {
|
||||
metrics.increment("vfs.remote_changed", 1, true);
|
||||
vfsEndpoint.clearCache();
|
||||
|
||||
showAlert("Workspace configuration changed!",
|
||||
"The configuration of this workspace has changed.",
|
||||
"Cloud9 will be reloaded in order to activate the changes.",
|
||||
function() {
|
||||
setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue