mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
b7e3e39ba4
|
@ -210,13 +210,6 @@ describe ArangoDB do
|
|||
result["path"].should be_kind_of(String)
|
||||
result["isSystem"].should eq(false)
|
||||
|
||||
# retrieve user for new database
|
||||
doc = ArangoDB.log_get("#{prefix}-create-current", "/_db/#{name}/_api/user/root")
|
||||
doc.code.should eq(200)
|
||||
result = doc.parsed_response
|
||||
result["user"].should eq("root")
|
||||
result["active"].should eq(true)
|
||||
|
||||
doc = ArangoDB.log_delete("#{prefix}-create-current", api + "/#{name}")
|
||||
doc.code.should eq(200)
|
||||
response = doc.parsed_response
|
||||
|
@ -251,7 +244,7 @@ describe ArangoDB do
|
|||
result["isSystem"].should eq(false)
|
||||
|
||||
# retrieve information about user "admin"
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users", "/_db/#{name}/_api/user/admin")
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users", "/_db/_system/_api/user/admin")
|
||||
doc.code.should eq(200)
|
||||
result = doc.parsed_response
|
||||
result["user"].should eq("admin")
|
||||
|
@ -259,16 +252,12 @@ describe ArangoDB do
|
|||
result["extra"]["gender"].should eq("m")
|
||||
|
||||
# retrieve information about user "foxx"
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users", "/_db/#{name}/_api/user/foxx")
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users", "/_db/_system/_api/user/foxx")
|
||||
doc.code.should eq(200)
|
||||
result = doc.parsed_response
|
||||
result["user"].should eq("foxx")
|
||||
result["active"].should eq(false)
|
||||
|
||||
# retrieve information about user "root"
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users", "/_db/#{name}/_api/user/root")
|
||||
doc.code.should eq(404)
|
||||
|
||||
doc = ArangoDB.log_delete("#{prefix}-create-users", api + "/#{name}")
|
||||
doc.code.should eq(200)
|
||||
response = doc.parsed_response
|
||||
|
@ -312,10 +301,6 @@ describe ArangoDB do
|
|||
result["path"].should be_kind_of(String)
|
||||
result["isSystem"].should eq(false)
|
||||
|
||||
# retrieve information about user "root"
|
||||
doc = ArangoDB.log_get("#{prefix}-create-users-invalid", "/_db/#{name}/_api/user/root")
|
||||
doc.code.should eq(404)
|
||||
|
||||
doc = ArangoDB.log_delete("#{prefix}-create-users-invalid", api + "/#{name}")
|
||||
doc.code.should eq(200)
|
||||
response = doc.parsed_response
|
||||
|
|
|
@ -8,7 +8,7 @@ directory= @LOCALSTATEDIR@/lib/arangodb3
|
|||
|
||||
[server]
|
||||
rest-server = false
|
||||
authentication = false
|
||||
authentication = true
|
||||
statistics = false
|
||||
# set number of threads to 1 so we don't have concurrency
|
||||
threads = 1
|
||||
|
|
|
@ -5,4 +5,4 @@ progress = true
|
|||
|
||||
[server]
|
||||
endpoint = tcp://127.0.0.1:8529
|
||||
authentication = false
|
||||
authentication = true
|
||||
|
|
|
@ -4,4 +4,4 @@ progress = true
|
|||
|
||||
[server]
|
||||
endpoint = tcp://127.0.0.1:8529
|
||||
authentication = false
|
||||
authentication = true
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
[server]
|
||||
endpoint = tcp://127.0.0.1:8529
|
||||
authentication = false
|
||||
authentication = true
|
||||
|
|
|
@ -4,4 +4,4 @@ progress = true
|
|||
|
||||
[server]
|
||||
endpoint = tcp://127.0.0.1:8529
|
||||
authentication = false
|
||||
authentication = true
|
||||
|
|
|
@ -3,7 +3,7 @@ pretty-print = true
|
|||
|
||||
[server]
|
||||
endpoint = tcp://127.0.0.1:8529
|
||||
authentication = false
|
||||
authentication = true
|
||||
|
||||
[javascript]
|
||||
startup-directory = @PKGDATADIR@/js
|
||||
|
|
|
@ -50,7 +50,11 @@ function get_api_database (req, res) {
|
|||
if (req.suffix[0] === 'user') {
|
||||
// fetch all databases for the current user
|
||||
// note: req.user may be null if authentication is turned off
|
||||
result = arangodb.db._databases(req.user);
|
||||
if (req.user === null) {
|
||||
result = arangodb.db._databases();
|
||||
} else {
|
||||
result = arangodb.db._databases(req.user);
|
||||
}
|
||||
}
|
||||
else if (req.suffix[0] === 'current') {
|
||||
if (cluster.isCoordinator()) {
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
<div class="dashboard-full-width-chart" id="replication-chart">
|
||||
<div class="dashboard-full-width-chart-inner pure-u">
|
||||
<div class="dashboard-sub-bar"">Replication <span class="state"> updating...</span></div>
|
||||
<div id="repl-numbers" class="dashboard-interior-chart pure-u-1-3">
|
||||
<div id="repl-numbers" class="dashboard-interior-chart pure-u-1-1 pure-u-sm-1-1 pure-u-md-1-3">
|
||||
<div class="inner">
|
||||
<div class="top dashboard-subtitle-bar">Totals</div>
|
||||
<div class="bottom">
|
||||
|
@ -170,7 +170,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="repl-ticks" class="dashboard-interior-chart pure-u-1-3">
|
||||
<div id="repl-ticks" class="dashboard-interior-chart pure-u-1-1 pure-u-sm-1-1 pure-u-md-1-3">
|
||||
<div class="inner">
|
||||
<div class="top dashboard-subtitle-bar">Ticks</div>
|
||||
<div class="bottom">
|
||||
|
@ -193,7 +193,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="repl-progress" class="dashboard-interior-chart pure-u-1-3">
|
||||
<div id="repl-progress" class="dashboard-interior-chart pure-u-1-1 pure-u-sm-1-1 pure-u-md-1-3">
|
||||
<div class="inner">
|
||||
<div class="top dashboard-subtitle-bar">Progress</div>
|
||||
<div class="bottom">
|
||||
|
|
|
@ -36,17 +36,22 @@
|
|||
"insert|update|remove|replace|upsert|options|with|and|or|not|" +
|
||||
"distinct|graph|outbound|inbound|any|all|none|aggregate|like|count|shortest_path",
|
||||
|
||||
hide: function() {
|
||||
this.typeahead = $('#spotlight .typeahead').typeahead('destroy');
|
||||
$(this.el).hide();
|
||||
},
|
||||
|
||||
listenKey: function(e) {
|
||||
if (e.keyCode === 27) {
|
||||
this.hide();
|
||||
if (this.callbackSuccess) {
|
||||
this.callbackCancel();
|
||||
}
|
||||
this.hide();
|
||||
}
|
||||
else if (e.keyCode === 13) {
|
||||
if (this.callbackSuccess) {
|
||||
this.callbackSuccess($(this.typeahead).val());
|
||||
this.hide();
|
||||
this.callbackSuccess($(this.typeahead).val());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -112,7 +117,8 @@
|
|||
url: arangoHelper.databaseUrl("/_api/aql-builtin"),
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
self.stringToArray();
|
||||
self.updateDatasets();
|
||||
_.each(data.functions, function(val) {
|
||||
self.aqlBuiltinFunctionsArray.push(val.name);
|
||||
});
|
||||
|
@ -136,8 +142,6 @@
|
|||
this.callbackCancel = callbackCancel;
|
||||
|
||||
var continueRender = function() {
|
||||
this.stringToArray();
|
||||
this.updateDatasets();
|
||||
|
||||
var genHeader = function(name, icon, type) {
|
||||
var string = '<div class="header-type"><h4>' + name + '</h4>';
|
||||
|
@ -247,13 +251,6 @@
|
|||
else {
|
||||
continueRender();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
$(this.el).hide();
|
||||
this.typeahead = $('#spotlight .typeahead').typeahead('destroy');
|
||||
}
|
||||
|
||||
});
|
||||
}());
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
}
|
||||
|
||||
// SINGLE NODE DASHBOARD
|
||||
#repl-numbers,
|
||||
#repl-progress,
|
||||
#repl-ticks {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dashboard-large-chart,
|
||||
.dashboard-medium-chart-outer:first-child {
|
||||
padding-right: 0 !important;
|
||||
|
|
|
@ -280,7 +280,6 @@ function DatabaseSuite () {
|
|||
|
||||
assertTrue(internal.db._createDatabase("UnitTestsDatabase0", { }, users));
|
||||
|
||||
internal.db._useDatabase("UnitTestsDatabase0");
|
||||
var userManager = require("@arangodb/users");
|
||||
var user = userManager.document("admin");
|
||||
|
||||
|
@ -293,8 +292,6 @@ function DatabaseSuite () {
|
|||
assertFalse(user.active);
|
||||
assertEqual("f", user.extra.gender);
|
||||
|
||||
internal.db._useDatabase("_system");
|
||||
|
||||
assertTrue(internal.db._dropDatabase("UnitTestsDatabase0"));
|
||||
},
|
||||
|
||||
|
@ -317,15 +314,12 @@ function DatabaseSuite () {
|
|||
];
|
||||
assertTrue(internal.db._createDatabase("UnitTestsDatabase0", { }, users));
|
||||
|
||||
internal.db._useDatabase("UnitTestsDatabase0");
|
||||
var userManager = require("@arangodb/users");
|
||||
var user = userManager.document("admin");
|
||||
assertEqual("admin", user.user);
|
||||
assertTrue(user.active);
|
||||
assertEqual("m", user.extra.gender);
|
||||
|
||||
internal.db._useDatabase("_system");
|
||||
|
||||
assertTrue(internal.db._dropDatabase("UnitTestsDatabase0"));
|
||||
},
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ exports.exists = function(username) {
|
|||
exports.document(username);
|
||||
return true;
|
||||
} catch (e) {
|
||||
if (e.errNum === arangodb.errors.ERROR_USER_NOT_FOUND.code) {
|
||||
if (e.errorNum === arangodb.errors.ERROR_USER_NOT_FOUND.code) {
|
||||
return false;
|
||||
}
|
||||
throw e;
|
||||
|
|
|
@ -600,6 +600,15 @@ void WindowsServiceFeature::validateOptions(std::shared_ptr<ProgramOptions> opti
|
|||
} };
|
||||
|
||||
_server->addReporter(reporter);
|
||||
SERVICE_TABLE_ENTRY ste[] = {{TEXT(""), (LPSERVICE_MAIN_FUNCTION)ServiceMain},
|
||||
{nullptr, nullptr}};
|
||||
|
||||
if (!StartServiceCtrlDispatcher(ste)) {
|
||||
std::cerr << "FATAL: StartServiceCtrlDispatcher has failed with "
|
||||
<< GetLastError() << std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (_startService) {
|
||||
|
|
|
@ -56,7 +56,7 @@ std::string arangodb::options::EnvironmentTranslator(std::string const& value) {
|
|||
|
||||
if (v == nullptr) {
|
||||
#if _WIN32
|
||||
if (TRI_EqualString(k, "ROOTDIR")) {
|
||||
if (TRI_EqualString(k.c_str(), "ROOTDIR")) {
|
||||
vv = TRI_LocateInstallDirectory();
|
||||
|
||||
if (! vv.empty()) {
|
||||
|
|
Loading…
Reference in New Issue