diff --git a/arangod/Cluster/ClusterComm.cpp b/arangod/Cluster/ClusterComm.cpp index 79d652a16c..71e684834b 100644 --- a/arangod/Cluster/ClusterComm.cpp +++ b/arangod/Cluster/ClusterComm.cpp @@ -1036,6 +1036,7 @@ size_t ClusterComm::performRequests(std::vector& requests, arangodb::LogTopic const& logTopic) { if (requests.size() == 0) { + nrDone = 0; return 0; } @@ -1065,7 +1066,10 @@ size_t ClusterComm::performRequests(std::vector& requests, // First send away what is due: for (size_t i = 0; i < requests.size(); i++) { if (!requests[i].done && now >= dueTime[i]) { - auto headers = std::make_unique>(); + if (requests[i].headerFields.get() == nullptr) { + requests[i].headerFields + = std::make_unique>(); + } LOG_TOPIC(TRACE, logTopic) << "ClusterComm::performRequests: sending request to " << requests[i].destination << ":" << requests[i].path @@ -1075,7 +1079,8 @@ size_t ClusterComm::performRequests(std::vector& requests, requests[i].requestType, requests[i].path, requests[i].body, - headers, nullptr, timeout - (now - startTime), + requests[i].headerFields, + nullptr, timeout - (now - startTime), false); if (res.status == CL_COMM_ERROR) { // We did not find the destination, this is could change in the @@ -1159,6 +1164,9 @@ size_t ClusterComm::performRequests(std::vector& requests, // We only get here if the global timeout was triggered, not all // requests are marked by done! + LOG_TOPIC(ERR, logTopic) << "ClusterComm::performRequests: " + << "got timeout, this will be reported..."; + // Forget about drop("", coordinatorTransactionID, 0, ""); return nrGood; diff --git a/arangod/Cluster/ClusterComm.h b/arangod/Cluster/ClusterComm.h index fa2bd43dab..6cab593c6e 100644 --- a/arangod/Cluster/ClusterComm.h +++ b/arangod/Cluster/ClusterComm.h @@ -183,12 +183,13 @@ void ClusterCommRestCallback(std::string& coordinator, //////////////////////////////////////////////////////////////////////////////// struct ClusterCommRequest { - std::string destination; - GeneralRequest::RequestType requestType; - std::string path; - std::shared_ptr body; - ClusterCommResult result; - bool done; + std::string destination; + GeneralRequest::RequestType requestType; + std::string path; + std::shared_ptr body; + std::unique_ptr> headerFields; + ClusterCommResult result; + bool done; ClusterCommRequest() : done(false) { } @@ -201,6 +202,9 @@ struct ClusterCommRequest { { } + void setHeaders(std::unique_ptr>& headers) { + headerFields = std::move(headers); + } }; //////////////////////////////////////////////////////////////////////////////// diff --git a/js/apps/system/_admin/aardvark/APP/aardvark.js b/js/apps/system/_admin/aardvark/APP/aardvark.js index 80fdc6ee55..b18044f85d 100644 --- a/js/apps/system/_admin/aardvark/APP/aardvark.js +++ b/js/apps/system/_admin/aardvark/APP/aardvark.js @@ -109,16 +109,6 @@ router.post('/login', function (req, res) { `); -router.get('/unauthorized', function(req, res) { - res.throw('unauthorized'); -}) -.error('unauthorized') -.summary('Unauthorized') -.description(dd` - Responds with a HTTP 401 response. -`); - - const authRouter = createRouter(); router.use(authRouter); diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/nodesView.ejs b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/nodesView.ejs index 5f55828989..a4d2cb0155 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/nodesView.ejs +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/nodesView.ejs @@ -2,11 +2,16 @@
- <% if(coords.length > 0) { %> - <% var genClass = "pure-u-1-" + Object.keys(coords[0]).length; %> + <% if (coords.length > 0) { %> + <% var disabled = ''; %> + <% var genClass = "pure-u-1-" + Object.keys(coords[0]).length; %> + + <% if (type !== 'coordinator') { %> + <% disabled = " disabled"; %> + <% } %>
-
+
Name
Address
Protocol
@@ -24,7 +29,7 @@ <% _.each(coords, function(node) { %> -
+
<%= node.name %>
<%= node.address %>
diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js index e6e263c521..efc9a57f0d 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js @@ -12,16 +12,20 @@ knownServers: [], events: { - "click .pure-table-body .pure-table-row": "navigateToNode" }, initialize: function (options) { + if (window.App.isCluster) { this.dbServers = options.dbServers; this.coordinators = options.coordinators; this.updateServerTime(); this.toRender = options.toRender; + if (this.toRender !== 'coordinator') { + this.events["click .pure-table-body .pure-table-row"] = "navigateToNode"; + } + //start polling with interval window.setInterval(function() { if (window.location.hash === '#cNodes' || window.location.hash === '#dNodes') { diff --git a/js/apps/system/_admin/aardvark/APP/frontend/scss/_pure.scss b/js/apps/system/_admin/aardvark/APP/frontend/scss/_pure.scss index 2d30d098d5..5699f3f415 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/scss/_pure.scss +++ b/js/apps/system/_admin/aardvark/APP/frontend/scss/_pure.scss @@ -29,12 +29,20 @@ color: $c-pure-text; font-weight: 100; line-height: 40px; + width: 100%; &:hover { background-color: rgb(239, 240, 235); cursor: pointer; } + &.disabled { + &:hover { + background-color: $c-white; + cursor: not-allowed; + } + } + .left { text-align: left; }