mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into readcache
This commit is contained in:
commit
008fc46dfc
|
@ -64,7 +64,7 @@ bool Parser::configureWriteQuery(AstNode const* collectionNode,
|
||||||
QueryResult Parser::parse(bool withDetails) {
|
QueryResult Parser::parse(bool withDetails) {
|
||||||
char const* q = queryString();
|
char const* q = queryString();
|
||||||
|
|
||||||
if (q == nullptr || *q == '\0') {
|
if (q == nullptr || *q == '\0' || remainingLength() == 0) {
|
||||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_QUERY_EMPTY);
|
THROW_ARANGO_EXCEPTION(TRI_ERROR_QUERY_EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -323,6 +323,8 @@ void Query::setExecutionTime() {
|
||||||
|
|
||||||
/// @brief extract a region from the query
|
/// @brief extract a region from the query
|
||||||
std::string Query::extractRegion(int line, int column) const {
|
std::string Query::extractRegion(int line, int column) const {
|
||||||
|
TRI_ASSERT(_queryString != nullptr);
|
||||||
|
|
||||||
// note: line numbers reported by bison/flex start at 1, columns start at 0
|
// note: line numbers reported by bison/flex start at 1, columns start at 0
|
||||||
int currentLine = 1;
|
int currentLine = 1;
|
||||||
int currentColumn = 0;
|
int currentColumn = 0;
|
||||||
|
@ -330,7 +332,7 @@ std::string Query::extractRegion(int line, int column) const {
|
||||||
char c;
|
char c;
|
||||||
char const* p = _queryString;
|
char const* p = _queryString;
|
||||||
|
|
||||||
while ((c = *p)) {
|
while ((static_cast<size_t>(p - _queryString) < _queryLength) && (c = *p)) {
|
||||||
if (currentLine > line ||
|
if (currentLine > line ||
|
||||||
(currentLine >= line && currentColumn >= column)) {
|
(currentLine >= line && currentColumn >= column)) {
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -288,7 +288,17 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var name = req.pathParams.name;
|
var name = req.pathParams.name;
|
||||||
var gm = require('@arangodb/general-graph');
|
var gm = require('@arangodb/general-graph');
|
||||||
var colors = [
|
var colors = {
|
||||||
|
default: [
|
||||||
|
'#68BDF6',
|
||||||
|
'#6DCE9E',
|
||||||
|
'#FF756E',
|
||||||
|
'#DE9BF9',
|
||||||
|
'#FB95AF',
|
||||||
|
'#FFD86E',
|
||||||
|
'#A5ABB6'
|
||||||
|
],
|
||||||
|
highContrast: [
|
||||||
'#EACD3F',
|
'#EACD3F',
|
||||||
'#6F308A',
|
'#6F308A',
|
||||||
'#DA6927',
|
'#DA6927',
|
||||||
|
@ -310,7 +320,8 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
'#6D3312',
|
'#6D3312',
|
||||||
'#D02C26',
|
'#D02C26',
|
||||||
'#2A3415'
|
'#2A3415'
|
||||||
];
|
]
|
||||||
|
};
|
||||||
// var traversal = require("@arangodb/graph/traversal");
|
// var traversal = require("@arangodb/graph/traversal");
|
||||||
|
|
||||||
var graph = gm._graph(name);
|
var graph = gm._graph(name);
|
||||||
|
@ -426,7 +437,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjEdges.hasOwnProperty(coll)) {
|
if (tmpObjEdges.hasOwnProperty(coll)) {
|
||||||
edgeObj.color = tmpObjEdges[coll];
|
edgeObj.color = tmpObjEdges[coll];
|
||||||
} else {
|
} else {
|
||||||
tmpObjEdges[coll] = colors[Object.keys(tmpObjEdges).length];
|
tmpObjEdges[coll] = colors.default[Object.keys(tmpObjEdges).length];
|
||||||
edgeObj.color = tmpObjEdges[coll];
|
edgeObj.color = tmpObjEdges[coll];
|
||||||
}
|
}
|
||||||
} else if (config.edgeColorAttribute !== '') {
|
} else if (config.edgeColorAttribute !== '') {
|
||||||
|
@ -435,7 +446,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjEdges.hasOwnProperty(attr)) {
|
if (tmpObjEdges.hasOwnProperty(attr)) {
|
||||||
edgeObj.color = tmpObjEdges[attr];
|
edgeObj.color = tmpObjEdges[attr];
|
||||||
} else {
|
} else {
|
||||||
tmpObjEdges[attr] = colors[Object.keys(tmpObjEdges).length];
|
tmpObjEdges[attr] = colors.default[Object.keys(tmpObjEdges).length];
|
||||||
edgeObj.color = tmpObjEdges[attr];
|
edgeObj.color = tmpObjEdges[attr];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,7 +498,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjNodes.hasOwnProperty(coll)) {
|
if (tmpObjNodes.hasOwnProperty(coll)) {
|
||||||
nodeObj.color = tmpObjNodes[coll];
|
nodeObj.color = tmpObjNodes[coll];
|
||||||
} else {
|
} else {
|
||||||
tmpObjNodes[coll] = colors[Object.keys(tmpObjNodes).length];
|
tmpObjNodes[coll] = colors.default[Object.keys(tmpObjNodes).length];
|
||||||
nodeObj.color = tmpObjNodes[coll];
|
nodeObj.color = tmpObjNodes[coll];
|
||||||
}
|
}
|
||||||
} else if (config.nodeColorAttribute !== '') {
|
} else if (config.nodeColorAttribute !== '') {
|
||||||
|
@ -496,7 +507,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjNodes.hasOwnProperty(attr)) {
|
if (tmpObjNodes.hasOwnProperty(attr)) {
|
||||||
nodeObj.color = tmpObjNodes[attr];
|
nodeObj.color = tmpObjNodes[attr];
|
||||||
} else {
|
} else {
|
||||||
tmpObjNodes[attr] = colors[Object.keys(tmpObjNodes).length];
|
tmpObjNodes[attr] = colors.default[Object.keys(tmpObjNodes).length];
|
||||||
nodeObj.color = tmpObjNodes[attr];
|
nodeObj.color = tmpObjNodes[attr];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -2710,4 +2710,4 @@ var cutByResolution = function (str) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="workMonitorContent" class="innerContent">
|
<div id="workMonitorContent" class="innerContent">
|
||||||
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img class="arangodbLogo" src="img/arangodb_logo_big.png"></a><a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a><a class="version"><span>VERSION: </span><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="graphSettingsContent" style="display: none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1469461944991"></script><script src="app.js?version=1469461944991"></script></body></html>
|
</div></script></head><body><nav class="navbar" style="display: none"><div class="primary"><div class="navlogo"><a class="logo big" href="#"><img class="arangodbLogo" src="img/arangodb_logo_big.png"></a><a class="logo small" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a><a class="version"><span>VERSION: </span><span id="currentVersion"></span></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div id="modalPlaceholder"></div><div class="bodyWrapper" style="display: none"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="loadingScreen" class="loadingScreen" style="display: none"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw margin-bottom"></i> <span class="sr-only">Loading...</span></div><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div id="graphSettingsContent" style="display: none"></div><div id="offlinePlaceholder" style="display:none"><div class="offline-div"><div class="pure-u"><div class="pure-u-1-4"></div><div class="pure-u-1-2 offline-window"><div class="offline-header"><h3>You have been disconnected from the server</h3></div><div class="offline-body"><p>The connection to the server has been lost. The server may be under heavy load.</p><p>Trying to reconnect in <span id="offlineSeconds">10</span> seconds.</p><p class="animation_state"><span><button class="button-success">Reconnect now</button></span></p></div></div><div class="pure-u-1-4"></div></div></div></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="libs.js?version=1469532665016"></script><script src="app.js?version=1469532665016"></script></body></html>
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -75,7 +75,7 @@
|
||||||
},
|
},
|
||||||
'nodeLabelByCollection': {
|
'nodeLabelByCollection': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'Label by coll?',
|
name: 'Label by collection?',
|
||||||
desc: 'Set label text by collection. If activated node label attribute will be ignored.',
|
desc: 'Set label text by collection. If activated node label attribute will be ignored.',
|
||||||
yes: {
|
yes: {
|
||||||
name: 'Yes',
|
name: 'Yes',
|
||||||
|
@ -100,12 +100,12 @@
|
||||||
},
|
},
|
||||||
'nodeColorAttribute': {
|
'nodeColorAttribute': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
name: 'Colorize attr',
|
name: 'Color attribute',
|
||||||
desc: 'If an attribute is given, nodes will then be colorized by the attribute. This setting ignores default node color if set.'
|
desc: 'If an attribute is given, nodes will then be colorized by the attribute. This setting ignores default node color if set.'
|
||||||
},
|
},
|
||||||
'nodeColorByCollection': {
|
'nodeColorByCollection': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'Colorize by coll?',
|
name: 'Color by collection?',
|
||||||
no: {
|
no: {
|
||||||
name: 'No',
|
name: 'No',
|
||||||
val: 'false'
|
val: 'false'
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
},
|
},
|
||||||
'edgeLabelByCollection': {
|
'edgeLabelByCollection': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'Label by coll?',
|
name: 'Label by collection?',
|
||||||
desc: 'Set label text by collection. If activated edge label attribute will be ignored.',
|
desc: 'Set label text by collection. If activated edge label attribute will be ignored.',
|
||||||
yes: {
|
yes: {
|
||||||
name: 'Yes',
|
name: 'Yes',
|
||||||
|
@ -157,12 +157,12 @@
|
||||||
},
|
},
|
||||||
'edgeColorAttribute': {
|
'edgeColorAttribute': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
name: 'Colorize attr',
|
name: 'Color attribute',
|
||||||
desc: 'If an attribute is given, edges will then be colorized by the attribute. This setting ignores default edge color if set.'
|
desc: 'If an attribute is given, edges will then be colorized by the attribute. This setting ignores default edge color if set.'
|
||||||
},
|
},
|
||||||
'edgeColorByCollection': {
|
'edgeColorByCollection': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
name: 'Colorize by coll?',
|
name: 'Color by collection?',
|
||||||
no: {
|
no: {
|
||||||
name: 'No',
|
name: 'No',
|
||||||
val: 'false'
|
val: 'false'
|
||||||
|
@ -315,7 +315,7 @@
|
||||||
depth: '2',
|
depth: '2',
|
||||||
nodeColor: '#2ecc71',
|
nodeColor: '#2ecc71',
|
||||||
nodeColorAttribute: '',
|
nodeColorAttribute: '',
|
||||||
nodeColorByCollection: 'false',
|
nodeColorByCollection: 'true',
|
||||||
nodeLabelThreshold: 10,
|
nodeLabelThreshold: 10,
|
||||||
edgeColor: '#cccccc',
|
edgeColor: '#cccccc',
|
||||||
edgeColorAttribute: '',
|
edgeColorAttribute: '',
|
||||||
|
@ -323,10 +323,10 @@
|
||||||
edgeLabelThreshold: 10,
|
edgeLabelThreshold: 10,
|
||||||
nodeLabel: '_key',
|
nodeLabel: '_key',
|
||||||
edgeLabel: '',
|
edgeLabel: '',
|
||||||
edgeType: 'line',
|
edgeType: 'arrow',
|
||||||
nodeSize: '',
|
nodeSize: '',
|
||||||
edgeEditable: 'false',
|
edgeEditable: 'false',
|
||||||
nodeLabelByCollection: 'true',
|
nodeLabelByCollection: 'false',
|
||||||
edgeLabelByCollection: 'true',
|
edgeLabelByCollection: 'true',
|
||||||
nodeStart: ''
|
nodeStart: ''
|
||||||
};
|
};
|
||||||
|
|
|
@ -921,7 +921,7 @@
|
||||||
wheel.multiSelect = true;
|
wheel.multiSelect = true;
|
||||||
wheel.clickModeRotate = false;
|
wheel.clickModeRotate = false;
|
||||||
wheel.slicePathFunction = slicePath().DonutSlice;
|
wheel.slicePathFunction = slicePath().DonutSlice;
|
||||||
wheel.createWheel([icon.edit, icon.trash, icon.play, icon.connect]);
|
wheel.createWheel([icon.edit, icon.trash, icon.flag, icon.connect]);
|
||||||
|
|
||||||
wheel.navItems[0].selected = false;
|
wheel.navItems[0].selected = false;
|
||||||
wheel.navItems[0].hovered = false;
|
wheel.navItems[0].hovered = false;
|
||||||
|
@ -992,6 +992,7 @@
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(fromX, fromY);
|
ctx.moveTo(fromX, fromY);
|
||||||
ctx.lineTo(toX, toY);
|
ctx.lineTo(toX, toY);
|
||||||
|
ctx.strokeStyle = this.newEdgeColor;
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1024,7 +1025,7 @@
|
||||||
|
|
||||||
setStartNode: function (id) {
|
setStartNode: function (id) {
|
||||||
this.graphConfig.nodeStart = id;
|
this.graphConfig.nodeStart = id;
|
||||||
this.graphSettingsView.saveGraphSettings(null, id);
|
this.graphSettingsView.saveGraphSettings(undefined, undefined, id);
|
||||||
},
|
},
|
||||||
|
|
||||||
editNode: function (id) {
|
editNode: function (id) {
|
||||||
|
@ -1147,15 +1148,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sigmajs graph settings
|
||||||
var settings = {
|
var settings = {
|
||||||
|
borderSize: 3,
|
||||||
|
defaultNodeBorderColor: '#8c8c8c',
|
||||||
doubleClickEnabled: false,
|
doubleClickEnabled: false,
|
||||||
minNodeSize: 20,
|
minNodeSize: 20,
|
||||||
minEdgeSize: 1,
|
minEdgeSize: 1,
|
||||||
maxEdgeSize: 4,
|
maxEdgeSize: 4,
|
||||||
enableEdgeHovering: true,
|
enableEdgeHovering: true,
|
||||||
edgeHoverColor: '#000',
|
edgeHoverColor: '#8c8c8c',
|
||||||
defaultEdgeHoverColor: '#000',
|
defaultEdgeHoverColor: '#8c8c8c',
|
||||||
defaultEdgeType: 'line',
|
defaultEdgeType: 'arrow',
|
||||||
edgeHoverSizeRatio: 2,
|
edgeHoverSizeRatio: 2,
|
||||||
edgeHoverExtremities: true,
|
edgeHoverExtremities: true,
|
||||||
nodesPowRatio: 1,
|
nodesPowRatio: 1,
|
||||||
|
@ -1278,9 +1282,13 @@
|
||||||
var callback = function (error, data) {
|
var callback = function (error, data) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
var attributes = '';
|
var attributes = '';
|
||||||
|
attributes += 'ID <span class="nodeId">' + data._id + '</span>';
|
||||||
|
if (Object.keys(data).length > 3) {
|
||||||
|
attributes += 'KEYS ';
|
||||||
|
}
|
||||||
_.each(data, function (value, key) {
|
_.each(data, function (value, key) {
|
||||||
if (key !== '_key' && key !== '_id' && key !== '_rev' && key !== '_from' && key !== '_to') {
|
if (key !== '_key' && key !== '_id' && key !== '_rev' && key !== '_from' && key !== '_to') {
|
||||||
attributes += ('<span class="nodeAttribute">' + key + '</span>');
|
attributes += '<span class="nodeAttribute">' + key + '</span>';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var string = '<div id="nodeInfoDiv" class="nodeInfoDiv">' + attributes + '</div>';
|
var string = '<div id="nodeInfoDiv" class="nodeInfoDiv">' + attributes + '</div>';
|
||||||
|
@ -1299,24 +1307,32 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
s.bind('overNode', function (e) {
|
s.bind('overNode', function (e) {
|
||||||
showAttributes(e, true);
|
if (self.contextState.createEdge === true) {
|
||||||
|
self.newEdgeColor = '#ff0000';
|
||||||
|
} else {
|
||||||
|
self.newEdgeColor = '#000000';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
s.bind('overEdge', function (e) {
|
s.bind('clickEdge', function (e) {
|
||||||
showAttributes(e, false);
|
showAttributes(e, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
s.bind('outNode', function (e) {
|
s.bind('outNode', function (e) {
|
||||||
if (self.contextState.createEdge === false) {
|
if (self.contextState.createEdge === false) {
|
||||||
$('.nodeInfoDiv').remove();
|
$('.nodeInfoDiv').remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
s.bind('outEdge', function (e) {
|
s.bind('outEdge', function (e) {
|
||||||
if (self.contextState.createEdge === false) {
|
if (self.contextState.createEdge === false) {
|
||||||
$('.nodeInfoDiv').remove();
|
$('.nodeInfoDiv').remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
s.bind('clickNode', function (e) {
|
s.bind('clickNode', function (e) {
|
||||||
if (self.contextState.createEdge === true) {
|
if (self.contextState.createEdge === true) {
|
||||||
|
@ -1328,6 +1344,8 @@
|
||||||
// validate edgeDefinitions
|
// validate edgeDefinitions
|
||||||
var foundEdgeDefinitions = self.getEdgeDefinitionCollections(fromCollection, toCollection);
|
var foundEdgeDefinitions = self.getEdgeDefinitionCollections(fromCollection, toCollection);
|
||||||
self.addEdgeModal(foundEdgeDefinitions, self.contextState._from, self.contextState._to);
|
self.addEdgeModal(foundEdgeDefinitions, self.contextState._from, self.contextState._to);
|
||||||
|
} else {
|
||||||
|
showAttributes(e, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -456,6 +456,11 @@
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var queryData = this.readQueryData();
|
var queryData = this.readQueryData();
|
||||||
|
|
||||||
|
if (queryData === 'false') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#outputEditorWrapper' + counter + ' .queryExecutionTime').text('');
|
$('#outputEditorWrapper' + counter + ' .queryExecutionTime').text('');
|
||||||
this.execPending = false;
|
this.execPending = false;
|
||||||
|
|
||||||
|
@ -575,7 +580,7 @@
|
||||||
|
|
||||||
fillSelectBoxes: function () {
|
fillSelectBoxes: function () {
|
||||||
// fill select box with # of results
|
// fill select box with # of results
|
||||||
var querySize = 1000;
|
var querySize = 100;
|
||||||
var sizeBox = $('#querySize');
|
var sizeBox = $('#querySize');
|
||||||
sizeBox.empty();
|
sizeBox.empty();
|
||||||
|
|
||||||
|
@ -999,7 +1004,7 @@
|
||||||
name: 'executeSelectedQuery',
|
name: 'executeSelectedQuery',
|
||||||
bindKey: {win: 'Ctrl-Alt-Return', mac: 'Command-Alt-Return', linux: 'Ctrl-Alt-Return'},
|
bindKey: {win: 'Ctrl-Alt-Return', mac: 'Command-Alt-Return', linux: 'Ctrl-Alt-Return'},
|
||||||
exec: function () {
|
exec: function () {
|
||||||
self.executeQuery(true);
|
self.executeQuery(undefined, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1256,7 +1261,7 @@
|
||||||
return quit;
|
return quit;
|
||||||
},
|
},
|
||||||
|
|
||||||
executeQuery: function (selected) {
|
executeQuery: function (e, selected) {
|
||||||
if (this.verifyQueryAndParams()) {
|
if (this.verifyQueryAndParams()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1309,7 +1314,14 @@
|
||||||
} else {
|
} else {
|
||||||
data.query = this.aqlEditor.getValue();
|
data.query = this.aqlEditor.getValue();
|
||||||
}
|
}
|
||||||
|
if (data.query.length === 0) {
|
||||||
|
if (selected) {
|
||||||
|
arangoHelper.arangoError('Query', 'Your query selection is empty!');
|
||||||
|
} else {
|
||||||
|
arangoHelper.arangoError('Query', 'Your query is empty!');
|
||||||
|
}
|
||||||
|
data = false;
|
||||||
|
} else {
|
||||||
if (sizeBox.val() === 'all') {
|
if (sizeBox.val() === 'all') {
|
||||||
data.batchSize = 1000000;
|
data.batchSize = 1000000;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1319,6 +1331,8 @@
|
||||||
if (Object.keys(this.bindParamTableObj).length > 0) {
|
if (Object.keys(this.bindParamTableObj).length > 0) {
|
||||||
data.bindVars = this.bindParamTableObj;
|
data.bindVars = this.bindParamTableObj;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return JSON.stringify(data);
|
return JSON.stringify(data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1327,6 +1341,10 @@
|
||||||
|
|
||||||
var queryData = this.readQueryData(selected);
|
var queryData = this.readQueryData(selected);
|
||||||
|
|
||||||
|
if (queryData === 'false') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (queryData) {
|
if (queryData) {
|
||||||
sentQueryEditor.setValue(self.aqlEditor.getValue(), 1);
|
sentQueryEditor.setValue(self.aqlEditor.getValue(), 1);
|
||||||
|
|
||||||
|
@ -1598,7 +1616,7 @@
|
||||||
if (error.code === 409) {
|
if (error.code === 409) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (error.code !== 400 && error.code !== 404) {
|
if (error.code !== 400 && error.code !== 404 && error.code !== 500) {
|
||||||
arangoHelper.arangoNotification('Query', 'Successfully aborted.');
|
arangoHelper.arangoNotification('Query', 'Successfully aborted.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
.nodeInfoDiv {
|
.nodeInfoDiv {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
color: $c-bluegrey-dark;
|
||||||
|
font-weight: 500;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
left: 165px;
|
left: 165px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -53,7 +55,8 @@
|
||||||
right: 15px;
|
right: 15px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.nodeAttribute {
|
.nodeAttribute,
|
||||||
|
.nodeId {
|
||||||
background-color: $c-info-blue;
|
background-color: $c-info-blue;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: $c-white;
|
color: $c-white;
|
||||||
|
@ -61,6 +64,11 @@
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nodeId {
|
||||||
|
background-color: $c-positive;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nodeContextMenu {
|
.nodeContextMenu {
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This requires the perf utility to be installed and the OS must be linux.
|
||||||
|
# Compile with CMAKE_BUILD_TYPE=RelWithDebInfo in the subdirectory "build".
|
||||||
|
# Run this script in the main source directory.
|
||||||
|
#
|
||||||
|
# This script sets up performance monitoring events to measure single
|
||||||
|
# document operations. Run this script with sudo when the ArangoDB
|
||||||
|
# process is already running. Then do
|
||||||
|
# sudo perf record -e "probe_arangod:*" -aR sleep 60
|
||||||
|
# (to sample for 60 seconds). A file "perf.data" is written to the
|
||||||
|
# current directory.
|
||||||
|
# Dump the events in this file with
|
||||||
|
# sudo perf script
|
||||||
|
# This logs the times when individual threads hit the events.
|
||||||
|
# Remove all events with
|
||||||
|
# sudo perf probe -d "probe_arangod:*"
|
||||||
|
# List events with
|
||||||
|
# sudo perf probe -l
|
||||||
|
|
||||||
|
ARANGOD_EXECUTABLE=build/bin/arangod
|
||||||
|
perf probe -x $ARANGOD_EXECUTABLE -d "probe_arangod:*"
|
||||||
|
|
||||||
|
echo Adding events, this takes a few seconds...
|
||||||
|
|
||||||
|
addEvent() {
|
||||||
|
x=$1
|
||||||
|
echo $x
|
||||||
|
perf probe -x $ARANGOD_EXECUTABLE -a $x=$x 2> /dev/null
|
||||||
|
perf probe -x $ARANGOD_EXECUTABLE -a ${x}Ret=$x%return 2> /dev/null
|
||||||
|
}
|
||||||
|
echo Single document operations...
|
||||||
|
addEvent insertLocal
|
||||||
|
addEvent removeLocal
|
||||||
|
addEvent modifyLocal
|
||||||
|
addEvent documentLocal
|
||||||
|
|
||||||
|
echo Single document operations on coordinator...
|
||||||
|
addEvent insertCoordinator
|
||||||
|
addEvent removeCoordinator
|
||||||
|
addEvent updateCoordinator
|
||||||
|
addEvent replaceCoordinator
|
||||||
|
addEvent documentCoordinator
|
||||||
|
|
||||||
|
echo work method in HttpServerJob
|
||||||
|
addEvent work@HttpServerJob.cpp
|
||||||
|
|
||||||
|
echo Done.
|
Loading…
Reference in New Issue