1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Michael Hackstein 2013-08-07 13:58:55 +02:00
commit 4ec5fe71eb
12 changed files with 132 additions and 40 deletions

View File

@ -172,7 +172,7 @@ HttpHandler::status_e RestDocumentHandler::execute () {
/// @RESTHEADER{POST /_api/document,creates a document} /// @RESTHEADER{POST /_api/document,creates a document}
/// ///
/// @RESTBODYPARAM{document,json,required} /// @RESTBODYPARAM{document,json,required}
/// A JSON representation of document. /// A JSON representation of the document.
/// ///
/// @RESTQUERYPARAMETERS /// @RESTQUERYPARAMETERS
/// ///
@ -839,6 +839,9 @@ bool RestDocumentHandler::checkDocument () {
/// ///
/// @RESTHEADER{PUT /_api/document/`document-handle`,replaces a document} /// @RESTHEADER{PUT /_api/document/`document-handle`,replaces a document}
/// ///
/// @RESTBODYPARAM{document,json,required}
/// A JSON representation of the new document.
///
/// @RESTURLPARAMETERS /// @RESTURLPARAMETERS
/// ///
/// @RESTURLPARAM{document-handle,string,required} /// @RESTURLPARAM{document-handle,string,required}
@ -1054,6 +1057,9 @@ bool RestDocumentHandler::replaceDocument () {
/// ///
/// @RESTHEADER{PATCH /_api/document/`document-handle`,patches a document} /// @RESTHEADER{PATCH /_api/document/`document-handle`,patches a document}
/// ///
/// @RESTBODYPARAM{document,json,required}
/// A JSON representation of the new document.
///
/// @RESTURLPARAMETERS /// @RESTURLPARAMETERS
/// ///
/// @RESTURLPARAM{document-handle,string,required} /// @RESTURLPARAM{document-handle,string,required}

View File

@ -1,6 +1,6 @@
.span3 { .span3 {
min-height:100px; min-height:100px;
width: 280px; width: 230px;
margin-left: 8px !important; margin-left: 8px !important;
margin-bottom: 8px !important; margin-bottom: 8px !important;
border: 0px; border: 0px;
@ -20,7 +20,7 @@
white-space: nowrap !important; white-space: nowrap !important;
overflow: hidden !important; overflow: hidden !important;
text-overflow: ellipsis !important; text-overflow: ellipsis !important;
width: 264px; width: 214px;
color: #fff; color: #fff;
border: 0; border: 0;
background:#676665; background:#676665;

View File

@ -22,8 +22,8 @@
.group-close, .group-open { .group-close, .group-open {
float:right; float:right;
margin-top: 17px !important; margin-top: 18px !important;
margin-right: 7px !important; margin-right: 25px !important;
} }
.db-zoom, .db-minimize, .db-hide, .db-info, #detailReplicationMinimize{ .db-zoom, .db-minimize, .db-hide, .db-info, #detailReplicationMinimize{
@ -42,9 +42,10 @@
} }
.statGroups { .statGroups {
margin-top: 10px !important;
margin-left: 0px; margin-left: 0px;
float:left; float:left;
width: 100%; width: 100% !important;
margin-bottom: -15px !important; margin-bottom: -15px !important;
} }
@ -61,21 +62,20 @@
.statSingleClient { .statSingleClient {
height: 300px; height: 300px;
width: 99.7%; width: 100% !important;
margin-top: 10px; margin-top: 10px;
margin-left: 10px !important; margin-left: 10px !important;
margin-right: 11px; margin-right: 11px !important;
margin-bottom: 0px !important; margin-bottom: 0px !important;
border: 1px solid black;
background-color: #F4F3F3; background-color: #F4F3F3;
} }
.statClient { .statClient {
float: left; float: left;
height: 70px; height: 70px;
width: 203px; width: 230px;
margin-left: 9px; margin-left: 8px !important;
margin-bottom: 12px; margin-bottom: 4px !important;
border: 1px solid black; border: 1px solid black;
background-color: #F4F3F3; background-color: #F4F3F3;
} }
@ -106,8 +106,7 @@
margin-top: 0 !important; margin-top: 0 !important;
padding-top: 0 !important; padding-top: 0 !important;
height: 140px; height: 140px;
/*width: 255px;*/ width: 300px;
width: 272px;
} }
.svgDetailClass { .svgDetailClass {
@ -136,16 +135,23 @@
margin-bottom: -15px !important; margin-bottom: -15px !important;
} }
.statsHeader { #statsHeaderDiv {
margin-bottom: 16px;
margin-top: 12px; margin-top: 12px;
margin-left: 10px; margin-right: 20px !important;
margin-right: 10px; margin-left: 8px !important;
width: 100%; padding: 0 !important;
background-color: #686766; height: 24px !important;
width: auto !important;
color: white; color: white;
height: 36px; height: 36px;
} }
.statsHeader {
width: 100%;
background-color: #686766 !important;
}
#dashboardHeader { #dashboardHeader {
background-color: #686766; background-color: #686766;
border-bottom: 1px solid #A0A0A0; border-bottom: 1px solid #A0A0A0;
@ -278,6 +284,7 @@
#detailReplicationDiv { #detailReplicationDiv {
padding-top: 26px; padding-top: 26px;
padding-right: 20px;
} }
#detailReplicationDiv table { #detailReplicationDiv table {
@ -319,9 +326,15 @@
#leftReplicationDiv table, #rightReplicationDiv table { #leftReplicationDiv table, #rightReplicationDiv table {
width: 100%; 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; background-color: #F9F9F9 !important;
padding-top: 3px; padding-top: 3px;
padding-bottom: 3px; padding-bottom: 3px;
@ -335,11 +348,12 @@
width: 100%; width: 100%;
min-height: 150px; min-height: 150px;
margin-bottom: 8px; margin-bottom: 8px;
margin-right: 10px;
margin-top: -20px; margin-top: -20px;
} }
.alignLeft { .alignLeft {
width: 200px !important; width: 240px !important;
text-align:left !important; text-align:left !important;
padding-left: 7px; padding-left: 7px;
} }
@ -405,7 +419,11 @@
} }
#detailReplication { #detailReplication {
background-color: #D9D5D1 !important; margin-right: 20px;
background-color: transparent !important;
border: 0 !important; border: 0 !important;
} }
#detailGraphPadding {
padding-right: 33px !important;
}

