8000 removed remainders of dysfunctional `/_admin/cluster-test` and `/_adm… · mnemosdev/arangodb@5fd0bb7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fd0bb7

Browse files
authored
removed remainders of dysfunctional /_admin/cluster-test and /_admin/clusterCheckPort API endpoints and removed them from documentation (arangodb#4861)
1 parent 89bde50 commit 5fd0bb7

File tree

11 files changed

+4
-321
lines changed

11 files changed

+4
-321
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
devel
22
-----
33

4+
* removed remainders of dysfunctional `/_admin/cluster-test` and `/_admin/clusterCheckPort`
5+
API endpoints and removed them from documentation
6+
47
* added new query option `stream` to enable streaming query execution via the `POST /_api/cursor` rest interface.
58

69
* fix issue #4698: databases within the UI are now displayed in a sorted order.

Documentation/Books/HTTP/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
* [Replication Logger](Replications/ReplicationLogger.md)
5454
* [Replication Applier](Replications/ReplicationApplier.md)
5555
* [Other Replication Commands](Replications/OtherReplication.md)
56-
* [Sharding](ShardingInterface/README.md)
5756
* [Monitoring](AdministrationAndMonitoring/README.md)
5857
* [Endpoints](Endpoints/README.md)
5958
* [Foxx Services](Foxx/README.md)

Documentation/Books/HTTP/ShardingInterface/README.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/delete_cluster_test.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/get_cluster_check_port.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/get_cluster_test.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/head_cluster_test.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/patch_cluster_test.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/post_cluster_test.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

Documentation/DocuBlocks/Rest/Cluster/put_cluster_test.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

js/actions/api-cluster.js

Lines changed: 1 addition & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* jshint strict: false, unused: false */
2-
/* global AQL_EXECUTE, SYS_CLUSTER_TEST
3-
ArangoServerState, ArangoClusterComm, ArangoClusterInfo, ArangoAgency */
2+
/* global AQL_EXECUTE, ArangoServerState, ArangoClusterComm, ArangoClusterInfo, ArangoAgency */
43

54
// //////////////////////////////////////////////////////////////////////////////
65
// / @brief cluster actions
@@ -131,91 +130,6 @@ actions.defineHttp({
131130
}
132131
});
133132

134-
actions.defineHttp({
135-
url: '_admin/cluster-test',
136-
prefix: true,
137-
138-
callback: function (req, res) {
139-
var path;
140-
if (req.hasOwnProperty('suffix') && req.suffix.length !== 0) {
141-
path = '/' + req.suffix.join('/');
142-
} else {
143-
path = '/_admin/version';
144-
}
145-
var params = '';
146-
var shard = '';
147-
var p;
148-
149-
for (p in req.parameters) {
150-
if (req.parameters.hasOwnProperty(p)) {
151-
if (params === '') {
152-
params = '?';
153-
} else {
154-
params += '&';
155-
}
156-
params += p + '=' + encodeURIComponent(String(req.parameters[p]));
157-
}
158-
}
159-
if (params !== '') {
160-
path += params;
161-
}
162-
var headers = {};
163-
var transID = '';
164-
var timeout = 24 * 3600.0;
165-
var asyncMode = true;
166-
167-
for (p in req.headers) {
168-
if (req.headers.hasOwnProperty(p)) {
169-
if (p === 'x-client-transaction-id') {
170-
transID = req.headers[p];
171-
} else if (p === 'x-timeout') {
172-
timeout = parseFloat(req.headers[p]);
173-
if (isNaN(timeout)) {
174-
timeout = 24 * 3600.0;
175-
}
176-
} else if (p === 'x-synchronous-mode') {
177-
asyncMode = false;
178-
} else if (p === 'x-shard-id') {
179-
shard = req.headers[p];
180-
} else {
181-
headers[p] = req.headers[p];
182-
}
183-
}
184-
}
185-
186-
var body;
187-
if (req.requestBody === undefined || typeof req.requestBody !== 'string') {
188-
body = '';
189-
} else {
190-
body = req.requestBody;
191-
}
192-
193-
var r;
194-
if (typeof SYS_CLUSTER_TEST === 'undefined') {
195-
actions.resultError(req, res, actions.HTTP_NOT_FOUND,
196-
'Not compiled for cluster operation');
197-
} else {
198-
try {
199-
r = SYS_CLUSTER_TEST(req, res, shard, path, transID,
200-
headers, body, timeout, asyncMode);
201-
if (r.timeout || typeof r.errorMessage === 'string') {
202-
res.responseCode = actions.HTTP_OK;
203-
res.contentType = 'application/json; charset=utf-8';
204-
var s = JSON.stringify(r);
205-
res.body = s;
206-
} else {
207-
res.responseCode = actions.HTTP_OK;
208-
res.contentType = r.headers.contentType;
209-
res.headers = r.headers;
210-
res.body = r.body;
211-
}
212-
} catch (err) {
213-
actions.resultError(req, res, actions.HTTP_FORBIDDEN, String(err));
214-
}
215-
}
216-
}
217-
});
218-
219133
// //////////////////////////////////////////////////////////////////////////////
220134
// / @brief was docuBlock JSF_cluster_node_version_GET
221135
// //////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)
0