mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
cf14609727
|
@ -419,7 +419,7 @@ SHELL_COMMON = \
|
|||
################################################################################
|
||||
|
||||
SHELL_SERVER_ONLY = \
|
||||
@top_srcdir@/js/server/tests/shell-readonly.js \
|
||||
@top_srcdir@/js/server/tests/shell-readonly-noncluster.js\
|
||||
@top_srcdir@/js/server/tests/shell-wal-noncluster.js \
|
||||
@top_srcdir@/js/server/tests/shell-sharding-helpers.js \
|
||||
@top_srcdir@/js/server/tests/shell-compaction-noncluster.js \
|
||||
|
|
|
@ -1152,6 +1152,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var funcRE = /function ([^\(]*)?\(\) \{ \[native code\] \}/;
|
||||
var func2RE = /function ([^\(]*)?\((.*)\) \{/;
|
||||
|
||||
exports.printRecursive = printRecursive = function (value, context) {
|
||||
'use strict';
|
||||
|
@ -1160,6 +1161,7 @@
|
|||
var customInspect = context.customInspect;
|
||||
var useToString = context.useToString;
|
||||
var limitString = context.limitString;
|
||||
var showFunction = context.showFunction;
|
||||
|
||||
if (typeof context.seen === "undefined") {
|
||||
context.seen = [];
|
||||
|
@ -1203,7 +1205,7 @@
|
|||
try {
|
||||
var s = value.toString();
|
||||
|
||||
if (0 < context.level) {
|
||||
if (0 < context.level && ! showFunction) {
|
||||
var a = s.split("\n");
|
||||
var f = a[0];
|
||||
|
||||
|
@ -1211,15 +1213,27 @@
|
|||
|
||||
if (m !== null) {
|
||||
if (m[1] === undefined) {
|
||||
context.output += '[Function {native code}]';
|
||||
context.output += 'function {native code}';
|
||||
}
|
||||
else {
|
||||
context.output += '[Function "' + m[1] + '" {native code}]';
|
||||
context.output += 'function ' + m[1] + ' {native code}';
|
||||
}
|
||||
}
|
||||
else {
|
||||
f = f.substr(8, f.length - 10).trim();
|
||||
context.output += '[Function "' + f + '"]';
|
||||
m = func2RE.exec(f);
|
||||
|
||||
if (m !== null) {
|
||||
if (m[1] === undefined) {
|
||||
context.output += 'function ' + '(' + m[2] +') { ... }';
|
||||
}
|
||||
else {
|
||||
context.output += 'function ' + m[1] + ' (' + m[2] +') { ... }';
|
||||
}
|
||||
}
|
||||
else {
|
||||
f = f.substr(8, f.length - 10).trim();
|
||||
context.output += '[Function "' + f + '" ...]';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1377,17 +1391,18 @@
|
|||
}
|
||||
else {
|
||||
var context = {
|
||||
names: [],
|
||||
seen: [],
|
||||
path: "~",
|
||||
level: 0,
|
||||
output: "",
|
||||
prettyPrint: usePrettyPrint,
|
||||
useColor: useColor,
|
||||
customInspect: true,
|
||||
emit: 16384,
|
||||
level: 0,
|
||||
limitString: 80,
|
||||
useToString: true,
|
||||
emit: 16384
|
||||
names: [],
|
||||
output: "",
|
||||
path: "~",
|
||||
prettyPrint: usePrettyPrint,
|
||||
seen: [],
|
||||
showFunction: false,
|
||||
useColor: useColor,
|
||||
useToString: true
|
||||
};
|
||||
|
||||
printRecursive(arguments[i], context);
|
||||
|
@ -1411,14 +1426,17 @@
|
|||
'use strict';
|
||||
|
||||
var context = {
|
||||
names: [],
|
||||
seen: [],
|
||||
path: "~",
|
||||
level: 0,
|
||||
output: "",
|
||||
prettyPrint: true,
|
||||
useColor: false,
|
||||
customInspect: options && options.customInspect,
|
||||
emit: false,
|
||||
level: 0,
|
||||
limitString: false,
|
||||
names: [],
|
||||
output: "",
|
||||
path: "~",
|
||||
prettyPrint: true,
|
||||
seen: [],
|
||||
showFunction: true,
|
||||
useColor: false,
|
||||
useToString: false
|
||||
};
|
||||
|
||||
|
|
|
@ -174,9 +174,7 @@
|
|||
var i;
|
||||
|
||||
if (typeof body !== 'string') {
|
||||
internal.startCaptureMode();
|
||||
print(body);
|
||||
body = internal.stopCaptureMode();
|
||||
body = internal.inspect(body);
|
||||
}
|
||||
|
||||
curl = "shell> curl ";
|
||||
|
@ -242,7 +240,6 @@
|
|||
return function (response) {
|
||||
var key;
|
||||
var headers = response.headers;
|
||||
var output;
|
||||
|
||||
// generate header
|
||||
appender("HTTP/1.1 " + headers['http/1.1'] + "\n");
|
||||
|
@ -260,10 +257,7 @@
|
|||
|
||||
// append body
|
||||
if (response.body !== undefined) {
|
||||
internal.startCaptureMode();
|
||||
print(response.body);
|
||||
output = internal.stopCaptureMode();
|
||||
appender(output);
|
||||
appender(internal.inspect(response.body));
|
||||
appender("\n");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
mandatory = '*';
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<tr class="tableRow" id="<%='row_' + row.id%>">
|
||||
<th class="collectionTh"><%=row.label%><%=mandatory%>:</th>
|
||||
<th class="collectionTh">
|
||||
<%
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
graphs: this.collection,
|
||||
searchString : ''
|
||||
}));
|
||||
this.events["click .tableRow"] = this.showHideDefinition.bind(this);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -264,6 +265,16 @@
|
|||
window.modalView.show("modalTable.ejs", "Graph Properties", buttons, tableContent);
|
||||
|
||||
},
|
||||
|
||||
showHideDefinition : function(e) {
|
||||
var id = $(e.currentTarget).attr("id");
|
||||
if (id == "row_newEdgeDefinitions1") {
|
||||
$('#row_fromCollections1').toggle();
|
||||
$('#row_toCollections1').toggle();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
createNewGraphModal2: function() {
|
||||
var buttons = [],
|
||||
tableContent = [];
|
||||
|
@ -278,9 +289,10 @@
|
|||
true
|
||||
)
|
||||
);
|
||||
|
||||
tableContent.push(
|
||||
window.modalView.createTextEntry(
|
||||
"newEdgeDefinitions",
|
||||
"newEdgeDefinitions1",
|
||||
"Edge definitions",
|
||||
"",
|
||||
"Some info for edge definitions",
|
||||
|
@ -288,6 +300,29 @@
|
|||
true
|
||||
)
|
||||
);
|
||||
|
||||
tableContent.push(
|
||||
window.modalView.createSelect2Entry(
|
||||
"fromCollections1",
|
||||
"fromCollections",
|
||||
"",
|
||||
"The collection that contain the start vertices of the relation.",
|
||||
"",
|
||||
true
|
||||
)
|
||||
);
|
||||
tableContent.push(
|
||||
window.modalView.createSelect2Entry(
|
||||
"toCollections1",
|
||||
"toCollections",
|
||||
"",
|
||||
"The collection that contain the end vertices of the relation.",
|
||||
"",
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
tableContent.push(
|
||||
window.modalView.createSelect2Entry(
|
||||
"newVertexCollections",
|
||||
|
@ -302,7 +337,10 @@
|
|||
window.modalView.createSuccessButton("Create", this.createNewGraph.bind(this))
|
||||
);
|
||||
|
||||
window.modalView.show("modalTable.ejs", "Add new Graph", buttons, tableContent);
|
||||
|
||||
window.modalView.show("modalTable.ejs", "Add new Graph", buttons, tableContent, null, this.events);
|
||||
$('#row_fromCollections1').hide();
|
||||
$('#row_toCollections1').hide();
|
||||
},
|
||||
|
||||
createEditGraphModal2: function(name, vertices, edges) {
|
||||
|
|
|
@ -174,9 +174,7 @@
|
|||
var i;
|
||||
|
||||
if (typeof body !== 'string') {
|
||||
internal.startCaptureMode();
|
||||
print(body);
|
||||
body = internal.stopCaptureMode();
|
||||
body = internal.inspect(body);
|
||||
}
|
||||
|
||||
curl = "shell> curl ";
|
||||
|
@ -242,7 +240,6 @@
|
|||
return function (response) {
|
||||
var key;
|
||||
var headers = response.headers;
|
||||
var output;
|
||||
|
||||
// generate header
|
||||
appender("HTTP/1.1 " + headers['http/1.1'] + "\n");
|
||||
|
@ -260,10 +257,7 @@
|
|||
|
||||
// append body
|
||||
if (response.body !== undefined) {
|
||||
internal.startCaptureMode();
|
||||
print(response.body);
|
||||
output = internal.stopCaptureMode();
|
||||
appender(output);
|
||||
appender(internal.inspect(response.body));
|
||||
appender("\n");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1152,6 +1152,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var funcRE = /function ([^\(]*)?\(\) \{ \[native code\] \}/;
|
||||
var func2RE = /function ([^\(]*)?\((.*)\) \{/;
|
||||
|
||||
exports.printRecursive = printRecursive = function (value, context) {
|
||||
'use strict';
|
||||
|
@ -1160,6 +1161,7 @@
|
|||
var customInspect = context.customInspect;
|
||||
var useToString = context.useToString;
|
||||
var limitString = context.limitString;
|
||||
var showFunction = context.showFunction;
|
||||
|
||||
if (typeof context.seen === "undefined") {
|
||||
context.seen = [];
|
||||
|
@ -1203,7 +1205,7 @@
|
|||
try {
|
||||
var s = value.toString();
|
||||
|
||||
if (0 < context.level) {
|
||||
if (0 < context.level && ! showFunction) {
|
||||
var a = s.split("\n");
|
||||
var f = a[0];
|
||||
|
||||
|
@ -1211,15 +1213,27 @@
|
|||
|
||||
if (m !== null) {
|
||||
if (m[1] === undefined) {
|
||||
context.output += '[Function {native code}]';
|
||||
context.output += 'function {native code}';
|
||||
}
|
||||
else {
|
||||
context.output += '[Function "' + m[1] + '" {native code}]';
|
||||
context.output += 'function ' + m[1] + ' {native code}';
|
||||
}
|
||||
}
|
||||
else {
|
||||
f = f.substr(8, f.length - 10).trim();
|
||||
context.output += '[Function "' + f + '"]';
|
||||
m = func2RE.exec(f);
|
||||
|
||||
if (m !== null) {
|
||||
if (m[1] === undefined) {
|
||||
context.output += 'function ' + '(' + m[2] +') { ... }';
|
||||
}
|
||||
else {
|
||||
context.output += 'function ' + m[1] + ' (' + m[2] +') { ... }';
|
||||
}
|
||||
}
|
||||
else {
|
||||
f = f.substr(8, f.length - 10).trim();
|
||||
context.output += '[Function "' + f + '" ...]';
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1377,17 +1391,18 @@
|
|||
}
|
||||
else {
|
||||
var context = {
|
||||
names: [],
|
||||
seen: [],
|
||||
path: "~",
|
||||
level: 0,
|
||||
output: "",
|
||||
prettyPrint: usePrettyPrint,
|
||||
useColor: useColor,
|
||||
customInspect: true,
|
||||
emit: 16384,
|
||||
level: 0,
|
||||
limitString: 80,
|
||||
useToString: true,
|
||||
emit: 16384
|
||||
names: [],
|
||||
output: "",
|
||||
path: "~",
|
||||
prettyPrint: usePrettyPrint,
|
||||
seen: [],
|
||||
showFunction: false,
|
||||
useColor: useColor,
|
||||
useToString: true
|
||||
};
|
||||
|
||||
printRecursive(arguments[i], context);
|
||||
|
@ -1411,14 +1426,17 @@
|
|||
'use strict';
|
||||
|
||||
var context = {
|
||||
names: [],
|
||||
seen: [],
|
||||
path: "~",
|
||||
level: 0,
|
||||
output: "",
|
||||
prettyPrint: true,
|
||||
useColor: false,
|
||||
customInspect: options && options.customInspect,
|
||||
emit: false,
|
||||
level: 0,
|
||||
limitString: false,
|
||||
names: [],
|
||||
output: "",
|
||||
path: "~",
|
||||
prettyPrint: true,
|
||||
seen: [],
|
||||
showFunction: true,
|
||||
useColor: false,
|
||||
useToString: false
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue