1
0
Fork 0

added fm.rescan() method

This commit is contained in:
Jan Steemann 2014-01-17 14:04:10 +01:00
parent d7c3ac13c9
commit c7380398d9
4 changed files with 48 additions and 0 deletions

View File

@ -1,6 +1,8 @@
v1.4.6 (XXXX-XX-XX)
-------------------
* added fm.rescan() method for Foxx-Manager
* fixed issue #734: foxx cookie and route problem
* added method `fm.configJson` for arangosh

View File

@ -145,6 +145,24 @@ actions.defineHttp({
}
})
});
////////////////////////////////////////////////////////////////////////////////
/// @brief rescans the FOXX application directory
////////////////////////////////////////////////////////////////////////////////
actions.defineHttp({
url : "_admin/foxx/rescan",
context : "admin",
prefix : false,
callback: easyPostCallback({
body: true,
callback: function (body) {
foxxManager.scanAppDirectory();
return true;
}
})
});
////////////////////////////////////////////////////////////////////////////////
/// @brief sets up a FOXX application

View File

@ -684,6 +684,9 @@ exports.run = function (args) {
exports.mount(args[1], args[2]);
}
}
else if (type === 'rescan') {
exports.rescan();
}
else if (type === 'setup') {
exports.setup(args[1]);
}
@ -822,6 +825,18 @@ exports.fetch = function (type, location, version) {
return arangosh.checkRequestResult(res);
};
////////////////////////////////////////////////////////////////////////////////
/// @brief rescans the FOXX application directory
////////////////////////////////////////////////////////////////////////////////
exports.rescan = function () {
'use strict';
var res = arango.POST("/_admin/foxx/rescan", "");
return arangosh.checkRequestResult(res);
};
////////////////////////////////////////////////////////////////////////////////
/// @brief mounts a FOXX application
////////////////////////////////////////////////////////////////////////////////
@ -1436,6 +1451,8 @@ exports.help = function () {
"setup" : "setup executes the setup script (app must already be mounted)",
"install" : "fetches a foxx application from the central foxx-apps repository, mounts it to a local URL " +
"and sets it up",
"rescan" : "rescans the foxx application directory on the server side (only needed if server-side apps " +
"directory is modified by other processes)",
"replace" : "replaces an aleady existing foxx application with the current local version",
"teardown" : "teardown execute the teardown script (app must be still be mounted)",
"unmount" : "unmounts a mounted foxx application",

View File

@ -823,6 +823,17 @@ exports.scanAppDirectory = function () {
scanDirectory(module.appPath());
};
////////////////////////////////////////////////////////////////////////////////
/// @brief rescans the FOXX application directory
/// this function is a trampoline for scanAppDirectory
/// the shorter function name is only here to keep compatibility with the
/// client-side foxx manager
////////////////////////////////////////////////////////////////////////////////
exports.rescan = function () {
return exports.scanAppDirectory();
};
////////////////////////////////////////////////////////////////////////////////
/// @brief mounts a FOXX application
///