View File

@ -11,12 +11,19 @@
} }
.foxxDescription { .foxxDescription {
width:170px; margin-top: -15px;
width:140px;
height: 90px;
float: left; float: left;
text-align: left; text-align: left;
word-wrap: break-word; word-wrap: break-word;
} }
#availableList .foxxDescription {
margin-top: 8px !important;
height: 60px !important;
}
.foxxIcon { .foxxIcon {
width:64px; width:64px;
height:64px; height:64px;

View File

@ -242,7 +242,10 @@ table .sorting {
} }
.marginRight10 { .marginRight10 {
padding-right: 33px !important; padding-left: 10px !important;
padding-top: 10px !important;
padding-bottom: 10px !important;
padding-right: 0px !important;
} }
.form-actions { .form-actions {

View File

@ -8,7 +8,7 @@
<meta name="description" content="ArangoDB Admin Web Interface"> <meta name="description" content="ArangoDB Admin Web Interface">
<meta name="author" content="Heiko Kernbach"> <meta name="author" content="Heiko Kernbach">
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> <!-- NO EXTERNAL LINKS link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css' -->
<link href='css/droidsans.css' rel='stylesheet' type='text/css'/> <link href='css/droidsans.css' rel='stylesheet' type='text/css'/>
<link href='css/swagger/hightlight.default.css' media='screen' rel='stylesheet' type='text/css'/> <link href='css/swagger/hightlight.default.css' media='screen' rel='stylesheet' type='text/css'/>

View File

@ -127,6 +127,7 @@
<h4 class="">Detail Chart</h4> <h4 class="">Detail Chart</h4>
</li> </li>
<div id="detailGraphPadding">
<li id="detailGraph" class="statSingleClient"> <li id="detailGraph" class="statSingleClient">
<div class="boxHeader"> <div class="boxHeader">
<h6 id="detailGraphHeader" class="dashboardH6">User Time</h6> <h6 id="detailGraphHeader" class="dashboardH6">User Time</h6>
@ -135,5 +136,6 @@
<svg class="svgDetailClass"/> <svg class="svgDetailClass"/>
</div> </div>
</li> </li>
</div>
</ul> </ul>

View File

@ -211,7 +211,7 @@ var dashboardView = Backbone.View.extend({
$('.thumbnails').append( $('.thumbnails').append(
'<ul class="statGroups" id="' + this.group + '">' + '<ul class="statGroups" id="' + this.group + '">' +
'<i class="group-close icon-minus icon-white"></i>' + '<i class="group-close icon-minus icon-white"></i>' +
'<h4 class="statsHeader">' + this.name + '</h4>' + '<div id="statsHeaderDiv"><h4 class="statsHeader">' + this.name + '</h4></div>' +
'</ul>'); '</ul>');
//group //group

View File

@ -24,7 +24,9 @@ var navigationView = Backbone.View.extend({
//padding row 40px //padding row 40px
var containerWidth = $(window).width() - 70; var containerWidth = $(window).width() - 70;
//var spanWidth = $('.span3').outerWidth(true); //var spanWidth = $('.span3').outerWidth(true);
var spanWidth = 292; var test = $('.span3').outerWidth(true);
console.log(test);
var spanWidth = 242;
var divider = containerWidth / spanWidth; var divider = containerWidth / spanWidth;
var roundDiv = parseInt(divider, 10); var roundDiv = parseInt(divider, 10);

View File

@ -88,7 +88,7 @@ exports.Foxxes = function () {
// Define the functionality to display all foxxes // Define the functionality to display all foxxes
this.viewAll = function () { this.viewAll = function () {
return aal.toArray(); return aal.toArray().concat(foxxmanager.developmentMounts());
}; };
// Define the functionality to update one foxx. // Define the functionality to update one foxx.

View File

@ -66,17 +66,27 @@ exports.Swagger = function () {
this.listOne = function(basePath, key) { this.listOne = function(basePath, key) {
var result = {}, 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.swaggerVersion = "1.1";
result.basePath = basePath; result.basePath = basePath;
result.apis = [ result.apis = [
{path: res.mount} {path: res}
]; ];
return result; return result;
}, },
// Get details of one specific installed foxx. // Get details of one specific installed foxx.
this.show = function(appname) { this.show = function(mount) {
var result = {}, var result = {},
apis = [], apis = [],
pathes, pathes,
@ -85,25 +95,22 @@ exports.Swagger = function () {
url, url,
api, api,
ops, ops,
foxxApp = _aal.firstExample({"mount": appname}),
app, app,
list; list = foxx_manager.appRoutes().concat(foxx_manager.developmentRoutes());
if (!foxxApp.development) {
list = foxx_manager.appRoutes();
} else {
list = foxx_manager.developmentRoutes();
}
_.each(list, function(r) { _.each(list, function(r) {
var ac = r.appContext; var ac = r.appContext;
if (ac.appId === foxxApp.app && ac.mount === foxxApp.mount) { if (ac.mount === mount) {
app = r; app = r;
return; return;
} }
}); });
result.swaggerVersion = "1.1"; result.swaggerVersion = "1.1";
result.basePath = app.urlPrefix; result.basePath = app.urlPrefix;
result.apis = apis; result.apis = apis;
pathes = app.routes; pathes = app.routes;
for (i in pathes) { for (i in pathes) {
if (pathes[i].url.methods !== undefined) { if (pathes[i].url.methods !== undefined) {
url = pathes[i].url.match; url = pathes[i].url.match;
@ -116,6 +123,7 @@ exports.Swagger = function () {
apis.push(api); apis.push(api);
} }
} }
return result; return result;
} }
}; };

View File

@ -37,6 +37,16 @@ var executeGlobalContextFunction = require("internal").executeGlobalContextFunct
var checkParameter = arangodb.checkParameter; var checkParameter = arangodb.checkParameter;
var transformScript = require("org/arangodb/foxx/transformer").transform; var transformScript = require("org/arangodb/foxx/transformer").transform;
// -----------------------------------------------------------------------------
// --SECTION-- private variables
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief development mounts
////////////////////////////////////////////////////////////////////////////////
var DEVELOPMENTMOUNTS = null;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// --SECTION-- private functions // --SECTION-- private functions
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -1013,6 +1023,7 @@ exports.appRoutes = function () {
exports.developmentRoutes = function () { exports.developmentRoutes = function () {
'use strict'; 'use strict';
var mounts = [];
var routes = []; var routes = [];
var root = module.devAppPath(); var root = module.devAppPath();
@ -1029,7 +1040,7 @@ exports.developmentRoutes = function () {
var appId = "dev:" + mf.name + ":" + files[j]; var appId = "dev:" + mf.name + ":" + files[j];
var mount = "/dev/" + files[j]; var mount = "/dev/" + files[j];
var options = { var options = {
prefix : prefixFromMount(mount) || undefined prefix : prefixFromMount(mount)
}; };
var app = module.createApp(appId, options); var app = module.createApp(appId, options);
@ -1050,6 +1061,23 @@ exports.developmentRoutes = function () {
routes.push(r); routes.push(r);
console.log("Mounted dev app '%s' on '%s'", appId, mount); 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) { catch (err) {
console.error("Cannot read app manifest '%s': %s", m, String(err.stack || 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; 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 // --SECTION-- END-OF-FILE
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------