diff --git a/UnitTests/HttpInterface/api-database-spec.rb b/UnitTests/HttpInterface/api-database-spec.rb index 2801118b86..f1bf0b5797 100644 --- a/UnitTests/HttpInterface/api-database-spec.rb +++ b/UnitTests/HttpInterface/api-database-spec.rb @@ -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 diff --git a/etc/arangodb3/arango-dfdb.conf.in b/etc/arangodb3/arango-dfdb.conf.in index 960089bb07..bf619cf945 100644 --- a/etc/arangodb3/arango-dfdb.conf.in +++ b/etc/arangodb3/arango-dfdb.conf.in @@ -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 diff --git a/etc/arangodb3/arangobench.conf.in b/etc/arangodb3/arangobench.conf.in index 7e4eb500bb..5c6dfe0f28 100644 --- a/etc/arangodb3/arangobench.conf.in +++ b/etc/arangodb3/arangobench.conf.in @@ -5,4 +5,4 @@ progress = true [server] endpoint = tcp://127.0.0.1:8529 -authentication = false +authentication = true diff --git a/etc/arangodb3/arangodump.conf.in b/etc/arangodb3/arangodump.conf.in index 0161ce9801..8471d691ce 100644 --- a/etc/arangodb3/arangodump.conf.in +++ b/etc/arangodb3/arangodump.conf.in @@ -4,4 +4,4 @@ progress = true [server] endpoint = tcp://127.0.0.1:8529 -authentication = false +authentication = true diff --git a/etc/arangodb3/arangoimp.conf.in b/etc/arangodb3/arangoimp.conf.in index 441cd4ceec..d6231f9c00 100644 --- a/etc/arangodb3/arangoimp.conf.in +++ b/etc/arangodb3/arangoimp.conf.in @@ -2,4 +2,4 @@ [server] endpoint = tcp://127.0.0.1:8529 -authentication = false +authentication = true diff --git a/etc/arangodb3/arangorestore.conf.in b/etc/arangodb3/arangorestore.conf.in index 312b4abffa..b3566e8ee8 100644 --- a/etc/arangodb3/arangorestore.conf.in +++ b/etc/arangodb3/arangorestore.conf.in @@ -4,4 +4,4 @@ progress = true [server] endpoint = tcp://127.0.0.1:8529 -authentication = false +authentication = true diff --git a/etc/arangodb3/arangosh.conf.in b/etc/arangodb3/arangosh.conf.in index 1fea59e866..123d7f21a9 100644 --- a/etc/arangodb3/arangosh.conf.in +++ b/etc/arangodb3/arangosh.conf.in @@ -3,7 +3,7 @@ pretty-print = true [server] endpoint = tcp://127.0.0.1:8529 -authentication = false +authentication = true [javascript] startup-directory = @PKGDATADIR@/js diff --git a/js/actions/api-database.js b/js/actions/api-database.js index bff1669bec..dceb78eea7 100644 --- a/js/actions/api-database.js +++ b/js/actions/api-database.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()) { diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/dashboardView.ejs b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/dashboardView.ejs index 8a4e74b62c..e68eadce51 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/dashboardView.ejs +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/dashboardView.ejs @@ -147,7 +147,7 @@
Replication updating...
-
+
Totals
@@ -170,7 +170,7 @@
-
+
Ticks
@@ -193,7 +193,7 @@
-
+
Progress
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/spotlightView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/spotlightView.js index 77af28a338..0daba0ae8e 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/spotlightView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/spotlightView.js @@ -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 = '

' + name + '

'; @@ -247,13 +251,6 @@ else { continueRender(); } - - }, - - hide: function() { - $(this.el).hide(); - this.typeahead = $('#spotlight .typeahead').typeahead('destroy'); } - }); }()); diff --git a/js/apps/system/_admin/aardvark/APP/frontend/scss/_screenSizes.scss b/js/apps/system/_admin/aardvark/APP/frontend/scss/_screenSizes.scss index 7b525782c7..463b25c18c 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/scss/_screenSizes.scss +++ b/js/apps/system/_admin/aardvark/APP/frontend/scss/_screenSizes.scss @@ -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; diff --git a/js/common/tests/shell/shell-database.js b/js/common/tests/shell/shell-database.js index 586fe1d947..0099a1f76c 100644 --- a/js/common/tests/shell/shell-database.js +++ b/js/common/tests/shell/shell-database.js @@ -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")); }, diff --git a/js/server/modules/@arangodb/users.js b/js/server/modules/@arangodb/users.js index 69398b1d5a..9766ab39ac 100644 --- a/js/server/modules/@arangodb/users.js +++ b/js/server/modules/@arangodb/users.js @@ -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; diff --git a/lib/ApplicationFeatures/WindowsServiceFeature.cpp b/lib/ApplicationFeatures/WindowsServiceFeature.cpp index 825302d0ef..473ec62485 100644 --- a/lib/ApplicationFeatures/WindowsServiceFeature.cpp +++ b/lib/ApplicationFeatures/WindowsServiceFeature.cpp @@ -600,6 +600,15 @@ void WindowsServiceFeature::validateOptions(std::shared_ptr 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) { diff --git a/lib/ProgramOptions/Translator.cpp b/lib/ProgramOptions/Translator.cpp index 4f86266c3a..97e946d44d 100644 --- a/lib/ProgramOptions/Translator.cpp +++ b/lib/ProgramOptions/Translator.cpp @@ -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()) {