1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
hkernbach 2016-06-03 14:23:48 +02:00
commit 91ff87157d
15 changed files with 119 additions and 181 deletions

View File

@ -81,3 +81,12 @@ file per sharded collection. Note that the data in the data file is
sorted first by shards and within each shard by ascending timestamp. The
structural information of the collection contains the number of shards
and the shard keys.
Note that the version of the arangodump client tool needs to match the version of the
ArangoDB server it connects to. By default, arangodump will produce a dump that can be
restored with the arangorestore tool of the same version. An exception is arangodump
in 3.0, which supports dumping data in a format compatible with ArangoDB 2.8. In order
to produce a 2.8-compatible dump with a 3.0 ArangoDB, please specify the option
`--compat28 true` when invoking arangodump.
unix> arangodump --compat28 true --collection myvalues --output-directory "dump"

View File

@ -141,17 +141,6 @@ describe ArangoDB do
doc.parsed_response['errorNum'].should eq(1700)
end
it "add user, empty username, old API" do
body = "{ \"username\" : \"\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(400)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(true)
doc.parsed_response['code'].should eq(400)
doc.parsed_response['errorNum'].should eq(1700)
end
it "add user, empty username" do
body = "{ \"user\" : \"\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
@ -163,23 +152,6 @@ describe ArangoDB do
doc.parsed_response['errorNum'].should eq(1700)
end
it "add user, no passwd, old API" do
body = "{ \"username\" : \"users-1\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc = ArangoDB.get(api + "/users-1")
doc.code.should eq(200)
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(200)
doc.parsed_response['user'].should eq("users-1")
doc.parsed_response['active'].should eq(true)
end
it "add user, no passwd" do
body = "{ \"user\" : \"users-1\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
@ -197,23 +169,6 @@ describe ArangoDB do
doc.parsed_response['active'].should eq(true)
end
it "add user, username and passwd, old API" do
body = "{ \"username\" : \"users-1\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc = ArangoDB.get(api + "/users-1")
doc.code.should eq(200)
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(200)
doc.parsed_response['user'].should eq("users-1")
doc.parsed_response['active'].should eq(true)
end
it "add user, username and passwd" do
body = "{ \"user\" : \"users-1\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
@ -231,24 +186,6 @@ describe ArangoDB do
doc.parsed_response['active'].should eq(true)
end
it "add user, username passwd, active, extra, old API" do
body = "{ \"username\" : \"users-2\", \"passwd\" : \"fox\", \"active\" : false, \"extra\" : { \"foo\" : true } }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc = ArangoDB.get(api + "/users-2")
doc.code.should eq(200)
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(200)
doc.parsed_response['user'].should eq("users-2")
doc.parsed_response['active'].should eq(false)
doc.parsed_response['extra'].should eq({ "foo" => true })
end
it "add user, username passwd, active, extra" do
body = "{ \"user\" : \"users-2\", \"passwd\" : \"fox\", \"active\" : false, \"extra\" : { \"foo\" : true } }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
@ -267,24 +204,6 @@ describe ArangoDB do
doc.parsed_response['extra'].should eq({ "foo" => true })
end
it "add user, duplicate username, old API" do
body = "{ \"username\" : \"users-1\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(201)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(false)
doc.parsed_response['code'].should eq(201)
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)
doc.code.should eq(400)
doc.headers['content-type'].should eq("application/json; charset=utf-8")
doc.parsed_response['error'].should eq(true)
doc.parsed_response['code'].should eq(400)
doc.parsed_response['errorNum'].should eq(1702)
end
it "add user, duplicate username" do
body = "{ \"user\" : \"users-1\", \"passwd\" : \"fox\" }"
doc = ArangoDB.log_post("#{prefix}-add", api, :body => body)

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@
<section class="info" id="information">
<div class="header">
<div class="header-icon-container">
<img src="foxxes/thumbnail?mount=<%= app.encodedMount() %>" alt="Icon for Service" class="icon" />
<img src="<%= app.thumbnailUrl %>" alt="Icon for Service" class="icon" />
</div>
<div id="hidden_buttons" style="display: none">
<button class="delete button-danger" <%=app.isSystem()?"disabled":""%> >Delete</button>
@ -1067,7 +1067,7 @@ if (list.length > 0) {
<p><% if(n) { %><a><%=n%> <%=v%> <% } %></a></p>
</div></script><script id="foxxActiveView.ejs" type="text/template"><div class="paddingBox">
<div class="borderBox"></div>
<img src="foxxes/thumbnail?mount=<%= model.encodedMount() %>" height="50" width="50" alt="Icon for Service" class="icon">
<img src="<%= model.thumbnailUrl %>" height="50" width="50" alt="Icon for Service" class="icon">
<% if(model.isDevelopment()) { %>
<div class="tileBadge">
<span>
@ -3122,4 +3122,4 @@ var cutByResolution = function (str) {
</div>
<div id="workMonitorContent" class="innerContent">
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img class="arangodbLogo" src="img/arangodb_logo_big.png"></a> <a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a> <a class="version"><span>VERSION:</span><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1464882941006"></script><script src="app.js?version=1464882941006"></script></body></html>
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img class="arangodbLogo" src="img/arangodb_logo_big.png"></a> <a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a> <a class="version"><span>VERSION:</span><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1464955577246"></script><script src="app.js?version=1464955577246"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -149,6 +149,19 @@
window.open(
arangoHelper.databaseUrl("/_admin/aardvark/foxxes/download/zip?mount=" + this.encodedMount())
);
},
fetchThumbnail: function(cb) {
var xhr = new XMLHttpRequest();
xhr.responseType = 'blob';
xhr.onload = function() {
this.thumbnailUrl = URL.createObjectURL(xhr.response);
cb();
}.bind(this);
xhr.onerror = cb;
xhr.open("GET", "foxxes/thumbnail?mount=" + this.encodedMount());
xhr.setRequestHeader('Authorization', 'bearer ' + window.arangoHelper.getCurrentJwt());
xhr.send();
}
});
}());

