kopia lustrzana https://github.com/c9/core
Revert "Merge pull request +6709 from c9/metrics-plugin"
Needs VFS release, but can't do that just yet This reverts commitpull/64/headdfe60b63c1
, reversing changes made to7615553051
.
rodzic
5bdd6c100d
commit
b62b3ff079
|
@ -156,10 +156,6 @@ module.exports = function(options) {
|
||||||
staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic",
|
staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic",
|
||||||
defaultShow: options.local
|
defaultShow: options.local
|
||||||
},
|
},
|
||||||
{
|
|
||||||
packagePath: "plugins/c9.ide.metrics/metrics",
|
|
||||||
hosted: hosted
|
|
||||||
},
|
|
||||||
|
|
||||||
// Ace && Commands
|
// Ace && Commands
|
||||||
"plugins/c9.ide.keys/commands",
|
"plugins/c9.ide.keys/commands",
|
||||||
|
|
|
@ -150,7 +150,6 @@ module.exports = function(config, optimist) {
|
||||||
"./c9.nodeapi/nodeapi",
|
"./c9.nodeapi/nodeapi",
|
||||||
{
|
{
|
||||||
packagePath: "./c9.vfs.standalone/standalone",
|
packagePath: "./c9.vfs.standalone/standalone",
|
||||||
sdk: config.sdk,
|
|
||||||
local: config.local,
|
local: config.local,
|
||||||
packed: argv.packed,
|
packed: argv.packed,
|
||||||
collab: config.collab,
|
collab: config.collab,
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
"c9.ide.find.infiles": "#1b83cf12f1",
|
"c9.ide.find.infiles": "#1b83cf12f1",
|
||||||
"c9.ide.find.replace": "#e4daf722b8",
|
"c9.ide.find.replace": "#e4daf722b8",
|
||||||
"c9.ide.run.debug": "#638e6b00b3",
|
"c9.ide.run.debug": "#638e6b00b3",
|
||||||
|
"c9.automate": "#86bf1ee1ca",
|
||||||
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
||||||
"c9.ide.ace.gotoline": "#4d1a93172c",
|
"c9.ide.ace.gotoline": "#4d1a93172c",
|
||||||
"c9.ide.ace.keymaps": "#6c4bb65b1f",
|
"c9.ide.ace.keymaps": "#6c4bb65b1f",
|
||||||
|
|
|
@ -75,9 +75,7 @@ define(function(require, exports, module) {
|
||||||
/***** Register and define API *****/
|
/***** Register and define API *****/
|
||||||
|
|
||||||
plugin.freezePublicAPI({
|
plugin.freezePublicAPI({
|
||||||
/** @deprecated Use log() instead. */
|
reportError: reportError
|
||||||
reportError: reportError,
|
|
||||||
log: reportError
|
|
||||||
});
|
});
|
||||||
|
|
||||||
register(null, { "error_handler" : plugin });
|
register(null, { "error_handler" : plugin });
|
||||||
|
|
|
@ -108,9 +108,7 @@ define(function(require, exports, module) {
|
||||||
/***** Register and define API *****/
|
/***** Register and define API *****/
|
||||||
|
|
||||||
plugin.freezePublicAPI({
|
plugin.freezePublicAPI({
|
||||||
/** @deprecated Use log() instead. */
|
reportError: reportError
|
||||||
reportError: reportError,
|
|
||||||
log: reportError
|
|
||||||
});
|
});
|
||||||
|
|
||||||
register(null, { "error_handler" : plugin });
|
register(null, { "error_handler" : plugin });
|
||||||
|
|
|
@ -463,9 +463,7 @@ function isPrimitive(arg) {
|
||||||
exports.isPrimitive = isPrimitive;
|
exports.isPrimitive = isPrimitive;
|
||||||
|
|
||||||
function isBuffer(arg) {
|
function isBuffer(arg) {
|
||||||
// Not relevant outside of node
|
return arg instanceof Buffer;
|
||||||
// return arg instanceof Buffer;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
exports.isBuffer = isBuffer;
|
exports.isBuffer = isBuffer;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
main.consumes = ["Plugin", "auth", "http", "api", "error_handler", "metrics"];
|
main.consumes = ["Plugin", "auth", "http", "api", "error_handler"];
|
||||||
main.provides = ["vfs.endpoint"];
|
main.provides = ["vfs.endpoint"];
|
||||||
return main;
|
return main;
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ define(function(require, exports, module) {
|
||||||
var http = imports.http;
|
var http = imports.http;
|
||||||
var api = imports.api;
|
var api = imports.api;
|
||||||
var errorHandler = imports.error_handler;
|
var errorHandler = imports.error_handler;
|
||||||
var metrics = imports.metrics;
|
|
||||||
|
|
||||||
/***** Initialization *****/
|
/***** Initialization *****/
|
||||||
|
|
||||||
|
@ -169,10 +168,8 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
// just take the first server that doesn't return an error
|
// just take the first server that doesn't return an error
|
||||||
(function tryNext(i) {
|
(function tryNext(i) {
|
||||||
if (i >= servers.length) {
|
if (i >= servers.length)
|
||||||
metrics.increment("connect_failed_all", 1, true);
|
|
||||||
return callback(new Error("Disconnected: Could not reach your workspace. Please try again later."));
|
return callback(new Error("Disconnected: Could not reach your workspace. Please try again later."));
|
||||||
}
|
|
||||||
|
|
||||||
var server = servers[i];
|
var server = servers[i];
|
||||||
auth.request(server.url + "/" + options.pid, {
|
auth.request(server.url + "/" + options.pid, {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
main.consumes = ["Plugin", "ext", "c9", "vfs", "metrics"];
|
main.consumes = ["Plugin", "ext", "c9", "vfs"];
|
||||||
main.provides = ["vfs.ping"];
|
main.provides = ["vfs.ping"];
|
||||||
return main;
|
return main;
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ define(function(require, exports, module) {
|
||||||
var Plugin = imports.Plugin;
|
var Plugin = imports.Plugin;
|
||||||
var c9 = imports.c9;
|
var c9 = imports.c9;
|
||||||
var ext = imports.ext;
|
var ext = imports.ext;
|
||||||
var metrics = imports.metrics;
|
|
||||||
|
|
||||||
/***** Initialization *****/
|
/***** Initialization *****/
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,7 @@
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
main.consumes = [
|
main.consumes = ["Plugin", "auth", "vfs.endpoint", "dialog.error", "dialog.alert", "error_handler"];
|
||||||
"Plugin", "auth", "vfs.endpoint", "dialog.error",
|
|
||||||
"dialog.alert", "error_handler", "metrics"
|
|
||||||
];
|
|
||||||
main.provides = ["vfs"];
|
main.provides = ["vfs"];
|
||||||
return main;
|
return main;
|
||||||
|
|
||||||
|
@ -37,7 +34,6 @@ define(function(require, exports, module) {
|
||||||
var hideError = errorDialog.hide;
|
var hideError = errorDialog.hide;
|
||||||
var showAlert = imports["dialog.alert"].show;
|
var showAlert = imports["dialog.alert"].show;
|
||||||
var errorHandler = imports.error_handler;
|
var errorHandler = imports.error_handler;
|
||||||
var metrics = imports.metrics;
|
|
||||||
|
|
||||||
var eio = require("engine.io");
|
var eio = require("engine.io");
|
||||||
var Consumer = require("vfs-socket/consumer").Consumer;
|
var Consumer = require("vfs-socket/consumer").Consumer;
|
||||||
|
@ -54,7 +50,7 @@ define(function(require, exports, module) {
|
||||||
var plugin = new Plugin("Ajax.org", main.consumes);
|
var plugin = new Plugin("Ajax.org", main.consumes);
|
||||||
var emit = plugin.getEmitter();
|
var emit = plugin.getEmitter();
|
||||||
|
|
||||||
// Give reference to vfs to plugins
|
// Give reference to vfs to plugin
|
||||||
errorDialog.vfs = plugin;
|
errorDialog.vfs = plugin;
|
||||||
|
|
||||||
var buffer = [];
|
var buffer = [];
|
||||||
|
@ -213,7 +209,6 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
vfsEndpoint.get(protocolVersion, function(err, urls) {
|
vfsEndpoint.get(protocolVersion, function(err, urls) {
|
||||||
if (err) {
|
if (err) {
|
||||||
metrics.increment("connect_failed", 1, true);
|
|
||||||
if (!showErrorTimer) {
|
if (!showErrorTimer) {
|
||||||
showErrorTimer = setTimeout(function() {
|
showErrorTimer = setTimeout(function() {
|
||||||
showVfsError(showErrorTimerMessage);
|
showVfsError(showErrorTimerMessage);
|
||||||
|
|
|
@ -48,7 +48,7 @@ function plugin(options, imports, register) {
|
||||||
imports.connect.use(api);
|
imports.connect.use(api);
|
||||||
|
|
||||||
api.get("/", function(req, res, next) {
|
api.get("/", function(req, res, next) {
|
||||||
res.writeHead(302, { "Location": options.sdk ? "/ide.html" : "/static/places.html" });
|
res.writeHead(302, { "Location": "/ide.html" });
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -407,10 +407,6 @@ require([
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"metrics": {
|
|
||||||
getLastPing: function() { throw Error("Not implemented"); },
|
|
||||||
getLastest: function() { throw Error("Not implemented"); },
|
|
||||||
},
|
|
||||||
error_handler: {reportError: function(){}},
|
error_handler: {reportError: function(){}},
|
||||||
installer: {
|
installer: {
|
||||||
show: function(){}
|
show: function(){}
|
||||||
|
|
|
@ -11,7 +11,6 @@ module.exports = function(manifest, installPath) {
|
||||||
var builders = require("../plugins/c9.ide.run.build/builders_list");
|
var builders = require("../plugins/c9.ide.run.build/builders_list");
|
||||||
|
|
||||||
var workspaceDir = path.resolve(__dirname + "/../");
|
var workspaceDir = path.resolve(__dirname + "/../");
|
||||||
var sdk = !manifest.sdk;
|
|
||||||
|
|
||||||
if (process.platform == "win32" && process.env.HOME === undefined) {
|
if (process.platform == "win32" && process.env.HOME === undefined) {
|
||||||
process.env.HOME = process.env.HOMEDRIVE + process.env.HOMEPATH;
|
process.env.HOME = process.env.HOMEDRIVE + process.env.HOMEPATH;
|
||||||
|
@ -38,7 +37,6 @@ module.exports = function(manifest, installPath) {
|
||||||
home: home,
|
home: home,
|
||||||
uid: "-1",
|
uid: "-1",
|
||||||
dev: true,
|
dev: true,
|
||||||
sdk: sdk,
|
|
||||||
pid: process.pid,
|
pid: process.pid,
|
||||||
port: process.env.PORT || 8181,
|
port: process.env.PORT || 8181,
|
||||||
host: process.env.IP || "0.0.0.0",
|
host: process.env.IP || "0.0.0.0",
|
||||||
|
|
Ładowanie…
Reference in New Issue