mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into FMH
This commit is contained in:
commit
3bb24146a6
|
@ -214,8 +214,7 @@ class Slice {
|
||||||
|
|
||||||
// check if a slice is any number type
|
// check if a slice is any number type
|
||||||
bool isInteger() const throw() {
|
bool isInteger() const throw() {
|
||||||
return isType(ValueType::Int) || isType(ValueType::UInt) ||
|
return (isInt() || isUInt() || isSmallInt());
|
||||||
isType(ValueType::SmallInt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if slice is any Number-type object
|
// check if slice is any Number-type object
|
||||||
|
@ -228,10 +227,10 @@ class Slice {
|
||||||
|
|
||||||
// return the value for a Bool object
|
// return the value for a Bool object
|
||||||
bool getBool() const {
|
bool getBool() const {
|
||||||
if (type() != ValueType::Bool) {
|
if (!isBool()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Bool");
|
throw Exception(Exception::InvalidValueType, "Expecting type Bool");
|
||||||
}
|
}
|
||||||
return (head() == 0x1a); // 0x19 == false, 0x1a == true
|
return isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
// return the value for a Bool object - this is an alias for getBool()
|
// return the value for a Bool object - this is an alias for getBool()
|
||||||
|
@ -239,7 +238,7 @@ class Slice {
|
||||||
|
|
||||||
// return the value for a Double object
|
// return the value for a Double object
|
||||||
double getDouble() const {
|
double getDouble() const {
|
||||||
if (type() != ValueType::Double) {
|
if (!isDouble()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Double");
|
throw Exception(Exception::InvalidValueType, "Expecting type Double");
|
||||||
}
|
}
|
||||||
union {
|
union {
|
||||||
|
@ -264,7 +263,7 @@ class Slice {
|
||||||
// - 0x08 : array with 4-byte index table entries
|
// - 0x08 : array with 4-byte index table entries
|
||||||
// - 0x09 : array with 8-byte index table entries
|
// - 0x09 : array with 8-byte index table entries
|
||||||
Slice at(ValueLength index) const {
|
Slice at(ValueLength index) const {
|
||||||
if (!isType(ValueType::Array)) {
|
if (!isArray()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Array");
|
throw Exception(Exception::InvalidValueType, "Expecting type Array");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +274,7 @@ class Slice {
|
||||||
|
|
||||||
// return the number of members for an Array or Object object
|
// return the number of members for an Array or Object object
|
||||||
ValueLength length() const {
|
ValueLength length() const {
|
||||||
if (type() != ValueType::Array && type() != ValueType::Object) {
|
if (!isArray() && !isObject()) {
|
||||||
throw Exception(Exception::InvalidValueType,
|
throw Exception(Exception::InvalidValueType,
|
||||||
"Expecting type Array or Object");
|
"Expecting type Array or Object");
|
||||||
}
|
}
|
||||||
|
@ -326,7 +325,7 @@ class Slice {
|
||||||
// - 0x12 : object with 8-byte index table entries, not sorted by
|
// - 0x12 : object with 8-byte index table entries, not sorted by
|
||||||
// attribute name
|
// attribute name
|
||||||
Slice keyAt(ValueLength index) const {
|
Slice keyAt(ValueLength index) const {
|
||||||
if (!isType(ValueType::Object)) {
|
if (!isObject()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Object");
|
throw Exception(Exception::InvalidValueType, "Expecting type Object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +333,7 @@ class Slice {
|
||||||
}
|
}
|
||||||
|
|
||||||
Slice valueAt(ValueLength index) const {
|
Slice valueAt(ValueLength index) const {
|
||||||
if (!isType(ValueType::Object)) {
|
if (!isObject()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Object");
|
throw Exception(Exception::InvalidValueType, "Expecting type Object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,11 +413,20 @@ class Slice {
|
||||||
|
|
||||||
// return the pointer to the data for an External object
|
// return the pointer to the data for an External object
|
||||||
char const* getExternal() const {
|
char const* getExternal() const {
|
||||||
if (type() != ValueType::External) {
|
if (!isExternal()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type External");
|
throw Exception(Exception::InvalidValueType, "Expecting type External");
|
||||||
}
|
}
|
||||||
return extractValue<char const*>();
|
return extractValue<char const*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns the Slice managed by an External or the Slice itself if it's not
|
||||||
|
// an External
|
||||||
|
Slice resolveExternal() const {
|
||||||
|
if (isExternal()) {
|
||||||
|
return Slice(extractValue<char const*>());
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
// translates an integer key into a string
|
// translates an integer key into a string
|
||||||
Slice translate() const;
|
Slice translate() const;
|
||||||
|
@ -494,10 +502,9 @@ class Slice {
|
||||||
|
|
||||||
// return the value for a UTCDate object
|
// return the value for a UTCDate object
|
||||||
int64_t getUTCDate() const {
|
int64_t getUTCDate() const {
|
||||||
if (type() != ValueType::UTCDate) {
|
if (!isUTCDate()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type UTCDate");
|
throw Exception(Exception::InvalidValueType, "Expecting type UTCDate");
|
||||||
}
|
}
|
||||||
assertType(ValueType::UTCDate);
|
|
||||||
uint64_t v = readInteger<uint64_t>(_start + 1, sizeof(uint64_t));
|
uint64_t v = readInteger<uint64_t>(_start + 1, sizeof(uint64_t));
|
||||||
return toInt64(v);
|
return toInt64(v);
|
||||||
}
|
}
|
||||||
|
@ -559,7 +566,7 @@ class Slice {
|
||||||
|
|
||||||
// return the value for a Binary object
|
// return the value for a Binary object
|
||||||
uint8_t const* getBinary(ValueLength& length) const {
|
uint8_t const* getBinary(ValueLength& length) const {
|
||||||
if (type() != ValueType::Binary) {
|
if (!isBinary()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +580,7 @@ class Slice {
|
||||||
|
|
||||||
// return the length of the Binary slice
|
// return the length of the Binary slice
|
||||||
ValueLength getBinaryLength() const {
|
ValueLength getBinaryLength() const {
|
||||||
if (type() != ValueType::Binary) {
|
if (!isBinary()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,7 +592,7 @@ class Slice {
|
||||||
|
|
||||||
// return a copy of the value for a Binary object
|
// return a copy of the value for a Binary object
|
||||||
std::vector<uint8_t> copyBinary() const {
|
std::vector<uint8_t> copyBinary() const {
|
||||||
if (type() != ValueType::Binary) {
|
if (!isBinary()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
throw Exception(Exception::InvalidValueType, "Expecting type Binary");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ uint64_t Slice::normalizedHash(uint64_t seed) const {
|
||||||
// look for the specified attribute inside an Object
|
// look for the specified attribute inside an Object
|
||||||
// returns a Slice(ValueType::None) if not found
|
// returns a Slice(ValueType::None) if not found
|
||||||
Slice Slice::get(std::string const& attribute) const {
|
Slice Slice::get(std::string const& attribute) const {
|
||||||
if (!isType(ValueType::Object)) {
|
if (!isObject()) {
|
||||||
throw Exception(Exception::InvalidValueType, "Expecting Object");
|
throw Exception(Exception::InvalidValueType, "Expecting Object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ Slice Slice::getFromCompactObject(std::string const& attribute) const {
|
||||||
|
|
||||||
// get the offset for the nth member from an Array or Object type
|
// get the offset for the nth member from an Array or Object type
|
||||||
ValueLength Slice::getNthOffset(ValueLength index) const {
|
ValueLength Slice::getNthOffset(ValueLength index) const {
|
||||||
VELOCYPACK_ASSERT(type() == ValueType::Array || type() == ValueType::Object);
|
VELOCYPACK_ASSERT(isArray() || isObject());
|
||||||
|
|
||||||
auto const h = head();
|
auto const h = head();
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ ValueLength Slice::getNthOffset(ValueLength index) const {
|
||||||
|
|
||||||
// extract the nth member from an Array
|
// extract the nth member from an Array
|
||||||
Slice Slice::getNth(ValueLength index) const {
|
Slice Slice::getNth(ValueLength index) const {
|
||||||
VELOCYPACK_ASSERT(type() == ValueType::Array);
|
VELOCYPACK_ASSERT(isArray());
|
||||||
|
|
||||||
return Slice(_start + getNthOffset(index));
|
return Slice(_start + getNthOffset(index));
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,12 +605,13 @@ v8::Handle<v8::Value> AqlValue::toV8(
|
||||||
|
|
||||||
/// @brief materializes a value into the builder
|
/// @brief materializes a value into the builder
|
||||||
void AqlValue::toVelocyPack(AqlTransaction* trx,
|
void AqlValue::toVelocyPack(AqlTransaction* trx,
|
||||||
arangodb::velocypack::Builder& builder) const {
|
arangodb::velocypack::Builder& builder) const {
|
||||||
switch (type()) {
|
switch (type()) {
|
||||||
case VPACK_DOCUMENT:
|
case VPACK_DOCUMENT:
|
||||||
case VPACK_POINTER:
|
case VPACK_POINTER:
|
||||||
case VPACK_INLINE:
|
case VPACK_INLINE:
|
||||||
case VPACK_EXTERNAL: {
|
case VPACK_EXTERNAL: {
|
||||||
|
// TODO: optionally resolve externals
|
||||||
builder.add(slice());
|
builder.add(slice());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -619,6 +620,7 @@ void AqlValue::toVelocyPack(AqlTransaction* trx,
|
||||||
for (auto const& it : *_data.docvec) {
|
for (auto const& it : *_data.docvec) {
|
||||||
size_t const n = it->size();
|
size_t const n = it->size();
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
// TODO: optionally resolve externals
|
||||||
it->getValueReference(i, 0).toVelocyPack(trx, builder);
|
it->getValueReference(i, 0).toVelocyPack(trx, builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -629,6 +631,7 @@ void AqlValue::toVelocyPack(AqlTransaction* trx,
|
||||||
builder.openArray();
|
builder.openArray();
|
||||||
size_t const n = _data.range->size();
|
size_t const n = _data.range->size();
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
// TODO: optionally resolve externals
|
||||||
builder.add(VPackValue(_data.range->at(i)));
|
builder.add(VPackValue(_data.range->at(i)));
|
||||||
}
|
}
|
||||||
builder.close();
|
builder.close();
|
||||||
|
@ -647,14 +650,10 @@ AqlValue AqlValue::materialize(AqlTransaction* trx, bool& hasCopied) const {
|
||||||
hasCopied = false;
|
hasCopied = false;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
case DOCVEC: {
|
case DOCVEC:
|
||||||
VPackBuilder builder;
|
|
||||||
toVelocyPack(trx, builder);
|
|
||||||
hasCopied = true;
|
|
||||||
return AqlValue(builder);
|
|
||||||
}
|
|
||||||
case RANGE: {
|
case RANGE: {
|
||||||
VPackBuilder builder;
|
VPackBuilder builder;
|
||||||
|
// TODO: optionally resolve externals
|
||||||
toVelocyPack(trx, builder);
|
toVelocyPack(trx, builder);
|
||||||
hasCopied = true;
|
hasCopied = true;
|
||||||
return AqlValue(builder);
|
return AqlValue(builder);
|
||||||
|
@ -740,6 +739,7 @@ void AqlValue::destroy() {
|
||||||
|
|
||||||
/// @brief return the slice from the value
|
/// @brief return the slice from the value
|
||||||
VPackSlice AqlValue::slice() const {
|
VPackSlice AqlValue::slice() const {
|
||||||
|
// TODO: optionally resolve externals
|
||||||
switch (type()) {
|
switch (type()) {
|
||||||
case VPACK_DOCUMENT:
|
case VPACK_DOCUMENT:
|
||||||
case VPACK_POINTER: {
|
case VPACK_POINTER: {
|
||||||
|
|
|
@ -201,6 +201,10 @@ void Expression::replaceVariableReference(Variable const* variable,
|
||||||
// must even set back the expression type so the expression will be analyzed
|
// must even set back the expression type so the expression will be analyzed
|
||||||
// again
|
// again
|
||||||
_type = UNPROCESSED;
|
_type = UNPROCESSED;
|
||||||
|
} else if (_type == SIMPLE) {
|
||||||
|
// must rebuild the expression completely, as it may have changed drastically
|
||||||
|
_built = false;
|
||||||
|
_type = UNPROCESSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
const_cast<AstNode*>(_node)->clearFlags();
|
const_cast<AstNode*>(_node)->clearFlags();
|
||||||
|
|
|
@ -531,6 +531,10 @@ QueryResult Query::execute(QueryRegistry* registry) {
|
||||||
if (cacheEntry != nullptr) {
|
if (cacheEntry != nullptr) {
|
||||||
// got a result from the query cache
|
// got a result from the query cache
|
||||||
QueryResult res(TRI_ERROR_NO_ERROR);
|
QueryResult res(TRI_ERROR_NO_ERROR);
|
||||||
|
// we don't have yet a transaction when we're here, so let's create
|
||||||
|
// a mimimal context to build the result
|
||||||
|
res.context = std::make_shared<StandaloneTransactionContext>(_vocbase);
|
||||||
|
|
||||||
res.warnings = warningsToVelocyPack();
|
res.warnings = warningsToVelocyPack();
|
||||||
TRI_ASSERT(cacheEntry->_queryResult != nullptr);
|
TRI_ASSERT(cacheEntry->_queryResult != nullptr);
|
||||||
res.result = cacheEntry->_queryResult;
|
res.result = cacheEntry->_queryResult;
|
||||||
|
@ -539,10 +543,10 @@ QueryResult Query::execute(QueryRegistry* registry) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryResult res = prepare(registry);
|
QueryResult result = prepare(registry);
|
||||||
|
|
||||||
if (res.code != TRI_ERROR_NO_ERROR) {
|
if (result.code != TRI_ERROR_NO_ERROR) {
|
||||||
return res;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_queryString == nullptr) {
|
if (_queryString == nullptr) {
|
||||||
|
@ -629,11 +633,12 @@ QueryResult Query::execute(QueryRegistry* registry) {
|
||||||
auto stats = std::make_shared<VPackBuilder>();
|
auto stats = std::make_shared<VPackBuilder>();
|
||||||
_engine->_stats.toVelocyPack(*(stats.get()));
|
_engine->_stats.toVelocyPack(*(stats.get()));
|
||||||
|
|
||||||
|
result.context = _trx->transactionContext();
|
||||||
|
|
||||||
cleanupPlanAndEngine(TRI_ERROR_NO_ERROR);
|
cleanupPlanAndEngine(TRI_ERROR_NO_ERROR);
|
||||||
|
|
||||||
enterState(FINALIZATION);
|
enterState(FINALIZATION);
|
||||||
|
|
||||||
QueryResult result(TRI_ERROR_NO_ERROR);
|
|
||||||
result.warnings = warningsToVelocyPack();
|
result.warnings = warningsToVelocyPack();
|
||||||
result.result = resultBuilder;
|
result.result = resultBuilder;
|
||||||
result.stats = stats;
|
result.stats = stats;
|
||||||
|
@ -684,13 +689,13 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
|
||||||
arangodb::aql::QueryCacheResultEntryGuard guard(cacheEntry);
|
arangodb::aql::QueryCacheResultEntryGuard guard(cacheEntry);
|
||||||
|
|
||||||
if (cacheEntry != nullptr) {
|
if (cacheEntry != nullptr) {
|
||||||
// we don't have yet a transaction when we're here, so let's create
|
|
||||||
// a mimimal context to build the result
|
|
||||||
auto transactionContext = createTransactionContext();
|
|
||||||
// got a result from the query cache
|
// got a result from the query cache
|
||||||
QueryResultV8 res(TRI_ERROR_NO_ERROR);
|
QueryResultV8 res(TRI_ERROR_NO_ERROR);
|
||||||
|
// we don't have yet a transaction when we're here, so let's create
|
||||||
|
// a mimimal context to build the result
|
||||||
|
res.context = std::make_shared<StandaloneTransactionContext>(_vocbase);
|
||||||
|
|
||||||
v8::Handle<v8::Value> values = TRI_VPackToV8(isolate, cacheEntry->_queryResult->slice(), transactionContext->getVPackOptions());
|
v8::Handle<v8::Value> values = TRI_VPackToV8(isolate, cacheEntry->_queryResult->slice(), res.context->getVPackOptions());
|
||||||
TRI_ASSERT(values->IsArray());
|
TRI_ASSERT(values->IsArray());
|
||||||
res.result = v8::Handle<v8::Array>::Cast(values);
|
res.result = v8::Handle<v8::Array>::Cast(values);
|
||||||
res.cached = true;
|
res.cached = true;
|
||||||
|
@ -698,10 +703,10 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryResultV8 res = prepare(registry);
|
QueryResultV8 result = prepare(registry);
|
||||||
|
|
||||||
if (res.code != TRI_ERROR_NO_ERROR) {
|
if (result.code != TRI_ERROR_NO_ERROR) {
|
||||||
return res;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
work.reset(new AqlWorkStack(_vocbase, _id, _queryString, _queryLength));
|
work.reset(new AqlWorkStack(_vocbase, _id, _queryString, _queryLength));
|
||||||
|
@ -713,7 +718,6 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
|
||||||
useQueryCache = false;
|
useQueryCache = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryResultV8 result(TRI_ERROR_NO_ERROR);
|
|
||||||
result.result = v8::Array::New(isolate);
|
result.result = v8::Array::New(isolate);
|
||||||
|
|
||||||
// this is the RegisterId our results can be found in
|
// this is the RegisterId our results can be found in
|
||||||
|
@ -779,6 +783,8 @@ QueryResultV8 Query::executeV8(v8::Isolate* isolate, QueryRegistry* registry) {
|
||||||
auto stats = std::make_shared<VPackBuilder>();
|
auto stats = std::make_shared<VPackBuilder>();
|
||||||
_engine->_stats.toVelocyPack(*(stats.get()));
|
_engine->_stats.toVelocyPack(*(stats.get()));
|
||||||
|
|
||||||
|
result.context = _trx->transactionContext();
|
||||||
|
|
||||||
cleanupPlanAndEngine(TRI_ERROR_NO_ERROR);
|
cleanupPlanAndEngine(TRI_ERROR_NO_ERROR);
|
||||||
|
|
||||||
enterState(FINALIZATION);
|
enterState(FINALIZATION);
|
||||||
|
|
|
@ -30,23 +30,14 @@ namespace arangodb {
|
||||||
namespace velocypack {
|
namespace velocypack {
|
||||||
class Builder;
|
class Builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TransactionContext;
|
||||||
|
|
||||||
namespace aql {
|
namespace aql {
|
||||||
|
|
||||||
struct QueryResult {
|
struct QueryResult {
|
||||||
QueryResult& operator=(QueryResult const& other) = delete;
|
QueryResult& operator=(QueryResult const& other) = delete;
|
||||||
|
QueryResult(QueryResult&& other) = default;
|
||||||
QueryResult(QueryResult&& other) {
|
|
||||||
code = other.code;
|
|
||||||
cached = other.cached;
|
|
||||||
details = other.details;
|
|
||||||
warnings.swap(other.warnings);
|
|
||||||
result.swap(other.result);
|
|
||||||
stats.swap(other.stats);
|
|
||||||
profile.swap(other.profile);
|
|
||||||
|
|
||||||
bindParameters = other.bindParameters;
|
|
||||||
collectionNames = other.collectionNames;
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryResult(int code, std::string const& details)
|
QueryResult(int code, std::string const& details)
|
||||||
: code(code),
|
: code(code),
|
||||||
|
@ -54,7 +45,8 @@ struct QueryResult {
|
||||||
details(details),
|
details(details),
|
||||||
warnings(nullptr),
|
warnings(nullptr),
|
||||||
result(nullptr),
|
result(nullptr),
|
||||||
profile(nullptr) {}
|
profile(nullptr),
|
||||||
|
context(nullptr) {}
|
||||||
|
|
||||||
explicit QueryResult(int code) : QueryResult(code, "") {}
|
explicit QueryResult(int code) : QueryResult(code, "") {}
|
||||||
|
|
||||||
|
@ -71,6 +63,7 @@ struct QueryResult {
|
||||||
std::shared_ptr<arangodb::velocypack::Builder> result;
|
std::shared_ptr<arangodb::velocypack::Builder> result;
|
||||||
std::shared_ptr<arangodb::velocypack::Builder> stats;
|
std::shared_ptr<arangodb::velocypack::Builder> stats;
|
||||||
std::shared_ptr<arangodb::velocypack::Builder> profile;
|
std::shared_ptr<arangodb::velocypack::Builder> profile;
|
||||||
|
std::shared_ptr<arangodb::TransactionContext> context;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1036,6 +1036,7 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
arangodb::LogTopic const& logTopic) {
|
arangodb::LogTopic const& logTopic) {
|
||||||
|
|
||||||
if (requests.size() == 0) {
|
if (requests.size() == 0) {
|
||||||
|
nrDone = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,7 +1057,7 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
std::unordered_map<OperationID, size_t> opIDtoIndex;
|
std::unordered_map<OperationID, size_t> opIDtoIndex;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (true) {
|
while (now <= endTime) {
|
||||||
if (nrDone >= requests.size()) {
|
if (nrDone >= requests.size()) {
|
||||||
// All good, report
|
// All good, report
|
||||||
return nrGood;
|
return nrGood;
|
||||||
|
@ -1065,7 +1066,10 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
// First send away what is due:
|
// First send away what is due:
|
||||||
for (size_t i = 0; i < requests.size(); i++) {
|
for (size_t i = 0; i < requests.size(); i++) {
|
||||||
if (!requests[i].done && now >= dueTime[i]) {
|
if (!requests[i].done && now >= dueTime[i]) {
|
||||||
auto headers = std::make_unique<std::map<std::string, std::string>>();
|
if (requests[i].headerFields.get() == nullptr) {
|
||||||
|
requests[i].headerFields
|
||||||
|
= std::make_unique<std::map<std::string, std::string>>();
|
||||||
|
}
|
||||||
LOG_TOPIC(TRACE, logTopic)
|
LOG_TOPIC(TRACE, logTopic)
|
||||||
<< "ClusterComm::performRequests: sending request to "
|
<< "ClusterComm::performRequests: sending request to "
|
||||||
<< requests[i].destination << ":" << requests[i].path
|
<< requests[i].destination << ":" << requests[i].path
|
||||||
|
@ -1075,7 +1079,8 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
requests[i].requestType,
|
requests[i].requestType,
|
||||||
requests[i].path,
|
requests[i].path,
|
||||||
requests[i].body,
|
requests[i].body,
|
||||||
headers, nullptr, timeout - (now - startTime),
|
requests[i].headerFields,
|
||||||
|
nullptr, timeout - (now - startTime),
|
||||||
false);
|
false);
|
||||||
if (res.status == CL_COMM_ERROR) {
|
if (res.status == CL_COMM_ERROR) {
|
||||||
// We did not find the destination, this is could change in the
|
// We did not find the destination, this is could change in the
|
||||||
|
@ -1108,6 +1113,16 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
if (res.status == CL_COMM_TIMEOUT && res.operationID == 0) {
|
if (res.status == CL_COMM_TIMEOUT && res.operationID == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (res.status == CL_COMM_DROPPED) {
|
||||||
|
// Nothing in flight, simply wait:
|
||||||
|
now = TRI_microtime();
|
||||||
|
if (now >= actionNeeded) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
usleep( (std::min)(500000,
|
||||||
|
static_cast<int>((actionNeeded-now)*1000000)) );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
auto it = opIDtoIndex.find(res.operationID);
|
auto it = opIDtoIndex.find(res.operationID);
|
||||||
TRI_ASSERT(it != opIDtoIndex.end()); // we should really know this!
|
TRI_ASSERT(it != opIDtoIndex.end()); // we should really know this!
|
||||||
size_t index = it->second;
|
size_t index = it->second;
|
||||||
|
@ -1149,6 +1164,9 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
|
||||||
// We only get here if the global timeout was triggered, not all
|
// We only get here if the global timeout was triggered, not all
|
||||||
// requests are marked by done!
|
// requests are marked by done!
|
||||||
|
|
||||||
|
LOG_TOPIC(ERR, logTopic) << "ClusterComm::performRequests: "
|
||||||
|
<< "got timeout, this will be reported...";
|
||||||
|
|
||||||
// Forget about
|
// Forget about
|
||||||
drop("", coordinatorTransactionID, 0, "");
|
drop("", coordinatorTransactionID, 0, "");
|
||||||
return nrGood;
|
return nrGood;
|
||||||
|
|
|
@ -183,12 +183,13 @@ void ClusterCommRestCallback(std::string& coordinator,
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
struct ClusterCommRequest {
|
struct ClusterCommRequest {
|
||||||
std::string destination;
|
std::string destination;
|
||||||
GeneralRequest::RequestType requestType;
|
GeneralRequest::RequestType requestType;
|
||||||
std::string path;
|
std::string path;
|
||||||
std::shared_ptr<std::string const> body;
|
std::shared_ptr<std::string const> body;
|
||||||
ClusterCommResult result;
|
std::unique_ptr<std::map<std::string, std::string>> headerFields;
|
||||||
bool done;
|
ClusterCommResult result;
|
||||||
|
bool done;
|
||||||
|
|
||||||
ClusterCommRequest() : done(false) {
|
ClusterCommRequest() : done(false) {
|
||||||
}
|
}
|
||||||
|
@ -201,6 +202,9 @@ struct ClusterCommRequest {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setHeaders(std::unique_ptr<std::map<std::string, std::string>>& headers) {
|
||||||
|
headerFields = std::move(headers);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -474,7 +474,7 @@ void ClusterFeature::stop() {
|
||||||
{
|
{
|
||||||
// Try only once to unregister because maybe the agencycomm
|
// Try only once to unregister because maybe the agencycomm
|
||||||
// is shutting down as well...
|
// is shutting down as well...
|
||||||
AgencyCommLocker locker("Current", "WRITE", 120.0, 0.001);
|
AgencyCommLocker locker("Current", "WRITE", 120.0, 1.000);
|
||||||
|
|
||||||
if (locker.successful()) {
|
if (locker.successful()) {
|
||||||
// unregister ourselves
|
// unregister ourselves
|
||||||
|
|
|
@ -85,7 +85,7 @@ Index::Index(VPackSlice const& slice)
|
||||||
|
|
||||||
std::vector<arangodb::basics::AttributeName> parsedAttributes;
|
std::vector<arangodb::basics::AttributeName> parsedAttributes;
|
||||||
TRI_ParseAttributeString(name.copyString(), parsedAttributes);
|
TRI_ParseAttributeString(name.copyString(), parsedAttributes);
|
||||||
_fields.emplace_back(parsedAttributes);
|
_fields.emplace_back(std::move(parsedAttributes));
|
||||||
}
|
}
|
||||||
|
|
||||||
_selectivityEstimate =
|
_selectivityEstimate =
|
||||||
|
|
|
@ -175,10 +175,9 @@ void RestCursorHandler::processQuery(VPackSlice const& slice) {
|
||||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
|
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto transactionContext = std::make_shared<StandaloneTransactionContext>(_vocbase);
|
|
||||||
arangodb::basics::VPackStringBufferAdapter bufferAdapter(
|
arangodb::basics::VPackStringBufferAdapter bufferAdapter(
|
||||||
_response->body().stringBuffer());
|
_response->body().stringBuffer());
|
||||||
VPackDumper dumper(&bufferAdapter, transactionContext->getVPackOptions());
|
VPackDumper dumper(&bufferAdapter, queryResult.context->getVPackOptions());
|
||||||
dumper.dump(result.slice());
|
dumper.dump(result.slice());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -192,9 +191,11 @@ void RestCursorHandler::processQuery(VPackSlice const& slice) {
|
||||||
bool count = arangodb::basics::VelocyPackHelper::getBooleanValue(
|
bool count = arangodb::basics::VelocyPackHelper::getBooleanValue(
|
||||||
opts, "count", false);
|
opts, "count", false);
|
||||||
|
|
||||||
|
TRI_ASSERT(queryResult.result.get() != nullptr);
|
||||||
|
|
||||||
// steal the query result, cursor will take over the ownership
|
// steal the query result, cursor will take over the ownership
|
||||||
arangodb::JsonCursor* cursor = cursors->createFromVelocyPack(
|
arangodb::VelocyPackCursor* cursor = cursors->createFromQueryResult(
|
||||||
queryResult.result, batchSize, extra, ttl, count, queryResult.cached);
|
std::move(queryResult), batchSize, extra, ttl, count);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_response->body().appendChar('{');
|
_response->body().appendChar('{');
|
||||||
|
|
|
@ -185,6 +185,11 @@ void TRI_FillRequestStatistics(StatisticsDistribution& totalTime,
|
||||||
StatisticsDistribution& ioTime,
|
StatisticsDistribution& ioTime,
|
||||||
StatisticsDistribution& bytesSent,
|
StatisticsDistribution& bytesSent,
|
||||||
StatisticsDistribution& bytesReceived) {
|
StatisticsDistribution& bytesReceived) {
|
||||||
|
if (!StatisticsFeature::enabled()) {
|
||||||
|
// all the below objects may be deleted if we don't have statistics enabled
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MUTEX_LOCKER(mutexLocker, RequestDataLock);
|
MUTEX_LOCKER(mutexLocker, RequestDataLock);
|
||||||
|
|
||||||
totalTime = *TRI_TotalTimeDistributionStatistics;
|
totalTime = *TRI_TotalTimeDistributionStatistics;
|
||||||
|
@ -269,6 +274,15 @@ void TRI_FillConnectionStatistics(
|
||||||
StatisticsCounter& httpConnections, StatisticsCounter& totalRequests,
|
StatisticsCounter& httpConnections, StatisticsCounter& totalRequests,
|
||||||
std::vector<StatisticsCounter>& methodRequests,
|
std::vector<StatisticsCounter>& methodRequests,
|
||||||
StatisticsCounter& asyncRequests, StatisticsDistribution& connectionTime) {
|
StatisticsCounter& asyncRequests, StatisticsDistribution& connectionTime) {
|
||||||
|
if (!StatisticsFeature::enabled()) {
|
||||||
|
// all the below objects may be deleted if we don't have statistics enabled
|
||||||
|
for (int i = 0; i < ((int)arangodb::GeneralRequest::RequestType::ILLEGAL) + 1;
|
||||||
|
++i) {
|
||||||
|
methodRequests.emplace_back(StatisticsCounter());
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MUTEX_LOCKER(mutexLocker, ConnectionDataLock);
|
MUTEX_LOCKER(mutexLocker, ConnectionDataLock);
|
||||||
|
|
||||||
httpConnections = TRI_HttpConnectionsStatistics;
|
httpConnections = TRI_HttpConnectionsStatistics;
|
||||||
|
@ -341,12 +355,19 @@ static void StatisticsQueueWorker(void* data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
delete TRI_ConnectionTimeDistributionStatistics;
|
delete TRI_ConnectionTimeDistributionStatistics;
|
||||||
|
TRI_ConnectionTimeDistributionStatistics = nullptr;
|
||||||
delete TRI_TotalTimeDistributionStatistics;
|
delete TRI_TotalTimeDistributionStatistics;
|
||||||
|
TRI_TotalTimeDistributionStatistics = nullptr;
|
||||||
delete TRI_RequestTimeDistributionStatistics;
|
delete TRI_RequestTimeDistributionStatistics;
|
||||||
|
TRI_RequestTimeDistributionStatistics = nullptr;
|
||||||
delete TRI_QueueTimeDistributionStatistics;
|
delete TRI_QueueTimeDistributionStatistics;
|
||||||
|
TRI_QueueTimeDistributionStatistics = nullptr;
|
||||||
delete TRI_IoTimeDistributionStatistics;
|
delete TRI_IoTimeDistributionStatistics;
|
||||||
|
TRI_IoTimeDistributionStatistics = nullptr;
|
||||||
delete TRI_BytesSentDistributionStatistics;
|
delete TRI_BytesSentDistributionStatistics;
|
||||||
|
TRI_BytesSentDistributionStatistics = nullptr;
|
||||||
delete TRI_BytesReceivedDistributionStatistics;
|
delete TRI_BytesReceivedDistributionStatistics;
|
||||||
|
TRI_BytesReceivedDistributionStatistics = nullptr;
|
||||||
|
|
||||||
{
|
{
|
||||||
TRI_request_statistics_t* entry = nullptr;
|
TRI_request_statistics_t* entry = nullptr;
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "Cursor.h"
|
#include "Cursor.h"
|
||||||
#include "Basics/JsonHelper.h"
|
|
||||||
#include "Basics/VelocyPackHelper.h"
|
#include "Basics/VelocyPackHelper.h"
|
||||||
#include "Basics/VPackStringBufferAdapter.h"
|
#include "Basics/VPackStringBufferAdapter.h"
|
||||||
#include "Utils/CollectionExport.h"
|
#include "Utils/CollectionExport.h"
|
||||||
|
@ -63,20 +62,20 @@ VPackSlice Cursor::extra() const {
|
||||||
return _extra->slice();
|
return _extra->slice();
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonCursor::JsonCursor(TRI_vocbase_t* vocbase, CursorId id,
|
VelocyPackCursor::VelocyPackCursor(TRI_vocbase_t* vocbase, CursorId id,
|
||||||
std::shared_ptr<VPackBuilder> json, size_t batchSize,
|
aql::QueryResult&& result, size_t batchSize,
|
||||||
std::shared_ptr<VPackBuilder> extra, double ttl,
|
std::shared_ptr<VPackBuilder> extra,
|
||||||
bool hasCount, bool cached)
|
double ttl, bool hasCount)
|
||||||
: Cursor(id, batchSize, extra, ttl, hasCount),
|
: Cursor(id, batchSize, extra, ttl, hasCount),
|
||||||
_vocbase(vocbase),
|
_vocbase(vocbase),
|
||||||
_json(json),
|
_result(std::move(result)),
|
||||||
_size(json->slice().length()),
|
_size(_result.result->slice().length()),
|
||||||
_cached(cached) {
|
_cached(_result.cached) {
|
||||||
TRI_ASSERT(json->slice().isArray());
|
TRI_ASSERT(_result.result->slice().isArray());
|
||||||
TRI_UseVocBase(vocbase);
|
TRI_UseVocBase(vocbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonCursor::~JsonCursor() {
|
VelocyPackCursor::~VelocyPackCursor() {
|
||||||
freeJson();
|
freeJson();
|
||||||
|
|
||||||
TRI_ReleaseVocBase(_vocbase);
|
TRI_ReleaseVocBase(_vocbase);
|
||||||
|
@ -86,7 +85,7 @@ JsonCursor::~JsonCursor() {
|
||||||
/// @brief check whether the cursor contains more data
|
/// @brief check whether the cursor contains more data
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool JsonCursor::hasNext() {
|
bool VelocyPackCursor::hasNext() {
|
||||||
if (_position < _size) {
|
if (_position < _size) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -99,10 +98,10 @@ bool JsonCursor::hasNext() {
|
||||||
/// @brief return the next element
|
/// @brief return the next element
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
VPackSlice JsonCursor::next() {
|
VPackSlice VelocyPackCursor::next() {
|
||||||
TRI_ASSERT(_json != nullptr);
|
TRI_ASSERT(_result.result != nullptr);
|
||||||
TRI_ASSERT(_position < _size);
|
TRI_ASSERT(_position < _size);
|
||||||
VPackSlice slice = _json->slice();
|
VPackSlice slice = _result.result->slice();
|
||||||
return slice.at(_position++);
|
return slice.at(_position++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,13 +109,13 @@ VPackSlice JsonCursor::next() {
|
||||||
/// @brief return the cursor size
|
/// @brief return the cursor size
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
size_t JsonCursor::count() const { return _size; }
|
size_t VelocyPackCursor::count() const { return _size; }
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief dump the cursor contents into a string buffer
|
/// @brief dump the cursor contents into a string buffer
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void JsonCursor::dump(arangodb::basics::StringBuffer& buffer) {
|
void VelocyPackCursor::dump(arangodb::basics::StringBuffer& buffer) {
|
||||||
buffer.appendText("\"result\":[");
|
buffer.appendText("\"result\":[");
|
||||||
|
|
||||||
size_t const n = batchSize();
|
size_t const n = batchSize();
|
||||||
|
@ -135,6 +134,9 @@ void JsonCursor::dump(arangodb::basics::StringBuffer& buffer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
arangodb::basics::VPackStringBufferAdapter bufferAdapter(
|
||||||
|
buffer.stringBuffer());
|
||||||
|
VPackDumper dumper(&bufferAdapter, transactionContext->getVPackOptions());
|
||||||
for (size_t i = 0; i < n; ++i) {
|
for (size_t i = 0; i < n; ++i) {
|
||||||
if (!hasNext()) {
|
if (!hasNext()) {
|
||||||
break;
|
break;
|
||||||
|
@ -149,9 +151,6 @@ void JsonCursor::dump(arangodb::basics::StringBuffer& buffer) {
|
||||||
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
|
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
arangodb::basics::VPackStringBufferAdapter bufferAdapter(
|
|
||||||
buffer.stringBuffer());
|
|
||||||
VPackDumper dumper(&bufferAdapter, transactionContext->getVPackOptions());
|
|
||||||
try {
|
try {
|
||||||
dumper.dump(row);
|
dumper.dump(row);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
@ -198,9 +197,7 @@ void JsonCursor::dump(arangodb::basics::StringBuffer& buffer) {
|
||||||
/// @brief free the internals
|
/// @brief free the internals
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void JsonCursor::freeJson() {
|
void VelocyPackCursor::freeJson() {
|
||||||
_json = nullptr;
|
|
||||||
|
|
||||||
_isDeleted = true;
|
_isDeleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "Basics/Common.h"
|
#include "Basics/Common.h"
|
||||||
#include "Basics/StringBuffer.h"
|
#include "Basics/StringBuffer.h"
|
||||||
|
#include "Aql/QueryResult.h"
|
||||||
#include "VocBase/voc-types.h"
|
#include "VocBase/voc-types.h"
|
||||||
|
|
||||||
struct TRI_vocbase_t;
|
struct TRI_vocbase_t;
|
||||||
|
@ -107,14 +108,13 @@ class Cursor {
|
||||||
bool _isUsed;
|
bool _isUsed;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JsonCursor : public Cursor {
|
class VelocyPackCursor : public Cursor {
|
||||||
public:
|
public:
|
||||||
JsonCursor(TRI_vocbase_t*, CursorId,
|
VelocyPackCursor(TRI_vocbase_t*, CursorId, aql::QueryResult&&, size_t,
|
||||||
std::shared_ptr<arangodb::velocypack::Builder>, size_t,
|
std::shared_ptr<arangodb::velocypack::Builder>, double,
|
||||||
std::shared_ptr<arangodb::velocypack::Builder>, double, bool,
|
bool);
|
||||||
bool);
|
|
||||||
|
|
||||||
~JsonCursor();
|
~VelocyPackCursor();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool hasNext() override final;
|
bool hasNext() override final;
|
||||||
|
@ -130,7 +130,7 @@ class JsonCursor : public Cursor {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TRI_vocbase_t* _vocbase;
|
TRI_vocbase_t* _vocbase;
|
||||||
std::shared_ptr<arangodb::velocypack::Builder> _json;
|
aql::QueryResult _result;
|
||||||
size_t const _size;
|
size_t const _size;
|
||||||
bool _cached;
|
bool _cached;
|
||||||
};
|
};
|
||||||
|
|
|
@ -91,17 +91,15 @@ CursorRepository::~CursorRepository() {
|
||||||
/// the cursor will take ownership of both json and extra
|
/// the cursor will take ownership of both json and extra
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
JsonCursor* CursorRepository::createFromVelocyPack(
|
VelocyPackCursor* CursorRepository::createFromQueryResult(
|
||||||
std::shared_ptr<VPackBuilder> json, size_t batchSize,
|
aql::QueryResult&& result, size_t batchSize, std::shared_ptr<VPackBuilder> extra,
|
||||||
std::shared_ptr<VPackBuilder> extra, double ttl, bool count, bool cached) {
|
double ttl, bool count) {
|
||||||
|
TRI_ASSERT(result.result != nullptr);
|
||||||
TRI_ASSERT(json != nullptr);
|
|
||||||
|
|
||||||
CursorId const id = TRI_NewTickServer();
|
CursorId const id = TRI_NewTickServer();
|
||||||
arangodb::JsonCursor* cursor = nullptr;
|
|
||||||
|
|
||||||
cursor = new arangodb::JsonCursor(_vocbase, id, json, batchSize, extra, ttl,
|
arangodb::VelocyPackCursor* cursor = new arangodb::VelocyPackCursor(
|
||||||
count, cached);
|
_vocbase, id, std::move(result), batchSize, extra, ttl, count);
|
||||||
cursor->use();
|
cursor->use();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -36,6 +36,10 @@ namespace velocypack {
|
||||||
class Builder;
|
class Builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace aql {
|
||||||
|
struct QueryResult;
|
||||||
|
}
|
||||||
|
|
||||||
class CollectionExport;
|
class CollectionExport;
|
||||||
|
|
||||||
class CursorRepository {
|
class CursorRepository {
|
||||||
|
@ -60,9 +64,9 @@ class CursorRepository {
|
||||||
/// the cursor will retain a shared pointer of both json and extra
|
/// the cursor will retain a shared pointer of both json and extra
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
JsonCursor* createFromVelocyPack(
|
VelocyPackCursor* createFromQueryResult(
|
||||||
std::shared_ptr<arangodb::velocypack::Builder>, size_t,
|
aql::QueryResult&&, size_t, std::shared_ptr<arangodb::velocypack::Builder>,
|
||||||
std::shared_ptr<arangodb::velocypack::Builder>, double, bool, bool);
|
double, bool);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief creates a cursor and stores it in the registry
|
/// @brief creates a cursor and stores it in the registry
|
||||||
|
|
|
@ -1190,6 +1190,16 @@ OperationResult Transaction::insertLocal(std::string const& collectionName,
|
||||||
TRI_voc_cid_t cid = addCollectionAtRuntime(collectionName);
|
TRI_voc_cid_t cid = addCollectionAtRuntime(collectionName);
|
||||||
TRI_document_collection_t* document = documentCollection(trxCollection(cid));
|
TRI_document_collection_t* document = documentCollection(trxCollection(cid));
|
||||||
|
|
||||||
|
// First see whether or not we have to do synchronous replication:
|
||||||
|
std::shared_ptr<std::vector<ServerID> const> followers;
|
||||||
|
bool doingSynchronousReplication = false;
|
||||||
|
if (ServerState::instance()->isDBServer()) {
|
||||||
|
// Now replicate the same operation on all followers:
|
||||||
|
auto const& followerInfo = document->followers();
|
||||||
|
followers = followerInfo->get();
|
||||||
|
doingSynchronousReplication = followers->size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
VPackBuilder resultBuilder;
|
VPackBuilder resultBuilder;
|
||||||
|
|
||||||
auto workForOneDocument = [&](VPackSlice const value) -> int {
|
auto workForOneDocument = [&](VPackSlice const value) -> int {
|
||||||
|
@ -1204,7 +1214,7 @@ OperationResult Transaction::insertLocal(std::string const& collectionName,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.silent) {
|
if (options.silent && !doingSynchronousReplication) {
|
||||||
// no need to construct the result object
|
// no need to construct the result object
|
||||||
return TRI_ERROR_NO_ERROR;
|
return TRI_ERROR_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -1237,49 +1247,68 @@ OperationResult Transaction::insertLocal(std::string const& collectionName,
|
||||||
res = workForOneDocument(value);
|
res = workForOneDocument(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServerState::instance()->isDBServer()) {
|
if (doingSynchronousReplication) {
|
||||||
// Now replicate the same operation on all followers:
|
// Now replicate the same operation on all followers:
|
||||||
auto const& followerInfo = document->followers();
|
auto cc = arangodb::ClusterComm::instance();
|
||||||
std::shared_ptr<std::vector<ServerID> const> followers = followerInfo->get();
|
|
||||||
if (followers->size() > 0) {
|
|
||||||
auto cc = arangodb::ClusterComm::instance();
|
|
||||||
|
|
||||||
std::string path
|
std::string path
|
||||||
= "/_db/" +
|
= "/_db/" +
|
||||||
arangodb::basics::StringUtils::urlEncode(_vocbase->_name) +
|
arangodb::basics::StringUtils::urlEncode(_vocbase->_name) +
|
||||||
"/_api/document/" +
|
"/_api/document/" +
|
||||||
arangodb::basics::StringUtils::urlEncode(document->_info.name());
|
arangodb::basics::StringUtils::urlEncode(document->_info.name())
|
||||||
// FIXME: scan options and append the right ones
|
+ "?isRestore=true";
|
||||||
|
|
||||||
// FIXME: We might only want to send the successful tries to the
|
VPackBuilder payload;
|
||||||
// replica, for now, we simply send the same body:
|
|
||||||
auto body = std::make_shared<std::string>();
|
|
||||||
*body = value.toJson();
|
|
||||||
|
|
||||||
// Now prepare the requests:
|
auto doOneDoc = [&](VPackSlice doc, VPackSlice result) {
|
||||||
std::vector<ClusterCommRequest> requests;
|
VPackObjectBuilder guard(&payload);
|
||||||
for (auto const& f : *followers) {
|
TRI_SanitizeObject(doc, payload);
|
||||||
requests.emplace_back("server:" + f,
|
VPackSlice s = result.get(TRI_VOC_ATTRIBUTE_KEY);
|
||||||
arangodb::GeneralRequest::RequestType::POST,
|
payload.add(TRI_VOC_ATTRIBUTE_KEY, s);
|
||||||
path, body);
|
s = result.get(TRI_VOC_ATTRIBUTE_REV);
|
||||||
|
payload.add(TRI_VOC_ATTRIBUTE_REV, s);
|
||||||
|
};
|
||||||
|
|
||||||
|
VPackSlice ourResult = resultBuilder.slice();
|
||||||
|
if (value.isArray()) {
|
||||||
|
VPackArrayBuilder guard(&payload);
|
||||||
|
VPackArrayIterator itValue(value);
|
||||||
|
VPackArrayIterator itResult(ourResult);
|
||||||
|
while (itValue.valid() && itResult.valid()) {
|
||||||
|
doOneDoc(itValue.value(), itResult.value());
|
||||||
|
itValue.next();
|
||||||
|
itResult.next();
|
||||||
}
|
}
|
||||||
size_t nrDone = 0;
|
} else {
|
||||||
size_t nrGood = cc->performRequests(requests, 60.0, nrDone,
|
doOneDoc(value, ourResult);
|
||||||
Logger::REPLICATION);
|
}
|
||||||
if (nrGood < followers->size()) {
|
auto body = std::make_shared<std::string>();
|
||||||
// we drop all followers that were not successful:
|
*body = payload.slice().toJson();
|
||||||
for (size_t i = 0; i < followers->size(); ++i) {
|
|
||||||
if (!requests[i].done ||
|
// Now prepare the requests:
|
||||||
requests[i].result.status != CL_COMM_RECEIVED ||
|
std::vector<ClusterCommRequest> requests;
|
||||||
(requests[i].result.answer_code !=
|
for (auto const& f : *followers) {
|
||||||
GeneralResponse::ResponseCode::ACCEPTED &&
|
requests.emplace_back("server:" + f,
|
||||||
requests[i].result.answer_code !=
|
arangodb::GeneralRequest::RequestType::POST,
|
||||||
GeneralResponse::ResponseCode::CREATED)) {
|
path, body);
|
||||||
followerInfo->remove(requests[i].result.serverID);
|
}
|
||||||
LOG_TOPIC(ERR, Logger::REPLICATION)
|
size_t nrDone = 0;
|
||||||
<< "insertLocal: dropping follower "
|
size_t nrGood = cc->performRequests(requests, 15.0, nrDone,
|
||||||
<< requests[i].result.serverID;
|
Logger::REPLICATION);
|
||||||
}
|
if (nrGood < followers->size()) {
|
||||||
|
// we drop all followers that were not successful:
|
||||||
|
for (size_t i = 0; i < followers->size(); ++i) {
|
||||||
|
if (!requests[i].done ||
|
||||||
|
requests[i].result.status != CL_COMM_RECEIVED ||
|
||||||
|
(requests[i].result.answer_code !=
|
||||||
|
GeneralResponse::ResponseCode::ACCEPTED &&
|
||||||
|
requests[i].result.answer_code !=
|
||||||
|
GeneralResponse::ResponseCode::CREATED)) {
|
||||||
|
auto const& followerInfo = document->followers();
|
||||||
|
followerInfo->remove((*followers)[i]);
|
||||||
|
LOG_TOPIC(ERR, Logger::REPLICATION)
|
||||||
|
<< "insertLocal: dropping follower "
|
||||||
|
<< (*followers)[i] << " for shard " << collectionName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ struct BasicExpander {
|
||||||
TRI_ASSERT(edgeCollection != nullptr);
|
TRI_ASSERT(edgeCollection != nullptr);
|
||||||
std::shared_ptr<OperationCursor> edgeCursor = edgeCollection->getEdges(_dir, v);
|
std::shared_ptr<OperationCursor> edgeCursor = edgeCollection->getEdges(_dir, v);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(_opRes);
|
edgeCursor->getMore(_opRes, UINT64_MAX, false);
|
||||||
if (_opRes->failed()) {
|
if (_opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(_opRes->code);
|
THROW_ARANGO_EXCEPTION(_opRes->code);
|
||||||
}
|
}
|
||||||
|
@ -102,12 +102,12 @@ struct BasicExpander {
|
||||||
if (from == v) {
|
if (from == v) {
|
||||||
std::string to = edge.get(TRI_VOC_ATTRIBUTE_TO).copyString();
|
std::string to = edge.get(TRI_VOC_ATTRIBUTE_TO).copyString();
|
||||||
if (to != v) {
|
if (to != v) {
|
||||||
res_edges.emplace_back(edgeId);
|
res_edges.emplace_back(std::move(edgeId));
|
||||||
neighbors.emplace_back(to);
|
neighbors.emplace_back(std::move(to));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res_edges.emplace_back(edgeId);
|
res_edges.emplace_back(std::move(edgeId));
|
||||||
neighbors.emplace_back(from);
|
neighbors.emplace_back(std::move(from));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -214,8 +214,9 @@ class MultiCollectionEdgeExpander {
|
||||||
auto cand = candidates.find(t);
|
auto cand = candidates.find(t);
|
||||||
if (cand == candidates.end()) {
|
if (cand == candidates.end()) {
|
||||||
// Add weight
|
// Add weight
|
||||||
result.emplace_back(new ArangoDBPathFinder::Step(
|
auto step = std::make_unique<ArangoDBPathFinder::Step>(
|
||||||
t, s, currentWeight, edgeCollection->trx()->extractIdString(edge)));
|
t, s, currentWeight, edgeCollection->trx()->extractIdString(edge));
|
||||||
|
result.emplace_back(step.release());
|
||||||
candidates.emplace(t, result.size() - 1);
|
candidates.emplace(t, result.size() - 1);
|
||||||
} else {
|
} else {
|
||||||
// Compare weight
|
// Compare weight
|
||||||
|
@ -229,7 +230,7 @@ class MultiCollectionEdgeExpander {
|
||||||
|
|
||||||
auto opRes = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
|
auto opRes = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(opRes);
|
edgeCursor->getMore(opRes, UINT64_MAX, false);
|
||||||
if (opRes->failed()) {
|
if (opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(opRes->code);
|
THROW_ARANGO_EXCEPTION(opRes->code);
|
||||||
}
|
}
|
||||||
|
@ -266,6 +267,8 @@ class SimpleEdgeExpander {
|
||||||
|
|
||||||
EdgeCollectionInfo* _edgeCollection;
|
EdgeCollectionInfo* _edgeCollection;
|
||||||
|
|
||||||
|
std::unordered_map<std::string, size_t> _candidates;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SimpleEdgeExpander(TRI_edge_direction_e& direction,
|
SimpleEdgeExpander(TRI_edge_direction_e& direction,
|
||||||
EdgeCollectionInfo* edgeCollection)
|
EdgeCollectionInfo* edgeCollection)
|
||||||
|
@ -275,16 +278,16 @@ class SimpleEdgeExpander {
|
||||||
std::vector<ArangoDBPathFinder::Step*>& result) {
|
std::vector<ArangoDBPathFinder::Step*>& result) {
|
||||||
TRI_ASSERT(_edgeCollection != nullptr);
|
TRI_ASSERT(_edgeCollection != nullptr);
|
||||||
|
|
||||||
std::unordered_map<std::string, size_t> candidates;
|
_candidates.clear();
|
||||||
|
|
||||||
auto inserter = [&](std::string const& s, std::string const& t,
|
auto inserter = [&](std::string const& s, std::string const& t,
|
||||||
double currentWeight, VPackSlice edge) {
|
double currentWeight, VPackSlice edge) {
|
||||||
auto cand = candidates.find(t);
|
auto cand = _candidates.find(t);
|
||||||
if (cand == candidates.end()) {
|
if (cand == _candidates.end()) {
|
||||||
// Add weight
|
// Add weight
|
||||||
result.emplace_back(new ArangoDBPathFinder::Step(
|
auto step = std::make_unique<ArangoDBPathFinder::Step>(
|
||||||
t, s, currentWeight, _edgeCollection->trx()->extractIdString(edge)));
|
std::move(t), std::move(s), currentWeight, _edgeCollection->trx()->extractIdString(edge));
|
||||||
candidates.emplace(t, result.size() - 1);
|
result.emplace_back(step.release());
|
||||||
} else {
|
} else {
|
||||||
// Compare weight
|
// Compare weight
|
||||||
auto oldWeight = result[cand->second]->weight();
|
auto oldWeight = result[cand->second]->weight();
|
||||||
|
@ -297,7 +300,7 @@ class SimpleEdgeExpander {
|
||||||
auto edgeCursor = _edgeCollection->getEdges(_direction, source);
|
auto edgeCursor = _edgeCollection->getEdges(_direction, source);
|
||||||
auto opRes = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
|
auto opRes = std::make_shared<OperationResult>(TRI_ERROR_NO_ERROR);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(opRes);
|
edgeCursor->getMore(opRes, UINT64_MAX, false);
|
||||||
if (opRes->failed()) {
|
if (opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(opRes->code);
|
THROW_ARANGO_EXCEPTION(opRes->code);
|
||||||
}
|
}
|
||||||
|
@ -307,9 +310,9 @@ class SimpleEdgeExpander {
|
||||||
std::string const to = edge.get(TRI_VOC_ATTRIBUTE_TO).copyString();
|
std::string const to = edge.get(TRI_VOC_ATTRIBUTE_TO).copyString();
|
||||||
double currentWeight = _edgeCollection->weightEdge(edge);
|
double currentWeight = _edgeCollection->weightEdge(edge);
|
||||||
if (from == source) {
|
if (from == source) {
|
||||||
inserter(from, to, currentWeight, edge);
|
inserter(std::move(from), std::move(to), currentWeight, edge);
|
||||||
} else {
|
} else {
|
||||||
inserter(to, from, currentWeight, edge);
|
inserter(std::move(to), std::move(from), currentWeight, edge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,12 +332,14 @@ void BasicOptions::addVertexFilter(v8::Isolate* isolate,
|
||||||
|
|
||||||
if (it == _vertexFilter.end()) {
|
if (it == _vertexFilter.end()) {
|
||||||
if (example->IsArray()) {
|
if (example->IsArray()) {
|
||||||
_vertexFilter.emplace(name, new ExampleMatcher(
|
auto matcher = std::make_unique<ExampleMatcher>(
|
||||||
isolate, v8::Handle<v8::Array>::Cast(example), errorMessage));
|
isolate, v8::Handle<v8::Array>::Cast(example), errorMessage);
|
||||||
|
_vertexFilter.emplace(name, matcher.release());
|
||||||
} else {
|
} else {
|
||||||
// Has to be Object
|
// Has to be Object
|
||||||
_vertexFilter.emplace(name, new ExampleMatcher(
|
auto matcher = std::make_unique<ExampleMatcher>(
|
||||||
isolate, v8::Handle<v8::Object>::Cast(example), errorMessage));
|
isolate, v8::Handle<v8::Object>::Cast(example), errorMessage);
|
||||||
|
_vertexFilter.emplace(name, matcher.release());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,14 +381,14 @@ void BasicOptions::addEdgeFilter(v8::Isolate* isolate,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (example->IsArray()) {
|
if (example->IsArray()) {
|
||||||
_edgeFilter.emplace(
|
auto matcher = std::make_unique<ExampleMatcher>(
|
||||||
cName, new ExampleMatcher(isolate, v8::Handle<v8::Array>::Cast(example),
|
isolate, v8::Handle<v8::Array>::Cast(example), errorMessage);
|
||||||
errorMessage));
|
_edgeFilter.emplace(cName, matcher.release());
|
||||||
} else {
|
} else {
|
||||||
// Has to be Object
|
// Has to be Object
|
||||||
_edgeFilter.emplace(
|
auto matcher = std::make_unique<ExampleMatcher>(
|
||||||
cName, new ExampleMatcher(isolate, v8::Handle<v8::Object>::Cast(example),
|
isolate, v8::Handle<v8::Object>::Cast(example), errorMessage);
|
||||||
errorMessage));
|
_edgeFilter.emplace(cName, matcher.release());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +401,8 @@ void BasicOptions::addEdgeFilter(VPackSlice const& example,
|
||||||
useEdgeFilter = true;
|
useEdgeFilter = true;
|
||||||
auto it = _edgeFilter.find(cName);
|
auto it = _edgeFilter.find(cName);
|
||||||
if (it == _edgeFilter.end()) {
|
if (it == _edgeFilter.end()) {
|
||||||
_edgeFilter.emplace(cName, new ExampleMatcher(example, true));
|
auto matcher = std::make_unique<ExampleMatcher>(example, true);
|
||||||
|
_edgeFilter.emplace(cName, matcher.release());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,8 +590,9 @@ TRI_RunSimpleShortestPathSearch(
|
||||||
auto bwExpander = BasicExpander(collectionInfos, trx, backward);
|
auto bwExpander = BasicExpander(collectionInfos, trx, backward);
|
||||||
|
|
||||||
ArangoDBConstDistancePathFinder pathFinder(fwExpander, bwExpander);
|
ArangoDBConstDistancePathFinder pathFinder(fwExpander, bwExpander);
|
||||||
auto path = std::make_unique<ArangoDBConstDistancePathFinder::Path>();
|
|
||||||
path.reset(pathFinder.search(opts.start, opts.end));
|
auto path = std::unique_ptr<ArangoDBConstDistancePathFinder::Path>(
|
||||||
|
pathFinder.search(opts.start, opts.end));
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -609,7 +616,7 @@ static void InboundNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
||||||
for (auto const& start : startVertices) {
|
for (auto const& start : startVertices) {
|
||||||
auto edgeCursor = col->getEdges(dir, start);
|
auto edgeCursor = col->getEdges(dir, start);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(opRes);
|
edgeCursor->getMore(opRes, UINT64_MAX, false);
|
||||||
if (opRes->failed()) {
|
if (opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(opRes->code);
|
THROW_ARANGO_EXCEPTION(opRes->code);
|
||||||
}
|
}
|
||||||
|
@ -648,7 +655,7 @@ static void InboundNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
||||||
|
|
||||||
static void OutboundNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
static void OutboundNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
||||||
NeighborsOptions& opts,
|
NeighborsOptions& opts,
|
||||||
std::unordered_set<std::string>& startVertices,
|
std::unordered_set<std::string> const& startVertices,
|
||||||
std::unordered_set<std::string>& visited,
|
std::unordered_set<std::string>& visited,
|
||||||
std::unordered_set<std::string>& distinct,
|
std::unordered_set<std::string>& distinct,
|
||||||
uint64_t depth = 1) {
|
uint64_t depth = 1) {
|
||||||
|
@ -662,27 +669,29 @@ static void OutboundNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
||||||
for (auto const& start : startVertices) {
|
for (auto const& start : startVertices) {
|
||||||
auto edgeCursor = col->getEdges(dir, start);
|
auto edgeCursor = col->getEdges(dir, start);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(opRes);
|
edgeCursor->getMore(opRes, UINT64_MAX, false);
|
||||||
if (opRes->failed()) {
|
if (opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(opRes->code);
|
THROW_ARANGO_EXCEPTION(opRes->code);
|
||||||
}
|
}
|
||||||
VPackSlice edges = opRes->slice();
|
VPackSlice edges = opRes->slice();
|
||||||
for (auto const& edge : VPackArrayIterator(edges)) {
|
for (auto const& edge : VPackArrayIterator(edges)) {
|
||||||
if (opts.matchesEdge(edge)) {
|
if (opts.matchesEdge(edge)) {
|
||||||
std::string v = edge.get(TRI_VOC_ATTRIBUTE_TO).copyString();
|
VPackValueLength l;
|
||||||
if (visited.find(v) != visited.end()) {
|
char const* v = edge.get(TRI_VOC_ATTRIBUTE_TO).getString(l);
|
||||||
|
if (visited.find(std::string(v, l)) != visited.end()) {
|
||||||
// We have already visited this vertex
|
// We have already visited this vertex
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
visited.emplace(v);
|
std::string tmp(v, l);
|
||||||
if (depth >= opts.minDepth) {
|
if (depth >= opts.minDepth) {
|
||||||
if (opts.matchesVertex(v)) {
|
if (opts.matchesVertex(tmp)) {
|
||||||
distinct.emplace(v);
|
distinct.emplace(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (depth < opts.maxDepth) {
|
if (depth < opts.maxDepth) {
|
||||||
nextDepth.emplace(v);
|
nextDepth.emplace(tmp);
|
||||||
}
|
}
|
||||||
|
visited.emplace(std::move(tmp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -716,7 +725,7 @@ static void AnyNeighbors(std::vector<EdgeCollectionInfo*>& collectionInfos,
|
||||||
for (auto const& start : startVertices) {
|
for (auto const& start : startVertices) {
|
||||||
auto edgeCursor = col->getEdges(dir, start);
|
auto edgeCursor = col->getEdges(dir, start);
|
||||||
while (edgeCursor->hasMore()) {
|
while (edgeCursor->hasMore()) {
|
||||||
edgeCursor->getMore(opRes);
|
edgeCursor->getMore(opRes, UINT64_MAX, false);
|
||||||
if (opRes->failed()) {
|
if (opRes->failed()) {
|
||||||
THROW_ARANGO_EXCEPTION(opRes->code);
|
THROW_ARANGO_EXCEPTION(opRes->code);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "Basics/StringUtils.h"
|
#include "Basics/StringUtils.h"
|
||||||
#include "Basics/process-utils.h"
|
#include "Basics/process-utils.h"
|
||||||
#include "Rest/GeneralRequest.h"
|
#include "Rest/GeneralRequest.h"
|
||||||
|
#include "Statistics/StatisticsFeature.h"
|
||||||
#include "Statistics/statistics.h"
|
#include "Statistics/statistics.h"
|
||||||
#include "V8/v8-conv.h"
|
#include "V8/v8-conv.h"
|
||||||
#include "V8/v8-globals.h"
|
#include "V8/v8-globals.h"
|
||||||
|
@ -108,6 +109,20 @@ static void JS_ServerStatistics(
|
||||||
TRI_V8_TRY_CATCH_END
|
TRI_V8_TRY_CATCH_END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief whether or not server-side statistics are enabled
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
static void JS_EnabledStatistics(
|
||||||
|
v8::FunctionCallbackInfo<v8::Value> const& args) {
|
||||||
|
TRI_V8_TRY_CATCH_BEGIN(isolate)
|
||||||
|
v8::HandleScope scope(isolate);
|
||||||
|
|
||||||
|
v8::Handle<v8::Value> result = v8::Boolean::New(isolate, StatisticsFeature::enabled());
|
||||||
|
TRI_V8_RETURN(result);
|
||||||
|
TRI_V8_TRY_CATCH_END
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief returns the current request and connection statistics
|
/// @brief returns the current request and connection statistics
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -243,7 +258,10 @@ void TRI_InitV8Statistics(v8::Isolate* isolate,
|
||||||
// .............................................................................
|
// .............................................................................
|
||||||
// create the global functions
|
// create the global functions
|
||||||
// .............................................................................
|
// .............................................................................
|
||||||
|
|
||||||
|
TRI_AddGlobalFunctionVocbase(isolate, context,
|
||||||
|
TRI_V8_ASCII_STRING("SYS_ENABLED_STATISTICS"),
|
||||||
|
JS_EnabledStatistics);
|
||||||
TRI_AddGlobalFunctionVocbase(isolate, context,
|
TRI_AddGlobalFunctionVocbase(isolate, context,
|
||||||
TRI_V8_ASCII_STRING("SYS_CLIENT_STATISTICS"),
|
TRI_V8_ASCII_STRING("SYS_CLIENT_STATISTICS"),
|
||||||
JS_ClientStatistics);
|
JS_ClientStatistics);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "Basics/conversions.h"
|
#include "Basics/conversions.h"
|
||||||
#include "Utils/Cursor.h"
|
#include "Utils/Cursor.h"
|
||||||
#include "Utils/CursorRepository.h"
|
#include "Utils/CursorRepository.h"
|
||||||
|
#include "Utils/StandaloneTransactionContext.h"
|
||||||
#include "V8/v8-conv.h"
|
#include "V8/v8-conv.h"
|
||||||
#include "V8/v8-vpack.h"
|
#include "V8/v8-vpack.h"
|
||||||
#include "V8Server/v8-voccursor.h"
|
#include "V8Server/v8-voccursor.h"
|
||||||
|
@ -88,9 +89,16 @@ static void JS_CreateCursor(v8::FunctionCallbackInfo<v8::Value> const& args) {
|
||||||
auto cursors =
|
auto cursors =
|
||||||
static_cast<arangodb::CursorRepository*>(vocbase->_cursorRepository);
|
static_cast<arangodb::CursorRepository*>(vocbase->_cursorRepository);
|
||||||
|
|
||||||
|
arangodb::aql::QueryResult result(TRI_ERROR_NO_ERROR);
|
||||||
|
result.result = builder;
|
||||||
|
result.cached = false;
|
||||||
|
result.context = std::make_shared<arangodb::StandaloneTransactionContext>(vocbase);
|
||||||
|
|
||||||
|
TRI_ASSERT(builder.get() != nullptr);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
arangodb::Cursor* cursor = cursors->createFromVelocyPack(
|
arangodb::Cursor* cursor = cursors->createFromQueryResult(
|
||||||
builder, static_cast<size_t>(batchSize), nullptr, ttl, true, false);
|
std::move(result), static_cast<size_t>(batchSize), nullptr, ttl, true);
|
||||||
|
|
||||||
TRI_ASSERT(cursor != nullptr);
|
TRI_ASSERT(cursor != nullptr);
|
||||||
cursors->release(cursor);
|
cursors->release(cursor);
|
||||||
|
|
|
@ -59,12 +59,6 @@ typedef uint64_t TRI_voc_cid_t;
|
||||||
|
|
||||||
typedef uint64_t TRI_voc_fid_t;
|
typedef uint64_t TRI_voc_fid_t;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief document key identifier type
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
typedef char* TRI_voc_key_t;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief revision identifier type
|
/// @brief revision identifier type
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -146,16 +140,40 @@ enum TRI_edge_direction_e {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief velocypack sub-object (for indexes, as part of TRI_index_element_t,
|
/// @brief velocypack sub-object (for indexes, as part of TRI_index_element_t,
|
||||||
/// if offset is non-zero, then it is an offset into the VelocyPack data in
|
/// if the last byte in data[] is 0, then it is an offset into the VelocyPack
|
||||||
/// the data or WAL file. If offset is 0, then data contains the actual data
|
/// data in the datafile or WAL file. If the last byte in data[] is 1, then
|
||||||
/// in place.
|
/// value.data contains the actual VelocyPack data in place.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
struct TRI_vpack_sub_t {
|
struct TRI_vpack_sub_t {
|
||||||
uint32_t offset;
|
union {
|
||||||
uint8_t data[8];
|
uint8_t data[12];
|
||||||
|
uint32_t offset;
|
||||||
|
} value;
|
||||||
|
|
||||||
|
static constexpr size_t maxValueLength() noexcept {
|
||||||
|
return sizeof(value.data) - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOffset(uint32_t offset) noexcept {
|
||||||
|
value.offset = offset;
|
||||||
|
value.data[maxValueLength()] = 0; // type = offset
|
||||||
|
}
|
||||||
|
|
||||||
|
void setValue(uint8_t const* data, size_t length) noexcept {
|
||||||
|
memcpy(&value.data[0], data, length);
|
||||||
|
value.data[maxValueLength()] = 1; // type = value
|
||||||
|
}
|
||||||
|
|
||||||
VPackSlice const slice(TRI_doc_mptr_t const* mptr) const;
|
inline bool isOffset() const noexcept {
|
||||||
|
return value.data[maxValueLength()] == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool isValue() const noexcept {
|
||||||
|
return value.data[maxValueLength()] == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VPackSlice slice(TRI_doc_mptr_t const* mptr) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -2296,12 +2296,11 @@ TRI_vocbase_t::getReplicationClients() {
|
||||||
/// in place.
|
/// in place.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
VPackSlice const TRI_vpack_sub_t::slice(TRI_doc_mptr_t const* mptr) const {
|
VPackSlice TRI_vpack_sub_t::slice(TRI_doc_mptr_t const* mptr) const {
|
||||||
if (offset == 0) {
|
if (isValue()) {
|
||||||
return VPackSlice(data);
|
return VPackSlice(&value.data[0]);
|
||||||
} else {
|
}
|
||||||
return VPackSlice(mptr->vpack() + offset);
|
return VPackSlice(mptr->vpack() + value.offset);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -2310,14 +2309,12 @@ VPackSlice const TRI_vpack_sub_t::slice(TRI_doc_mptr_t const* mptr) const {
|
||||||
|
|
||||||
void TRI_FillVPackSub(TRI_vpack_sub_t* sub,
|
void TRI_FillVPackSub(TRI_vpack_sub_t* sub,
|
||||||
VPackSlice const base, VPackSlice const value) noexcept {
|
VPackSlice const base, VPackSlice const value) noexcept {
|
||||||
if (value.byteSize() <= sizeof(sub->data)) {
|
if (value.byteSize() <= TRI_vpack_sub_t::maxValueLength()) {
|
||||||
sub->offset = 0;
|
sub->setValue(value.start(), value.byteSize());
|
||||||
memcpy(sub->data, value.start(), value.byteSize());
|
|
||||||
} else {
|
} else {
|
||||||
size_t off = value.start() - base.start();
|
size_t off = value.start() - base.start();
|
||||||
TRI_ASSERT(off <= UINT32_MAX);
|
TRI_ASSERT(off <= UINT32_MAX);
|
||||||
sub->offset = static_cast<uint32_t>(off);
|
sub->setOffset(static_cast<uint32_t>(off));
|
||||||
memset(sub->data, 0, sizeof(sub->data));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -515,6 +515,9 @@ void LogfileManager::stop() {
|
||||||
// set WAL to read-only mode
|
// set WAL to read-only mode
|
||||||
allowWrites(false);
|
allowWrites(false);
|
||||||
|
|
||||||
|
// notify slots that we're shutting down
|
||||||
|
_slots->shutdown();
|
||||||
|
|
||||||
// finalize allocator thread
|
// finalize allocator thread
|
||||||
// this prevents creating new (empty) WAL logfile once we flush
|
// this prevents creating new (empty) WAL logfile once we flush
|
||||||
// current logfile
|
// current logfile
|
||||||
|
|
|
@ -52,13 +52,20 @@ Slots::Slots(LogfileManager* logfileManager, size_t numberOfSlots,
|
||||||
_lastCommittedDataTick(0),
|
_lastCommittedDataTick(0),
|
||||||
_numEvents(0),
|
_numEvents(0),
|
||||||
_lastDatabaseId(0),
|
_lastDatabaseId(0),
|
||||||
_lastCollectionId(0) {
|
_lastCollectionId(0),
|
||||||
|
_shutdown(false) {
|
||||||
_slots = new Slot[numberOfSlots];
|
_slots = new Slot[numberOfSlots];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief destroy the slots
|
/// @brief destroy the slots
|
||||||
Slots::~Slots() { delete[] _slots; }
|
Slots::~Slots() { delete[] _slots; }
|
||||||
|
|
||||||
|
/// @brief sets a shutdown flag, disabling the request for new logfiles
|
||||||
|
void Slots::shutdown() {
|
||||||
|
MUTEX_LOCKER(mutexLocker, _lock);
|
||||||
|
_shutdown = true;
|
||||||
|
}
|
||||||
|
|
||||||
/// @brief get the statistics of the slots
|
/// @brief get the statistics of the slots
|
||||||
void Slots::statistics(Slot::TickType& lastAssignedTick,
|
void Slots::statistics(Slot::TickType& lastAssignedTick,
|
||||||
Slot::TickType& lastCommittedTick,
|
Slot::TickType& lastCommittedTick,
|
||||||
|
@ -78,6 +85,11 @@ int Slots::flush(bool waitForSync) {
|
||||||
|
|
||||||
int res = closeLogfile(lastTick, worked);
|
int res = closeLogfile(lastTick, worked);
|
||||||
|
|
||||||
|
if (res == TRI_ERROR_REQUEST_CANCELED) {
|
||||||
|
// only happens during shutdown
|
||||||
|
res = TRI_ERROR_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (res == TRI_ERROR_NO_ERROR) {
|
if (res == TRI_ERROR_NO_ERROR) {
|
||||||
_logfileManager->signalSync();
|
_logfileManager->signalSync();
|
||||||
|
|
||||||
|
@ -507,7 +519,7 @@ int Slots::closeLogfile(Slot::TickType& lastCommittedTick, bool& worked) {
|
||||||
TRI_ASSERT(_logfile == nullptr);
|
TRI_ASSERT(_logfile == nullptr);
|
||||||
// fetch the next free logfile (this may create a new one)
|
// fetch the next free logfile (this may create a new one)
|
||||||
// note: as we don't have a real marker to write the size does
|
// note: as we don't have a real marker to write the size does
|
||||||
// not matter (we use a size of 1 as it must be > 0)
|
// not matter (we use a size of 1 as it must be > 0)
|
||||||
Logfile::StatusType status;
|
Logfile::StatusType status;
|
||||||
int res = newLogfile(1, status);
|
int res = newLogfile(1, status);
|
||||||
|
|
||||||
|
@ -661,6 +673,10 @@ bool Slots::waitForTick(Slot::TickType tick) {
|
||||||
int Slots::newLogfile(uint32_t size, Logfile::StatusType& status) {
|
int Slots::newLogfile(uint32_t size, Logfile::StatusType& status) {
|
||||||
TRI_ASSERT(size > 0);
|
TRI_ASSERT(size > 0);
|
||||||
|
|
||||||
|
if (_shutdown) {
|
||||||
|
return TRI_ERROR_REQUEST_CANCELED;
|
||||||
|
}
|
||||||
|
|
||||||
status = Logfile::StatusType::UNKNOWN;
|
status = Logfile::StatusType::UNKNOWN;
|
||||||
Logfile* logfile = nullptr;
|
Logfile* logfile = nullptr;
|
||||||
int res = _logfileManager->getWriteableLogfile(size, status, logfile);
|
int res = _logfileManager->getWriteableLogfile(size, status, logfile);
|
||||||
|
|
|
@ -85,6 +85,9 @@ class Slots {
|
||||||
~Slots();
|
~Slots();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// @brief sets a shutdown flag, disabling the request for new logfiles
|
||||||
|
void shutdown();
|
||||||
|
|
||||||
/// @brief get the statistics of the slots
|
/// @brief get the statistics of the slots
|
||||||
void statistics(Slot::TickType&, Slot::TickType&, Slot::TickType&, uint64_t&);
|
void statistics(Slot::TickType&, Slot::TickType&, Slot::TickType&, uint64_t&);
|
||||||
|
|
||||||
|
@ -186,6 +189,9 @@ class Slots {
|
||||||
|
|
||||||
/// @brief last written collection id (in prologue marker)
|
/// @brief last written collection id (in prologue marker)
|
||||||
TRI_voc_cid_t _lastCollectionId;
|
TRI_voc_cid_t _lastCollectionId;
|
||||||
|
|
||||||
|
/// @brief shutdown flag, set by LogfileManager on shutdown
|
||||||
|
bool _shutdown;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,11 @@ void ImportFeature::validateOptions(
|
||||||
size_t n = positionals.size();
|
size_t n = positionals.size();
|
||||||
|
|
||||||
if (1 == n) {
|
if (1 == n) {
|
||||||
_filename = positionals[0];
|
// only take positional file name attribute into account if user
|
||||||
|
// did not specify the --file option as well
|
||||||
|
if (!options->processingResult().touched("--file")) {
|
||||||
|
_filename = positionals[0];
|
||||||
|
}
|
||||||
} else if (1 < n) {
|
} else if (1 < n) {
|
||||||
LOG(FATAL) << "expecting at most one filename, got " +
|
LOG(FATAL) << "expecting at most one filename, got " +
|
||||||
StringUtils::join(positionals, ", ");
|
StringUtils::join(positionals, ", ");
|
||||||
|
|
|
@ -118,6 +118,7 @@ actions.defineHttp({
|
||||||
try {
|
try {
|
||||||
result = {};
|
result = {};
|
||||||
result.time = internal.time();
|
result.time = internal.time();
|
||||||
|
result.enabled = internal.enabledStatistics();
|
||||||
result.system = internal.processStatistics();
|
result.system = internal.processStatistics();
|
||||||
result.client = internal.clientStatistics();
|
result.client = internal.clientStatistics();
|
||||||
result.http = internal.httpStatistics();
|
result.http = internal.httpStatistics();
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
/*jshint strict: false */
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief open actions
|
|
||||||
///
|
|
||||||
/// @file
|
|
||||||
/// Actions that are mapped under the "_open" path. Allowing to execute the
|
|
||||||
/// actions without authorization.
|
|
||||||
///
|
|
||||||
/// DISCLAIMER
|
|
||||||
///
|
|
||||||
/// Copyright 2014 ArangoDB GmbH, Cologne, Germany
|
|
||||||
///
|
|
||||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
/// you may not use this file except in compliance with the License.
|
|
||||||
/// You may obtain a copy of the License at
|
|
||||||
///
|
|
||||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
///
|
|
||||||
/// Unless required by applicable law or agreed to in writing, software
|
|
||||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
/// See the License for the specific language governing permissions and
|
|
||||||
/// limitations under the License.
|
|
||||||
///
|
|
||||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
|
||||||
///
|
|
||||||
/// @author Dr. Frank Celler
|
|
||||||
/// @author Copyright 2014, triAGENS GmbH, Cologne, Germany
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
var actions = require("@arangodb/actions");
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief cerberus password manager
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
actions.defineHttp({
|
|
||||||
url: "_open/cerberus",
|
|
||||||
prefix : true,
|
|
||||||
|
|
||||||
callback : function (req, res) {
|
|
||||||
req.user = null;
|
|
||||||
req.database = "_system";
|
|
||||||
|
|
||||||
var suffix = "_system/cerberus";
|
|
||||||
suffix = suffix.split("/");
|
|
||||||
suffix = suffix.concat(req.suffix);
|
|
||||||
|
|
||||||
req.suffix = suffix;
|
|
||||||
|
|
||||||
actions.routeRequest(req, res);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,8 @@ router.get('/whoAmI', function(req, res) {
|
||||||
|
|
||||||
|
|
||||||
router.post('/logout', function (req, res) {
|
router.post('/logout', function (req, res) {
|
||||||
if (req.session) {
|
sessions.clear(req.session);
|
||||||
sessions.clear(req.session._key);
|
delete req.session;
|
||||||
delete req.session;
|
|
||||||
}
|
|
||||||
res.json({success: true});
|
res.json({success: true});
|
||||||
})
|
})
|
||||||
.summary('Log out')
|
.summary('Log out')
|
||||||
|
@ -95,6 +93,7 @@ router.post('/login', function (req, res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sessions.setUser(req.session, doc);
|
sessions.setUser(req.session, doc);
|
||||||
|
sessions.save(req.session);
|
||||||
const user = doc.user;
|
const user = doc.user;
|
||||||
res.json({user});
|
res.json({user});
|
||||||
})
|
})
|
||||||
|
@ -110,22 +109,12 @@ router.post('/login', function (req, res) {
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|
||||||
router.get('/unauthorized', function(req, res) {
|
|
||||||
res.throw('unauthorized');
|
|
||||||
})
|
|
||||||
.error('unauthorized')
|
|
||||||
.summary('Unauthorized')
|
|
||||||
.description(dd`
|
|
||||||
Responds with a HTTP 401 response.
|
|
||||||
`);
|
|
||||||
|
|
||||||
|
|
||||||
const authRouter = createRouter();
|
const authRouter = createRouter();
|
||||||
router.use(authRouter);
|
router.use(authRouter);
|
||||||
|
|
||||||
|
|
||||||
authRouter.use((req, res, next) => {
|
authRouter.use((req, res, next) => {
|
||||||
if (!internal.options()['server.disable-authentication'] && !req.session.uid) {
|
if (!internal.options()['server.disable-authentication'] && (!req.session || !req.session.uid)) {
|
||||||
res.throw('unauthorized');
|
res.throw('unauthorized');
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -35,7 +35,7 @@ module.exports = router;
|
||||||
|
|
||||||
|
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
if (!internal.options()['server.disable-authentication'] && !req.session.uid) {
|
if (!internal.options()['server.disable-authentication'] && (!req.session || !req.session.uid)) {
|
||||||
res.throw('unauthorized');
|
res.throw('unauthorized');
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -796,4 +796,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div></script></head><body><nav class="navbar"><div class="primary"><div class="navlogo"><a class="logo" href="#"><img class="arangodbLogo" src="img/DEVLOGO.png"></a></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="bodyWrapper"><div class="centralRow"><div id="navbar2" class="secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper" style="clear:both"><div id="content" class="centralContent"></div></div><div class="resizecontainer footerWrapper" style="clear:both"><footer class="footer"><div class="" id="footerBar"></div></footer></div></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js"></script><script src="cluster.js"></script></body></html>
|
</div></script></head><body><nav class="navbar"><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></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="bodyWrapper"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js"></script><script src="cluster.js"></script></body></html>
|
Binary file not shown.
|
@ -889,7 +889,8 @@
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<div class="primary">
|
<div class="primary">
|
||||||
<div class="navlogo">
|
<div class="navlogo">
|
||||||
<a class="logo" href="#"><img class="arangodbLogo" src="img/DEVLOGO.png"/></a>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div id="progressPlaceholderIcon"></div> -->
|
<!-- <div id="progressPlaceholderIcon"></div> -->
|
||||||
<div class="statmenu" id="statisticBar">
|
<div class="statmenu" id="statisticBar">
|
||||||
|
@ -902,18 +903,19 @@
|
||||||
<div class="bodyWrapper">
|
<div class="bodyWrapper">
|
||||||
|
|
||||||
<div class="centralRow">
|
<div class="centralRow">
|
||||||
<div id='navbar2' class="secondary">
|
|
||||||
|
<div id='navbar2' class="navbarWrapper secondary">
|
||||||
<div class="subnavmenu" id="subNavigationBar"></div>
|
<div class="subnavmenu" id="subNavigationBar"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="resizecontainer contentWrapper" style="clear:both;">
|
|
||||||
|
<div class="resizecontainer contentWrapper">
|
||||||
<div id="content" class="centralContent"></div>
|
<div id="content" class="centralContent"></div>
|
||||||
</div>
|
|
||||||
<div class="resizecontainer footerWrapper" style="clear:both;">
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="" id="footerBar">
|
<div id="footerBar"></div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -222,6 +222,94 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//object: {"name": "Menu 1", func: function(), active: true/false }
|
||||||
|
buildSubNavBar: function(menuItems) {
|
||||||
|
$('#subNavigationBar .bottom').html('');
|
||||||
|
var cssClass;
|
||||||
|
|
||||||
|
_.each(menuItems, function(menu, name) {
|
||||||
|
cssClass = '';
|
||||||
|
|
||||||
|
if (menu.active) {
|
||||||
|
cssClass += ' active';
|
||||||
|
}
|
||||||
|
if (menu.disabled) {
|
||||||
|
cssClass += ' disabled';
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#subNavigationBar .bottom').append(
|
||||||
|
'<li class="subMenuEntry ' + cssClass + '"><a>' + name + '</a></li>'
|
||||||
|
);
|
||||||
|
if (!menu.disabled) {
|
||||||
|
$('#subNavigationBar .bottom').children().last().bind('click', function() {
|
||||||
|
window.App.navigate(menu.route, {trigger: true});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
buildNodeSubNav: function(node, activeKey, disabled) {
|
||||||
|
var menus = {
|
||||||
|
Dashboard: {
|
||||||
|
route: '#node/' + encodeURIComponent(node)
|
||||||
|
},
|
||||||
|
Logs: {
|
||||||
|
route: '#nLogs/' + encodeURIComponent(node),
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
menus[activeKey].active = true;
|
||||||
|
menus[disabled].disabled = true;
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
|
//nav for collection view
|
||||||
|
buildNodesSubNav: function(type) {
|
||||||
|
|
||||||
|
var menus = {
|
||||||
|
Coordinators: {
|
||||||
|
route: '#cNodes'
|
||||||
|
},
|
||||||
|
DBServers: {
|
||||||
|
route: '#dNodes'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (type === 'coordinator') {
|
||||||
|
menus.Coordinators.active = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
menus.DBServers.active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
|
//nav for collection view
|
||||||
|
buildCollectionSubNav: function(collectionName, activeKey) {
|
||||||
|
|
||||||
|
var defaultRoute = '#collection/' + encodeURIComponent(collectionName);
|
||||||
|
|
||||||
|
var menus = {
|
||||||
|
Content: {
|
||||||
|
route: defaultRoute + '/documents/1'
|
||||||
|
},
|
||||||
|
Indices: {
|
||||||
|
route: '#cIndices/' + encodeURIComponent(collectionName)
|
||||||
|
},
|
||||||
|
Info: {
|
||||||
|
route: '#cInfo/' + encodeURIComponent(collectionName)
|
||||||
|
},
|
||||||
|
Settings: {
|
||||||
|
route: '#cSettings/' + encodeURIComponent(collectionName)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
menus[activeKey].active = true;
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
enableKeyboardHotkeys: function (enable) {
|
enableKeyboardHotkeys: function (enable) {
|
||||||
var hotkeys = window.arangoHelper.hotkeysFunctions;
|
var hotkeys = window.arangoHelper.hotkeysFunctions;
|
||||||
if (enable === true) {
|
if (enable === true) {
|
||||||
|
@ -1948,7 +2036,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
//also server online check
|
//also server online check
|
||||||
var self = this;
|
var self = this;
|
||||||
window.setInterval(function(){
|
window.setInterval(function() {
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
|
@ -1962,7 +2050,9 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
template: templateEngine.createTemplate("footerView.ejs"),
|
template: templateEngine.createTemplate("footerView.ejs"),
|
||||||
|
|
||||||
showServerStatus: function(isOnline) {
|
showServerStatus: function(isOnline) {
|
||||||
if (!window.App.isCluster) {
|
var self = this;
|
||||||
|
|
||||||
|
if (!window.App.isCluster) {
|
||||||
if (isOnline === true) {
|
if (isOnline === true) {
|
||||||
$('#healthStatus').removeClass('negative');
|
$('#healthStatus').removeClass('negative');
|
||||||
$('#healthStatus').addClass('positive');
|
$('#healthStatus').addClass('positive');
|
||||||
|
@ -1976,6 +2066,55 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
self.collection.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderClusterState(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderClusterState(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
renderClusterState: function(connection) {
|
||||||
|
var ok = 0, error = 0;
|
||||||
|
|
||||||
|
if (connection) {
|
||||||
|
this.collection.each(function(value) {
|
||||||
|
if (value.toJSON().status === 'ok') {
|
||||||
|
ok++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error > 0) {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
if (error === 1) {
|
||||||
|
$('.health-state').html(error + ' NODE ERROR');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.health-state').html(error + ' NODES ERROR');
|
||||||
|
}
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('negative');
|
||||||
|
$('#healthStatus').addClass('positive');
|
||||||
|
$('.health-state').html('NODES OK');
|
||||||
|
$('.health-icon').html('<i class="fa fa-check-circle"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
$('.health-state').html(window.location.host + ' OFFLINE');
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showShortcutModal: function() {
|
showShortcutModal: function() {
|
||||||
|
@ -3253,7 +3392,8 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function(templateName, title, buttons, tableContent, advancedContent, extraInfo, events, noConfirm, tabBar) {
|
show: function(templateName, title, buttons, tableContent, advancedContent,
|
||||||
|
extraInfo, events, noConfirm, tabBar, divID) {
|
||||||
var self = this, lastBtn, confirmMsg, closeButtonFound = false;
|
var self = this, lastBtn, confirmMsg, closeButtonFound = false;
|
||||||
buttons = buttons || [];
|
buttons = buttons || [];
|
||||||
noConfirm = Boolean(noConfirm);
|
noConfirm = Boolean(noConfirm);
|
||||||
|
@ -3276,13 +3416,35 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
} else {
|
} else {
|
||||||
buttons.push(self.createCloseButton('Close'));
|
buttons.push(self.createCloseButton('Close'));
|
||||||
}
|
}
|
||||||
$(this.el).html(this.baseTemplate.render({
|
if (!divID) {
|
||||||
title: title,
|
$(this.el).html(this.baseTemplate.render({
|
||||||
buttons: buttons,
|
title: title,
|
||||||
hideFooter: this.hideFooter,
|
buttons: buttons,
|
||||||
confirm: confirmMsg,
|
hideFooter: this.hideFooter,
|
||||||
tabBar: tabBar
|
confirm: confirmMsg,
|
||||||
}));
|
tabBar: tabBar
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//render into custom div
|
||||||
|
$('#' + divID).html(this.baseTemplate.render({
|
||||||
|
title: title,
|
||||||
|
buttons: buttons,
|
||||||
|
hideFooter: this.hideFooter,
|
||||||
|
confirm: confirmMsg,
|
||||||
|
tabBar: tabBar
|
||||||
|
}));
|
||||||
|
//remove not needed modal elements
|
||||||
|
$('#' + divID + " #modal-dialog").removeClass("fade hide modal");
|
||||||
|
$('#' + divID + " .modal-header").remove();
|
||||||
|
$('#' + divID + " .modal-tabbar").remove();
|
||||||
|
$('#' + divID + " .modal-tabbar").remove();
|
||||||
|
$('#' + divID + " .button-close").remove();
|
||||||
|
if ($('#' + divID + " .modal-footer").children().length === 0) {
|
||||||
|
$('#' + divID + " .modal-footer").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
_.each(buttons, function(b, i) {
|
_.each(buttons, function(b, i) {
|
||||||
if (b.disabled || !b.callback) {
|
if (b.disabled || !b.callback) {
|
||||||
return;
|
return;
|
||||||
|
@ -3377,7 +3539,9 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#modal-dialog").modal("show");
|
if (!divID) {
|
||||||
|
$("#modal-dialog").modal("show");
|
||||||
|
}
|
||||||
|
|
||||||
//enable modal hotkeys after rendering is complete
|
//enable modal hotkeys after rendering is complete
|
||||||
if (this.enabledHotkey === false) {
|
if (this.enabledHotkey === false) {
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@ input,
|
||||||
textarea,
|
textarea,
|
||||||
.page-title span,
|
.page-title span,
|
||||||
.pingback a.url {
|
.pingback a.url {
|
||||||
font-family: 'Lato', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-weight: 400; }
|
font-weight: 400; }
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -2066,7 +2066,7 @@ textarea,
|
||||||
.user-dropdown-menu, .script-dropdown-menu, .gv-dropdown-menu, .navlogo, .navlist li, div.footer-left, div.footer-left p, div.footer-center, a.headerButton, a.button-gui, div .tile, div .bigtile, div .tile a span.add-Icon, div .bigtile a span.add-Icon, div.centralContent, .contentDiv li, div.dropdownInner ul, .machineClass, .scenarioMachine, .dashboard-full-width-chart .dashboard-full-width-chart-inner, .dashboard-large-chart .dashboard-large-chart-inner, .dashboard-small-chart .dashboard-small-chart-inner, .dashboard-medium-chart, .dashboard-tendency-container, .dashboard-bar-chart-container, .dashboard-full-width-chart, .dashboard-large-chart, .dashboard-small-chart, .dashboard-sub-bar, .dashboard-sub-bar .dashboard-sub-bar-title, .dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart, .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart, .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart, .dashboard-medium-chart .dashboard-interior-chart, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart, .modal-chart-detail, .modal-chart-detail .modal-body, .modal-chart-detail .modal-dashboard-legend, .modal-chart-detail .modal-inner-detail, .dashboard-half-height-legend, .dashboard-title-bar .dashboard-half-title-bar {
|
.user-dropdown-menu, .script-dropdown-menu, .gv-dropdown-menu, .navlogo, .navlist li, div.footer-left, div.footer-left p, div.footer-center, a.headerButton, a.button-gui, div .tile, div .bigtile, div .tile a span.add-Icon, div .bigtile a span.add-Icon, div.centralContent, .contentDiv li, div.dropdownInner ul, .machineClass, .scenarioMachine, .dashboard-full-width-chart .dashboard-full-width-chart-inner, .dashboard-large-chart .dashboard-large-chart-inner, .dashboard-small-chart .dashboard-small-chart-inner, .dashboard-medium-chart, .dashboard-tendency-container, .dashboard-bar-chart-container, .dashboard-full-width-chart, .dashboard-large-chart, .dashboard-small-chart, .dashboard-sub-bar, .dashboard-sub-bar .dashboard-sub-bar-title, .dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart, .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart, .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart, .dashboard-medium-chart .dashboard-interior-chart, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart, .modal-chart-detail, .modal-chart-detail .modal-body, .modal-chart-detail .modal-dashboard-legend, .modal-chart-detail .modal-inner-detail, .dashboard-half-height-legend, .dashboard-title-bar .dashboard-half-title-bar {
|
||||||
float: left; }
|
float: left; }
|
||||||
|
|
||||||
div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet span, div .bigtile .iconSet span, .search-field, .headerBar > div.headerButtonBar, .dashboard-sub-bar-menu, .dashboard-legend, .dashboard-legend .dashboard-legend-inner span {
|
div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet span, div .bigtile .iconSet span, .search-field, .headerBar > div.headerButtonBar, .dashboard-sub-bar-menu, .dashboard-legend {
|
||||||
float: right; }
|
float: right; }
|
||||||
|
|
||||||
.tileList:after, .resizecontainer:after, .headerBar > div.headerButtonBar:after, .machineClass:after, .scenarioSingleMachine:after, .detail-chart:after, .dashboard-sub-bar:after, .dashboard-medium-chart .dashboard-medium-chart-menu:after, .dashboard-medium-chart .dashboard-medium-chart-inner:after, .dashboard-tendency-container .dashboard-tendency-chart:after, .dashboard-bar-chart-container .dashboard-bar-chart:after, .dashboard-row:after {
|
.tileList:after, .resizecontainer:after, .headerBar > div.headerButtonBar:after, .machineClass:after, .scenarioSingleMachine:after, .detail-chart:after, .dashboard-sub-bar:after, .dashboard-medium-chart .dashboard-medium-chart-menu:after, .dashboard-medium-chart .dashboard-medium-chart-inner:after, .dashboard-tendency-container .dashboard-tendency-chart:after, .dashboard-bar-chart-container .dashboard-bar-chart:after, .dashboard-row:after {
|
||||||
|
@ -2077,10 +2077,11 @@ div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet
|
||||||
height: 0;
|
height: 0;
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
|
||||||
.script-dropdown-menu .dropdown-item, .addButton, .deleteButton i, a.headerButton, a.button-gui, div.toolbox div.gv_action_button, .clusterDownBtn button, div .tile a span.icon, div .bigtile a span.icon, div .tile a svg, div .bigtile a svg, div .tile .iconSet span, div .bigtile .iconSet span, div .bigtile, .contentDiv .icon, .icon-info-sign, .arangoicon, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label, .search-submit-icon, .gv-search-submit-icon, .scenarioImage {
|
.script-dropdown-menu .dropdown-item, .addButton, .deleteButton i, a.headerButton, a.button-gui, div.toolbox div.gv_action_button, .clusterDownBtn button, div .tile a span.icon, div .bigtile a span.icon, div .tile a svg, div .bigtile a svg, div .tile .iconSet span, div .bigtile .iconSet span, div .bigtile, .contentDiv .icon, .icon-info-sign, .arangoicon, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox label.css-label, .search-submit-icon, .gv-search-submit-icon, .scenarioImage {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
.navbar, footer.footer {
|
.navbar {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -2316,6 +2317,8 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
.navlogo {
|
.navlogo {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
.navlogo .small {
|
||||||
|
display: none; }
|
||||||
|
|
||||||
.navmenu {
|
.navmenu {
|
||||||
clear: both; }
|
clear: both; }
|
||||||
|
@ -2328,12 +2331,22 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
line-height: 30px; }
|
line-height: 30px; }
|
||||||
.navlist li {
|
.navlist li {
|
||||||
width: 150px; }
|
width: 150px; }
|
||||||
|
.navlist li a {
|
||||||
|
outline: none; }
|
||||||
.navlist li .fa {
|
.navlist li .fa {
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 10px; }
|
width: 10px; }
|
||||||
|
.navlist li .fa.fa-heart {
|
||||||
|
color: #ff7a7a;
|
||||||
|
opacity: 1; }
|
||||||
|
.navlist li.disabled:hover {
|
||||||
|
cursor: default; }
|
||||||
|
.navlist li.disabled:hover a:hover {
|
||||||
|
cursor: default;
|
||||||
|
opacity: .8; }
|
||||||
.navlist li.dropdown:hover {
|
.navlist li.dropdown:hover {
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0; }
|
border-bottom-right-radius: 0; }
|
||||||
|
@ -2344,8 +2357,8 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
.navlist li.navbar-spacer {
|
.navlist li.navbar-spacer {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 0;
|
||||||
margin-top: 5px;
|
margin-top: 0;
|
||||||
opacity: .2; }
|
opacity: .2; }
|
||||||
.navlist .active {
|
.navlist .active {
|
||||||
border-left: 2px solid #77cb99; }
|
border-left: 2px solid #77cb99; }
|
||||||
|
@ -2471,21 +2484,18 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
.arango-logo img {
|
.arango-logo img {
|
||||||
margin-left: 22px; }
|
margin-left: 22px; }
|
||||||
|
|
||||||
.footerWrapper {
|
|
||||||
bottom: 0;
|
|
||||||
height: 42px;
|
|
||||||
position: absolute; }
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
background-color: rgba(239, 240, 241, 0.8);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
left: 0;
|
left: 160px;
|
||||||
right: 0;
|
right: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 1000; }
|
z-index: 1000; }
|
||||||
|
|
||||||
footer.footer {
|
footer.footer {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 40px; }
|
height: 43px;
|
||||||
|
position: fixed; }
|
||||||
footer.footer p {
|
footer.footer p {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
|
@ -2611,7 +2621,7 @@ button.disabled,
|
||||||
margin-left: 0 !important; }
|
margin-left: 0 !important; }
|
||||||
|
|
||||||
button {
|
button {
|
||||||
font-family: 'Lato', sans-serif !important; }
|
font-family: 'Roboto', sans-serif !important; }
|
||||||
button.btn-server {
|
button.btn-server {
|
||||||
width: 120px; }
|
width: 120px; }
|
||||||
button.gv-zoom-btn {
|
button.gv-zoom-btn {
|
||||||
|
@ -3144,8 +3154,8 @@ div .bigtile {
|
||||||
text-align: left; }
|
text-align: left; }
|
||||||
|
|
||||||
.resizecontainer {
|
.resizecontainer {
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px; }
|
padding-right: 10px; }
|
||||||
|
@ -5201,31 +5211,37 @@ div .bigtile {
|
||||||
.application-detail-view section.info {
|
.application-detail-view section.info {
|
||||||
width: 2290px; } }
|
width: 2290px; } }
|
||||||
|
|
||||||
div.contentWrapper {
|
div.headerBar {
|
||||||
padding-bottom: 42px; }
|
background-color: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
float: right;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 36px;
|
||||||
|
margin-top: -55px;
|
||||||
|
position: absolute;
|
||||||
|
right: 150px; }
|
||||||
|
|
||||||
div.centralRow {
|
div.centralRow {
|
||||||
background: rgba(64, 74, 83, 0.04);
|
background: rgba(64, 74, 83, 0.04);
|
||||||
float: left;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 150px;
|
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
position: absolute;
|
position: relative;
|
||||||
right: 0; }
|
right: 0; }
|
||||||
|
|
||||||
div.centralContent {
|
div.centralContent {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
margin-left: -5px;
|
box-sizing: border-box;
|
||||||
margin-right: -5px;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
min-height: 80px;
|
padding-bottom: 43px;
|
||||||
padding: 5px;
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
.contentDiv {
|
.contentDiv {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 15px 0 0; }
|
padding: 0; }
|
||||||
.contentDiv li {
|
.contentDiv li {
|
||||||
background-color: rgba(0, 0, 0, 0.05); }
|
background-color: rgba(0, 0, 0, 0.05); }
|
||||||
.contentDiv a.add {
|
.contentDiv a.add {
|
||||||
|
@ -5275,7 +5291,8 @@ li a [class*=" icon_arangodb"] {
|
||||||
.fa-minus-circle:hover {
|
.fa-minus-circle:hover {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
div.headerDropdown {
|
div.headerDropdown,
|
||||||
|
.dropdownImport {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid rgba(140, 138, 137, 0.25);
|
border: 1px solid rgba(140, 138, 137, 0.25);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -5284,11 +5301,14 @@ div.headerDropdown {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto; }
|
width: auto; }
|
||||||
div.headerDropdown.smallDropdown .dropdownInner {
|
div.headerDropdown.smallDropdown .dropdownInner,
|
||||||
|
.dropdownImport.smallDropdown .dropdownInner {
|
||||||
min-height: 20px; }
|
min-height: 20px; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox {
|
||||||
display: none; }
|
display: none; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox label.css-label {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -5297,7 +5317,8 @@ div.headerDropdown {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
vertical-align: middle; }
|
vertical-align: middle; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label {
|
||||||
background-position: 0 -15px; }
|
background-position: 0 -15px; }
|
||||||
|
|
||||||
div.dropdown-title {
|
div.dropdown-title {
|
||||||
|
@ -5472,11 +5493,13 @@ div.headerBar {
|
||||||
background-color: none;
|
background-color: none;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
float: right;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
margin-top: -55px;
|
margin-top: -55px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px; }
|
padding-right: 5px;
|
||||||
|
right: 0; }
|
||||||
div.headerBar select:focus {
|
div.headerBar select:focus {
|
||||||
outline: none; }
|
outline: none; }
|
||||||
div.headerBar .infoField {
|
div.headerBar .infoField {
|
||||||
|
@ -5552,7 +5575,8 @@ div.headerBar {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-top: 0; }
|
padding-top: 0;
|
||||||
|
text-transform: capitalize; }
|
||||||
.breadcrumb .fa {
|
.breadcrumb .fa {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 8px; }
|
margin-right: 8px; }
|
||||||
|
@ -5656,7 +5680,7 @@ div.headerBar {
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
color: #736b68;
|
color: #736b68;
|
||||||
font-family: 'Lato', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
max-height: 410px; }
|
max-height: 410px; }
|
||||||
|
@ -6339,7 +6363,7 @@ div .bigtile {
|
||||||
|
|
||||||
.dataNotReadyYet {
|
.dataNotReadyYet {
|
||||||
color: #faa732;
|
color: #faa732;
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
@ -6350,7 +6374,7 @@ div .bigtile {
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: rgba(0, 0, 0, 0.5);
|
color: rgba(0, 0, 0, 0.5);
|
||||||
font-family: Lato,sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -6364,7 +6388,7 @@ div .bigtile {
|
||||||
text-transform: uppercase; }
|
text-transform: uppercase; }
|
||||||
.dashboard-sub-bar .dashboard-sub-bar-title {
|
.dashboard-sub-bar .dashboard-sub-bar-title {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: Lato,sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
|
@ -6540,7 +6564,8 @@ div .bigtile {
|
||||||
stroke-width: .5px; }
|
stroke-width: .5px; }
|
||||||
|
|
||||||
.dashboard-legend .dashboard-legend-inner {
|
.dashboard-legend .dashboard-legend-inner {
|
||||||
padding: 0 5px 5px 0; }
|
padding: 0 5px 5px 0;
|
||||||
|
text-align: right; }
|
||||||
.dashboard-legend .dashboard-legend-inner br {
|
.dashboard-legend .dashboard-legend-inner br {
|
||||||
display: none; }
|
display: none; }
|
||||||
.dashboard-legend .dashboard-legend-inner span {
|
.dashboard-legend .dashboard-legend-inner span {
|
||||||
|
@ -6591,8 +6616,8 @@ div .bigtile {
|
||||||
width: 33.3% !important; }
|
width: 33.3% !important; }
|
||||||
|
|
||||||
.resizecontainer {
|
.resizecontainer {
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px; }
|
padding-right: 10px; }
|
||||||
|
@ -8648,31 +8673,37 @@ div .bigtile {
|
||||||
.application-detail-view section.info {
|
.application-detail-view section.info {
|
||||||
width: 2290px; } }
|
width: 2290px; } }
|
||||||
|
|
||||||
div.contentWrapper {
|
div.headerBar {
|
||||||
padding-bottom: 42px; }
|
background-color: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
float: right;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 36px;
|
||||||
|
margin-top: -55px;
|
||||||
|
position: absolute;
|
||||||
|
right: 150px; }
|
||||||
|
|
||||||
div.centralRow {
|
div.centralRow {
|
||||||
background: rgba(64, 74, 83, 0.04);
|
background: rgba(64, 74, 83, 0.04);
|
||||||
float: left;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 150px;
|
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
position: absolute;
|
position: relative;
|
||||||
right: 0; }
|
right: 0; }
|
||||||
|
|
||||||
div.centralContent {
|
div.centralContent {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
margin-left: -5px;
|
box-sizing: border-box;
|
||||||
margin-right: -5px;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
min-height: 80px;
|
padding-bottom: 43px;
|
||||||
padding: 5px;
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
.contentDiv {
|
.contentDiv {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 15px 0 0; }
|
padding: 0; }
|
||||||
.contentDiv li {
|
.contentDiv li {
|
||||||
background-color: rgba(0, 0, 0, 0.05); }
|
background-color: rgba(0, 0, 0, 0.05); }
|
||||||
.contentDiv a.add {
|
.contentDiv a.add {
|
||||||
|
|
Binary file not shown.
|
@ -41,7 +41,7 @@ module.exports = router;
|
||||||
|
|
||||||
|
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
if (!internal.options()['server.disable-authentication'] && !req.session.uid) {
|
if (!internal.options()['server.disable-authentication'] && (!req.session || !req.session.uid)) {
|
||||||
res.throw('unauthorized');
|
res.throw('unauthorized');
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -10578,21 +10578,64 @@ function GraphViewer(svg, width, height, adapterConfig, config) {
|
||||||
var cssClass;
|
var cssClass;
|
||||||
|
|
||||||
_.each(menuItems, function(menu, name) {
|
_.each(menuItems, function(menu, name) {
|
||||||
|
cssClass = '';
|
||||||
|
|
||||||
if (menu.active) {
|
if (menu.active) {
|
||||||
cssClass += ' active';
|
cssClass += ' active';
|
||||||
}
|
}
|
||||||
else {
|
if (menu.disabled) {
|
||||||
cssClass = '';
|
cssClass += ' disabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#subNavigationBar .bottom').append(
|
$('#subNavigationBar .bottom').append(
|
||||||
'<li class="subMenuEntry ' + cssClass + '"><a>' + name + '</a></li>'
|
'<li class="subMenuEntry ' + cssClass + '"><a>' + name + '</a></li>'
|
||||||
);
|
);
|
||||||
$('#subNavigationBar .bottom').children().last().bind('click', function() {
|
if (!menu.disabled) {
|
||||||
window.App.navigate(menu.route, {trigger: true});
|
$('#subNavigationBar .bottom').children().last().bind('click', function() {
|
||||||
});
|
window.App.navigate(menu.route, {trigger: true});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buildNodeSubNav: function(node, activeKey, disabled) {
|
||||||
|
var menus = {
|
||||||
|
Dashboard: {
|
||||||
|
route: '#node/' + encodeURIComponent(node)
|
||||||
|
},
|
||||||
|
Logs: {
|
||||||
|
route: '#nLogs/' + encodeURIComponent(node),
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
menus[activeKey].active = true;
|
||||||
|
menus[disabled].disabled = true;
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
|
//nav for collection view
|
||||||
|
buildNodesSubNav: function(type) {
|
||||||
|
|
||||||
|
var menus = {
|
||||||
|
Coordinators: {
|
||||||
|
route: '#cNodes'
|
||||||
|
},
|
||||||
|
DBServers: {
|
||||||
|
route: '#dNodes'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (type === 'coordinator') {
|
||||||
|
menus.Coordinators.active = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
menus.DBServers.active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
//nav for collection view
|
//nav for collection view
|
||||||
buildCollectionSubNav: function(collectionName, activeKey) {
|
buildCollectionSubNav: function(collectionName, activeKey) {
|
||||||
|
|
||||||
|
@ -13167,7 +13210,7 @@ module.define("underscore", function(exports, module) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoError
|
/// @brief ArangoError
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
if(global.ArangoError){exports.ArangoError = global.ArangoError;delete global.ArangoError;}else {exports.ArangoError = function(error){if(error !== undefined){this.error = error.error;this.code = error.code;this.errorNum = error.errorNum;this.errorMessage = error.errorMessage;}};exports.ArangoError.prototype = new Error();}Object.defineProperty(exports.ArangoError.prototype,'message',{configurable:true,enumerable:true,get:function get(){return this.errorMessage;}});exports.ArangoError.prototype.name = 'ArangoError';exports.ArangoError.prototype._PRINT = function(context){context.output += '[' + this.toString() + ']';};exports.ArangoError.prototype.toString = function(){return this.name + ' ' + this.errorNum + ': ' + this.message;}; ////////////////////////////////////////////////////////////////////////////////
|
if(global.ArangoError){exports.ArangoError = global.ArangoError;delete global.ArangoError;}else {exports.ArangoError = function(error){if(error !== undefined){this.error = error.error;this.code = error.code;this.errorNum = error.errorNum;this.errorMessage = error.errorMessage;}};exports.ArangoError.prototype = new Error();}exports.ArangoError.prototype.isArangoError = true;Object.defineProperty(exports.ArangoError.prototype,'message',{configurable:true,enumerable:true,get:function get(){return this.errorMessage;}});exports.ArangoError.prototype.name = 'ArangoError';exports.ArangoError.prototype._PRINT = function(context){context.output += '[' + this.toString() + ']';};exports.ArangoError.prototype.toString = function(){return this.name + ' ' + this.errorNum + ': ' + this.message;}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief threadNumber
|
/// @brief threadNumber
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
exports.threadNumber = 0;if(global.THREAD_NUMBER){exports.threadNumber = global.THREAD_NUMBER;delete global.THREAD_NUMBER;} ////////////////////////////////////////////////////////////////////////////////
|
exports.threadNumber = 0;if(global.THREAD_NUMBER){exports.threadNumber = global.THREAD_NUMBER;delete global.THREAD_NUMBER;} ////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -14924,7 +14967,7 @@ ArangoStatement.prototype.execute = function(){throw "cannot call abstract metho
|
||||||
/// @author Dr. Frank Celler
|
/// @author Dr. Frank Celler
|
||||||
/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany
|
/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
var internal=require("internal");var fs=require("fs");var mimetypes=require("@arangodb/mimetypes").mimeTypes; ////////////////////////////////////////////////////////////////////////////////
|
var internal=require("internal");var fs=require("fs"); ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief errors
|
/// @brief errors
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Object.keys(internal.errors).forEach(function(key){exports[key] = internal.errors[key].code;});exports.errors = internal.errors; ////////////////////////////////////////////////////////////////////////////////
|
Object.keys(internal.errors).forEach(function(key){exports[key] = internal.errors[key].code;});exports.errors = internal.errors; ////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -14934,12 +14977,6 @@ exports.ArangoError = internal.ArangoError; ////////////////////////////////////
|
||||||
/// @brief defines a module
|
/// @brief defines a module
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
exports.defineModule = function(path,file){var content;var m;var mc;content = fs.read(file);mc = internal.db._collection("_modules");if(mc === null){mc = internal.db._create("_modules",{isSystem:true});}path = module.normalize(path);m = mc.firstExample({path:path});if(m === null){mc.save({path:path,content:content});}else {mc.replace(m,{path:path,content:content});}}; ////////////////////////////////////////////////////////////////////////////////
|
exports.defineModule = function(path,file){var content;var m;var mc;content = fs.read(file);mc = internal.db._collection("_modules");if(mc === null){mc = internal.db._create("_modules",{isSystem:true});}path = module.normalize(path);m = mc.firstExample({path:path});if(m === null){mc.save({path:path,content:content});}else {mc.replace(m,{path:path,content:content});}}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief guessContentType
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
exports.guessContentType = function(filename,defaultValue){var re=/\.([a-zA-Z0-9]+)$/;var match=re.exec(filename);if(match !== null){var extension=match[1];if(mimetypes.hasOwnProperty(extension)){var type=mimetypes[extension];if(type[1]){ // append charset
|
|
||||||
return type[0] + "; charset=utf-8";}return type[0];} // fall-through intentional
|
|
||||||
} // default mimetype
|
|
||||||
if(defaultValue){return defaultValue;}return "text/plain; charset=utf-8";}; ////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief normalizeURL
|
/// @brief normalizeURL
|
||||||
///
|
///
|
||||||
/// If @FA{path} starts with "." or "..", then it is a relative path.
|
/// If @FA{path} starts with "." or "..", then it is a relative path.
|
||||||
|
@ -15957,7 +15994,7 @@ var arangodb=require("@arangodb");var ArangoError=arangodb.ArangoError; // forwa
|
||||||
var SimpleQueryArray;var SimpleQueryNear;var SimpleQueryWithin;var SimpleQueryWithinRectangle; ////////////////////////////////////////////////////////////////////////////////
|
var SimpleQueryArray;var SimpleQueryNear;var SimpleQueryWithin;var SimpleQueryWithinRectangle; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief array query
|
/// @brief array query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function GeneralArrayCursor(documents,skip,limit,data){this._documents = documents;this._countTotal = documents.length;this._skip = skip;this._limit = limit;this._cached = false;this._extra = {};var self=this;if(data !== null && data !== undefined && typeof data === 'object'){['stats','warnings','profile'].forEach(function(d){if(data.hasOwnProperty(d)){self._extra[d] = data[d];}});this._cached = data.cached || false;}this.execute();} ////////////////////////////////////////////////////////////////////////////////
|
function GeneralArrayCursor(documents,skip,limit,data){this._documents = documents;this._countTotal = documents.length;this._skip = skip;this._limit = limit;this._cached = false;this._extra = {};var self=this;if(data !== null && data !== undefined && typeof data === 'object'){['stats','warnings','profile'].forEach(function(d){if(data.hasOwnProperty(d)){self._extra[d] = data[d];}});this._cached = data.cached || false;}this.execute();}GeneralArrayCursor.prototype.isArangoResultSet = true; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief executes an array query
|
/// @brief executes an array query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
GeneralArrayCursor.prototype.execute = function(){if(this._skip === null){this._skip = 0;}var len=this._documents.length;var s=0;var e=len; // skip from the beginning
|
GeneralArrayCursor.prototype.execute = function(){if(this._skip === null){this._skip = 0;}var len=this._documents.length;var s=0;var e=len; // skip from the beginning
|
||||||
|
@ -15987,7 +16024,7 @@ GeneralArrayCursor.prototype.next = function(){if(this._current < this._stop){re
|
||||||
GeneralArrayCursor.prototype.dispose = function(){this._documents = null;this._skip = null;this._limit = null;this._countTotal = null;this._countQuery = null;this._current = null;this._stop = null;this._extra = null;}; ////////////////////////////////////////////////////////////////////////////////
|
GeneralArrayCursor.prototype.dispose = function(){this._documents = null;this._skip = null;this._limit = null;this._countTotal = null;this._countQuery = null;this._current = null;this._stop = null;this._extra = null;}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief simple query
|
/// @brief simple query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function SimpleQuery(){this._execution = null;this._skip = 0;this._limit = null;this._countQuery = null;this._countTotal = null;this._batchSize = null;} ////////////////////////////////////////////////////////////////////////////////
|
function SimpleQuery(){this._execution = null;this._skip = 0;this._limit = null;this._countQuery = null;this._countTotal = null;this._batchSize = null;}SimpleQuery.prototype.isArangoResultSet = true; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief join limits
|
/// @brief join limits
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function joinLimits(query,limit){ // original limit is 0, keep it
|
function joinLimits(query,limit){ // original limit is 0, keep it
|
||||||
|
@ -20051,6 +20088,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
window.setInterval(function() {
|
window.setInterval(function() {
|
||||||
if (window.location.hash === '#cluster'
|
if (window.location.hash === '#cluster'
|
||||||
|| window.location.hash === '#') {
|
|| window.location.hash === '#') {
|
||||||
|
|
||||||
var callback = function(data) {
|
var callback = function(data) {
|
||||||
self.rerenderValues(data);
|
self.rerenderValues(data);
|
||||||
self.rerenderGraphs(data);
|
self.rerenderGraphs(data);
|
||||||
|
@ -20156,17 +20194,36 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
var callback = function(data) {
|
var callback = function(data) {
|
||||||
self.rerenderValues(data);
|
self.rerenderValues(data);
|
||||||
self.rerenderGraphs(data);
|
self.rerenderGraphs(data);
|
||||||
};
|
}.bind(this);
|
||||||
|
|
||||||
// now fetch the statistics history
|
// now fetch the statistics history
|
||||||
self.getCoordStatHistory(callback);
|
self.getCoordStatHistory(callback);
|
||||||
|
|
||||||
this.updateValues();
|
//special case nodes
|
||||||
|
self.coordinators.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderNode(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderNode(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
rerenderValues: function(data) {
|
rerenderValues: function(data) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
// TODO cache value state like graph data
|
//TODO cache value state like graph data
|
||||||
|
|
||||||
|
//NODE
|
||||||
|
this.coordinators.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderNode(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderNode(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//Connections
|
//Connections
|
||||||
this.renderValue('#clusterConnections', Math.round(data.clientConnectionsCurrent));
|
this.renderValue('#clusterConnections', Math.round(data.clientConnectionsCurrent));
|
||||||
|
@ -20176,12 +20233,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
var totalMem = data.physicalMemory;
|
var totalMem = data.physicalMemory;
|
||||||
var usedMem = data.residentSizeCurrent;
|
var usedMem = data.residentSizeCurrent;
|
||||||
this.renderValue('#clusterRam', [usedMem, totalMem]);
|
this.renderValue('#clusterRam', [usedMem, totalMem]);
|
||||||
|
|
||||||
//NODES
|
|
||||||
this.renderValue('#clusterNodes', this.statCollectCoord.size());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
renderValue: function(id, value) {
|
renderValue: function(id, value, error) {
|
||||||
if (typeof value === 'number') {
|
if (typeof value === 'number') {
|
||||||
$(id).html(value);
|
$(id).html(value);
|
||||||
}
|
}
|
||||||
|
@ -20191,11 +20245,46 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
var percent = 1 / (b/a) * 100;
|
var percent = 1 / (b/a) * 100;
|
||||||
$(id).html(percent.toFixed(1) + ' %');
|
$(id).html(percent.toFixed(1) + ' %');
|
||||||
}
|
}
|
||||||
|
else if (typeof value === 'string') {
|
||||||
|
$(id).html(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
$(id).addClass('negative');
|
||||||
|
$(id).removeClass('positive');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(id).addClass('positive');
|
||||||
|
$(id).removeClass('negative');
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
updateValues: function() {
|
renderNode: function(connection) {
|
||||||
this.renderValue('#clusterNodes', this.statCollectCoord.size());
|
var ok = 0, error = 0;
|
||||||
this.renderValue('#clusterRam', [1024, 4096]);
|
|
||||||
|
if (connection) {
|
||||||
|
this.coordinators.each(function(value) {
|
||||||
|
if (value.toJSON().status === 'ok') {
|
||||||
|
ok++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error > 0) {
|
||||||
|
var total = error + ok;
|
||||||
|
this.renderValue('#clusterNodes', ok + '/' + total, true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.renderValue('#clusterNodes', ok);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.renderValue('#clusterNodes', 'OFFLINE', true);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initValues: function() {
|
initValues: function() {
|
||||||
|
@ -20462,7 +20551,6 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
|
|
||||||
var mergeHistory = function(data) {
|
var mergeHistory = function(data) {
|
||||||
|
|
||||||
|
|
||||||
var onetime = ['times'];
|
var onetime = ['times'];
|
||||||
var values = [
|
var values = [
|
||||||
'physicalMemory',
|
'physicalMemory',
|
||||||
|
@ -22829,8 +22917,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
"click #databaseSearchSubmit" : "search",
|
"click #databaseSearchSubmit" : "search",
|
||||||
"click #databaseToggle" : "toggleSettingsDropdown",
|
"click #databaseToggle" : "toggleSettingsDropdown",
|
||||||
"click .css-label" : "checkBoxes",
|
"click .css-label" : "checkBoxes",
|
||||||
"click #dbSortDesc" : "sorting",
|
"click #dbSortDesc" : "sorting"
|
||||||
"click .tile" : "switchDatabase"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
sorting: function() {
|
sorting: function() {
|
||||||
|
@ -24659,7 +24746,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
//also server online check
|
//also server online check
|
||||||
var self = this;
|
var self = this;
|
||||||
window.setInterval(function(){
|
window.setInterval(function() {
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
}, 15000);
|
}, 15000);
|
||||||
self.getVersion();
|
self.getVersion();
|
||||||
|
@ -24673,6 +24760,8 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
template: templateEngine.createTemplate("footerView.ejs"),
|
template: templateEngine.createTemplate("footerView.ejs"),
|
||||||
|
|
||||||
showServerStatus: function(isOnline) {
|
showServerStatus: function(isOnline) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
if (!window.App.isCluster) {
|
if (!window.App.isCluster) {
|
||||||
if (isOnline === true) {
|
if (isOnline === true) {
|
||||||
$('#healthStatus').removeClass('negative');
|
$('#healthStatus').removeClass('negative');
|
||||||
|
@ -24687,6 +24776,55 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
self.collection.fetch({
|
||||||
|
success: function() {
|
||||||
|
self.renderClusterState(true);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
self.renderClusterState(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
renderClusterState: function(connection) {
|
||||||
|
var ok = 0, error = 0;
|
||||||
|
|
||||||
|
if (connection) {
|
||||||
|
this.collection.each(function(value) {
|
||||||
|
if (value.toJSON().status === 'ok') {
|
||||||
|
ok++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (error > 0) {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
if (error === 1) {
|
||||||
|
$('.health-state').html(error + ' NODE ERROR');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('.health-state').html(error + ' NODES ERROR');
|
||||||
|
}
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('negative');
|
||||||
|
$('#healthStatus').addClass('positive');
|
||||||
|
$('.health-state').html('NODES OK');
|
||||||
|
$('.health-icon').html('<i class="fa fa-check-circle"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#healthStatus').removeClass('positive');
|
||||||
|
$('#healthStatus').addClass('negative');
|
||||||
|
$('.health-state').html(window.location.host + ' OFFLINE');
|
||||||
|
$('.health-icon').html('<i class="fa fa-exclamation-circle"></i>');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showShortcutModal: function() {
|
showShortcutModal: function() {
|
||||||
|
@ -25159,7 +25297,10 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
}
|
}
|
||||||
var info = {
|
var info = {
|
||||||
name: window.arangoHelper.escapeHtml($("#new-app-name").val()),
|
name: window.arangoHelper.escapeHtml($("#new-app-name").val()),
|
||||||
collectionNames: _.map($('#new-app-collections').select2("data"), function(d) {
|
documentCollections: _.map($('#new-app-document-collections').select2("data"), function(d) {
|
||||||
|
return window.arangoHelper.escapeHtml(d.text);
|
||||||
|
}),
|
||||||
|
edgeCollections: _.map($('#new-app-edge-collections').select2("data"), function(d) {
|
||||||
return window.arangoHelper.escapeHtml(d.text);
|
return window.arangoHelper.escapeHtml(d.text);
|
||||||
}),
|
}),
|
||||||
// authenticated: window.arangoHelper.escapeHtml($("#new-app-name").val()),
|
// authenticated: window.arangoHelper.escapeHtml($("#new-app-name").val()),
|
||||||
|
@ -25209,7 +25350,13 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
undefined,
|
undefined,
|
||||||
modalEvents
|
modalEvents
|
||||||
);
|
);
|
||||||
$("#new-app-collections").select2({
|
$("#new-app-document-collections").select2({
|
||||||
|
tags: [],
|
||||||
|
showSearchBox: false,
|
||||||
|
minimumResultsForSearch: -1,
|
||||||
|
width: "336px"
|
||||||
|
});
|
||||||
|
$("#new-app-edge-collections").select2({
|
||||||
tags: [],
|
tags: [],
|
||||||
showSearchBox: false,
|
showSearchBox: false,
|
||||||
minimumResultsForSearch: -1,
|
minimumResultsForSearch: -1,
|
||||||
|
@ -25231,7 +25378,8 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
if ($('.select2-drop').is(':visible')) {
|
if ($('.select2-drop').is(':visible')) {
|
||||||
if (!$('#select2-search-field input').is(':focus')) {
|
if (!$('#select2-search-field input').is(':focus')) {
|
||||||
$('#s2id_new-app-collections').select2('close');
|
$('#s2id_new-app-document-collections').select2('close');
|
||||||
|
$('#s2id_new-app-edge-collections').select2('close');
|
||||||
checkButton();
|
checkButton();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26132,6 +26280,25 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
/*jshint browser: true */
|
||||||
|
/*jshint unused: false */
|
||||||
|
/*global arangoHelper, Backbone, templateEngine, $, window*/
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
window.HelpUsView = Backbone.View.extend({
|
||||||
|
|
||||||
|
el: "#content",
|
||||||
|
|
||||||
|
template: templateEngine.createTemplate("helpUsView.ejs"),
|
||||||
|
|
||||||
|
render: function () {
|
||||||
|
this.$el.html(this.template.render({}));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
/*jshint browser: true */
|
/*jshint browser: true */
|
||||||
/*jshint unused: false */
|
/*jshint unused: false */
|
||||||
/*global _, arangoHelper, Backbone, window, templateEngine, $ */
|
/*global _, arangoHelper, Backbone, window, templateEngine, $ */
|
||||||
|
@ -27332,7 +27499,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
isCluster: this.isCluster
|
isCluster: this.isCluster
|
||||||
}));
|
}));
|
||||||
|
|
||||||
$(this.subEl).html(this.templateSub.render({}));
|
$(this.subEl).html(this.templateSub.render({
|
||||||
|
currentDB: this.currentDB.toJSON()
|
||||||
|
}));
|
||||||
|
|
||||||
this.dbSelectionView.render($("#dbSelect"));
|
this.dbSelectionView.render($("#dbSelect"));
|
||||||
this.notificationView.render($("#notificationBar"));
|
this.notificationView.render($("#notificationBar"));
|
||||||
|
@ -27369,10 +27538,15 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateByTab: function (e) {
|
navigateByTab: function (e) {
|
||||||
|
|
||||||
var tab = e.target || e.srcElement,
|
var tab = e.target || e.srcElement,
|
||||||
navigateTo = tab.id,
|
navigateTo = tab.id,
|
||||||
dropdown = false;
|
dropdown = false;
|
||||||
|
|
||||||
|
if ($(tab).hasClass('fa')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (navigateTo === "") {
|
if (navigateTo === "") {
|
||||||
navigateTo = $(tab).attr("class");
|
navigateTo = $(tab).attr("class");
|
||||||
}
|
}
|
||||||
|
@ -27455,20 +27629,6 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
view: undefined,
|
view: undefined,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
node: [
|
|
||||||
{
|
|
||||||
name: 'Dashboard',
|
|
||||||
view: undefined,
|
|
||||||
active: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Logs',
|
|
||||||
route: 'nodeLogs',
|
|
||||||
params: {
|
|
||||||
node: undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
queries: [
|
queries: [
|
||||||
{
|
{
|
||||||
name: 'Editor',
|
name: 'Editor',
|
||||||
|
@ -27576,6 +27736,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
menuItem = menuItem.substr(1, menuItem.length - 1);
|
menuItem = menuItem.substr(1, menuItem.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Location for selecting MainView Primary Navigaation Entry
|
||||||
if (menuItem === '') {
|
if (menuItem === '') {
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
menuItem = 'cluster';
|
menuItem = 'cluster';
|
||||||
|
@ -27584,6 +27745,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
menuItem = 'dashboard';
|
menuItem = 'dashboard';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (menuItem === 'cNodes' || menuItem === 'dNodes') {
|
||||||
|
menuItem = 'nodes';
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.renderSubMenu(menuItem.split('-')[0]);
|
this.renderSubMenu(menuItem.split('-')[0]);
|
||||||
}
|
}
|
||||||
|
@ -27651,6 +27815,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
|
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
this.coordinators = options.coordinators;
|
this.coordinators = options.coordinators;
|
||||||
|
this.dbServers = options.dbServers;
|
||||||
this.coordname = options.coordname;
|
this.coordname = options.coordname;
|
||||||
this.updateServerTime();
|
this.updateServerTime();
|
||||||
|
|
||||||
|
@ -27667,30 +27832,41 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
breadcrumb: function(name) {
|
breadcrumb: function(name) {
|
||||||
console.log("yes");
|
|
||||||
$('#subNavigationBar .breadcrumb').html("Node: " + name);
|
$('#subNavigationBar .breadcrumb').html("Node: " + name);
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
console.log(1);
|
|
||||||
this.$el.html(this.template.render({coords: []}));
|
this.$el.html(this.template.render({coords: []}));
|
||||||
|
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
this.continueRender();
|
this.continueRender();
|
||||||
this.breadcrumb(this.coordname);
|
this.breadcrumb(this.coordname);
|
||||||
|
window.arangoHelper.buildNodeSubNav(this.coordname, 'Dashboard', 'Logs');
|
||||||
|
$(window).trigger('resize');
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
if (!this.initDone) {
|
var cb =function() {
|
||||||
this.waitForCoordinators(callback);
|
console.log("dummy");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!this.initCoordDone) {
|
||||||
|
this.waitForCoordinators(cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.initDBDone) {
|
||||||
|
this.waitForDBServers(callback);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.coordname = window.location.hash.split('/')[1];
|
this.coordname = window.location.hash.split('/')[1];
|
||||||
this.coordinator = this.coordinators.findWhere({name: this.coordname});
|
this.coordinator = this.coordinators.findWhere({name: this.coordname});
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
|
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
|
||||||
dygraphConfig: window.dygraphConfig,
|
dygraphConfig: window.dygraphConfig,
|
||||||
database: window.App.arangoDatabase,
|
database: window.App.arangoDatabase,
|
||||||
|
@ -27702,6 +27878,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.dashboards[this.coordinator.get('name')].render();
|
this.dashboards[this.coordinator.get('name')].render();
|
||||||
|
window.setTimeout(function() {
|
||||||
|
self.dashboards[self.coordinator.get('name')].resize();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
waitForCoordinators: function(callback) {
|
waitForCoordinators: function(callback) {
|
||||||
|
@ -27713,7 +27892,30 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
self.coordinator = self.coordinators.findWhere({name: self.coordname});
|
self.coordinator = self.coordinators.findWhere({name: self.coordname});
|
||||||
self.initDone = true;
|
self.initCoordDone = true;
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
|
},
|
||||||
|
|
||||||
|
waitForDBServers: function(callback) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
window.setTimeout(function() {
|
||||||
|
if (self.dbServers[0].length === 0) {
|
||||||
|
self.waitForDBServers(callback);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
self.initDBDone = true;
|
||||||
|
self.dbServer = self.dbServers[0];
|
||||||
|
|
||||||
|
self.dbServer.each(function(model) {
|
||||||
|
if (model.get("name") === 'DBServer1') {
|
||||||
|
self.dbServer = model;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(self.dbServer.toJSON());
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
|
@ -27740,21 +27942,23 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
knownServers: [],
|
knownServers: [],
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"click .pure-table-body .pure-table-row": "navigateToNode"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
this.dbServers = options.dbServers;
|
this.dbServers = options.dbServers;
|
||||||
this.coordinators = options.coordinators;
|
this.coordinators = options.coordinators;
|
||||||
this.updateServerTime();
|
this.updateServerTime();
|
||||||
|
this.toRender = options.toRender;
|
||||||
|
|
||||||
|
if (this.toRender !== 'coordinator') {
|
||||||
|
this.events["click .pure-table-body .pure-table-row"] = "navigateToNode";
|
||||||
|
}
|
||||||
|
|
||||||
//start polling with interval
|
//start polling with interval
|
||||||
window.setInterval(function() {
|
window.setInterval(function() {
|
||||||
if (window.location.hash === '#nodes') {
|
if (window.location.hash === '#cNodes' || window.location.hash === '#dNodes') {
|
||||||
|
|
||||||
|
|
||||||
var callback = function(data) {
|
var callback = function(data) {
|
||||||
};
|
};
|
||||||
|
@ -27770,7 +27974,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.html(this.template.render({coords: []}));
|
window.arangoHelper.buildNodesSubNav(this.toRender);
|
||||||
|
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
this.continueRender();
|
this.continueRender();
|
||||||
|
@ -27785,10 +27989,18 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
var coords = this.coordinators.toJSON();
|
var coords;
|
||||||
console.log(coords);
|
|
||||||
|
if (this.toRender === 'coordinator') {
|
||||||
|
coords = this.coordinators.toJSON();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
coords = this.dbServers.toJSON();
|
||||||
|
}
|
||||||
|
|
||||||
this.$el.html(this.template.render({
|
this.$el.html(this.template.render({
|
||||||
coords: coords
|
coords: coords,
|
||||||
|
type: this.toRender
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -30266,10 +30478,11 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
this.bindParamAceEditor.getSession().setMode("ace/mode/json");
|
this.bindParamAceEditor.getSession().setMode("ace/mode/json");
|
||||||
this.bindParamAceEditor.setFontSize("10pt");
|
this.bindParamAceEditor.setFontSize("10pt");
|
||||||
|
|
||||||
this.bindParamAceEditor.getSession().on('change', function() {
|
this.bindParamAceEditor.getSession().on('change', function(a, b, c) {
|
||||||
try {
|
try {
|
||||||
self.bindParamTableObj = JSON.parse(self.bindParamAceEditor.getValue());
|
self.bindParamTableObj = JSON.parse(self.bindParamAceEditor.getValue());
|
||||||
self.allowParamToggle = true;
|
self.allowParamToggle = true;
|
||||||
|
self.setCachedQuery(self.aqlEditor.getValue(), JSON.stringify(self.bindParamTableObj));
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
self.allowParamToggle = false;
|
self.allowParamToggle = false;
|
||||||
|
@ -34024,6 +34237,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
"query2": "query",
|
"query2": "query",
|
||||||
"workMonitor": "workMonitor",
|
"workMonitor": "workMonitor",
|
||||||
"databases": "databases",
|
"databases": "databases",
|
||||||
|
"settings": "databases",
|
||||||
"services": "applications",
|
"services": "applications",
|
||||||
"service/:mount": "applicationDetail",
|
"service/:mount": "applicationDetail",
|
||||||
"graphs": "graphManagement",
|
"graphs": "graphManagement",
|
||||||
|
@ -34031,10 +34245,13 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
"users": "userManagement",
|
"users": "userManagement",
|
||||||
"userProfile": "userProfile",
|
"userProfile": "userProfile",
|
||||||
"cluster": "cluster",
|
"cluster": "cluster",
|
||||||
"nodes": "nodes",
|
"nodes": "cNodes",
|
||||||
|
"cNodes": "cNodes",
|
||||||
|
"dNodes": "dNodes",
|
||||||
"node/:name": "node",
|
"node/:name": "node",
|
||||||
|
//"nLogs/:name": "nLogs",
|
||||||
"logs": "logs",
|
"logs": "logs",
|
||||||
"test": "test"
|
"helpus": "helpUs"
|
||||||
},
|
},
|
||||||
|
|
||||||
execute: function(callback, args) {
|
execute: function(callback, args) {
|
||||||
|
@ -34139,7 +34356,9 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
collection: this.arangoCollectionsStore
|
collection: this.arangoCollectionsStore
|
||||||
});
|
});
|
||||||
|
|
||||||
this.footerView = new window.FooterView();
|
this.footerView = new window.FooterView({
|
||||||
|
collection: self.coordinatorCollection
|
||||||
|
});
|
||||||
this.notificationList = new window.NotificationCollection();
|
this.notificationList = new window.NotificationCollection();
|
||||||
|
|
||||||
this.currentDB.fetch({
|
this.currentDB.fetch({
|
||||||
|
@ -34224,19 +34443,16 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
this.nodeView = new window.NodeView({
|
this.nodeView = new window.NodeView({
|
||||||
coordname: name,
|
coordname: name,
|
||||||
coordinators: this.coordinatorCollection,
|
coordinators: this.coordinatorCollection,
|
||||||
|
dbServers: this.dbServers
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.nodeView.render();
|
this.nodeView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
nodeLogs: function (initialized) {
|
cNodes: function (initialized) {
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
nodes: function (initialized) {
|
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
if (!initialized || this.isCluster === undefined) {
|
if (!initialized || this.isCluster === undefined) {
|
||||||
this.waitForInit(this.nodes.bind(this));
|
this.waitForInit(this.cNodes.bind(this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.isCluster === false) {
|
if (this.isCluster === false) {
|
||||||
|
@ -34245,12 +34461,31 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.nodesView) {
|
this.nodesView = new window.NodesView({
|
||||||
this.nodesView = new window.NodesView({
|
coordinators: this.coordinatorCollection,
|
||||||
coordinators: this.coordinatorCollection,
|
dbServers: this.dbServers[0],
|
||||||
dbServers: this.dbServers
|
toRender: 'coordinator'
|
||||||
});
|
});
|
||||||
|
this.nodesView.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
dNodes: function (initialized) {
|
||||||
|
this.checkUser();
|
||||||
|
if (!initialized || this.isCluster === undefined) {
|
||||||
|
this.waitForInit(this.dNodes.bind(this));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.isCluster === false) {
|
||||||
|
this.routes[""] = 'dashboard';
|
||||||
|
this.navigate("#dashboard", {trigger: true});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.nodesView = new window.NodesView({
|
||||||
|
coordinators: this.coordinatorCollection,
|
||||||
|
dbServers: this.dbServers[0],
|
||||||
|
toRender: 'dbserver'
|
||||||
|
});
|
||||||
this.nodesView.render();
|
this.nodesView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -34302,6 +34537,39 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
this.logsView.render();
|
this.logsView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
nLogs: function (nodename, initialized) {
|
||||||
|
this.checkUser();
|
||||||
|
if (!initialized) {
|
||||||
|
this.waitForInit(this.nLogs.bind(this), nodename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var newLogsAllCollection = new window.ArangoLogs(
|
||||||
|
{upto: true, loglevel: 4}
|
||||||
|
),
|
||||||
|
newLogsDebugCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 4}
|
||||||
|
),
|
||||||
|
newLogsInfoCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 3}
|
||||||
|
),
|
||||||
|
newLogsWarningCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 2}
|
||||||
|
),
|
||||||
|
newLogsErrorCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 1}
|
||||||
|
);
|
||||||
|
this.nLogsView = new window.LogsView({
|
||||||
|
logall: newLogsAllCollection,
|
||||||
|
logdebug: newLogsDebugCollection,
|
||||||
|
loginfo: newLogsInfoCollection,
|
||||||
|
logwarning: newLogsWarningCollection,
|
||||||
|
logerror: newLogsErrorCollection
|
||||||
|
});
|
||||||
|
this.nLogsView.render();
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
applicationDetail: function (mount, initialized) {
|
applicationDetail: function (mount, initialized) {
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
|
@ -34537,6 +34805,18 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
this.testView.render();
|
this.testView.render();
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
helpUs: function (initialized) {
|
||||||
|
this.checkUser();
|
||||||
|
if (!initialized) {
|
||||||
|
this.waitForInit(this.helpUs.bind(this));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.testView) {
|
||||||
|
this.helpUsView = new window.HelpUsView({
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.helpUsView.render();
|
||||||
|
},
|
||||||
|
|
||||||
workMonitor: function (initialized) {
|
workMonitor: function (initialized) {
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
|
@ -34728,7 +35008,7 @@ window.ArangoUsers = Backbone.Collection.extend({
|
||||||
host: coordinator.get('address')
|
host: coordinator.get('address')
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
_.each(this.dbServers, function(dbservers) {
|
_.each(this.dbServers, function(dbservers) {
|
||||||
dbservers.fetch();
|
dbservers.fetch();
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -27,7 +27,7 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief ArangoError
|
/// @brief ArangoError
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
if(global.ArangoError){exports.ArangoError = global.ArangoError;delete global.ArangoError;}else {exports.ArangoError = function(error){if(error !== undefined){this.error = error.error;this.code = error.code;this.errorNum = error.errorNum;this.errorMessage = error.errorMessage;}};exports.ArangoError.prototype = new Error();}Object.defineProperty(exports.ArangoError.prototype,'message',{configurable:true,enumerable:true,get:function get(){return this.errorMessage;}});exports.ArangoError.prototype.name = 'ArangoError';exports.ArangoError.prototype._PRINT = function(context){context.output += '[' + this.toString() + ']';};exports.ArangoError.prototype.toString = function(){return this.name + ' ' + this.errorNum + ': ' + this.message;}; ////////////////////////////////////////////////////////////////////////////////
|
if(global.ArangoError){exports.ArangoError = global.ArangoError;delete global.ArangoError;}else {exports.ArangoError = function(error){if(error !== undefined){this.error = error.error;this.code = error.code;this.errorNum = error.errorNum;this.errorMessage = error.errorMessage;}};exports.ArangoError.prototype = new Error();}exports.ArangoError.prototype.isArangoError = true;Object.defineProperty(exports.ArangoError.prototype,'message',{configurable:true,enumerable:true,get:function get(){return this.errorMessage;}});exports.ArangoError.prototype.name = 'ArangoError';exports.ArangoError.prototype._PRINT = function(context){context.output += '[' + this.toString() + ']';};exports.ArangoError.prototype.toString = function(){return this.name + ' ' + this.errorNum + ': ' + this.message;}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief threadNumber
|
/// @brief threadNumber
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
exports.threadNumber = 0;if(global.THREAD_NUMBER){exports.threadNumber = global.THREAD_NUMBER;delete global.THREAD_NUMBER;} ////////////////////////////////////////////////////////////////////////////////
|
exports.threadNumber = 0;if(global.THREAD_NUMBER){exports.threadNumber = global.THREAD_NUMBER;delete global.THREAD_NUMBER;} ////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1784,7 +1784,7 @@ ArangoStatement.prototype.execute = function(){throw "cannot call abstract metho
|
||||||
/// @author Dr. Frank Celler
|
/// @author Dr. Frank Celler
|
||||||
/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany
|
/// @author Copyright 2012-2013, triAGENS GmbH, Cologne, Germany
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
var internal=require("internal");var fs=require("fs");var mimetypes=require("@arangodb/mimetypes").mimeTypes; ////////////////////////////////////////////////////////////////////////////////
|
var internal=require("internal");var fs=require("fs"); ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief errors
|
/// @brief errors
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Object.keys(internal.errors).forEach(function(key){exports[key] = internal.errors[key].code;});exports.errors = internal.errors; ////////////////////////////////////////////////////////////////////////////////
|
Object.keys(internal.errors).forEach(function(key){exports[key] = internal.errors[key].code;});exports.errors = internal.errors; ////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1794,12 +1794,6 @@ exports.ArangoError = internal.ArangoError; ////////////////////////////////////
|
||||||
/// @brief defines a module
|
/// @brief defines a module
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
exports.defineModule = function(path,file){var content;var m;var mc;content = fs.read(file);mc = internal.db._collection("_modules");if(mc === null){mc = internal.db._create("_modules",{isSystem:true});}path = module.normalize(path);m = mc.firstExample({path:path});if(m === null){mc.save({path:path,content:content});}else {mc.replace(m,{path:path,content:content});}}; ////////////////////////////////////////////////////////////////////////////////
|
exports.defineModule = function(path,file){var content;var m;var mc;content = fs.read(file);mc = internal.db._collection("_modules");if(mc === null){mc = internal.db._create("_modules",{isSystem:true});}path = module.normalize(path);m = mc.firstExample({path:path});if(m === null){mc.save({path:path,content:content});}else {mc.replace(m,{path:path,content:content});}}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief guessContentType
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
exports.guessContentType = function(filename,defaultValue){var re=/\.([a-zA-Z0-9]+)$/;var match=re.exec(filename);if(match !== null){var extension=match[1];if(mimetypes.hasOwnProperty(extension)){var type=mimetypes[extension];if(type[1]){ // append charset
|
|
||||||
return type[0] + "; charset=utf-8";}return type[0];} // fall-through intentional
|
|
||||||
} // default mimetype
|
|
||||||
if(defaultValue){return defaultValue;}return "text/plain; charset=utf-8";}; ////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief normalizeURL
|
/// @brief normalizeURL
|
||||||
///
|
///
|
||||||
/// If @FA{path} starts with "." or "..", then it is a relative path.
|
/// If @FA{path} starts with "." or "..", then it is a relative path.
|
||||||
|
@ -2817,7 +2811,7 @@ var arangodb=require("@arangodb");var ArangoError=arangodb.ArangoError; // forwa
|
||||||
var SimpleQueryArray;var SimpleQueryNear;var SimpleQueryWithin;var SimpleQueryWithinRectangle; ////////////////////////////////////////////////////////////////////////////////
|
var SimpleQueryArray;var SimpleQueryNear;var SimpleQueryWithin;var SimpleQueryWithinRectangle; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief array query
|
/// @brief array query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function GeneralArrayCursor(documents,skip,limit,data){this._documents = documents;this._countTotal = documents.length;this._skip = skip;this._limit = limit;this._cached = false;this._extra = {};var self=this;if(data !== null && data !== undefined && typeof data === 'object'){['stats','warnings','profile'].forEach(function(d){if(data.hasOwnProperty(d)){self._extra[d] = data[d];}});this._cached = data.cached || false;}this.execute();} ////////////////////////////////////////////////////////////////////////////////
|
function GeneralArrayCursor(documents,skip,limit,data){this._documents = documents;this._countTotal = documents.length;this._skip = skip;this._limit = limit;this._cached = false;this._extra = {};var self=this;if(data !== null && data !== undefined && typeof data === 'object'){['stats','warnings','profile'].forEach(function(d){if(data.hasOwnProperty(d)){self._extra[d] = data[d];}});this._cached = data.cached || false;}this.execute();}GeneralArrayCursor.prototype.isArangoResultSet = true; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief executes an array query
|
/// @brief executes an array query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
GeneralArrayCursor.prototype.execute = function(){if(this._skip === null){this._skip = 0;}var len=this._documents.length;var s=0;var e=len; // skip from the beginning
|
GeneralArrayCursor.prototype.execute = function(){if(this._skip === null){this._skip = 0;}var len=this._documents.length;var s=0;var e=len; // skip from the beginning
|
||||||
|
@ -2847,7 +2841,7 @@ GeneralArrayCursor.prototype.next = function(){if(this._current < this._stop){re
|
||||||
GeneralArrayCursor.prototype.dispose = function(){this._documents = null;this._skip = null;this._limit = null;this._countTotal = null;this._countQuery = null;this._current = null;this._stop = null;this._extra = null;}; ////////////////////////////////////////////////////////////////////////////////
|
GeneralArrayCursor.prototype.dispose = function(){this._documents = null;this._skip = null;this._limit = null;this._countTotal = null;this._countQuery = null;this._current = null;this._stop = null;this._extra = null;}; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief simple query
|
/// @brief simple query
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function SimpleQuery(){this._execution = null;this._skip = 0;this._limit = null;this._countQuery = null;this._countTotal = null;this._batchSize = null;} ////////////////////////////////////////////////////////////////////////////////
|
function SimpleQuery(){this._execution = null;this._skip = 0;this._limit = null;this._countQuery = null;this._countTotal = null;this._batchSize = null;}SimpleQuery.prototype.isArangoResultSet = true; ////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief join limits
|
/// @brief join limits
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
function joinLimits(query,limit){ // original limit is 0, keep it
|
function joinLimits(query,limit){ // original limit is 0, keep it
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*eslint camelcase:0 */
|
/*eslint camelcase:0 */
|
||||||
/*jshint esnext:true, -W051:true */
|
/*jshint esnext:true, -W051:true */
|
||||||
/*eslint-disable */
|
/*eslint-disable */
|
||||||
global.DEFINE_MODULE('internal', (function() {
|
global.DEFINE_MODULE('internal', (function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
/*eslint-enable */
|
/*eslint-enable */
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ if (global.ArangoError) {
|
||||||
exports.ArangoError = global.ArangoError;
|
exports.ArangoError = global.ArangoError;
|
||||||
delete global.ArangoError;
|
delete global.ArangoError;
|
||||||
} else {
|
} else {
|
||||||
exports.ArangoError = function(error) {
|
exports.ArangoError = function (error) {
|
||||||
if (error !== undefined) {
|
if (error !== undefined) {
|
||||||
this.error = error.error;
|
this.error = error.error;
|
||||||
this.code = error.code;
|
this.code = error.code;
|
||||||
|
@ -54,6 +54,8 @@ if (global.ArangoError) {
|
||||||
exports.ArangoError.prototype = new Error();
|
exports.ArangoError.prototype = new Error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.ArangoError.prototype.isArangoError = true;
|
||||||
|
|
||||||
Object.defineProperty(exports.ArangoError.prototype, 'message', {
|
Object.defineProperty(exports.ArangoError.prototype, 'message', {
|
||||||
configurable: true,
|
configurable: true,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
|
@ -335,16 +337,16 @@ if (global.SYS_GET_CURRENT_RESPONSE) {
|
||||||
/// @brief extend
|
/// @brief extend
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
exports.extend = function(target, source) {
|
exports.extend = function (target, source) {
|
||||||
|
|
||||||
Object.getOwnPropertyNames(source)
|
Object.getOwnPropertyNames(source)
|
||||||
.forEach(function(propName) {
|
.forEach(function(propName) {
|
||||||
Object.defineProperty(
|
Object.defineProperty(
|
||||||
target,
|
target,
|
||||||
propName,
|
propName,
|
||||||
Object.getOwnPropertyDescriptor(source, propName)
|
Object.getOwnPropertyDescriptor(source, propName)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
return target;
|
return target;
|
||||||
};
|
};
|
||||||
|
@ -9563,12 +9565,8 @@ module.define("@arangodb/common", function(exports, module) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var internal = require("internal");
|
var internal = require("internal");
|
||||||
|
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
|
|
||||||
var mimetypes = require("@arangodb/mimetypes").mimeTypes;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief errors
|
/// @brief errors
|
||||||
|
@ -9617,37 +9615,6 @@ exports.defineModule = function (path, file) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief guessContentType
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
exports.guessContentType = function (filename, defaultValue) {
|
|
||||||
var re = /\.([a-zA-Z0-9]+)$/;
|
|
||||||
var match = re.exec(filename);
|
|
||||||
|
|
||||||
if (match !== null) {
|
|
||||||
var extension = match[1];
|
|
||||||
|
|
||||||
if (mimetypes.hasOwnProperty(extension)) {
|
|
||||||
var type = mimetypes[extension];
|
|
||||||
|
|
||||||
if (type[1]) {
|
|
||||||
// append charset
|
|
||||||
return type[0] + "; charset=utf-8";
|
|
||||||
}
|
|
||||||
|
|
||||||
return type[0];
|
|
||||||
}
|
|
||||||
// fall-through intentional
|
|
||||||
}
|
|
||||||
|
|
||||||
// default mimetype
|
|
||||||
if (defaultValue) {
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
return "text/plain; charset=utf-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief normalizeURL
|
/// @brief normalizeURL
|
||||||
///
|
///
|
||||||
|
@ -15436,6 +15403,8 @@ function GeneralArrayCursor (documents, skip, limit, data) {
|
||||||
this.execute();
|
this.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GeneralArrayCursor.prototype.isArangoResultSet = true;
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief executes an array query
|
/// @brief executes an array query
|
||||||
|
@ -15586,6 +15555,8 @@ function SimpleQuery () {
|
||||||
this._batchSize = null;
|
this._batchSize = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SimpleQuery.prototype.isArangoResultSet = true;
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief join limits
|
/// @brief join limits
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,3 +1,3 @@
|
||||||
<script src="sharedLibs.js?version=1460720592272"></script>
|
<script src="sharedLibs.js?version=1461089875197"></script>
|
||||||
<script src="libs.js?version=1460720592272"></script>
|
<script src="libs.js?version=1461089875197"></script>
|
||||||
<script src="app.js?version=1460720592272"></script>
|
<script src="app.js?version=1461089875197"></script>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/html"><head><meta charset="utf-8"><title>ArangoDB Web Interface</title><meta name="description" content="ArangoDB Admin Web Interface"><meta name="author" content="Heiko Kernbach, Michael Hackstein"><link href="css/style.css" rel="stylesheet"><link href="css/sass.css" rel="stylesheet"><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"><link href="https://fonts.googleapis.com/css?family=Lato:400,300,700" rel="stylesheet" type="text/css"><script id="applicationDetailView.ejs" type="text/template"><div class="application-detail-view">
|
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/html"><head><meta charset="utf-8"><title>ArangoDB Web Interface</title><meta name="description" content="ArangoDB Admin Web Interface"><meta name="author" content="Heiko Kernbach, Michael Hackstein"><link href="css/style.css" rel="stylesheet"><link href="css/sass.css" rel="stylesheet"><link rel="shortcut icon" type="image/x-icon" href="favicon.ico"><link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700" rel="stylesheet" type="text/css"><script id="applicationDetailView.ejs" type="text/template"><div class="application-detail-view">
|
||||||
<div class="headerBar">
|
<div class="headerBar">
|
||||||
<div class="headerButtonBar">
|
<div class="headerButtonBar">
|
||||||
<ul class="headerButtonList">
|
<ul class="headerButtonList">
|
||||||
|
@ -687,9 +687,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-left">
|
|
||||||
<a class="arangoHeader">Databases</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -740,9 +737,13 @@
|
||||||
|
|
||||||
<%});%>
|
<%});%>
|
||||||
</div>
|
</div>
|
||||||
</div></script><script id="dbSelectionView.ejs" type="text/template"><a href="#" class="tab" id="dbselection"><div class="dbselection"><i class="fa fa-database"></i><span class="db-name">DB: </span> <%=current%><i class="fa fa-caret-square-o-down"></i></div>
|
</div></script><script id="dbSelectionView.ejs" type="text/template"><a href="#" class="tab disabled" id="dbselection"><div class="dbselection"><i class="fa fa-database"></i><span class="db-name">DB: </span> <%=current%>
|
||||||
|
<!-- <i class="fa fa-caret-square-o-down"></i> -->
|
||||||
|
</div>
|
||||||
<!-- <b class="caret"></b> -->
|
<!-- <b class="caret"></b> -->
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!--
|
||||||
<ul class="link-dropdown-menu" id="dbs_dropdown">
|
<ul class="link-dropdown-menu" id="dbs_dropdown">
|
||||||
<%
|
<%
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
|
@ -769,7 +770,8 @@ if (list.length > 0) {
|
||||||
<a id="databases" class="tab" href="#databases">Manage Databases</a>
|
<a id="databases" class="tab" href="#databases">Manage Databases</a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
</ul></script><script id="documentView.ejs" type="text/template"><div id="transparentHeader" class="headerBar">
|
</ul>
|
||||||
|
--></script><script id="documentView.ejs" type="text/template"><div id="transparentHeader" class="headerBar">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1206,7 +1208,8 @@ if (list.length > 0) {
|
||||||
<input id="<%=type %>_<%=id%>" type="text" name="<%=type %>_<%=id%>" placeholder="Attribute" maxlength="75" class="input-xlarge">
|
<input id="<%=type %>_<%=id%>" type="text" name="<%=type %>_<%=id%>" placeholder="Attribute" maxlength="75" class="input-xlarge">
|
||||||
<button id="remove_<%=type %>_<%=id%>" class="graphViewer-icon-button gv_internal_remove_line gv-icon-small delete" />
|
<button id="remove_<%=type %>_<%=id%>" class="graphViewer-icon-button gv_internal_remove_line gv-icon-small delete" />
|
||||||
</div>
|
</div>
|
||||||
</div></script><script id="indicesView.ejs" type="text/template"><div class="contentIn" id="indexHeaderContent">
|
</div></script><script id="helpUsView.ejs" type="text/template"><div class="helpUs">
|
||||||
|
<div class="_form_87"></div><script src="https://arangodb.activehosted.com/f/embed.php?id=87" type="text/javascript" charset="utf-8"></script><script id="indicesView.ejs" type="text/template"><div class="contentIn" id="indexHeaderContent">
|
||||||
<div id="indexEditView">
|
<div id="indexEditView">
|
||||||
<table id="collectionEditIndexTable" class="edit-index-table">
|
<table id="collectionEditIndexTable" class="edit-index-table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -1564,13 +1567,26 @@ if (list.length > 0) {
|
||||||
-->
|
-->
|
||||||
<tr class="tableRow">
|
<tr class="tableRow">
|
||||||
<th class="collectionInfoTh">
|
<th class="collectionInfoTh">
|
||||||
Collections:
|
Document Collections:
|
||||||
</th>
|
</th>
|
||||||
<th class="collectionInfoTh">
|
<th class="collectionInfoTh">
|
||||||
<input type="hidden" id="new-app-collections" value="" placeholder="Collections"></input>
|
<input type="hidden" id="new-app-document-collections" value="" placeholder="Document Collections"></input>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<a class="modalTooltips" title="A list of collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
<a class="modalTooltips" title="A list of document collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
||||||
|
<span class="arangoicon icon_arangodb_info"></span>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="tableRow">
|
||||||
|
<th class="collectionInfoTh">
|
||||||
|
Edge Collections:
|
||||||
|
</th>
|
||||||
|
<th class="collectionInfoTh">
|
||||||
|
<input type="hidden" id="new-app-edge-collections" value="" placeholder="Edge Collections"></input>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="modalTooltips" title="A list of edge collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
||||||
<span class="arangoicon icon_arangodb_info"></span>
|
<span class="arangoicon icon_arangodb_info"></span>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
@ -2265,14 +2281,19 @@ if (list.length > 0) {
|
||||||
<% } %>
|
<% } %>
|
||||||
</div></script><script id="navigationView.ejs" type="text/template"><ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
</div></script><script id="navigationView.ejs" type="text/template"><ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
||||||
<% if (isCluster) { %>
|
<% if (isCluster) { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
||||||
<li class="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
<li class="nodes-menu"><a id="nodes" class="tab" href="#cNodes"><i class="fa fa-server"></i>Nodes</a></li>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li id="dbSelect" class="dropdown databases-menu"></li>
|
<!-- <li id="dbSelect" class="dropdown databases-menu disabled"></li> -->
|
||||||
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
||||||
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
|
<li class="databases-menu"><a id="databases" class="tab" href="#databases"><i class="fa fa-database"></i>Databases</a></li>
|
||||||
|
<% } %>
|
||||||
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
||||||
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
||||||
<li class="services-menu">
|
<li class="services-menu">
|
||||||
|
@ -2280,10 +2301,15 @@ if (list.length > 0) {
|
||||||
</li>
|
</li>
|
||||||
<li class="users-menu"><a id="users" class="tab" href="#manage"><i class="fa fa-users"></i>Users</a></li>
|
<li class="users-menu"><a id="users" class="tab" href="#manage"><i class="fa fa-users"></i>Users</a></li>
|
||||||
<% if (!isCluster) { %>
|
<% if (!isCluster) { %>
|
||||||
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-list"></i>Logs</a></li>
|
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-file-text"></i>Logs</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="navbar-spacer big"></li>
|
<!--
|
||||||
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
|
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
||||||
|
<% } %>
|
||||||
|
-->
|
||||||
|
<li class="helpus-menu" style="position: absolute; bottom: 0;"><a id="helpus" class="tab" href="#helpus"><i class="fa fa-heart"></i>Help Us</a></li>
|
||||||
<!--
|
<!--
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="dropdown tools-menu" id="toolsDropdown">
|
<li class="dropdown tools-menu" id="toolsDropdown">
|
||||||
|
@ -2337,14 +2363,28 @@ if (list.length > 0) {
|
||||||
|
|
||||||
</div></script><script id="nodesView.ejs" type="text/template"><div id="nodesContent" class="innerContent">
|
</div></script><script id="nodesView.ejs" type="text/template"><div id="nodesContent" class="innerContent">
|
||||||
|
|
||||||
<% if(coords.length > 0) { %>
|
<% if (coords.length > 0) { %>
|
||||||
|
<% var disabled = ''; %>
|
||||||
|
<% var genClass = "pure-u-1-" + Object.keys(coords[0]).length; %>
|
||||||
|
|
||||||
|
<% if (type !== 'coordinator') { %>
|
||||||
|
<% disabled = " disabled"; %>
|
||||||
|
<% } else { %>
|
||||||
|
<% disabled = " "; %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
||||||
<div class="pure-table-row">
|
<div class="pure-table-row">
|
||||||
<div class="pure-u-1-4 mid">Name</div>
|
<div class="<%= genClass %> mid">Name</div>
|
||||||
<div class="pure-u-1-4 mid">Address</div>
|
<div class="<%= genClass %> mid">Address</div>
|
||||||
<div class="pure-u-1-4 mid">Protocol</div>
|
<div class="<%= genClass %> mid">Protocol</div>
|
||||||
<div class="pure-u-1-4 mid">Status</div>
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid">Role</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
<div class="<%=genClass%> mid">Status</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2352,16 +2392,20 @@ if (list.length > 0) {
|
||||||
|
|
||||||
<% _.each(coords, function(node) { %>
|
<% _.each(coords, function(node) { %>
|
||||||
|
|
||||||
<div class="pure-table-row" node="<%=node.name%>">
|
<div class="pure-table-row <%= disabled %>" node="<%=node.name%>">
|
||||||
|
|
||||||
<div class="pure-u-1-4 mid"><%= node.name %></div>
|
<div class="<%= genClass %> mid"><%= node.name %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.address %></div>
|
<div class="<%= genClass %> mid"><%= node.address %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.protocol %></div>
|
<div class="<%= genClass %> mid"><%= node.protocol %></div>
|
||||||
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid"><%= node.role %></div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<% if(node.status === 'ok') { %>
|
<% if(node.status === 'ok') { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-check-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-check-circle"></i></div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-exclamation-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-exclamation-circle"></i></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -2662,13 +2706,16 @@ if (list.length > 0) {
|
||||||
<li class="subMenuEntry pull-left">
|
<li class="subMenuEntry pull-left">
|
||||||
<div class="breadcrumb"></div>
|
<div class="breadcrumb"></div>
|
||||||
</li>
|
</li>
|
||||||
<li id="healthStatus" class="subMenuEntry pull-right">
|
<li id="healthStatus" class="infoEntry subMenuEntry pull-right">
|
||||||
<a class="health-info">HEALTH: </a>
|
<a class="info health-info">HEALTH: </a>
|
||||||
<a class="health-state">GOOD</a>
|
<a class="state health-state">GOOD</a>
|
||||||
<a class="health-icon">
|
<a class="icon health-icon">
|
||||||
<i class="fa fa-check-circle"></i>
|
<i class="fa fa-check-circle"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="dbStatus" class="infoEntry subMenuEntry pull-right">
|
||||||
|
<a class="info">Database: <%= currentDB.name %> </a>
|
||||||
|
</li>
|
||||||
<li class="subMenuEntry pull-right" style="margin-right: 10px;">
|
<li class="subMenuEntry pull-right" style="margin-right: 10px;">
|
||||||
<div class="usermenu" id="userBar"></div>
|
<div class="usermenu" id="userBar"></div>
|
||||||
<div class="notificationmenu" id="notificationBar"></div>
|
<div class="notificationmenu" id="notificationBar"></div>
|
||||||
|
@ -2884,4 +2931,4 @@ var cutByResolution = function (str) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="workMonitorContent" class="innerContent">
|
<div id="workMonitorContent" class="innerContent">
|
||||||
</div></script></head><body><nav class="navbar"><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></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="bodyWrapper"><div class="centralRow"><div id="navbar2" class="secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper" style="clear:both"><div id="content" class="centralContent"></div></div><div class="resizecontainer footerWrapper" style="clear:both"><footer class="footer"><div class="" id="footerBar"></div></footer></div></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js?version=1460720592272"></script><script src="libs.js?version=1460720592272"></script><script src="app.js?version=1460720592272"></script></body></html>
|
</div></script></head><body><nav class="navbar"><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></div><div class="statmenu" id="statisticBar"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="bodyWrapper"><div class="centralRow"><div id="navbar2" class="navbarWrapper secondary"><div class="subnavmenu" id="subNavigationBar"></div></div><div class="resizecontainer contentWrapper"><div id="content" class="centralContent"></div><footer class="footer"><div id="footerBar"></div></footer></div></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><div id="spotlightPlaceholder" style="display:none"></div><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js?version=1461089875197"></script><script src="libs.js?version=1461089875197"></script><script src="app.js?version=1461089875197"></script></body></html>
|
Binary file not shown.
|
@ -10,7 +10,7 @@
|
||||||
<link href="css/style.css" rel="stylesheet">
|
<link href="css/style.css" rel="stylesheet">
|
||||||
<link href="css/sass.css" rel="stylesheet">
|
<link href="css/sass.css" rel="stylesheet">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,300,700' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,700' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
<script id="applicationDetailView.ejs" type="text/template">
|
<script id="applicationDetailView.ejs" type="text/template">
|
||||||
<div class="application-detail-view">
|
<div class="application-detail-view">
|
||||||
|
@ -742,9 +742,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-left">
|
|
||||||
<a class="arangoHeader">Databases</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -800,9 +797,13 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="dbSelectionView.ejs" type="text/template">
|
<script id="dbSelectionView.ejs" type="text/template">
|
||||||
<a href="#" class="tab" id="dbselection"><div class="dbselection"><i class="fa fa-database"></i><span class="db-name">DB: </span> <%=current%><i class="fa fa-caret-square-o-down"></i></div>
|
<a href="#" class="tab disabled" id="dbselection"><div class="dbselection"><i class="fa fa-database"></i><span class="db-name">DB: </span> <%=current%>
|
||||||
|
<!-- <i class="fa fa-caret-square-o-down"></i> -->
|
||||||
|
</div>
|
||||||
<!-- <b class="caret"></b> -->
|
<!-- <b class="caret"></b> -->
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<!--
|
||||||
<ul class="link-dropdown-menu" id="dbs_dropdown">
|
<ul class="link-dropdown-menu" id="dbs_dropdown">
|
||||||
<%
|
<%
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
|
@ -830,6 +831,7 @@ if (list.length > 0) {
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
</ul>
|
</ul>
|
||||||
|
-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script id="documentView.ejs" type="text/template">
|
<script id="documentView.ejs" type="text/template">
|
||||||
|
@ -1312,6 +1314,14 @@ if (list.length > 0) {
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script id="helpUsView.ejs" type="text/template">
|
||||||
|
|
||||||
|
<div class="helpUs">
|
||||||
|
<div class="_form_87"></div><script src="https://arangodb.activehosted.com/f/embed.php?id=87" type="text/javascript" charset="utf-8"></script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
<script id="indicesView.ejs" type="text/template">
|
<script id="indicesView.ejs" type="text/template">
|
||||||
<div class="contentIn" id="indexHeaderContent">
|
<div class="contentIn" id="indexHeaderContent">
|
||||||
<div id="indexEditView">
|
<div id="indexEditView">
|
||||||
|
@ -1691,13 +1701,26 @@ if (list.length > 0) {
|
||||||
-->
|
-->
|
||||||
<tr class="tableRow">
|
<tr class="tableRow">
|
||||||
<th class="collectionInfoTh">
|
<th class="collectionInfoTh">
|
||||||
Collections:
|
Document Collections:
|
||||||
</th>
|
</th>
|
||||||
<th class="collectionInfoTh">
|
<th class="collectionInfoTh">
|
||||||
<input type="hidden" id="new-app-collections" value="" placeholder="Collections"></input>
|
<input type="hidden" id="new-app-document-collections" value="" placeholder="Document Collections"></input>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<a class="modalTooltips" title="A list of collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
<a class="modalTooltips" title="A list of document collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
||||||
|
<span class="arangoicon icon_arangodb_info"></span>
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="tableRow">
|
||||||
|
<th class="collectionInfoTh">
|
||||||
|
Edge Collections:
|
||||||
|
</th>
|
||||||
|
<th class="collectionInfoTh">
|
||||||
|
<input type="hidden" id="new-app-edge-collections" value="" placeholder="Edge Collections"></input>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a class="modalTooltips" title="A list of edge collections that will be created specifically for this Service. A CRUD API for these will be generated.">
|
||||||
<span class="arangoicon icon_arangodb_info"></span>
|
<span class="arangoicon icon_arangodb_info"></span>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
|
@ -2432,14 +2455,19 @@ if (list.length > 0) {
|
||||||
<script id="navigationView.ejs" type="text/template">
|
<script id="navigationView.ejs" type="text/template">
|
||||||
<ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
<ul class="navlist arango-collection-ul" id="arangoCollectionUl">
|
||||||
<% if (isCluster) { %>
|
<% if (isCluster) { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
||||||
<li class="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
<li class="nodes-menu"><a id="nodes" class="tab" href="#cNodes"><i class="fa fa-server"></i>Nodes</a></li>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li id="dbSelect" class="dropdown databases-menu"></li>
|
<!-- <li id="dbSelect" class="dropdown databases-menu disabled"></li> -->
|
||||||
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
||||||
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
|
<li class="databases-menu"><a id="databases" class="tab" href="#databases"><i class="fa fa-database"></i>Databases</a></li>
|
||||||
|
<% } %>
|
||||||
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
||||||
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
||||||
<li class="services-menu">
|
<li class="services-menu">
|
||||||
|
@ -2447,10 +2475,15 @@ if (list.length > 0) {
|
||||||
</li>
|
</li>
|
||||||
<li class="users-menu"><a id="users" class="tab" href="#manage"><i class="fa fa-users"></i>Users</a></li>
|
<li class="users-menu"><a id="users" class="tab" href="#manage"><i class="fa fa-users"></i>Users</a></li>
|
||||||
<% if (!isCluster) { %>
|
<% if (!isCluster) { %>
|
||||||
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-list"></i>Logs</a></li>
|
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-file-text"></i>Logs</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="navbar-spacer big"></li>
|
<!--
|
||||||
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
|
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
||||||
|
<% } %>
|
||||||
|
-->
|
||||||
|
<li class="helpus-menu" style="position: absolute; bottom: 0;"><a id="helpus" class="tab" href="#helpus"><i class="fa fa-heart"></i>Help Us</a></li>
|
||||||
<!--
|
<!--
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="dropdown tools-menu" id="toolsDropdown">
|
<li class="dropdown tools-menu" id="toolsDropdown">
|
||||||
|
@ -2516,14 +2549,28 @@ if (list.length > 0) {
|
||||||
|
|
||||||
<div id="nodesContent" class="innerContent">
|
<div id="nodesContent" class="innerContent">
|
||||||
|
|
||||||
<% if(coords.length > 0) { %>
|
<% if (coords.length > 0) { %>
|
||||||
|
<% var disabled = ''; %>
|
||||||
|
<% var genClass = "pure-u-1-" + Object.keys(coords[0]).length; %>
|
||||||
|
|
||||||
|
<% if (type !== 'coordinator') { %>
|
||||||
|
<% disabled = " disabled"; %>
|
||||||
|
<% } else { %>
|
||||||
|
<% disabled = " "; %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
||||||
<div class="pure-table-row">
|
<div class="pure-table-row">
|
||||||
<div class="pure-u-1-4 mid">Name</div>
|
<div class="<%= genClass %> mid">Name</div>
|
||||||
<div class="pure-u-1-4 mid">Address</div>
|
<div class="<%= genClass %> mid">Address</div>
|
||||||
<div class="pure-u-1-4 mid">Protocol</div>
|
<div class="<%= genClass %> mid">Protocol</div>
|
||||||
<div class="pure-u-1-4 mid">Status</div>
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid">Role</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
<div class="<%=genClass%> mid">Status</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2531,16 +2578,20 @@ if (list.length > 0) {
|
||||||
|
|
||||||
<% _.each(coords, function(node) { %>
|
<% _.each(coords, function(node) { %>
|
||||||
|
|
||||||
<div class="pure-table-row" node="<%=node.name%>">
|
<div class="pure-table-row <%= disabled %>" node="<%=node.name%>">
|
||||||
|
|
||||||
<div class="pure-u-1-4 mid"><%= node.name %></div>
|
<div class="<%= genClass %> mid"><%= node.name %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.address %></div>
|
<div class="<%= genClass %> mid"><%= node.address %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.protocol %></div>
|
<div class="<%= genClass %> mid"><%= node.protocol %></div>
|
||||||
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid"><%= node.role %></div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<% if(node.status === 'ok') { %>
|
<% if(node.status === 'ok') { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-check-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-check-circle"></i></div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-exclamation-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-exclamation-circle"></i></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -2897,13 +2948,16 @@ if (list.length > 0) {
|
||||||
<li class="subMenuEntry pull-left">
|
<li class="subMenuEntry pull-left">
|
||||||
<div class="breadcrumb"></div>
|
<div class="breadcrumb"></div>
|
||||||
</li>
|
</li>
|
||||||
<li id="healthStatus" class="subMenuEntry pull-right">
|
<li id="healthStatus" class="infoEntry subMenuEntry pull-right">
|
||||||
<a class="health-info">HEALTH: </a>
|
<a class="info health-info">HEALTH: </a>
|
||||||
<a class="health-state">GOOD</a>
|
<a class="state health-state">GOOD</a>
|
||||||
<a class="health-icon">
|
<a class="icon health-icon">
|
||||||
<i class="fa fa-check-circle"></i>
|
<i class="fa fa-check-circle"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="dbStatus" class="infoEntry subMenuEntry pull-right">
|
||||||
|
<a class="info">Database: <%= currentDB.name %> </a>
|
||||||
|
</li>
|
||||||
<li class="subMenuEntry pull-right" style="margin-right: 10px;">
|
<li class="subMenuEntry pull-right" style="margin-right: 10px;">
|
||||||
<div class="usermenu" id="userBar"></div>
|
<div class="usermenu" id="userBar"></div>
|
||||||
<div class="notificationmenu" id="notificationBar"></div>
|
<div class="notificationmenu" id="notificationBar"></div>
|
||||||
|
@ -3167,18 +3221,19 @@ var cutByResolution = function (str) {
|
||||||
<div class="bodyWrapper">
|
<div class="bodyWrapper">
|
||||||
|
|
||||||
<div class="centralRow">
|
<div class="centralRow">
|
||||||
<div id='navbar2' class="secondary">
|
|
||||||
|
<div id='navbar2' class="navbarWrapper secondary">
|
||||||
<div class="subnavmenu" id="subNavigationBar"></div>
|
<div class="subnavmenu" id="subNavigationBar"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="resizecontainer contentWrapper" style="clear:both;">
|
|
||||||
|
<div class="resizecontainer contentWrapper">
|
||||||
<div id="content" class="centralContent"></div>
|
<div id="content" class="centralContent"></div>
|
||||||
</div>
|
|
||||||
<div class="resizecontainer footerWrapper" style="clear:both;">
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="" id="footerBar">
|
<div id="footerBar"></div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3202,9 +3257,9 @@ var cutByResolution = function (str) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="sharedLibs.js?version=1460720592272"></script>
|
<script src="sharedLibs.js?version=1461089875197"></script>
|
||||||
<script src="libs.js?version=1460720592272"></script>
|
<script src="libs.js?version=1461089875197"></script>
|
||||||
<script src="app.js?version=1460720592272"></script>
|
<script src="app.js?version=1461089875197"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -6,7 +6,7 @@ body {
|
||||||
background: rgba(64, 74, 83, 0.04);
|
background: rgba(64, 74, 83, 0.04);
|
||||||
color: #333;
|
color: #333;
|
||||||
display: block;
|
display: block;
|
||||||
font-family: 'Lato', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -15,15 +15,19 @@ body {
|
||||||
overflow: hidden; }
|
overflow: hidden; }
|
||||||
body .bodyWrapper {
|
body .bodyWrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 auto -42px;
|
left: 150px;
|
||||||
min-height: 100%; }
|
min-height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
right: 0; }
|
||||||
|
body .centralRow {
|
||||||
|
position: relative; }
|
||||||
|
|
||||||
body,
|
body,
|
||||||
input,
|
input,
|
||||||
textarea,
|
textarea,
|
||||||
.page-title span,
|
.page-title span,
|
||||||
.pingback a.url {
|
.pingback a.url {
|
||||||
font-family: 'Lato', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-weight: 400; }
|
font-weight: 400; }
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -2085,7 +2089,7 @@ textarea,
|
||||||
.user-dropdown-menu, .script-dropdown-menu, .gv-dropdown-menu, .navlogo, .navlist li, div.footer-left, div.footer-left p, div.footer-center, a.headerButton, a.button-gui, div .tile, div .bigtile, div .tile a span.add-Icon, div .bigtile a span.add-Icon, div.centralContent, .contentDiv li, div.dropdownInner ul, .fixedDropdown .notificationItemContent, .innerDropdownInnerUL, .dashboard-full-width-chart .dashboard-full-width-chart-inner, .dashboard-large-chart .dashboard-large-chart-inner, .dashboard-small-chart .dashboard-small-chart-inner, .dashboard-medium-chart, .dashboard-tendency-container, .dashboard-bar-chart-container, .dashboard-full-width-chart, .dashboard-large-chart, .dashboard-small-chart, .dashboard-sub-bar, .dashboard-sub-bar .dashboard-sub-bar-title, .dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart, .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart, .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart, .dashboard-medium-chart .dashboard-interior-chart, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart, .modal-chart-detail, .modal-chart-detail .modal-body, .modal-chart-detail .modal-dashboard-legend, .modal-chart-detail .modal-inner-detail, .dashboard-half-height-legend, .dashboard-title-bar .dashboard-half-title-bar, .dashboardModal, .pagination-line li a {
|
.user-dropdown-menu, .script-dropdown-menu, .gv-dropdown-menu, .navlogo, .navlist li, div.footer-left, div.footer-left p, div.footer-center, a.headerButton, a.button-gui, div .tile, div .bigtile, div .tile a span.add-Icon, div .bigtile a span.add-Icon, div.centralContent, .contentDiv li, div.dropdownInner ul, .fixedDropdown .notificationItemContent, .innerDropdownInnerUL, .dashboard-full-width-chart .dashboard-full-width-chart-inner, .dashboard-large-chart .dashboard-large-chart-inner, .dashboard-small-chart .dashboard-small-chart-inner, .dashboard-medium-chart, .dashboard-tendency-container, .dashboard-bar-chart-container, .dashboard-full-width-chart, .dashboard-large-chart, .dashboard-small-chart, .dashboard-sub-bar, .dashboard-sub-bar .dashboard-sub-bar-title, .dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart, .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart, .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart, .dashboard-medium-chart .dashboard-interior-chart, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar, .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut, .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart, .modal-chart-detail, .modal-chart-detail .modal-body, .modal-chart-detail .modal-dashboard-legend, .modal-chart-detail .modal-inner-detail, .dashboard-half-height-legend, .dashboard-title-bar .dashboard-half-title-bar, .dashboardModal, .pagination-line li a {
|
||||||
float: left; }
|
float: left; }
|
||||||
|
|
||||||
div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet span, div .bigtile .iconSet span, .search-field, .headerBar > div.headerButtonBar, .fixedDropdown button, .fixedDropdown .notificationItem i, .dashboard-sub-bar-menu, .dashboard-legend, .dashboard-legend .dashboard-legend-inner span, .query-button, .arango-tab li, div.gv_colour_list, .docsThirdCol {
|
div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet span, div .bigtile .iconSet span, .search-field, .headerBar > div.headerButtonBar, .fixedDropdown button, .fixedDropdown .notificationItem i, .dashboard-sub-bar-menu, .dashboard-legend, .query-button, .arango-tab li, div.gv_colour_list, .docsThirdCol {
|
||||||
float: right; }
|
float: right; }
|
||||||
|
|
||||||
.tileList:after, .resizecontainer:after, .headerBar > div.headerButtonBar:after, .detail-chart:after, .dashboard-sub-bar:after, .dashboard-medium-chart .dashboard-medium-chart-menu:after, .dashboard-medium-chart .dashboard-medium-chart-inner:after, .dashboard-tendency-container .dashboard-tendency-chart:after, .dashboard-bar-chart-container .dashboard-bar-chart:after, .dashboard-row:after, #distributionChartDiv:after, .lineChartDiv:after, .arango-tab:after, .pagination-line li:after, .document-info .document-info-container .document-inner-info-container .document-attribute:after {
|
.tileList:after, .resizecontainer:after, .headerBar > div.headerButtonBar:after, .detail-chart:after, .dashboard-sub-bar:after, .dashboard-medium-chart .dashboard-medium-chart-menu:after, .dashboard-medium-chart .dashboard-medium-chart-inner:after, .dashboard-tendency-container .dashboard-tendency-chart:after, .dashboard-bar-chart-container .dashboard-bar-chart:after, .dashboard-row:after, #distributionChartDiv:after, .lineChartDiv:after, .arango-tab:after, .pagination-line li:after, .document-info .document-info-container .document-inner-info-container .document-attribute:after {
|
||||||
|
@ -2096,10 +2100,11 @@ div.footer-right, div.footer-right p, ul.headerButtonList li, div .tile .iconSet
|
||||||
height: 0;
|
height: 0;
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
|
||||||
.script-dropdown-menu .dropdown-item, .addButton, .deleteButton i, a.headerButton, a.button-gui, div.toolbox div.gv_action_button, .clusterDownBtn button, div .tile a span.icon, div .bigtile a span.icon, div .tile a svg, div .bigtile a svg, div .tile .iconSet span, div .bigtile .iconSet span, div .bigtile, .contentDiv .icon, .icon-info-sign, .arangoicon, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label, .search-submit-icon, .gv-search-submit-icon, .fixedDropdown .notificationItem i, .fullNotification:hover, .contentTables tr.contentRowInactive a, .arango-tab a, .arango-tab li, .pagination-line li a, .link > line, .node, .edit-index-table .icon_arangodb_roundminus {
|
.script-dropdown-menu .dropdown-item, .addButton, .deleteButton i, a.headerButton, a.button-gui, div.toolbox div.gv_action_button, .clusterDownBtn button, div .tile a span.icon, div .bigtile a span.icon, div .tile a svg, div .bigtile a svg, div .tile .iconSet span, div .bigtile .iconSet span, div .bigtile, .contentDiv .icon, .icon-info-sign, .arangoicon, div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox label.css-label, .search-submit-icon, .gv-search-submit-icon, .fixedDropdown .notificationItem i, .fullNotification:hover, .contentTables tr.contentRowInactive a, .arango-tab a, .arango-tab li, .pagination-line li a, .link > line, .node, .edit-index-table .icon_arangodb_roundminus {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
.navbar, footer.footer {
|
.navbar {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -2334,6 +2339,14 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 10px; }
|
width: 10px; }
|
||||||
|
.navlist li .fa.fa-heart {
|
||||||
|
color: #ff7a7a;
|
||||||
|
opacity: 1; }
|
||||||
|
.navlist li.disabled:hover {
|
||||||
|
cursor: default; }
|
||||||
|
.navlist li.disabled:hover a:hover {
|
||||||
|
cursor: default;
|
||||||
|
opacity: .8; }
|
||||||
.navlist li.dropdown:hover {
|
.navlist li.dropdown:hover {
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0; }
|
border-bottom-right-radius: 0; }
|
||||||
|
@ -2344,8 +2357,8 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
.navlist li.navbar-spacer {
|
.navlist li.navbar-spacer {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 0;
|
||||||
margin-top: 5px;
|
margin-top: 0;
|
||||||
opacity: .2; }
|
opacity: .2; }
|
||||||
.navlist .active {
|
.navlist .active {
|
||||||
border-left: 2px solid #77cb99; }
|
border-left: 2px solid #77cb99; }
|
||||||
|
@ -2471,21 +2484,18 @@ div.queryline input, input.search-input, .modal-body .select2-choices input, .mo
|
||||||
.arango-logo img {
|
.arango-logo img {
|
||||||
margin-left: 22px; }
|
margin-left: 22px; }
|
||||||
|
|
||||||
.footerWrapper {
|
|
||||||
bottom: 0;
|
|
||||||
height: 42px;
|
|
||||||
position: absolute; }
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
background-color: rgba(239, 240, 241, 0.8);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
left: 0;
|
left: 160px;
|
||||||
right: 0;
|
right: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 1000; }
|
z-index: 1000; }
|
||||||
|
|
||||||
footer.footer {
|
footer.footer {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 40px; }
|
height: 43px;
|
||||||
|
position: fixed; }
|
||||||
footer.footer p {
|
footer.footer p {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
|
@ -2611,7 +2621,7 @@ button.disabled,
|
||||||
margin-left: 0 !important; }
|
margin-left: 0 !important; }
|
||||||
|
|
||||||
button {
|
button {
|
||||||
font-family: 'Lato', sans-serif !important; }
|
font-family: 'Roboto', sans-serif !important; }
|
||||||
button.btn-server {
|
button.btn-server {
|
||||||
width: 120px; }
|
width: 120px; }
|
||||||
button.gv-zoom-btn {
|
button.gv-zoom-btn {
|
||||||
|
@ -5201,25 +5211,32 @@ div .bigtile {
|
||||||
.application-detail-view section.info {
|
.application-detail-view section.info {
|
||||||
width: 2290px; } }
|
width: 2290px; } }
|
||||||
|
|
||||||
div.contentWrapper {
|
div.headerBar {
|
||||||
padding-bottom: 42px; }
|
background-color: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
float: right;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 36px;
|
||||||
|
margin-top: -55px;
|
||||||
|
position: absolute;
|
||||||
|
right: 150px; }
|
||||||
|
|
||||||
div.centralRow {
|
div.centralRow {
|
||||||
background: rgba(64, 74, 83, 0.04);
|
background: rgba(64, 74, 83, 0.04);
|
||||||
float: left;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
left: 150px;
|
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
position: absolute;
|
position: relative;
|
||||||
right: 0; }
|
right: 0; }
|
||||||
|
|
||||||
div.centralContent {
|
div.centralContent {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
min-height: 80px;
|
padding-bottom: 43px;
|
||||||
padding: 5px;
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
padding-top: 5px;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
|
||||||
.contentDiv {
|
.contentDiv {
|
||||||
|
@ -5274,7 +5291,8 @@ li a [class*=" icon_arangodb"] {
|
||||||
.fa-minus-circle:hover {
|
.fa-minus-circle:hover {
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
div.headerDropdown {
|
div.headerDropdown,
|
||||||
|
.dropdownImport {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid rgba(140, 138, 137, 0.25);
|
border: 1px solid rgba(140, 138, 137, 0.25);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
@ -5283,11 +5301,14 @@ div.headerDropdown {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto; }
|
width: auto; }
|
||||||
div.headerDropdown.smallDropdown .dropdownInner {
|
div.headerDropdown.smallDropdown .dropdownInner,
|
||||||
|
.dropdownImport.smallDropdown .dropdownInner {
|
||||||
min-height: 20px; }
|
min-height: 20px; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox {
|
||||||
display: none; }
|
display: none; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox label.css-label {
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -5296,7 +5317,8 @@ div.headerDropdown {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
vertical-align: middle; }
|
vertical-align: middle; }
|
||||||
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label {
|
div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label,
|
||||||
|
.dropdownImport.headerDropdown input[type=checkbox].css-checkbox:checked + label.css-label {
|
||||||
background-position: 0 -15px; }
|
background-position: 0 -15px; }
|
||||||
|
|
||||||
div.dropdown-title {
|
div.dropdown-title {
|
||||||
|
@ -5476,7 +5498,8 @@ div.headerBar {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
margin-top: -55px;
|
margin-top: -55px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px; }
|
padding-right: 5px;
|
||||||
|
right: 0; }
|
||||||
div.headerBar select:focus {
|
div.headerBar select:focus {
|
||||||
outline: none; }
|
outline: none; }
|
||||||
div.headerBar .infoField {
|
div.headerBar .infoField {
|
||||||
|
@ -5552,7 +5575,8 @@ div.headerBar {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-top: 0; }
|
padding-top: 0;
|
||||||
|
text-transform: capitalize; }
|
||||||
.breadcrumb .fa {
|
.breadcrumb .fa {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 8px; }
|
margin-right: 8px; }
|
||||||
|
@ -5656,7 +5680,7 @@ div.headerBar {
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
color: #736b68;
|
color: #736b68;
|
||||||
font-family: 'Lato', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
max-height: 410px; }
|
max-height: 410px; }
|
||||||
|
@ -6115,7 +6139,7 @@ div.headerBar {
|
||||||
border-radius: 3px !important;
|
border-radius: 3px !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
font-family: 'Lato',sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-size: 10pt !important;
|
font-size: 10pt !important;
|
||||||
font-weight: 100 !important;
|
font-weight: 100 !important;
|
||||||
z-index: 99999999; }
|
z-index: 99999999; }
|
||||||
|
@ -6225,7 +6249,7 @@ div.headerBar {
|
||||||
|
|
||||||
.dataNotReadyYet {
|
.dataNotReadyYet {
|
||||||
color: #faa732;
|
color: #faa732;
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
@ -6236,7 +6260,7 @@ div.headerBar {
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: rgba(0, 0, 0, 0.5);
|
color: rgba(0, 0, 0, 0.5);
|
||||||
font-family: Lato,sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -6250,7 +6274,7 @@ div.headerBar {
|
||||||
text-transform: uppercase; }
|
text-transform: uppercase; }
|
||||||
.dashboard-sub-bar .dashboard-sub-bar-title {
|
.dashboard-sub-bar .dashboard-sub-bar-title {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: Lato,sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
|
@ -6426,7 +6450,8 @@ div.headerBar {
|
||||||
stroke-width: .5px; }
|
stroke-width: .5px; }
|
||||||
|
|
||||||
.dashboard-legend .dashboard-legend-inner {
|
.dashboard-legend .dashboard-legend-inner {
|
||||||
padding: 0 5px 5px 0; }
|
padding: 0 5px 5px 0;
|
||||||
|
text-align: right; }
|
||||||
.dashboard-legend .dashboard-legend-inner br {
|
.dashboard-legend .dashboard-legend-inner br {
|
||||||
display: none; }
|
display: none; }
|
||||||
.dashboard-legend .dashboard-legend-inner span {
|
.dashboard-legend .dashboard-legend-inner span {
|
||||||
|
@ -6523,7 +6548,7 @@ div.headerBar {
|
||||||
|
|
||||||
.dygraph-label.dygraph-title {
|
.dygraph-label.dygraph-title {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: left; }
|
text-align: left; }
|
||||||
|
@ -6949,7 +6974,7 @@ toolbar {
|
||||||
.inputEditorWrapper .bindParamEditorWrapper table,
|
.inputEditorWrapper .bindParamEditorWrapper table,
|
||||||
.inputEditorWrapper .aqlEditorWrapper table {
|
.inputEditorWrapper .aqlEditorWrapper table {
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
font-family: 'Lato', sans-serif; }
|
font-family: 'Roboto', sans-serif; }
|
||||||
.inputEditorWrapper .bindParamEditorWrapper table tbody,
|
.inputEditorWrapper .bindParamEditorWrapper table tbody,
|
||||||
.inputEditorWrapper .aqlEditorWrapper table tbody {
|
.inputEditorWrapper .aqlEditorWrapper table tbody {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -7043,7 +7068,7 @@ toolbar {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 13pt;
|
font-size: 13pt;
|
||||||
height: 23px;
|
height: 23px;
|
||||||
line-height: 22px;
|
line-height: 23px;
|
||||||
opacity: .8;
|
opacity: .8;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
@ -7275,8 +7300,8 @@ toolbar {
|
||||||
|
|
||||||
.pagination-line {
|
.pagination-line {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-bottom-left-radius: 3px;
|
border-bottom-left-radius: 2px;
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 2px;
|
||||||
border-top: 1px solid rgba(104, 103, 102, 0.1);
|
border-top: 1px solid rgba(104, 103, 102, 0.1);
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
@ -7285,7 +7310,7 @@ toolbar {
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
.pagination-line li a:hover, .pagination-line li.active a,
|
.pagination-line li a:hover, .pagination-line li.active a,
|
||||||
.pagination-line li.active span {
|
.pagination-line li.active span {
|
||||||
background-color: #8f8d8c;
|
background-color: #404a53;
|
||||||
color: #fff; }
|
color: #fff; }
|
||||||
.pagination-line li a {
|
.pagination-line li a {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
@ -7296,9 +7321,9 @@ toolbar {
|
||||||
padding: 2px 10px;
|
padding: 2px 10px;
|
||||||
text-decoration: none; }
|
text-decoration: none; }
|
||||||
.pagination-line ul {
|
.pagination-line ul {
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 2px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 2px;
|
||||||
border-radius: 3px;
|
border-radius: 2px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-left: 0; }
|
margin-left: 0; }
|
||||||
|
@ -7319,9 +7344,9 @@ toolbar {
|
||||||
-webkit-box-shadow: 0;
|
-webkit-box-shadow: 0;
|
||||||
-moz-box-shadow: 0;
|
-moz-box-shadow: 0;
|
||||||
box-shadow: 0;
|
box-shadow: 0;
|
||||||
background: #8f8d8c;
|
background: #404a53;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: #000;
|
color: #fff;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 14px; }
|
width: 14px; }
|
||||||
|
@ -7578,16 +7603,18 @@ textarea,
|
||||||
.dataTables_info {
|
.dataTables_info {
|
||||||
display: none; }
|
display: none; }
|
||||||
|
|
||||||
#arangoLogTable tbody td:nth-child(1) {
|
#arangoLogTable {
|
||||||
text-align: center;
|
min-height: 444px; }
|
||||||
width: 80px; }
|
#arangoLogTable tbody tr {
|
||||||
|
height: 40px; }
|
||||||
#arangoLogTable tbody td:nth-child(2) {
|
#arangoLogTable tbody td:nth-child(1) {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 80px; }
|
width: 70px; }
|
||||||
|
#arangoLogTable tbody td:nth-child(2) {
|
||||||
#arangoLogTable tbody td:nth-child(3) {
|
text-align: center;
|
||||||
width: auto; }
|
width: 150px; }
|
||||||
|
#arangoLogTable tbody td:nth-child(3) {
|
||||||
|
width: auto; }
|
||||||
|
|
||||||
div.gv_zoom_widget {
|
div.gv_zoom_widget {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
@ -7705,7 +7732,7 @@ input.gv-radio-button {
|
||||||
width: auto; }
|
width: auto; }
|
||||||
|
|
||||||
.collectionTh {
|
.collectionTh {
|
||||||
font-family: 'Lato Sans', sans-serif !important;
|
font-family: 'Roboto', sans-serif !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
@ -7901,7 +7928,8 @@ input.gv-radio-button {
|
||||||
padding-right: 20px; }
|
padding-right: 20px; }
|
||||||
.headerButtonBar {
|
.headerButtonBar {
|
||||||
display: none; }
|
display: none; }
|
||||||
div.centralRow {
|
div.bodyWrapper,
|
||||||
|
.footer {
|
||||||
left: 40px; } }
|
left: 40px; } }
|
||||||
|
|
||||||
@media (min-width: 569px) and (max-width: 738px) {
|
@media (min-width: 569px) and (max-width: 738px) {
|
||||||
|
@ -8120,7 +8148,12 @@ input.gv-radio-button {
|
||||||
background: #3d4246;
|
background: #3d4246;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
height: 300px;
|
||||||
|
overflow: auto;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
|
.spotlightWrapper .tt-menu .tt-suggestion:hover {
|
||||||
|
background-color: #404a53;
|
||||||
|
cursor: pointer; }
|
||||||
.spotlightWrapper .tt-menu .header-type {
|
.spotlightWrapper .tt-menu .header-type {
|
||||||
background: #32373b;
|
background: #32373b;
|
||||||
clear: both;
|
clear: both;
|
||||||
|
@ -8168,7 +8201,7 @@ input.gv-radio-button {
|
||||||
outline-style: none; }
|
outline-style: none; }
|
||||||
|
|
||||||
.graphLabel {
|
.graphLabel {
|
||||||
font-family: "Lato", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
font-size: 11pt;
|
font-size: 11pt;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-top: -25px;
|
margin-top: -25px;
|
||||||
|
@ -8180,9 +8213,15 @@ input.gv-radio-button {
|
||||||
.cluster-graphs > div .graphWrapper {
|
.cluster-graphs > div .graphWrapper {
|
||||||
border: 1px solid rgba(140, 138, 137, 0.25);
|
border: 1px solid rgba(140, 138, 137, 0.25);
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
margin-top: -1px; }
|
margin-top: -1px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
padding-top: 20px; }
|
||||||
.cluster-graphs > div .graphWrapper .nv-controlsWrap {
|
.cluster-graphs > div .graphWrapper .nv-controlsWrap {
|
||||||
display: none; }
|
display: none; }
|
||||||
|
.cluster-graphs > div .graphWrapper .nv-legendWrap {
|
||||||
|
margin-bottom: 10px; }
|
||||||
.cluster-graphs > div .graphWrapper svg {
|
.cluster-graphs > div .graphWrapper svg {
|
||||||
height: 250px;
|
height: 250px;
|
||||||
margin-left: -17px; }
|
margin-left: -17px; }
|
||||||
|
@ -8194,10 +8233,14 @@ input.gv-radio-button {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
margin-top: -1px; }
|
margin-top: -1px; }
|
||||||
.cluster-values > div .valueWrapper .value {
|
.cluster-values > div .valueWrapper .value {
|
||||||
color: #7dbc42;
|
color: #000;
|
||||||
font-size: 24pt;
|
font-size: 24pt;
|
||||||
line-height: 150px;
|
line-height: 150px;
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
.cluster-values > div .valueWrapper .value.positive {
|
||||||
|
color: #7dbc42; }
|
||||||
|
.cluster-values > div .valueWrapper .value.negative {
|
||||||
|
color: #da4f49; }
|
||||||
.cluster-values > div .valueWrapper div:first-child {
|
.cluster-values > div .valueWrapper div:first-child {
|
||||||
height: 150px; }
|
height: 150px; }
|
||||||
|
|
||||||
|
@ -8302,8 +8345,7 @@ input.gv-radio-button {
|
||||||
main {
|
main {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid rgba(140, 138, 137, 0.25);
|
border: 1px solid rgba(140, 138, 137, 0.25);
|
||||||
border-radius: 3px;
|
border-radius: 3px; }
|
||||||
margin-top: 220px; }
|
|
||||||
main .app-info {
|
main .app-info {
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
|
@ -8408,10 +8450,14 @@ main {
|
||||||
border-bottom: 1px solid rgba(140, 138, 137, 0.25);
|
border-bottom: 1px solid rgba(140, 138, 137, 0.25);
|
||||||
color: #8a969f;
|
color: #8a969f;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
line-height: 40px; }
|
line-height: 40px;
|
||||||
|
width: 100%; }
|
||||||
.pure-table .pure-table-row:hover {
|
.pure-table .pure-table-row:hover {
|
||||||
background-color: #eff0eb;
|
background-color: #eff0eb;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
.pure-table .pure-table-row.disabled:hover {
|
||||||
|
background-color: #fff;
|
||||||
|
cursor: not-allowed; }
|
||||||
.pure-table .pure-table-row .left {
|
.pure-table .pure-table-row .left {
|
||||||
text-align: left; }
|
text-align: left; }
|
||||||
.pure-table .pure-table-row .right {
|
.pure-table .pure-table-row .right {
|
||||||
|
@ -8474,10 +8520,10 @@ main {
|
||||||
height: 27px;
|
height: 27px;
|
||||||
width: 100%; }
|
width: 100%; }
|
||||||
.arango-tabbar button {
|
.arango-tabbar button {
|
||||||
background-color: #8c8a89;
|
background-color: #404a53;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top-left-radius: 3px;
|
border-top-left-radius: 2px;
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 2px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
float: right;
|
float: right;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
|
@ -8540,21 +8586,26 @@ main {
|
||||||
-o-transition: all .2s ease-in;
|
-o-transition: all .2s ease-in;
|
||||||
-webkit-transition: all .2s ease-in;
|
-webkit-transition: all .2s ease-in;
|
||||||
transition: all .2s ease-in; }
|
transition: all .2s ease-in; }
|
||||||
.subnavmenu #healthStatus.positive .health-state,
|
.subnavmenu .infoEntry {
|
||||||
.subnavmenu #healthStatus.positive .health-icon {
|
line-height: 45px; }
|
||||||
color: #7dbc42; }
|
.subnavmenu .infoEntry:hover {
|
||||||
.subnavmenu #healthStatus.negative .health-state,
|
cursor: default; }
|
||||||
.subnavmenu #healthStatus.negative .health-icon {
|
.subnavmenu .infoEntry:hover .info {
|
||||||
color: #da4f49; }
|
color: #fff; }
|
||||||
.subnavmenu .health-info,
|
.subnavmenu .infoEntry.positive .health-state,
|
||||||
.subnavmenu .db-info,
|
.subnavmenu .infoEntry.positive .health-icon {
|
||||||
.subnavmenu .db-state,
|
color: #7dbc42; }
|
||||||
.subnavmenu .health-state {
|
.subnavmenu .infoEntry.negative .health-state,
|
||||||
font-weight: 300; }
|
.subnavmenu .infoEntry.negative .health-icon {
|
||||||
.subnavmenu .health-info,
|
color: #da4f49; }
|
||||||
.subnavmenu .db-info,
|
.subnavmenu .info,
|
||||||
.subnavmenu .db-icon {
|
.subnavmenu .icon,
|
||||||
color: rgba(255, 255, 255, 0.95); }
|
.subnavmenu .state {
|
||||||
|
color: rgba(255, 255, 255, 0.95);
|
||||||
|
font-weight: 300;
|
||||||
|
text-transform: uppercase; }
|
||||||
|
.subnavmenu #dbStatus {
|
||||||
|
padding-right: 20px; }
|
||||||
|
|
||||||
.arangoDataTable {
|
.arangoDataTable {
|
||||||
border-spacing: 0 0;
|
border-spacing: 0 0;
|
||||||
|
@ -8743,7 +8794,7 @@ table .sorting {
|
||||||
.documentsDropdown .dropdownImport,
|
.documentsDropdown .dropdownImport,
|
||||||
.documentsDropdown .headerDropdown {
|
.documentsDropdown .headerDropdown {
|
||||||
clear: both;
|
clear: both;
|
||||||
margin-bottom: 5px; }
|
margin-bottom: 10px; }
|
||||||
|
|
||||||
.documents-size {
|
.documents-size {
|
||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
|
|
Binary file not shown.
|
@ -228,21 +228,64 @@
|
||||||
var cssClass;
|
var cssClass;
|
||||||
|
|
||||||
_.each(menuItems, function(menu, name) {
|
_.each(menuItems, function(menu, name) {
|
||||||
|
cssClass = '';
|
||||||
|
|
||||||
if (menu.active) {
|
if (menu.active) {
|
||||||
cssClass += ' active';
|
cssClass += ' active';
|
||||||
}
|
}
|
||||||
else {
|
if (menu.disabled) {
|
||||||
cssClass = '';
|
cssClass += ' disabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#subNavigationBar .bottom').append(
|
$('#subNavigationBar .bottom').append(
|
||||||
'<li class="subMenuEntry ' + cssClass + '"><a>' + name + '</a></li>'
|
'<li class="subMenuEntry ' + cssClass + '"><a>' + name + '</a></li>'
|
||||||
);
|
);
|
||||||
$('#subNavigationBar .bottom').children().last().bind('click', function() {
|
if (!menu.disabled) {
|
||||||
window.App.navigate(menu.route, {trigger: true});
|
$('#subNavigationBar .bottom').children().last().bind('click', function() {
|
||||||
});
|
window.App.navigate(menu.route, {trigger: true});
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buildNodeSubNav: function(node, activeKey, disabled) {
|
||||||
|
var menus = {
|
||||||
|
Dashboard: {
|
||||||
|
route: '#node/' + encodeURIComponent(node)
|
||||||
|
},
|
||||||
|
Logs: {
|
||||||
|
route: '#nLogs/' + encodeURIComponent(node),
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
menus[activeKey].active = true;
|
||||||
|
menus[disabled].disabled = true;
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
|
//nav for collection view
|
||||||
|
buildNodesSubNav: function(type) {
|
||||||
|
|
||||||
|
var menus = {
|
||||||
|
Coordinators: {
|
||||||
|
route: '#cNodes'
|
||||||
|
},
|
||||||
|
DBServers: {
|
||||||
|
route: '#dNodes'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (type === 'coordinator') {
|
||||||
|
menus.Coordinators.active = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
menus.DBServers.active = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.buildSubNavBar(menus);
|
||||||
|
},
|
||||||
|
|
||||||
//nav for collection view
|
//nav for collection view
|
||||||
buildCollectionSubNav: function(collectionName, activeKey) {
|
buildCollectionSubNav: function(collectionName, activeKey) {
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,11 @@
|
||||||
"users": "userManagement",
|
"users": "userManagement",
|
||||||
"userProfile": "userProfile",
|
"userProfile": "userProfile",
|
||||||
"cluster": "cluster",
|
"cluster": "cluster",
|
||||||
"nodes": "nodes",
|
"nodes": "cNodes",
|
||||||
|
"cNodes": "cNodes",
|
||||||
|
"dNodes": "dNodes",
|
||||||
"node/:name": "node",
|
"node/:name": "node",
|
||||||
|
//"nLogs/:name": "nLogs",
|
||||||
"logs": "logs",
|
"logs": "logs",
|
||||||
"helpus": "helpUs"
|
"helpus": "helpUs"
|
||||||
},
|
},
|
||||||
|
@ -230,19 +233,16 @@
|
||||||
this.nodeView = new window.NodeView({
|
this.nodeView = new window.NodeView({
|
||||||
coordname: name,
|
coordname: name,
|
||||||
coordinators: this.coordinatorCollection,
|
coordinators: this.coordinatorCollection,
|
||||||
|
dbServers: this.dbServers
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.nodeView.render();
|
this.nodeView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
nodeLogs: function (initialized) {
|
cNodes: function (initialized) {
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
nodes: function (initialized) {
|
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
if (!initialized || this.isCluster === undefined) {
|
if (!initialized || this.isCluster === undefined) {
|
||||||
this.waitForInit(this.nodes.bind(this));
|
this.waitForInit(this.cNodes.bind(this));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.isCluster === false) {
|
if (this.isCluster === false) {
|
||||||
|
@ -251,12 +251,31 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.nodesView) {
|
this.nodesView = new window.NodesView({
|
||||||
this.nodesView = new window.NodesView({
|
coordinators: this.coordinatorCollection,
|
||||||
coordinators: this.coordinatorCollection,
|
dbServers: this.dbServers[0],
|
||||||
dbServers: this.dbServers
|
toRender: 'coordinator'
|
||||||
});
|
});
|
||||||
|
this.nodesView.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
dNodes: function (initialized) {
|
||||||
|
this.checkUser();
|
||||||
|
if (!initialized || this.isCluster === undefined) {
|
||||||
|
this.waitForInit(this.dNodes.bind(this));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.isCluster === false) {
|
||||||
|
this.routes[""] = 'dashboard';
|
||||||
|
this.navigate("#dashboard", {trigger: true});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.nodesView = new window.NodesView({
|
||||||
|
coordinators: this.coordinatorCollection,
|
||||||
|
dbServers: this.dbServers[0],
|
||||||
|
toRender: 'dbserver'
|
||||||
|
});
|
||||||
this.nodesView.render();
|
this.nodesView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -308,6 +327,39 @@
|
||||||
this.logsView.render();
|
this.logsView.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
nLogs: function (nodename, initialized) {
|
||||||
|
this.checkUser();
|
||||||
|
if (!initialized) {
|
||||||
|
this.waitForInit(this.nLogs.bind(this), nodename);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var newLogsAllCollection = new window.ArangoLogs(
|
||||||
|
{upto: true, loglevel: 4}
|
||||||
|
),
|
||||||
|
newLogsDebugCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 4}
|
||||||
|
),
|
||||||
|
newLogsInfoCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 3}
|
||||||
|
),
|
||||||
|
newLogsWarningCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 2}
|
||||||
|
),
|
||||||
|
newLogsErrorCollection = new window.ArangoLogs(
|
||||||
|
{loglevel: 1}
|
||||||
|
);
|
||||||
|
this.nLogsView = new window.LogsView({
|
||||||
|
logall: newLogsAllCollection,
|
||||||
|
logdebug: newLogsDebugCollection,
|
||||||
|
loginfo: newLogsInfoCollection,
|
||||||
|
logwarning: newLogsWarningCollection,
|
||||||
|
logerror: newLogsErrorCollection
|
||||||
|
});
|
||||||
|
this.nLogsView.render();
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
applicationDetail: function (mount, initialized) {
|
applicationDetail: function (mount, initialized) {
|
||||||
this.checkUser();
|
this.checkUser();
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
|
@ -746,7 +798,7 @@
|
||||||
host: coordinator.get('address')
|
host: coordinator.get('address')
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
_.each(this.dbServers, function(dbservers) {
|
_.each(this.dbServers, function(dbservers) {
|
||||||
dbservers.fetch();
|
dbservers.fetch();
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,13 +3,17 @@
|
||||||
<% if (isCluster) { %>
|
<% if (isCluster) { %>
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
<li class="cluster-menu"><a id="cluster" class="tab" href="#cluster"><i class="fa fa-circle-o"></i>Cluster</a></li>
|
||||||
<li class="nodes-menu"><a id="nodes" class="tab" href="#nodes"><i class="fa fa-server"></i>Nodes</a></li>
|
<li class="nodes-menu"><a id="nodes" class="tab" href="#cNodes"><i class="fa fa-server"></i>Nodes</a></li>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
<li class="dashboard-menu"><a id="dashboard" class="tab" href="#dashboard"><i class="fa fa-dashboard"></i>Dashboard</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<!-- <li id="dbSelect" class="dropdown databases-menu disabled"></li> -->
|
<!-- <li id="dbSelect" class="dropdown databases-menu disabled"></li> -->
|
||||||
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
<li class="collections-menu"><a id="collections" class="tab" href="#collections"><i class="fa fa-folder"></i>Collections</a></li>
|
||||||
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
|
<li class="databases-menu"><a id="databases" class="tab" href="#databases"><i class="fa fa-database"></i>Databases</a></li>
|
||||||
|
<% } %>
|
||||||
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
<li class="queries-menu"><a id="queries" class="tab" href="#queries"><i class="fa fa-bolt"></i>Queries</a></li>
|
||||||
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
<li class="graphs-menu"><a id="graphs" class="tab" href="#graphs"><i class="fa fa-area-chart"></i>Graphs</a></li>
|
||||||
<li class="services-menu">
|
<li class="services-menu">
|
||||||
|
@ -19,10 +23,12 @@
|
||||||
<% if (!isCluster) { %>
|
<% if (!isCluster) { %>
|
||||||
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-file-text"></i>Logs</a></li>
|
<li class="logs-menu"><a id="logs" class="tab" href="#manage"><i class="fa fa-file-text"></i>Logs</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<!--
|
||||||
<% if (currentDB.get('isSystem')) { %>
|
<% if (currentDB.get('isSystem')) { %>
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
<li class="settings-menu"><a id="settings" class="tab" href="#settings"><i class="fa fa-cog"></i>Settings</a></li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
-->
|
||||||
<li class="helpus-menu" style="position: absolute; bottom: 0;"><a id="helpus" class="tab" href="#helpus"><i class="fa fa-heart"></i>Help Us</a></li>
|
<li class="helpus-menu" style="position: absolute; bottom: 0;"><a id="helpus" class="tab" href="#helpus"><i class="fa fa-heart"></i>Help Us</a></li>
|
||||||
<!--
|
<!--
|
||||||
<li class="navbar-spacer big"></li>
|
<li class="navbar-spacer big"></li>
|
||||||
|
|
|
@ -2,14 +2,28 @@
|
||||||
|
|
||||||
<div id="nodesContent" class="innerContent">
|
<div id="nodesContent" class="innerContent">
|
||||||
|
|
||||||
<% if(coords.length > 0) { %>
|
<% if (coords.length > 0) { %>
|
||||||
|
<% var disabled = ''; %>
|
||||||
|
<% var genClass = "pure-u-1-" + Object.keys(coords[0]).length; %>
|
||||||
|
|
||||||
|
<% if (type !== 'coordinator') { %>
|
||||||
|
<% disabled = " disabled"; %>
|
||||||
|
<% } else { %>
|
||||||
|
<% disabled = " "; %>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
<div class="pure-g cluster-nodes-title pure-table pure-table-header pure-title">
|
||||||
<div class="pure-table-row">
|
<div class="pure-table-row">
|
||||||
<div class="pure-u-1-4 mid">Name</div>
|
<div class="<%= genClass %> mid">Name</div>
|
||||||
<div class="pure-u-1-4 mid">Address</div>
|
<div class="<%= genClass %> mid">Address</div>
|
||||||
<div class="pure-u-1-4 mid">Protocol</div>
|
<div class="<%= genClass %> mid">Protocol</div>
|
||||||
<div class="pure-u-1-4 mid">Status</div>
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid">Role</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
<div class="<%=genClass%> mid">Status</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -17,16 +31,20 @@
|
||||||
|
|
||||||
<% _.each(coords, function(node) { %>
|
<% _.each(coords, function(node) { %>
|
||||||
|
|
||||||
<div class="pure-table-row" node="<%=node.name%>">
|
<div class="pure-table-row <%= disabled %>" node="<%=node.name%>">
|
||||||
|
|
||||||
<div class="pure-u-1-4 mid"><%= node.name %></div>
|
<div class="<%= genClass %> mid"><%= node.name %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.address %></div>
|
<div class="<%= genClass %> mid"><%= node.address %></div>
|
||||||
<div class="pure-u-1-4 mid"><%= node.protocol %></div>
|
<div class="<%= genClass %> mid"><%= node.protocol %></div>
|
||||||
|
|
||||||
|
<% if(type !== 'coordinator' ) { %>
|
||||||
|
<div class="<%=genClass%> mid"><%= node.role %></div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<% if(node.status === 'ok') { %>
|
<% if(node.status === 'ok') { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-check-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-check-circle"></i></div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="pure-u-1-4 mid"><i class="fa fa-exclamation-circle"></i></div>
|
<div class="<%= genClass %> mid"><i class="fa fa-exclamation-circle"></i></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
"click #databaseSearchSubmit" : "search",
|
"click #databaseSearchSubmit" : "search",
|
||||||
"click #databaseToggle" : "toggleSettingsDropdown",
|
"click #databaseToggle" : "toggleSettingsDropdown",
|
||||||
"click .css-label" : "checkBoxes",
|
"click .css-label" : "checkBoxes",
|
||||||
"click #dbSortDesc" : "sorting",
|
"click #dbSortDesc" : "sorting"
|
||||||
"click .tile" : "switchDatabase"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
sorting: function() {
|
sorting: function() {
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
isCluster: this.isCluster
|
isCluster: this.isCluster
|
||||||
}));
|
}));
|
||||||
|
|
||||||
console.log(this.currentDB);
|
|
||||||
$(this.subEl).html(this.templateSub.render({
|
$(this.subEl).html(this.templateSub.render({
|
||||||
currentDB: this.currentDB.toJSON()
|
currentDB: this.currentDB.toJSON()
|
||||||
}));
|
}));
|
||||||
|
@ -194,20 +193,6 @@
|
||||||
view: undefined,
|
view: undefined,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
node: [
|
|
||||||
{
|
|
||||||
name: 'Dashboard',
|
|
||||||
view: undefined,
|
|
||||||
active: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Logs',
|
|
||||||
route: 'nodeLogs',
|
|
||||||
params: {
|
|
||||||
node: undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
queries: [
|
queries: [
|
||||||
{
|
{
|
||||||
name: 'Editor',
|
name: 'Editor',
|
||||||
|
@ -315,6 +300,7 @@
|
||||||
menuItem = menuItem.substr(1, menuItem.length - 1);
|
menuItem = menuItem.substr(1, menuItem.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Location for selecting MainView Primary Navigaation Entry
|
||||||
if (menuItem === '') {
|
if (menuItem === '') {
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
menuItem = 'cluster';
|
menuItem = 'cluster';
|
||||||
|
@ -323,6 +309,9 @@
|
||||||
menuItem = 'dashboard';
|
menuItem = 'dashboard';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (menuItem === 'cNodes' || menuItem === 'dNodes') {
|
||||||
|
menuItem = 'nodes';
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.renderSubMenu(menuItem.split('-')[0]);
|
this.renderSubMenu(menuItem.split('-')[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
this.coordinators = options.coordinators;
|
this.coordinators = options.coordinators;
|
||||||
|
this.dbServers = options.dbServers;
|
||||||
this.coordname = options.coordname;
|
this.coordname = options.coordname;
|
||||||
this.updateServerTime();
|
this.updateServerTime();
|
||||||
|
|
||||||
|
@ -43,17 +44,27 @@
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
this.continueRender();
|
this.continueRender();
|
||||||
this.breadcrumb(this.coordname);
|
this.breadcrumb(this.coordname);
|
||||||
|
window.arangoHelper.buildNodeSubNav(this.coordname, 'Dashboard', 'Logs');
|
||||||
$(window).trigger('resize');
|
$(window).trigger('resize');
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
if (!this.initDone) {
|
var cb =function() {
|
||||||
this.waitForCoordinators(callback);
|
console.log("dummy");
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!this.initCoordDone) {
|
||||||
|
this.waitForCoordinators(cb);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.initDBDone) {
|
||||||
|
this.waitForDBServers(callback);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.coordname = window.location.hash.split('/')[1];
|
this.coordname = window.location.hash.split('/')[1];
|
||||||
this.coordinator = this.coordinators.findWhere({name: this.coordname});
|
this.coordinator = this.coordinators.findWhere({name: this.coordname});
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
|
@ -84,7 +95,30 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
self.coordinator = self.coordinators.findWhere({name: self.coordname});
|
self.coordinator = self.coordinators.findWhere({name: self.coordname});
|
||||||
self.initDone = true;
|
self.initCoordDone = true;
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
|
},
|
||||||
|
|
||||||
|
waitForDBServers: function(callback) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
window.setTimeout(function() {
|
||||||
|
if (self.dbServers[0].length === 0) {
|
||||||
|
self.waitForDBServers(callback);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
self.initDBDone = true;
|
||||||
|
self.dbServer = self.dbServers[0];
|
||||||
|
|
||||||
|
self.dbServer.each(function(model) {
|
||||||
|
if (model.get("name") === 'DBServer1') {
|
||||||
|
self.dbServer = model;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(self.dbServer.toJSON());
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
|
@ -12,21 +12,23 @@
|
||||||
knownServers: [],
|
knownServers: [],
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"click .pure-table-body .pure-table-row": "navigateToNode"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
if (window.App.isCluster) {
|
if (window.App.isCluster) {
|
||||||
this.dbServers = options.dbServers;
|
this.dbServers = options.dbServers;
|
||||||
this.coordinators = options.coordinators;
|
this.coordinators = options.coordinators;
|
||||||
this.updateServerTime();
|
this.updateServerTime();
|
||||||
|
this.toRender = options.toRender;
|
||||||
|
|
||||||
|
if (this.toRender !== 'coordinator') {
|
||||||
|
this.events["click .pure-table-body .pure-table-row"] = "navigateToNode";
|
||||||
|
}
|
||||||
|
|
||||||
//start polling with interval
|
//start polling with interval
|
||||||
window.setInterval(function() {
|
window.setInterval(function() {
|
||||||
if (window.location.hash === '#nodes') {
|
if (window.location.hash === '#cNodes' || window.location.hash === '#dNodes') {
|
||||||
|
|
||||||
|
|
||||||
var callback = function(data) {
|
var callback = function(data) {
|
||||||
};
|
};
|
||||||
|
@ -42,7 +44,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.html(this.template.render({coords: []}));
|
window.arangoHelper.buildNodesSubNav(this.toRender);
|
||||||
|
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
this.continueRender();
|
this.continueRender();
|
||||||
|
@ -57,9 +59,18 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
continueRender: function() {
|
continueRender: function() {
|
||||||
var coords = this.coordinators.toJSON();
|
var coords;
|
||||||
|
|
||||||
|
if (this.toRender === 'coordinator') {
|
||||||
|
coords = this.coordinators.toJSON();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
coords = this.dbServers.toJSON();
|
||||||
|
}
|
||||||
|
|
||||||
this.$el.html(this.template.render({
|
this.$el.html(this.template.render({
|
||||||
coords: coords
|
coords: coords,
|
||||||
|
type: this.toRender
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,6 @@ main {
|
||||||
background-color: $c-white;
|
background-color: $c-white;
|
||||||
border: 1px solid $c-content-border;
|
border: 1px solid $c-content-border;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
margin-top: 220px;
|
|
||||||
|
|
||||||
.app-info {
|
.app-info {
|
||||||
@include border-radius(3px);
|
@include border-radius(3px);
|
||||||
|
|
|
@ -376,13 +376,13 @@
|
||||||
|
|
||||||
.dashboard-legend-inner {
|
.dashboard-legend-inner {
|
||||||
padding: 0 5px 5px 0;
|
padding: 0 5px 5px 0;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
br {
|
br {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@extend %pull-right;
|
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,12 +29,20 @@
|
||||||
color: $c-pure-text;
|
color: $c-pure-text;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgb(239, 240, 235);
|
background-color: rgb(239, 240, 235);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
&:hover {
|
||||||
|
background-color: $c-white;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -132,6 +132,7 @@ function computeStatisticsRaw (result, start, clusterId) {
|
||||||
+ " return s",
|
+ " return s",
|
||||||
{ start: start - 2 * STATISTICS_INTERVAL, clusterId: clusterId });
|
{ start: start - 2 * STATISTICS_INTERVAL, clusterId: clusterId });
|
||||||
|
|
||||||
|
result.enabled = internal.enabledStatistics();
|
||||||
result.times = [];
|
result.times = [];
|
||||||
|
|
||||||
for (let key in STAT_SERIES) {
|
for (let key in STAT_SERIES) {
|
||||||
|
@ -394,7 +395,7 @@ function computeStatisticsLong (attrs, clusterId) {
|
||||||
|
|
||||||
|
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
if (!internal.options()['server.disable-authentication'] && !req.session.uid) {
|
if (!internal.options()['server.disable-authentication'] && (!req.session || !req.session.uid)) {
|
||||||
throw new httperr.Unauthorized();
|
throw new httperr.Unauthorized();
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -429,7 +429,7 @@ function analyzeCoreDump(instanceInfo, options, storeArangodPath, pid) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function analyzeCoreDumpWindows(instanceInfo) {
|
function analyzeCoreDumpWindows(instanceInfo) {
|
||||||
const coreFN = instanceInfo.tmpDataDir + "\\" + "core.dmp";
|
const coreFN = instanceInfo.rootDir + "\\" + "core.dmp";
|
||||||
|
|
||||||
if (!fs.exists(coreFN)) {
|
if (!fs.exists(coreFN)) {
|
||||||
print("core file " + coreFN + " not found?");
|
print("core file " + coreFN + " not found?");
|
||||||
|
@ -477,7 +477,7 @@ function checkArangoAlive(arangod, options) {
|
||||||
const storeArangodPath = "/var/tmp/arangod_" + arangod.pid;
|
const storeArangodPath = "/var/tmp/arangod_" + arangod.pid;
|
||||||
|
|
||||||
print("Core dump written; copying arangod to " +
|
print("Core dump written; copying arangod to " +
|
||||||
arangod.tmpDataDir + " for later analysis.");
|
arangod.rootDir + " for later analysis.");
|
||||||
|
|
||||||
let corePath = (options.coreDirectory === "") ?
|
let corePath = (options.coreDirectory === "") ?
|
||||||
"core" :
|
"core" :
|
||||||
|
|
|
@ -75,8 +75,8 @@ function agencyTestSuite () {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
function readAndCheck(list) {
|
function readAndCheck(list) {
|
||||||
var res = readAgency(list);
|
var res = readAgency(list);
|
||||||
require ("internal").print(list,res);
|
// require ("internal").print(list,res);
|
||||||
assertEqual(res.statusCode, 200);
|
assertEqual(res.statusCode, 200);
|
||||||
return res.bodyParsed;
|
return res.bodyParsed;
|
||||||
}
|
}
|
||||||
|
@ -286,9 +286,17 @@ function agencyTestSuite () {
|
||||||
assertEqual(readAndCheck([["version"]]), [{version:-1}]);
|
assertEqual(readAndCheck([["version"]]), [{version:-1}]);
|
||||||
writeAndCheck([[{"version":{"op":"decrement"}}]]); // int before
|
writeAndCheck([[{"version":{"op":"decrement"}}]]); // int before
|
||||||
assertEqual(readAndCheck([["version"]]), [{version:-2}]);
|
assertEqual(readAndCheck([["version"]]), [{version:-2}]);
|
||||||
|
},
|
||||||
|
|
||||||
|
testOpInStrangePlaces : function () {
|
||||||
|
writeAndCheck([[{"/op":12}]]);
|
||||||
|
assertEqual(readAndCheck([["/op"]]), [{op:12}]);
|
||||||
|
writeAndCheck([[{"/op":{op:"delete"}}]]);
|
||||||
|
writeAndCheck([[{"/op/a/b/c": {"op":"set", "new": {op:13}}}]]);
|
||||||
|
assertEqual(readAndCheck([["/op/a/b/c"]], [{op:{a:{b:{c:{op:13}}}}}]));
|
||||||
|
writeAndCheck([[{"/op/a/b/d": {"op":"set", "new": {ttl:13}}}]]);
|
||||||
|
assertEqual(readAndCheck([["/op/a/b/c"]], [{op:{a:{b:{d:{ttl:14}}}}}]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,15 @@ if (global.SYS_DOWNLOAD) {
|
||||||
delete global.SYS_DOWNLOAD;
|
delete global.SYS_DOWNLOAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief whether or not Statistics are enabled
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
if (global.SYS_ENABLED_STATISTICS) {
|
||||||
|
exports.enabledStatistics = global.SYS_ENABLED_STATISTICS;
|
||||||
|
delete global.SYS_ENABLED_STATISTICS;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief executeScript
|
/// @brief executeScript
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -87,6 +87,11 @@ var findOrCreateCollectionByName = function (name, type, noCreate) {
|
||||||
err.errorNum = arangodb.errors.ERROR_GRAPH_NOT_AN_ARANGO_COLLECTION.code;
|
err.errorNum = arangodb.errors.ERROR_GRAPH_NOT_AN_ARANGO_COLLECTION.code;
|
||||||
err.errorMessage = name + arangodb.errors.ERROR_GRAPH_NOT_AN_ARANGO_COLLECTION.message;
|
err.errorMessage = name + arangodb.errors.ERROR_GRAPH_NOT_AN_ARANGO_COLLECTION.message;
|
||||||
throw err;
|
throw err;
|
||||||
|
} else if (type === ArangoCollection.TYPE_EDGE && col.type() !== type) {
|
||||||
|
var err2 = new ArangoError();
|
||||||
|
err2.errorNum = arangodb.errors.ERROR_ARANGO_COLLECTION_TYPE_INVALID.code;
|
||||||
|
err2.errorMessage = name + " cannot be used as relation. It is not an edge collection";
|
||||||
|
throw err2;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,10 +41,10 @@ const url = require('url');
|
||||||
class Response {
|
class Response {
|
||||||
throw(msg) {
|
throw(msg) {
|
||||||
if (this.status >= 400) {
|
if (this.status >= 400) {
|
||||||
let HttpError = httperr[this.status] || httperr[500];
|
throw Object.assign(
|
||||||
let err = new HttpError(msg || this.message);
|
httperr(this.status, msg || this.message),
|
||||||
err.details = this;
|
{details: this}
|
||||||
throw err;
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
constructor(res, encoding, json) {
|
constructor(res, encoding, json) {
|
||||||
|
|
|
@ -26010,7 +26010,7 @@ SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({
|
||||||
SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
||||||
initialize: function(){
|
initialize: function(){
|
||||||
Handlebars.registerHelper('isArray', function(param, opts) {
|
Handlebars.registerHelper('isArray', function(param, opts) {
|
||||||
if (param.type.toLowerCase() === 'array' || param.allowMultiple) {
|
if (param && param.type && param.type.toLowerCase() === 'array' || param.allowMultiple) {
|
||||||
return opts.fn(this);
|
return opts.fn(this);
|
||||||
} else {
|
} else {
|
||||||
return opts.inverse(this);
|
return opts.inverse(this);
|
||||||
|
|
|
@ -97,8 +97,10 @@ module.exports = class FoxxContext {
|
||||||
|
|
||||||
collectionName(name) {
|
collectionName(name) {
|
||||||
const fqn = (
|
const fqn = (
|
||||||
this.collectionPrefix
|
this.collectionPrefix + name
|
||||||
+ name.replace(/[^a-z0-9]/ig, '_').replace(/(^_+|_+$)/g, '').substr(0, 64)
|
.replace(/[^a-z0-9]/ig, '_')
|
||||||
|
.replace(/(^_+|_+$)/g, '')
|
||||||
|
.substr(0, 64)
|
||||||
);
|
);
|
||||||
assert(fqn.length > 0, `Cannot derive collection name from "${name}"`);
|
assert(fqn.length > 0, `Cannot derive collection name from "${name}"`);
|
||||||
return fqn;
|
return fqn;
|
||||||
|
|
|
@ -21,8 +21,12 @@
|
||||||
/// @author Alan Plum
|
/// @author Alan Plum
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const manager = require('@arangodb/foxx/manager');
|
module.exports = {
|
||||||
|
get createRouter() {
|
||||||
exports.getExports = function (path) {
|
return require('@arangodb/foxx/router');
|
||||||
return manager.requireApp('/' + path.replace(/(^\/+|\/+$)/, ''));
|
},
|
||||||
|
get queue() {
|
||||||
|
const queues = require('@arangodb/foxx/queues');
|
||||||
|
return queues.get('default');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,12 @@ exports.createQuery = require('@arangodb/foxx/legacy/query').createQuery;
|
||||||
exports.toJSONSchema = require('@arangodb/foxx/legacy/schema').toJSONSchema;
|
exports.toJSONSchema = require('@arangodb/foxx/legacy/schema').toJSONSchema;
|
||||||
exports.queues = require('@arangodb/foxx/queues');
|
exports.queues = require('@arangodb/foxx/queues');
|
||||||
|
|
||||||
exports.getExports = require('../').getExports;
|
const manager = require('@arangodb/foxx/manager');
|
||||||
|
|
||||||
|
exports.getExports = function (path) {
|
||||||
|
return manager.requireApp('/' + path.replace(/(^\/+|\/+$)/, ''));
|
||||||
|
};
|
||||||
|
|
||||||
exports.requireApp = function (path) {
|
exports.requireApp = function (path) {
|
||||||
return exports.getExports(path);
|
return exports.getExports(path);
|
||||||
};
|
};
|
||||||
|
|
|
@ -281,7 +281,15 @@ module.exports = class SyntheticResponse {
|
||||||
if (typeof status === 'string') {
|
if (typeof status === 'string') {
|
||||||
status = statuses(status);
|
status = statuses(status);
|
||||||
}
|
}
|
||||||
throw Object.assign(httperr(status, reason), args);
|
if (reason && typeof reason === 'object') {
|
||||||
|
args = reason;
|
||||||
|
reason = undefined;
|
||||||
|
}
|
||||||
|
throw Object.assign(
|
||||||
|
httperr(status, reason),
|
||||||
|
{statusCode: status, status},
|
||||||
|
args
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
send(body, type) {
|
send(body, type) {
|
||||||
|
|
|
@ -481,7 +481,11 @@ function createDependencies(definitions, options) {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get() {
|
get() {
|
||||||
const mount = options[name];
|
const mount = options[name];
|
||||||
return mount ? require('@arangodb/foxx').getExports(mount) : null;
|
if (!mount) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const FoxxManager = require('@arangodb/foxx/manager');
|
||||||
|
return FoxxManager.requireApp('/' + mount.replace(/(^\/+|\/+$)/, ''));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,7 +78,7 @@ module.exports = function sessionMiddleware(cfg) {
|
||||||
transport.get || transport.set,
|
transport.get || transport.set,
|
||||||
'Session transport must have a get and/or set method'
|
'Session transport must have a get and/or set method'
|
||||||
);
|
);
|
||||||
return transports;
|
return transport;
|
||||||
});
|
});
|
||||||
assert(transports.length > 0, 'Must specify at least one session transport');
|
assert(transports.length > 0, 'Must specify at least one session transport');
|
||||||
const autoCreate = cfg.autoCreate !== false;
|
const autoCreate = cfg.autoCreate !== false;
|
||||||
|
|
|
@ -68,6 +68,9 @@ module.exports = function systemStorage(cfg) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
forClient(session) {
|
forClient(session) {
|
||||||
|
return session && session._key || null;
|
||||||
|
},
|
||||||
|
save(session) {
|
||||||
if (!session) {
|
if (!session) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -85,6 +88,7 @@ module.exports = function systemStorage(cfg) {
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
const meta = db._sessions.save(payload);
|
const meta = db._sessions.save(payload);
|
||||||
sid = meta._key;
|
sid = meta._key;
|
||||||
|
session._key = sid;
|
||||||
} else {
|
} else {
|
||||||
db._sessions.replace(sid, payload);
|
db._sessions.replace(sid, payload);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +100,7 @@ module.exports = function systemStorage(cfg) {
|
||||||
internal.accessSid(sid);
|
internal.accessSid(sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sid;
|
return session;
|
||||||
},
|
},
|
||||||
setUser(session, user) {
|
setUser(session, user) {
|
||||||
if (user) {
|
if (user) {
|
||||||
|
@ -113,17 +117,20 @@ module.exports = function systemStorage(cfg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clear(sid) {
|
clear(session) {
|
||||||
|
if (!session || !session._key) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
db._sessions.remove(sid);
|
db._sessions.remove(session);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.isArangoError && e.errorNum === NOT_FOUND) {
|
if (e.isArangoError && e.errorNum === NOT_FOUND) {
|
||||||
internal.clearSid(sid);
|
internal.clearSid(session._key);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
internal.clearSid(sid);
|
internal.clearSid(session._key);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
new() {
|
new() {
|
||||||
|
|
|
@ -77,6 +77,9 @@ module.exports = function collectionStorage(cfg) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
forClient(session) {
|
forClient(session) {
|
||||||
|
return session && session._key || null;
|
||||||
|
},
|
||||||
|
save(session) {
|
||||||
if (!session) {
|
if (!session) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -88,14 +91,18 @@ module.exports = function collectionStorage(cfg) {
|
||||||
};
|
};
|
||||||
if (!session._key) {
|
if (!session._key) {
|
||||||
const meta = collection.save(payload);
|
const meta = collection.save(payload);
|
||||||
return meta._key;
|
session._key = meta._key;
|
||||||
|
} else {
|
||||||
|
collection.replace(session._key, payload);
|
||||||
}
|
}
|
||||||
collection.replace(session._key, payload);
|
return session;
|
||||||
return session._key;
|
|
||||||
},
|
},
|
||||||
clear(sid) {
|
clear(session) {
|
||||||
|
if (!session || !session._key) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
collection.remove(sid);
|
collection.remove(session);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.isArangoError && e.errorNum === NOT_FOUND) {
|
if (e.isArangoError && e.errorNum === NOT_FOUND) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -47,9 +47,12 @@ function ahuacatlFailureSuite () {
|
||||||
var e;
|
var e;
|
||||||
var count = 5000;
|
var count = 5000;
|
||||||
|
|
||||||
var assertFailingQuery = function (query) {
|
var assertFailingQuery = function (query, rulesToExclude) {
|
||||||
|
if (!rulesToExclude) {
|
||||||
|
rulesToExclude = [];
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
AQL_EXECUTE(query);
|
AQL_EXECUTE(query, null, { optimizer: { rules: rulesToExclude } });
|
||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
@ -317,7 +320,7 @@ function ahuacatlFailureSuite () {
|
||||||
|
|
||||||
testCalculationBlock1 : function () {
|
testCalculationBlock1 : function () {
|
||||||
internal.debugSetFailAt("CalculationBlock::fillBlockWithReference");
|
internal.debugSetFailAt("CalculationBlock::fillBlockWithReference");
|
||||||
assertFailingQuery("FOR i IN " + c.name() + " LET v = i RETURN v");
|
assertFailingQuery("FOR i IN " + c.name() + " LET v = i RETURN v", [ "-all" ]);
|
||||||
},
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -335,7 +338,7 @@ function ahuacatlFailureSuite () {
|
||||||
|
|
||||||
testEnumerateListBlock1 : function () {
|
testEnumerateListBlock1 : function () {
|
||||||
internal.debugSetFailAt("EnumerateListBlock::getSome");
|
internal.debugSetFailAt("EnumerateListBlock::getSome");
|
||||||
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x");
|
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x", [ "-all" ]);
|
||||||
assertFailingQuery("FOR i IN 1..10000 RETURN i");
|
assertFailingQuery("FOR i IN 1..10000 RETURN i");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -345,7 +348,7 @@ function ahuacatlFailureSuite () {
|
||||||
|
|
||||||
testEnumerateListBlock2 : function () {
|
testEnumerateListBlock2 : function () {
|
||||||
internal.debugSetFailAt("EnumerateListBlock::getAqlValue");
|
internal.debugSetFailAt("EnumerateListBlock::getAqlValue");
|
||||||
assertFailingQuery("FOR year IN [ 2010, 2011, 2012 ] LET quarters = ((FOR q IN [ 1, 2, 3, 4 ] RETURN q)) RETURN LENGTH(quarters)");
|
assertFailingQuery("FOR year IN [ 2010, 2011, 2012 ] LET quarters = ((FOR q IN [ 1, 2, 3, 4 ] RETURN q)) RETURN LENGTH(quarters)", [ "-all" ]);
|
||||||
},
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -354,9 +357,9 @@ function ahuacatlFailureSuite () {
|
||||||
|
|
||||||
testSubqueryBlock1 : function () {
|
testSubqueryBlock1 : function () {
|
||||||
internal.debugSetFailAt("SubqueryBlock::getSome");
|
internal.debugSetFailAt("SubqueryBlock::getSome");
|
||||||
assertFailingQuery("FOR year IN [ 2010, 2011, 2012 ] LET quarters = ((FOR q IN [ 1, 2, 3, 4 ] RETURN q)) RETURN LENGTH(quarters)");
|
assertFailingQuery("FOR year IN [ 2010, 2011, 2012 ] LET quarters = ((FOR q IN [ 1, 2, 3, 4 ] RETURN q)) RETURN LENGTH(quarters)", [ "-all" ]);
|
||||||
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x");
|
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x", [ "-all" ]);
|
||||||
assertFailingQuery("LET values = (FOR i IN 1..10000 RETURN i) FOR x IN values RETURN x");
|
assertFailingQuery("LET values = (FOR i IN 1..10000 RETURN i) FOR x IN values RETURN x", [ "-all" ]);
|
||||||
},
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -365,8 +368,8 @@ function ahuacatlFailureSuite () {
|
||||||
|
|
||||||
testSubqueryBlock2 : function () {
|
testSubqueryBlock2 : function () {
|
||||||
internal.debugSetFailAt("SubqueryBlock::executeSubquery");
|
internal.debugSetFailAt("SubqueryBlock::executeSubquery");
|
||||||
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x");
|
assertFailingQuery("LET values = (FOR i IN " + c.name() + " RETURN i) FOR x IN values RETURN x", [ "-all" ]);
|
||||||
assertFailingQuery("LET values = (FOR i IN 1..10000 RETURN i) FOR x IN values RETURN x");
|
assertFailingQuery("LET values = (FOR i IN 1..10000 RETURN i) FOR x IN values RETURN x", [ "-all" ]);
|
||||||
},
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -156,16 +156,16 @@ static int TypeWeight(VPackSlice const& slice) {
|
||||||
case VPackValueType::Array:
|
case VPackValueType::Array:
|
||||||
return 4;
|
return 4;
|
||||||
case VPackValueType::Object:
|
case VPackValueType::Object:
|
||||||
case VPackValueType::External:
|
|
||||||
// External type is used for documents
|
|
||||||
return 5;
|
return 5;
|
||||||
|
case VPackValueType::External:
|
||||||
|
return TypeWeight(slice.resolveExternal());
|
||||||
default:
|
default:
|
||||||
// All other values have equal weight
|
// All other values have equal weight
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int VelocyPackHelper::compareNumberValues(VPackSlice const& lhs, VPackSlice const& rhs) {
|
int VelocyPackHelper::compareNumberValues(VPackSlice lhs, VPackSlice rhs) {
|
||||||
VPackValueType const lType = lhs.type();
|
VPackValueType const lType = lhs.type();
|
||||||
|
|
||||||
if (lType == rhs.type()) {
|
if (lType == rhs.type()) {
|
||||||
|
@ -428,9 +428,12 @@ bool VelocyPackHelper::velocyPackToFile(char const* filename,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int VelocyPackHelper::compare(VPackSlice const& lhs, VPackSlice const& rhs,
|
int VelocyPackHelper::compare(VPackSlice lhs, VPackSlice rhs,
|
||||||
bool useUTF8, VPackOptions const* options,
|
bool useUTF8, VPackOptions const* options,
|
||||||
VPackSlice const* lhsBase, VPackSlice const* rhsBase) {
|
VPackSlice const* lhsBase, VPackSlice const* rhsBase) {
|
||||||
|
lhs = lhs.resolveExternal(); // follow externals
|
||||||
|
rhs = rhs.resolveExternal(); // follow externals
|
||||||
|
|
||||||
{
|
{
|
||||||
int lWeight = TypeWeight(lhs);
|
int lWeight = TypeWeight(lhs);
|
||||||
int rWeight = TypeWeight(rhs);
|
int rWeight = TypeWeight(rhs);
|
||||||
|
@ -542,11 +545,11 @@ int VelocyPackHelper::compare(VPackSlice const& lhs, VPackSlice const& rhs,
|
||||||
for (VPackValueLength i = 0; i < n; ++i) {
|
for (VPackValueLength i = 0; i < n; ++i) {
|
||||||
VPackSlice lhsValue;
|
VPackSlice lhsValue;
|
||||||
if (i < nl) {
|
if (i < nl) {
|
||||||
lhsValue = lhs.at(i);
|
lhsValue = lhs.at(i).resolveExternal();
|
||||||
}
|
}
|
||||||
VPackSlice rhsValue;
|
VPackSlice rhsValue;
|
||||||
if (i < nr) {
|
if (i < nr) {
|
||||||
rhsValue = rhs.at(i);
|
rhsValue = rhs.at(i).resolveExternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = compare(lhsValue, rhsValue, useUTF8, options, &lhs, &rhs);
|
int result = compare(lhsValue, rhsValue, useUTF8, options, &lhs, &rhs);
|
||||||
|
@ -561,13 +564,15 @@ int VelocyPackHelper::compare(VPackSlice const& lhs, VPackSlice const& rhs,
|
||||||
VPackCollection::keys(lhs, keys);
|
VPackCollection::keys(lhs, keys);
|
||||||
VPackCollection::keys(rhs, keys);
|
VPackCollection::keys(rhs, keys);
|
||||||
for (auto const& key : keys) {
|
for (auto const& key : keys) {
|
||||||
VPackSlice lhsValue;
|
VPackSlice lhsValue = lhs.get(key).resolveExternal();
|
||||||
if (lhs.hasKey(key)) {
|
if (lhsValue.isNone()) {
|
||||||
lhsValue = lhs.get(key);
|
// not present => null
|
||||||
|
lhsValue = VPackSlice::nullSlice();
|
||||||
}
|
}
|
||||||
VPackSlice rhsValue;
|
VPackSlice rhsValue = rhs.get(key).resolveExternal();
|
||||||
if (rhs.hasKey(key)) {
|
if (rhsValue.isNone()) {
|
||||||
rhsValue = rhs.get(key);
|
// not present => null
|
||||||
|
rhsValue = VPackSlice::nullSlice();
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = compare(lhsValue, rhsValue, useUTF8, options, &lhs, &rhs);
|
int result = compare(lhsValue, rhsValue, useUTF8, options, &lhs, &rhs);
|
||||||
|
@ -626,14 +631,16 @@ double VelocyPackHelper::toDouble(VPackSlice const& slice, bool& failed) {
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
} else if (n == 1) {
|
} else if (n == 1) {
|
||||||
return VelocyPackHelper::toDouble(slice.at(0), failed);
|
return VelocyPackHelper::toDouble(slice.at(0).resolveExternal(), failed);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case VPackValueType::External: {
|
||||||
|
return VelocyPackHelper::toDouble(slice.resolveExternal(), failed);
|
||||||
|
}
|
||||||
case VPackValueType::Illegal:
|
case VPackValueType::Illegal:
|
||||||
case VPackValueType::Object:
|
case VPackValueType::Object:
|
||||||
case VPackValueType::UTCDate:
|
case VPackValueType::UTCDate:
|
||||||
case VPackValueType::External:
|
|
||||||
case VPackValueType::MinKey:
|
case VPackValueType::MinKey:
|
||||||
case VPackValueType::MaxKey:
|
case VPackValueType::MaxKey:
|
||||||
case VPackValueType::Binary:
|
case VPackValueType::Binary:
|
||||||
|
@ -649,11 +656,12 @@ double VelocyPackHelper::toDouble(VPackSlice const& slice, bool& failed) {
|
||||||
uint64_t VelocyPackHelper::hashByAttributes(
|
uint64_t VelocyPackHelper::hashByAttributes(
|
||||||
VPackSlice slice, std::vector<std::string> const& attributes,
|
VPackSlice slice, std::vector<std::string> const& attributes,
|
||||||
bool docComplete, int& error, std::string const& key) {
|
bool docComplete, int& error, std::string const& key) {
|
||||||
error = TRI_ERROR_NO_ERROR;
|
|
||||||
uint64_t hash = TRI_FnvHashBlockInitial();
|
uint64_t hash = TRI_FnvHashBlockInitial();
|
||||||
|
error = TRI_ERROR_NO_ERROR;
|
||||||
|
slice = slice.resolveExternal();
|
||||||
if (slice.isObject()) {
|
if (slice.isObject()) {
|
||||||
for (auto const& attr: attributes) {
|
for (auto const& attr : attributes) {
|
||||||
VPackSlice sub = slice.get(attr);
|
VPackSlice sub = slice.get(attr).resolveExternal();
|
||||||
if (sub.isNone()) {
|
if (sub.isNone()) {
|
||||||
if (attr == "_key" && !key.empty()) {
|
if (attr == "_key" && !key.empty()) {
|
||||||
VPackBuilder temporaryBuilder;
|
VPackBuilder temporaryBuilder;
|
||||||
|
|
|
@ -203,15 +203,15 @@ class VelocyPackHelper {
|
||||||
/// @brief Compares two VelocyPack number values
|
/// @brief Compares two VelocyPack number values
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static int compareNumberValues(arangodb::velocypack::Slice const& lhs,
|
static int compareNumberValues(arangodb::velocypack::Slice lhs,
|
||||||
arangodb::velocypack::Slice const& rhs);
|
arangodb::velocypack::Slice rhs);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Compares two VelocyPack slices
|
/// @brief Compares two VelocyPack slices
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static int compare(arangodb::velocypack::Slice const& lhs,
|
static int compare(arangodb::velocypack::Slice lhs,
|
||||||
arangodb::velocypack::Slice const& rhs,
|
arangodb::velocypack::Slice rhs,
|
||||||
bool useUTF8, arangodb::velocypack::Options const* options = &arangodb::velocypack::Options::Defaults,
|
bool useUTF8, arangodb::velocypack::Options const* options = &arangodb::velocypack::Options::Defaults,
|
||||||
arangodb::velocypack::Slice const* lhsBase = nullptr,
|
arangodb::velocypack::Slice const* lhsBase = nullptr,
|
||||||
arangodb::velocypack::Slice const* rhsBase = nullptr);
|
arangodb::velocypack::Slice const* rhsBase = nullptr);
|
||||||
|
|
|
@ -314,6 +314,7 @@ SimpleHttpResult* SimpleHttpClient::doRequest(
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
this->close(); // this sets the state to IN_CONNECT for a retry
|
this->close(); // this sets the state to IN_CONNECT for a retry
|
||||||
|
usleep(5000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,10 +108,12 @@ v8::Handle<v8::Value> TRI_VPackToV8(v8::Isolate* isolate,
|
||||||
VPackOptions const* options,
|
VPackOptions const* options,
|
||||||
VPackSlice const* base) {
|
VPackSlice const* base) {
|
||||||
switch (slice.type()) {
|
switch (slice.type()) {
|
||||||
case VPackValueType::Null:
|
case VPackValueType::Null: {
|
||||||
return v8::Null(isolate);
|
return v8::Null(isolate);
|
||||||
case VPackValueType::Bool:
|
}
|
||||||
|
case VPackValueType::Bool: {
|
||||||
return v8::Boolean::New(isolate, slice.getBool());
|
return v8::Boolean::New(isolate, slice.getBool());
|
||||||
|
}
|
||||||
case VPackValueType::Double: {
|
case VPackValueType::Double: {
|
||||||
// convert NaN, +inf & -inf to null
|
// convert NaN, +inf & -inf to null
|
||||||
double value = slice.getDouble();
|
double value = slice.getDouble();
|
||||||
|
@ -145,12 +147,19 @@ v8::Handle<v8::Value> TRI_VPackToV8(v8::Isolate* isolate,
|
||||||
case VPackValueType::SmallInt: {
|
case VPackValueType::SmallInt: {
|
||||||
return v8::Integer::New(isolate, slice.getNumericValue<int32_t>());
|
return v8::Integer::New(isolate, slice.getNumericValue<int32_t>());
|
||||||
}
|
}
|
||||||
case VPackValueType::String:
|
case VPackValueType::String: {
|
||||||
return ObjectVPackString(isolate, slice);
|
return ObjectVPackString(isolate, slice);
|
||||||
case VPackValueType::Object:
|
}
|
||||||
return ObjectVPackObject(isolate, slice, options, base);
|
case VPackValueType::Array: {
|
||||||
case VPackValueType::Array:
|
|
||||||
return ObjectVPackArray(isolate, slice, options, base);
|
return ObjectVPackArray(isolate, slice, options, base);
|
||||||
|
}
|
||||||
|
case VPackValueType::Object: {
|
||||||
|
return ObjectVPackObject(isolate, slice, options, base);
|
||||||
|
}
|
||||||
|
case VPackValueType::External: {
|
||||||
|
// resolve external
|
||||||
|
return TRI_VPackToV8(isolate, VPackSlice(slice.getExternal()), options, base);
|
||||||
|
}
|
||||||
case VPackValueType::Custom: {
|
case VPackValueType::Custom: {
|
||||||
if (options == nullptr || options->customTypeHandler == nullptr || base == nullptr) {
|
if (options == nullptr || options->customTypeHandler == nullptr || base == nullptr) {
|
||||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||||
|
@ -161,8 +170,9 @@ v8::Handle<v8::Value> TRI_VPackToV8(v8::Isolate* isolate,
|
||||||
return TRI_V8_STD_STRING(id);
|
return TRI_V8_STD_STRING(id);
|
||||||
}
|
}
|
||||||
case VPackValueType::None:
|
case VPackValueType::None:
|
||||||
default:
|
default: {
|
||||||
return v8::Undefined(isolate);
|
return v8::Undefined(isolate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
curl -X POST http://localhost:4001/_api/agency/read -d '[["/"]]' | jq .
|
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ ! -d arangod ] || [ ! -d arangosh ] || [ ! -d UnitTests ] ; then
|
||||||
|
echo Must be started in the main ArangoDB source directory.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf cluster
|
||||||
|
mkdir cluster
|
||||||
|
echo Starting agency...
|
||||||
|
build/bin/arangod -c etc/relative/arangod.conf \
|
||||||
|
--agency.size 1 \
|
||||||
|
--server.endpoint tcp://127.0.0.1:4001 \
|
||||||
|
--agency.endpoint tcp://127.0.0.1:4001 \
|
||||||
|
--agency.wait-for-sync false \
|
||||||
|
--database.directory cluster/data4001 \
|
||||||
|
--agency.id 0 \
|
||||||
|
--log.file cluster/4001.log \
|
||||||
|
--log.requests-file cluster/4001.req \
|
||||||
|
--server.disable-statistics true \
|
||||||
|
--server.foxx-queues false \
|
||||||
|
--server.disable-authentication true \
|
||||||
|
--javascript.app-path ./js/apps \
|
||||||
|
--javascript.startup-directory ./js \
|
||||||
|
> cluster/4001.stdout 2>&1 &
|
||||||
|
|
||||||
|
testServer() {
|
||||||
|
PORT=$1
|
||||||
|
while true ; do
|
||||||
|
sleep 1
|
||||||
|
curl -s -f -X GET "http://127.0.0.1:$PORT/_api/version" > /dev/null 2>&1
|
||||||
|
if [ "$?" != "0" ] ; then
|
||||||
|
echo Server on port $PORT does not answer yet.
|
||||||
|
else
|
||||||
|
echo Server on port $PORT is ready for business.
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
testServer 4001
|
||||||
|
|
||||||
|
echo Done, your agency is ready at
|
||||||
|
echo " build/bin/arangosh --server.endpoint tcp://127.0.0.1:4001"
|
||||||
|
|
|
@ -44,11 +44,13 @@ build/bin/arangod -c etc/relative/arangod.conf \
|
||||||
--agency.wait-for-sync false \
|
--agency.wait-for-sync false \
|
||||||
--database.directory cluster/data4001 \
|
--database.directory cluster/data4001 \
|
||||||
--agency.id 0 \
|
--agency.id 0 \
|
||||||
|
--javascript.v8-contexts 1 \
|
||||||
--log.file cluster/4001.log \
|
--log.file cluster/4001.log \
|
||||||
--log.requests-file cluster/4001.req \
|
--log.requests-file cluster/4001.req \
|
||||||
--server.disable-statistics true \
|
--server.disable-statistics true \
|
||||||
--server.foxx-queues false \
|
--server.foxx-queues false \
|
||||||
--server.disable-authentication true \
|
--server.disable-authentication true \
|
||||||
|
--server.threads 16 \
|
||||||
--javascript.app-path ./js/apps \
|
--javascript.app-path ./js/apps \
|
||||||
--javascript.startup-directory ./js \
|
--javascript.startup-directory ./js \
|
||||||
> cluster/4001.stdout 2>&1 &
|
> cluster/4001.stdout 2>&1 &
|
||||||
|
@ -247,12 +249,21 @@ if [ -n "$SECONDARIES" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Bootstrapping DBServers...
|
echo Bootstrapping DBServers...
|
||||||
curl -s -X POST "http://127.0.0.1:8530/_admin/cluster/bootstrapDbServers" \
|
curl -s -f -X POST "http://127.0.0.1:8530/_admin/cluster/bootstrapDbServers" \
|
||||||
-d '{"isRelaunch":false}' >> cluster/DBServersUpgrade.log 2>&1
|
-d '{"isRelaunch":false}' >> cluster/DBServersUpgrade.log 2>&1
|
||||||
|
if [ "$?" != 0 ] ; then
|
||||||
|
echo "Bootstrapping DBServers failed"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo Running DB upgrade on cluster...
|
echo Running DB upgrade on cluster...
|
||||||
curl -s -X POST "http://127.0.0.1:8530/_admin/cluster/upgradeClusterDatabase" \
|
curl -s -f -X POST "http://127.0.0.1:8530/_admin/cluster/upgradeClusterDatabase" \
|
||||||
-d '{"isRelaunch":false}' >> cluster/DBUpgrade.log 2>&1
|
-d '{"isRelaunch":false}' >> cluster/DBUpgrade.log 2>&1
|
||||||
|
if [ "$?" != 0 ] ; then
|
||||||
|
echo "DB upgrade on cluster failed"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
echo Bootstrapping Coordinators...
|
echo Bootstrapping Coordinators...
|
||||||
PIDS=""
|
PIDS=""
|
||||||
|
|
|
@ -14,11 +14,7 @@ if [ "x$@" == "x" ] ; then
|
||||||
`find ./js/common/tests -name "*.js"` \
|
`find ./js/common/tests -name "*.js"` \
|
||||||
`find ./js/client/tests -name "*.js"` \
|
`find ./js/client/tests -name "*.js"` \
|
||||||
\
|
\
|
||||||
`find ./js/apps/system/_system/cerberus/APP -name "*.js"` \
|
|
||||||
`find ./js/apps/system/_api/gharial/APP -name "*.js"` \
|
`find ./js/apps/system/_api/gharial/APP -name "*.js"` \
|
||||||
`find ./js/apps/system/_system/sessions/APP -name "*.js"` \
|
|
||||||
`find ./js/apps/system/_system/simple-auth/APP -name "*.js"` \
|
|
||||||
`find ./js/apps/system/_system/users/APP -name "*.js"` \
|
|
||||||
\
|
\
|
||||||
`find ./js/apps/system/_admin/aardvark/APP/frontend/js/models -name "*.js"` \
|
`find ./js/apps/system/_admin/aardvark/APP/frontend/js/models -name "*.js"` \
|
||||||
`find ./js/apps/system/_admin/aardvark/APP/frontend/js/views -name "*.js"` \
|
`find ./js/apps/system/_admin/aardvark/APP/frontend/js/views -name "*.js"` \
|
||||||
|
|
Loading…
Reference in New Issue