diff --git a/Documentation/Books/Users/NewFeatures/NewFeatures26.mdpp b/Documentation/Books/Users/NewFeatures/NewFeatures26.mdpp index f298fd07ad..e48c1a7a0d 100644 --- a/Documentation/Books/Users/NewFeatures/NewFeatures26.mdpp +++ b/Documentation/Books/Users/NewFeatures/NewFeatures26.mdpp @@ -158,12 +158,45 @@ RETURN { found: OLD, updated: NEW } A more detailed description of `UPSERT` can be found here: http://jsteemann.github.io/blog/2015/03/27/preview-of-the-upsert-command/ -!SECTION Web Interface +!SECTION Web Admin Interface -There have been some minor changes in the web interface: +There have been some minor changes in the web admin interface: - The query execution time is displayed in the AQL editor now - The AQL query button **submit** is now renamed to **execute** - We've added a query explain feature in the AQL editor - We've added a demo page. This only is shown if demo data is available otherwise it is hidden -- ArangoDB's built-in web interface now uses sessions. Session information ids are stored in cookies, so clients using the web interface must accept cookies in order to use it +- ArangoDB's built-in web interface now uses sessions. Session information is stored in cookies, so clients using the web interface must accept cookies in order to use it + +!SECTION Foxx improvements + +!SUBSECTION Configuration and Dependencies + +Foxx app manifests can now define configuration options, as well as dependencies on other Foxx apps. + +An introduction to Foxx configurations can be found in the blog: +https://www.arangodb.com/2015/05/reusable-foxx-apps-with-configurations/ + +And the blog post on Foxx dependencies can be found here: +https://www.arangodb.com/2015/05/foxx-dependencies-for-more-composable-foxx-apps/ + +For more information on manifests see the [Manifest chapter](../Foxx/Develop/Manifest.html). More information on using dependencies can be found in the chapter on [Foxx exports](../Foxx/Advanced/Exports.html). + +!SUBSECTION Mocha Tests + +You can now write tests for your Foxx apps using the Mocha testing framework: +https://www.arangodb.com/2015/04/testing-foxx-mocha/ + +A recipe for writing tests for your Foxx apps can be found in the cookbook: +https://docs.arangodb.com/cookbook/FoxxTesting.html + +!SUBSECTION API Documentation + +The API documentation has been updated to Swagger 2. You can now also mount API documentation in your own Foxx apps. For more information see the [API Documentation chapter](../Foxx/Develop/ApiDocumentation.html) in the Foxx documentation. + +Also see the blog post introducing this feature: +https://www.arangodb.com/2015/05/document-your-foxx-apps-with-swagger-2/ + +!SUBSECTION Custom Scripts + +In addition to the existing *setup* and *teardown* scripts you can now define custom scripts in your Foxx manifest and invoke these using the web admin interface or the Foxx manager CLI. \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/client/client.js b/js/apps/system/_admin/aardvark/APP/frontend/js/client/client.js index a83b0f82c1..94d73400ed 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/client/client.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/client/client.js @@ -141,8 +141,7 @@ global.tutorial = require("org/arangodb/tutorial"); /// @brief prints help //////////////////////////////////////////////////////////////////////////////// -window.initHelp = function() { - "use strict"; +(function() { var internal = require("internal"); if (internal.db) { @@ -153,6 +152,8 @@ window.initHelp = function() { } if (internal.quiet !== true) { + require("org/arangodb").checkAvailableVersions(); + if (internal.arango && internal.arango.isConnected && internal.arango.isConnected()) { internal.print("Type 'tutorial' for a tutorial or 'help' to see common examples"); } @@ -193,7 +194,7 @@ window.initHelp = function() { delete global.IS_UNIT_TESTS; delete global.IS_JS_LINT; } catch (e) {} -}; +}()); // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb-common.js b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb-common.js index 4ad425f86f..098f60d504 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb-common.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb-common.js @@ -495,6 +495,52 @@ exports.checkParameter = function (usage, descs, vars) { } }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief generate info message for newer version(s) available +//////////////////////////////////////////////////////////////////////////////// + +exports.checkAvailableVersions = function (version) { + var console = require("console"); + var log; + + if (require("org/arangodb").isServer) { + log = console.info; + } + else { + log = internal.print; + } + + if (version === undefined) { + version = internal.version; + } + + if (version.match(/beta|alpha|preview|devel/) !== null) { + log("Your are using an alpha/beta/preview version ('" + version + "') of ArangoDB"); + return; + } + + try { + var u = "https://www.arangodb.com/repositories/versions.php?version="; + var d = internal.download(u + version, "", {timeout: 300}); + var v = JSON.parse(d.body); + + if (v.hasOwnProperty("bugfix")) { + log("Please note that a new bugfix version '" + v.bugfix.version + "' is available"); + } + + if (v.hasOwnProperty("minor")) { + log("Please note that a new minor version '" + v.minor.version + "' is available"); + } + + if (v.hasOwnProperty("major")) { + log("Please note that a new major version '" + v.major.version + "' is available"); + } + } + catch (err) { + console.debug("cannot check for newer version: ", err.stack); + } +}; + // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE // ----------------------------------------------------------------------------- diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb.js b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb.js index 181c8fde54..38216585b1 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/modules/org/arangodb.js @@ -39,6 +39,18 @@ Object.keys(common).forEach(function (key) { // --SECTION-- MODULE EXPORTS // ----------------------------------------------------------------------------- +//////////////////////////////////////////////////////////////////////////////// +/// @brief isServer +//////////////////////////////////////////////////////////////////////////////// + +exports.isServer = false; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief isClient +//////////////////////////////////////////////////////////////////////////////// + +exports.isClient = true; + //////////////////////////////////////////////////////////////////////////////// /// @brief class "ArangoCollection" ////////////////////////////////////////////////////////////////////////////////