diff --git a/arangod/RestHandler/RestDocumentHandler.cpp b/arangod/RestHandler/RestDocumentHandler.cpp index cae2c8951e..e7d324234f 100644 --- a/arangod/RestHandler/RestDocumentHandler.cpp +++ b/arangod/RestHandler/RestDocumentHandler.cpp @@ -172,7 +172,7 @@ HttpHandler::status_e RestDocumentHandler::execute () { /// @RESTHEADER{POST /_api/document,creates a document} /// /// @RESTBODYPARAM{document,json,required} -/// A JSON representation of document. +/// A JSON representation of the document. /// /// @RESTQUERYPARAMETERS /// @@ -839,6 +839,9 @@ bool RestDocumentHandler::checkDocument () { /// /// @RESTHEADER{PUT /_api/document/`document-handle`,replaces a document} /// +/// @RESTBODYPARAM{document,json,required} +/// A JSON representation of the new document. +/// /// @RESTURLPARAMETERS /// /// @RESTURLPARAM{document-handle,string,required} @@ -1054,6 +1057,9 @@ bool RestDocumentHandler::replaceDocument () { /// /// @RESTHEADER{PATCH /_api/document/`document-handle`,patches a document} /// +/// @RESTBODYPARAM{document,json,required} +/// A JSON representation of the new document. +/// /// @RESTURLPARAMETERS /// /// @RESTURLPARAM{document-handle,string,required} diff --git a/html/admin/css/collectionsItemView.css b/html/admin/css/collectionsItemView.css index bff3a8148b..37b3921d67 100644 --- a/html/admin/css/collectionsItemView.css +++ b/html/admin/css/collectionsItemView.css @@ -1,6 +1,6 @@ .span3 { min-height:100px; - width: 280px; + width: 230px; margin-left: 8px !important; margin-bottom: 8px !important; border: 0px; @@ -20,7 +20,7 @@ white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; - width: 264px; + width: 214px; color: #fff; border: 0; background:#676665; diff --git a/html/admin/css/dashboardView.css b/html/admin/css/dashboardView.css index a2fa04f049..72f0a279ca 100644 --- a/html/admin/css/dashboardView.css +++ b/html/admin/css/dashboardView.css @@ -22,8 +22,8 @@ .group-close, .group-open { float:right; - margin-top: 17px !important; - margin-right: 7px !important; + margin-top: 18px !important; + margin-right: 25px !important; } .db-zoom, .db-minimize, .db-hide, .db-info, #detailReplicationMinimize{ @@ -42,9 +42,10 @@ } .statGroups { + margin-top: 10px !important; margin-left: 0px; float:left; - width: 100%; + width: 100% !important; margin-bottom: -15px !important; } @@ -61,21 +62,20 @@ .statSingleClient { height: 300px; - width: 99.7%; + width: 100% !important; margin-top: 10px; margin-left: 10px !important; - margin-right: 11px; + margin-right: 11px !important; margin-bottom: 0px !important; - border: 1px solid black; background-color: #F4F3F3; } .statClient { float: left; height: 70px; - width: 203px; - margin-left: 9px; - margin-bottom: 12px; + width: 230px; + margin-left: 8px !important; + margin-bottom: 4px !important; border: 1px solid black; background-color: #F4F3F3; } @@ -106,8 +106,7 @@ margin-top: 0 !important; padding-top: 0 !important; height: 140px; - /*width: 255px;*/ - width: 272px; + width: 300px; } .svgDetailClass { @@ -136,16 +135,23 @@ margin-bottom: -15px !important; } -.statsHeader { +#statsHeaderDiv { + margin-bottom: 16px; margin-top: 12px; - margin-left: 10px; - margin-right: 10px; - width: 100%; - background-color: #686766; + margin-right: 20px !important; + margin-left: 8px !important; + padding: 0 !important; + height: 24px !important; + width: auto !important; color: white; height: 36px; } +.statsHeader { + width: 100%; + background-color: #686766 !important; +} + #dashboardHeader { background-color: #686766; border-bottom: 1px solid #A0A0A0; @@ -278,6 +284,7 @@ #detailReplicationDiv { padding-top: 26px; + padding-right: 20px; } #detailReplicationDiv table { @@ -319,9 +326,15 @@ #leftReplicationDiv table, #rightReplicationDiv table { width: 100%; + padding-right: 10px !important; } -#leftReplicationDiv table tr, #rightReplicationDiv table tr{ +#leftReplicationDiv table td, #rightReplicationDiv table td { + padding-top: 4px; + padding-bottom: 5px; +} + +#leftReplicationDiv table tr, #rightReplicationDiv table tr { background-color: #F9F9F9 !important; padding-top: 3px; padding-bottom: 3px; @@ -335,11 +348,12 @@ width: 100%; min-height: 150px; margin-bottom: 8px; + margin-right: 10px; margin-top: -20px; } .alignLeft { - width: 200px !important; + width: 240px !important; text-align:left !important; padding-left: 7px; } @@ -405,7 +419,11 @@ } #detailReplication { - background-color: #D9D5D1 !important; + margin-right: 20px; + background-color: transparent !important; border: 0 !important; } +#detailGraphPadding { + padding-right: 33px !important; +} diff --git a/html/admin/css/foxxView.css b/html/admin/css/foxxView.css index 82d279e791..5d2089e42f 100644 --- a/html/admin/css/foxxView.css +++ b/html/admin/css/foxxView.css @@ -11,12 +11,19 @@ } .foxxDescription { - width:170px; + margin-top: -15px; + width:140px; + height: 90px; float: left; text-align: left; word-wrap: break-word; } +#availableList .foxxDescription { + margin-top: 8px !important; + height: 60px !important; +} + .foxxIcon { width:64px; height:64px; diff --git a/html/admin/css/layout.css b/html/admin/css/layout.css index 07a1fc7d97..aa4c583e2f 100644 --- a/html/admin/css/layout.css +++ b/html/admin/css/layout.css @@ -242,7 +242,10 @@ table .sorting { } .marginRight10 { - padding-right: 33px !important; + padding-left: 10px !important; + padding-top: 10px !important; + padding-bottom: 10px !important; + padding-right: 0px !important; } .form-actions { diff --git a/html/admin/index.html b/html/admin/index.html index 57d5c7ecd3..6add6e9ea8 100644 --- a/html/admin/index.html +++ b/html/admin/index.html @@ -8,7 +8,7 @@ - + diff --git a/html/admin/js/templates/dashboardView.ejs b/html/admin/js/templates/dashboardView.ejs index cc436ff734..1e95a33296 100644 --- a/html/admin/js/templates/dashboardView.ejs +++ b/html/admin/js/templates/dashboardView.ejs @@ -127,6 +127,7 @@

Detail Chart

+
  • User Time
    @@ -135,5 +136,6 @@
  • +
    diff --git a/html/admin/js/views/dashboardView.js b/html/admin/js/views/dashboardView.js index 39f0c97d37..474afcb8c4 100644 --- a/html/admin/js/views/dashboardView.js +++ b/html/admin/js/views/dashboardView.js @@ -211,7 +211,7 @@ var dashboardView = Backbone.View.extend({ $('.thumbnails').append( ''); //group diff --git a/html/admin/js/views/navigationView.js b/html/admin/js/views/navigationView.js index a8111c2f5c..5603498304 100644 --- a/html/admin/js/views/navigationView.js +++ b/html/admin/js/views/navigationView.js @@ -24,7 +24,9 @@ var navigationView = Backbone.View.extend({ //padding row 40px var containerWidth = $(window).width() - 70; //var spanWidth = $('.span3').outerWidth(true); - var spanWidth = 292; + var test = $('.span3').outerWidth(true); + console.log(test); + var spanWidth = 242; var divider = containerWidth / spanWidth; var roundDiv = parseInt(divider, 10); diff --git a/js/apps/aardvark/lib/foxxes.js b/js/apps/aardvark/lib/foxxes.js index 0862789a1e..86c20a2079 100644 --- a/js/apps/aardvark/lib/foxxes.js +++ b/js/apps/aardvark/lib/foxxes.js @@ -88,7 +88,7 @@ exports.Foxxes = function () { // Define the functionality to display all foxxes this.viewAll = function () { - return aal.toArray(); + return aal.toArray().concat(foxxmanager.developmentMounts()); }; // Define the functionality to update one foxx. diff --git a/js/apps/aardvark/lib/swagger.js b/js/apps/aardvark/lib/swagger.js index 6e87ed2d7b..c4cccf12b8 100644 --- a/js/apps/aardvark/lib/swagger.js +++ b/js/apps/aardvark/lib/swagger.js @@ -66,17 +66,27 @@ exports.Swagger = function () { this.listOne = function(basePath, key) { var result = {}, - res = _aal.document(key); + res; + + if (key.substr(0, 4) === "dev:") { + res = "/dev/" + key.split(":")[2]; + } + else { + res = _aal.document(key).mount; + } + result.swaggerVersion = "1.1"; result.basePath = basePath; + result.apis = [ - {path: res.mount} + {path: res} ]; + return result; }, // Get details of one specific installed foxx. - this.show = function(appname) { + this.show = function(mount) { var result = {}, apis = [], pathes, @@ -85,25 +95,22 @@ exports.Swagger = function () { url, api, ops, - foxxApp = _aal.firstExample({"mount": appname}), app, - list; - if (!foxxApp.development) { - list = foxx_manager.appRoutes(); - } else { - list = foxx_manager.developmentRoutes(); - } + list = foxx_manager.appRoutes().concat(foxx_manager.developmentRoutes()); + _.each(list, function(r) { var ac = r.appContext; - if (ac.appId === foxxApp.app && ac.mount === foxxApp.mount) { + if (ac.mount === mount) { app = r; return; } }); + result.swaggerVersion = "1.1"; result.basePath = app.urlPrefix; result.apis = apis; pathes = app.routes; + for (i in pathes) { if (pathes[i].url.methods !== undefined) { url = pathes[i].url.match; @@ -116,6 +123,7 @@ exports.Swagger = function () { apis.push(api); } } + return result; } }; diff --git a/js/server/modules/org/arangodb/foxx-manager.js b/js/server/modules/org/arangodb/foxx-manager.js index 81f004e799..b4303a6c3b 100644 --- a/js/server/modules/org/arangodb/foxx-manager.js +++ b/js/server/modules/org/arangodb/foxx-manager.js @@ -37,6 +37,16 @@ var executeGlobalContextFunction = require("internal").executeGlobalContextFunct var checkParameter = arangodb.checkParameter; var transformScript = require("org/arangodb/foxx/transformer").transform; +// ----------------------------------------------------------------------------- +// --SECTION-- private variables +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief development mounts +//////////////////////////////////////////////////////////////////////////////// + +var DEVELOPMENTMOUNTS = null; + // ----------------------------------------------------------------------------- // --SECTION-- private functions // ----------------------------------------------------------------------------- @@ -1013,6 +1023,7 @@ exports.appRoutes = function () { exports.developmentRoutes = function () { 'use strict'; + var mounts = []; var routes = []; var root = module.devAppPath(); @@ -1029,7 +1040,7 @@ exports.developmentRoutes = function () { var appId = "dev:" + mf.name + ":" + files[j]; var mount = "/dev/" + files[j]; var options = { - prefix : prefixFromMount(mount) || undefined + prefix : prefixFromMount(mount) }; var app = module.createApp(appId, options); @@ -1050,6 +1061,23 @@ exports.developmentRoutes = function () { routes.push(r); console.log("Mounted dev app '%s' on '%s'", appId, mount); + + var desc = { + _id: "dev/" + app._id, + _key: app._id, + type: "mount", + app: app._id, + name: app._name, + description: app._manifest.description, + author: app._manifest.author, + mount: mount, + active: true, + collectionPrefix: options.prefix, + isSystem: app._manifest.isSystem || false, + options: options + }; + + mounts.push(desc); } catch (err) { console.error("Cannot read app manifest '%s': %s", m, String(err.stack || err)); @@ -1057,9 +1085,27 @@ exports.developmentRoutes = function () { } } + DEVELOPMENTMOUNTS = mounts; + return routes; }; +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the development mounts +/// +/// Must be called after developmentRoutes. +//////////////////////////////////////////////////////////////////////////////// + +exports.developmentMounts = function () { + 'use strict'; + + if (DEVELOPMENTMOUNTS === null) { + exports.developmentRoutes(); + } + + return DEVELOPMENTMOUNTS; +}; + // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE // -----------------------------------------------------------------------------