1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Jan Steemann 2014-06-20 16:14:03 +02:00
commit 0d1a4b4b80
5 changed files with 74 additions and 8 deletions

View File

@ -1001,7 +1001,7 @@ int ArangoServer::runUnitTests (TRI_vocbase_t* vocbase) {
context->_context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
// 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);
if (tryCatch.HasCaught()) {

View File

@ -1589,7 +1589,7 @@ static bool RunUnitTests (v8::Handle<v8::Context> context) {
context->Global()->Set(v8::String::New("SYS_UNIT_TESTS_RESULT"), v8::True());
// 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)"));
TRI_ExecuteJavaScriptString(context, v8::String::New(input), name, true);

View File

@ -53,6 +53,26 @@
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) {
var msg, url = "/_admin/aardvark/foxxes/purge/"+key;
$.ajax({

View File

@ -40,6 +40,14 @@
)
];
var buttonInfoConfig = [
window.modalView.createDeleteButton(
"Remove", this.confirmRemovalSingle.bind(this)
),
window.modalView.createSuccessButton(
"Install", this.installDialog.bind(this)
)
];
var buttonInfoConfigUpdate = [
window.modalView.createDeleteButton(
"Remove", this.confirmRemovalSingle.bind(this)
),
@ -51,6 +59,17 @@
)
];
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(
"Remove All", this.confirmRemovalAll.bind(this)
),
@ -78,12 +97,24 @@
"Application Settings",
buttonInfoConfig
);
this.showInfoModUpdate = window.modalView.show.bind(
window.modalView,
"modalTable.ejs",
"Application Settings",
buttonInfoConfigUpdate
);
this.showInfoMultipleVersionsMod = window.modalView.show.bind(
window.modalView,
"modalTable.ejs",
"Application Settings",
buttonInfoMultipleVersionsConfig
);
this.showInfoMultipleVersionsModUpdate = window.modalView.show.bind(
window.modalView,
"modalTable.ejs",
"Application Settings",
buttonInfoMultipleVersionsConfigUpdate
);
this.showSystemInfoMod = window.modalView.show.bind(
window.modalView,
"modalTable.ejs",
@ -267,7 +298,15 @@
},
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")) {
isSystem = true;
} else {
@ -275,14 +314,21 @@
}
versions = this.model.get("versions");
isGit = this.model.get("isGit");
event.stopPropagation();
if (isSystem === false && !versions) {
if (isSystem === false && !versions && !isGit) {
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());
}
else if (isSystem === false && versions && isGit) {
this.showInfoMultipleVersionsModUpdate(this.fillInfoValues());
}
else {
this.showSystemInfoMod(this.fillInfoValues());
}
@ -301,9 +347,9 @@
},
update: function() {
var url = this.model.get("git"),
name = '',
var url = this.model.get("gitUrl"),
version = 'master',
name = '',
result;
if (url === undefined || url === '') {
@ -311,7 +357,7 @@
return;
}
result = this.collection.installFoxxFromGithub(url, name, version);
result = this.model.collection.installFoxxFromGithub(url, name, version);
if (result === true) {
window.modalView.hide();
window.App.applicationsView.reload();