mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
cc12a75be9
|
@ -3,7 +3,7 @@
|
|||
@brief keyfile containing server certificate
|
||||
`--ssl.keyfile filename`
|
||||
|
||||
If SSL encryption is used, this option must be used to specify the filename
|
||||
If SSL encryption is used, this option must be used to specify the filename
|
||||
of the server private key. The file must be PEM formatted and contain both
|
||||
the certificate and the server's private key.
|
||||
|
||||
|
@ -23,7 +23,7 @@ cp server.key server.key.org
|
|||
openssl rsa -in server.key.org -out server.key
|
||||
|
||||
# sign the csr with the key, creates certificate PEM file "server.crt"
|
||||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out
|
||||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out \
|
||||
server.crt
|
||||
|
||||
# combine certificate and key into single PEM file "server.pem"
|
||||
|
|
|
@ -9,40 +9,50 @@ EXAMPLES=1
|
|||
LINT=1
|
||||
|
||||
while [ "$#" -gt 1 ]; do
|
||||
if [ "$1" == "--no-lint" ]; then
|
||||
LINT=0
|
||||
shift
|
||||
fi
|
||||
case "$1" in
|
||||
--no-lint)
|
||||
LINT=0
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--no-build" ]; then
|
||||
BUILD=0
|
||||
shift
|
||||
fi
|
||||
--no-build)
|
||||
BUILD=0
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--recycle-build" ]; then
|
||||
BUILD=2
|
||||
shift
|
||||
fi
|
||||
--recycle-build)
|
||||
BUILD=2
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--no-swagger" ]; then
|
||||
SWAGGER=0
|
||||
shift
|
||||
fi
|
||||
--no-swagger)
|
||||
SWAGGER=0
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--no-examples" ]; then
|
||||
EXAMPLES=0
|
||||
shift
|
||||
fi
|
||||
--no-examples)
|
||||
EXAMPLES=0
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--no-commit" ]; then
|
||||
TAG=0
|
||||
shift
|
||||
fi
|
||||
--no-commit)
|
||||
TAG=0
|
||||
shift
|
||||
;;
|
||||
|
||||
if [ "$1" == "--no-book" ]; then
|
||||
BOOK=0
|
||||
shift
|
||||
fi
|
||||
--no-book)
|
||||
BOOK=0
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
if test -n "${VERSION}"; then
|
||||
echo "we already have a version ${VERSION} aborting because of $1"
|
||||
exit 1
|
||||
fi
|
||||
VERSION="$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
|
@ -50,7 +60,6 @@ if [ "$#" -ne 1 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
VERSION="$1"
|
||||
|
||||
if echo ${VERSION} | grep -q -- '-'; then
|
||||
echo "${VERSION} mustn't contain minuses! "
|
||||
|
|
|
@ -892,7 +892,7 @@ VPackSlice AstNode::computeValue() const {
|
|||
|
||||
/// @brief compute the value for a constant value node
|
||||
/// the value is owned by the node and must not be freed by the caller
|
||||
VPackSlice AstNode::computeValue(Transaction* trx) const {
|
||||
VPackSlice AstNode::computeValue(arangodb::Transaction* trx) const {
|
||||
TRI_ASSERT(isConstant());
|
||||
|
||||
if (computedValue == nullptr) {
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
using namespace arangodb::aql;
|
||||
|
||||
CollectionScanner::CollectionScanner(arangodb::Transaction* trx,
|
||||
ManagedDocumentResult* mmdr,
|
||||
arangodb::ManagedDocumentResult* mmdr,
|
||||
std::string const& collection,
|
||||
bool readRandom)
|
||||
: _cursor(trx->indexScan(collection,
|
||||
(readRandom ? Transaction::CursorType::ANY
|
||||
: Transaction::CursorType::ALL),
|
||||
(readRandom ? arangodb::Transaction::CursorType::ANY
|
||||
: arangodb::Transaction::CursorType::ALL),
|
||||
Transaction::IndexHandle(), VPackSlice(), mmdr, 0,
|
||||
UINT64_MAX, 1000, false)) {
|
||||
TRI_ASSERT(_cursor->successful());
|
||||
|
@ -42,7 +42,7 @@ CollectionScanner::CollectionScanner(arangodb::Transaction* trx,
|
|||
|
||||
CollectionScanner::~CollectionScanner() {}
|
||||
|
||||
void CollectionScanner::scan(std::vector<IndexLookupResult>& result, size_t batchSize) {
|
||||
void CollectionScanner::scan(std::vector<arangodb::IndexLookupResult>& result, size_t batchSize) {
|
||||
result.clear();
|
||||
|
||||
if (!_cursor->hasMore()) {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace arangodb {
|
||||
class ManagedDocumentResult;
|
||||
class OperationCursor;
|
||||
struct OperationCursor;
|
||||
class Transaction;
|
||||
|
||||
namespace aql {
|
||||
|
|
|
@ -261,12 +261,14 @@ bool Ditches::contains(Ditch::DitchType type) {
|
|||
void Ditches::freeDitch(Ditch* ditch) {
|
||||
TRI_ASSERT(ditch != nullptr);
|
||||
|
||||
bool const isDocumentDitch = (ditch->type() == Ditch::TRI_DITCH_DOCUMENT);
|
||||
|
||||
{
|
||||
MUTEX_LOCKER(mutexLocker, _lock);
|
||||
|
||||
unlink(ditch);
|
||||
|
||||
if (ditch->type() == Ditch::TRI_DITCH_DOCUMENT) {
|
||||
if (isDocumentDitch) {
|
||||
// decrease counter
|
||||
--_numDocumentDitches;
|
||||
}
|
||||
|
@ -415,16 +417,15 @@ void Ditches::link(Ditch* ditch) {
|
|||
// empty list
|
||||
if (_end == nullptr) {
|
||||
_begin = ditch;
|
||||
_end = ditch;
|
||||
}
|
||||
|
||||
// add to the end
|
||||
else {
|
||||
ditch->_prev = _end;
|
||||
|
||||
_end->_next = ditch;
|
||||
_end = ditch;
|
||||
}
|
||||
|
||||
_end = ditch;
|
||||
|
||||
if (isDocumentDitch) {
|
||||
// increase counter
|
||||
|
|
|
@ -62,7 +62,7 @@ EdgeCollectionInfo::EdgeCollectionInfo(arangodb::Transaction* trx,
|
|||
|
||||
std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getEdges(
|
||||
std::string const& vertexId,
|
||||
ManagedDocumentResult* mmdr) {
|
||||
arangodb::ManagedDocumentResult* mmdr) {
|
||||
_searchBuilder.clear();
|
||||
EdgeIndex::buildSearchValue(_forwardDir, vertexId, _searchBuilder);
|
||||
return _trx->indexScan(_collectionName,
|
||||
|
@ -72,7 +72,7 @@ std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getEdges(
|
|||
|
||||
std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getEdges(
|
||||
VPackSlice const& vertexId,
|
||||
ManagedDocumentResult* mmdr) {
|
||||
arangodb::ManagedDocumentResult* mmdr) {
|
||||
_searchBuilder.clear();
|
||||
EdgeIndex::buildSearchValue(_forwardDir, vertexId, _searchBuilder);
|
||||
return _trx->indexScan(_collectionName,
|
||||
|
@ -102,7 +102,7 @@ int EdgeCollectionInfo::getEdgesCoordinator(VPackSlice const& vertexId,
|
|||
|
||||
std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getReverseEdges(
|
||||
std::string const& vertexId,
|
||||
ManagedDocumentResult* mmdr) {
|
||||
arangodb::ManagedDocumentResult* mmdr) {
|
||||
_searchBuilder.clear();
|
||||
EdgeIndex::buildSearchValue(_backwardDir, vertexId, _searchBuilder);
|
||||
return _trx->indexScan(_collectionName,
|
||||
|
@ -112,7 +112,7 @@ std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getReverseEdges(
|
|||
|
||||
std::unique_ptr<arangodb::OperationCursor> EdgeCollectionInfo::getReverseEdges(
|
||||
VPackSlice const& vertexId,
|
||||
ManagedDocumentResult* mmdr) {
|
||||
arangodb::ManagedDocumentResult* mmdr) {
|
||||
_searchBuilder.clear();
|
||||
EdgeIndex::buildSearchValue(_backwardDir, vertexId, _searchBuilder);
|
||||
return _trx->indexScan(_collectionName,
|
||||
|
|
|
@ -332,7 +332,7 @@ void Traverser::UniqueVertexGetter::reset(VPackSlice startVertex) {
|
|||
}
|
||||
|
||||
Traverser::Traverser(arangodb::traverser::TraverserOptions* opts, arangodb::Transaction* trx,
|
||||
ManagedDocumentResult* mmdr)
|
||||
arangodb::ManagedDocumentResult* mmdr)
|
||||
: _trx(trx),
|
||||
_mmdr(mmdr),
|
||||
_startIdBuilder(trx),
|
||||
|
|
|
@ -19,11 +19,7 @@
|
|||
"frontend/js/lib/bootstrap-min.js",
|
||||
"frontend/js/lib/d3.min.js",
|
||||
"frontend/js/lib/nv.d3.min.js",
|
||||
"frontend/js/lib/dygraph-combined.min.js",
|
||||
"frontend/js/lib/jquery-2.1.0.min.js",
|
||||
"frontend/js/lib/underscore-min.js",
|
||||
"frontend/js/lib/backbone-min.js",
|
||||
"frontend/js/lib/bootstrap-min.js"
|
||||
"frontend/js/lib/dygraph-combined.min.js"
|
||||
],
|
||||
css: [
|
||||
"frontend/css/swagger/hightlight.default.css",
|
||||
|
|
|
@ -510,6 +510,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
|||
}
|
||||
}
|
||||
}
|
||||
edgeObj.sortColor = edgeObj.color;
|
||||
edgesObj[edge._id] = edgeObj;
|
||||
});
|
||||
|
||||
|
@ -548,6 +549,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
|||
label: nodeLabel,
|
||||
size: nodeSize || 3,
|
||||
color: config.nodeColor || '#2ecc71',
|
||||
sortColor: undefined,
|
||||
x: Math.random(),
|
||||
y: Math.random()
|
||||
};
|
||||
|
@ -572,6 +574,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
|||
}
|
||||
}
|
||||
|
||||
nodeObj.sortColor = nodeObj.color;
|
||||
nodesObj[node._id] = nodeObj;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -350,7 +350,11 @@
|
|||
if (value === 'true') {
|
||||
window.App.graphViewer.switchNodeColorByCollection(true);
|
||||
} else {
|
||||
window.App.graphViewer.switchNodeColorByCollection(false);
|
||||
if ($('#g_nodeColorAttribute').is(':disabled')) {
|
||||
window.App.graphViewer.switchNodeColorByCollection(false);
|
||||
} else {
|
||||
window.App.graphViewer.switchNodeColorByCollection(false, true);
|
||||
}
|
||||
}
|
||||
return;
|
||||
// EDGES COLORING
|
||||
|
@ -359,7 +363,11 @@
|
|||
if (value === 'true') {
|
||||
window.App.graphViewer.switchEdgeColorByCollection(true);
|
||||
} else {
|
||||
window.App.graphViewer.switchEdgeColorByCollection(false);
|
||||
if ($('#g_nodeColorAttribute').is(':disabled')) {
|
||||
window.App.graphViewer.switchEdgeColorByCollection(false);
|
||||
} else {
|
||||
window.App.graphViewer.switchEdgeColorByCollection(false, true);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -259,24 +259,31 @@
|
|||
this.killCurrentGraph();
|
||||
// TODO add WebGL features
|
||||
this.renderGraph(this.graphData.modified, null, false, layout, 'canvas');
|
||||
|
||||
if ($('#g_nodeColorByCollection').val() === 'true') {
|
||||
this.switchNodeColorByCollection(true);
|
||||
} else {
|
||||
if (this.ncolor) {
|
||||
this.updateColors(true, true, this.ncolor, this.ecolor);
|
||||
if ($('#g_nodeColor').is(':disabled')) {
|
||||
this.updateColors(true, true, null, null, true);
|
||||
} else {
|
||||
this.updateColors(true, true, '#2ecc71', '#2ecc71');
|
||||
if (this.ncolor) {
|
||||
this.updateColors(true, true, this.ncolor, this.ecolor);
|
||||
} else {
|
||||
this.updateColors(true, true, '#2ecc71', '#2ecc71');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($('#g_edgeColorByCollection').val() === 'true') {
|
||||
this.switchEdgeColorByCollection(true);
|
||||
} else {
|
||||
if (this.ecolor) {
|
||||
this.updateColors(true, true, this.ncolor, this.ecolor);
|
||||
if ($('#g_edgeColor').is(':disabled')) {
|
||||
this.updateColors(true, true, null, null, true);
|
||||
} else {
|
||||
this.updateColors(true, true, '#2ecc71', '#2ecc71');
|
||||
if (this.ecolor) {
|
||||
this.updateColors(true, true, this.ncolor, this.ecolor);
|
||||
} else {
|
||||
this.updateColors(true, true, '#2ecc71', '#2ecc71');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -315,7 +322,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
switchNodeColorByCollection: function (boolean) {
|
||||
switchNodeColorByCollection: function (boolean, origin) {
|
||||
var self = this;
|
||||
self.buildCollectionColors();
|
||||
if (boolean) {
|
||||
|
@ -325,15 +332,19 @@
|
|||
|
||||
self.currentGraph.refresh();
|
||||
} else {
|
||||
if (this.ncolor) {
|
||||
this.updateColors(true, null, this.ncolor, this.ecolor);
|
||||
if (origin) {
|
||||
this.updateColors(true, null, null, null, origin);
|
||||
} else {
|
||||
this.updateColors(true, null, '#2ecc71', '#2ecc71');
|
||||
if (this.ncolor) {
|
||||
this.updateColors(true, null, this.ncolor, this.ecolor);
|
||||
} else {
|
||||
this.updateColors(true, null, '#2ecc71', '#2ecc71');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
switchEdgeColorByCollection: function (boolean) {
|
||||
switchEdgeColorByCollection: function (boolean, origin) {
|
||||
var self = this;
|
||||
self.buildCollectionColors();
|
||||
|
||||
|
@ -344,10 +355,14 @@
|
|||
|
||||
self.currentGraph.refresh();
|
||||
} else {
|
||||
if (this.ecolor) {
|
||||
this.updateColors(null, true, this.ncolor, this.ecolor);
|
||||
if (origin) {
|
||||
this.updateColors(true, null, null, null, origin);
|
||||
} else {
|
||||
this.updateColors(null, true, '#2ecc71', '#2ecc71');
|
||||
if (this.ecolor) {
|
||||
this.updateColors(null, true, this.ncolor, this.ecolor);
|
||||
} else {
|
||||
this.updateColors(null, true, '#2ecc71', '#2ecc71');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1084,7 +1099,7 @@
|
|||
}
|
||||
},
|
||||
|
||||
updateColors: function (nodes, edges, ncolor, ecolor) {
|
||||
updateColors: function (nodes, edges, ncolor, ecolor, origin) {
|
||||
var combinedName = frontendConfig.db + '_' + this.name;
|
||||
var self = this;
|
||||
|
||||
|
@ -1101,7 +1116,11 @@
|
|||
self.graphConfig = data.toJSON().graphs[combinedName];
|
||||
try {
|
||||
self.currentGraph.graph.nodes().forEach(function (n) {
|
||||
n.color = ncolor;
|
||||
if (origin) {
|
||||
n.color = n.sortColor;
|
||||
} else {
|
||||
n.color = ncolor;
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
self.graphNotInitialized = true;
|
||||
|
@ -1112,7 +1131,11 @@
|
|||
if (edges === true) {
|
||||
try {
|
||||
self.currentGraph.graph.edges().forEach(function (e) {
|
||||
e.color = ecolor;
|
||||
if (origin) {
|
||||
e.color = e.sortColor;
|
||||
} else {
|
||||
e.color = ecolor;
|
||||
}
|
||||
});
|
||||
} catch (ignore) {
|
||||
self.graphNotInitialized = true;
|
||||
|
|
Loading…
Reference in New Issue