View File

@ -44,7 +44,7 @@
<section class="info" id="information">
<div class="header">
<div class="header-icon-container">
<img src="foxxes/thumbnail?mount=<%= app.encodedMount() %>" alt="Icon for Service" class="icon" />
<img src="<%= app.thumbnailUrl %>" alt="Icon for Service" class="icon" />
</div>
<div id="hidden_buttons" style="display: none">
<button class="delete button-danger" <%=app.isSystem()?"disabled":""%> >Delete</button>

View File

@ -1,7 +1,7 @@
<script id="foxxActiveView.ejs" type="text/template">
<div class="paddingBox">
<div class="borderBox"></div>
<img src="foxxes/thumbnail?mount=<%= model.encodedMount() %>" height="50" width="50" alt="Icon for Service" class="icon">
<img src="<%= model.thumbnailUrl %>" height="50" width="50" alt="Icon for Service" class="icon">
<% if(model.isDevelopment()) { %>
<div class="tileBadge">
<span>

View File

@ -216,44 +216,46 @@
},
render: function(mode) {
var callback = function(error, db) {
var self = this;
if (error) {
arangoHelper.arangoError("DB","Could not get current database");
}
else {
$(this.el).html(this.template.render({
app: this.model,
db: db,
mode: mode
}));
$.get(this.appUrl(db)).success(function () {
$(".open", this.el).prop('disabled', false);
}.bind(this));
this.updateConfig();
this.updateDeps();
if (mode === 'swagger') {
$.get( "./foxxes/docs/swagger.json?mount=" + encodeURIComponent(this.model.get('mount')), function(data) {
if (Object.keys(data.paths).length < 1) {
self.render('readme');
$('#app-show-swagger').attr('disabled', 'true');
}
});
this.model.fetchThumbnail(function() {
var callback = function(error, db) {
var self = this;
if (error) {
arangoHelper.arangoError("DB","Could not get current database");
}
else {
console.log(this);
$(this.el).html(this.template.render({
app: this.model,
db: db,
mode: mode
}));
$.get(this.appUrl(db)).success(function () {
$(".open", this.el).prop('disabled', false);
}.bind(this));
this.updateConfig();
this.updateDeps();
if (mode === 'swagger') {
$.get( "./foxxes/docs/swagger.json?mount=" + encodeURIComponent(this.model.get('mount')), function(data) {
if (Object.keys(data.paths).length < 1) {
self.render('readme');
$('#app-show-swagger').attr('disabled', 'true');
}
});
}
}
this.breadcrumb();
}.bind(this);
arangoHelper.currentDatabase(callback);
if (_.isEmpty(this.model.get('config'))) {
$('#service-settings').attr('disabled', true);
}
this.breadcrumb();
}.bind(this);
arangoHelper.currentDatabase(callback);
if (_.isEmpty(this.model.get('config'))) {
$('#service-settings').attr('disabled', true);
}
}.bind(this));
return $(this.el);
},

View File

@ -45,54 +45,54 @@
}
},
render: function(){
render: function() {
this.model.fetchThumbnail(function() {
$(this.el).html(this.template.render({
model: this.model
}));
$(this.el).html(this.template.render({
model: this.model
}));
var conf = function() {
if (this.model.needsConfiguration()) {
var conf = function() {
if (this.model.needsConfiguration()) {
if ($(this.el).find('.warning-icons').length > 0) {
$(this.el).find('.warning-icons')
.append('<span class="fa fa-cog" title="Needs configuration"></span>');
if ($(this.el).find('.warning-icons').length > 0) {
$(this.el).find('.warning-icons')
.append('<span class="fa fa-cog" title="Needs configuration"></span>');
}
else {
$(this.el).find('img')
.after(
'<span class="warning-icons"><span class="fa fa-cog" title="Needs configuration"></span></span>'
);
}
}
else {
$(this.el).find('img')
.after(
'<span class="warning-icons"><span class="fa fa-cog" title="Needs configuration"></span></span>'
);
}.bind(this);
var depend = function() {
if (this.model.hasUnconfiguredDependencies()) {
if ($(this.el).find('.warning-icons').length > 0) {
$(this.el).find('.warning-icons')
.append('<span class="fa fa-cubes" title="Unconfigured dependencies"></span>');
}
else {
$(this.el).find('img')
.after(
'<span class="warning-icons"><span class="fa fa-cubes" title="Unconfigured dependencies"></span></span>'
);
}
}
}
}.bind(this);
}.bind(this);
var depend = function() {
if (this.model.hasUnconfiguredDependencies()) {
if ($(this.el).find('.warning-icons').length > 0) {
$(this.el).find('.warning-icons')
.append('<span class="fa fa-cubes" title="Unconfigured dependencies"></span>');
}
else {
$(this.el).find('img')
.after(
'<span class="warning-icons"><span class="fa fa-cubes" title="Unconfigured dependencies"></span></span>'
);
}
}
}.bind(this);
/*isBroken function in model doesnt make sense
var broken = function() {
$(this.el).find('warning-icons')
.append('<span class="fa fa-warning" title="Mount error"></span>');
}.bind(this);
*/
this.model.getConfiguration(conf);
this.model.getDependencies(depend);
/*isBroken function in model doesnt make sense
var broken = function() {
$(this.el).find('warning-icons')
.append('<span class="fa fa-warning" title="Mount error"></span>');
}.bind(this);
*/
this.model.getConfiguration(conf);
this.model.getDependencies(depend);
}.bind(this));
return $(this.el);
}
});

View File

@ -33,11 +33,6 @@
"defaultDocument": "index.html",
"configuration": {
"sessionPruneProb": {
"description": "Probability that dead sessions will be removed from the database for any given request.",
"type": "number",
"default": "0.001"
}
},
"files": {