mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
63e378bb0b
|
@ -3,6 +3,9 @@
|
||||||
<p class="progress-content">
|
<p class="progress-content">
|
||||||
<i class="fa fa-spinner fa-spin"></i>
|
<i class="fa fa-spinner fa-spin"></i>
|
||||||
</p>
|
</p>
|
||||||
<div class="progress-message"></div>
|
<div class="progress-message">
|
||||||
|
<div class="progress-text"></div>
|
||||||
|
<div class="progress-action"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
"click #databaseSearchSubmit" : "search",
|
"click #databaseSearchSubmit" : "search",
|
||||||
"click #databaseToggle" : "toggleSettingsDropdown",
|
"click #databaseToggle" : "toggleSettingsDropdown",
|
||||||
"click .css-label" : "checkBoxes",
|
"click .css-label" : "checkBoxes",
|
||||||
"change #dbSortDesc" : "sorting"
|
"change #dbSortDesc" : "sorting",
|
||||||
|
"click svg" : "switchDatabase"
|
||||||
},
|
},
|
||||||
|
|
||||||
sorting: function() {
|
sorting: function() {
|
||||||
|
@ -130,6 +131,12 @@
|
||||||
this.createAddDatabaseModal();
|
this.createAddDatabaseModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
switchDatabase: function(e) {
|
||||||
|
var changeTo = $(e.currentTarget).parent().find("h5").text();
|
||||||
|
var url = this.collection.createDatabaseURL(changeTo);
|
||||||
|
window.location.replace(url);
|
||||||
|
},
|
||||||
|
|
||||||
submitCreateDatabase: function() {
|
submitCreateDatabase: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var name = $('#newDatabaseName').val();
|
var name = $('#newDatabaseName').val();
|
||||||
|
|
|
@ -14,19 +14,34 @@
|
||||||
|
|
||||||
el2: "#progressPlaceholderIcon",
|
el2: "#progressPlaceholderIcon",
|
||||||
|
|
||||||
|
action: function(){},
|
||||||
|
|
||||||
|
events: {
|
||||||
|
"click .progress-action button": "performAction"
|
||||||
|
},
|
||||||
|
|
||||||
|
performAction: function() {
|
||||||
|
this.action();
|
||||||
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function(msg) {
|
show: function(msg, action, button) {
|
||||||
$(this.el).html(this.template.render({}));
|
$(this.el).html(this.template.render({}));
|
||||||
$(".progress-message").text(msg);
|
$(".progress-text").text(msg);
|
||||||
|
$(".progress-action").html(button);
|
||||||
|
|
||||||
|
this.action = action;
|
||||||
|
|
||||||
$(this.el).show();
|
$(this.el).show();
|
||||||
$(this.el2).html('<i class="fa fa-spinner fa-spin"></i>');
|
//$(this.el2).html('<i class="fa fa-spinner fa-spin"></i>');
|
||||||
},
|
},
|
||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
$(this.el).hide();
|
$(this.el).hide();
|
||||||
$(this.el2).html('');
|
this.action = function(){};
|
||||||
|
//$(this.el2).html('');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -554,6 +554,22 @@
|
||||||
this.queries = _.sortBy(this.queries, 'name');
|
this.queries = _.sortBy(this.queries, 'name');
|
||||||
this.customQueries = _.sortBy(this.customQueries, 'name');
|
this.customQueries = _.sortBy(this.customQueries, 'name');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
abortQuery: function () {
|
||||||
|
/*
|
||||||
|
$.ajax({
|
||||||
|
type: "DELETE",
|
||||||
|
url: "/_api/cursor/currentFrontendQuery",
|
||||||
|
contentType: "application/json",
|
||||||
|
processData: false,
|
||||||
|
success: function (data) {
|
||||||
|
},
|
||||||
|
error: function (data) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
},
|
||||||
|
|
||||||
submitQuery: function () {
|
submitQuery: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
var inputEditor = ace.edit("aqlEditor");
|
var inputEditor = ace.edit("aqlEditor");
|
||||||
|
@ -562,14 +578,20 @@
|
||||||
var sizeBox = $('#querySize');
|
var sizeBox = $('#querySize');
|
||||||
var data = {
|
var data = {
|
||||||
query: selectedText || inputEditor.getValue(),
|
query: selectedText || inputEditor.getValue(),
|
||||||
batchSize: parseInt(sizeBox.val(), 10)
|
batchSize: parseInt(sizeBox.val(), 10),
|
||||||
|
id: "currentFrontendQuery"
|
||||||
};
|
};
|
||||||
var outputEditor = ace.edit("queryOutput");
|
var outputEditor = ace.edit("queryOutput");
|
||||||
|
|
||||||
// clear result
|
// clear result
|
||||||
outputEditor.setValue('');
|
outputEditor.setValue('');
|
||||||
|
|
||||||
window.progressView.show("Query is operating...");
|
window.progressView.show(
|
||||||
|
"Query is operating...",
|
||||||
|
self.abortQuery("id"),
|
||||||
|
'<button class="button-danger">Abort Query</button>'
|
||||||
|
);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/_api/cursor",
|
url: "/_api/cursor",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#progressPlaceholder {
|
#progressPlaceholder {
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -8,25 +9,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-view {
|
.progress-view {
|
||||||
opacity: 0;
|
background-color: #fff;
|
||||||
background-color: rgba(0, 0, 0, .0);
|
border: 1px solid $c-nav-bg;
|
||||||
border-radius: 5px;
|
border-radius: 2px;
|
||||||
color: $c-nav-bg;
|
color: $c-nav-bg;
|
||||||
height: 180px;
|
height: 188px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin: -100px 0 0 -150px;
|
margin: -100px 0 0 -150px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
opacity: 0;
|
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
||||||
.progress-content {
|
.progress-content {
|
||||||
margin-left: 90px;
|
margin-left: 90px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
opacity: 0;
|
|
||||||
|
|
||||||
.fa-spinner {
|
.fa-spinner {
|
||||||
opacity: 0;
|
|
||||||
font-size: 100pt;
|
font-size: 100pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,15 +32,26 @@
|
||||||
|
|
||||||
.progress-message {
|
.progress-message {
|
||||||
background-color: $c-nav-bg;
|
background-color: $c-nav-bg;
|
||||||
border-radius: 0 0 5px 5px;
|
border-radius: 0 0 2px 2px;
|
||||||
border-top: 1px solid #fff;
|
border-top: 1px solid #fff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
height: 25px;
|
height: 33px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
opacity: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress-text {
|
||||||
|
float: left;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-action {
|
||||||
|
float: right;
|
||||||
|
margin-right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#progressPlaceholderIcon {
|
#progressPlaceholderIcon {
|
||||||
|
|
|
@ -64,6 +64,7 @@ $iconsize: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg.tile-icon-svg {
|
svg.tile-icon-svg {
|
||||||
|
cursor: pointer;
|
||||||
fill: $c-icon-grey;
|
fill: $c-icon-grey;
|
||||||
height: $iconsize;
|
height: $iconsize;
|
||||||
margin-left: 90px;
|
margin-left: 90px;
|
||||||
|
|
|
@ -2001,6 +2001,7 @@ div .tile, div .bigtile {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 50px; }
|
width: 50px; }
|
||||||
div .tile svg.tile-icon-svg, div .bigtile svg.tile-icon-svg {
|
div .tile svg.tile-icon-svg, div .bigtile svg.tile-icon-svg {
|
||||||
|
cursor: pointer;
|
||||||
fill: #686766;
|
fill: #686766;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin-left: 90px;
|
margin-left: 90px;
|
||||||
|
@ -5848,6 +5849,7 @@ input.gv-radio-button {
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
|
||||||
#progressPlaceholder {
|
#progressPlaceholder {
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -5856,34 +5858,37 @@ input.gv-radio-button {
|
||||||
z-index: 9999; }
|
z-index: 9999; }
|
||||||
|
|
||||||
.progress-view {
|
.progress-view {
|
||||||
opacity: 0;
|
background-color: #fff;
|
||||||
background-color: transparent;
|
border: 1px solid #333232;
|
||||||
border-radius: 5px;
|
border-radius: 2px;
|
||||||
color: #333232;
|
color: #333232;
|
||||||
height: 180px;
|
height: 188px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin: -100px 0 0 -150px;
|
margin: -100px 0 0 -150px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
opacity: 0;
|
|
||||||
width: 300px; }
|
width: 300px; }
|
||||||
.progress-view .progress-content {
|
.progress-view .progress-content {
|
||||||
margin-left: 90px;
|
margin-left: 90px;
|
||||||
margin-top: 10px;
|
margin-top: 10px; }
|
||||||
opacity: 0; }
|
|
||||||
.progress-view .progress-content .fa-spinner {
|
.progress-view .progress-content .fa-spinner {
|
||||||
opacity: 0;
|
|
||||||
font-size: 100pt; }
|
font-size: 100pt; }
|
||||||
.progress-view .progress-message {
|
.progress-view .progress-message {
|
||||||
background-color: #333232;
|
background-color: #333232;
|
||||||
border-radius: 0 0 5px 5px;
|
border-radius: 0 0 2px 2px;
|
||||||
border-top: 1px solid #fff;
|
border-top: 1px solid #fff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
height: 25px;
|
height: 33px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
text-align: center;
|
text-align: center; }
|
||||||
opacity: 0; }
|
.progress-view .progress-text {
|
||||||
|
float: left;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-top: 4px; }
|
||||||
|
.progress-view .progress-action {
|
||||||
|
float: right;
|
||||||
|
margin-right: 2px; }
|
||||||
|
|
||||||
#progressPlaceholderIcon {
|
#progressPlaceholderIcon {
|
||||||
color: #8aa051;
|
color: #8aa051;
|
||||||
|
|
|
@ -344,26 +344,31 @@ function copy (src, dst) {
|
||||||
fs.write(dst, buffer);
|
fs.write(dst, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkInstanceAlive(instanceInfo) {
|
function checkInstanceAlive(instanceInfo, options) {
|
||||||
var res = statusExternal(instanceInfo.pid, false);
|
if (options.cluster === false) {
|
||||||
var ret = res.status === "RUNNING";
|
var res = statusExternal(instanceInfo.pid, false);
|
||||||
if (! ret) {
|
var ret = res.status === "RUNNING";
|
||||||
print("ArangoD with PID " + instanceInfo.pid.pid + " gone:");
|
if (! ret) {
|
||||||
instanceInfo.exitStatus = res;
|
print("ArangoD with PID " + instanceInfo.pid.pid + " gone:");
|
||||||
print(instanceInfo);
|
instanceInfo.exitStatus = res;
|
||||||
if (res.hasOwnProperty('signal') &&
|
print(instanceInfo);
|
||||||
(res.signal === 11))
|
if (res.hasOwnProperty('signal') &&
|
||||||
{
|
(res.signal === 11))
|
||||||
var storeArangodPath = "/var/tmp/arangod_" + instanceInfo.pid.pid;
|
{
|
||||||
print("Core dump written; copying arangod to " +
|
var storeArangodPath = "/var/tmp/arangod_" + instanceInfo.pid.pid;
|
||||||
storeArangodPath + " for later analysis.");
|
print("Core dump written; copying arangod to " +
|
||||||
res.gdbHint = "Run debugger with 'gdb " +
|
storeArangodPath + " for later analysis.");
|
||||||
storeArangodPath +
|
res.gdbHint = "Run debugger with 'gdb " +
|
||||||
" /var/tmp/core*" + instanceInfo.pid.pid + "*'";
|
storeArangodPath +
|
||||||
copy("bin/arangod", storeArangodPath);
|
" /var/tmp/core*" + instanceInfo.pid.pid + "*'";
|
||||||
|
copy("bin/arangod", storeArangodPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return instanceInfo.kickstarter.isHealthy();
|
||||||
}
|
}
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function shutdownInstance (instanceInfo, options) {
|
function shutdownInstance (instanceInfo, options) {
|
||||||
|
@ -629,7 +634,7 @@ function performTests(options, testList, testname) {
|
||||||
if (r !== true && !options.force) {
|
if (r !== true && !options.force) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print("Skipped " + te + " because of " + filtered.filter);
|
print("Skipped " + te + " because of " + filtered.filter);
|
||||||
|
@ -777,7 +782,7 @@ testFuncs.shell_client = function(options) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print("Skipped " + te + " because of " + filtered.filter);
|
print("Skipped " + te + " because of " + filtered.filter);
|
||||||
|
@ -885,7 +890,7 @@ function rubyTests (options, ssl) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1161,7 +1166,7 @@ testFuncs.arangob = function (options) {
|
||||||
r = runArangoBenchmark(options, instanceInfo, benchTodo[i]);
|
r = runArangoBenchmark(options, instanceInfo, benchTodo[i]);
|
||||||
results[i] = r;
|
results[i] = r;
|
||||||
|
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
|
|
||||||
if (r !== 0 && !options.force) {
|
if (r !== 0 && !options.force) {
|
||||||
break;
|
break;
|
||||||
|
@ -1235,7 +1240,7 @@ testFuncs.authentication_parameters = function (options) {
|
||||||
};
|
};
|
||||||
all_ok = false;
|
all_ok = false;
|
||||||
}
|
}
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
}
|
}
|
||||||
results.auth_full.status = all_ok;
|
results.auth_full.status = all_ok;
|
||||||
|
|
||||||
|
@ -1271,7 +1276,7 @@ testFuncs.authentication_parameters = function (options) {
|
||||||
};
|
};
|
||||||
all_ok = false;
|
all_ok = false;
|
||||||
}
|
}
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
}
|
}
|
||||||
results.auth_system.status = all_ok;
|
results.auth_system.status = all_ok;
|
||||||
|
|
||||||
|
@ -1308,7 +1313,7 @@ testFuncs.authentication_parameters = function (options) {
|
||||||
};
|
};
|
||||||
all_ok = false;
|
all_ok = false;
|
||||||
}
|
}
|
||||||
continueTesting = checkInstanceAlive(instanceInfo);
|
continueTesting = checkInstanceAlive(instanceInfo, options);
|
||||||
}
|
}
|
||||||
results.auth_none.status = all_ok;
|
results.auth_none.status = all_ok;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue