8000 removed remainders of dysfunctional `/_admin/cluster-test` and `/_adm… by jsteemann · Pull Request #4861 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

removed remainders of dysfunctional /_admin/cluster-test and `/_adm… #4861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
devel
-----

* removed remainders of dysfunctional `/_admin/cluster-test` and `/_admin/clusterCheckPort`
API endpoints and removed them from documentation

* added new query option `stream` to enable streaming query execution via the `POST /_api/cursor` rest interface.

* fix issue #4698: databases within the UI are now displayed in a sorted order.
Expand Down
1 change: 0 additions & 1 deletion Documentation/Books/HTTP/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
* [Replication Logger](Replications/ReplicationLogger.md)
* [Replication Applier](Replications/ReplicationApplier.md)
* [Other Replication Commands](Replications/OtherReplication.md)
* [Sharding](ShardingInterface/README.md)
* [Monitoring](AdministrationAndMonitoring/README.md)
* [Endpoints](Endpoints/README.md)
* [Foxx Services](Foxx/README.md)
Expand Down
38 changes: 0 additions & 38 deletions Documentation/Books/HTTP/ShardingInterface/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions Documentation/DocuBlocks/Rest/Cluster/delete_cluster_test.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation/DocuBlocks/Rest/Cluster/get_cluster_check_port.md

This file was deleted.

63 changes: 0 additions & 63 deletions Documentation/DocuBlocks/Rest/Cluster/get_cluster_test.md

This file was deleted.

21 changes: 0 additions & 21 deletions Documentation/DocuBlocks/Rest/Cluster/head_cluster_test.md

This file was deleted.

23 changes: 0 additions & 23 deletions Documentation/DocuBlocks/Rest/Cluster/patch_cluster_test.md

This file was deleted.

24 changes: 0 additions & 24 deletions Documentation/DocuBlocks/Rest/Cluster/post_cluster_test.md

This file was deleted.

23 changes: 0 additions & 23 deletions Documentation/DocuBlocks/Rest/Cluster/put_cluster_test.md

This file was deleted.

88 changes: 1 addition & 87 deletions js/actions/api-cluster.js
9E81
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* jshint strict: false, unused: false */
/* global AQL_EXECUTE, SYS_CLUSTER_TEST
ArangoServerState, ArangoClusterComm, ArangoClusterInfo, ArangoAgency */
/* global AQL_EXECUTE, ArangoServerState, ArangoClusterComm, ArangoClusterInfo, ArangoAgency */

// //////////////////////////////////////////////////////////////////////////////
// / @brief cluster actions
Expand Down Expand Up @@ -131,91 +130,6 @@ actions.defineHttp({
}
});

actions.defineHttp({
url: '_admin/cluster-test',
prefix: true,

callback: function (req, res) {
var path;
if (req.hasOwnProperty('suffix') && req.suffix.length !== 0) {
path = '/' + req.suffix.join('/');
} else {
path = '/_admin/version';
}
var params = '';
var shard = '';
var p;

for (p in req.parameters) {
if (req.parameters.hasOwnProperty(p)) {
if (params === '') {
params = '?';
} else {
params += '&';
}
params += p + '=' + encodeURIComponent(String(req.parameters[p]));
}
}
if (params !== '') {
path += params;
}
var headers = {};
var transID = '';
var timeout = 24 * 3600.0;
var asyncMode = true;

for (p in req.headers) {
if (req.headers.hasOwnProperty(p)) {
if (p === 'x-client-transaction-id') {
transID = req.headers[p];
} else if (p === 'x-timeout') {
timeout = parseFloat(req.headers[p]);
if (isNaN(timeout)) {
timeout = 24 * 3600.0;
}
} else if (p === 'x-synchronous-mode') {
asyncMode = false;
} else if (p === 'x-shard-id') {
shard = req.headers[p];
} else {
headers[p] = req.headers[p];
}
}
}

var body;
if (req.requestBody === undefined || typeof req.requestBody !== 'string') {
body = '';
} else {
body = req.requestBody;
}

var r;
if (typeof SYS_CLUSTER_TEST === 'undefined') {
actions.resultError(req, res, actions.HTTP_NOT_FOUND,
'Not compiled for cluster operation');
} else {
try {
r = SYS_CLUSTER_TEST(req, res, shard, path, transID,
headers, body, timeout, asyncMode);
if (r.timeout || typeof r.errorMessage === 'string') {
res.responseCode = actions.HTTP_OK;
res.contentType = 'application/json; charset=utf-8';
var s = JSON.stringify(r);
res.body = s;
} else {
res.responseCode = actions.HTTP_OK;
res.contentType = r.headers.contentType;
res.headers = r.headers;
res.body = r.body;
}
} catch (err) {
actions.resultError(req, res, actions.HTTP_FORBIDDEN, String(err));
}
}
}
});

// //////////////////////////////////////////////////////////////////////////////
// / @brief was docuBlock JSF_cluster_node_version_GET
// //////////////////////////////////////////////////////////////////////////////
Expand Down
0