mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
0d1a4b4b80
|
@ -1001,7 +1001,7 @@ int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) {
|
||||||
context->_context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
context->_context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
||||||
|
|
||||||
// run tests
|
// run tests
|
||||||
char const* input = "require(\"test_runner\").runCommandLineTests();";
|
char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();";
|
||||||
TRI_ExecuteJavaScriptString(context->_context, v8::String::New(input), name, true);
|
TRI_ExecuteJavaScriptString(context->_context, v8::String::New(input), name, true);
|
||||||
|
|
||||||
if (tryCatch.HasCaught()) {
|
if (tryCatch.HasCaught()) {
|
||||||
|
|
|
@ -1589,7 +1589,7 @@ static bool RunUnitTests (v8::Handle<v8::Context> context) {
|
||||||
context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
|
||||||
|
|
||||||
// run tests
|
// run tests
|
||||||
char const* input = "require(\"test_runner\").runCommandLineTests();";
|
char const* input = "require(\"org/arangodb/testrunner\").runCommandLineTests();";
|
||||||
v8::Local<v8::String> name(v8::String::New("(arangosh)"));
|
v8::Local<v8::String> name(v8::String::New("(arangosh)"));
|
||||||
TRI_ExecuteJavaScriptString(context, v8::String::New(input), name, true);
|
TRI_ExecuteJavaScriptString(context, v8::String::New(input), name, true);
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,26 @@
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
gitInfo: function (key) {
|
||||||
|
var result;
|
||||||
|
$.ajax({
|
||||||
|
cache: false,
|
||||||
|
type: "GET",
|
||||||
|
async: false, // sequential calls!
|
||||||
|
url: "/_admin/aardvark/foxxes/gitinfo/"+key,
|
||||||
|
contentType: "application/json",
|
||||||
|
processData: false,
|
||||||
|
success: function(data) {
|
||||||
|
result = data;
|
||||||
|
},
|
||||||
|
error: function(data) {
|
||||||
|
result = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
purgeFoxx: function (key) {
|
purgeFoxx: function (key) {
|
||||||
var msg, url = "/_admin/aardvark/foxxes/purge/"+key;
|
var msg, url = "/_admin/aardvark/foxxes/purge/"+key;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -40,6 +40,14 @@
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
var buttonInfoConfig = [
|
var buttonInfoConfig = [
|
||||||
|
window.modalView.createDeleteButton(
|
||||||
|
"Remove", this.confirmRemovalSingle.bind(this)
|
||||||
|
),
|
||||||
|
window.modalView.createSuccessButton(
|
||||||
|
"Install", this.installDialog.bind(this)
|
||||||
|
)
|
||||||
|
];
|
||||||
|
var buttonInfoConfigUpdate = [
|
||||||
window.modalView.createDeleteButton(
|
window.modalView.createDeleteButton(
|
||||||
"Remove", this.confirmRemovalSingle.bind(this)
|
"Remove", this.confirmRemovalSingle.bind(this)
|
||||||
),
|
),
|
||||||
|
@ -51,6 +59,17 @@
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
var buttonInfoMultipleVersionsConfig = [
|
var buttonInfoMultipleVersionsConfig = [
|
||||||
|
window.modalView.createDeleteButton(
|
||||||
|
"Remove All", this.confirmRemovalAll.bind(this)
|
||||||
|
),
|
||||||
|
window.modalView.createDeleteButton(
|
||||||
|
"Remove", this.confirmRemovalSingle.bind(this)
|
||||||
|
),
|
||||||
|
window.modalView.createSuccessButton(
|
||||||
|
"Install", this.installDialog.bind(this)
|
||||||
|
)
|
||||||
|
];
|
||||||
|
var buttonInfoMultipleVersionsConfigUpdate = [
|
||||||
window.modalView.createDeleteButton(
|
window.modalView.createDeleteButton(
|
||||||
"Remove All", this.confirmRemovalAll.bind(this)
|
"Remove All", this.confirmRemovalAll.bind(this)
|
||||||
),
|
),
|
||||||
|
@ -78,12 +97,24 @@
|
||||||
"Application Settings",
|
"Application Settings",
|
||||||
buttonInfoConfig
|
buttonInfoConfig
|
||||||
);
|
);
|
||||||
|
this.showInfoModUpdate = window.modalView.show.bind(
|
||||||
|
window.modalView,
|
||||||
|
"modalTable.ejs",
|
||||||
|
"Application Settings",
|
||||||
|
buttonInfoConfigUpdate
|
||||||
|
);
|
||||||
this.showInfoMultipleVersionsMod = window.modalView.show.bind(
|
this.showInfoMultipleVersionsMod = window.modalView.show.bind(
|
||||||
window.modalView,
|
window.modalView,
|
||||||
"modalTable.ejs",
|
"modalTable.ejs",
|
||||||
"Application Settings",
|
"Application Settings",
|
||||||
buttonInfoMultipleVersionsConfig
|
buttonInfoMultipleVersionsConfig
|
||||||
);
|
);
|
||||||
|
this.showInfoMultipleVersionsModUpdate = window.modalView.show.bind(
|
||||||
|
window.modalView,
|
||||||
|
"modalTable.ejs",
|
||||||
|
"Application Settings",
|
||||||
|
buttonInfoMultipleVersionsConfigUpdate
|
||||||
|
);
|
||||||
this.showSystemInfoMod = window.modalView.show.bind(
|
this.showSystemInfoMod = window.modalView.show.bind(
|
||||||
window.modalView,
|
window.modalView,
|
||||||
"modalTable.ejs",
|
"modalTable.ejs",
|
||||||
|
@ -267,7 +298,15 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
infoDialog: function(event) {
|
infoDialog: function(event) {
|
||||||
var versions, isSystem = false;
|
var name = this.model.get("name"),
|
||||||
|
mountinfo = this.model.collection.gitInfo(name),
|
||||||
|
versions, isSystem = false, isGit;
|
||||||
|
|
||||||
|
if (mountinfo.git === true) {
|
||||||
|
this.model.set("isGit", mountinfo.git);
|
||||||
|
this.model.set("gitUrl", mountinfo.url);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.model.get("isSystem")) {
|
if (this.model.get("isSystem")) {
|
||||||
isSystem = true;
|
isSystem = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -275,14 +314,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
versions = this.model.get("versions");
|
versions = this.model.get("versions");
|
||||||
|
isGit = this.model.get("isGit");
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if (isSystem === false && !versions) {
|
if (isSystem === false && !versions && !isGit) {
|
||||||
this.showInfoMod(this.fillInfoValues());
|
this.showInfoMod(this.fillInfoValues());
|
||||||
}
|
}
|
||||||
else if (isSystem === false && versions) {
|
else if (isSystem === false && !versions && isGit) {
|
||||||
|
this.showInfoModUpdate(this.fillInfoValues());
|
||||||
|
}
|
||||||
|
else if (isSystem === false && versions && !isGit) {
|
||||||
this.showInfoMultipleVersionsMod(this.fillInfoValues());
|
this.showInfoMultipleVersionsMod(this.fillInfoValues());
|
||||||
}
|
}
|
||||||
|
else if (isSystem === false && versions && isGit) {
|
||||||
|
this.showInfoMultipleVersionsModUpdate(this.fillInfoValues());
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
this.showSystemInfoMod(this.fillInfoValues());
|
this.showSystemInfoMod(this.fillInfoValues());
|
||||||
}
|
}
|
||||||
|
@ -301,9 +347,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
var url = this.model.get("git"),
|
var url = this.model.get("gitUrl"),
|
||||||
name = '',
|
|
||||||
version = 'master',
|
version = 'master',
|
||||||
|
name = '',
|
||||||
result;
|
result;
|
||||||
|
|
||||||
if (url === undefined || url === '') {
|
if (url === undefined || url === '') {
|
||||||
|
@ -311,7 +357,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = this.collection.installFoxxFromGithub(url, name, version);
|
result = this.model.collection.installFoxxFromGithub(url, name, version);
|
||||||
if (result === true) {
|
if (result === true) {
|
||||||
window.modalView.hide();
|
window.modalView.hide();
|
||||||
window.App.applicationsView.reload();
|
window.App.applicationsView.reload();
|
||||||
|
|
Loading…
Reference in New Issue