diff --git a/CHANGELOG b/CHANGELOG index a9f0e58c3e..9c1d23e78a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,31 @@ v3.5.1 (XXXX-XX-XX) ------------------- +* Added startup option `--cluster.max-number-of-shards` for restricting the + maximum number of shards when creating new collections. The default + value for this setting is `1000`, which is also the previously hard-coded + built-in limit. A value of `0` for this option means "unrestricted". + When the setting is adjusted, it will not affect already existing + collections, but only collections that are created or restored + afterwards. + +* Added startup options for managing the replication factor for newly + created collections: + + - `--cluster.min-replication-factor`: this settings controls the minimum + replication factor value that is permitted when creating new collections. + No collections can be created which have a replication factor value + below this setting's value. The default value is 1. + - `--cluster.max-replication-factor`: this settings controls the maximum + replication factor value that is permitted when creating new collections. + No collections can be created which have a replication factor value + above this setting's value. The default value is 10. + - `--cluster.default-replication-factor`: this settings controls the default + replication factor value that is used when creating new collections and + no value of replication factor has been specified. + If no value is set for this option, the value of the option + `--cluster.min-replication-factor` will be used. + * Fixed unintended multiple unlock commands from coordinator to transaction locked db servers. diff --git a/arangod/Cluster/ClusterFeature.cpp b/arangod/Cluster/ClusterFeature.cpp index 8fad62843f..6f15f3c337 100644 --- a/arangod/Cluster/ClusterFeature.cpp +++ b/arangod/Cluster/ClusterFeature.cpp @@ -124,10 +124,22 @@ void ClusterFeature::collectOptions(std::shared_ptr options) { "this server's advertised endpoint (e.g. external IP " "address or load balancer, optional)", new StringParameter(&_myAdvertisedEndpoint)); + + options->addOption("--cluster.default-replication-factor", + "default replication factor for new collections", + new UInt32Parameter(&_defaultReplicationFactor)).setIntroducedIn(30501); options->addOption("--cluster.system-replication-factor", "replication factor for system collections", new UInt32Parameter(&_systemReplicationFactor)); + + options->addOption("--cluster.min-replication-factor", + "minimum replication factor for new collections", + new UInt32Parameter(&_minReplicationFactor)).setIntroducedIn(30501); + + options->addOption("--cluster.max-replication-factor", + "maximum replication factor for new collections (0 = unrestricted)", + new UInt32Parameter(&_maxReplicationFactor)).setIntroducedIn(30501); options->addOption( "--cluster.create-waits-for-sync-replication", @@ -135,6 +147,10 @@ void ClusterFeature::collectOptions(std::shared_ptr options) { new BooleanParameter(&_createWaitsForSyncReplication), arangodb::options::makeFlags(arangodb::options::Flags::Hidden)); + options->addOption("--cluster.max-number-of-shards", + "maximum number of shards when creating new collections (0 = unrestricted)", + new UInt32Parameter(&_maxNumberOfShards)).setIntroducedIn(30501); + options->addOption( "--cluster.index-create-timeout", "amount of time (in seconds) the coordinator will wait for an index to " @@ -155,6 +171,49 @@ void ClusterFeature::validateOptions(std::shared_ptr options) { << "details."; FATAL_ERROR_EXIT(); } + + if (_minReplicationFactor == 0) { + // min replication factor must not be 0 + LOG_TOPIC("2fbdd", FATAL, arangodb::Logger::CLUSTER) + << "Invalid value for `--cluster.min-replication-factor`. The value must be at least 1"; + FATAL_ERROR_EXIT(); + } + + if (_maxReplicationFactor > 10) { + // 10 is a hard-coded limit for the replication factor + LOG_TOPIC("886c6", FATAL, arangodb::Logger::CLUSTER) + << "Invalid value for `--cluster.max-replication-factor`. The value must not exceed 10"; + FATAL_ERROR_EXIT(); + } + + TRI_ASSERT(_minReplicationFactor > 0); + if (!options->processingResult().touched("cluster.default-replication-factor")) { + // no default replication factor set. now use the minimum value, which is + // guaranteed to be at least 1 + _defaultReplicationFactor = _minReplicationFactor; + } + + if (_defaultReplicationFactor == 0) { + // default replication factor must not be 0 + LOG_TOPIC("fc8a9", FATAL, arangodb::Logger::CLUSTER) + << "Invalid value for `--cluster.default-replication-factor`. The value must be at least 1"; + FATAL_ERROR_EXIT(); + } + + if (_defaultReplicationFactor > 0 && + _maxReplicationFactor > 0 && + _defaultReplicationFactor > _maxReplicationFactor) { + LOG_TOPIC("6cf0c", FATAL, arangodb::Logger::CLUSTER) + << "Invalid value for `--cluster.default-replication-factor`. Must not be higher than `--cluster.max-replication-factor`"; + FATAL_ERROR_EXIT(); + } + + if (_defaultReplicationFactor > 0 && + _defaultReplicationFactor < _minReplicationFactor) { + LOG_TOPIC("b9aea", FATAL, arangodb::Logger::CLUSTER) + << "Invalid value for `--cluster.default-replication-factor`. Must not be lower than `--cluster.min-replication-factor`"; + FATAL_ERROR_EXIT(); + } // check if the cluster is enabled _enableCluster = !_agencyEndpoints.empty(); diff --git a/arangod/Cluster/ClusterFeature.h b/arangod/Cluster/ClusterFeature.h index ec304b0b42..667257c34c 100644 --- a/arangod/Cluster/ClusterFeature.h +++ b/arangod/Cluster/ClusterFeature.h @@ -66,7 +66,11 @@ class ClusterFeature : public application_features::ApplicationFeature { std::string _myRole; std::string _myEndpoint; std::string _myAdvertisedEndpoint; - uint32_t _systemReplicationFactor = 2; + std::uint32_t _defaultReplicationFactor = 0; // a value of 0 means it will use the min replication factor + std::uint32_t _systemReplicationFactor = 2; + std::uint32_t _minReplicationFactor = 1; + std::uint32_t _maxReplicationFactor = 10; // maximum replication factor (0 = unrestricted) + std::uint32_t _maxNumberOfShards = 1000; // maximum number of shards (0 = unrestricted) bool _createWaitsForSyncReplication = true; double _indexCreationTimeout = 3600.0; @@ -88,7 +92,11 @@ class ClusterFeature : public application_features::ApplicationFeature { return _createWaitsForSyncReplication; }; double indexCreationTimeout() const { return _indexCreationTimeout; } - uint32_t systemReplicationFactor() { return _systemReplicationFactor; }; + uint32_t defaultReplicationFactor() { return _defaultReplicationFactor; } + uint32_t systemReplicationFactor() { return _systemReplicationFactor; } + std::uint32_t maxNumberOfShards() const { return _maxNumberOfShards; } + std::uint32_t minReplicationFactor() const { return _minReplicationFactor; } + std::uint32_t maxReplicationFactor() const { return _maxReplicationFactor; } void stop() override final; diff --git a/arangod/RestHandler/RestReplicationHandler.cpp b/arangod/RestHandler/RestReplicationHandler.cpp index 13bafda3ad..8c346212e8 100644 --- a/arangod/RestHandler/RestReplicationHandler.cpp +++ b/arangod/RestHandler/RestReplicationHandler.cpp @@ -49,6 +49,7 @@ #include "RestServer/DatabaseFeature.h" #include "RestServer/QueryRegistryFeature.h" #include "RestServer/ServerIdFeature.h" +#include "Sharding/ShardingInfo.h" #include "StorageEngine/EngineSelectorFeature.h" #include "StorageEngine/PhysicalCollection.h" #include "StorageEngine/StorageEngine.h" @@ -1090,6 +1091,11 @@ Result RestReplicationHandler::processRestoreCollectionCoordinator( return Result(); } + Result res = ShardingInfo::validateShardsAndReplicationFactor(parameters); + if (res.fail()) { + return res; + } + auto& dbName = _vocbase.name(); ClusterInfo* ci = ClusterInfo::instance(); @@ -1185,7 +1191,10 @@ Result RestReplicationHandler::processRestoreCollectionCoordinator( if (!isValidReplFactorSlice) { if (replicationFactor == 0) { - replicationFactor = 1; + replicationFactor = application_features::ApplicationServer::getFeature("Cluster")->defaultReplicationFactor(); + if (replicationFactor == 0) { + replicationFactor = 1; + } } TRI_ASSERT(replicationFactor > 0); toMerge.add(StaticStrings::ReplicationFactor, VPackValue(replicationFactor)); diff --git a/arangod/Sharding/ShardingInfo.cpp b/arangod/Sharding/ShardingInfo.cpp index 1d8aaffb70..2c8e3184e7 100644 --- a/arangod/Sharding/ShardingInfo.cpp +++ b/arangod/Sharding/ShardingInfo.cpp @@ -26,6 +26,7 @@ #include "Basics/Exceptions.h" #include "Basics/StaticStrings.h" #include "Basics/VelocyPackHelper.h" +#include "Cluster/ClusterFeature.h" #include "Cluster/ServerState.h" #include "Logger/Logger.h" #include "Sharding/ShardingFeature.h" @@ -61,10 +62,18 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection* VPackSlice shardKeysSlice = info.get(StaticStrings::ShardKeys); if (ServerState::instance()->isCoordinator()) { - if ((_numberOfShards == 0 && !isSmart) || _numberOfShards > 1000) { + if (_numberOfShards == 0 && !isSmart) { THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, "invalid number of shards"); } + // intentionally no call to validateNumberOfShards here, + // because this constructor is called from the constructor of + // LogicalCollection, and we want LogicalCollection to be created + // with any configured number of shards in case the maximum allowed + // number of shards is set or decreased in a cluster with already + // existing collections that would violate the setting. + // so we validate the number of shards against the maximum only + // when a collection is created by a user, and on a restore } VPackSlice distributeShardsLike = info.get(StaticStrings::DistributeShardsLike); @@ -88,7 +97,7 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection* _avoidServers.push_back(i.copyString()); } else { LOG_TOPIC("e5bc6", ERR, arangodb::Logger::FIXME) - << "avoidServers must be a vector of strings we got " + << "avoidServers must be a vector of strings, we got " << avoidServersSlice.toJson() << ". discarding!"; _avoidServers.clear(); break; @@ -97,13 +106,14 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection* } } + bool isSatellite = false; auto replicationFactorSlice = info.get(StaticStrings::ReplicationFactor); if (!replicationFactorSlice.isNone()) { bool isError = true; if (replicationFactorSlice.isNumber()) { _replicationFactor = replicationFactorSlice.getNumber(); // mop: only allow satellite collections to be created explicitly - if (_replicationFactor > 0 && _replicationFactor <= 10) { + if (_replicationFactor > 0) { isError = false; #ifdef USE_ENTERPRISE } else if (_replicationFactor == 0) { @@ -120,6 +130,7 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection* _distributeShardsLike = ""; _avoidServers.clear(); isError = false; + isSatellite = true; } #endif if (isError) { @@ -128,25 +139,27 @@ ShardingInfo::ShardingInfo(arangodb::velocypack::Slice info, LogicalCollection* } } - auto minReplicationFactorSlice = info.get(StaticStrings::MinReplicationFactor); - if (!minReplicationFactorSlice.isNone()) { - if (minReplicationFactorSlice.isNumber()) { - _minReplicationFactor = minReplicationFactorSlice.getNumber(); - if (_minReplicationFactor > _replicationFactor) { + if (!isSatellite) { + auto minReplicationFactorSlice = info.get(StaticStrings::MinReplicationFactor); + if (!minReplicationFactorSlice.isNone()) { + if (minReplicationFactorSlice.isNumber()) { + _minReplicationFactor = minReplicationFactorSlice.getNumber(); + if (_minReplicationFactor > _replicationFactor) { + THROW_ARANGO_EXCEPTION_MESSAGE( + TRI_ERROR_BAD_PARAMETER, + "minReplicationFactor cannot be larger than replicationFactor (" + + basics::StringUtils::itoa(_minReplicationFactor) + " > " + + basics::StringUtils::itoa(_replicationFactor) + ")"); + } + if (_minReplicationFactor == 0 && _replicationFactor != 0) { + THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, + "minReplicationFactor cannot be 0"); + } + } else { THROW_ARANGO_EXCEPTION_MESSAGE( TRI_ERROR_BAD_PARAMETER, - "minReplicationFactor cannot be larger then replicationFactor (" + - basics::StringUtils::itoa(_minReplicationFactor) + " > " + - basics::StringUtils::itoa(_replicationFactor) + ")"); + "minReplicationFactor needs to be an integer number"); } - if (_minReplicationFactor == 0 && _replicationFactor != 0) { - THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, - "minReplicationFactor cannot be 0"); - } - } else { - THROW_ARANGO_EXCEPTION_MESSAGE( - TRI_ERROR_BAD_PARAMETER, - "minReplicationFactor needs to be an integer number"); } } @@ -363,7 +376,7 @@ void ShardingInfo::replicationFactor(size_t replicationFactor) { if (replicationFactor < _minReplicationFactor) { THROW_ARANGO_EXCEPTION_MESSAGE( TRI_ERROR_BAD_PARAMETER, - "replicationFactor cannot be smaller then minReplicationFactor (" + + "replicationFactor cannot be smaller than minReplicationFactor (" + basics::StringUtils::itoa(_replicationFactor) + " < " + basics::StringUtils::itoa(_minReplicationFactor) + ")"); } @@ -379,7 +392,7 @@ void ShardingInfo::minReplicationFactor(size_t minReplicationFactor) { if (minReplicationFactor > _replicationFactor) { THROW_ARANGO_EXCEPTION_MESSAGE( TRI_ERROR_BAD_PARAMETER, - "minReplicationFactor cannot be larger then replicationFactor (" + + "minReplicationFactor cannot be larger than replicationFactor (" + basics::StringUtils::itoa(_minReplicationFactor) + " > " + basics::StringUtils::itoa(_replicationFactor) + ")"); } @@ -390,7 +403,7 @@ void ShardingInfo::setMinAndMaxReplicationFactor(size_t minimal, size_t maximal) if (minimal > maximal) { THROW_ARANGO_EXCEPTION_MESSAGE( TRI_ERROR_BAD_PARAMETER, - "minReplicationFactor cannot be larger then replicationFactor (" + + "minReplicationFactor cannot be larger than replicationFactor (" + basics::StringUtils::itoa(minimal) + " > " + basics::StringUtils::itoa(maximal) + ")"); } @@ -459,3 +472,45 @@ int ShardingInfo::getResponsibleShard(arangodb::velocypack::Slice slice, bool do return _shardingStrategy->getResponsibleShard(slice, docComplete, shardID, usesDefaultShardKeys, key); } + +Result ShardingInfo::validateShardsAndReplicationFactor(arangodb::velocypack::Slice slice) { + Result res; + + auto const* cl = application_features::ApplicationServer::getFeature("Cluster"); + + auto numberOfShardsSlice = slice.get(StaticStrings::NumberOfShards); + if (numberOfShardsSlice.isNumber()) { + uint32_t const maxNumberOfShards = cl->maxNumberOfShards(); + uint32_t numberOfShards = numberOfShardsSlice.getNumber(); + if (maxNumberOfShards > 0 && + numberOfShards > maxNumberOfShards) { + res.reset(TRI_ERROR_CLUSTER_TOO_MANY_SHARDS, + std::string("too many shards. maximum number of shards is ") + std::to_string(maxNumberOfShards)); + } + } + + auto replicationFactorSlice = slice.get(StaticStrings::ReplicationFactor); + if (replicationFactorSlice.isNumber()) { + uint32_t const minReplicationFactor = cl->minReplicationFactor(); + uint32_t const maxReplicationFactor = cl->maxReplicationFactor(); + + int64_t replicationFactorProbe = replicationFactorSlice.getNumber(); + if (replicationFactorProbe <= 0) { + res.reset(TRI_ERROR_BAD_PARAMETER, "invalid value for replicationFactor"); + } else { + uint32_t replicationFactor = replicationFactorSlice.getNumber(); + + if (replicationFactor > maxReplicationFactor && + maxReplicationFactor > 0) { + res.reset(TRI_ERROR_BAD_PARAMETER, + std::string("replicationFactor must not be higher than maximum allowed replicationFactor (") + std::to_string(maxReplicationFactor) + ")"); + } else if (replicationFactor < minReplicationFactor && + minReplicationFactor > 0) { + res.reset(TRI_ERROR_BAD_PARAMETER, + std::string("replicationFactor must not be lower than minimum allowed replicationFactor (") + std::to_string(minReplicationFactor) + ")"); + } + } + } + + return res; +} diff --git a/arangod/Sharding/ShardingInfo.h b/arangod/Sharding/ShardingInfo.h index 8b7d1390b8..bc4b957c5b 100644 --- a/arangod/Sharding/ShardingInfo.h +++ b/arangod/Sharding/ShardingInfo.h @@ -24,6 +24,8 @@ #ifndef ARANGOD_CLUSTER_SHARDING_INFO_H #define ARANGOD_CLUSTER_SHARDING_INFO_H 1 +#include "Basics/Result.h" + #include #include #include @@ -75,6 +77,10 @@ class ShardingInfo { /// in its constructor, after the shardingInfo has been set up already void numberOfShards(size_t numberOfShards); + /// @brief validates the number of shards and the replication factor + /// in slice against the minimum and maximum configured values + static Result validateShardsAndReplicationFactor(arangodb::velocypack::Slice slice); + bool usesDefaultShardKeys() const; std::vector const& shardKeys() const; diff --git a/arangod/V8Server/v8-vocbase.cpp b/arangod/V8Server/v8-vocbase.cpp index 37d3570900..3ffaba22b7 100644 --- a/arangod/V8Server/v8-vocbase.cpp +++ b/arangod/V8Server/v8-vocbase.cpp @@ -50,6 +50,7 @@ #include "Basics/Utf8Helper.h" #include "Basics/conversions.h" #include "Basics/tri-strings.h" +#include "Cluster/ClusterFeature.h" #include "Cluster/ClusterInfo.h" #include "Cluster/ServerState.h" #include "GeneralServer/AuthenticationFeature.h" @@ -2065,6 +2066,36 @@ void TRI_InitV8VocBridge(v8::Isolate* isolate, v8::Handle context, v8::Boolean::New(isolate, StatisticsFeature::enabled())) .FromMaybe(false); // ignore result //, v8::ReadOnly); + + // replication factors + context->Global() + ->DefineOwnProperty(TRI_IGETC, + TRI_V8_ASCII_STRING(isolate, "DEFAULT_REPLICATION_FACTOR"), + v8::Number::New(isolate, + application_features::ApplicationServer::getFeature("Cluster")->defaultReplicationFactor()), v8::ReadOnly) + .FromMaybe(false); // ignore result + + context->Global() + ->DefineOwnProperty(TRI_IGETC, + TRI_V8_ASCII_STRING(isolate, "MIN_REPLICATION_FACTOR"), + v8::Number::New(isolate, + application_features::ApplicationServer::getFeature("Cluster")->minReplicationFactor()), v8::ReadOnly) + .FromMaybe(false); // ignore result + + context->Global() + ->DefineOwnProperty(TRI_IGETC, + TRI_V8_ASCII_STRING(isolate, "MAX_REPLICATION_FACTOR"), + v8::Number::New(isolate, + application_features::ApplicationServer::getFeature("Cluster")->maxReplicationFactor()), v8::ReadOnly) + .FromMaybe(false); // ignore result + + // max number of shards + context->Global() + ->DefineOwnProperty(TRI_IGETC, + TRI_V8_ASCII_STRING(isolate, "MAX_NUMBER_OF_SHARDS"), + v8::Number::New(isolate, + application_features::ApplicationServer::getFeature("Cluster")->maxNumberOfShards()), v8::ReadOnly) + .FromMaybe(false); // ignore result // a thread-global variable that will is supposed to contain the AQL module // do not remove this, otherwise AQL queries will break diff --git a/arangod/VocBase/Methods/Collections.cpp b/arangod/VocBase/Methods/Collections.cpp index 0db56b20d6..b9c2646115 100644 --- a/arangod/VocBase/Methods/Collections.cpp +++ b/arangod/VocBase/Methods/Collections.cpp @@ -40,6 +40,7 @@ #include "Scheduler/Scheduler.h" #include "Scheduler/SchedulerFeature.h" #include "Sharding/ShardingFeature.h" +#include "Sharding/ShardingInfo.h" #include "StorageEngine/PhysicalCollection.h" #include "Transaction/V8Context.h" #include "Utils/Events.h" @@ -259,6 +260,13 @@ Result Collections::create(TRI_vocbase_t& vocbase, builder.openArray(); for (auto const& info : infos) { TRI_ASSERT(builder.isOpenArray()); + + if (ServerState::instance()->isCoordinator()) { + Result res = ShardingInfo::validateShardsAndReplicationFactor(info.properties); + if (res.fail()) { + return res; + } + } if (info.name.empty()) { events::CreateCollection(vocbase.name(), info.name, TRI_ERROR_ARANGO_ILLEGAL_NAME); @@ -275,6 +283,16 @@ Result Collections::create(TRI_vocbase_t& vocbase, arangodb::velocypack::Value(static_cast(info.collectionType))); helper.add(arangodb::StaticStrings::DataSourceName, arangodb::velocypack::Value(info.name)); + + if (ServerState::instance()->isCoordinator()) { + // patch default replicationFactor into the data + VPackSlice replicationFactorSlice = info.properties.get(arangodb::StaticStrings::ReplicationFactor); + if (replicationFactorSlice.isNone()) { + helper.add(arangodb::StaticStrings::ReplicationFactor, + VPackValue(application_features::ApplicationServer::getFeature("Cluster")->defaultReplicationFactor())); + } + } + helper.close(); VPackBuilder merged = VPackCollection::merge(info.properties, helper.slice(), false, true); @@ -566,6 +584,11 @@ Result Collections::updateProperties(LogicalCollection& collection, auto info = ci->getCollection(collection.vocbase().name(), std::to_string(collection.id())); + Result res = ShardingInfo::validateShardsAndReplicationFactor(props); + if (res.fail()) { + return res; + } + return info->properties(props, partialUpdate); } else { auto ctx = transaction::V8Context::CreateWhenRequired(collection.vocbase(), false); diff --git a/js/apps/system/_admin/aardvark/APP/aardvark.js b/js/apps/system/_admin/aardvark/APP/aardvark.js index 64200313b9..20a75ed87b 100644 --- a/js/apps/system/_admin/aardvark/APP/aardvark.js +++ b/js/apps/system/_admin/aardvark/APP/aardvark.js @@ -90,7 +90,11 @@ router.get('/config.js', function (req, res) { engine: db._engine().name, statisticsEnabled: internal.enabledStatistics(), foxxStoreEnabled: !internal.isFoxxStoreDisabled(), - foxxApiEnabled: !internal.isFoxxApiDisabled() + foxxApiEnabled: !internal.isFoxxApiDisabled(), + minReplicationFactor: internal.minReplicationFactor, + maxReplicationFactor: internal.maxReplicationFactor, + defaultReplicationFactor: internal.defaultReplicationFactor, + maxNumberOfShards: internal.maxNumberOfShards })}` ); }) diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js index 973a8300bf..a6045fe2d6 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js @@ -1 +1 @@ -!function(){"use strict";var i=null;window.isCoordinator=function(t){null===i?$.ajax("cluster/amICoordinator",{async:!0,success:function(e){t(!1,i=e)},error:function(e){t(!0,i=e)}}):t(!1,i)},window.versionHelper={fromString:function(e){var t=e.replace(/-[a-zA-Z0-9_-]*$/g,"").split(".");return{major:parseInt(t[0],10)||0,minor:parseInt(t[1],10)||0,patch:parseInt(t[2],10)||0,toString:function(){return this.major+"."+this.minor+"."+this.patch}}},toString:function(e){return e.major+"."+e.minor+"."+e.patch},toDocuVersion:function(e){return 0<=e.toLowerCase().indexOf("devel")||0<=e.toLowerCase().indexOf("rc")?"devel":e.substring(0,3)}},window.arangoHelper={alphabetColors:{a:"rgb(0,0,180)",b:"rgb(175,13,102)",c:"rgb(146,248,70)",d:"rgb(255,200,47)",e:"rgb(255,118,0)",f:"rgb(185,185,185)",g:"rgb(235,235,222)",h:"rgb(100,100,100)",i:"rgb(255,255,0)",j:"rgb(55,19,112)",k:"rgb(255,255,150)",l:"rgb(202,62,94)",m:"rgb(205,145,63)",n:"rgb(12,75,100)",o:"rgb(255,0,0)",p:"rgb(175,155,50)",q:"rgb(0,0,0)",r:"rgb(37,70,25)",s:"rgb(121,33,135)",t:"rgb(83,140,208)",u:"rgb(0,154,37)",v:"rgb(178,220,205)",w:"rgb(255,152,213)",x:"rgb(0,0,74)",y:"rgb(175,200,74)",z:"rgb(63,25,12)"},statusColors:{fatal:"#ad5148",info:"rgb(88, 214, 141)",error:"rgb(236, 112, 99)",warning:"#ffb075",debug:"rgb(64, 74, 83)"},getCurrentJwt:function(){return sessionStorage.getItem("jwt")},getCurrentJwtUsername:function(){return sessionStorage.getItem("jwtUser")},setCurrentJwt:function(e,t){sessionStorage.setItem("jwt",e),sessionStorage.setItem("jwtUser",t)},checkJwt:function(){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,error:function(e){401===e.status&&window.App.navigate("login",{trigger:!0})}})},getCoordinatorShortName:function(i){var n;return window.clusterHealth&&_.each(window.clusterHealth,function(e,t){i===t&&(n=e.ShortName)}),arangoHelper.escapeHtml(n)},getDatabaseShortName:function(e){return this.getCoordinatorShortName(e)},getDatabaseServerId:function(i){var n;return window.clusterHealth&&_.each(window.clusterHealth,function(e,t){i===e.ShortName&&(n=t)}),n},lastNotificationMessage:null,CollectionTypes:{},systemAttributes:function(){return{_id:!0,_rev:!0,_key:!0,_bidirectional:!0,_vertices:!0,_from:!0,_to:!0,$id:!0}},getCurrentSub:function(){return window.App.naviView.activeSubMenu},parseError:function(e,t){var i;try{i=JSON.parse(t.responseText).errorMessage}catch(e){i=e}this.arangoError(e,i)},setCheckboxStatus:function(e){_.each($(e).find("ul").find("li"),function(e){$(e).hasClass("nav-header")||($(e).find("input").attr("checked")?$(e).find("i").hasClass("css-round-label")?($(e).find("i").removeClass("fa-circle-o"),$(e).find("i").addClass("fa-dot-circle-o")):($(e).find("i").removeClass("fa-square-o"),$(e).find("i").addClass("fa-check-square-o")):$(e).find("i").hasClass("css-round-label")?($(e).find("i").removeClass("fa-dot-circle-o"),$(e).find("i").addClass("fa-circle-o")):($(e).find("i").removeClass("fa-check-square-o"),$(e).find("i").addClass("fa-square-o")))})},parseInput:function(e){var t,i=$(e).val();try{t=JSON.parse(i)}catch(e){t=i}return t},calculateCenterDivHeight:function(){var e=$(".navbar").height(),t=$(".footer").height();return $(window).height()-t-e-110},createTooltips:function(e,t){var i=this,n={arrow:!0,multiple:!1,content:function(e){var t=e.getAttribute("title");return e.removeAttribute("title"),t}};if(t&&(n.placement=t),"object"==typeof(e=e||".tippy"))_.each(e,function(e){i.lastTooltips=new tippy(e,n)});else{if(-1'+t+""),e.disabled||$("#subNavigationBar .bottom").children().last().bind("click",function(){window.App.navigate(e.route,{trigger:!0})})})},buildUserSubNav:function(e,t){var i={General:{route:"#user/"+encodeURIComponent(e)},Permissions:{route:"#user/"+encodeURIComponent(e)+"/permission"}};i[t].active=!0,this.buildSubNavBar(i)},buildGraphSubNav:function(e,t){var i={Content:{route:"#graph/"+encodeURIComponent(e)},Settings:{route:"#graph/"+encodeURIComponent(e)+"/settings"}};i[t].active=!0,this.buildSubNavBar(i)},buildNodeSubNav:function(e,t,i){var n={Dashboard:{route:"#node/"+encodeURIComponent(e)}};n[t].active=!0,n[i].disabled=!0,this.buildSubNavBar(n)},buildNodesSubNav:function(e,t){var i={Overview:{route:"#nodes"},Shards:{route:"#shards"}};i[e].active=!0,t&&(i[t].disabled=!0),this.buildSubNavBar(i)},buildServicesSubNav:function(e,t){var i={Store:{route:"#services/install"},Upload:{route:"#services/install/upload"},New:{route:"#services/install/new"},GitHub:{route:"#services/install/github"},Remote:{route:"#services/install/remote"}};frontendConfig.foxxStoreEnabled||delete i.Store,i[e].active=!0,t&&(i[t].disabled=!0),this.buildSubNavBar(i)},scaleability:void 0,buildCollectionSubNav:function(e,t){var i={Content:{route:"#collection/"+encodeURIComponent(e)+"/documents/1"},Indexes:{route:"#cIndices/"+encodeURIComponent(e)},Info:{route:"#cInfo/"+encodeURIComponent(e)},Settings:{route:"#cSettings/"+encodeURIComponent(e)}};i[t].active=!0,this.buildSubNavBar(i)},enableKeyboardHotkeys:function(e){var t=window.arangoHelper.hotkeysFunctions;!0===e&&($(document).on("keydown",null,"j",t.scrollDown),$(document).on("keydown",null,"k",t.scrollUp))},databaseAllowed:function(i){var e=function(e,t){e?arangoHelper.arangoError("",""):$.ajax({type:"GET",cache:!1,url:this.databaseUrl("/_api/database/",t),contentType:"application/json",processData:!1,success:function(){i(!1,!0)},error:function(){i(!0,!1)}})}.bind(this);this.currentDatabase(e)},arangoNotification:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"success"})},arangoError:function(e,t,i){$("#offlinePlaceholder").is(":visible")||window.App.notificationList.add({title:e,content:t,info:i,type:"error"})},arangoWarning:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"warning"})},arangoMessage:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"message"})},hideArangoNotifications:function(){$.noty.clearQueue(),$.noty.closeAll()},openDocEditor:function(e,t,i){var n=e.split("/"),o=this,a=new window.DocumentView({collection:window.App.arangoDocumentStore});a.breadcrumb=function(){},a.colid=n[0],a.docid=n[1],a.el=".arangoFrame .innerDiv",a.render(),a.setType(t),$(".arangoFrame .headerBar").remove(),$(".arangoFrame .outerDiv").prepend(''),$(".arangoFrame .outerDiv").click(function(){o.closeDocEditor()}),$(".arangoFrame .innerDiv").click(function(e){e.stopPropagation()}),$(".fa-times").click(function(){o.closeDocEditor()}),$(".arangoFrame").show(),a.customView=!0,a.customDeleteFunction=function(){window.modalView.hide(),$(".arangoFrame").hide()},a.customSaveFunction=function(e){o.closeDocEditor(),i&&i(e)},$(".arangoFrame #deleteDocumentButton").click(function(){a.deleteDocumentModal()}),$(".arangoFrame #saveDocumentButton").click(function(){a.saveDocument()}),$(".arangoFrame #deleteDocumentButton").css("display","none")},closeDocEditor:function(){$(".arangoFrame .outerDiv .fa-times").remove(),$(".arangoFrame").hide()},addAardvarkJob:function(e,t){$.ajax({cache:!1,type:"POST",url:this.databaseUrl("/_admin/aardvark/job"),data:JSON.stringify(e),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},deleteAardvarkJob:function(e,t){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job/"+encodeURIComponent(e)),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},deleteAllAardvarkJobs:function(t){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},getAardvarkJobs:function(t){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},getPendingJobs:function(t){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_api/job/pending"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(e){t(!0,e)}})},syncAndReturnUnfinishedAardvarkJobs:function(a,r){var e=function(e,t){if(e)r(!0);else{var i=function(e,n){if(e)arangoHelper.arangoError("","");else{var o=[];0/g,">").replace(/"/g,""").replace(/'/g,"'")},backendUrl:function(e){return frontendConfig.basePath+e},databaseUrl:function(e,t){if("/_db/"===e.substr(0,5))throw new Error("Calling databaseUrl with a databased url ("+e+") doesn't make any sense");return t||(t="_system",frontendConfig.db&&(t=frontendConfig.db)),this.backendUrl("/_db/"+encodeURIComponent(t)+e)},showAuthDialog:function(){var e=!0;return"false"===localStorage.getItem("authenticationNotification")&&(e=!1),e},doNotShowAgain:function(){localStorage.setItem("authenticationNotification",!1)},renderEmpty:function(e,t){t?$("#content").html(''):$("#content").html('")},initSigma:function(){try{sigma.classes.graph.addMethod("neighbors",function(e){var t,i={},n=this.allNeighborsIndex[e]||{};for(t in n)i[t]=this.nodesIndex[t];return i}),sigma.classes.graph.addMethod("getNodeEdges",function(t){var e=this.edges(),i=[];return _.each(e,function(e){e.source!==t&&e.target!==t||i.push(e.id)}),i}),sigma.classes.graph.addMethod("getNodeEdgesCount",function(e){return this.allNeighborsCount[e]}),sigma.classes.graph.addMethod("getNodesCount",function(){return this.nodesArray.length})}catch(e){}},downloadLocalBlob:function(e,t){var i;if("csv"===t&&(i="text/csv; charset=utf-8"),"json"===t&&(i="application/json; charset=utf-8"),i){var n=new Blob([e],{type:i}),o=window.URL.createObjectURL(n),a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=o,a.download="results-"+window.frontendConfig.db+"."+t,a.click(),window.setTimeout(function(){window.URL.revokeObjectURL(o),document.body.removeChild(a)},500)}},download:function(e,r){$.ajax(e).success(function(e,t,i){if(r)r(e);else{var n=new Blob([JSON.stringify(e)],{type:i.getResponseHeader("Content-Type")||"application/octet-stream"}),o=window.URL.createObjectURL(n),a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=o,a.download=i.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),a.click(),window.setTimeout(function(){window.URL.revokeObjectURL(o),document.body.removeChild(a)},500)}})},downloadPost:function(e,t,i,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===this.readyState&&200===this.status){i&&i();var e=document.createElement("a");e.download=this.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),document.body.appendChild(e);var t=window.URL.createObjectURL(this.response);e.href=t,e.click(),window.setTimeout(function(){window.URL.revokeObjectURL(t),document.body.removeChild(e)},500)}else 4===this.readyState&&void 0!==n&&n(this.status,this.statusText)},o.open("POST",e),window.arangoHelper.getCurrentJwt()&&o.setRequestHeader("Authorization","bearer "+window.arangoHelper.getCurrentJwt()),o.responseType="blob",o.send(t)},checkCollectionPermissions:function(e,t){var i=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(window.App.userCollection.activeUser)+"/database/"+encodeURIComponent(frontendConfig.db)+"/"+encodeURIComponent(e));$.ajax({type:"GET",url:i,contentType:"application/json",success:function(e){"ro"===e.result&&t()},error:function(e){arangoHelper.arangoError("User","Could not fetch collection permissions.")}})},checkDatabasePermissions:function(t,i){var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(window.App.userCollection.activeUser)+"/database/"+encodeURIComponent(frontendConfig.db));$.ajax({type:"GET",url:e,contentType:"application/json",success:function(e){"ro"===e.result?t&&t(!0):"rw"===e.result?i&&i(!1):"none"===e.result&&(frontendConfig.authenticationEnabled||i&&i(!1))},error:function(e){arangoHelper.arangoError("User","Could not fetch collection permissions.")}})},getFoxxFlag:function(){var e;return $("#new-app-replace").prop("checked")?e=!0:$("#new-app-teardown").prop("checked")&&(e=!1),e},createMountPointModal:function(e,t,i){var n,o=[],a=[];window.App.replaceApp&&(n=(n=window.App.replaceAppData.mount).substr(1,n.length)),a.push(window.modalView.createTextEntry("new-app-mount","Mount point",n,"The path the app will be mounted. Is not allowed to start with _","mountpoint",!1,[{rule:Joi.string().required(),msg:""}])),a.push(window.modalView.createCheckboxEntry("new-app-teardown","Run setup?",!0,"Should this app's setup script be executed after installing the app?",!0)),window.App.replaceApp?(a.push(window.modalView.createCheckboxEntry("new-app-replace","Discard configuration and dependency files?",!0,"Should this service's existing configuration and settings be removed completely before replacing the service?",!1)),o.push(window.modalView.createSuccessButton("Replace",e))):o.push(window.modalView.createSuccessButton("Install",e));var r="Create Foxx Service";window.App.replaceApp&&(r="Replace Foxx Service ("+window.App.replaceAppData.mount+")"),window.modalView.show("modalTable.ejs",r,o,a),window.App.replaceApp?($("#new-app-mount").attr("disabled","true"),$("#new-app-replace").attr("checked",!1),$("#new-app-replace").on("click",function(){$("#new-app-replace").prop("checked")?$("#new-app-teardown").attr("disabled",!0):$("#new-app-teardown").attr("disabled",!1)})):window.modalView.modalBindValidation({id:"new-app-mount",validateInput:function(){return[{rule:Joi.string().regex(/(\/|^)APP(\/|$)/i,{invert:!0}),msg:"May not contain APP"},{rule:Joi.string().regex(/^([a-zA-Z0-9_\-/]+)+$/),msg:"Can only contain [a-zA-Z0-9_-/]"},{rule:Joi.string().regex(/([^_]|_open\/)/),msg:"Mountpoints with _ are reserved for internal use"},{rule:Joi.string().regex(/[^/]$/),msg:"May not end with /"},{rule:Joi.string().required().min(1),msg:"Has to be non-empty"}]}})}}}(),function(){"use strict";if(!window.hasOwnProperty("TEST_BUILD")){window.templateEngine=new function(){var e={createTemplate:function(t){$("#"+t.replace(".","\\.")).html();return{render:function(e){return window.JST["templates/"+t](e)}}}};return e}}}(),function(){"use strict";window.dygraphConfig={defaultFrame:12e5,zeropad:function(e){return e<10?"0"+e:e},xAxisFormat:function(e){if(-1===e)return"";var t=new Date(e);return this.zeropad(t.getHours())+":"+this.zeropad(t.getMinutes())+":"+this.zeropad(t.getSeconds())},mergeObjects:function(n,o,e){var t,a={};return(e=e||[]).forEach(function(e){var t=n[e],i=o[e];void 0===t&&(t={}),void 0===i&&(i={}),a[e]=_.extend(t,i)}),t=_.extend(n,o),Object.keys(a).forEach(function(e){t[e]=a[e]}),t},mapStatToFigure:{pageFaults:["times","majorPageFaultsPerSecond","minorPageFaultsPerSecond"],systemUserTime:["times","systemTimePerSecond","userTimePerSecond"],totalTime:["times","avgQueueTime","avgRequestTime","avgIoTime"],dataTransfer:["times","bytesSentPerSecond","bytesReceivedPerSecond"],requests:["times","getsPerSecond","putsPerSecond","postsPerSecond","deletesPerSecond","patchesPerSecond","headsPerSecond","optionsPerSecond","othersPerSecond"]},colors:["rgb(95, 194, 135)","rgb(238, 190, 77)","#81ccd8","#7ca530","#3c3c3c","#aa90bd","#e1811d","#c7d4b2","#d0b2d4"],figureDependedOptions:{clusterRequestsPerSecond:{showLabelsOnHighlight:!0,title:"",header:"Cluster Requests per Second",stackedGraph:!0,div:"lineGraphLegend",labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},pageFaults:{header:"Page Faults",visibility:[!0,!1],labels:["datetime","Major Page","Minor Page"],div:"pageFaultsChart",labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},systemUserTime:{div:"systemUserTimeChart",header:"System and User Time",labels:["datetime","System Time","User Time"],stackedGraph:!0,labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},totalTime:{div:"totalTimeChart",header:"Total Time",labels:["datetime","Queue","Computation","I/O"],labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}},stackedGraph:!0},dataTransfer:{header:"Data Transfer",labels:["datetime","Bytes sent","Bytes received"],stackedGraph:!0,div:"dataTransferChart"},requests:{header:"Requests",labels:["datetime","Reads","Writes"],stackedGraph:!0,div:"requestsChart",axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}}},getDashBoardFigures:function(t){var i=[],n=this;return Object.keys(this.figureDependedOptions).forEach(function(e){"clusterRequestsPerSecond"!==e&&(n.figureDependedOptions[e].div||t)&&i.push(e)}),i},getDefaultConfig:function(e){var t=this,i={digitsAfterDecimal:1,drawGapPoints:!0,fillGraph:!0,fillAlpha:.85,showLabelsOnHighlight:!1,strokeWidth:0,lineWidth:0,strokeBorderWidth:0,includeZero:!0,highlightCircleSize:2.5,labelsSeparateLines:!0,strokeBorderColor:"rgba(0,0,0,0)",interactionModel:{},maxNumberWidth:10,colors:[this.colors[0]],xAxisLabelWidth:"50",rightGap:15,showRangeSelector:!1,rangeSelectorHeight:50,rangeSelectorPlotStrokeColor:"#365300",rangeSelectorPlotFillColor:"",pixelsPerLabel:50,labelsKMG2:!0,dateWindow:[(new Date).getTime()-this.defaultFrame,(new Date).getTime()],axes:{x:{valueFormatter:function(e){return t.xAxisFormat(e)}},y:{ticker:Dygraph.numericLinearTicks}}};return this.figureDependedOptions[e]&&(i=this.mergeObjects(i,this.figureDependedOptions[e],["axes"])).div&&i.labels&&(i.colors=this.getColors(i.labels),i.labelsDiv=document.getElementById(i.div+"Legend"),i.legend="always",i.showLabelsOnHighlight=!0),i},getDetailChartConfig:function(e){var t=_.extend(this.getDefaultConfig(e),{showRangeSelector:!0,interactionModel:null,showLabelsOnHighlight:!0,highlightCircleSize:2.5,legend:"always",labelsDiv:"div#detailLegend.dashboard-legend-inner"});return"pageFaults"===e&&(t.visibility=[!0,!0]),t.labels||(t.labels=["datetime",t.header],t.colors=this.getColors(t.labels)),t},getColors:function(e){return this.colors.concat([]).slice(0,e.length-1)}}}(),function(){"use strict";window.arangoCollectionModel=Backbone.Model.extend({idAttribute:"name",urlRoot:arangoHelper.databaseUrl("/_api/collection"),defaults:{id:"",name:"",status:"",type:"",isSystem:!1,picture:"",locked:!1,desc:void 0},getProperties:function(t){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+encodeURIComponent(this.get("id"))+"/properties"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(e){t(!0,e)}})},getFigures:function(t){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/figures"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(){t(!0)}})},getRevision:function(t,i){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/revision"),contentType:"application/json",processData:!1,success:function(e){t(!1,e,i)},error:function(){t(!0)}})},getIndex:function(t){var i=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/index/?collection="+this.get("id")),contentType:"application/json",processData:!1,success:function(e){t(!1,e,i.get("id"))},error:function(e){t(!0,e,i.get("id"))}})},createIndex:function(e,n){var o=this;$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/index?collection="+o.get("id")),headers:{"x-arango-async":"store"},data:JSON.stringify(e),contentType:"application/json",processData:!1,success:function(e,t,i){i.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:i.getResponseHeader("x-arango-async-id"),type:"index",desc:"Creating Index",collection:o.get("id")}),n(!1,e)):n(!0,e)},error:function(e){n(!0,e)}})},deleteIndex:function(e,n){var o=this;$.ajax({cache:!1,type:"DELETE",url:arangoHelper.databaseUrl("/_api/index/"+this.get("name")+"/"+encodeURIComponent(e)),headers:{"x-arango-async":"store"},success:function(e,t,i){i.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:i.getResponseHeader("x-arango-async-id"),type:"index",desc:"Removing Index",collection:o.get("id")}),n(!1,e)):n(!0,e)},error:function(e){n(!0,e)}}),n()},truncateCollection:function(){var e=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/truncate"),success:function(){arangoHelper.arangoNotification("Collection truncated."),$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_admin/wal/flush?waitForSync=true&waitForCollector=true"),success:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+e.get("id")+"/rotate"),success:function(){},error:function(){}})},error:function(){}})},error:function(e){arangoHelper.arangoError("Collection error: "+e.responseJSON.errorMessage)}})},warmupCollection:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/loadIndexesIntoMemory"),success:function(){arangoHelper.arangoNotification("Loading indexes into memory.")},error:function(e){arangoHelper.arangoError("Collection error: "+e.responseJSON.errorMessage)}})},loadCollection:function(e){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/load"),success:function(){e(!1)},error:function(){e(!0)}}),e()},unloadCollection:function(e){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/unload?flush=true"),success:function(){e(!1)},error:function(){e(!0)}}),e()},renameCollection:function(e,t){var i=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/rename"),data:JSON.stringify({name:e}),contentType:"application/json",processData:!1,success:function(){i.set("name",e),t(!1)},error:function(e){t(!0,e)}})},changeCollection:function(e,t,i,n,o,a){"true"===e?e=!0:"false"===e&&(e=!1);var r={waitForSync:e,journalSize:parseInt(t,10),indexBuckets:parseInt(i,10)};return n&&(r.replicationFactor=parseInt(n,10)),o&&(r.minReplicationFactor=parseInt(o,10)),$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/properties"),data:JSON.stringify(r),contentType:"application/json",processData:!1,success:function(){a(!1)},error:function(e){a(!0,e)}}),!1}})}(),window.DatabaseModel=Backbone.Model.extend({idAttribute:"name",initialize:function(){},isNew:function(){"use strict";return!1},sync:function(e,t,i){"use strict";return"update"===e&&(e="create"),Backbone.sync(e,t,i)},url:arangoHelper.databaseUrl("/_api/database"),defaults:{}}),window.arangoDocumentModel=Backbone.Model.extend({initialize:function(){},urlRoot:arangoHelper.databaseUrl("/_api/document"),defaults:{_id:"",_rev:"",_key:""},getSorted:function(){"use strict";var t=this,e=Object.keys(t.attributes).sort(function(e,t){var i=arangoHelper.isSystemAttribute(e);return i!==arangoHelper.isSystemAttribute(t)?i?-1:1:e=this.getLastPageNumber()&&null!==this.totalAmount?this.page=this.getLastPageNumber()-1:this.page=e<1?0:e-1},getLastPageNumber:function(){return Math.max(Math.ceil(this.totalAmount/this.pagesize),1)},getOffset:function(){return this.page*this.pagesize},getPageSize:function(){return this.pagesize},setPageSize:function(e){if("all"===e)this.pagesize="all";else try{e=parseInt(e,10),this.pagesize=e}catch(e){}},setToFirst:function(){this.page=0},setToLast:function(){this.setPage(this.getLastPageNumber())},setToPrev:function(){this.setPage(this.getPage()-1)},setToNext:function(){this.setPage(this.getPage()+1)},setTotal:function(e){this.totalAmount=e},getTotal:function(){return this.totalAmount},setTotalMinusOne:function(){this.totalAmount--}})}(),window.ClusterStatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics",updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(e,t){this.host=t.host,window.App.registerForUpdate(this)}}),function(){"use strict";window.ArangoCollections=Backbone.Collection.extend({url:arangoHelper.databaseUrl("/_api/collection"),model:arangoCollectionModel,searchOptions:{searchPhrase:null,includeSystem:!1,includeDocument:!0,includeEdge:!0,includeLoaded:!0,includeUnloaded:!0,sortBy:"name",sortOrder:1},translateStatus:function(e){switch(e){case 0:return"corrupted";case 1:return"new born collection";case 2:return"unloaded";case 3:return"loaded";case 4:return"unloading";case 5:return"deleted";case 6:return"loading";default:return"unknown"}},translateTypePicture:function(e){var t="";switch(e){case"document":t+="fa-file-text-o";break;case"edge":t+="fa-share-alt";break;case"unknown":t+="fa-question";break;default:t+="fa-cogs"}return t},parse:function(e){var t=this;return _.each(e.result,function(e){e.isSystem=arangoHelper.isSystemCollection(e),e.type=arangoHelper.collectionType(e),e.status=t.translateStatus(e.status),e.picture=t.translateTypePicture(e.type)}),e.result},getPosition:function(e){var t,i=this.getFiltered(this.searchOptions),n=null,o=null;for(t=0;t
  • '),$(this.paginationDiv).append('
    ')}})}(),function(){"use strict";window.ApplicationDetailView=Backbone.View.extend({el:"#content",divs:["#readme","#swagger","#app-info","#sideinformation","#information","#settings"],navs:["#service-info","#service-api","#service-readme","#service-settings"],template:templateEngine.createTemplate("serviceDetailView.ejs"),remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click .open":"openApp","click .delete":"deleteApp","click #app-deps":"showDepsDialog","click #app-switch-mode":"toggleDevelopment","click #app-scripts [data-script]":"runScript","click #app-tests":"runTests","click #app-replace":"replaceApp","click #download-app":"downloadApp","click .subMenuEntries li":"changeSubview","click #jsonLink":"toggleSwagger","mouseenter #app-scripts":"showDropdown","mouseleave #app-scripts":"hideDropdown"},resize:function(e){e?$(".innerContent").css("height","auto"):($(".innerContent").height($(".centralRow").height()-150),$("#swagger iframe").height($(".centralRow").height()-150),$("#swagger #swaggerJsonContent").height($(".centralRow").height()-150))},toggleSwagger:function(){var e=function(e){$("#jsonLink").html("JSON"),this.jsonEditor.setValue(JSON.stringify(e,null,"\t"),1),$("#swaggerJsonContent").show(),$("#swagger iframe").hide()}.bind(this);if("Swagger"===$("#jsonLink").html()){var t=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")));arangoHelper.download(t,e)}else $("#swaggerJsonContent").hide(),$("#swagger iframe").show(),$("#jsonLink").html("Swagger")},changeSubview:function(e){if(_.each(this.navs,function(e){$(e).removeClass("active")}),$(e.currentTarget).addClass("active"),_.each(this.divs,function(e){$(".headerButtonBar").hide(),$(e).hide()}),"service-readme"===e.currentTarget.id)this.resize(!0),$("#readme").show();else if("service-api"===e.currentTarget.id){this.resize(),$("#swagger").show(),$("#swaggerIframe").remove();var t=window.location.pathname.split("/"),i=window.location.protocol+"//"+window.location.hostname+":"+window.location.port+"/"+t[1]+"/"+t[2]+"/_admin/aardvark/foxxes/docs/index.html?mount="+this.model.get("mount"),n=$("')},toggleViews:function(e){var t=this,i=e.currentTarget.id.split("-")[0];_.each(["community","documentation","swagger"],function(e){i!==e?$("#"+e).hide():("swagger"===i?(t.renderSwagger(),$("#swagger iframe").css("height","100%"),$("#swagger iframe").css("width","100%"),$("#swagger iframe").css("margin-top","-13px"),t.resize()):t.resize(!0),$("#"+e).show())}),$(".subMenuEntries").children().removeClass("active"),$("#"+i+"-support").addClass("active")}})}(),function(){"use strict";window.TableView=Backbone.View.extend({template:templateEngine.createTemplate("tableView.ejs"),loading:templateEngine.createTemplate("loadingTableView.ejs"),initialize:function(e){this.rowClickCallback=e.rowClick},events:{"click .pure-table-body .pure-table-row":"rowClick","click .deleteButton":"removeClick"},rowClick:function(e){this.hasOwnProperty("rowClickCallback")&&this.rowClickCallback(e)},removeClick:function(e){this.hasOwnProperty("removeClickCallback")&&(this.removeClickCallback(e),e.stopPropagation())},setRowClick:function(e){this.rowClickCallback=e},setRemoveClick:function(e){this.removeClickCallback=e},render:function(){$(this.el).html(this.template.render({docs:this.collection}))},drawLoading:function(){$(this.el).html(this.loading.render({}))}})}(),function(){"use strict";window.UserBarView=Backbone.View.extend({events:{"change #userBarSelect":"navigateBySelect","click .tab":"navigateByTab","mouseenter .dropdown":"showDropdown","mouseleave .dropdown":"hideDropdown","click #userLogoutIcon":"userLogout","click #userLogout":"userLogout"},initialize:function(e){arangoHelper.checkDatabasePermissions(this.setUserCollectionMode.bind(this)),this.userCollection=e.userCollection,this.userCollection.fetch({cache:!1,async:!0}),this.userCollection.bind("change:extra",this.render.bind(this))},setUserCollectionMode:function(e){e&&(this.userCollection.authOptions.ro=!0)},template:templateEngine.createTemplate("userBarView.ejs"),navigateBySelect:function(){var e=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(e,{trigger:!0})},navigateByTab:function(e){var t=e.target||e.srcElement,i=(t=$(t).closest("a")).attr("id");if("user"===i)return $("#user_dropdown").slideToggle(200),void e.preventDefault();window.App.navigate(i,{trigger:!0}),e.preventDefault()},toggleUserMenu:function(){$("#userBar .subBarDropdown").toggle()},showDropdown:function(){$("#user_dropdown").fadeIn(1)},hideDropdown:function(){$("#user_dropdown").fadeOut(1)},render:function(){if(!1!==frontendConfig.authenticationEnabled){var s=this;$("#userBar").on("click",function(){s.toggleUserMenu()}),this.userCollection.whoAmI(function(e,t){if(e)arangoHelper.arangoErro("User","Could not fetch user.");else{var i=null,n=null,o=!1,a=null;if(!1!==t){var r=function(){return frontendConfig.ldapEnabled&&s.userCollection.add({name:window.App.currentUser,user:window.App.currentUser,username:window.App.currentUser,active:!0,img:void 0}),(a=s.userCollection.findWhere({user:t})).set({loggedIn:!0}),n=a.get("extra").name,i=a.get("extra").img,o=a.get("active"),i=i?"https://s.gravatar.com/avatar/"+i+"?s=80":"img/default_user.png",n=n||"",s.$el=$("#userBar"),s.$el.html(s.template.render({img:i,name:n,username:t,active:o})),s.delegateEvents(),s.$el};0===s.userCollection.models.length?s.userCollection.fetch({success:function(){r()}}):r()}}})}},userLogout:function(){var e=function(e){e?arangoHelper.arangoError("User","Logout error"):this.userCollection.logout()}.bind(this);this.userCollection.whoAmI(e)}})}(),function(){"use strict";window.UserManagementView=Backbone.View.extend({el:"#content",el2:"#userManagementThumbnailsIn",template:templateEngine.createTemplate("userManagementView.ejs"),remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #createUser":"createUser","click #submitCreateUser":"submitCreateUser","click #userManagementThumbnailsIn .tile":"editUser","click #submitEditUser":"submitEditUser","click #userManagementToggle":"toggleView","keyup #userManagementSearchInput":"search","click #userManagementSearchSubmit":"search","click #callEditUserPassword":"editUserPassword","click #submitEditUserPassword":"submitEditUserPassword","click #submitEditCurrentUserProfile":"submitEditCurrentUserProfile","click .css-label":"checkBoxes","change #userSortDesc":"sorting"},dropdownVisible:!1,initialize:function(){var e=this,t=function(e,t){!0===frontendConfig.authenticationEnabled&&(e||null===t?arangoHelper.arangoError("User","Could not fetch user data"):this.currentUser=this.collection.findWhere({user:t}))}.bind(this);this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.collection.whoAmI(t)}})},checkBoxes:function(e){var t=e.currentTarget.id;$("#"+t).click()},sorting:function(){$("#userSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#userManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},render:function(e){var t=!1;$("#userManagementDropdown").is(":visible")&&(t=!0);var i=function(){this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:""})),!0===t&&($("#userManagementDropdown2").show(),$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown").show()),e&&this.editCurrentUser(),arangoHelper.setCheckboxStatus("#userManagementDropdown")}.bind(this);return this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){i()}}),this},search:function(){var e,t,i,n;e=$("#userManagementSearchInput"),t=arangoHelper.escapeHtml($("#userManagementSearchInput").val()),n=this.collection.filter(function(e){return-1!==e.get("user").indexOf(t)}),$(this.el).html(this.template.render({collection:n,searchString:t})),i=(e=$("#userManagementSearchInput")).val().length,e.focus(),e[0].setSelectionRange(i,i)},createUser:function(e){e.preventDefault(),this.createCreateUserModal()},submitCreateUser:function(){var e=this,t=$("#newUsername").val(),i=$("#newName").val(),n=$("#newPassword").val(),o=$("#newStatus").is(":checked");if(this.validateUserInfo(i,t,n,o)){var a={user:t,passwd:n,active:o,extra:{name:i}};frontendConfig.isEnterprise&&$("#newRole").is(":checked")&&(a.user=":role:"+t,delete a.passwd),this.collection.create(a,{wait:!0,error:function(e,t){arangoHelper.parseError("User",t,e)},success:function(){e.updateUserManagement(),window.modalView.hide()}})}},validateUserInfo:function(e,t,i,n){return""!==t||(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1)},updateUserManagement:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.render()}})},editUser:function(e){if("createUser"!==$(e.currentTarget).find("a").attr("id")){$(e.currentTarget).hasClass("tile")&&($(e.currentTarget).find(".fa").attr("id")?e.currentTarget=$(e.currentTarget).find(".fa"):e.currentTarget=$(e.currentTarget).find(".icon")),this.collection.fetch({fetchAllUsers:!0,cache:!1});var t=this.evaluateUserName($(e.currentTarget).attr("id"),"_edit-user");""===t&&(t=$(e.currentTarget).attr("id")),window.App.navigate("user/"+encodeURIComponent(t),{trigger:!0})}},toggleView:function(){$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown2").slideToggle(200)},createCreateUserModal:function(){var e=[],t=[];t.push(window.modalView.createTextEntry("newUsername","Username","",!1,"Username",!0,[{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No username given."}])),t.push(window.modalView.createTextEntry("newName","Name","",!1,"Name",!1)),t.push(window.modalView.createPasswordEntry("newPassword","Password","",!1,"",!1)),frontendConfig.isEnterprise&&t.push(window.modalView.createCheckboxEntry("newRole","Role",!1,!1,!1)),t.push(window.modalView.createCheckboxEntry("newStatus","Active","active",!1,!0)),e.push(window.modalView.createSuccessButton("Create",this.submitCreateUser.bind(this))),window.modalView.show("modalTable.ejs","Create New User",e,t),frontendConfig.isEnterprise&&$("#newRole").on("change",function(){$("#newRole").is(":checked")?$("#newPassword").attr("disabled",!0):$("#newPassword").attr("disabled",!1)})},evaluateUserName:function(e,t){if(e){var i=e.lastIndexOf(t);return e.substring(0,i)}},updateUserProfile:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.render()}})}})}(),function(){"use strict";window.UserPermissionView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("userPermissionView.ejs"),initialize:function(e){this.username=e.username},remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #userPermissionView .dbCheckbox":"setDBPermission","click #userPermissionView .collCheckbox":"setCollPermission","click .db-row":"toggleAccordion"},render:function(e,t){var i=this;this.collection.fetch({fetchAllUsers:!0,success:function(){i.continueRender(e,t)}})},toggleAccordion:function(e){if(!($(e.target).attr("type")||$(e.target).parent().hasClass("noAction")||$(e.target).hasClass("inner")||$(e.target).is("span"))){var t=$(e.currentTarget).find(".collection-row").is(":visible"),i=$(e.currentTarget).attr("id").split("-")[0];$(".collection-row").hide(),$(".db-label").css("font-weight",200),$(".db-label").css("color","#8a969f"),4<$(e.currentTarget).find(".collection-row").children().length?($(".db-row .fa-caret-down").hide(),$(".db-row .fa-caret-right").show(),t?$(e.currentTarget).find(".collection-row").hide():($(e.currentTarget).find(".collection-row").fadeIn("fast"),$(e.currentTarget).find(".db-label").css("font-weight",600),$(e.currentTarget).find(".db-label").css("color","rgba(64, 74, 83, 1)"),$(e.currentTarget).find(".fa-caret-down").show(),$(e.currentTarget).find(".fa-caret-right").hide())):($(".db-row .fa-caret-down").hide(),$(".db-row .fa-caret-right").show(),arangoHelper.arangoNotification("Permissions",'No collections in "'+i+'" available.'))}},setCollPermission:function(e){var t,i=$(e.currentTarget).attr("db"),n=$(e.currentTarget).attr("collection");t=$(e.currentTarget).hasClass("readOnly")?"ro":$(e.currentTarget).hasClass("readWrite")?"rw":$(e.currentTarget).hasClass("noAccess")?"none":"undefined",this.sendCollPermission(this.currentUser.get("user"),i,n,t)},setDBPermission:function(e){var t,i=$(e.currentTarget).attr("name");if(t=$(e.currentTarget).hasClass("readOnly")?"ro":$(e.currentTarget).hasClass("readWrite")?"rw":$(e.currentTarget).hasClass("noAccess")?"none":"undefined","_system"===i){var n=[],o=[];o.push(window.modalView.createReadOnlyEntry("db-system-revoke-button","Caution","You are changing the _system database permission. Really continue?",void 0,void 0,!1)),n.push(window.modalView.createSuccessButton("Ok",this.sendDBPermission.bind(this,this.currentUser.get("user"),i,t))),n.push(window.modalView.createCloseButton("Cancel",this.rollbackInputButton.bind(this,i))),window.modalView.show("modalTable.ejs","Change _system Database Permission",n,o)}else this.sendDBPermission(this.currentUser.get("user"),i,t)},rollbackInputButton:function(e,t){var i;_.each($(".collection-row"),function(e,t){$(e).is(":visible")&&(i=$(e).parent().attr("id"))}),i?this.render(i,t):this.render(),window.modalView.hide()},sendCollPermission:function(e,t,i,n){var o=this;"undefined"===n?this.revokeCollPermission(e,t,i):$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)+"/"+encodeURIComponent(i)),contentType:"application/json",data:JSON.stringify({grant:n})}).success(function(e){o.styleDefaultRadios(null,!0)}).error(function(e){o.rollbackInputButton(null,e)})},revokeCollPermission:function(e,t,i){var n=this;$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)+"/"+encodeURIComponent(i)),contentType:"application/json"}).success(function(e){n.styleDefaultRadios(null,!0)}).error(function(e){n.rollbackInputButton(null,e)})},sendDBPermission:function(e,t,i){var n=this;"undefined"===i?this.revokeDBPermission(e,t):$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)),contentType:"application/json",data:JSON.stringify({grant:i})}).success(function(e){n.styleDefaultRadios(null,!0)}).error(function(e){n.rollbackInputButton(null,e)})},revokeDBPermission:function(e,t){var i=this;$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)),contentType:"application/json"}).success(function(e){i.styleDefaultRadios(null,!0)}).error(function(e){i.rollbackInputButton(null,e)})},continueRender:function(t,i){var n=this;this.currentUser=this.collection.findWhere({user:this.username});var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(n.currentUser.get("user"))+"/database?full=true");$.ajax({type:"GET",url:e,contentType:"application/json",success:function(e){n.finishRender(e.result,t,i)},error:function(e){arangoHelper.arangoError("User","Could not fetch user permissions")}})},finishRender:function(e,t,i){var n=_.pairs(e);n.sort(),n=_.object(n),$(this.el).html(this.template.render({permissions:n})),$(".noAction").first().appendTo(".pure-table-body"),$(".pure-table-body").height(window.innerHeight-200),t&&$("#"+t).click(),i&&i.responseJSON&&i.responseJSON.errorMessage&&arangoHelper.arangoError("User",i.responseJSON.errorMessage),this.styleDefaultRadios(e),arangoHelper.createTooltips(),this.checkRoot(),this.breadcrumb()},checkRoot:function(){"root"===this.currentUser.get("user")&&$("#_system-db #___-collection input").attr("disabled","true")},styleDefaultRadios:function(e,t){function i(e){$(".db-row input").css("box-shadow","none");var o="rgba(0, 0, 0, 0.3) 0px 1px 4px 4px";_.each(e,function(e,i){if(e.collections){var n=e.collections["*"];_.each(e.collections,function(e,t){"_"!==t.charAt(0)&&"*"!==t.charAt(0)&&"undefined"===e&&("rw"===n?$("#"+i+"-db #"+t+"-collection .readWrite").css("box-shadow",o):"ro"===n?$("#"+i+"-db #"+t+"-collection .readOnly").css("box-shadow",o):"none"===n&&$("#"+i+"-db #"+t+"-collection .noAccess").css("box-shadow",o))})}})}if(t){var n=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.currentUser.get("user"))+"/database?full=true");$.ajax({type:"GET",url:n,contentType:"application/json",success:function(e){i(e.result)},error:function(e){arangoHelper.arangoError("User","Could not fetch user permissions")}})}else i(e);window.modalView.hide()},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("User: "+arangoHelper.escapeHtml(this.currentUser.get("user"))),arangoHelper.buildUserSubNav(e.currentUser.get("user"),"Permissions")):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.UserView=Backbone.View.extend({el:"#content",initialize:function(e){this.username=e.username},render:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,success:function(){e.continueRender()}})},editCurrentUser:function(){this.createEditCurrentUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("extra").img)},continueRender:function(){this.currentUser=this.collection.findWhere({user:this.username}),this.breadcrumb(),this.currentUser.get("loggedIn")?this.editCurrentUser():this.createEditUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("active"))},createEditUserPasswordModal:function(){var e=[],t=[];t.push(window.modalView.createPasswordEntry("newCurrentPassword","New Password","",!1,"new password",!1)),t.push(window.modalView.createPasswordEntry("confirmCurrentPassword","Confirm New Password","",!1,"confirm new password",!1)),e.push(window.modalView.createSuccessButton("Save",this.submitEditUserPassword.bind(this))),window.modalView.show("modalTable.ejs","Edit User Password",e,t)},createEditCurrentUserModal:function(e,t,i){var n=[],o=[];o.push(window.modalView.createReadOnlyEntry("id_username","Username",e)),o.push(window.modalView.createTextEntry("editCurrentName","Name",t,!1,"Name",!1)),o.push(window.modalView.createTextEntry("editCurrentUserProfileImg","Gravatar account (Mail)",i,"Mailaddress or its md5 representation of your gravatar account.The address will be converted into a md5 string. Only the md5 string will be stored, not the mailaddress.","myAccount(at)gravatar.com")),":role:"===this.username.substring(0,6)?n.push(window.modalView.createDisabledButton("Change Password")):n.push(window.modalView.createNotificationButton("Change Password",this.editUserPassword.bind(this))),n.push(window.modalView.createSuccessButton("Save",this.submitEditCurrentUserProfile.bind(this))),window.modalView.show("modalTable.ejs","Edit User Profile",n,o,null,null,this.events,null,null,"content")},parseImgString:function(e){return-1===e.indexOf("@")?e:CryptoJS.MD5(e).toString()},createEditUserModal:function(e,t,i){var n,o;o=[{type:window.modalView.tables.READONLY,label:"Username",value:_.escape(e)},{type:window.modalView.tables.TEXT,label:"Name",value:_.escape(t),id:"editName",placeholder:"Name"},{type:window.modalView.tables.CHECKBOX,label:"Active",value:"active",checked:i,id:"editStatus"}],(n=[]).push({title:"Delete",type:window.modalView.buttons.DELETE,callback:this.submitDeleteUser.bind(this,e)}),":role:"===this.username.substring(0,6)?n.push({title:"Change Password",type:window.modalView.buttons.DISABLED,callback:this.createEditUserPasswordModal.bind(this,e)}):n.push({title:"Change Password",type:window.modalView.buttons.NOTIFICATION,callback:this.createEditUserPasswordModal.bind(this,e)}),n.push({title:"Save",type:window.modalView.buttons.SUCCESS,callback:this.submitEditUser.bind(this,e)}),window.modalView.show("modalTable.ejs","Edit User",n,o,null,null,this.events,null,null,"content")},validateStatus:function(e){return""!==e},submitDeleteUser:function(e){this.collection.findWhere({user:e}).destroy({wait:!0}),window.App.navigate("#users",{trigger:!0})},submitEditCurrentUserProfile:function(){var e=$("#editCurrentName").val(),t=$("#editCurrentUserProfileImg").val();t=this.parseImgString(t);var i=function(e){e?arangoHelper.arangoError("User","Could not edit user settings"):(arangoHelper.arangoNotification("User","Changes confirmed."),this.updateUserProfile())}.bind(this);this.currentUser.setExtras(e,t,i),window.modalView.hide()},submitEditUserPassword:function(){var e=$("#newCurrentPassword").val(),t=$("#confirmCurrentPassword").val();$("#newCurrentPassword").val(""),$("#confirmCurrentPassword").val(""),$("#newCurrentPassword").closest("th").css("backgroundColor","white"),$("#confirmCurrentPassword").closest("th").css("backgroundColor","white");var i=!1;e!==t&&(arangoHelper.arangoError("User","New passwords do not match."),i=!0),i||(this.currentUser.setPassword(e),arangoHelper.arangoNotification("User","Password changed."),window.modalView.hide())},editUserPassword:function(){window.modalView.hide(),this.createEditUserPasswordModal()},submitEditUser:function(e){var t=$("#editName").val(),i=$("#editStatus").is(":checked");if(this.validateStatus(i)){var n=this.collection.findWhere({user:e});n.save({extra:{name:t},active:i},{type:"PATCH",success:function(){arangoHelper.arangoNotification("User",n.get("user")+" updated.")},error:function(){arangoHelper.arangoError("User","Could not update "+n.get("user")+".")}})}else $("#editStatus").closest("th").css("backgroundColor","red")},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("User: "+_.escape(this.username)),arangoHelper.buildUserSubNav(e.currentUser.get("user"),"General")):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.ViewsView=Backbone.View.extend({el:"#content",readOnly:!1,template:templateEngine.createTemplate("viewsView.ejs"),initialize:function(){},refreshRate:1e4,sortOptions:{desc:!1},searchString:"",remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #createView":"createView","click #viewsToggle":"toggleSettingsDropdown","click .tile-view":"gotoView","keyup #viewsSearchInput":"search","click #viewsSearchSubmit":"search","click #viewsSortDesc":"sorting"},checkVisibility:function(){$("#viewsDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,arangoHelper.setCheckboxStatus("#viewsDropdown")},checkIfInProgress:function(){if(-1&'"]/)),e.push(window.modalView.createDeleteButton("Delete",this.deleteViewTrue.bind(this))),window.modalView.show("modalTable.ejs","Delete View",e,t)},deleteViewTrue:function(){this.model.deleteView(function(e,t){e?arangoHelper.arangoError("View","Could not delete the view."):(window.modalView.hide(),window.App.navigate("#views",{trigger:!0}))})},renameView:function(){var e=[],t=[];t.push(window.modalView.createTextEntry("editCurrentName","Name",this.name,!1,"Name",!1)),e.push(window.modalView.createSuccessButton("Rename",this.renameViewTrue.bind(this))),window.modalView.show("modalTable.ejs","Rename View",e,t)},renameViewTrue:function(){var t=this;$("#editCurrentName").val()?$.ajax({type:"PUT",cache:!1,url:arangoHelper.databaseUrl("/_api/view/"+encodeURIComponent(t.name)+"/rename"),contentType:"application/json",processData:!1,data:JSON.stringify({name:$("#editCurrentName").val()}),success:function(e){t.name=e.name,t.model.set("name",e.name),t.breadcrumb(),window.modalView.hide()},error:function(e){window.modalView.hide(),arangoHelper.arangoError("View",e.responseJSON.errorMessage)}}):arangoHelper.arangoError("View","Please fill in a view name.")},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("View: "+arangoHelper.escapeHtml(e.name)),window.setTimeout(function(){$("#subNavigationBar .breadcrumb").html("View: "+arangoHelper.escapeHtml(e.name)),e.checkIfInProgress()},100)):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.Router=Backbone.Router.extend({toUpdate:[],dbServers:[],isCluster:void 0,foxxApiEnabled:void 0,lastRoute:void 0,routes:{"":"cluster",dashboard:"dashboard",replication:"replication","replication/applier/:endpoint/:database":"applier",collections:"collections",new:"newCollection",login:"login","collection/:colid/documents/:pageid":"documents","cIndices/:colname":"cIndices","cSettings/:colname":"cSettings","cInfo/:colname":"cInfo","collection/:colid/:docid":"document",shell:"shell",queries:"query",databases:"databases",settings:"databases",services:"applications","services/install":"installService","services/install/new":"installNewService","services/install/github":"installGitHubService","services/install/upload":"installUploadService","services/install/remote":"installUrlService","service/:mount":"applicationDetail","store/:name":"storeDetail",graphs:"graphManagement","graphs/:name":"showGraph",users:"userManagement","user/:name":"userView","user/:name/permission":"userPermission",userProfile:"userProfile",cluster:"cluster",nodes:"nodes",shards:"shards","node/:name":"node","nodeInfo/:id":"nodeInfo",logs:"logger",helpus:"helpUs",views:"views","view/:name":"view","graph/:name":"graph","graph/:name/settings":"graphSettings",support:"support"},execute:function(e,t){if("#queries"===this.lastRoute&&(this.queryView.removeInputEditors(),this.queryView.cleanupGraphs(),this.queryView.removeResults()),this.lastRoute){var i=this.lastRoute.split("/")[0],n=this.lastRoute.split("/")[1],o=this.lastRoute.split("/")[2];"#service"!==i&&(window.App.replaceApp?"install"!==n&&o&&(window.App.replaceApp=!1):window.App.replaceApp=!1),"#collection"===this.lastRoute.substr(0,11)&&3===this.lastRoute.split("/").length&&this.documentView.cleanupEditor(),"#dasboard"!==this.lastRoute&&"#node"!==window.location.hash.substr(0,5)||d3.selectAll("svg > *").remove(),"#logger"===this.lastRoute&&(this.loggerView.logLevelView&&this.loggerView.logLevelView.remove(),this.loggerView.logTopicView&&this.loggerView.logTopicView.remove())}this.lastRoute=window.location.hash,$("#subNavigationBar .breadcrumb").html(""),$("#subNavigationBar .bottom").html(""),$("#loadingScreen").hide(),$("#content").show(),e&&e.apply(this,t),"#services"===this.lastRoute&&(window.App.replaceApp=!1),this.graphViewer&&this.graphViewer.graphSettingsView&&this.graphViewer.graphSettingsView.hide(),this.queryView&&this.queryView.graphViewer&&this.queryView.graphViewer.graphSettingsView&&this.queryView.graphViewer.graphSettingsView.hide()},listenerFunctions:{},listener:function(i){_.each(window.App.listenerFunctions,function(e,t){e(i)})},checkUser:function(){var i=this;if("#login"!==window.location.hash){var n=function(){this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show()}.bind(this),e=function(e,t){frontendConfig.authenticationEnabled?(i.currentUser=t,e||null===t?"#login"!==window.location.hash&&this.navigate("login",{trigger:!0}):n()):n()}.bind(this);frontendConfig.authenticationEnabled?this.userCollection.whoAmI(e):(this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show())}},waitForInit:function(e,t,i){this.initFinished?(t||e(!0),t&&!i&&e(t,!0),t&&i&&e(t,i,!0)):setTimeout(function(){t||e(!1),t&&!i&&e(t,!1),t&&i&&e(t,i,!1)},350)},initFinished:!1,initialize:function(){!0===frontendConfig.isCluster&&(this.isCluster=!0),"boolean"==typeof frontendConfig.foxxApiEnabled&&(this.foxxApiEnabled=frontendConfig.foxxApiEnabled),document.addEventListener("keyup",this.listener,!1),window.modalView=new window.ModalView,this.foxxList=new window.FoxxCollection,window.foxxInstallView=new window.FoxxInstallView({collection:this.foxxList}),this.foxxRepo=new window.FoxxRepository,this.foxxRepo.fetch({success:function(){i.serviceInstallView&&(i.serviceInstallView.collection=i.foxxRepo)}}),window.progressView=new window.ProgressView;var i=this;this.userCollection=new window.ArangoUsers,this.initOnce=function(){this.initOnce=function(){};var e=function(e,t){i=this,!0===t&&i.coordinatorCollection.fetch({success:function(){i.fetchDBS()}}),e&&console.log(e)}.bind(this);window.isCoordinator(e),!1===frontendConfig.isCluster&&(this.initFinished=!0),this.arangoDatabase=new window.ArangoDatabase,this.currentDB=new window.CurrentDatabase,this.arangoCollectionsStore=new window.ArangoCollections,this.arangoDocumentStore=new window.ArangoDocument,this.arangoViewsStore=new window.ArangoViews,this.coordinatorCollection=new window.ClusterCoordinators,window.spotlightView=new window.SpotlightView({collection:this.arangoCollectionsStore}),arangoHelper.setDocumentStore(this.arangoDocumentStore),this.arangoCollectionsStore.fetch({cache:!1}),this.footerView=new window.FooterView({collection:i.coordinatorCollection}),this.notificationList=new window.NotificationCollection,this.currentDB.fetch({cache:!1,success:function(){i.naviView=new window.NavigationView({database:i.arangoDatabase,currentDB:i.currentDB,notificationCollection:i.notificationList,userCollection:i.userCollection,isCluster:i.isCluster,foxxApiEnabled:i.foxxApiEnabled}),i.naviView.render()}}),this.queryCollection=new window.ArangoQueries,this.footerView.render(),window.checkVersion(),this.userConfig=new window.UserConfig({ldapEnabled:frontendConfig.ldapEnabled}),this.userConfig.fetch(),this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore}),arangoHelper.initSigma()}.bind(this),$(window).resize(function(){i.handleResize()}),$(window).scroll(function(){})},handleScroll:function(){50<$(window).scrollTop()?($(".navbar > .secondary").css("top",$(window).scrollTop()),$(".navbar > .secondary").css("position","absolute"),$(".navbar > .secondary").css("z-index","10"),$(".navbar > .secondary").css("width",$(window).width())):($(".navbar > .secondary").css("top","0"),$(".navbar > .secondary").css("position","relative"),$(".navbar > .secondary").css("width",""))},cluster:function(e){this.checkUser(),e?this.isCluster?(this.clusterView||(this.clusterView=new window.ClusterView({coordinators:this.coordinatorCollection,dbServers:this.dbServers})),this.clusterView.render()):"_system"===this.currentDB.get("name")?(this.routes[""]="dashboard",this.navigate("#dashboard",{trigger:!0})):(this.routes[""]="collections",this.navigate("#collections",{trigger:!0})):this.waitForInit(this.cluster.bind(this))},node:function(e,t){if(this.checkUser(),t&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodeView&&this.nodeView.remove(),this.nodeView=new window.NodeView({coordid:e,coordinators:this.coordinatorCollection,dbServers:this.dbServers}),this.nodeView.render()}else this.waitForInit(this.node.bind(this),e)},shards:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.shardsView&&this.shardsView.remove(),this.shardsView=new window.ShardsView({dbServers:this.dbServers}),this.shardsView.render()}else this.waitForInit(this.shards.bind(this))},nodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodesView&&this.nodesView.remove(),this.nodesView=new window.NodesView({}),this.nodesView.render()}else this.waitForInit(this.nodes.bind(this))},cNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"coordinator"}),this.nodesView.render()}else this.waitForInit(this.cNodes.bind(this))},dNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster)return!1===this.isCluster?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):void(0!==this.dbServers.length?(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"dbserver"}),this.nodesView.render()):this.navigate("#cNodes",{trigger:!0}));this.waitForInit(this.dNodes.bind(this))},sNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.scaleView=new window.ScaleView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0]}),this.scaleView.render()}else this.waitForInit(this.sNodes.bind(this))},addAuth:function(e){var t=this.clusterPlan.get("user");if(!t)return e.abort(),void(this.isCheckingUser||this.requestAuth());var i=t.name,n=t.passwd,o=i.concat(":",n);e.setRequestHeader("Authorization","Basic "+btoa(o))},logger:function(e){if(this.checkUser(),e){if(!this.loggerView){var t=new window.ArangoLogs({upto:!0,loglevel:4});this.loggerView=new window.LoggerView({collection:t})}this.loggerView.render()}else this.waitForInit(this.logger.bind(this))},applicationDetail:function(e,t){if(this.checkUser(),t)if(this.foxxApiEnabled){var i=function(){this.hasOwnProperty("applicationDetailView")&&this.applicationDetailView.remove(),this.applicationDetailView=new window.ApplicationDetailView({model:this.foxxList.get(decodeURIComponent(e))}),this.applicationDetailView.model=this.foxxList.get(decodeURIComponent(e)),this.applicationDetailView.render("swagger")}.bind(this);0===this.foxxList.length?this.foxxList.fetch({cache:!1,success:function(){i()}}):i()}else this.navigate("#dashboard",{trigger:!0});else this.waitForInit(this.applicationDetail.bind(this),e)},storeDetail:function(e,t){if(this.checkUser(),t)if(this.foxxApiEnabled){var i=function(){this.hasOwnProperty("storeDetailView")&&this.storeDetailView.remove(),this.storeDetailView=new window.StoreDetailView({model:this.foxxRepo.get(decodeURIComponent(e)),collection:this.foxxList}),this.storeDetailView.model=this.foxxRepo.get(decodeURIComponent(e)),this.storeDetailView.render()}.bind(this);0===this.foxxRepo.length?this.foxxRepo.fetch({cache:!1,success:function(){i()}}):i()}else this.navigate("#dashboard",{trigger:!0});else this.waitForInit(this.storeDetail.bind(this),e)},login:function(){var e=function(e,t){this.loginView||(this.loginView=new window.LoginView({collection:this.userCollection})),e||null===t?this.loginView.render():this.loginView.render(!0)}.bind(this);this.userCollection.whoAmI(e)},collections:function(e){if(this.checkUser(),e){var t=this;this.collectionsView&&this.collectionsView.remove(),this.collectionsView=new window.CollectionsView({collection:this.arangoCollectionsStore}),this.arangoCollectionsStore.fetch({cache:!1,success:function(){t.collectionsView.render()}})}else this.waitForInit(this.collections.bind(this))},cIndices:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.indicesView&&i.indicesView.remove(),i.indicesView=new window.IndicesView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.indicesView.render()}}):this.waitForInit(this.cIndices.bind(this),e)},cSettings:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.settingsView=new window.SettingsView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.settingsView.render()}}):this.waitForInit(this.cSettings.bind(this),e)},cInfo:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.infoView=new window.InfoView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.infoView.render()}}):this.waitForInit(this.cInfo.bind(this),e)},documents:function(e,t,i){this.checkUser(),i?(this.documentsView&&this.documentsView.unbindEvents(),this.documentsView||(this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})),this.documentsView.setCollectionId(e,t),this.documentsView.render(),this.documentsView.delegateEvents()):this.waitForInit(this.documents.bind(this),e,t)},document:function(e,t,i){if(this.checkUser(),i){var n;this.documentView&&(this.documentView.defaultMode&&(n=this.documentView.defaultMode),this.documentView.remove()),this.documentView=new window.DocumentView({collection:this.arangoDocumentStore}),this.documentView.colid=e,this.documentView.defaultMode=n;var o=window.location.hash.split("/")[2],a=(o.split("%").length-1)%3;decodeURI(o)!==o&&0!=a&&(o=decodeURIComponent(o)),this.documentView.docid=o,this.documentView.render();var r=function(e,t){e?console.log("Error","Could not fetch collection type"):this.documentView.setType()}.bind(this);arangoHelper.collectionApiType(e,null,r)}else this.waitForInit(this.document.bind(this),e,t)},query:function(e){this.checkUser(),e?(this.queryView||(this.queryView=new window.QueryView({collection:this.queryCollection})),this.queryView.render()):this.waitForInit(this.query.bind(this))},graph:function(e,t){this.checkUser(),t?(this.graphViewer&&(this.graphViewer.graphSettingsView&&this.graphViewer.graphSettingsView.remove(),this.graphViewer.killCurrentGraph(),this.graphViewer.unbind(),this.graphViewer.remove()),this.graphViewer=new window.GraphViewer({name:e,documentStore:this.arangoDocumentStore,collection:new window.GraphCollection,userConfig:this.userConfig}),this.graphViewer.render()):this.waitForInit(this.graph.bind(this),e)},graphSettings:function(e,t){this.checkUser(),t?(this.graphSettingsView&&this.graphSettingsView.remove(),this.graphSettingsView=new window.GraphSettingsView({name:e,userConfig:this.userConfig}),this.graphSettingsView.render()):this.waitForInit(this.graphSettings.bind(this),e)},helpUs:function(e){this.checkUser(),e?(this.testView||(this.helpUsView=new window.HelpUsView({})),this.helpUsView.render()):this.waitForInit(this.helpUs.bind(this))},support:function(e){this.checkUser(),e?(this.testView||(this.supportView=new window.SupportView({})),this.supportView.render()):this.waitForInit(this.support.bind(this))},queryManagement:function(e){this.checkUser(),e?(this.queryManagementView&&this.queryManagementView.remove(),this.queryManagementView=new window.QueryManagementView({collection:void 0}),this.queryManagementView.render()):this.waitForInit(this.queryManagement.bind(this))},databases:function(e){if(this.checkUser(),e){var t=function(e){e?(arangoHelper.arangoError("DB","Could not get list of allowed databases"),this.navigate("#",{trigger:!0}),$("#databaseNavi").css("display","none"),$("#databaseNaviSelect").css("display","none")):(this.databaseView&&this.databaseView.remove(),this.databaseView=new window.DatabaseView({users:this.userCollection,collection:this.arangoDatabase}),this.databaseView.render())}.bind(this);arangoHelper.databaseAllowed(t)}else this.waitForInit(this.databases.bind(this))},dashboard:function(e){this.checkUser(),e?(void 0===this.dashboardView&&(this.dashboardView=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:this.arangoDatabase})),this.dashboardView.render()):this.waitForInit(this.dashboard.bind(this))},replication:function(e){this.checkUser(),e?(this.replicationView||(this.replicationView=new window.ReplicationView({})),this.replicationView.render()):this.waitForInit(this.replication.bind(this))},applier:function(e,t,i){this.checkUser(),i?(void 0===this.applierView&&(this.applierView=new window.ApplierView({})),this.applierView.endpoint=atob(e),this.applierView.database=atob(t),this.applierView.render()):this.waitForInit(this.applier.bind(this),e,t)},graphManagement:function(e){this.checkUser(),e?(this.graphManagementView&&this.graphManagementView.undelegateEvents(),this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render()):this.waitForInit(this.graphManagement.bind(this))},showGraph:function(e,t){this.checkUser(),t?this.graphManagementView?this.graphManagementView.loadGraphViewer(e):(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render(e,!0)):this.waitForInit(this.showGraph.bind(this),e)},applications:function(e){this.checkUser(),e?this.foxxApiEnabled?(void 0===this.applicationsView&&(this.applicationsView=new window.ApplicationsView({collection:this.foxxList})),this.applicationsView.reload()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.applications.bind(this))},installService:function(e){this.checkUser(),e?this.foxxApiEnabled?frontendConfig.foxxStoreEnabled?(window.modalView.clearValidators(),this.serviceInstallView&&this.serviceInstallView.remove(),this.serviceInstallView=new window.ServiceInstallView({collection:this.foxxRepo,functionsCollection:this.foxxList}),this.serviceInstallView.render()):this.navigate("#services/install/upload",{trigger:!0}):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installService.bind(this))},installNewService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceNewView&&this.serviceNewView.remove(),this.serviceNewView=new window.ServiceInstallNewView({collection:this.foxxList}),this.serviceNewView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installNewService.bind(this))},installGitHubService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceGitHubView&&this.serviceGitHubView.remove(),this.serviceGitHubView=new window.ServiceInstallGitHubView({collection:this.foxxList}),this.serviceGitHubView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installGitHubService.bind(this))},installUrlService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceUrlView&&this.serviceUrlView.remove(),this.serviceUrlView=new window.ServiceInstallUrlView({collection:this.foxxList}),this.serviceUrlView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installUrlService.bind(this))},installUploadService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceUploadView&&this.serviceUploadView.remove(),this.serviceUploadView=new window.ServiceInstallUploadView({collection:this.foxxList}),this.serviceUploadView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installUploadService.bind(this))},handleSelectDatabase:function(e){this.checkUser(),e?this.naviView.handleSelectDatabase():this.waitForInit(this.handleSelectDatabase.bind(this))},handleResize:function(){this.dashboardView&&this.dashboardView.resize(),this.graphManagementView&&"graphs"===Backbone.history.getFragment()&&this.graphManagementView.handleResize($("#content").width()),this.queryView&&"queries"===Backbone.history.getFragment()&&this.queryView.resize(),this.naviView&&this.naviView.resize(),this.graphViewer&&-1'),window.parseVersions=function(e){_.isEmpty(e)?$("#currentVersion").addClass("up-to-date"):($("#currentVersion").addClass("out-of-date"),$("#currentVersion .fa").removeClass("fa-check-circle").addClass("fa-exclamation-circle"),$("#currentVersion").click(function(){!function(e,t){var i=[];i.push(window.modalView.createSuccessButton("Download Page",function(){window.open("https://www.arangodb.com/download","_blank"),window.modalView.hide()}));var n=[],o=window.modalView.createReadOnlyEntry.bind(window.modalView);n.push(o("current","Current",e.toString())),t.major&&n.push(o("major","Major",t.major.version)),t.minor&&n.push(o("minor","Minor",t.minor.version)),t.bugfix&&n.push(o("bugfix","Bugfix",t.bugfix.version)),window.modalView.show("modalTable.ejs","New Version Available",i,n)}(t,e)}))},$.ajax({type:"GET",async:!0,crossDomain:!0,timeout:3e3,dataType:"jsonp",url:"https://www.arangodb.com/repositories/versions.php?jsonp=parseVersions&version="+encodeURIComponent(t.toString()),error:function(e){200===e.status?window.activeInternetConnection=!0:window.activeInternetConnection=!1},success:function(e){window.activeInternetConnection=!0}})}})}}(),function(){"use strict";window.hasOwnProperty("TEST_BUILD")||($(document).ajaxSend(function(e,t,i){t.setRequestHeader("X-Arango-Frontend","true");var n=window.arangoHelper.getCurrentJwt();n&&t.setRequestHeader("Authorization","bearer "+n)}),$.ajaxSetup({error:function(e,t,i){401===e.status&&arangoHelper.checkJwt()}}),$(document).ready(function(){window.App=new window.Router,Backbone.history.start(),window.App.handleResize()}),$(document).click(function(e){e.stopPropagation(),$(e.target).hasClass("subBarDropdown")||$(e.target).hasClass("dropdown-header")||$(e.target).hasClass("dropdown-footer")||$(e.target).hasClass("toggle")||$("#userInfo").is(":visible")&&$(".subBarDropdown").hide()}),$("body").on("keyup",function(e){27===e.keyCode&&window.modalView&&window.modalView.hide()}))}(); \ No newline at end of file +!function(){"use strict";var i=null;window.isCoordinator=function(t){null===i?$.ajax("cluster/amICoordinator",{async:!0,success:function(e){t(!1,i=e)},error:function(e){t(!0,i=e)}}):t(!1,i)},window.versionHelper={fromString:function(e){var t=e.replace(/-[a-zA-Z0-9_-]*$/g,"").split(".");return{major:parseInt(t[0],10)||0,minor:parseInt(t[1],10)||0,patch:parseInt(t[2],10)||0,toString:function(){return this.major+"."+this.minor+"."+this.patch}}},toString:function(e){return e.major+"."+e.minor+"."+e.patch},toDocuVersion:function(e){return 0<=e.toLowerCase().indexOf("devel")||0<=e.toLowerCase().indexOf("rc")?"devel":e.substring(0,3)}},window.arangoHelper={alphabetColors:{a:"rgb(0,0,180)",b:"rgb(175,13,102)",c:"rgb(146,248,70)",d:"rgb(255,200,47)",e:"rgb(255,118,0)",f:"rgb(185,185,185)",g:"rgb(235,235,222)",h:"rgb(100,100,100)",i:"rgb(255,255,0)",j:"rgb(55,19,112)",k:"rgb(255,255,150)",l:"rgb(202,62,94)",m:"rgb(205,145,63)",n:"rgb(12,75,100)",o:"rgb(255,0,0)",p:"rgb(175,155,50)",q:"rgb(0,0,0)",r:"rgb(37,70,25)",s:"rgb(121,33,135)",t:"rgb(83,140,208)",u:"rgb(0,154,37)",v:"rgb(178,220,205)",w:"rgb(255,152,213)",x:"rgb(0,0,74)",y:"rgb(175,200,74)",z:"rgb(63,25,12)"},statusColors:{fatal:"#ad5148",info:"rgb(88, 214, 141)",error:"rgb(236, 112, 99)",warning:"#ffb075",debug:"rgb(64, 74, 83)"},getCurrentJwt:function(){return sessionStorage.getItem("jwt")},getCurrentJwtUsername:function(){return sessionStorage.getItem("jwtUser")},setCurrentJwt:function(e,t){sessionStorage.setItem("jwt",e),sessionStorage.setItem("jwtUser",t)},checkJwt:function(){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,error:function(e){401===e.status&&window.App.navigate("login",{trigger:!0})}})},getCoordinatorShortName:function(i){var n;return window.clusterHealth&&_.each(window.clusterHealth,function(e,t){i===t&&(n=e.ShortName)}),arangoHelper.escapeHtml(n)},getDatabaseShortName:function(e){return this.getCoordinatorShortName(e)},getDatabaseServerId:function(i){var n;return window.clusterHealth&&_.each(window.clusterHealth,function(e,t){i===e.ShortName&&(n=t)}),n},lastNotificationMessage:null,CollectionTypes:{},systemAttributes:function(){return{_id:!0,_rev:!0,_key:!0,_bidirectional:!0,_vertices:!0,_from:!0,_to:!0,$id:!0}},getCurrentSub:function(){return window.App.naviView.activeSubMenu},parseError:function(e,t){var i;try{i=JSON.parse(t.responseText).errorMessage}catch(e){i=e}this.arangoError(e,i)},setCheckboxStatus:function(e){_.each($(e).find("ul").find("li"),function(e){$(e).hasClass("nav-header")||($(e).find("input").attr("checked")?$(e).find("i").hasClass("css-round-label")?($(e).find("i").removeClass("fa-circle-o"),$(e).find("i").addClass("fa-dot-circle-o")):($(e).find("i").removeClass("fa-square-o"),$(e).find("i").addClass("fa-check-square-o")):$(e).find("i").hasClass("css-round-label")?($(e).find("i").removeClass("fa-dot-circle-o"),$(e).find("i").addClass("fa-circle-o")):($(e).find("i").removeClass("fa-check-square-o"),$(e).find("i").addClass("fa-square-o")))})},parseInput:function(e){var t,i=$(e).val();try{t=JSON.parse(i)}catch(e){t=i}return t},calculateCenterDivHeight:function(){var e=$(".navbar").height(),t=$(".footer").height();return $(window).height()-t-e-110},createTooltips:function(e,t){var i=this,n={arrow:!0,multiple:!1,content:function(e){var t=e.getAttribute("title");return e.removeAttribute("title"),t}};if(t&&(n.placement=t),"object"==typeof(e=e||".tippy"))_.each(e,function(e){i.lastTooltips=new tippy(e,n)});else{if(-1'+t+""),e.disabled||$("#subNavigationBar .bottom").children().last().bind("click",function(){window.App.navigate(e.route,{trigger:!0})})})},buildUserSubNav:function(e,t){var i={General:{route:"#user/"+encodeURIComponent(e)},Permissions:{route:"#user/"+encodeURIComponent(e)+"/permission"}};i[t].active=!0,this.buildSubNavBar(i)},buildGraphSubNav:function(e,t){var i={Content:{route:"#graph/"+encodeURIComponent(e)},Settings:{route:"#graph/"+encodeURIComponent(e)+"/settings"}};i[t].active=!0,this.buildSubNavBar(i)},buildNodeSubNav:function(e,t,i){var n={Dashboard:{route:"#node/"+encodeURIComponent(e)}};n[t].active=!0,n[i].disabled=!0,this.buildSubNavBar(n)},buildNodesSubNav:function(e,t){var i={Overview:{route:"#nodes"},Shards:{route:"#shards"}};i[e].active=!0,t&&(i[t].disabled=!0),this.buildSubNavBar(i)},buildServicesSubNav:function(e,t){var i={Store:{route:"#services/install"},Upload:{route:"#services/install/upload"},New:{route:"#services/install/new"},GitHub:{route:"#services/install/github"},Remote:{route:"#services/install/remote"}};frontendConfig.foxxStoreEnabled||delete i.Store,i[e].active=!0,t&&(i[t].disabled=!0),this.buildSubNavBar(i)},scaleability:void 0,buildCollectionSubNav:function(e,t){var i={Content:{route:"#collection/"+encodeURIComponent(e)+"/documents/1"},Indexes:{route:"#cIndices/"+encodeURIComponent(e)},Info:{route:"#cInfo/"+encodeURIComponent(e)},Settings:{route:"#cSettings/"+encodeURIComponent(e)}};i[t].active=!0,this.buildSubNavBar(i)},enableKeyboardHotkeys:function(e){var t=window.arangoHelper.hotkeysFunctions;!0===e&&($(document).on("keydown",null,"j",t.scrollDown),$(document).on("keydown",null,"k",t.scrollUp))},databaseAllowed:function(i){var e=function(e,t){e?arangoHelper.arangoError("",""):$.ajax({type:"GET",cache:!1,url:this.databaseUrl("/_api/database/",t),contentType:"application/json",processData:!1,success:function(){i(!1,!0)},error:function(){i(!0,!1)}})}.bind(this);this.currentDatabase(e)},arangoNotification:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"success"})},arangoError:function(e,t,i){$("#offlinePlaceholder").is(":visible")||window.App.notificationList.add({title:e,content:t,info:i,type:"error"})},arangoWarning:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"warning"})},arangoMessage:function(e,t,i){window.App.notificationList.add({title:e,content:t,info:i,type:"message"})},hideArangoNotifications:function(){$.noty.clearQueue(),$.noty.closeAll()},openDocEditor:function(e,t,i){var n=e.split("/"),o=this,a=new window.DocumentView({collection:window.App.arangoDocumentStore});a.breadcrumb=function(){},a.colid=n[0],a.docid=n[1],a.el=".arangoFrame .innerDiv",a.render(),a.setType(t),$(".arangoFrame .headerBar").remove(),$(".arangoFrame .outerDiv").prepend(''),$(".arangoFrame .outerDiv").click(function(){o.closeDocEditor()}),$(".arangoFrame .innerDiv").click(function(e){e.stopPropagation()}),$(".fa-times").click(function(){o.closeDocEditor()}),$(".arangoFrame").show(),a.customView=!0,a.customDeleteFunction=function(){window.modalView.hide(),$(".arangoFrame").hide()},a.customSaveFunction=function(e){o.closeDocEditor(),i&&i(e)},$(".arangoFrame #deleteDocumentButton").click(function(){a.deleteDocumentModal()}),$(".arangoFrame #saveDocumentButton").click(function(){a.saveDocument()}),$(".arangoFrame #deleteDocumentButton").css("display","none")},closeDocEditor:function(){$(".arangoFrame .outerDiv .fa-times").remove(),$(".arangoFrame").hide()},addAardvarkJob:function(e,t){$.ajax({cache:!1,type:"POST",url:this.databaseUrl("/_admin/aardvark/job"),data:JSON.stringify(e),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},deleteAardvarkJob:function(e,t){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job/"+encodeURIComponent(e)),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},deleteAllAardvarkJobs:function(t){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},getAardvarkJobs:function(t){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(e){t&&t(!1,e)},error:function(e){t&&t(!0,e)}})},getPendingJobs:function(t){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_api/job/pending"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(e){t(!0,e)}})},syncAndReturnUnfinishedAardvarkJobs:function(a,r){var e=function(e,t){if(e)r(!0);else{var i=function(e,n){if(e)arangoHelper.arangoError("","");else{var o=[];0/g,">").replace(/"/g,""").replace(/'/g,"'")},backendUrl:function(e){return frontendConfig.basePath+e},databaseUrl:function(e,t){if("/_db/"===e.substr(0,5))throw new Error("Calling databaseUrl with a databased url ("+e+") doesn't make any sense");return t||(t="_system",frontendConfig.db&&(t=frontendConfig.db)),this.backendUrl("/_db/"+encodeURIComponent(t)+e)},showAuthDialog:function(){var e=!0;return"false"===localStorage.getItem("authenticationNotification")&&(e=!1),e},doNotShowAgain:function(){localStorage.setItem("authenticationNotification",!1)},renderEmpty:function(e,t){t?$("#content").html(''):$("#content").html('")},initSigma:function(){try{sigma.classes.graph.addMethod("neighbors",function(e){var t,i={},n=this.allNeighborsIndex[e]||{};for(t in n)i[t]=this.nodesIndex[t];return i}),sigma.classes.graph.addMethod("getNodeEdges",function(t){var e=this.edges(),i=[];return _.each(e,function(e){e.source!==t&&e.target!==t||i.push(e.id)}),i}),sigma.classes.graph.addMethod("getNodeEdgesCount",function(e){return this.allNeighborsCount[e]}),sigma.classes.graph.addMethod("getNodesCount",function(){return this.nodesArray.length})}catch(e){}},downloadLocalBlob:function(e,t){var i;if("csv"===t&&(i="text/csv; charset=utf-8"),"json"===t&&(i="application/json; charset=utf-8"),i){var n=new Blob([e],{type:i}),o=window.URL.createObjectURL(n),a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=o,a.download="results-"+window.frontendConfig.db+"."+t,a.click(),window.setTimeout(function(){window.URL.revokeObjectURL(o),document.body.removeChild(a)},500)}},download:function(e,r){$.ajax(e).success(function(e,t,i){if(r)r(e);else{var n=new Blob([JSON.stringify(e)],{type:i.getResponseHeader("Content-Type")||"application/octet-stream"}),o=window.URL.createObjectURL(n),a=document.createElement("a");document.body.appendChild(a),a.style="display: none",a.href=o,a.download=i.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),a.click(),window.setTimeout(function(){window.URL.revokeObjectURL(o),document.body.removeChild(a)},500)}})},downloadPost:function(e,t,i,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===this.readyState&&200===this.status){i&&i();var e=document.createElement("a");e.download=this.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),document.body.appendChild(e);var t=window.URL.createObjectURL(this.response);e.href=t,e.click(),window.setTimeout(function(){window.URL.revokeObjectURL(t),document.body.removeChild(e)},500)}else 4===this.readyState&&void 0!==n&&n(this.status,this.statusText)},o.open("POST",e),window.arangoHelper.getCurrentJwt()&&o.setRequestHeader("Authorization","bearer "+window.arangoHelper.getCurrentJwt()),o.responseType="blob",o.send(t)},checkCollectionPermissions:function(e,t){var i=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(window.App.userCollection.activeUser)+"/database/"+encodeURIComponent(frontendConfig.db)+"/"+encodeURIComponent(e));$.ajax({type:"GET",url:i,contentType:"application/json",success:function(e){"ro"===e.result&&t()},error:function(e){arangoHelper.arangoError("User","Could not fetch collection permissions.")}})},checkDatabasePermissions:function(t,i){var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(window.App.userCollection.activeUser)+"/database/"+encodeURIComponent(frontendConfig.db));$.ajax({type:"GET",url:e,contentType:"application/json",success:function(e){"ro"===e.result?t&&t(!0):"rw"===e.result?i&&i(!1):"none"===e.result&&(frontendConfig.authenticationEnabled||i&&i(!1))},error:function(e){arangoHelper.arangoError("User","Could not fetch collection permissions.")}})},getFoxxFlags:function(){var e={},t=$("#new-app-flag-replace")[0];t&&(e.replace=Boolean(t.checked));var i=$("#new-app-flag-teardown")[0];i&&(e.teardown=Boolean(i.checked));var n=$("#new-app-flag-setup")[0];return n&&(e.setup=Boolean(n.checked)),e},createMountPointModal:function(e,t,i){var n,o=[],a=[];window.App.replaceApp&&(n=(n=window.App.replaceAppData.mount).substr(1,n.length)),a.push(window.modalView.createTextEntry("new-app-mount","Mount point",n,"The path the app will be mounted. Is not allowed to start with _","mountpoint",!1,[{rule:Joi.string().required(),msg:""}])),window.App.replaceApp&&a.push(window.modalView.createCheckboxEntry("new-app-flag-teardown","Run teardown?",!0,"Should the existing service's teardown script be executed before replacing the service?",!1)),a.push(window.modalView.createCheckboxEntry("new-app-flag-setup","Run setup?",!0,"Should this service's setup script be executed after installing the service?",!0)),window.App.replaceApp?(a.push(window.modalView.createCheckboxEntry("new-app-flag-replace","Discard configuration and dependency files?",!0,"Should this service's existing configuration and settings be removed completely before replacing the service?",!1)),o.push(window.modalView.createSuccessButton("Replace",e))):o.push(window.modalView.createSuccessButton("Install",e));var r="Create Foxx Service";window.App.replaceApp&&(r="Replace Foxx Service ("+window.App.replaceAppData.mount+")"),window.modalView.show("modalTable.ejs",r,o,a),window.App.replaceApp?($("#new-app-mount").attr("disabled","true"),$("#new-app-replace").attr("checked",!1),$("#new-app-replace").on("click",function(){$("#new-app-replace").prop("checked")?$("#new-app-teardown").attr("disabled",!0):$("#new-app-teardown").attr("disabled",!1)})):window.modalView.modalBindValidation({id:"new-app-mount",validateInput:function(){return[{rule:Joi.string().regex(/(\/|^)APP(\/|$)/i,{invert:!0}),msg:"May not contain APP"},{rule:Joi.string().regex(/^([a-zA-Z0-9_\-/]+)+$/),msg:"Can only contain [a-zA-Z0-9_-/]"},{rule:Joi.string().regex(/([^_]|_open\/)/),msg:"Mountpoints with _ are reserved for internal use"},{rule:Joi.string().regex(/[^/]$/),msg:"May not end with /"},{rule:Joi.string().required().min(1),msg:"Has to be non-empty"}]}})}}}(),function(){"use strict";if(!window.hasOwnProperty("TEST_BUILD")){window.templateEngine=new function(){var e={createTemplate:function(t){$("#"+t.replace(".","\\.")).html();return{render:function(e){return window.JST["templates/"+t](e)}}}};return e}}}(),function(){"use strict";window.dygraphConfig={defaultFrame:12e5,zeropad:function(e){return e<10?"0"+e:e},xAxisFormat:function(e){if(-1===e)return"";var t=new Date(e);return this.zeropad(t.getHours())+":"+this.zeropad(t.getMinutes())+":"+this.zeropad(t.getSeconds())},mergeObjects:function(n,o,e){var t,a={};return(e=e||[]).forEach(function(e){var t=n[e],i=o[e];void 0===t&&(t={}),void 0===i&&(i={}),a[e]=_.extend(t,i)}),t=_.extend(n,o),Object.keys(a).forEach(function(e){t[e]=a[e]}),t},mapStatToFigure:{pageFaults:["times","majorPageFaultsPerSecond","minorPageFaultsPerSecond"],systemUserTime:["times","systemTimePerSecond","userTimePerSecond"],totalTime:["times","avgQueueTime","avgRequestTime","avgIoTime"],dataTransfer:["times","bytesSentPerSecond","bytesReceivedPerSecond"],requests:["times","getsPerSecond","putsPerSecond","postsPerSecond","deletesPerSecond","patchesPerSecond","headsPerSecond","optionsPerSecond","othersPerSecond"]},colors:["rgb(95, 194, 135)","rgb(238, 190, 77)","#81ccd8","#7ca530","#3c3c3c","#aa90bd","#e1811d","#c7d4b2","#d0b2d4"],figureDependedOptions:{clusterRequestsPerSecond:{showLabelsOnHighlight:!0,title:"",header:"Cluster Requests per Second",stackedGraph:!0,div:"lineGraphLegend",labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},pageFaults:{header:"Page Faults",visibility:[!0,!1],labels:["datetime","Major Page","Minor Page"],div:"pageFaultsChart",labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},systemUserTime:{div:"systemUserTimeChart",header:"System and User Time",labels:["datetime","System Time","User Time"],stackedGraph:!0,labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}},totalTime:{div:"totalTimeChart",header:"Total Time",labels:["datetime","Queue","Computation","I/O"],labelsKMG2:!1,axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}},stackedGraph:!0},dataTransfer:{header:"Data Transfer",labels:["datetime","Bytes sent","Bytes received"],stackedGraph:!0,div:"dataTransferChart"},requests:{header:"Requests",labels:["datetime","Reads","Writes"],stackedGraph:!0,div:"requestsChart",axes:{y:{valueFormatter:function(e){return parseFloat(e.toPrecision(3))},axisLabelFormatter:function(e){return 0===e?0:parseFloat(e.toPrecision(3))}}}}},getDashBoardFigures:function(t){var i=[],n=this;return Object.keys(this.figureDependedOptions).forEach(function(e){"clusterRequestsPerSecond"!==e&&(n.figureDependedOptions[e].div||t)&&i.push(e)}),i},getDefaultConfig:function(e){var t=this,i={digitsAfterDecimal:1,drawGapPoints:!0,fillGraph:!0,fillAlpha:.85,showLabelsOnHighlight:!1,strokeWidth:0,lineWidth:0,strokeBorderWidth:0,includeZero:!0,highlightCircleSize:2.5,labelsSeparateLines:!0,strokeBorderColor:"rgba(0,0,0,0)",interactionModel:{},maxNumberWidth:10,colors:[this.colors[0]],xAxisLabelWidth:"50",rightGap:15,showRangeSelector:!1,rangeSelectorHeight:50,rangeSelectorPlotStrokeColor:"#365300",rangeSelectorPlotFillColor:"",pixelsPerLabel:50,labelsKMG2:!0,dateWindow:[(new Date).getTime()-this.defaultFrame,(new Date).getTime()],axes:{x:{valueFormatter:function(e){return t.xAxisFormat(e)}},y:{ticker:Dygraph.numericLinearTicks}}};return this.figureDependedOptions[e]&&(i=this.mergeObjects(i,this.figureDependedOptions[e],["axes"])).div&&i.labels&&(i.colors=this.getColors(i.labels),i.labelsDiv=document.getElementById(i.div+"Legend"),i.legend="always",i.showLabelsOnHighlight=!0),i},getDetailChartConfig:function(e){var t=_.extend(this.getDefaultConfig(e),{showRangeSelector:!0,interactionModel:null,showLabelsOnHighlight:!0,highlightCircleSize:2.5,legend:"always",labelsDiv:"div#detailLegend.dashboard-legend-inner"});return"pageFaults"===e&&(t.visibility=[!0,!0]),t.labels||(t.labels=["datetime",t.header],t.colors=this.getColors(t.labels)),t},getColors:function(e){return this.colors.concat([]).slice(0,e.length-1)}}}(),function(){"use strict";window.arangoCollectionModel=Backbone.Model.extend({idAttribute:"name",urlRoot:arangoHelper.databaseUrl("/_api/collection"),defaults:{id:"",name:"",status:"",type:"",isSystem:!1,picture:"",locked:!1,desc:void 0},getProperties:function(t){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+encodeURIComponent(this.get("id"))+"/properties"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(e){t(!0,e)}})},getFigures:function(t){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/figures"),contentType:"application/json",processData:!1,success:function(e){t(!1,e)},error:function(){t(!0)}})},getRevision:function(t,i){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/revision"),contentType:"application/json",processData:!1,success:function(e){t(!1,e,i)},error:function(){t(!0)}})},getIndex:function(t){var i=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/index/?collection="+this.get("id")),contentType:"application/json",processData:!1,success:function(e){t(!1,e,i.get("id"))},error:function(e){t(!0,e,i.get("id"))}})},createIndex:function(e,n){var o=this;$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/index?collection="+o.get("id")),headers:{"x-arango-async":"store"},data:JSON.stringify(e),contentType:"application/json",processData:!1,success:function(e,t,i){i.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:i.getResponseHeader("x-arango-async-id"),type:"index",desc:"Creating Index",collection:o.get("id")}),n(!1,e)):n(!0,e)},error:function(e){n(!0,e)}})},deleteIndex:function(e,n){var o=this;$.ajax({cache:!1,type:"DELETE",url:arangoHelper.databaseUrl("/_api/index/"+this.get("name")+"/"+encodeURIComponent(e)),headers:{"x-arango-async":"store"},success:function(e,t,i){i.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:i.getResponseHeader("x-arango-async-id"),type:"index",desc:"Removing Index",collection:o.get("id")}),n(!1,e)):n(!0,e)},error:function(e){n(!0,e)}}),n()},truncateCollection:function(){var e=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/truncate"),success:function(){arangoHelper.arangoNotification("Collection truncated."),$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_admin/wal/flush?waitForSync=true&waitForCollector=true"),success:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+e.get("id")+"/rotate"),success:function(){},error:function(){}})},error:function(){}})},error:function(e){arangoHelper.arangoError("Collection error: "+e.responseJSON.errorMessage)}})},warmupCollection:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/loadIndexesIntoMemory"),success:function(){arangoHelper.arangoNotification("Loading indexes into memory.")},error:function(e){arangoHelper.arangoError("Collection error: "+e.responseJSON.errorMessage)}})},loadCollection:function(e){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/load"),success:function(){e(!1)},error:function(){e(!0)}}),e()},unloadCollection:function(e){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/unload?flush=true"),success:function(){e(!1)},error:function(){e(!0)}}),e()},renameCollection:function(e,t){var i=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/rename"),data:JSON.stringify({name:e}),contentType:"application/json",processData:!1,success:function(){i.set("name",e),t(!1)},error:function(e){t(!0,e)}})},changeCollection:function(e,t,i,n,o,a){"true"===e?e=!0:"false"===e&&(e=!1);var r={waitForSync:e,journalSize:parseInt(t,10),indexBuckets:parseInt(i,10)};return n&&(r.replicationFactor=parseInt(n,10)),o&&(r.minReplicationFactor=parseInt(o,10)),$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/properties"),data:JSON.stringify(r),contentType:"application/json",processData:!1,success:function(){a(!1)},error:function(e){a(!0,e)}}),!1}})}(),window.DatabaseModel=Backbone.Model.extend({idAttribute:"name",initialize:function(){},isNew:function(){"use strict";return!1},sync:function(e,t,i){"use strict";return"update"===e&&(e="create"),Backbone.sync(e,t,i)},url:arangoHelper.databaseUrl("/_api/database"),defaults:{}}),window.arangoDocumentModel=Backbone.Model.extend({initialize:function(){},urlRoot:arangoHelper.databaseUrl("/_api/document"),defaults:{_id:"",_rev:"",_key:""},getSorted:function(){"use strict";var t=this,e=Object.keys(t.attributes).sort(function(e,t){var i=arangoHelper.isSystemAttribute(e);return i!==arangoHelper.isSystemAttribute(t)?i?-1:1:e=this.getLastPageNumber()&&null!==this.totalAmount?this.page=this.getLastPageNumber()-1:this.page=e<1?0:e-1},getLastPageNumber:function(){return Math.max(Math.ceil(this.totalAmount/this.pagesize),1)},getOffset:function(){return this.page*this.pagesize},getPageSize:function(){return this.pagesize},setPageSize:function(e){if("all"===e)this.pagesize="all";else try{e=parseInt(e,10),this.pagesize=e}catch(e){}},setToFirst:function(){this.page=0},setToLast:function(){this.setPage(this.getLastPageNumber())},setToPrev:function(){this.setPage(this.getPage()-1)},setToNext:function(){this.setPage(this.getPage()+1)},setTotal:function(e){this.totalAmount=e},getTotal:function(){return this.totalAmount},setTotalMinusOne:function(){this.totalAmount--}})}(),window.ClusterStatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics",updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(e,t){this.host=t.host,window.App.registerForUpdate(this)}}),function(){"use strict";window.ArangoCollections=Backbone.Collection.extend({url:arangoHelper.databaseUrl("/_api/collection"),model:arangoCollectionModel,searchOptions:{searchPhrase:null,includeSystem:!1,includeDocument:!0,includeEdge:!0,includeLoaded:!0,includeUnloaded:!0,sortBy:"name",sortOrder:1},translateStatus:function(e){switch(e){case 0:return"corrupted";case 1:return"new born collection";case 2:return"unloaded";case 3:return"loaded";case 4:return"unloading";case 5:return"deleted";case 6:return"loading";default:return"unknown"}},translateTypePicture:function(e){var t="";switch(e){case"document":t+="fa-file-text-o";break;case"edge":t+="fa-share-alt";break;case"unknown":t+="fa-question";break;default:t+="fa-cogs"}return t},parse:function(e){var t=this;return _.each(e.result,function(e){e.isSystem=arangoHelper.isSystemCollection(e),e.type=arangoHelper.collectionType(e),e.status=t.translateStatus(e.status),e.picture=t.translateTypePicture(e.type)}),e.result},getPosition:function(e){var t,i=this.getFiltered(this.searchOptions),n=null,o=null;for(t=0;t
  • '),$(this.paginationDiv).append('
    ')}})}(),function(){"use strict";window.ApplicationDetailView=Backbone.View.extend({el:"#content",divs:["#readme","#swagger","#app-info","#sideinformation","#information","#settings"],navs:["#service-info","#service-api","#service-readme","#service-settings"],template:templateEngine.createTemplate("serviceDetailView.ejs"),remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click .open":"openApp","click .delete":"deleteApp","click #app-deps":"showDepsDialog","click #app-switch-mode":"toggleDevelopment","click #app-scripts [data-script]":"runScript","click #app-tests":"runTests","click #app-replace":"replaceApp","click #download-app":"downloadApp","click .subMenuEntries li":"changeSubview","click #jsonLink":"toggleSwagger","mouseenter #app-scripts":"showDropdown","mouseleave #app-scripts":"hideDropdown"},resize:function(e){e?$(".innerContent").css("height","auto"):($(".innerContent").height($(".centralRow").height()-150),$("#swagger iframe").height($(".centralRow").height()-150),$("#swagger #swaggerJsonContent").height($(".centralRow").height()-150))},toggleSwagger:function(){var e=function(e){$("#jsonLink").html("JSON"),this.jsonEditor.setValue(JSON.stringify(e,null,"\t"),1),$("#swaggerJsonContent").show(),$("#swagger iframe").hide()}.bind(this);if("Swagger"===$("#jsonLink").html()){var t=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")));arangoHelper.download(t,e)}else $("#swaggerJsonContent").hide(),$("#swagger iframe").show(),$("#jsonLink").html("Swagger")},changeSubview:function(e){if(_.each(this.navs,function(e){$(e).removeClass("active")}),$(e.currentTarget).addClass("active"),_.each(this.divs,function(e){$(".headerButtonBar").hide(),$(e).hide()}),"service-readme"===e.currentTarget.id)this.resize(!0),$("#readme").show();else if("service-api"===e.currentTarget.id){this.resize(),$("#swagger").show(),$("#swaggerIframe").remove();var t=window.location.pathname.split("/"),i=window.location.protocol+"//"+window.location.hostname+":"+window.location.port+"/"+t[1]+"/"+t[2]+"/_admin/aardvark/foxxes/docs/index.html?mount="+this.model.get("mount"),n=$("')},toggleViews:function(e){var t=this,i=e.currentTarget.id.split("-")[0];_.each(["community","documentation","swagger"],function(e){i!==e?$("#"+e).hide():("swagger"===i?(t.renderSwagger(),$("#swagger iframe").css("height","100%"),$("#swagger iframe").css("width","100%"),$("#swagger iframe").css("margin-top","-13px"),t.resize()):t.resize(!0),$("#"+e).show())}),$(".subMenuEntries").children().removeClass("active"),$("#"+i+"-support").addClass("active")}})}(),function(){"use strict";window.TableView=Backbone.View.extend({template:templateEngine.createTemplate("tableView.ejs"),loading:templateEngine.createTemplate("loadingTableView.ejs"),initialize:function(e){this.rowClickCallback=e.rowClick},events:{"click .pure-table-body .pure-table-row":"rowClick","click .deleteButton":"removeClick"},rowClick:function(e){this.hasOwnProperty("rowClickCallback")&&this.rowClickCallback(e)},removeClick:function(e){this.hasOwnProperty("removeClickCallback")&&(this.removeClickCallback(e),e.stopPropagation())},setRowClick:function(e){this.rowClickCallback=e},setRemoveClick:function(e){this.removeClickCallback=e},render:function(){$(this.el).html(this.template.render({docs:this.collection}))},drawLoading:function(){$(this.el).html(this.loading.render({}))}})}(),function(){"use strict";window.UserBarView=Backbone.View.extend({events:{"change #userBarSelect":"navigateBySelect","click .tab":"navigateByTab","mouseenter .dropdown":"showDropdown","mouseleave .dropdown":"hideDropdown","click #userLogoutIcon":"userLogout","click #userLogout":"userLogout"},initialize:function(e){arangoHelper.checkDatabasePermissions(this.setUserCollectionMode.bind(this)),this.userCollection=e.userCollection,this.userCollection.fetch({cache:!1,async:!0}),this.userCollection.bind("change:extra",this.render.bind(this))},setUserCollectionMode:function(e){e&&(this.userCollection.authOptions.ro=!0)},template:templateEngine.createTemplate("userBarView.ejs"),navigateBySelect:function(){var e=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(e,{trigger:!0})},navigateByTab:function(e){var t=e.target||e.srcElement,i=(t=$(t).closest("a")).attr("id");if("user"===i)return $("#user_dropdown").slideToggle(200),void e.preventDefault();window.App.navigate(i,{trigger:!0}),e.preventDefault()},toggleUserMenu:function(){$("#userBar .subBarDropdown").toggle()},showDropdown:function(){$("#user_dropdown").fadeIn(1)},hideDropdown:function(){$("#user_dropdown").fadeOut(1)},render:function(){if(!1!==frontendConfig.authenticationEnabled){var s=this;$("#userBar").on("click",function(){s.toggleUserMenu()}),this.userCollection.whoAmI(function(e,t){if(e)arangoHelper.arangoErro("User","Could not fetch user.");else{var i=null,n=null,o=!1,a=null;if(!1!==t){var r=function(){return frontendConfig.ldapEnabled&&s.userCollection.add({name:window.App.currentUser,user:window.App.currentUser,username:window.App.currentUser,active:!0,img:void 0}),(a=s.userCollection.findWhere({user:t})).set({loggedIn:!0}),n=a.get("extra").name,i=a.get("extra").img,o=a.get("active"),i=i?"https://s.gravatar.com/avatar/"+i+"?s=80":"img/default_user.png",n=n||"",s.$el=$("#userBar"),s.$el.html(s.template.render({img:i,name:n,username:t,active:o})),s.delegateEvents(),s.$el};0===s.userCollection.models.length?s.userCollection.fetch({success:function(){r()}}):r()}}})}},userLogout:function(){var e=function(e){e?arangoHelper.arangoError("User","Logout error"):this.userCollection.logout()}.bind(this);this.userCollection.whoAmI(e)}})}(),function(){"use strict";window.UserManagementView=Backbone.View.extend({el:"#content",el2:"#userManagementThumbnailsIn",template:templateEngine.createTemplate("userManagementView.ejs"),remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #createUser":"createUser","click #submitCreateUser":"submitCreateUser","click #userManagementThumbnailsIn .tile":"editUser","click #submitEditUser":"submitEditUser","click #userManagementToggle":"toggleView","keyup #userManagementSearchInput":"search","click #userManagementSearchSubmit":"search","click #callEditUserPassword":"editUserPassword","click #submitEditUserPassword":"submitEditUserPassword","click #submitEditCurrentUserProfile":"submitEditCurrentUserProfile","click .css-label":"checkBoxes","change #userSortDesc":"sorting"},dropdownVisible:!1,initialize:function(){var e=this,t=function(e,t){!0===frontendConfig.authenticationEnabled&&(e||null===t?arangoHelper.arangoError("User","Could not fetch user data"):this.currentUser=this.collection.findWhere({user:t}))}.bind(this);this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.collection.whoAmI(t)}})},checkBoxes:function(e){var t=e.currentTarget.id;$("#"+t).click()},sorting:function(){$("#userSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#userManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},render:function(e){var t=!1;$("#userManagementDropdown").is(":visible")&&(t=!0);var i=function(){this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:""})),!0===t&&($("#userManagementDropdown2").show(),$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown").show()),e&&this.editCurrentUser(),arangoHelper.setCheckboxStatus("#userManagementDropdown")}.bind(this);return this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){i()}}),this},search:function(){var e,t,i,n;e=$("#userManagementSearchInput"),t=arangoHelper.escapeHtml($("#userManagementSearchInput").val()),n=this.collection.filter(function(e){return-1!==e.get("user").indexOf(t)}),$(this.el).html(this.template.render({collection:n,searchString:t})),i=(e=$("#userManagementSearchInput")).val().length,e.focus(),e[0].setSelectionRange(i,i)},createUser:function(e){e.preventDefault(),this.createCreateUserModal()},submitCreateUser:function(){var e=this,t=$("#newUsername").val(),i=$("#newName").val(),n=$("#newPassword").val(),o=$("#newStatus").is(":checked");if(this.validateUserInfo(i,t,n,o)){var a={user:t,passwd:n,active:o,extra:{name:i}};frontendConfig.isEnterprise&&$("#newRole").is(":checked")&&(a.user=":role:"+t,delete a.passwd),this.collection.create(a,{wait:!0,error:function(e,t){arangoHelper.parseError("User",t,e)},success:function(){e.updateUserManagement(),window.modalView.hide()}})}},validateUserInfo:function(e,t,i,n){return""!==t||(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1)},updateUserManagement:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.render()}})},editUser:function(e){if("createUser"!==$(e.currentTarget).find("a").attr("id")){$(e.currentTarget).hasClass("tile")&&($(e.currentTarget).find(".fa").attr("id")?e.currentTarget=$(e.currentTarget).find(".fa"):e.currentTarget=$(e.currentTarget).find(".icon")),this.collection.fetch({fetchAllUsers:!0,cache:!1});var t=this.evaluateUserName($(e.currentTarget).attr("id"),"_edit-user");""===t&&(t=$(e.currentTarget).attr("id")),window.App.navigate("user/"+encodeURIComponent(t),{trigger:!0})}},toggleView:function(){$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown2").slideToggle(200)},createCreateUserModal:function(){var e=[],t=[];t.push(window.modalView.createTextEntry("newUsername","Username","",!1,"Username",!0,[{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No username given."}])),t.push(window.modalView.createTextEntry("newName","Name","",!1,"Name",!1)),t.push(window.modalView.createPasswordEntry("newPassword","Password","",!1,"",!1)),frontendConfig.isEnterprise&&t.push(window.modalView.createCheckboxEntry("newRole","Role",!1,!1,!1)),t.push(window.modalView.createCheckboxEntry("newStatus","Active","active",!1,!0)),e.push(window.modalView.createSuccessButton("Create",this.submitCreateUser.bind(this))),window.modalView.show("modalTable.ejs","Create New User",e,t),frontendConfig.isEnterprise&&$("#newRole").on("change",function(){$("#newRole").is(":checked")?$("#newPassword").attr("disabled",!0):$("#newPassword").attr("disabled",!1)})},evaluateUserName:function(e,t){if(e){var i=e.lastIndexOf(t);return e.substring(0,i)}},updateUserProfile:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,cache:!1,success:function(){e.render()}})}})}(),function(){"use strict";window.UserPermissionView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("userPermissionView.ejs"),initialize:function(e){this.username=e.username},remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #userPermissionView .dbCheckbox":"setDBPermission","click #userPermissionView .collCheckbox":"setCollPermission","click .db-row":"toggleAccordion"},render:function(e,t){var i=this;this.collection.fetch({fetchAllUsers:!0,success:function(){i.continueRender(e,t)}})},toggleAccordion:function(e){if(!($(e.target).attr("type")||$(e.target).parent().hasClass("noAction")||$(e.target).hasClass("inner")||$(e.target).is("span"))){var t=$(e.currentTarget).find(".collection-row").is(":visible"),i=$(e.currentTarget).attr("id").split("-")[0];$(".collection-row").hide(),$(".db-label").css("font-weight",200),$(".db-label").css("color","#8a969f"),4<$(e.currentTarget).find(".collection-row").children().length?($(".db-row .fa-caret-down").hide(),$(".db-row .fa-caret-right").show(),t?$(e.currentTarget).find(".collection-row").hide():($(e.currentTarget).find(".collection-row").fadeIn("fast"),$(e.currentTarget).find(".db-label").css("font-weight",600),$(e.currentTarget).find(".db-label").css("color","rgba(64, 74, 83, 1)"),$(e.currentTarget).find(".fa-caret-down").show(),$(e.currentTarget).find(".fa-caret-right").hide())):($(".db-row .fa-caret-down").hide(),$(".db-row .fa-caret-right").show(),arangoHelper.arangoNotification("Permissions",'No collections in "'+i+'" available.'))}},setCollPermission:function(e){var t,i=$(e.currentTarget).attr("db"),n=$(e.currentTarget).attr("collection");t=$(e.currentTarget).hasClass("readOnly")?"ro":$(e.currentTarget).hasClass("readWrite")?"rw":$(e.currentTarget).hasClass("noAccess")?"none":"undefined",this.sendCollPermission(this.currentUser.get("user"),i,n,t)},setDBPermission:function(e){var t,i=$(e.currentTarget).attr("name");if(t=$(e.currentTarget).hasClass("readOnly")?"ro":$(e.currentTarget).hasClass("readWrite")?"rw":$(e.currentTarget).hasClass("noAccess")?"none":"undefined","_system"===i){var n=[],o=[];o.push(window.modalView.createReadOnlyEntry("db-system-revoke-button","Caution","You are changing the _system database permission. Really continue?",void 0,void 0,!1)),n.push(window.modalView.createSuccessButton("Ok",this.sendDBPermission.bind(this,this.currentUser.get("user"),i,t))),n.push(window.modalView.createCloseButton("Cancel",this.rollbackInputButton.bind(this,i))),window.modalView.show("modalTable.ejs","Change _system Database Permission",n,o)}else this.sendDBPermission(this.currentUser.get("user"),i,t)},rollbackInputButton:function(e,t){var i;_.each($(".collection-row"),function(e,t){$(e).is(":visible")&&(i=$(e).parent().attr("id"))}),i?this.render(i,t):this.render(),window.modalView.hide()},sendCollPermission:function(e,t,i,n){var o=this;"undefined"===n?this.revokeCollPermission(e,t,i):$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)+"/"+encodeURIComponent(i)),contentType:"application/json",data:JSON.stringify({grant:n})}).success(function(e){o.styleDefaultRadios(null,!0)}).error(function(e){o.rollbackInputButton(null,e)})},revokeCollPermission:function(e,t,i){var n=this;$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)+"/"+encodeURIComponent(i)),contentType:"application/json"}).success(function(e){n.styleDefaultRadios(null,!0)}).error(function(e){n.rollbackInputButton(null,e)})},sendDBPermission:function(e,t,i){var n=this;"undefined"===i?this.revokeDBPermission(e,t):$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)),contentType:"application/json",data:JSON.stringify({grant:i})}).success(function(e){n.styleDefaultRadios(null,!0)}).error(function(e){n.rollbackInputButton(null,e)})},revokeDBPermission:function(e,t){var i=this;$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(e)+"/database/"+encodeURIComponent(t)),contentType:"application/json"}).success(function(e){i.styleDefaultRadios(null,!0)}).error(function(e){i.rollbackInputButton(null,e)})},continueRender:function(t,i){var n=this;this.currentUser=this.collection.findWhere({user:this.username});var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(n.currentUser.get("user"))+"/database?full=true");$.ajax({type:"GET",url:e,contentType:"application/json",success:function(e){n.finishRender(e.result,t,i)},error:function(e){arangoHelper.arangoError("User","Could not fetch user permissions")}})},finishRender:function(e,t,i){var n=_.pairs(e);n.sort(),n=_.object(n),$(this.el).html(this.template.render({permissions:n})),$(".noAction").first().appendTo(".pure-table-body"),$(".pure-table-body").height(window.innerHeight-200),t&&$("#"+t).click(),i&&i.responseJSON&&i.responseJSON.errorMessage&&arangoHelper.arangoError("User",i.responseJSON.errorMessage),this.styleDefaultRadios(e),arangoHelper.createTooltips(),this.checkRoot(),this.breadcrumb()},checkRoot:function(){"root"===this.currentUser.get("user")&&$("#_system-db #___-collection input").attr("disabled","true")},styleDefaultRadios:function(e,t){function i(e){$(".db-row input").css("box-shadow","none");var o="rgba(0, 0, 0, 0.3) 0px 1px 4px 4px";_.each(e,function(e,i){if(e.collections){var n=e.collections["*"];_.each(e.collections,function(e,t){"_"!==t.charAt(0)&&"*"!==t.charAt(0)&&"undefined"===e&&("rw"===n?$("#"+i+"-db #"+t+"-collection .readWrite").css("box-shadow",o):"ro"===n?$("#"+i+"-db #"+t+"-collection .readOnly").css("box-shadow",o):"none"===n&&$("#"+i+"-db #"+t+"-collection .noAccess").css("box-shadow",o))})}})}if(t){var n=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.currentUser.get("user"))+"/database?full=true");$.ajax({type:"GET",url:n,contentType:"application/json",success:function(e){i(e.result)},error:function(e){arangoHelper.arangoError("User","Could not fetch user permissions")}})}else i(e);window.modalView.hide()},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("User: "+arangoHelper.escapeHtml(this.currentUser.get("user"))),arangoHelper.buildUserSubNav(e.currentUser.get("user"),"Permissions")):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.UserView=Backbone.View.extend({el:"#content",initialize:function(e){this.username=e.username},render:function(){var e=this;this.collection.fetch({fetchAllUsers:!0,success:function(){e.continueRender()}})},editCurrentUser:function(){this.createEditCurrentUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("extra").img)},continueRender:function(){this.currentUser=this.collection.findWhere({user:this.username}),this.breadcrumb(),this.currentUser.get("loggedIn")?this.editCurrentUser():this.createEditUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("active"))},createEditUserPasswordModal:function(){var e=[],t=[];t.push(window.modalView.createPasswordEntry("newCurrentPassword","New Password","",!1,"new password",!1)),t.push(window.modalView.createPasswordEntry("confirmCurrentPassword","Confirm New Password","",!1,"confirm new password",!1)),e.push(window.modalView.createSuccessButton("Save",this.submitEditUserPassword.bind(this))),window.modalView.show("modalTable.ejs","Edit User Password",e,t)},createEditCurrentUserModal:function(e,t,i){var n=[],o=[];o.push(window.modalView.createReadOnlyEntry("id_username","Username",e)),o.push(window.modalView.createTextEntry("editCurrentName","Name",t,!1,"Name",!1)),o.push(window.modalView.createTextEntry("editCurrentUserProfileImg","Gravatar account (Mail)",i,"Mailaddress or its md5 representation of your gravatar account.The address will be converted into a md5 string. Only the md5 string will be stored, not the mailaddress.","myAccount(at)gravatar.com")),":role:"===this.username.substring(0,6)?n.push(window.modalView.createDisabledButton("Change Password")):n.push(window.modalView.createNotificationButton("Change Password",this.editUserPassword.bind(this))),n.push(window.modalView.createSuccessButton("Save",this.submitEditCurrentUserProfile.bind(this))),window.modalView.show("modalTable.ejs","Edit User Profile",n,o,null,null,this.events,null,null,"content")},parseImgString:function(e){return-1===e.indexOf("@")?e:CryptoJS.MD5(e).toString()},createEditUserModal:function(e,t,i){var n,o;o=[{type:window.modalView.tables.READONLY,label:"Username",value:_.escape(e)},{type:window.modalView.tables.TEXT,label:"Name",value:_.escape(t),id:"editName",placeholder:"Name"},{type:window.modalView.tables.CHECKBOX,label:"Active",value:"active",checked:i,id:"editStatus"}],(n=[]).push({title:"Delete",type:window.modalView.buttons.DELETE,callback:this.submitDeleteUser.bind(this,e)}),":role:"===this.username.substring(0,6)?n.push({title:"Change Password",type:window.modalView.buttons.DISABLED,callback:this.createEditUserPasswordModal.bind(this,e)}):n.push({title:"Change Password",type:window.modalView.buttons.NOTIFICATION,callback:this.createEditUserPasswordModal.bind(this,e)}),n.push({title:"Save",type:window.modalView.buttons.SUCCESS,callback:this.submitEditUser.bind(this,e)}),window.modalView.show("modalTable.ejs","Edit User",n,o,null,null,this.events,null,null,"content")},validateStatus:function(e){return""!==e},submitDeleteUser:function(e){this.collection.findWhere({user:e}).destroy({wait:!0}),window.App.navigate("#users",{trigger:!0})},submitEditCurrentUserProfile:function(){var e=$("#editCurrentName").val(),t=$("#editCurrentUserProfileImg").val();t=this.parseImgString(t);var i=function(e){e?arangoHelper.arangoError("User","Could not edit user settings"):(arangoHelper.arangoNotification("User","Changes confirmed."),this.updateUserProfile())}.bind(this);this.currentUser.setExtras(e,t,i),window.modalView.hide()},submitEditUserPassword:function(){var e=$("#newCurrentPassword").val(),t=$("#confirmCurrentPassword").val();$("#newCurrentPassword").val(""),$("#confirmCurrentPassword").val(""),$("#newCurrentPassword").closest("th").css("backgroundColor","white"),$("#confirmCurrentPassword").closest("th").css("backgroundColor","white");var i=!1;e!==t&&(arangoHelper.arangoError("User","New passwords do not match."),i=!0),i||(this.currentUser.setPassword(e),arangoHelper.arangoNotification("User","Password changed."),window.modalView.hide())},editUserPassword:function(){window.modalView.hide(),this.createEditUserPasswordModal()},submitEditUser:function(e){var t=$("#editName").val(),i=$("#editStatus").is(":checked");if(this.validateStatus(i)){var n=this.collection.findWhere({user:e});n.save({extra:{name:t},active:i},{type:"PATCH",success:function(){arangoHelper.arangoNotification("User",n.get("user")+" updated.")},error:function(){arangoHelper.arangoError("User","Could not update "+n.get("user")+".")}})}else $("#editStatus").closest("th").css("backgroundColor","red")},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("User: "+_.escape(this.username)),arangoHelper.buildUserSubNav(e.currentUser.get("user"),"General")):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.ViewsView=Backbone.View.extend({el:"#content",readOnly:!1,template:templateEngine.createTemplate("viewsView.ejs"),initialize:function(){},refreshRate:1e4,sortOptions:{desc:!1},searchString:"",remove:function(){return this.$el.empty().off(),this.stopListening(),this.unbind(),delete this.el,this},events:{"click #createView":"createView","click #viewsToggle":"toggleSettingsDropdown","click .tile-view":"gotoView","keyup #viewsSearchInput":"search","click #viewsSearchSubmit":"search","click #viewsSortDesc":"sorting"},checkVisibility:function(){$("#viewsDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,arangoHelper.setCheckboxStatus("#viewsDropdown")},checkIfInProgress:function(){if(-1&'"]/)),e.push(window.modalView.createDeleteButton("Delete",this.deleteViewTrue.bind(this))),window.modalView.show("modalTable.ejs","Delete View",e,t)},deleteViewTrue:function(){this.model.deleteView(function(e,t){e?arangoHelper.arangoError("View","Could not delete the view."):(window.modalView.hide(),window.App.navigate("#views",{trigger:!0}))})},renameView:function(){var e=[],t=[];t.push(window.modalView.createTextEntry("editCurrentName","Name",this.name,!1,"Name",!1)),e.push(window.modalView.createSuccessButton("Rename",this.renameViewTrue.bind(this))),window.modalView.show("modalTable.ejs","Rename View",e,t)},renameViewTrue:function(){var t=this;$("#editCurrentName").val()?$.ajax({type:"PUT",cache:!1,url:arangoHelper.databaseUrl("/_api/view/"+encodeURIComponent(t.name)+"/rename"),contentType:"application/json",processData:!1,data:JSON.stringify({name:$("#editCurrentName").val()}),success:function(e){t.name=e.name,t.model.set("name",e.name),t.breadcrumb(),window.modalView.hide()},error:function(e){window.modalView.hide(),arangoHelper.arangoError("View",e.responseJSON.errorMessage)}}):arangoHelper.arangoError("View","Please fill in a view name.")},breadcrumb:function(){var e=this;window.App.naviView?($("#subNavigationBar .breadcrumb").html("View: "+arangoHelper.escapeHtml(e.name)),window.setTimeout(function(){$("#subNavigationBar .breadcrumb").html("View: "+arangoHelper.escapeHtml(e.name)),e.checkIfInProgress()},100)):window.setTimeout(function(){e.breadcrumb()},100)}})}(),function(){"use strict";window.Router=Backbone.Router.extend({toUpdate:[],dbServers:[],isCluster:void 0,foxxApiEnabled:void 0,lastRoute:void 0,routes:{"":"cluster",dashboard:"dashboard",replication:"replication","replication/applier/:endpoint/:database":"applier",collections:"collections",new:"newCollection",login:"login","collection/:colid/documents/:pageid":"documents","cIndices/:colname":"cIndices","cSettings/:colname":"cSettings","cInfo/:colname":"cInfo","collection/:colid/:docid":"document",shell:"shell",queries:"query",databases:"databases",settings:"databases",services:"applications","services/install":"installService","services/install/new":"installNewService","services/install/github":"installGitHubService","services/install/upload":"installUploadService","services/install/remote":"installUrlService","service/:mount":"applicationDetail","store/:name":"storeDetail",graphs:"graphManagement","graphs/:name":"showGraph",users:"userManagement","user/:name":"userView","user/:name/permission":"userPermission",userProfile:"userProfile",cluster:"cluster",nodes:"nodes",shards:"shards","node/:name":"node","nodeInfo/:id":"nodeInfo",logs:"logger",helpus:"helpUs",views:"views","view/:name":"view","graph/:name":"graph","graph/:name/settings":"graphSettings",support:"support"},execute:function(e,t){if("#queries"===this.lastRoute&&(this.queryView.removeInputEditors(),this.queryView.cleanupGraphs(),this.queryView.removeResults()),this.lastRoute){var i=this.lastRoute.split("/")[0],n=this.lastRoute.split("/")[1],o=this.lastRoute.split("/")[2];"#service"!==i&&(window.App.replaceApp?"install"!==n&&o&&(window.App.replaceApp=!1):window.App.replaceApp=!1),"#collection"===this.lastRoute.substr(0,11)&&3===this.lastRoute.split("/").length&&this.documentView.cleanupEditor(),"#dasboard"!==this.lastRoute&&"#node"!==window.location.hash.substr(0,5)||d3.selectAll("svg > *").remove(),"#logger"===this.lastRoute&&(this.loggerView.logLevelView&&this.loggerView.logLevelView.remove(),this.loggerView.logTopicView&&this.loggerView.logTopicView.remove())}this.lastRoute=window.location.hash,$("#subNavigationBar .breadcrumb").html(""),$("#subNavigationBar .bottom").html(""),$("#loadingScreen").hide(),$("#content").show(),e&&e.apply(this,t),"#services"===this.lastRoute&&(window.App.replaceApp=!1),this.graphViewer&&this.graphViewer.graphSettingsView&&this.graphViewer.graphSettingsView.hide(),this.queryView&&this.queryView.graphViewer&&this.queryView.graphViewer.graphSettingsView&&this.queryView.graphViewer.graphSettingsView.hide()},listenerFunctions:{},listener:function(i){_.each(window.App.listenerFunctions,function(e,t){e(i)})},checkUser:function(){var i=this;if("#login"!==window.location.hash){var n=function(){this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show()}.bind(this),e=function(e,t){frontendConfig.authenticationEnabled?(i.currentUser=t,e||null===t?"#login"!==window.location.hash&&this.navigate("login",{trigger:!0}):n()):n()}.bind(this);frontendConfig.authenticationEnabled?this.userCollection.whoAmI(e):(this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show())}},waitForInit:function(e,t,i){this.initFinished?(t||e(!0),t&&!i&&e(t,!0),t&&i&&e(t,i,!0)):setTimeout(function(){t||e(!1),t&&!i&&e(t,!1),t&&i&&e(t,i,!1)},350)},initFinished:!1,initialize:function(){!0===frontendConfig.isCluster&&(this.isCluster=!0),"boolean"==typeof frontendConfig.foxxApiEnabled&&(this.foxxApiEnabled=frontendConfig.foxxApiEnabled),document.addEventListener("keyup",this.listener,!1),window.modalView=new window.ModalView,this.foxxList=new window.FoxxCollection,this.foxxRepo=new window.FoxxRepository,this.foxxRepo.fetch({success:function(){i.serviceInstallView&&(i.serviceInstallView.collection=i.foxxRepo)}}),window.progressView=new window.ProgressView;var i=this;this.userCollection=new window.ArangoUsers,this.initOnce=function(){this.initOnce=function(){};var e=function(e,t){i=this,!0===t&&i.coordinatorCollection.fetch({success:function(){i.fetchDBS()}}),e&&console.log(e)}.bind(this);window.isCoordinator(e),!1===frontendConfig.isCluster&&(this.initFinished=!0),this.arangoDatabase=new window.ArangoDatabase,this.currentDB=new window.CurrentDatabase,this.arangoCollectionsStore=new window.ArangoCollections,this.arangoDocumentStore=new window.ArangoDocument,this.arangoViewsStore=new window.ArangoViews,this.coordinatorCollection=new window.ClusterCoordinators,window.spotlightView=new window.SpotlightView({collection:this.arangoCollectionsStore}),arangoHelper.setDocumentStore(this.arangoDocumentStore),this.arangoCollectionsStore.fetch({cache:!1}),this.footerView=new window.FooterView({collection:i.coordinatorCollection}),this.notificationList=new window.NotificationCollection,this.currentDB.fetch({cache:!1,success:function(){i.naviView=new window.NavigationView({database:i.arangoDatabase,currentDB:i.currentDB,notificationCollection:i.notificationList,userCollection:i.userCollection,isCluster:i.isCluster,foxxApiEnabled:i.foxxApiEnabled}),i.naviView.render()}}),this.queryCollection=new window.ArangoQueries,this.footerView.render(),window.checkVersion(),this.userConfig=new window.UserConfig({ldapEnabled:frontendConfig.ldapEnabled}),this.userConfig.fetch(),this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore}),arangoHelper.initSigma()}.bind(this),$(window).resize(function(){i.handleResize()}),$(window).scroll(function(){})},handleScroll:function(){50<$(window).scrollTop()?($(".navbar > .secondary").css("top",$(window).scrollTop()),$(".navbar > .secondary").css("position","absolute"),$(".navbar > .secondary").css("z-index","10"),$(".navbar > .secondary").css("width",$(window).width())):($(".navbar > .secondary").css("top","0"),$(".navbar > .secondary").css("position","relative"),$(".navbar > .secondary").css("width",""))},cluster:function(e){this.checkUser(),e?this.isCluster?(this.clusterView||(this.clusterView=new window.ClusterView({coordinators:this.coordinatorCollection,dbServers:this.dbServers})),this.clusterView.render()):"_system"===this.currentDB.get("name")?(this.routes[""]="dashboard",this.navigate("#dashboard",{trigger:!0})):(this.routes[""]="collections",this.navigate("#collections",{trigger:!0})):this.waitForInit(this.cluster.bind(this))},node:function(e,t){if(this.checkUser(),t&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodeView&&this.nodeView.remove(),this.nodeView=new window.NodeView({coordid:e,coordinators:this.coordinatorCollection,dbServers:this.dbServers}),this.nodeView.render()}else this.waitForInit(this.node.bind(this),e)},shards:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.shardsView&&this.shardsView.remove(),this.shardsView=new window.ShardsView({dbServers:this.dbServers}),this.shardsView.render()}else this.waitForInit(this.shards.bind(this))},nodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodesView&&this.nodesView.remove(),this.nodesView=new window.NodesView({}),this.nodesView.render()}else this.waitForInit(this.nodes.bind(this))},cNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"coordinator"}),this.nodesView.render()}else this.waitForInit(this.cNodes.bind(this))},dNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster)return!1===this.isCluster?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):void(0!==this.dbServers.length?(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"dbserver"}),this.nodesView.render()):this.navigate("#cNodes",{trigger:!0}));this.waitForInit(this.dNodes.bind(this))},sNodes:function(e){if(this.checkUser(),e&&void 0!==this.isCluster){if(!1===this.isCluster)return this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0});this.scaleView=new window.ScaleView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0]}),this.scaleView.render()}else this.waitForInit(this.sNodes.bind(this))},addAuth:function(e){var t=this.clusterPlan.get("user");if(!t)return e.abort(),void(this.isCheckingUser||this.requestAuth());var i=t.name,n=t.passwd,o=i.concat(":",n);e.setRequestHeader("Authorization","Basic "+btoa(o))},logger:function(e){if(this.checkUser(),e){if(!this.loggerView){var t=new window.ArangoLogs({upto:!0,loglevel:4});this.loggerView=new window.LoggerView({collection:t})}this.loggerView.render()}else this.waitForInit(this.logger.bind(this))},applicationDetail:function(e,t){if(this.checkUser(),t)if(this.foxxApiEnabled){var i=function(){this.hasOwnProperty("applicationDetailView")&&this.applicationDetailView.remove(),this.applicationDetailView=new window.ApplicationDetailView({model:this.foxxList.get(decodeURIComponent(e))}),this.applicationDetailView.model=this.foxxList.get(decodeURIComponent(e)),this.applicationDetailView.render("swagger")}.bind(this);0===this.foxxList.length?this.foxxList.fetch({cache:!1,success:function(){i()}}):i()}else this.navigate("#dashboard",{trigger:!0});else this.waitForInit(this.applicationDetail.bind(this),e)},storeDetail:function(e,t){if(this.checkUser(),t)if(this.foxxApiEnabled){var i=function(){this.hasOwnProperty("storeDetailView")&&this.storeDetailView.remove(),this.storeDetailView=new window.StoreDetailView({model:this.foxxRepo.get(decodeURIComponent(e)),collection:this.foxxList}),this.storeDetailView.model=this.foxxRepo.get(decodeURIComponent(e)),this.storeDetailView.render()}.bind(this);0===this.foxxRepo.length?this.foxxRepo.fetch({cache:!1,success:function(){i()}}):i()}else this.navigate("#dashboard",{trigger:!0});else this.waitForInit(this.storeDetail.bind(this),e)},login:function(){var e=function(e,t){this.loginView||(this.loginView=new window.LoginView({collection:this.userCollection})),e||null===t?this.loginView.render():this.loginView.render(!0)}.bind(this);this.userCollection.whoAmI(e)},collections:function(e){if(this.checkUser(),e){var t=this;this.collectionsView&&this.collectionsView.remove(),this.collectionsView=new window.CollectionsView({collection:this.arangoCollectionsStore}),this.arangoCollectionsStore.fetch({cache:!1,success:function(){t.collectionsView.render()}})}else this.waitForInit(this.collections.bind(this))},cIndices:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.indicesView&&i.indicesView.remove(),i.indicesView=new window.IndicesView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.indicesView.render()}}):this.waitForInit(this.cIndices.bind(this),e)},cSettings:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.settingsView=new window.SettingsView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.settingsView.render()}}):this.waitForInit(this.cSettings.bind(this),e)},cInfo:function(e,t){var i=this;this.checkUser(),t?this.arangoCollectionsStore.fetch({cache:!1,success:function(){i.infoView=new window.InfoView({collectionName:e,collection:i.arangoCollectionsStore.findWhere({name:e})}),i.infoView.render()}}):this.waitForInit(this.cInfo.bind(this),e)},documents:function(e,t,i){this.checkUser(),i?(this.documentsView&&this.documentsView.unbindEvents(),this.documentsView||(this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})),this.documentsView.setCollectionId(e,t),this.documentsView.render(),this.documentsView.delegateEvents()):this.waitForInit(this.documents.bind(this),e,t)},document:function(e,t,i){if(this.checkUser(),i){var n;this.documentView&&(this.documentView.defaultMode&&(n=this.documentView.defaultMode),this.documentView.remove()),this.documentView=new window.DocumentView({collection:this.arangoDocumentStore}),this.documentView.colid=e,this.documentView.defaultMode=n;var o=window.location.hash.split("/")[2],a=(o.split("%").length-1)%3;decodeURI(o)!==o&&0!=a&&(o=decodeURIComponent(o)),this.documentView.docid=o,this.documentView.render();var r=function(e,t){e?console.log("Error","Could not fetch collection type"):this.documentView.setType()}.bind(this);arangoHelper.collectionApiType(e,null,r)}else this.waitForInit(this.document.bind(this),e,t)},query:function(e){this.checkUser(),e?(this.queryView||(this.queryView=new window.QueryView({collection:this.queryCollection})),this.queryView.render()):this.waitForInit(this.query.bind(this))},graph:function(e,t){this.checkUser(),t?(this.graphViewer&&(this.graphViewer.graphSettingsView&&this.graphViewer.graphSettingsView.remove(),this.graphViewer.killCurrentGraph(),this.graphViewer.unbind(),this.graphViewer.remove()),this.graphViewer=new window.GraphViewer({name:e,documentStore:this.arangoDocumentStore,collection:new window.GraphCollection,userConfig:this.userConfig}),this.graphViewer.render()):this.waitForInit(this.graph.bind(this),e)},graphSettings:function(e,t){this.checkUser(),t?(this.graphSettingsView&&this.graphSettingsView.remove(),this.graphSettingsView=new window.GraphSettingsView({name:e,userConfig:this.userConfig}),this.graphSettingsView.render()):this.waitForInit(this.graphSettings.bind(this),e)},helpUs:function(e){this.checkUser(),e?(this.testView||(this.helpUsView=new window.HelpUsView({})),this.helpUsView.render()):this.waitForInit(this.helpUs.bind(this))},support:function(e){this.checkUser(),e?(this.testView||(this.supportView=new window.SupportView({})),this.supportView.render()):this.waitForInit(this.support.bind(this))},queryManagement:function(e){this.checkUser(),e?(this.queryManagementView&&this.queryManagementView.remove(),this.queryManagementView=new window.QueryManagementView({collection:void 0}),this.queryManagementView.render()):this.waitForInit(this.queryManagement.bind(this))},databases:function(e){if(this.checkUser(),e){var t=function(e){e?(arangoHelper.arangoError("DB","Could not get list of allowed databases"),this.navigate("#",{trigger:!0}),$("#databaseNavi").css("display","none"),$("#databaseNaviSelect").css("display","none")):(this.databaseView&&this.databaseView.remove(),this.databaseView=new window.DatabaseView({users:this.userCollection,collection:this.arangoDatabase}),this.databaseView.render())}.bind(this);arangoHelper.databaseAllowed(t)}else this.waitForInit(this.databases.bind(this))},dashboard:function(e){this.checkUser(),e?(void 0===this.dashboardView&&(this.dashboardView=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:this.arangoDatabase})),this.dashboardView.render()):this.waitForInit(this.dashboard.bind(this))},replication:function(e){this.checkUser(),e?(this.replicationView||(this.replicationView=new window.ReplicationView({})),this.replicationView.render()):this.waitForInit(this.replication.bind(this))},applier:function(e,t,i){this.checkUser(),i?(void 0===this.applierView&&(this.applierView=new window.ApplierView({})),this.applierView.endpoint=atob(e),this.applierView.database=atob(t),this.applierView.render()):this.waitForInit(this.applier.bind(this),e,t)},graphManagement:function(e){this.checkUser(),e?(this.graphManagementView&&this.graphManagementView.undelegateEvents(),this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render()):this.waitForInit(this.graphManagement.bind(this))},showGraph:function(e,t){this.checkUser(),t?this.graphManagementView?this.graphManagementView.loadGraphViewer(e):(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render(e,!0)):this.waitForInit(this.showGraph.bind(this),e)},applications:function(e){this.checkUser(),e?this.foxxApiEnabled?(void 0===this.applicationsView&&(this.applicationsView=new window.ApplicationsView({collection:this.foxxList})),this.applicationsView.reload()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.applications.bind(this))},installService:function(e){this.checkUser(),e?this.foxxApiEnabled?frontendConfig.foxxStoreEnabled?(window.modalView.clearValidators(),this.serviceInstallView&&this.serviceInstallView.remove(),this.serviceInstallView=new window.ServiceInstallView({collection:this.foxxRepo,functionsCollection:this.foxxList}),this.serviceInstallView.render()):this.navigate("#services/install/upload",{trigger:!0}):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installService.bind(this))},installNewService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceNewView&&this.serviceNewView.remove(),this.serviceNewView=new window.ServiceInstallNewView({collection:this.foxxList}),this.serviceNewView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installNewService.bind(this))},installGitHubService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceGitHubView&&this.serviceGitHubView.remove(),this.serviceGitHubView=new window.ServiceInstallGitHubView({collection:this.foxxList}),this.serviceGitHubView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installGitHubService.bind(this))},installUrlService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceUrlView&&this.serviceUrlView.remove(),this.serviceUrlView=new window.ServiceInstallUrlView({collection:this.foxxList}),this.serviceUrlView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installUrlService.bind(this))},installUploadService:function(e){this.checkUser(),e?this.foxxApiEnabled?(window.modalView.clearValidators(),this.serviceUploadView&&this.serviceUploadView.remove(),this.serviceUploadView=new window.ServiceInstallUploadView({collection:this.foxxList}),this.serviceUploadView.render()):this.navigate("#dashboard",{trigger:!0}):this.waitForInit(this.installUploadService.bind(this))},handleSelectDatabase:function(e){this.checkUser(),e?this.naviView.handleSelectDatabase():this.waitForInit(this.handleSelectDatabase.bind(this))},handleResize:function(){this.dashboardView&&this.dashboardView.resize(),this.graphManagementView&&"graphs"===Backbone.history.getFragment()&&this.graphManagementView.handleResize($("#content").width()),this.queryView&&"queries"===Backbone.history.getFragment()&&this.queryView.resize(),this.naviView&&this.naviView.resize(),this.graphViewer&&-1'),window.parseVersions=function(e){_.isEmpty(e)?$("#currentVersion").addClass("up-to-date"):($("#currentVersion").addClass("out-of-date"),$("#currentVersion .fa").removeClass("fa-check-circle").addClass("fa-exclamation-circle"),$("#currentVersion").click(function(){!function(e,t){var i=[];i.push(window.modalView.createSuccessButton("Download Page",function(){window.open("https://www.arangodb.com/download","_blank"),window.modalView.hide()}));var n=[],o=window.modalView.createReadOnlyEntry.bind(window.modalView);n.push(o("current","Current",e.toString())),t.major&&n.push(o("major","Major",t.major.version)),t.minor&&n.push(o("minor","Minor",t.minor.version)),t.bugfix&&n.push(o("bugfix","Bugfix",t.bugfix.version)),window.modalView.show("modalTable.ejs","New Version Available",i,n)}(t,e)}))},$.ajax({type:"GET",async:!0,crossDomain:!0,timeout:3e3,dataType:"jsonp",url:"https://www.arangodb.com/repositories/versions.php?jsonp=parseVersions&version="+encodeURIComponent(t.toString()),error:function(e){200===e.status?window.activeInternetConnection=!0:window.activeInternetConnection=!1},success:function(e){window.activeInternetConnection=!0}})}})}}(),function(){"use strict";window.hasOwnProperty("TEST_BUILD")||($(document).ajaxSend(function(e,t,i){t.setRequestHeader("X-Arango-Frontend","true");var n=window.arangoHelper.getCurrentJwt();n&&t.setRequestHeader("Authorization","bearer "+n)}),$.ajaxSetup({error:function(e,t,i){401===e.status&&arangoHelper.checkJwt()}}),$(document).ready(function(){window.App=new window.Router,Backbone.history.start(),window.App.handleResize()}),$(document).click(function(e){e.stopPropagation(),$(e.target).hasClass("subBarDropdown")||$(e.target).hasClass("dropdown-header")||$(e.target).hasClass("dropdown-footer")||$(e.target).hasClass("toggle")||$("#userInfo").is(":visible")&&$(".subBarDropdown").hide()}),$("body").on("keyup",function(e){27===e.keyCode&&window.modalView&&window.modalView.hide()}))}(); \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz index 19e8801712..3a9cf8829c 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html index 05cbb47829..3fe55998f3 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html @@ -1 +1 @@ -ArangoDB Web Interface
    \ No newline at end of file +ArangoDB Web Interface
    \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz index 9fc6240af7..670b8febe0 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js b/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js index 7f31369a03..4a647cfacf 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js @@ -1 +1 @@ -this.JST=this.JST||{},this.JST["templates/applicationDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n\n \n\n \n
    \n
    \n
    \n
    \n Icon for Service\n
    \n \n
    \n
    \n

    Out of order

    \n

    This service has failed to mount due to an error.

    \n

    This service has not yet been configured properly.

    \n

    Some dependencies have not yet been set up.

    \n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n
    \n
    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    \n ',app.attributes.license&&(__p+='\n '+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+='\n

    \n

    \n '+(null==(__t=app.attributes.version)?"":__t)+'\n

    \n

    \n '+(null==(__t=app.get("development")?"Development":"Production")?"":__t)+'\n

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n \x3c!----\x3e\n
    \n";return __p},this.JST["templates/applicationListView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n \n
    '+(null==(__t=name)?"":__t)+(null==(__t=legacy?" (legacy)":"")?"":__t)+'
    \n
    '+(null==(__t=author)?"":__t)+'
    \n
    '+(null==(__t=description)?"":__t)+'
    \n \n \n
    '+(null==(__t=latestVersion)?"":__t)+'
    \n \n \n \n \n \n';return __p},this.JST["templates/applicationsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n
    \n
    \n\n\n\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/applierView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n\n ',_.each(data,function(n,t){__p+='\n\n
    \n

    '+(null==(__t=t)?"":__t)+'

    \n
    \n\n \n \n ',"string"==typeof n?__p+="\n \n \n \n \n ":(__p+="\n ",_.each(n,function(n,t){__p+="\n \n \n\n \n\n \n "}),__p+="\n "),__p+="\n \n
    "+(null==(__t=t)?"":__t)+""+(null==(__t=n)?"":__t)+"
    "+(null==(__t=t)?"":__t)+"\n ","string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n?(__p+="\n \n \n ",_.each(n,function(n,t){__p+="\n \n \n \n \n "}),__p+="\n \n
    "+(null==(__t=t)?"":__t)+""+(null==(__t=n)?"":__t)+"
    \n "):__p+="\n "+(null==(__t=n)?"":__t)+"\n ",__p+="\n
    \n\n "}),__p+="\n\n
    \n
    \n";return __p},this.JST["templates/arangoTabbar.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n ',_.each(content.titles,function(n,t){__p+="\n ";var e=content.titles[t][0];__p+="\n ";var a=content.titles[t][1];__p+='\n \n "}),__p+="\n
    \n";return __p},this.JST["templates/arangoTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='
    \n ';var type=type;__p+='\n \n \n \n ';var hcounter=0;if(__p+="\n ",_.each(content.titles,function(n){__p+='\n \n ",hcounter++}),__p+="\n \n \n \n ",_.each(content.rows,function(n){var t=0;__p+="\n \n ",_.each(n,function(n){__p+="\n ",type&&"pre"===type[t]?__p+='\n \n ":__p+='\n \n ",__p+="\n ",t++}),__p+="\n \n "}),__p+="\n\n ",0===content.rows.length){__p+="\n \n ";var xcounter=0;__p+="\n ",_.each(content.titles,function(n){__p+="\n ",__p+=0===xcounter?"\n \n ":"\n \n ",__p+="\n ",xcounter++}),__p+="\n \n "}__p+="\n \n
    '+(null==(__t=n)?"":__t)+"
    \n
     \n                    '+(null==(__t=content.unescaped&&content.unescaped[t]?n:_.escape(n))?"":__t)+"\n                  
    \n
    '+(null==(__t=content.unescaped&&content.unescaped[t]?n:_.escape(n))?"":__t)+"
    No content.
    \n
    \n"}return __p},this.JST["templates/clusterView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n
      \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    coordinators
    \n
    \n
    \n\n
    \n
    \n
    \n
    DB Servers
    \n
    \n
    \n\n
    \n
    \n
    \n
    RAM
    \n
    \n
    \n\n
    \n
    \n
    \n
    Connections
    \n
    \n
    \n\n
    \n\n\n
    \n\n
    \n
    \n
    \n
    DATA
    \n
    \n
    \n\n
    \n
    \n
    \n
    HTTP
    \n
    \n
    \n\n
    \n
    \n
    \n
    AVG Request Time
    \n
    \n
    \n\n
    \n\n
    \n\n';return __p},this.JST["templates/collectionsItemView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n
    \n \n ',model.get("desc")?__p+='\n
    \n '+(null==(__t=model.get("desc"))?"":__t)+"\n
    \n ":"corrupted"===model.get("status")?__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n ":"loaded"!==model.get("status")&&"unloaded"!==model.get("status")&&"loading"!==model.get("status")&&"unloading"!==model.get("status")||(__p+="\n ",model.get("locked")||"loading"===model.get("status")||"unloading"===model.get("status")?("loading"===model.get("status")||model.get("status"),__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n "):__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n ",__p+="\n "),__p+="\n
    \n
    \n\n ","index"===model.get("lockType")?__p+='\n \x3c!-- --\x3e\n
    '+(null==(__t=model.get("name"))?"":__t)+"
    \n ":__p+='\n
    '+(null==(__t=model.get("name"))?"":__t)+"
    \n ",__p+="\n
    \n";return __p},this.JST["templates/collectionsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n\n
    \n\n\n \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n\n';return __p},this.JST["templates/dashboardView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" ";var subBar=function(n){__p+='\n
    \n
    '+(null==(__t=n)?"":__t)+"
    \n
    \n "},enlargeButton=function(n,t){t&&(__p+='\n
    \n \n
    \n ')};__p+="\n\n ";var largeChart=function(n,t,e){__p+='\n
    \n ',enlargeButton(n,!0),__p+='\n
    \n
    \n
    \n
    \n
    \n
    \n ',subBar(t),__p+="\n
    \n "};__p+="\n\n ";var mediumChart=function(n,t,e){__p+='\n
    \n
    \n ',enlargeButton(n,!0),__p+='\n
    \n
    \n
    \n
    \n
    \n
    \n ',subBar(t),__p+="\n
    \n
    \n "};__p+="\n\n ";var smallChart=function(n,t,e){__p+='\n
    \n ',enlargeButton(n,e),__p+='\n
    \n
    \n \n
    \n
    \n ',subBar(t),__p+="\n
    \n "};__p+="\n\n ";var tendency=function(n,t,e){__p+='\n
    \n
    \n ',enlargeButton(t,e),__p+='\n
    \n ',__p+="asyncRequests"===t?'\n
    sync
    \n
    \n \n ':'\n
    current
    \n
    \n \n ',__p+='\n
    \n
    \n
    \n ',__p+="asyncRequests"===t?'\n
    async
    \n
    \n \n ':'\n
    15-min-avg
    \n
    \n \n ',__p+='\n
    \n
    \n
    \n
    '+(null==(__t=n)?"":__t)+"
    \n
    \n "};__p+='\n\n \n\n
    \n
    \n
    \n
    \n\n ',!0!==hideStatistics&&(__p+='\n
    \n ',largeChart("requestsChart","Requests per Second"),__p+="\n\n ",tendency("Request Types","asyncRequests",!1),__p+="\n ",tendency("Number of Client Connections","clientConnections",!1),__p+='\n
    \n \n
    \n ',largeChart("dataTransferChart","Transfer Size per Second"),__p+="\n ",smallChart("dataTransferDistribution","Transfer Size per Second (distribution)",!1),__p+='\n
    \n \n
    \n ',largeChart("totalTimeChart","Average Request Time (seconds)"),__p+="\n ",smallChart("totalTimeDistribution","Average Request Time (distribution)",!1),__p+="\n
    \n
    \n "),__p+='\n
    \n\n \n\n"}return __p},this.JST["templates/databaseView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n\n
    \n\n\n
    \n\n \n\n
    \n\n\n
    \n
    \n \n ',collection.forEach(function(n){var t=n.get("name");__p+="\n\n ","_system"!==t&&(__p+='\n
    \n
    \n
    \n
    \n ',readOnly||(__p+='\n \n '),__p+='\n
    \n \n
    \n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n "),__p+="\n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/dbSelectionView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    DB: '+(null==(__t=current)?"":__t)+'\n\x3c!-- --\x3e\n
    \n\x3c!-- --\x3e\n
    \n\n\x3c!--\n\n--\x3e\n";return __p},this.JST["templates/documentsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n\n
    \n\n \x3c!-- remove marker for docupdiv--\x3e\n
      \n \x3c!-- Mark: removed prev/next collection button\n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n --\x3e\n
    • \n \n \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n
    \n\n \n\n
    \n
    \n
    Please be careful. If no filter is set, the whole collection will be downloaded.
    \n \n
    \n
    \n\n \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n\x3c!--\n
    \n \n
    \n
    \n--\x3e\n\n
    \n
    \n
    \n
    \n\n\x3c!-- Delete Modal --\x3e\n\n\n';return __p},this.JST["templates/documentView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n
    _rev:
    \n
    \n
    \n
    \n
    _key:
    \n
    \n
    \n
    \n\n
    \n
    \n
    _from:
    \n \n
    \n
    \n
    _to:
    \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n \n \n
    \n
    \n\t
    \n\n';return __p},this.JST["templates/edgeDefinitionTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n Edge definitions*:\n \n \n \n \n \n \n \n \n \n fromCollections*:\n \n \n \n \n \n \n \n \n toCollections*:\n \n \n \n \n \n \n \n';return __p},this.JST["templates/editListEntryView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n ',isReadOnly?__p+='\n '+(null==(__t=key)?"":__t)+"\n ":__p+='\n \n ",__p+='\n\n\n ',isReadOnly?__p+='\n '+(null==(__t=value)?"":__t)+"\n ":__p+='\n \n ",__p+='\n\n\n\n \n \n \n\n';return __p},this.JST["templates/filterSelect.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var cssClass;__p+='\n
    \n
    '+(null==(__t=name)?"":__t)+'
    \n\n
    \n \n
    \n\n
    \n
    Show all
    \n ',__p+="\n ",_.each(options,function(n){__p+="\n ",cssClass=n.active?(__p+="\n ","active"):(__p+=" \n ","inactive"),__p+="\n ",__p+='\n
    \n ';var t=n.color||"#f6f8fa";__p+="\n \n ",__p+="active"===cssClass?'\n \n ':'\n \n ',__p+='\n\n  \n '+(null==(__t=n.name)?"":__t)+"\n
    \n "}),__p+="\n
    \n\n
    \n\n"}return __p},this.JST["templates/footerView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var n,v,db;name&&(n=name||"",v=version||""),__p+='\n\n\n\n\n\n"}return __p},this.JST["templates/foxxActiveView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n

    '+(null==(__t=model.get("mount"))?"":__t)+'

    \n

    '+(null==(__t=model.get("name"))?"":__t)+'

    \n

    '+(null==(__t=model.get("version"))?"":__t)+'

    \n \x3c!--

    '+(null==(__t=model.get("category"))?"":__t)+'

    --\x3e\n
    \n \x3c!--
    --\x3e\n
    \n Icon for Service\n ',model.isDevelopment()?__p+='\n
    \n \n
    \n Development\n
    \n
    \n
    \n ':__p+='\n
    \n \n
    \n Production\n
    \n
    \n
    \n ',__p+="\n
    \n";return __p},this.JST["templates/foxxEditView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var appInfos=attributes.app.split(":");__p+='\n\n"}return __p},this.JST["templates/foxxMountView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n';return __p},this.JST["templates/foxxRepoView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n

    '+(null==(__t=model.name)?"":__t)+'

    \n

    '+(null==(__t=model.categories)?"":__t)+'

    \n \x3c!--

    23

    --\x3e\n
    \n
    \n ',upgrade?__p+='\n \n ':__p+='\n \n ',__p+='\n
    \n
    \n Icon for Service\n
    \n';return __p},this.JST["templates/graphManagementView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \n \x3c!-- --\x3e\n
    \n
    \n \n
    \n
    \n\n\n
    \n\n \n\n
    \n\n\n
    \n
    \n
    \n \n
    \n\n\n ',graphs.forEach(function(n){var t=n.get("_key"),e=n.get("isSmart");__p+='\n\n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n ',!0===e&&(__p+='\n
    Smart
    \n '),__p+='\n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/graphSettingsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\n ";var genClass="pure-u-1-3";__p+="\n ";var genClass2="pure-u-2-3";__p+="\n\n ";var formatName=function(n){return __p+="\n ",n.charAt(0).toUpperCase()+string.slice(1)};__p+='\n\n
    \n \n
    \n
    \n \n
    \n\n ',_.each(general,function(n,t){__p+="\n ","divider"===n.type?__p+='\n
    '+(null==(__t=n.name)?"":__t)+"
    \n ":(__p+='\n
    \n '+(null==(__t=n.name)?"":__t)+'\n
    \n
    \n\n ',"select"===n.type&&(__p+='\n \n "),__p+="\n\n ","string"===n.type&&(__p+='\n \n '),__p+="\n\n ","number"===n.type&&(__p+='\n \n '),__p+="\n\n ","range"===n.type&&(__p+='\n \n \n '),__p+="\n\n ","color"===n.type&&(__p+='\n \n '),__p+='\n\n \n
    \n '),__p+="\n\n "}),__p+='\n
    \n\n
    \n\n
    \n \n
    \n ',_.each(specific,function(n,t){if(__p+="\n\n ","true"!==n.hide){var e;if(__p+="\n ","divider"===n.type)__p+='\n
    '+(null==(__t=n.name)?"":__t)+"
    \n ";else __p+='\n
    \n '+(null==(__t=n.name)?"":__t)+'\n
    \n\n
    \n\n ',__p+="\n ",e=n.value?(__p+="\n ",n.value):(__p+="\n ",n.default),__p+="\n ",__p+="\n\n ","string"===n.type&&(__p+='\n \n '),__p+="\n\n ","number"===n.type&&(__p+='\n \n '),__p+="\n\n ","color"===n.type&&(__p+='\n \n '),__p+="\n\n ","range"===n.type&&(__p+='\n \n \n '),__p+="\n\n ","select"===n.type&&(__p+='\n \n "),__p+='\n \n
    \n ';__p+="\n "}__p+="\n "}),__p+='\n
    \n\n
    \n \n \n
    \n
    \n
    \n\n'}return __p},this.JST["templates/graphViewer2.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n\n
    \n
    \n \n
    \n
    \n\n \x3c!--
    --\x3e\n
    \n
    \n\n';return __p},this.JST["templates/graphViewGroupByEntry.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n \n
    \n \n
    \n
    \n';return __p},this.JST["templates/helpUsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n \n
    \n\n';return __p},this.JST["templates/indicesView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=" ","undefined"!=typeof supported&&(__p+='\n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    IDTypeUniqueSparseDeduplicateSelectivity Est.FieldsNameAction
    \n
    \n\n \n\n ",figuresData.figures.alive&&figuresData.figures.dead&&(__p+="\n ",window.frontendConfig.isCluster&&(__p+='\n
    \n

    Figures

    \n

    The following information does not contain data stored in the write-ahead log. It can be inaccurate, until the write-ahead log has been completely flushed.

    \n
    \n '),__p+='\n \n \n \n \n \n \n \n \n \n \n ',figuresData.walMessage?__p+=' \n \n ":__p+='\n \n ",__p+='\n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
    TypeCountSizeDeletionInfo
    Alive'+(null==(__t=figuresData.walMessage)?"":__t)+"'+(null==(__t=numeral(figuresData.figures.alive.count).format("0,0"))?"":__t)+"\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.alive.size))?"":__t)+"\n ",__p+='\n -\n \n \n
    Dead\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.dead.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.dead.size))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=figuresData.figures.dead.deletion)?"":__t)+"\n ",__p+='\n \n
    \n \n \n
    \n
    \n '),__p+="\n\n ",figuresData.figures.datafiles&&figuresData.figures.journals&&figuresData.figures.compactors&&(__p+='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    TypeCountSizeInfo
    Datafiles\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.datafiles.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.datafiles.fileSize))?"":__t)+"\n ",__p+='\n  \n
    \n \n \n
    \n
    Journals\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.journals.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.journals.fileSize))?"":__t)+"\n ",__p+='\n  \n \n \n
    Compactors\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.compactors.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.compactors.fileSize))?"":__t)+"\n ",__p+='\n  \n \n
    Indexes\n '+(null==(__t=numeral(figuresData.figures.indexes.count).format("0,0"))?"":__t)+'\n \n '+(null==(__t=prettyBytes(figuresData.figures.indexes.size))?"":__t)+'\n  \n \n
    \n '),__p+="\n\n ",figuresData.figures.documentReferences&&figuresData.figures.uncollectedLogfileEntries&&(__p+='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    TypeCountInfo
    Uncollected'+(null==(__t=figuresData.figures.uncollectedLogfileEntries)?"":__t)+'  \n \n \n
    References'+(null==(__t=figuresData.figures.documentReferences)?"":__t)+'  \n \n \n
    \n '),__p+="\n\n"}return __p},this.JST["templates/modalDownloadFoxx.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+="
    \n Your new Foxx Service is ready for download.\n You can edit it on your local system and repack it in a zip file to publish it on ArangoDB.\n
    \n";return __p},this.JST["templates/modalGraph.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\t
    \n\t\t\n\t\t\n\t
    \n';return __p},this.JST["templates/modalGraphTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n \n\n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Knows Graph\n \n
    Traversal Graph\n \n
    Mps Graph\n \n
    World Graph\n \n
    Social Graph\n \n
    City Graph\n \n
    \n

    Need help? Visit our Graph Documentation

    \n\n
    \n\n
    \n\n \n\n ';var createTR=function(t,n){var e="";switch(t.mandatory&&(e="*"),__p+='\n \n '+(null==(__t=t.label)?"":__t)+(null==(__t=e)?"":__t)+':\n \n ',t.type){case"text":__p+='\n \n ';break;case"password":__p+='\n \n ';break;case"readonly":__p+='\n \n ';break;case"checkbox":var a="",l="";t.checked&&(a="checked"),t.disabled&&(l="disabled"),__p+='\n \n ";break;case"select":__p+='\n \n ";break;case"select2":__p+='\n \n ',t.addAdd&&(__p+='\n \n '),__p+="\n ",t.addDelete&&(__p+='\n \n '),__p+="\n "}t.info&&(__p+='\n \n \n \n \n '),__p+="\n \n "};__p+="\n\n \n \n ",_.each(content,function(n){createTR(n)}),__p+="\n\n \n
    \n ",advancedContent&&(__p+='\n
    \n
    \n \n
    \n
    \n \n \n ',_.each(advancedContent.content,function(n){createTR(n)}),__p+="\n \n
    \n
    \n
    \n
    \n
    \n "),__p+="\n
    \n\n
    \n"}return __p},this.JST["templates/modalHotkeys.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
      \n ',_.each(content,function(n){__p+='\n\n
    • '+(null==(__t=n.name)?"":__t)+"
    • \n\n ",_.each(n.content,function(n){__p+='\n
    • '+(null==(__t=n.label)?"":__t)+'
        '+(null==(__t=n.letter)?"":__t)+"  
    • \n "}),__p+="\n\n\n "}),__p+="\n
        \n\n";return __p},this.JST["templates/modalTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" ";var createTR=function(t){var n="";switch(t.mandatory&&(n="*"),__p+='\n \n '+(null==(__t=t.label)?"":__t)+(null==(__t=n)?"":__t)+':\n \n ",t.type){case"text":__p+='\n \n ';break;case"blob":__p+='\n \n ";break;case"password":__p+='\n \n ';break;case"readonly":__p+='\n \n ";break;case"checkbox":var e="",a="";t.checked&&(e="checked"),t.disabled&&(a="disabled"),__p+='\n \n ";break;case"select":__p+='\n \n ";break;case"select2":__p+='\n \n ',t.addDelete&&(__p+='\n \n '),__p+="\n ",t.addDelete&&(__p+='\n \n '),__p+="\n "}__p+="\n ",t.info&&(__p+='\n \n \n \n \n '),__p+="\n \n \n "};__p+="\n ",content&&(__p+="\n \n \n ",_.each(content,function(n){createTR(n)}),__p+="\n \n
        \n "),__p+="\n ",info&&(__p+="\n "+(null==(__t=info)?"":__t)+"\n "),__p+="\n ",advancedContent&&(__p+='\n
        \n
        \n \n
        \n
        \n \n \n ',_.each(advancedContent.content,function(n){createTR(n)}),__p+="\n \n
        \n
        \n
        \n
        \n
        \n "),__p+="\n"}return __p},this.JST["templates/modalTestResults.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){function createSuite(n){__p+='\n
        \n '+(null==(__t=n.title)?"":__t)+"\n
        \n
        \n ",n.tests.length&&(__p+='\n
          \n ',_.each(n.tests,createTest),__p+="\n
        \n "),__p+="\n ",n.suites.length&&(__p+='\n
        \n ',_.each(n.suites,createSuite),__p+="\n
        \n "),__p+="\n
        \n "}function createTest(n){var t=75\n \n ',n.result){case"pass":__p+='\n \n ';break;case"fail":__p+='\n \n ';break;case"pending":__p+='\n \n '}__p+="\n "+(null==(__t=n.title)?"":__t)+"\n "+(null==(__t=t?"("+n.duration+"ms)":"")?"":__t)+"\n \n ",_.isEmpty(n.err)||(__p+='\n
        '+(null==(__t=n.err.stack)?"":__t)+"
        \n "),__p+="\n \n "}__p+='\n
        \n ',info.stack?__p+='\n
        \n Test runner failed with an error.\n
        \n
        '+(null==(__t=info.stack)?"":__t)+"
        \n ":(__p+='\n
        \n Completed '+(null==(__t=info.stats.tests)?"":__t)+" tests in "+(null==(__t=info.stats.duration)?"":__t)+'ms\n ('+(null==(__t=info.stats.passes)?"":__t)+'/'+(null==(__t=info.stats.failures)?"":__t)+'/'+(null==(__t=info.stats.pending)?"":__t)+')\n
        \n
        \n ',info.tests.length&&(__p+='\n
          \n ',_.each(info.tests,createTest),__p+="\n
        \n "),__p+="\n ",info.suites.length&&(__p+='\n
        \n ',_.each(info.suites,createSuite),__p+="\n
        \n "),__p+="\n ",info.tests.length||info.suites.length||(__p+='\n
        No tests found.
        \n '),__p+="\n
        \n "),__p+="\n
        \n"}return __p},this.JST["templates/navigationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=' \n\n\n
        \n

        \n
        \n\n \n';return __p},this.JST["templates/nodesView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){if(__p+='\n
        \n\n ',0\n
        \n \n \n \n
        \n
        \n '),__p+='\n\n
        \n '+(null==(__t=scaleProperties.coordsOk)?"":__t)+' \n ',scaleProperties.coordsError&&(__p+='\n '+(null==(__t=scaleProperties.coordsError)?"":__t)+' \n '),__p+="\n ",scaleProperties.coordsPending&&!0===scaling&&"_system"===frontendConfig.db&&(__p+='\n '+(null==(__t=scaleProperties.coordsPending)?"":__t)+' \n \n '),__p+='\n
        \n
    \n\n
    \n\n
    \n
    \n
    Name
    \n
    Endpoint
    \n
    Version
    \n
    Since
    \n
    \n
    \n
    \n\n
    \n ',_.each(coords,function(n,t){__p+="\n ";var e=n.id+"-node";__p+='\n\n
    \n\n
    \n '+(null==(__t=n.ShortName)?"":__t)+'\n \n ',n.CanBeDeleted&&"_system"===frontendConfig.db&&(__p+='\n \n '),__p+='\n
    \n
    '+(null==(__t=n.Endpoint)?"":__t)+'
    \n\n
    '+(null==(__t=n.Version)?"":__t)+"
    \n\n ";var a=n.LastAckedTime.substr(11,18).slice(0,-1);__p+='\n
    '+(null==(__t=a)?"":__t)+"
    \n\n ","GOOD"===n.Status?__p+='\n
    \n ':__p+='\n
    \n ',__p+="\n\n
    \n\n "}),__p+="\n
    \n
    \n\n "}if(__p+="\n\n ",0\n
    \n \n \n \n
    \n
    \n '),__p+='\n\n
    \n '+(null==(__t=scaleProperties.dbsOk)?"":__t)+' \n ',scaleProperties.dbsError&&(__p+='\n '+(null==(__t=scaleProperties.dbsError)?"":__t)+' \n '),__p+="\n ",scaleProperties.dbsPending&&!0===scaling&&"_system"===frontendConfig.db&&(__p+='\n '+(null==(__t=scaleProperties.dbsPending)?"":__t)+' \n \n '),__p+='\n
    \n\n
    \n\n \n\n
    \n
    \n
    Name
    \n
    Endpoint
    \n
    Version
    \n
    Since
    \n
    \n
    \n
    \n\n '}__p+='\n\n
    \n ',_.each(dbs,function(n,t){__p+="\n ";var e=n.id+"-node";__p+='\n\n
    \n\n
    \n '+(null==(__t=n.ShortName)?"":__t)+'\n \n ',n.CanBeDeleted&&"_system"===frontendConfig.db&&(__p+='\n \n '),__p+='\n
    \n
    '+(null==(__t=n.Endpoint)?"":__t)+'
    \n\n
    '+(null==(__t=n.Version)?"":__t)+"
    \n\n ";var a=n.LastAckedTime.substr(11,18).slice(0,-1);__p+='\n
    '+(null==(__t=a)?"":__t)+"
    \n\n ","GOOD"===n.Status?__p+='\n
    \n ':__p+='\n
    \n ',__p+="\n\n
    \n "}),__p+="\n
    \n \n\n \n \n\n"}return __p},this.JST["templates/nodeView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n\n\n
    \n\n';return __p},this.JST["templates/notificationItem.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)notifications.forEach(function(n){__p+='\n \n"}),__p+="\n";return __p},this.JST["templates/notificationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n';return __p},this.JST["templates/progressBase.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/queryManagementViewActive.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n';return __p},this.JST["templates/queryManagementViewSlow.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n\n
    \n \n
    \n';return __p},this.JST["templates/queryView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n \n \n \n \n
    \n\n \n";return __p},this.JST["templates/replicationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n\n ',0!==mode&&(__p+='\n
    \n\n
    \n
    \n
    '+(null==(__t=info.state)?"":__t)+'
    \n
    State
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.mode)?"":__t)+'
    \n
    Mode
    \n
    \n
    \n\n
    \n
    \n ',"follower"===info.role&&3!==mode?__p+='\n
    Slave
    \n ':"leader"===info.role&&3!==mode?__p+='\n
    Master
    \n ':__p+='\n
    '+(null==(__t=info.role)?"":__t)+"
    \n ",__p+='\n
    Role
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.level)?"":__t)+'
    \n
    Level
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.health)?"":__t)+'
    \n
    Health
    \n
    \n
    \n\n ',"follower"===info.role?__p+='\n
    \n
    \n
    \n
    Server ID
    \n
    \n
    \n ':__p+='\n
    \n
    \n
    \n
    Last tick
    \n
    \n
    \n ',__p+="\n\n
    \n "),__p+="\n\n ",0===mode&&(__p+='\n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    '+(null==(__t=info.state)?"":__t)+'
    \n
    This node is not replicating from any other node. Also there are no active slaves or followers found.
    Please visit our Documentation to find out how to setup replication.
    \n
    \n '),__p+="\n\n \n ",5===mode&&(__p+='\n
    \n
    \n

    Info

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n ",3===mode?__p+='\n \n ":(__p+="\n ","follower"===info.role?__p+='\n \n ':__p+='\n \n ',__p+="\n "),__p+="\n \n \n
    Mode:'+(null==(__t=info.mode)?"":__t)+'
    Level:'+(null==(__t=info.level)?"":__t)+"
    Role:'+(null==(__t=info.role)?"":__t)+"SlaveMaster
    \n
    \n "),__p+="\n\n ","leader"===info.role&&(__p+='\n
    \n
    \n

    Comparison

    \n
    \n \n
    \n\n
    \n
    \n
    \n \n
    \n
    COMMUNICATION
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    LAST TICKS
    \n
    \n
    \n\n
    \n\n
    \n\n ',3===mode&&(__p+='\n
    \n
    \n

    Nodes

    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    Leader:
    Followers:
    \n '),__p+="\n "),__p+="\n\n ","leader"===info.role&&(__p+='\n
    \n
    \n ',3===mode?__p+="\n

    Leader State

    \n ":__p+="\n

    Master State

    \n ",__p+='\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Server ID:
    Time:
    Operations:
    \n
    \n\n
    \n
    \n ',3===mode?__p+="\n

    Follower States

    \n ":__p+="\n

    Slave States

    \n ",__p+='\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    Syncer IDServer IDClient infoTimeLast served tick
    \n
    \n '),__p+="\n\n ","follower"===info.role&&(__p+='\n
    \n
    \n ',3===mode?__p+="\n

    Follower States

    \n ":__p+="\n

    Slave States

    \n ",__p+='\n
    \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n
    DatabaseEnabledPhaseReplicating fromLast tickState
    \n
    \n '),__p+="\n\n
    \n";return __p},this.JST["templates/scaleView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n
    \n\n ';var genClass="pure-u-1-5";__p+='\n\n
    \n
    \n
    Type
    \n
    Running
    \n
    Planned
    \n
    Status
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    Coordinators
    \n
    '+(null==(__t=runningCoords)?"":__t)+"
    \n ",!0===initialized?__p+='\n
    \n
    \n ':__p+='\n
    \n
    \n ',__p+='\n
    \n \n \n
    \n
    \n\n
    \n
    DBServers
    \n
    '+(null==(__t=runningDBs)?"":__t)+"
    \n ",!0===initialized?__p+='\n
    \n
    \n ':__p+='\n
    \n
    \n ',__p+='\n
    \n \n \n
    \n
    \n\n
    \n\n
    \n\n'}return __p},this.JST["templates/serviceDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='
    \n ';var visible=" visibility: hidden; ";__p+="\n ",installed&&(__p+="\n ",visible=" visibility: visible; ",__p+="\n "),__p+='\n\n
    \n \n\n \n
    \n\n \n\n
    \n
    \n\n
    \n
    \n Icon for Service\n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    Out of order

    \n

    This service has failed to mount due to an error.

    \n

    This service has not yet been configured properly.

    \n

    Some dependencies have not yet been set up.

    \n
    \n
    \n

    Readme

    \n
    \n
    \n ',app.get("readme")?__p+="\n "+(null==(__t=marked(app.get("readme")))?"":__t)+"\n ":__p+="\n

    No README data found.

    \n ",__p+='\n
    \n
    \n\n
    \n
    \n

    \n Author: '+(null==(__t=app.attributes.author)?"":__t)+"\n

    \n

    \n Mount: "+(null==(__t=app.attributes.mount)?"":__t)+'\n

    \n

    \n Mode: '+(null==(__t=app.get("development")?"Development":"Production")?"":__t)+'\n

    \n

    \n Version: '+(null==(__t=app.attributes.version)?"":__t)+"\n

    \n

    \n ",app.attributes.license&&(__p+="\n License: "+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+="\n

    \n

    \n ",!0===app.get("development")?__p+='\n Path: '+(null==(__t=app.attributes.path)?"":__t)+"\n ":__p+="\n \n ",__p+='\n

    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n\n
    \n \n \n \n
    \n \x3c!----\x3e\n
    \n"}return __p},this.JST["templates/serviceInstallGitHubView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n';return __p},this.JST["templates/serviceInstallNewView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n";return __p},this.JST["templates/serviceInstallUploadView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n
    \n";return __p},this.JST["templates/serviceInstallUrlView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n";return __p},this.JST["templates/serviceInstallView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n\n
    \n\n
    \n
    \n\n
    \n
    \n \n \n
    \n\n \n \n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/shardsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n
    \n ';var genClass1="pure-u-6-24";__p+="\n ";var genClass2="pure-u-6-24";__p+="\n ";var disabled=" ",collectionName;__p+="\n ",__p+="\n ";var first=0;__p+="\n\n ";var collectionInSync=function(n){return!!_.isEqual(collections[n].Current,collections[n].Plan)};__p+="\n\n ",_.each(collections,function(n,t){if(__p+="\n ","_"!==t.substring(0,1)){__p+='\n
    \n ',__p+="\n\n ",0===first?(__p+='\n
    \n ',first++,__p+="\n "):__p+='\n
    \n ',__p+='\n\n
    \n
    \n '+(null==(__t=collectionName=t)?"":__t)+'\n
    \n
    \n
    \n ',visible===t?__p+='\n \n ':__p+='\n \n ',__p+="\n ",collectionInSync(t)?__p+='\n \n ':__p+='\n \n ',__p+="\n
    \n
    \n\n ",visible===t?__p+='\n
    \n ':__p+='\n \n\n ",0,__p+="\n "}),__p+="\n
    \n\n
    \n "}__p+="\n "}),__p+='\n
    \n ',"_system"===frontendConfig.db&&(__p+='\n \n '),__p+="\n
    \n
    \n\n"}return __p},this.JST["templates/spotlightView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n
    \n
    \n';return __p},this.JST["templates/statisticBarView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n';return __p},this.JST["templates/storeDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n\n
    \n \n
    \n\n
    \n
    \n\n
    \n
    \n Icon for Service\n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    Readme

    \n
    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Author: '+(null==(__t=app.attributes.author)?"":__t)+'\n

    \n

    \n Version: '+(null==(__t=app.attributes.latestVersion)?"":__t)+'\n

    \n

    \n GitHub: '+(null==(__t=app.attributes.location)?"":__t)+"\n

    \n

    \n ",app.attributes.license&&(__p+="\n License: "+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+="\n

    \n

    \n Categories: "+(null==(__t=app.attributes.categories)?"":__t)+'\n

    \n

    \n \n

    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n\n
    \n';return __p},this.JST["templates/subNavigationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n \n\n \n\n';return __p},this.JST["templates/supportView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n \n \n
    \n\n \n\n \n\n
    \n\n
    \n\n
    \n

    Find manuals for ArangoDB, AQL, Foxx and many other useful resources

    \n
    \n\n \n\n
    \n
    \n AQL Query Language\n
    \n \n
    \n\n \n\n \n\n
    \n
    \n
    \n\n
    \n\n';return __p},this.JST["templates/tableView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var escaped=function(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},cutByResolution=function(n){return 256\n
    \n
    \n
    Content
    \n
    \n
    \n
    _key
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n ',0===docs.length&&(__p+='\n
    \n No documents\n
    \n ');var odd=!0;docs.forEach(function(n){var e={};$.each(n.attributes.content,function(n,t){"_id"!==n&&"_rev"!==n&&"_key"!==n&&(e[n]=t)});var t=JSON.stringify(e);__p+='\n\n
    \n\n
    \n
    \n
    '+(null==(__t=cutByResolution(t))?"":__t)+'
    \n
    \n
    \n
    \n
    '+(null==(__t=n.attributes.key)?"":__t)+'
    \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n\n ',odd=!odd}),__p+="\n\n
    \n"}return __p},this.JST["templates/userBarView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n User: \n \n '+(null==(__t=_.escape(username))?"":__t)+'\n \n \n \n\n
      \n \n \n
    \n\n\x3c!--\n\n\n--\x3e \n';return __p},this.JST["templates/userManagementView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n \n
    \n\n\n ',collection.forEach(function(n){var t=n.get("user"),e=n.get("extra"),a=e.name,l=e.img,s=n.get("active"),i=''):i='',a=a||" ",":role:"===t.substring(0,6)&&(i=''),__p+='\n\n
    \n
    \n
    \n
    \n \x3c!-- --\x3e\n
    \n '+(null==(__t=i)?"":__t)+'\n
    \n \n ',__p+=s?'\n
    \n active\n
    \n ':'\n
    \n inactive\n
    \n ',__p+='\n
    \n
    \n\n
    '+(null==(__t=_.escape(t))?"":__t)+" "," "!==a&&(__p+="("+(null==(__t=_.escape(a))?"":__t)+")"),__p+="
    \n
    \n
    \n "}),__p+="\n
    \n
    \n";return __p},this.JST["templates/userPermissionView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" \n ";var genClass="pure-u-1-5";__p+="\n ";var genClass2="pure-u-1-5";__p+='\n\n
    \n
    \n
    \n
    Database
    \n
    Administrate
    \n
    Access
    \n
    No access
    \n
    Use default
    \n
    \n
    \n\n
    \n ',_.each(permissions,function(n,e){__p+="\n ";var t="";__p+="\n ","*"===e.charAt(0)&&(__p+="\n ",t="noAction",__p+="\n "),__p+='\n\n
    \n
    \n\n ',"*"!==e.charAt(0)&&(__p+='\n \n \n '),__p+="\n ","*"===e.charAt(0)?__p+='\n * \n ':__p+="\n "+(null==(__t=e)?"":__t)+"\n ",__p+="\n
    \n\n ";var a=n.permission;__p+="\n\n ","rw"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):"ro"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):"none"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '),__p+="\n ",__p+='\n\n \n\n "}),__p+="\n\n
    \n\n
    \n"}return __p},this.JST["templates/viewsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n\n
    \n \n
    \n\n
    \n
    \n
    \n \n
    \n\n\n ',views.forEach(function(n){var t=n.name;__p+='\n\n
    \n
    \n
    \n \n
    \n ',n.type&&(__p+='\n
    '+(null==(__t=n.type)?"":__t)+"
    \n "),__p+='\n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/viewView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n

    Info

    \n

    To learn how to configure Views, please read our documentation.

    \n
    \n \n
    \n
    \n \n ',window.frontendConfig.isCluster||(__p+='\n \n '),__p+='\n \n \n
    \n
    \n \n';return __p},this.JST["templates/warningList.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=" ",0\n
      \n ",console.log(warnings),_.each(warnings,function(n){console.log(n),__p+="\n
    • "+(null==(__t=n.code)?"":__t)+": "+(null==(__t=n.message)?"":__t)+"
    • \n "}),__p+="\n
    \n
    \n "),__p+="\n";return __p}; \ No newline at end of file +this.JST=this.JST||{},this.JST["templates/applicationDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n\n \n\n \n
    \n
    \n
    \n
    \n Icon for Service\n
    \n \n
    \n
    \n

    Out of order

    \n

    This service has failed to mount due to an error.

    \n

    This service has not yet been configured properly.

    \n

    Some dependencies have not yet been set up.

    \n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n
    \n
    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    \n ',app.attributes.license&&(__p+='\n '+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+='\n

    \n

    \n '+(null==(__t=app.attributes.version)?"":__t)+'\n

    \n

    \n '+(null==(__t=app.get("development")?"Development":"Production")?"":__t)+'\n

    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n
    \n \x3c!----\x3e\n
    \n";return __p},this.JST["templates/applicationListView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n \n
    '+(null==(__t=name)?"":__t)+(null==(__t=legacy?" (legacy)":"")?"":__t)+'
    \n
    '+(null==(__t=author)?"":__t)+'
    \n
    '+(null==(__t=description)?"":__t)+'
    \n \n \n
    '+(null==(__t=latestVersion)?"":__t)+'
    \n \n \n \n \n \n';return __p},this.JST["templates/applicationsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n
    \n
    \n\n\n\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/applierView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n\n ',_.each(data,function(n,t){__p+='\n\n
    \n

    '+(null==(__t=t)?"":__t)+'

    \n
    \n\n \n \n ',"string"==typeof n?__p+="\n \n \n \n \n ":(__p+="\n ",_.each(n,function(n,t){__p+="\n \n \n\n \n\n \n "}),__p+="\n "),__p+="\n \n
    "+(null==(__t=t)?"":__t)+""+(null==(__t=n)?"":__t)+"
    "+(null==(__t=t)?"":__t)+"\n ","string"!=typeof n&&"number"!=typeof n&&"boolean"!=typeof n?(__p+="\n \n \n ",_.each(n,function(n,t){__p+="\n \n \n \n \n "}),__p+="\n \n
    "+(null==(__t=t)?"":__t)+""+(null==(__t=n)?"":__t)+"
    \n "):__p+="\n "+(null==(__t=n)?"":__t)+"\n ",__p+="\n
    \n\n "}),__p+="\n\n
    \n
    \n";return __p},this.JST["templates/arangoTabbar.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n ',_.each(content.titles,function(n,t){__p+="\n ";var e=content.titles[t][0];__p+="\n ";var a=content.titles[t][1];__p+='\n \n "}),__p+="\n
    \n";return __p},this.JST["templates/arangoTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='
    \n ';var type=type;__p+='\n \n \n \n ';var hcounter=0;if(__p+="\n ",_.each(content.titles,function(n){__p+='\n \n ",hcounter++}),__p+="\n \n \n \n ",_.each(content.rows,function(n){var t=0;__p+="\n \n ",_.each(n,function(n){__p+="\n ",type&&"pre"===type[t]?__p+='\n \n ":__p+='\n \n ",__p+="\n ",t++}),__p+="\n \n "}),__p+="\n\n ",0===content.rows.length){__p+="\n \n ";var xcounter=0;__p+="\n ",_.each(content.titles,function(n){__p+="\n ",__p+=0===xcounter?"\n \n ":"\n \n ",__p+="\n ",xcounter++}),__p+="\n \n "}__p+="\n \n
    '+(null==(__t=n)?"":__t)+"
    \n
     \n                    '+(null==(__t=content.unescaped&&content.unescaped[t]?n:_.escape(n))?"":__t)+"\n                  
    \n
    '+(null==(__t=content.unescaped&&content.unescaped[t]?n:_.escape(n))?"":__t)+"
    No content.
    \n
    \n"}return __p},this.JST["templates/clusterView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n
      \n
    \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    coordinators
    \n
    \n
    \n\n
    \n
    \n
    \n
    DB Servers
    \n
    \n
    \n\n
    \n
    \n
    \n
    RAM
    \n
    \n
    \n\n
    \n
    \n
    \n
    Connections
    \n
    \n
    \n\n
    \n\n\n
    \n\n
    \n
    \n
    \n
    DATA
    \n
    \n
    \n\n
    \n
    \n
    \n
    HTTP
    \n
    \n
    \n\n
    \n
    \n
    \n
    AVG Request Time
    \n
    \n
    \n\n
    \n\n
    \n\n';return __p},this.JST["templates/collectionsItemView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n
    \n \n ',model.get("desc")?__p+='\n
    \n '+(null==(__t=model.get("desc"))?"":__t)+"\n
    \n ":"corrupted"===model.get("status")?__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n ":"loaded"!==model.get("status")&&"unloaded"!==model.get("status")&&"loading"!==model.get("status")&&"unloading"!==model.get("status")||(__p+="\n ",model.get("locked")||"loading"===model.get("status")||"unloading"===model.get("status")?("loading"===model.get("status")||model.get("status"),__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n "):__p+='\n
    \n '+(null==(__t=model.get("status"))?"":__t)+"\n
    \n ",__p+="\n "),__p+="\n
    \n
    \n\n ","index"===model.get("lockType")?__p+='\n \x3c!-- --\x3e\n
    '+(null==(__t=model.get("name"))?"":__t)+"
    \n ":__p+='\n
    '+(null==(__t=model.get("name"))?"":__t)+"
    \n ",__p+="\n
    \n";return __p},this.JST["templates/collectionsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n\n
    \n\n\n \n\n
    \n
    \n
    \n \n
    \n
    \n
    \n\n';return __p},this.JST["templates/dashboardView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" ";var subBar=function(n){__p+='\n
    \n
    '+(null==(__t=n)?"":__t)+"
    \n
    \n "},enlargeButton=function(n,t){t&&(__p+='\n
    \n \n
    \n ')};__p+="\n\n ";var largeChart=function(n,t,e){__p+='\n
    \n ',enlargeButton(n,!0),__p+='\n
    \n
    \n
    \n
    \n
    \n
    \n ',subBar(t),__p+="\n
    \n "};__p+="\n\n ";var mediumChart=function(n,t,e){__p+='\n
    \n
    \n ',enlargeButton(n,!0),__p+='\n
    \n
    \n
    \n
    \n
    \n
    \n ',subBar(t),__p+="\n
    \n
    \n "};__p+="\n\n ";var smallChart=function(n,t,e){__p+='\n
    \n ',enlargeButton(n,e),__p+='\n
    \n
    \n \n
    \n
    \n ',subBar(t),__p+="\n
    \n "};__p+="\n\n ";var tendency=function(n,t,e){__p+='\n
    \n
    \n ',enlargeButton(t,e),__p+='\n
    \n ',__p+="asyncRequests"===t?'\n
    sync
    \n
    \n \n ':'\n
    current
    \n
    \n \n ',__p+='\n
    \n
    \n
    \n ',__p+="asyncRequests"===t?'\n
    async
    \n
    \n \n ':'\n
    15-min-avg
    \n
    \n \n ',__p+='\n
    \n
    \n
    \n
    '+(null==(__t=n)?"":__t)+"
    \n
    \n "};__p+='\n\n \n\n
    \n
    \n
    \n
    \n\n ',!0!==hideStatistics&&(__p+='\n
    \n ',largeChart("requestsChart","Requests per Second"),__p+="\n\n ",tendency("Request Types","asyncRequests",!1),__p+="\n ",tendency("Number of Client Connections","clientConnections",!1),__p+='\n
    \n \n
    \n ',largeChart("dataTransferChart","Transfer Size per Second"),__p+="\n ",smallChart("dataTransferDistribution","Transfer Size per Second (distribution)",!1),__p+='\n
    \n \n
    \n ',largeChart("totalTimeChart","Average Request Time (seconds)"),__p+="\n ",smallChart("totalTimeDistribution","Average Request Time (distribution)",!1),__p+="\n
    \n
    \n "),__p+='\n
    \n\n \n\n"}return __p},this.JST["templates/databaseView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n\n
    \n\n\n
    \n\n \n\n
    \n\n\n
    \n
    \n \n ',collection.forEach(function(n){var t=n.get("name");__p+="\n\n ","_system"!==t&&(__p+='\n
    \n
    \n
    \n
    \n ',readOnly||(__p+='\n \n '),__p+='\n
    \n \n
    \n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n "),__p+="\n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/dbSelectionView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    DB: '+(null==(__t=current)?"":__t)+'\n\x3c!-- --\x3e\n
    \n\x3c!-- --\x3e\n
    \n\n\x3c!--\n\n--\x3e\n";return __p},this.JST["templates/documentsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n\n
    \n\n \x3c!-- remove marker for docupdiv--\x3e\n
      \n \x3c!-- Mark: removed prev/next collection button\n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n --\x3e\n
    • \n \n \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    • \n \n \n \n
    • \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n
    \n\n \n\n
    \n
    \n
    Please be careful. If no filter is set, the whole collection will be downloaded.
    \n \n
    \n
    \n\n \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n\x3c!--\n
    \n \n
    \n
    \n--\x3e\n\n
    \n
    \n
    \n
    \n\n\x3c!-- Delete Modal --\x3e\n\n\n';return __p},this.JST["templates/documentView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n
    _rev:
    \n
    \n
    \n
    \n
    _key:
    \n
    \n
    \n
    \n\n
    \n
    \n
    _from:
    \n \n
    \n
    \n
    _to:
    \n \n
    \n
    \n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n \n \n
    \n
    \n\t
    \n\n';return __p},this.JST["templates/edgeDefinitionTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n Edge definitions*:\n \n \n \n \n \n \n \n \n \n fromCollections*:\n \n \n \n \n \n \n \n \n toCollections*:\n \n \n \n \n \n \n \n';return __p},this.JST["templates/editListEntryView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n ',isReadOnly?__p+='\n '+(null==(__t=key)?"":__t)+"\n ":__p+='\n \n ",__p+='\n\n\n ',isReadOnly?__p+='\n '+(null==(__t=value)?"":__t)+"\n ":__p+='\n \n ",__p+='\n\n\n\n \n \n \n\n';return __p},this.JST["templates/filterSelect.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var cssClass;__p+='\n
    \n
    '+(null==(__t=name)?"":__t)+'
    \n\n
    \n \n
    \n\n
    \n
    Show all
    \n ',__p+="\n ",_.each(options,function(n){__p+="\n ",cssClass=n.active?(__p+="\n ","active"):(__p+=" \n ","inactive"),__p+="\n ",__p+='\n
    \n ';var t=n.color||"#f6f8fa";__p+="\n \n ",__p+="active"===cssClass?'\n \n ':'\n \n ',__p+='\n\n  \n '+(null==(__t=n.name)?"":__t)+"\n
    \n "}),__p+="\n
    \n\n
    \n\n"}return __p},this.JST["templates/footerView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var n,v,db;name&&(n=name||"",v=version||""),__p+='\n\n\n\n\n\n"}return __p},this.JST["templates/foxxActiveView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n

    '+(null==(__t=model.get("mount"))?"":__t)+'

    \n

    '+(null==(__t=model.get("name"))?"":__t)+'

    \n

    '+(null==(__t=model.get("version"))?"":__t)+'

    \n \x3c!--

    '+(null==(__t=model.get("category"))?"":__t)+'

    --\x3e\n
    \n \x3c!--
    --\x3e\n
    \n Icon for Service\n ',model.isDevelopment()?__p+='\n
    \n \n
    \n Development\n
    \n
    \n
    \n ':__p+='\n
    \n \n
    \n Production\n
    \n
    \n
    \n ',__p+="\n
    \n";return __p},this.JST["templates/foxxEditView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var appInfos=attributes.app.split(":");__p+='\n\n"}return __p},this.JST["templates/foxxMountView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n';return __p},this.JST["templates/foxxRepoView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n

    '+(null==(__t=model.name)?"":__t)+'

    \n

    '+(null==(__t=model.categories)?"":__t)+'

    \n \x3c!--

    23

    --\x3e\n
    \n
    \n ',upgrade?__p+='\n \n ':__p+='\n \n ',__p+='\n
    \n
    \n Icon for Service\n
    \n';return __p},this.JST["templates/graphManagementView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \n \x3c!-- --\x3e\n
    \n
    \n \n
    \n
    \n\n\n
    \n\n \n\n
    \n\n\n
    \n
    \n
    \n \n
    \n\n\n ',graphs.forEach(function(n){var t=n.get("_key"),e=n.get("isSmart");__p+='\n\n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n ',!0===e&&(__p+='\n
    Smart
    \n '),__p+='\n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/graphSettingsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\n ";var genClass="pure-u-1-3";__p+="\n ";var genClass2="pure-u-2-3";__p+="\n\n ";var formatName=function(n){return __p+="\n ",n.charAt(0).toUpperCase()+string.slice(1)};__p+='\n\n
    \n \n
    \n
    \n \n
    \n\n ',_.each(general,function(n,t){__p+="\n ","divider"===n.type?__p+='\n
    '+(null==(__t=n.name)?"":__t)+"
    \n ":(__p+='\n
    \n '+(null==(__t=n.name)?"":__t)+'\n
    \n
    \n\n ',"select"===n.type&&(__p+='\n \n "),__p+="\n\n ","string"===n.type&&(__p+='\n \n '),__p+="\n\n ","number"===n.type&&(__p+='\n \n '),__p+="\n\n ","range"===n.type&&(__p+='\n \n \n '),__p+="\n\n ","color"===n.type&&(__p+='\n \n '),__p+='\n\n \n
    \n '),__p+="\n\n "}),__p+='\n
    \n\n
    \n\n
    \n \n
    \n ',_.each(specific,function(n,t){if(__p+="\n\n ","true"!==n.hide){var e;if(__p+="\n ","divider"===n.type)__p+='\n
    '+(null==(__t=n.name)?"":__t)+"
    \n ";else __p+='\n
    \n '+(null==(__t=n.name)?"":__t)+'\n
    \n\n
    \n\n ',__p+="\n ",e=n.value?(__p+="\n ",n.value):(__p+="\n ",n.default),__p+="\n ",__p+="\n\n ","string"===n.type&&(__p+='\n \n '),__p+="\n\n ","number"===n.type&&(__p+='\n \n '),__p+="\n\n ","color"===n.type&&(__p+='\n \n '),__p+="\n\n ","range"===n.type&&(__p+='\n \n \n '),__p+="\n\n ","select"===n.type&&(__p+='\n \n "),__p+='\n \n
    \n ';__p+="\n "}__p+="\n "}),__p+='\n
    \n\n
    \n \n \n
    \n
    \n
    \n\n'}return __p},this.JST["templates/graphViewer2.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n\n
    \n
    \n \n
    \n
    \n\n \x3c!--
    --\x3e\n
    \n
    \n\n';return __p},this.JST["templates/graphViewGroupByEntry.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n \n
    \n \n
    \n
    \n';return __p},this.JST["templates/helpUsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n \n
    \n\n';return __p},this.JST["templates/indicesView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=" ","undefined"!=typeof supported&&(__p+='\n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    IDTypeUniqueSparseDeduplicateSelectivity Est.FieldsNameAction
    \n
    \n\n \n\n ",figuresData.figures.alive&&figuresData.figures.dead&&!frontendConfig.isCluster&&"mmfiles"===frontendConfig.engine&&(__p+='\n
    \n

    Figures

    \n

    The following information does not contain data stored in the write-ahead log. It can be inaccurate, until the write-ahead log has been completely flushed.

    \n
    \n \n \n \n \n \n \n \n \n \n \n ',figuresData.walMessage?__p+=' \n \n ":__p+='\n \n ",__p+='\n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
    TypeCountSizeDeletionInfo
    Alive'+(null==(__t=figuresData.walMessage)?"":__t)+"'+(null==(__t=numeral(figuresData.figures.alive.count).format("0,0"))?"":__t)+"\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.alive.size))?"":__t)+"\n ",__p+='\n -\n \n \n
    Dead\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.dead.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.dead.size))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=figuresData.figures.dead.deletion)?"":__t)+"\n ",__p+='\n \n
    \n \n \n
    \n
    \n '),__p+="\n\n ",figuresData.figures.datafiles&&figuresData.figures.journals&&figuresData.figures.compactors&&!frontendConfig.isCluster&&"mmfiles"===frontendConfig.engine&&(__p+='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    TypeCountSizeInfo
    Datafiles\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.datafiles.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.datafiles.fileSize))?"":__t)+"\n ",__p+='\n  \n
    \n \n \n
    \n
    Journals\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.journals.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.journals.fileSize))?"":__t)+"\n ",__p+='\n  \n \n \n
    Compactors\n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=numeral(figuresData.figures.compactors.count).format("0,0"))?"":__t)+"\n ",__p+='\n \n ',figuresData.walMessage?__p+="\n "+(null==(__t=figuresData.walMessage)?"":__t)+"\n ":__p+="\n "+(null==(__t=prettyBytes(figuresData.figures.compactors.fileSize))?"":__t)+"\n ",__p+='\n  \n \n
    Indexes\n '+(null==(__t=numeral(figuresData.figures.indexes.count).format("0,0"))?"":__t)+'\n \n '+(null==(__t=prettyBytes(figuresData.figures.indexes.size))?"":__t)+'\n  \n \n
    \n '),__p+="\n\n ",figuresData.figures.documentReferences&&figuresData.figures.uncollectedLogfileEntries&&!frontendConfig.isCluster&&"mmfiles"===frontendConfig.engine&&(__p+='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    TypeCountInfo
    Uncollected'+(null==(__t=figuresData.figures.uncollectedLogfileEntries)?"":__t)+'  \n \n \n
    References'+(null==(__t=figuresData.figures.documentReferences)?"":__t)+'  \n \n \n
    \n '),__p+="\n\n"}return __p},this.JST["templates/modalDownloadFoxx.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+="
    \n Your new Foxx Service is ready for download.\n You can edit it on your local system and repack it in a zip file to publish it on ArangoDB.\n
    \n";return __p},this.JST["templates/modalGraph.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\t
    \n\t\t\n\t\t\n\t
    \n';return __p},this.JST["templates/modalGraphTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n \n\n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Knows Graph\n \n
    Traversal Graph\n \n
    k Shortest Paths Graph\n \n
    Mps Graph\n \n
    World Graph\n \n
    Social Graph\n \n
    City Graph\n \n
    \n

    Need help? Visit our Graph Documentation

    \n\n
    \n\n
    \n\n \n\n ';var createTR=function(t,n){var e="";switch(t.mandatory&&(e="*"),__p+='\n \n '+(null==(__t=t.label)?"":__t)+(null==(__t=e)?"":__t)+':\n \n ',t.type){case"text":__p+='\n \n ';break;case"password":__p+='\n \n ';break;case"readonly":__p+='\n \n ';break;case"checkbox":var a="",l="";t.checked&&(a="checked"),t.disabled&&(l="disabled"),__p+='\n \n ";break;case"select":__p+='\n \n ";break;case"select2":__p+='\n \n ',t.addAdd&&(__p+='\n \n '),__p+="\n ",t.addDelete&&(__p+='\n \n '),__p+="\n "}t.info&&(__p+='\n \n \n \n \n '),__p+="\n \n "};__p+="\n\n \n \n ",_.each(content,function(n){createTR(n)}),__p+="\n\n \n
    \n ",advancedContent&&(__p+='\n
    \n
    \n \n
    \n
    \n \n \n ',_.each(advancedContent.content,function(n){createTR(n)}),__p+="\n \n
    \n
    \n
    \n
    \n
    \n "),__p+="\n
    \n\n
    \n"}return __p},this.JST["templates/modalHotkeys.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
      \n ',_.each(content,function(n){__p+='\n\n
    • '+(null==(__t=n.name)?"":__t)+"
    • \n\n ",_.each(n.content,function(n){__p+='\n
    • '+(null==(__t=n.label)?"":__t)+'
        '+(null==(__t=n.letter)?"":__t)+"  
    • \n "}),__p+="\n\n\n "}),__p+="\n
        \n\n";return __p},this.JST["templates/modalTable.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" ";var createTR=function(t){var n="";switch(t.mandatory&&(n="*"),__p+='\n \n '+(null==(__t=t.label)?"":__t)+(null==(__t=n)?"":__t)+':\n \n ",t.type){case"text":__p+='\n \n ';break;case"blob":__p+='\n \n ";break;case"password":__p+='\n \n ';break;case"readonly":__p+='\n \n ";break;case"checkbox":var e="",a="";t.checked&&(e="checked"),t.disabled&&(a="disabled"),__p+='\n \n ";break;case"select":__p+='\n \n ";break;case"select2":__p+='\n \n ',t.addDelete&&(__p+='\n \n '),__p+="\n ",t.addDelete&&(__p+='\n \n '),__p+="\n "}__p+="\n ",t.info&&(__p+='\n \n \n \n \n '),__p+="\n \n \n "};__p+="\n ",content&&(__p+="\n \n \n ",_.each(content,function(n){createTR(n)}),__p+="\n \n
        \n "),__p+="\n ",info&&(__p+="\n "+(null==(__t=info)?"":__t)+"\n "),__p+="\n ",advancedContent&&(__p+='\n
        \n
        \n \n
        \n
        \n \n \n ',_.each(advancedContent.content,function(n){createTR(n)}),__p+="\n \n
        \n
        \n
        \n
        \n
        \n "),__p+="\n"}return __p},this.JST["templates/modalTestResults.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){function createSuite(n){__p+='\n
        \n '+(null==(__t=n.title)?"":__t)+"\n
        \n
        \n ",n.tests.length&&(__p+='\n
          \n ',_.each(n.tests,createTest),__p+="\n
        \n "),__p+="\n ",n.suites.length&&(__p+='\n
        \n ',_.each(n.suites,createSuite),__p+="\n
        \n "),__p+="\n
        \n "}function createTest(n){var t=75\n \n ',n.result){case"pass":__p+='\n \n ';break;case"fail":__p+='\n \n ';break;case"pending":__p+='\n \n '}__p+="\n "+(null==(__t=n.title)?"":__t)+"\n "+(null==(__t=t?"("+n.duration+"ms)":"")?"":__t)+"\n \n ",_.isEmpty(n.err)||(__p+='\n
        '+(null==(__t=n.err.stack)?"":__t)+"
        \n "),__p+="\n \n "}__p+='\n
        \n ',info.stack?__p+='\n
        \n Test runner failed with an error.\n
        \n
        '+(null==(__t=info.stack)?"":__t)+"
        \n ":(__p+='\n
        \n Completed '+(null==(__t=info.stats.tests)?"":__t)+" tests in "+(null==(__t=info.stats.duration)?"":__t)+'ms\n ('+(null==(__t=info.stats.passes)?"":__t)+'/'+(null==(__t=info.stats.failures)?"":__t)+'/'+(null==(__t=info.stats.pending)?"":__t)+')\n
        \n
        \n ',info.tests.length&&(__p+='\n
          \n ',_.each(info.tests,createTest),__p+="\n
        \n "),__p+="\n ",info.suites.length&&(__p+='\n
        \n ',_.each(info.suites,createSuite),__p+="\n
        \n "),__p+="\n ",info.tests.length||info.suites.length||(__p+='\n
        No tests found.
        \n '),__p+="\n
        \n "),__p+="\n
        \n"}return __p},this.JST["templates/navigationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=' \n\n\n
        \n

        \n
        \n\n \n';return __p},this.JST["templates/nodesView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){if(__p+='\n
        \n\n ',0\n
        \n \n \n \n
        \n
        \n '),__p+='\n\n
        \n '+(null==(__t=scaleProperties.coordsOk)?"":__t)+' \n ',scaleProperties.coordsError&&(__p+='\n '+(null==(__t=scaleProperties.coordsError)?"":__t)+' \n '),__p+="\n ",scaleProperties.coordsPending&&!0===scaling&&"_system"===frontendConfig.db&&(__p+='\n '+(null==(__t=scaleProperties.coordsPending)?"":__t)+' \n \n '),__p+='\n
        \n
    \n\n
    \n\n
    \n
    \n
    Name
    \n
    Endpoint
    \n
    Version
    \n
    Since
    \n
    \n
    \n
    \n\n
    \n ',_.each(coords,function(n,t){__p+="\n ";var e=n.id+"-node";__p+='\n\n
    \n\n
    \n '+(null==(__t=n.ShortName)?"":__t)+'\n \n ',n.CanBeDeleted&&"_system"===frontendConfig.db&&(__p+='\n \n '),__p+='\n
    \n
    '+(null==(__t=n.Endpoint)?"":__t)+'
    \n\n
    '+(null==(__t=n.Version)?"":__t)+"
    \n\n ";var a=n.LastAckedTime.substr(11,18).slice(0,-1);__p+='\n
    '+(null==(__t=a)?"":__t)+"
    \n\n ","GOOD"===n.Status?__p+='\n
    \n ':__p+='\n
    \n ',__p+="\n\n
    \n\n "}),__p+="\n
    \n
    \n\n "}if(__p+="\n\n ",0\n
    \n \n \n \n
    \n
    \n '),__p+='\n\n
    \n '+(null==(__t=scaleProperties.dbsOk)?"":__t)+' \n ',scaleProperties.dbsError&&(__p+='\n '+(null==(__t=scaleProperties.dbsError)?"":__t)+' \n '),__p+="\n ",scaleProperties.dbsPending&&!0===scaling&&"_system"===frontendConfig.db&&(__p+='\n '+(null==(__t=scaleProperties.dbsPending)?"":__t)+' \n \n '),__p+='\n
    \n\n
    \n\n
    \n\n
    \n
    \n
    Name
    \n
    Endpoint
    \n
    Version
    \n
    Since
    \n
    \n
    \n
    \n\n '}__p+='\n\n
    \n ',_.each(dbs,function(n,t){__p+="\n ";var e=n.id+"-node";__p+='\n\n
    \n\n
    \n '+(null==(__t=n.ShortName)?"":__t)+'\n \n ',n.CanBeDeleted&&"_system"===frontendConfig.db&&(__p+='\n \n '),__p+='\n
    \n
    '+(null==(__t=n.Endpoint)?"":__t)+'
    \n\n
    '+(null==(__t=n.Version)?"":__t)+"
    \n\n ";var a=n.LastAckedTime.substr(11,18).slice(0,-1);__p+='\n
    '+(null==(__t=a)?"":__t)+"
    \n\n ","GOOD"===n.Status?__p+='\n
    \n ':__p+='\n
    \n ',__p+="\n\n
    \n "}),__p+="\n
    \n \n\n \n \n\n"}return __p},this.JST["templates/nodeView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n\n\n
    \n\n';return __p},this.JST["templates/notificationItem.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)notifications.forEach(function(n){__p+='\n \n"}),__p+="\n";return __p},this.JST["templates/notificationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n';return __p},this.JST["templates/progressBase.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/queryManagementViewActive.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n';return __p},this.JST["templates/queryManagementViewSlow.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n\n
    \n \n
    \n';return __p},this.JST["templates/queryView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n \n \n \n \n \n
    \n\n
    \n \n
    \n \n \n \n \n \n
    \n\n \n";return __p},this.JST["templates/replicationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n\n ',0!==mode&&(__p+='\n
    \n\n
    \n
    \n
    '+(null==(__t=info.state)?"":__t)+'
    \n
    State
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.mode)?"":__t)+'
    \n
    Mode
    \n
    \n
    \n\n
    \n
    \n ',"follower"===info.role&&3!==mode?__p+='\n
    Slave
    \n ':"leader"===info.role&&3!==mode?__p+='\n
    Master
    \n ':__p+='\n
    '+(null==(__t=info.role)?"":__t)+"
    \n ",__p+='\n
    Role
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.level)?"":__t)+'
    \n
    Level
    \n
    \n
    \n\n
    \n
    \n
    '+(null==(__t=info.health)?"":__t)+'
    \n
    Health
    \n
    \n
    \n\n ',"follower"===info.role?__p+='\n
    \n
    \n
    \n
    Server ID
    \n
    \n
    \n ':__p+='\n
    \n
    \n
    \n
    Last tick
    \n
    \n
    \n ',__p+="\n\n
    \n "),__p+="\n\n ",0===mode&&(__p+='\n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    '+(null==(__t=info.state)?"":__t)+'
    \n
    This node is not replicating from any other node. Also there are no active slaves or followers found.
    Please visit our Documentation to find out how to setup replication.
    \n
    \n '),__p+="\n\n \n ",5===mode&&(__p+='\n
    \n
    \n

    Info

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n ",3===mode?__p+='\n \n ":(__p+="\n ","follower"===info.role?__p+='\n \n ':__p+='\n \n ',__p+="\n "),__p+="\n \n \n
    Mode:'+(null==(__t=info.mode)?"":__t)+'
    Level:'+(null==(__t=info.level)?"":__t)+"
    Role:'+(null==(__t=info.role)?"":__t)+"SlaveMaster
    \n
    \n "),__p+="\n\n ","leader"===info.role&&(__p+='\n
    \n
    \n

    Comparison

    \n
    \n \n
    \n\n
    \n
    \n
    \n \n
    \n
    COMMUNICATION
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    LAST TICKS
    \n
    \n
    \n\n
    \n\n
    \n\n ',3===mode&&(__p+='\n
    \n
    \n

    Nodes

    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    Leader:
    Followers:
    \n '),__p+="\n "),__p+="\n\n ","leader"===info.role&&(__p+='\n
    \n
    \n ',3===mode?__p+="\n

    Leader State

    \n ":__p+="\n

    Master State

    \n ",__p+='\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Server ID:
    Time:
    Operations:
    \n
    \n\n
    \n
    \n ',3===mode?__p+="\n

    Follower States

    \n ":__p+="\n

    Slave States

    \n ",__p+='\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    Syncer IDServer IDClient infoTimeLast served tick
    \n
    \n '),__p+="\n\n ","follower"===info.role&&(__p+='\n
    \n
    \n ',3===mode?__p+="\n

    Follower States

    \n ":__p+="\n

    Slave States

    \n ",__p+='\n
    \n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n
    DatabaseEnabledPhaseReplicating fromLast tickState
    \n
    \n '),__p+="\n\n
    \n";return __p},this.JST["templates/scaleView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n
    \n\n ';var genClass="pure-u-1-5";__p+='\n\n
    \n
    \n
    Type
    \n
    Running
    \n
    Planned
    \n
    Status
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    Coordinators
    \n
    '+(null==(__t=runningCoords)?"":__t)+"
    \n ",!0===initialized?__p+='\n
    \n
    \n ':__p+='\n
    \n
    \n ',__p+='\n
    \n \n \n
    \n
    \n\n
    \n
    DBServers
    \n
    '+(null==(__t=runningDBs)?"":__t)+"
    \n ",!0===initialized?__p+='\n
    \n
    \n ':__p+='\n
    \n
    \n ',__p+='\n
    \n \n \n
    \n
    \n\n
    \n\n
    \n\n'}return __p},this.JST["templates/serviceDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='
    \n ';var visible=" visibility: hidden; ";__p+="\n ",installed&&(__p+="\n ",visible=" visibility: visible; ",__p+="\n "),__p+='\n\n
    \n \n\n \n
    \n\n \n\n
    \n
    \n\n
    \n
    \n Icon for Service\n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    Out of order

    \n

    This service has failed to mount due to an error.

    \n

    This service has not yet been configured properly.

    \n

    Some dependencies have not yet been set up.

    \n
    \n
    \n

    Readme

    \n
    \n
    \n ',app.get("readme")?__p+="\n "+(null==(__t=marked(app.get("readme")))?"":__t)+"\n ":__p+="\n

    No README data found.

    \n ",__p+='\n
    \n
    \n\n
    \n
    \n

    \n Author: '+(null==(__t=app.attributes.author)?"":__t)+"\n

    \n

    \n Mount: "+(null==(__t=app.attributes.mount)?"":__t)+'\n

    \n

    \n Mode: '+(null==(__t=app.get("development")?"Development":"Production")?"":__t)+'\n

    \n

    \n Version: '+(null==(__t=app.attributes.version)?"":__t)+"\n

    \n

    \n ",app.attributes.license&&(__p+="\n License: "+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+="\n

    \n

    \n ",!0===app.get("development")?__p+='\n Path: '+(null==(__t=app.attributes.path)?"":__t)+"\n ":__p+="\n \n ",__p+='\n

    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n\n
    \n \n \n \n
    \n \x3c!----\x3e\n
    \n"}return __p},this.JST["templates/serviceInstallGitHubView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n';return __p},this.JST["templates/serviceInstallNewView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n";return __p},this.JST["templates/serviceInstallUploadView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n
    \n";return __p},this.JST["templates/serviceInstallUrlView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n \n \n
    \n\n";return __p},this.JST["templates/serviceInstallView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n\n
    \n\n
    \n
    \n\n
    \n
    \n \n \n
    \n\n \n \n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n';return __p},this.JST["templates/shardsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+='\n
    \n ';var genClass1="pure-u-6-24";__p+="\n ";var genClass2="pure-u-6-24";__p+="\n ";var disabled=" ",collectionName;__p+="\n ",__p+="\n ";var first=0;__p+="\n\n ";var collectionInSync=function(n){return!!_.isEqual(collections[n].Current,collections[n].Plan)};__p+="\n\n ",_.each(collections,function(n,t){if(__p+="\n ","_"!==t.substring(0,1)){__p+='\n
    \n ',__p+="\n\n ",0===first?(__p+='\n
    \n ',first++,__p+="\n "):__p+='\n
    \n ',__p+='\n\n
    \n
    \n '+(null==(__t=collectionName=t)?"":__t)+'\n
    \n
    \n
    \n ',visible===t?__p+='\n \n ':__p+='\n \n ',__p+="\n ",collectionInSync(t)?__p+='\n \n ':__p+='\n \n ',__p+="\n
    \n
    \n\n ",visible===t?__p+='\n
    \n ':__p+='\n \n\n ",0,__p+="\n "}),__p+="\n
    \n\n
    \n "}__p+="\n "}),__p+='\n
    \n ',"_system"===frontendConfig.db&&(__p+='\n \n '),__p+="\n
    \n
    \n\n"}return __p},this.JST["templates/spotlightView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='
    \n
    \n \n
    \n
    \n';return __p},this.JST["templates/statisticBarView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+=' \n';return __p},this.JST["templates/storeDetailView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n\n
    \n \n
    \n\n
    \n
    \n\n
    \n
    \n Icon for Service\n
    \n
    \n

    \n '+(null==(__t=app.attributes.name)?"":__t)+'\n

    \n

    '+(null==(__t=app.attributes.description)?"":__t)+'

    \n
    \n
    \n

    Readme

    \n
    \n
    \n
    \n
    \n\n
    \n
    \n

    \n Author: '+(null==(__t=app.attributes.author)?"":__t)+'\n

    \n

    \n Version: '+(null==(__t=app.attributes.latestVersion)?"":__t)+'\n

    \n

    \n GitHub: '+(null==(__t=app.attributes.location)?"":__t)+"\n

    \n

    \n ",app.attributes.license&&(__p+="\n License: "+(null==(__t=app.attributes.license)?"":__t)+"\n "),__p+="\n

    \n

    \n Categories: "+(null==(__t=app.attributes.categories)?"":__t)+'\n

    \n

    \n \n

    \n
    \n
    \n \n
    \n
    \n\n
    \n
    \n\n
    \n';return __p},this.JST["templates/subNavigationView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n \n\n \n\n';return __p},this.JST["templates/supportView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\n
    \n \n \n
    \n\n \n\n \n\n
    \n\n
    \n\n
    \n

    Find manuals for ArangoDB, AQL, Foxx and many other useful resources

    \n
    \n\n \n\n
    \n
    \n AQL Query Language\n
    \n \n
    \n\n \n\n \n\n
    \n
    \n
    \n\n
    \n\n';return __p},this.JST["templates/tableView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var escaped=function(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},cutByResolution=function(n){return 256\n
    \n
    \n
    Content
    \n
    \n
    \n
    _key
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n\n
    \n ',0===docs.length&&(__p+='\n
    \n No documents\n
    \n ');var odd=!0;docs.forEach(function(n){var e={};$.each(n.attributes.content,function(n,t){"_id"!==n&&"_rev"!==n&&"_key"!==n&&(e[n]=t)});var t=JSON.stringify(e);__p+='\n\n
    \n\n
    \n
    \n
    '+(null==(__t=cutByResolution(t))?"":__t)+'
    \n
    \n
    \n
    \n
    '+(null==(__t=n.attributes.key)?"":__t)+'
    \n
    \n
    \n
    \n \n \n
    \n
    \n\n
    \n\n\n ',odd=!odd}),__p+="\n\n
    \n"}return __p},this.JST["templates/userBarView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n User: \n \n '+(null==(__t=_.escape(username))?"":__t)+'\n \n \n \n\n
      \n \n \n
    \n\n\x3c!--\n\n\n--\x3e \n';return __p},this.JST["templates/userManagementView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \x3c!-- --\x3e\n \n
    \n
    \n \n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n \n
    \n\n\n ',collection.forEach(function(n){var t=n.get("user"),e=n.get("extra"),a=e.name,l=e.img,s=n.get("active"),i=''):i='',a=a||" ",":role:"===t.substring(0,6)&&(i=''),__p+='\n\n
    \n
    \n
    \n
    \n \x3c!-- --\x3e\n
    \n '+(null==(__t=i)?"":__t)+'\n
    \n \n ',__p+=s?'\n
    \n active\n
    \n ':'\n
    \n inactive\n
    \n ',__p+='\n
    \n
    \n\n
    '+(null==(__t=_.escape(t))?"":__t)+" "," "!==a&&(__p+="("+(null==(__t=_.escape(a))?"":__t)+")"),__p+="
    \n
    \n
    \n "}),__p+="\n
    \n
    \n";return __p},this.JST["templates/userPermissionView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+=" \n ";var genClass="pure-u-1-5";__p+="\n ";var genClass2="pure-u-1-5";__p+='\n\n
    \n
    \n
    \n
    Database
    \n
    Administrate
    \n
    Access
    \n
    No access
    \n
    Use default
    \n
    \n
    \n\n
    \n ',_.each(permissions,function(n,e){__p+="\n ";var t="";__p+="\n ","*"===e.charAt(0)&&(__p+="\n ",t="noAction",__p+="\n "),__p+='\n\n
    \n
    \n\n ',"*"!==e.charAt(0)&&(__p+='\n \n \n '),__p+="\n ","*"===e.charAt(0)?__p+='\n * \n ':__p+="\n "+(null==(__t=e)?"":__t)+"\n ",__p+="\n
    \n\n ";var a=n.permission;__p+="\n\n ","rw"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):"ro"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):"none"===a?(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '):(__p+='\n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n ',"*"!==e.charAt(0)?__p+='\n
    \n \n
    \n ':__p+='\n
    \n '),__p+="\n ",__p+='\n\n \n\n "}),__p+="\n\n
    \n\n
    \n"}return __p},this.JST["templates/viewsView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n\n
    \n \n
    \n\n
    \n
    \n
    \n \n
    \n\n\n ',views.forEach(function(n){var t=n.name;__p+='\n\n
    \n
    \n
    \n \n
    \n ',n.type&&(__p+='\n
    '+(null==(__t=n.type)?"":__t)+"
    \n "),__p+='\n
    \n
    '+(null==(__t=t)?"":__t)+"
    \n
    \n
    \n\n "}),__p+="\n
    \n
    \n\n";return __p},this.JST["templates/viewView.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\n
    \n
    \n

    Info

    \n

    To learn how to configure Views, please read our documentation.

    \n
    \n \n
    \n
    \n \n ',window.frontendConfig.isCluster||(__p+='\n \n '),__p+='\n \n \n
    \n
    \n \n';return __p},this.JST["templates/warningList.ejs"]=function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+=" ",0\n
      \n ",console.log(warnings),_.each(warnings,function(n){console.log(n),__p+="\n
    • "+(null==(__t=n.code)?"":__t)+": "+(null==(__t=n.message)?"":__t)+"
    • \n "}),__p+="\n
    \n
    \n "),__p+="\n";return __p}; \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js.gz index 49318c1eb2..29a6020150 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/templates.min.js.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js index f080b2766f..c705f4ef3f 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js @@ -8,6 +8,10 @@ el: '#content', el2: '#collectionsThumbnailsIn', readOnly: false, + defaultReplicationFactor: 0, + minReplicationFactor: 0, + maxReplicationFactor: 0, + maxNumberOfShards: 0, searchTimeout: null, refreshRate: 10000, @@ -88,7 +92,11 @@ } }, - initialize: function () { + initialize: function (options) { + this.defaultReplicationFactor = frontendConfig.defaultReplicationFactor; + this.minReplicationFactor = frontendConfig.minReplicationFactor; + this.maxReplicationFactor = frontendConfig.maxReplicationFactor; + this.maxNumberOfShards = frontendConfig.maxNumberOfShards; var self = this; window.setInterval(function () { @@ -360,7 +368,11 @@ var distributeShardsLike = ''; if (replicationFactor === '') { - replicationFactor = 1; + if (self.defaultReplicationFactor) { + replicationFactor = self.defaultReplicationFactor; + } else { + replicationFactor = 1; + } } if (minReplicationFactor === '') { minReplicationFactor = 1; @@ -519,9 +531,9 @@ tableContent.push( window.modalView.createTextEntry( 'new-collection-shards', - 'Shards', - '', - 'The number of shards to create. You cannot change this afterwards. ', + 'Number of shards', + this.maxNumberOfShards === 1 ? String(this.maxNumberOfShards) : 0, + 'The number of shards to create. The maximum value is ' + this.maxNumberOfShards + '. You cannot change this afterwards. ', '', true ) @@ -537,6 +549,29 @@ false ) ); + tableContent.push( + window.modalView.createTextEntry( + 'new-replication-factor', + 'Replication factor', + this.defaultReplicationFactor, + 'Numeric value. Must be between ' + + (this.minReplicationFactor ? this.minReplicationFactor : 1) + + ' and ' + + (this.maxReplicationFactor ? this.maxReplicationFactor : 10) + + '. Total number of copies of the data in the cluster', + '', + false, + [ + { + rule: Joi.string().allow('').optional().regex(/^[1-9][0-9]*$/), + msg: 'Must be a number between ' + + (this.minReplicationFactor ? this.minReplicationFactor : 1) + + ' and ' + + (this.maxReplicationFactor ? this.maxReplicationFactor : 10) + '.' + } + ] + ) + ); } buttons.push( @@ -581,22 +616,6 @@ ) ); } - advancedTableContent.push( - window.modalView.createTextEntry( - 'new-replication-factor', - 'Replication factor', - '', - 'Numeric value. Must be at least 1. Total number of copies of the data in the cluster', - '', - false, - [ - { - rule: Joi.string().allow('').optional().regex(/^([1-9]|10)$/), - msg: 'Must be a number between 1 and 10.' - } - ] - ) - ); advancedTableContent.push( window.modalView.createTextEntry( 'new-min-replication-factor', diff --git a/js/common/bootstrap/errors.js b/js/common/bootstrap/errors.js index 804b8d3787..74491581b9 100644 --- a/js/common/bootstrap/errors.js +++ b/js/common/bootstrap/errors.js @@ -132,6 +132,7 @@ "ERROR_REPLICATION_WRONG_CHECKSUM" : { "code" : 1416, "message" : "wrong checksum" }, "ERROR_REPLICATION_SHARD_NONEMPTY" : { "code" : 1417, "message" : "shard not empty" }, "ERROR_CLUSTER_SERVER_UNKNOWN" : { "code" : 1449, "message" : "got a request from an unkown server" }, + "ERROR_CLUSTER_TOO_MANY_SHARDS" : { "code" : 1450, "message" : "too many shards" }, "ERROR_CLUSTER_COLLECTION_ID_EXISTS" : { "code" : 1453, "message" : "collection ID already exists" }, "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN" : { "code" : 1454, "message" : "could not create collection in plan" }, "ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION" : { "code" : 1456, "message" : "could not create collection" }, diff --git a/js/server/bootstrap/modules/internal.js b/js/server/bootstrap/modules/internal.js index ba9cf24e17..1ceb951536 100644 --- a/js/server/bootstrap/modules/internal.js +++ b/js/server/bootstrap/modules/internal.js @@ -527,6 +527,27 @@ delete global.SYS_DEBUG_CAN_USE_FAILAT; } + // ////////////////////////////////////////////////////////////////////////////// + // / @brief replicationFactor(s) and number of shards + // ////////////////////////////////////////////////////////////////////////////// + + if (global.DEFAULT_REPLICATION_FACTOR) { + exports.defaultReplicationFactor = global.DEFAULT_REPLICATION_FACTOR; + delete global.DEFAULT_REPLICATION_FACTOR; + } + if (global.MIN_REPLICATION_FACTOR) { + exports.minReplicationFactor = global.MIN_REPLICATION_FACTOR; + delete global.MIN_REPLICATION_FACTOR; + } + if (global.MAX_REPLICATION_FACTOR) { + exports.maxReplicationFactor = global.MAX_REPLICATION_FACTOR; + delete global.MAX_REPLICATION_FACTOR; + } + if (global.MAX_NUMBER_OF_SHARDS) { + exports.maxNumberOfShards = global.MAX_NUMBER_OF_SHARDS; + delete global.MAX_NUMBER_OF_SHARDS; + } + // ///////////////////////////////////////////////////////////////////////////// // / @brief whether or not clustering is enabled // ///////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/errors.dat b/lib/Basics/errors.dat index 995bbea3eb..04f0466ae3 100755 --- a/lib/Basics/errors.dat +++ b/lib/Basics/errors.dat @@ -170,6 +170,7 @@ ERROR_REPLICATION_SHARD_NONEMPTY,1417,"shard not empty","Will be raised when a s ################################################################################ ERROR_CLUSTER_SERVER_UNKNOWN,1449,"got a request from an unkown server","Will be raised on some occasions when one server gets a request from another, which has not (yet?) been made known via the agency." +ERROR_CLUSTER_TOO_MANY_SHARDS,1450,"too many shards","Will be raised when the number of shards for a collection is higher than allowed." ERROR_CLUSTER_COLLECTION_ID_EXISTS,1453,"collection ID already exists","Will be raised when a coordinator in a cluster tries to create a collection and the collection ID already exists." ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN,1454,"could not create collection in plan","Will be raised when a coordinator in a cluster cannot create an entry for a new collection in the Plan hierarchy in the agency." ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION,1456,"could not create collection","Will be raised when a coordinator in a cluster notices that some DBServers report problems when creating shards for a new collection." diff --git a/lib/Basics/voc-errors.cpp b/lib/Basics/voc-errors.cpp index e23771d1fe..66eebc265e 100644 --- a/lib/Basics/voc-errors.cpp +++ b/lib/Basics/voc-errors.cpp @@ -131,6 +131,7 @@ void TRI_InitializeErrorMessages() { REG_ERROR(ERROR_REPLICATION_WRONG_CHECKSUM, "wrong checksum"); REG_ERROR(ERROR_REPLICATION_SHARD_NONEMPTY, "shard not empty"); REG_ERROR(ERROR_CLUSTER_SERVER_UNKNOWN, "got a request from an unkown server"); + REG_ERROR(ERROR_CLUSTER_TOO_MANY_SHARDS, "too many shards"); REG_ERROR(ERROR_CLUSTER_COLLECTION_ID_EXISTS, "collection ID already exists"); REG_ERROR(ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION_IN_PLAN, "could not create collection in plan"); REG_ERROR(ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION, "could not create collection"); diff --git a/lib/Basics/voc-errors.h b/lib/Basics/voc-errors.h index 0c0de06a6f..24817fdf7a 100644 --- a/lib/Basics/voc-errors.h +++ b/lib/Basics/voc-errors.h @@ -664,6 +664,12 @@ constexpr int TRI_ERROR_REPLICATION_SHARD_NONEMPTY /// another, which has not (yet?) been made known via the agency. constexpr int TRI_ERROR_CLUSTER_SERVER_UNKNOWN = 1449; +/// 1450: ERROR_CLUSTER_TOO_MANY_SHARDS +/// "too many shards" +/// Will be raised when the number of shards for a collection is higher than +/// allowed. +constexpr int TRI_ERROR_CLUSTER_TOO_MANY_SHARDS = 1450; + /// 1453: ERROR_CLUSTER_COLLECTION_ID_EXISTS /// "collection ID already exists" /// Will be raised when a coordinator in a cluster tries to create a collection diff --git a/tests/js/common/shell/shell-cluster-collection.js b/tests/js/common/shell/shell-cluster-collection.js index f2b3eeffd4..f7377bbbe9 100644 --- a/tests/js/common/shell/shell-cluster-collection.js +++ b/tests/js/common/shell/shell-cluster-collection.js @@ -32,6 +32,7 @@ var jsunity = require("jsunity"); var arangodb = require("@arangodb"); var ERRORS = arangodb.errors; var db = arangodb.db; +let internal = require("internal"); //////////////////////////////////////////////////////////////////////////////// /// @brief test suite @@ -407,58 +408,6 @@ function ClusterCollectionSuite () { assertNull(db._collection("UnitTestsClusterCrud")); }, -//////////////////////////////////////////////////////////////////////////////// -/// @brief test create -//////////////////////////////////////////////////////////////////////////////// - - testCreateInvalidShardKeys1 : function () { - try { - db._create("UnitTestsClusterCrud", { shardKeys: [ ] }); - } - catch (err) { - assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); - } - }, - -//////////////////////////////////////////////////////////////////////////////// -/// @brief test create -//////////////////////////////////////////////////////////////////////////////// - - testCreateInvalidShardKeys2 : function () { - try { - db._create("UnitTestsClusterCrud", { shardKeys: [ "_rev" ] }); - } - catch (err) { - assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); - } - }, - -//////////////////////////////////////////////////////////////////////////////// -/// @brief test create -//////////////////////////////////////////////////////////////////////////////// - - testCreateInvalidShardKeys3 : function () { - try { - db._create("UnitTestsClusterCrud", { shardKeys: [ "", "foo" ] }); - } - catch (err) { - assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); - } - }, - -//////////////////////////////////////////////////////////////////////////////// -/// @brief test create -//////////////////////////////////////////////////////////////////////////////// - - testCreateInvalidShardKeys4 : function () { - try { - db._create("UnitTestsClusterCrud", { shardKeys: [ "a", "_from" ] }); - } - catch (err) { - assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); - } - }, - //////////////////////////////////////////////////////////////////////////////// /// @brief test create //////////////////////////////////////////////////////////////////////////////// @@ -466,8 +415,8 @@ function ClusterCollectionSuite () { testCreateInvalidNumberOfShards1 : function () { try { db._create("UnitTestsClusterCrud", { numberOfShards : 0 }); - } - catch (err) { + fail(); + } catch (err) { assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); } }, @@ -479,9 +428,75 @@ function ClusterCollectionSuite () { testCreateInvalidNumberOfShards2 : function () { try { db._create("UnitTestsClusterCrud", { numberOfShards : 1024 * 1024 }); + fail(); + } catch (err) { + assertEqual(ERRORS.ERROR_CLUSTER_TOO_MANY_SHARDS.code, err.errorNum); } - catch (err) { - assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test numberOfShards +//////////////////////////////////////////////////////////////////////////////// + + testCreateAsManyShardsAsAllowed : function () { + let max = internal.maxNumberOfShards; + if (max > 0) { + db._create("UnitTestsClusterCrud", { numberOfShards : max }); + let properties = db["UnitTestsClusterCrud"].properties(); + assertEqual(max, properties.numberOfShards); + } + }, + + testCreateMoreShardsThanAllowed : function () { + let max = internal.maxNumberOfShards; + if (max > 0) { + try { + db._create("UnitTestsClusterCrud", { numberOfShards : max + 1 }); + fail(); + } catch (err) { + assertEqual(ERRORS.ERROR_CLUSTER_TOO_MANY_SHARDS.code, err.errorNum); + } + } + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test replicationFactor +//////////////////////////////////////////////////////////////////////////////// + + testMinReplicationFactor : function () { + let min = internal.minReplicationFactor; + if (min > 0) { + db._create("UnitTestsClusterCrud", { replicationFactor: min }); + let properties = db["UnitTestsClusterCrud"].properties(); + assertEqual(min, properties.replicationFactor); + + try { + db["UnitTestsClusterCrud"].properties({ replicationFactor: min - 1 }); + fail(); + } catch (err) { + assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); + } + } + }, + + testMaxReplicationFactor : function () { + let max = internal.maxReplicationFactor; + if (max > 0) { + try { + db._create("UnitTestsClusterCrud", { replicationFactor: max }); + let properties = db["UnitTestsClusterCrud"].properties(); + assertEqual(max, properties.replicationFactor); + + try { + db["UnitTestsClusterCrud"].properties({ replicationFactor: max + 1 }); + fail(); + } catch (err) { + assertEqual(ERRORS.ERROR_BAD_PARAMETER.code, err.errorNum); + } + } catch (err) { + // if creation fails, then it must have been exactly this error + assertEqual(ERRORS.ERROR_CLUSTER_INSUFFICIENT_DBSERVERS.code, err.errorNum); + } } },