diff --git a/.gitignore b/.gitignore index 55d6d6c1a6..ef9aeb511d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ *.diff *.patch *.lnk +Thumbs.db testresult.json diff --git a/3rdParty/V8/CMakeLists.txt b/3rdParty/V8/CMakeLists.txt index 604218064d..dd5241e916 100644 --- a/3rdParty/V8/CMakeLists.txt +++ b/3rdParty/V8/CMakeLists.txt @@ -83,7 +83,7 @@ set(V8_INCLUDE_DIR if (${CMAKE_GENERATOR} MATCHES "Ninja") - message("NINJA!") + message(STATUS "using generator NINJA!") option(USE_DEBUG_V8 "compile V8 in DEBUG mode" OFF) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46b18c6abc..18a83e60da 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,13 +393,13 @@ if (CMAKE_COMPILER_IS_GNUCC) set(BASE_FLAGS "${BASE_FLAGS} -Wall -Wextra -Wno-unused-parameter") - set(CMAKE_C_FLAGS "" CACHE INTERNAL "default C compiler flags") + set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags") set(CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C debug flags") set(CMAKE_C_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C minimal size flags") set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C release flags") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -fno-omit-frame-pointer" CACHE INTERNAL "C release with debug info flags") - set(CMAKE_CXX_FLAGS "" CACHE INTERNAL "default C++ compiler flags") + set(CMAKE_CXX_FLAGS "-g" CACHE INTERNAL "default C++ compiler flags") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C++ debug flags") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C++ minimal size flags") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C++ release flags") @@ -412,13 +412,13 @@ elseif (CMAKE_COMPILER_IS_CLANG) set(BASE_FLAGS "${BASE_FLAGS} -Wall -Wextra -Wno-unused-parameter") - set(CMAKE_C_FLAGS "" CACHE INTERNAL "default C compiler flags") + set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags") set(CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C debug flags") set(CMAKE_C_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C minimal size flags") set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C release flags") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -fno-omit-frame-pointer" CACHE INTERNAL "C release with debug info flags") - set(CMAKE_CXX_FLAGS "" CACHE INTERNAL "default C++ compiler flags") + set(CMAKE_CXX_FLAGS "-g" CACHE INTERNAL "default C++ compiler flags") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C++ debug flags") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C++ minimal size flags") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C++ release flags") @@ -429,13 +429,13 @@ elseif (MSVC) message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}") endif () - set(CMAKE_C_FLAGS "" CACHE INTERNAL "default C++ compiler flags") + set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C++ compiler flags") set(CMAKE_C_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE INTERNAL "C++ debug flags") set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE INTERNAL "C++ minimal size flags") set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE INTERNAL "C++ release flags") set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG" CACHE INTERNAL "C++ release with debug info flags") - set(CMAKE_CXX_FLAGS "" CACHE INTERNAL "default C++ compiler flags") + set(CMAKE_CXX_FLAGS "-g" CACHE INTERNAL "default C++ compiler flags") set(CMAKE_CXX_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1" CACHE INTERNAL "C++ debug flags") set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE INTERNAL "C++ minimal size flags") set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE INTERNAL "C++ release flags") @@ -447,13 +447,13 @@ else () set(BASE_FLAGS "${BASE_FLAGS} -Wall") - set(CMAKE_C_FLAGS "" CACHE INTERNAL "default C compiler flags") + set(CMAKE_C_FLAGS "-g" CACHE INTERNAL "default C compiler flags") set(CMAKE_C_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C debug flags") set(CMAKE_C_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C minimal size flags") set(CMAKE_C_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C release flags") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -fno-omit-frame-pointer" CACHE INTERNAL "C release with debug info flags") - set(CMAKE_CXX_FLAGS "" CACHE INTERNAL "default C++ compiler flags") + set(CMAKE_CXX_FLAGS "-g" CACHE INTERNAL "default C++ compiler flags") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE INTERNAL "C++ debug flags") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os" CACHE INTERNAL "C++ minimal size flags") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fomit-frame-pointer" CACHE INTERNAL "C++ release flags") diff --git a/LICENSES-OTHER-COMPONENTS.md b/LICENSES-OTHER-COMPONENTS.md index 4206e787bf..f09662500b 100644 --- a/LICENSES-OTHER-COMPONENTS.md +++ b/LICENSES-OTHER-COMPONENTS.md @@ -18,11 +18,6 @@ * Project Home: https://code.google.com/p/fast-hash/ * License: [MIT License](https://code.google.com/p/fast-hash/) -### levenshtein distance - -* Project Home: https://github.com/bennybp/stringmatch/ -* License: [MIT License](https://github.com/bennybp/stringmatch/blob/master/stringmatch.h) - ### Google V8 4.3.61 * Project Home: https://code.google.com/p/v8/ diff --git a/README_maintainers.md b/README_maintainers.md index 7f045a18f3..4670e3832c 100644 --- a/README_maintainers.md +++ b/README_maintainers.md @@ -639,3 +639,34 @@ If there is a third argument and it is "D", then all servers are started up in the GNU debugger in separate windows (using `xterm`s). In that case one has to hit ENTER in the original terminal where the script runs to continue, once all processes have been start up in the debugger. + +Front-End (WebUI) +========= + +To see the changes of possible modifications in javascript files, templates +and scss files please use grunt to generate the bundled version. + +To install grunt (with all related dependencies), just go to the frontend app +folder (/js/apps/system/_admin/aardvark/APP) and run: + +`npm install` + +On Mac OS you also have to install grunt-cli: + +`(sudo) npm install -g grunt-cli` + +Then you can choose between three choices: + +1. Build all arangodb related files: + + * `grunt` + +2. Build all arangodb related files, including libraries. This should always +be used when we offer a new major release of arangodb. + + * `grunt deploy` + +3. Live build arangodb related files, when a file has been changed. This task +does not include the minifying process. + + * `grunt watch` diff --git a/arangod/Actions/actions.cpp b/arangod/Actions/actions.cpp index f563a83227..3073e55e41 100644 --- a/arangod/Actions/actions.cpp +++ b/arangod/Actions/actions.cpp @@ -27,7 +27,7 @@ #include "Basics/ReadWriteLock.h" #include "Basics/StringUtils.h" #include "Basics/WriteLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Rest/HttpRequest.h" using namespace arangodb::basics; diff --git a/arangod/ApplicationServer/ApplicationServer.cpp b/arangod/ApplicationServer/ApplicationServer.cpp index f2fb1e5a87..df88d09fa1 100644 --- a/arangod/ApplicationServer/ApplicationServer.cpp +++ b/arangod/ApplicationServer/ApplicationServer.cpp @@ -35,7 +35,7 @@ #include "Basics/conversions.h" #include "Basics/files.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/RandomGenerator.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" diff --git a/arangod/Aql/ExecutionEngine.cpp b/arangod/Aql/ExecutionEngine.cpp index fcffbd09f4..0841a970d8 100644 --- a/arangod/Aql/ExecutionEngine.cpp +++ b/arangod/Aql/ExecutionEngine.cpp @@ -21,13 +21,13 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#include "Aql/ExecutionEngine.h" -#include "Aql/CollectOptions.h" +#include "ExecutionEngine.h" #include "Aql/BasicBlocks.h" #include "Aql/CalculationBlock.h" #include "Aql/ClusterBlocks.h" #include "Aql/CollectBlock.h" #include "Aql/CollectNode.h" +#include "Aql/CollectOptions.h" #include "Aql/EnumerateCollectionBlock.h" #include "Aql/EnumerateListBlock.h" #include "Aql/ExecutionBlock.h" @@ -41,9 +41,9 @@ #include "Aql/TraversalBlock.h" #include "Aql/WalkerWorker.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/ClusterComm.h" +#include "Logger/Logger.h" #include "VocBase/server.h" using namespace arangodb::aql; diff --git a/arangod/Aql/QueryList.cpp b/arangod/Aql/QueryList.cpp index 131f1c8c79..ac3193c716 100644 --- a/arangod/Aql/QueryList.cpp +++ b/arangod/Aql/QueryList.cpp @@ -23,7 +23,7 @@ #include "Aql/QueryList.h" #include "Aql/Query.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/WriteLocker.h" #include "Basics/Exceptions.h" diff --git a/arangod/Aql/QueryRegistry.cpp b/arangod/Aql/QueryRegistry.cpp index 2abc0c29fb..abf000a309 100644 --- a/arangod/Aql/QueryRegistry.cpp +++ b/arangod/Aql/QueryRegistry.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "Aql/QueryRegistry.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/WriteLocker.h" #include "Aql/ExecutionEngine.h" diff --git a/arangod/Aql/RestAqlHandler.cpp b/arangod/Aql/RestAqlHandler.cpp index b8aa6191b1..e3b31ad424 100644 --- a/arangod/Aql/RestAqlHandler.cpp +++ b/arangod/Aql/RestAqlHandler.cpp @@ -25,7 +25,7 @@ #include "Aql/ClusterBlocks.h" #include "Aql/ExecutionEngine.h" #include "Aql/ExecutionBlock.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" #include "Basics/VelocyPackHelper.h" diff --git a/arangod/Aql/SortCondition.cpp b/arangod/Aql/SortCondition.cpp index 055099c5c4..8879beac38 100644 --- a/arangod/Aql/SortCondition.cpp +++ b/arangod/Aql/SortCondition.cpp @@ -23,7 +23,7 @@ #include "SortCondition.h" #include "Aql/AstNode.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using namespace arangodb::aql; diff --git a/arangod/Cluster/AgencyComm.cpp b/arangod/Cluster/AgencyComm.cpp index f9f103a382..4818d50747 100644 --- a/arangod/Cluster/AgencyComm.cpp +++ b/arangod/Cluster/AgencyComm.cpp @@ -21,15 +21,16 @@ /// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// -#include "Cluster/AgencyComm.h" -#include "Basics/Logger.h" +#include "AgencyComm.h" #include "Basics/ReadLocker.h" #include "Basics/StringUtils.h" #include "Basics/StringBuffer.h" #include "Basics/VelocyPackHelper.h" #include "Basics/WriteLocker.h" +#include "Basics/json.h" #include "Basics/random.h" #include "Cluster/ServerState.h" +#include "Logger/Logger.h" #include "Rest/Endpoint.h" #include "Rest/HttpRequest.h" #include "SimpleHttpClient/GeneralClientConnection.h" diff --git a/arangod/Cluster/ApplicationCluster.cpp b/arangod/Cluster/ApplicationCluster.cpp index 491b171b37..cccddc3b9a 100644 --- a/arangod/Cluster/ApplicationCluster.cpp +++ b/arangod/Cluster/ApplicationCluster.cpp @@ -25,7 +25,7 @@ #include "Rest/Endpoint.h" #include "Basics/files.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/HeartbeatThread.h" #include "Cluster/ServerState.h" diff --git a/arangod/Cluster/ClusterComm.cpp b/arangod/Cluster/ClusterComm.cpp index 457c09330a..bf3dda3ba3 100644 --- a/arangod/Cluster/ClusterComm.cpp +++ b/arangod/Cluster/ClusterComm.cpp @@ -23,7 +23,7 @@ #include "Cluster/ClusterComm.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ConditionLocker.h" #include "Basics/StringUtils.h" #include "Cluster/ClusterInfo.h" diff --git a/arangod/Cluster/ClusterComm.h b/arangod/Cluster/ClusterComm.h index 87dcfbac70..4a9ebba9cf 100644 --- a/arangod/Cluster/ClusterComm.h +++ b/arangod/Cluster/ClusterComm.h @@ -26,7 +26,7 @@ #include "Basics/Common.h" #include "Basics/ConditionVariable.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ReadWriteLock.h" #include "Basics/Thread.h" #include "Cluster/AgencyComm.h" diff --git a/arangod/Cluster/ClusterInfo.cpp b/arangod/Cluster/ClusterInfo.cpp index 1daf30b8ac..d396cc06d2 100644 --- a/arangod/Cluster/ClusterInfo.cpp +++ b/arangod/Cluster/ClusterInfo.cpp @@ -24,7 +24,7 @@ #include "ClusterInfo.h" #include "Basics/json.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/json-utilities.h" #include "Basics/JsonHelper.h" #include "Basics/MutexLocker.h" diff --git a/arangod/Cluster/HeartbeatThread.cpp b/arangod/Cluster/HeartbeatThread.cpp index 516c2853cb..de258b11ba 100644 --- a/arangod/Cluster/HeartbeatThread.cpp +++ b/arangod/Cluster/HeartbeatThread.cpp @@ -24,7 +24,7 @@ #include "HeartbeatThread.h" #include "Basics/ConditionLocker.h" #include "Basics/JsonHelper.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/ClusterComm.h" diff --git a/arangod/Cluster/HeartbeatThread.h b/arangod/Cluster/HeartbeatThread.h index 0911dbb98c..8d96e78957 100644 --- a/arangod/Cluster/HeartbeatThread.h +++ b/arangod/Cluster/HeartbeatThread.h @@ -28,7 +28,7 @@ #include "Basics/ConditionVariable.h" #include "Basics/Mutex.h" #include "Basics/Thread.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Cluster/AgencyComm.h" struct TRI_server_t; diff --git a/arangod/Cluster/ServerJob.cpp b/arangod/Cluster/ServerJob.cpp index f6b93bbea6..79d5ebc2ba 100644 --- a/arangod/Cluster/ServerJob.cpp +++ b/arangod/Cluster/ServerJob.cpp @@ -24,7 +24,7 @@ #include "ServerJob.h" #include "Basics/MutexLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Cluster/HeartbeatThread.h" #include "Cluster/ClusterInfo.h" #include "Dispatcher/DispatcherQueue.h" diff --git a/arangod/Cluster/ServerState.cpp b/arangod/Cluster/ServerState.cpp index bba79cb2ae..394d1ea9fb 100644 --- a/arangod/Cluster/ServerState.cpp +++ b/arangod/Cluster/ServerState.cpp @@ -25,7 +25,7 @@ #include "Basics/ReadLocker.h" #include "Basics/VelocyPackHelper.h" #include "Basics/WriteLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Cluster/AgencyComm.h" #include "Cluster/ClusterInfo.h" diff --git a/arangod/Dispatcher/ApplicationDispatcher.cpp b/arangod/Dispatcher/ApplicationDispatcher.cpp index ac65d927f6..4f3f91ebe1 100644 --- a/arangod/Dispatcher/ApplicationDispatcher.cpp +++ b/arangod/Dispatcher/ApplicationDispatcher.cpp @@ -27,7 +27,7 @@ #include "ApplicationDispatcher.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/Dispatcher.h" #include "Scheduler/Scheduler.h" #include "Scheduler/PeriodicTask.h" diff --git a/arangod/Dispatcher/Dispatcher.cpp b/arangod/Dispatcher/Dispatcher.cpp index 0a41a2e05f..d1539f04ef 100644 --- a/arangod/Dispatcher/Dispatcher.cpp +++ b/arangod/Dispatcher/Dispatcher.cpp @@ -24,7 +24,7 @@ #include "Dispatcher.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/DispatcherQueue.h" #include "Dispatcher/DispatcherThread.h" #include "Dispatcher/Job.h" diff --git a/arangod/Dispatcher/DispatcherQueue.cpp b/arangod/Dispatcher/DispatcherQueue.cpp index b25a449e5d..a933a5f068 100644 --- a/arangod/Dispatcher/DispatcherQueue.cpp +++ b/arangod/Dispatcher/DispatcherQueue.cpp @@ -24,7 +24,7 @@ #include "DispatcherQueue.h" #include "Basics/ConditionLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Dispatcher/DispatcherThread.h" #include "Dispatcher/Job.h" diff --git a/arangod/Dispatcher/DispatcherThread.cpp b/arangod/Dispatcher/DispatcherThread.cpp index 679e059406..168fbea906 100644 --- a/arangod/Dispatcher/DispatcherThread.cpp +++ b/arangod/Dispatcher/DispatcherThread.cpp @@ -25,7 +25,7 @@ #include "DispatcherThread.h" #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/Dispatcher.h" #include "Dispatcher/DispatcherQueue.h" #include "Dispatcher/Job.h" diff --git a/arangod/FulltextIndex/fulltext-index.cpp b/arangod/FulltextIndex/fulltext-index.cpp index 26eae04b46..e01ba62c49 100644 --- a/arangod/FulltextIndex/fulltext-index.cpp +++ b/arangod/FulltextIndex/fulltext-index.cpp @@ -24,7 +24,7 @@ #include "fulltext-index.h" #include "Basics/locks.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "fulltext-handles.h" #include "fulltext-list.h" diff --git a/arangod/HttpServer/ApplicationEndpointServer.cpp b/arangod/HttpServer/ApplicationEndpointServer.cpp index e6687f8acc..d83bb0ac5b 100644 --- a/arangod/HttpServer/ApplicationEndpointServer.cpp +++ b/arangod/HttpServer/ApplicationEndpointServer.cpp @@ -28,14 +28,14 @@ #include "Basics/FileUtils.h" #include "Basics/RandomGenerator.h" #include "Basics/ReadLocker.h" -#include "Basics/WriteLocker.h" -#include "Basics/Logger.h" -#include "Basics/ssl-helper.h" #include "Basics/VelocyPackHelper.h" +#include "Basics/WriteLocker.h" +#include "Basics/ssl-helper.h" #include "Dispatcher/ApplicationDispatcher.h" #include "HttpServer/HttpHandlerFactory.h" #include "HttpServer/HttpServer.h" #include "HttpServer/HttpsServer.h" +#include "Logger/Logger.h" #include "Rest/Version.h" #include "Scheduler/ApplicationScheduler.h" diff --git a/arangod/HttpServer/AsyncJobManager.cpp b/arangod/HttpServer/AsyncJobManager.cpp index 075178ec64..3d345cac2e 100644 --- a/arangod/HttpServer/AsyncJobManager.cpp +++ b/arangod/HttpServer/AsyncJobManager.cpp @@ -24,7 +24,7 @@ #include "AsyncJobManager.h" #include "Basics/ReadLocker.h" #include "Basics/WriteLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "HttpServer/HttpHandler.h" #include "HttpServer/HttpServerJob.h" diff --git a/arangod/HttpServer/HttpCommTask.cpp b/arangod/HttpServer/HttpCommTask.cpp index e3e3771c89..c2b24cd3c0 100644 --- a/arangod/HttpServer/HttpCommTask.cpp +++ b/arangod/HttpServer/HttpCommTask.cpp @@ -26,7 +26,7 @@ #include "Basics/MutexLocker.h" #include "Basics/StringBuffer.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "HttpServer/HttpHandler.h" #include "HttpServer/HttpHandlerFactory.h" #include "HttpServer/HttpServer.h" @@ -75,7 +75,12 @@ HttpCommTask::HttpCommTask(HttpServer* server, TRI_socket_t socket, _sinceCompactification(0), _originalBodyLength(0), _setupDone(false) { - LOG(TRACE) << "connection established, client " << TRI_get_fd_or_handle_of_socket(socket) << ", server ip " << _connectionInfo.serverAddress << ", server port " << _connectionInfo.serverPort << ", client ip " << _connectionInfo.clientAddress << ", client port " << _connectionInfo.clientPort; + LOG(TRACE) << "connection established, client " + << TRI_get_fd_or_handle_of_socket(socket) << ", server ip " + << _connectionInfo.serverAddress << ", server port " + << _connectionInfo.serverPort << ", client ip " + << _connectionInfo.clientAddress << ", client port " + << _connectionInfo.clientPort; // acquire a statistics entry and set the type to HTTP ConnectionStatisticsAgent::acquire(); @@ -88,7 +93,8 @@ HttpCommTask::HttpCommTask(HttpServer* server, TRI_socket_t socket, //////////////////////////////////////////////////////////////////////////////// HttpCommTask::~HttpCommTask() { - LOG(TRACE) << "connection closed, client " << TRI_get_fd_or_handle_of_socket(_commSocket); + LOG(TRACE) << "connection closed, client " + << TRI_get_fd_or_handle_of_socket(_commSocket); // free write buffers and statistics for (auto& i : _writeBuffers) { @@ -171,7 +177,8 @@ bool HttpCommTask::processRead() { size_t headerLength = ptr - (_readBuffer->c_str() + _startPosition); if (headerLength > MaximalHeaderSize) { - LOG(WARN) << "maximal header size is " << MaximalHeaderSize << ", request header size is " << headerLength; + LOG(WARN) << "maximal header size is " << MaximalHeaderSize + << ", request header size is " << headerLength; // header is too large HttpResponse response(HttpResponse::REQUEST_HEADER_FIELDS_TOO_LARGE, @@ -189,8 +196,9 @@ bool HttpCommTask::processRead() { if (ptr < end) { _readPosition = ptr - _readBuffer->c_str() + 4; - LOG(TRACE) << "HTTP READ FOR " << (void*)this << ": " << std::string(_readBuffer->c_str() + _startPosition, - _readPosition - _startPosition); + LOG(TRACE) << "HTTP READ FOR " << (void*)this << ": " + << std::string(_readBuffer->c_str() + _startPosition, + _readPosition - _startPosition); // check that we know, how to serve this request and update the connection // information, i. e. client and server addresses and ports and create a @@ -250,7 +258,8 @@ bool HttpCommTask::processRead() { // and ports _request->setProtocol(_server->protocol()); - LOG(TRACE) << "server port " << _connectionInfo.serverPort << ", client port " << _connectionInfo.clientPort; + LOG(TRACE) << "server port " << _connectionInfo.serverPort + << ", client port " << _connectionInfo.clientPort; // set body start to current position _bodyPosition = _readPosition; @@ -314,7 +323,9 @@ bool HttpCommTask::processRead() { l = 6; } - LOG(WARN) << "got corrupted HTTP request '" << std::string(_readBuffer->c_str() + _startPosition, l) << "'"; + LOG(WARN) << "got corrupted HTTP request '" + << std::string(_readBuffer->c_str() + _startPosition, l) + << "'"; // bad request, method not allowed HttpResponse response(HttpResponse::METHOD_NOT_ALLOWED, @@ -399,7 +410,7 @@ bool HttpCommTask::processRead() { _request->setBody(_readBuffer->c_str() + _bodyPosition, _bodyLength); LOG(TRACE) << "" << std::string(_readBuffer->c_str() + _bodyPosition, - _bodyLength); + _bodyLength); // remove body from read buffer and reset read position _readRequestBody = false; @@ -643,7 +654,12 @@ void HttpCommTask::addResponse(HttpResponse* response) { _writeBuffers.push_back(buffer.get()); auto b = buffer.release(); - LOG(TRACE) << "HTTP WRITE FOR " << (void*)this << ": " << b->c_str(); + if (!b->empty()) { + LOG_TOPIC(TRACE, Logger::REQUESTS) + << "\"http-request-response\",\"" << (void*)this << "\",\"" + << (StringUtils::escapeUnicode(std::string(b->c_str(), b->length()))) + << "\""; + } // clear body response->body().clear(); @@ -652,15 +668,14 @@ void HttpCommTask::addResponse(HttpResponse* response) { _writeBuffersStats.push_back(RequestStatisticsAgent::transfer()); - LOG_TOPIC(INFO, Logger::REQUESTS) - << "\"http-request\",\"" << _connectionInfo.clientAddress - << "\",\"" << HttpRequest::translateMethod(_requestType) << "\",\"" - << HttpRequest::translateVersion(_httpVersion) << "\"," - << static_cast(response->responseCode()) << "," - << _originalBodyLength << "," - << responseBodyLength << ",\"" - << _fullUrl << "\"," - << Logger::DURATION(totalTime, 6); + LOG_TOPIC(INFO, Logger::REQUESTS) + << "\"http-request-end\",\"" << (void*)this << "\",\"" + << _connectionInfo.clientAddress << "\",\"" + << HttpRequest::translateMethod(_requestType) << "\",\"" + << HttpRequest::translateVersion(_httpVersion) << "\"," + << static_cast(response->responseCode()) << "," + << _originalBodyLength << "," << responseBodyLength << ",\"" << _fullUrl + << "\"," << Logger::DURATION(totalTime, 6); // start output fillWriteBuffer(); @@ -687,11 +702,13 @@ bool HttpCommTask::checkContentLength(bool expectContentLength) { // content-length header was sent but the request method does not support // that // we'll warn but read the body anyway - LOG(WARN) << "received HTTP GET/HEAD request with content-length, this should not happen"; + LOG(WARN) << "received HTTP GET/HEAD request with content-length, this " + "should not happen"; } if ((size_t)bodyLength > MaximalBodySize) { - LOG(WARN) << "maximal body size is " << MaximalBodySize << ", request body size is " << bodyLength; + LOG(WARN) << "maximal body size is " << MaximalBodySize + << ", request body size is " << bodyLength; // request entity too large HttpResponse response(HttpResponse::REQUEST_ENTITY_TOO_LARGE, @@ -762,7 +779,8 @@ void HttpCommTask::processCorsOptions(uint32_t compatibility) { // server. that's a client problem. response.setHeader(TRI_CHAR_LENGTH_PAIR("access-control-allow-headers"), allowHeaders); - LOG(TRACE) << "client requested validation of the following headers: " << allowHeaders; + LOG(TRACE) << "client requested validation of the following headers: " + << allowHeaders; } // set caching time (hard-coded value) @@ -780,8 +798,7 @@ void HttpCommTask::processCorsOptions(uint32_t compatibility) { void HttpCommTask::processRequest(uint32_t compatibility) { // check for deflate bool found; - std::string const acceptEncoding = - _request->header("accept-encoding", found); + std::string const acceptEncoding = _request->header("accept-encoding", found); if (found) { if (acceptEncoding.find("deflate") != std::string::npos) { @@ -789,6 +806,13 @@ void HttpCommTask::processRequest(uint32_t compatibility) { } } + LOG_TOPIC(INFO, Logger::REQUESTS) + << "\"http-request-begin\",\"" << (void*)this << "\",\"" + << _connectionInfo.clientAddress << "\",\"" + << HttpRequest::translateMethod(_requestType) << "\",\"" + << HttpRequest::translateVersion(_httpVersion) << "\"," << _fullUrl + << "\""; + // check for an async request std::string const asyncExecution = _request->header("x-arango-async", found); @@ -807,6 +831,25 @@ void HttpCommTask::processRequest(uint32_t compatibility) { return; } + if (_request != nullptr) { + char const* body = ""; + size_t bodySize = 0; + + if (_request != nullptr) { + bodySize = _request->bodySize(); + + if (bodySize != 0) { + body = _request->body(); + } + } + + if (bodySize != 0) { + LOG_TOPIC(DEBUG, Logger::REQUESTS) + << "\"http-request-body\",\"" << (void*)this << "\",\"" + << (StringUtils::escapeUnicode(std::string(body, bodySize))) << "\""; + } + } + handler->setTaskId(_taskId, _loop); // clear request object diff --git a/arangod/HttpServer/HttpHandler.cpp b/arangod/HttpServer/HttpHandler.cpp index 5711c27ed2..02f9d7ced2 100644 --- a/arangod/HttpServer/HttpHandler.cpp +++ b/arangod/HttpServer/HttpHandler.cpp @@ -24,7 +24,7 @@ #include "HttpHandler.h" #include "Basics/StringUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/Dispatcher.h" #include "Rest/HttpRequest.h" diff --git a/arangod/HttpServer/HttpHandlerFactory.cpp b/arangod/HttpServer/HttpHandlerFactory.cpp index 3577dabbe0..1c4f0eeba3 100644 --- a/arangod/HttpServer/HttpHandlerFactory.cpp +++ b/arangod/HttpServer/HttpHandlerFactory.cpp @@ -23,7 +23,7 @@ #include "HttpHandlerFactory.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "HttpServer/HttpHandler.h" #include "Rest/HttpRequest.h" diff --git a/arangod/HttpServer/HttpServer.cpp b/arangod/HttpServer/HttpServer.cpp index 5d262603ae..a8c312498f 100644 --- a/arangod/HttpServer/HttpServer.cpp +++ b/arangod/HttpServer/HttpServer.cpp @@ -26,7 +26,7 @@ #include "Basics/MutexLocker.h" #include "Basics/WorkMonitor.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/Dispatcher.h" #include "HttpServer/AsyncJobManager.h" #include "HttpServer/HttpCommTask.h" diff --git a/arangod/HttpServer/HttpServerJob.cpp b/arangod/HttpServer/HttpServerJob.cpp index f421cb09c3..fea1c01cb0 100644 --- a/arangod/HttpServer/HttpServerJob.cpp +++ b/arangod/HttpServer/HttpServerJob.cpp @@ -25,7 +25,7 @@ #include "HttpServerJob.h" #include "Basics/WorkMonitor.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Dispatcher/DispatcherQueue.h" #include "HttpServer/AsyncJobManager.h" #include "HttpServer/HttpCommTask.h" diff --git a/arangod/HttpServer/HttpsCommTask.cpp b/arangod/HttpServer/HttpsCommTask.cpp index 262ba7760c..9d4df9c6b4 100644 --- a/arangod/HttpServer/HttpsCommTask.cpp +++ b/arangod/HttpServer/HttpsCommTask.cpp @@ -26,7 +26,7 @@ #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/socket-utils.h" #include "Basics/ssl-helper.h" #include "Basics/StringBuffer.h" @@ -85,7 +85,7 @@ bool HttpsCommTask::setup(Scheduler* scheduler, EventLoop loop) { if (_ssl == nullptr) { LOG(DEBUG) << "cannot build new SSL connection: " - << arangodb::basics::lastSSLError(); + << lastSSLError(); shutdownSsl(false); return false; // terminate ourselves, ssl is nullptr @@ -202,7 +202,7 @@ bool HttpsCommTask::trySSLAccept() { // shutdown of connection if (res == 0) { LOG(DEBUG) << "SSL_accept failed: " - << arangodb::basics::lastSSLError(); + << lastSSLError(); shutdownSsl(false); return false; @@ -222,7 +222,7 @@ bool HttpsCommTask::trySSLAccept() { } LOG(TRACE) << "error in SSL handshake: " - << arangodb::basics::lastSSLError(); + << lastSSLError(); shutdownSsl(false); return false; @@ -249,7 +249,7 @@ again: case SSL_ERROR_SSL: LOG(DEBUG) << "received SSL error (bytes read " << nr << ", socket " << TRI_get_fd_or_handle_of_socket(_commSocket) - << "): " << arangodb::basics::lastSSLError(); + << "): " << lastSSLError(); shutdownSsl(false); return false; @@ -278,7 +278,7 @@ again: case SSL_ERROR_SYSCALL: if (res != 0) { LOG(DEBUG) << "SSL_read returned syscall error with: " - << arangodb::basics::lastSSLError(); + << lastSSLError(); } else if (nr == 0) { LOG(DEBUG) << "SSL_read returned syscall error because an EOF was received"; @@ -292,7 +292,7 @@ again: default: LOG(DEBUG) << "received error with " << res << " and " << nr << ": " - << arangodb::basics::lastSSLError(); + << lastSSLError(); shutdownSsl(false); return false; @@ -363,7 +363,7 @@ bool HttpsCommTask::trySSLWrite() { case SSL_ERROR_SYSCALL: if (res != 0) { LOG(DEBUG) << "SSL_write returned syscall error with: " - << arangodb::basics::lastSSLError(); + << lastSSLError(); } else if (nr == 0) { LOG(DEBUG) << "SSL_write returned syscall error because an EOF was " "received"; @@ -377,7 +377,7 @@ bool HttpsCommTask::trySSLWrite() { default: LOG(DEBUG) << "received error with " << res << " and " << nr << ": " - << arangodb::basics::lastSSLError(); + << lastSSLError(); shutdownSsl(false); return false; @@ -437,7 +437,7 @@ void HttpsCommTask::shutdownSsl(bool initShutdown) { if (err != SSL_ERROR_WANT_READ && err != SSL_ERROR_WANT_WRITE) { LOG(DEBUG) << "received shutdown error with " << res << ", " << err - << ": " << arangodb::basics::lastSSLError(); + << ": " << lastSSLError(); break; } } diff --git a/arangod/HttpServer/PathHandler.cpp b/arangod/HttpServer/PathHandler.cpp index 11016bd201..529cb0ce24 100644 --- a/arangod/HttpServer/PathHandler.cpp +++ b/arangod/HttpServer/PathHandler.cpp @@ -24,7 +24,7 @@ #include "PathHandler.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/mimetypes.h" #include "Basics/StringBuffer.h" #include "Basics/StringUtils.h" diff --git a/arangod/Indexes/FulltextIndex.cpp b/arangod/Indexes/FulltextIndex.cpp index a967931034..a1ce5b6d89 100644 --- a/arangod/Indexes/FulltextIndex.cpp +++ b/arangod/Indexes/FulltextIndex.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "FulltextIndex.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Utf8Helper.h" #include "FulltextIndex/fulltext-index.h" #include "VocBase/document-collection.h" diff --git a/arangod/Indexes/GeoIndex2.cpp b/arangod/Indexes/GeoIndex2.cpp index b787279730..ffeb353f8f 100644 --- a/arangod/Indexes/GeoIndex2.cpp +++ b/arangod/Indexes/GeoIndex2.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "GeoIndex2.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "VocBase/document-collection.h" #include "VocBase/transaction.h" diff --git a/arangod/Indexes/PathBasedIndex.cpp b/arangod/Indexes/PathBasedIndex.cpp index c9daaa19e7..6855c095cc 100644 --- a/arangod/Indexes/PathBasedIndex.cpp +++ b/arangod/Indexes/PathBasedIndex.cpp @@ -23,7 +23,7 @@ #include "PathBasedIndex.h" #include "Aql/AstNode.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include #include diff --git a/arangod/Replication/ContinuousSyncer.cpp b/arangod/Replication/ContinuousSyncer.cpp index 7a1d8370bb..8d08dcfa36 100644 --- a/arangod/Replication/ContinuousSyncer.cpp +++ b/arangod/Replication/ContinuousSyncer.cpp @@ -22,12 +22,13 @@ //////////////////////////////////////////////////////////////////////////////// #include "ContinuousSyncer.h" - #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Basics/json.h" +#include "Basics/JsonHelper.h" #include "Basics/StringBuffer.h" #include "Basics/VelocyPackHelper.h" #include "Basics/WriteLocker.h" +#include "Logger/Logger.h" #include "Replication/InitialSyncer.h" #include "Rest/HttpRequest.h" #include "SimpleHttpClient/SimpleHttpClient.h" diff --git a/arangod/Replication/InitialSyncer.cpp b/arangod/Replication/InitialSyncer.cpp index 0b7f3e896b..cc2b75057e 100644 --- a/arangod/Replication/InitialSyncer.cpp +++ b/arangod/Replication/InitialSyncer.cpp @@ -23,12 +23,14 @@ #include "InitialSyncer.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Basics/json.h" +#include "Basics/JsonHelper.h" #include "Basics/ReadLocker.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" #include "Indexes/Index.h" #include "Indexes/PrimaryIndex.h" +#include "Logger/Logger.h" #include "SimpleHttpClient/SimpleHttpClient.h" #include "SimpleHttpClient/SimpleHttpResult.h" #include "Utils/CollectionGuard.h" diff --git a/arangod/Replication/InitialSyncer.h b/arangod/Replication/InitialSyncer.h index dc4ed3e4b5..30beb7d6ee 100644 --- a/arangod/Replication/InitialSyncer.h +++ b/arangod/Replication/InitialSyncer.h @@ -25,7 +25,7 @@ #define ARANGOD_REPLICATION_INITIAL_SYNCER_H 1 #include "Basics/Common.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Replication/Syncer.h" #include "Utils/SingleCollectionTransaction.h" diff --git a/arangod/RestHandler/RestAdminLogHandler.cpp b/arangod/RestHandler/RestAdminLogHandler.cpp index 194428c414..3c80b63191 100644 --- a/arangod/RestHandler/RestAdminLogHandler.cpp +++ b/arangod/RestHandler/RestAdminLogHandler.cpp @@ -26,7 +26,7 @@ #include #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "Rest/HttpRequest.h" diff --git a/arangod/RestHandler/RestBatchHandler.cpp b/arangod/RestHandler/RestBatchHandler.cpp index f5e8ed5590..83b1b8f617 100644 --- a/arangod/RestHandler/RestBatchHandler.cpp +++ b/arangod/RestHandler/RestBatchHandler.cpp @@ -24,7 +24,7 @@ #include "RestBatchHandler.h" #include "Basics/StringUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "HttpServer/HttpHandlerFactory.h" #include "HttpServer/HttpServer.h" #include "Rest/HttpRequest.h" diff --git a/arangod/RestHandler/RestImportHandler.cpp b/arangod/RestHandler/RestImportHandler.cpp index acfba1b0cb..277cb1c7b7 100644 --- a/arangod/RestHandler/RestImportHandler.cpp +++ b/arangod/RestHandler/RestImportHandler.cpp @@ -22,10 +22,11 @@ //////////////////////////////////////////////////////////////////////////////// #include "RestImportHandler.h" -#include "Basics/Logger.h" +#include "Basics/json-utilities.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/ServerState.h" +#include "Logger/Logger.h" #include "Rest/HttpRequest.h" #include "Utils/OperationOptions.h" #include "Utils/SingleCollectionTransaction.h" diff --git a/arangod/RestHandler/RestReplicationHandler.cpp b/arangod/RestHandler/RestReplicationHandler.cpp index cee0f1ff2b..7843c0577b 100644 --- a/arangod/RestHandler/RestReplicationHandler.cpp +++ b/arangod/RestHandler/RestReplicationHandler.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "RestReplicationHandler.h" -#include "Basics/Logger.h" +#include "Basics/JsonHelper.h" #include "Basics/ReadLocker.h" #include "Basics/VelocyPackHelper.h" #include "Basics/conversions.h" @@ -33,6 +33,7 @@ #include "Indexes/EdgeIndex.h" #include "Indexes/Index.h" #include "Indexes/PrimaryIndex.h" +#include "Logger/Logger.h" #include "Replication/InitialSyncer.h" #include "Rest/HttpRequest.h" #include "Rest/Version.h" diff --git a/arangod/RestHandler/RestUploadHandler.cpp b/arangod/RestHandler/RestUploadHandler.cpp index 908c09a07d..2af316c57a 100644 --- a/arangod/RestHandler/RestUploadHandler.cpp +++ b/arangod/RestHandler/RestUploadHandler.cpp @@ -24,7 +24,7 @@ #include "RestUploadHandler.h" #include "Basics/FileUtils.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" #include "HttpServer/HttpServer.h" diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp index 57d3585d5f..874cdf2241 100644 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -42,7 +42,7 @@ #include "Aql/QueryCache.h" #include "Aql/RestAqlHandler.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Nonce.h" #include "Basics/ProgramOptions.h" #include "Basics/ProgramOptionsDescription.h" @@ -991,33 +991,12 @@ void ArangoServer::buildApplicationServer() { _applicationServer->addFeature(_applicationV8); - // ............................................................................. - // MRuby engine (this has been removed from arangod in version 2.2) - // ............................................................................. - - std::string ignoreOpt; - std::map additional; - - additional["Hidden Options"]( - "ruby.gc-interval", &ignoreOpt, - "Ruby garbage collection interval (each x requests)")( - "ruby.action-directory", &ignoreOpt, "path to the Ruby action directory")( - "ruby.modules-path", &ignoreOpt, - "one or more directories separated by (semi-) colons")( - "ruby.startup-directory", &ignoreOpt, - "path to the directory containing alternate Ruby startup scripts")( - "server.disable-replication-logger", &ignoreOpt, - "start with replication logger turned off")( - "database.force-sync-shapes", &ignoreOpt, - "force syncing of shape data to disk, will use waitForSync value of " - "collection when turned off (deprecated)")( - "database.remove-on-drop", &ignoreOpt, - "wipe a collection from disk after dropping"); - // ............................................................................. // define server options // ............................................................................. + std::map additional; + // command-line only options additional["General Options:help-default"]( "console", diff --git a/arangod/RestServer/ConsoleThread.cpp b/arangod/RestServer/ConsoleThread.cpp index 9cf4aea635..3949588eea 100644 --- a/arangod/RestServer/ConsoleThread.cpp +++ b/arangod/RestServer/ConsoleThread.cpp @@ -26,9 +26,9 @@ #include #include "ApplicationServer/ApplicationServer.h" -#include "Basics/Logger.h" #include "Basics/tri-strings.h" #include "Basics/MutexLocker.h" +#include "Logger/Logger.h" #include "Rest/Version.h" #include "VocBase/vocbase.h" #include "V8/V8LineEditor.h" diff --git a/arangod/RestServer/VocbaseContext.cpp b/arangod/RestServer/VocbaseContext.cpp index ecef2097d5..d8d687855e 100644 --- a/arangod/RestServer/VocbaseContext.cpp +++ b/arangod/RestServer/VocbaseContext.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "VocbaseContext.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/tri-strings.h" #include "Cluster/ServerState.h" diff --git a/arangod/RestServer/WindowsServiceUtils.cpp b/arangod/RestServer/WindowsServiceUtils.cpp index e96541752a..4e81cb5079 100644 --- a/arangod/RestServer/WindowsServiceUtils.cpp +++ b/arangod/RestServer/WindowsServiceUtils.cpp @@ -26,7 +26,7 @@ #include "Basics/Common.h" #include "Basics/files.h" #include "Basics/messages.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Rest/InitializeRest.h" #include "RestServer/ArangoServer.h" diff --git a/arangod/RestServer/arangod.cpp b/arangod/RestServer/arangod.cpp index 99b5e274b3..02dfb9afa5 100644 --- a/arangod/RestServer/arangod.cpp +++ b/arangod/RestServer/arangod.cpp @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) { // initialize sub-systems TRI_GlobalEntryFunction(); - TRIAGENS_REST_INITIALIZE(argc, argv); + TRIAGENS_REST_INITIALIZE(); arangodb::basics::VelocyPackHelper::initialize(); diff --git a/arangod/Scheduler/ApplicationScheduler.cpp b/arangod/Scheduler/ApplicationScheduler.cpp index adc0adb918..3a7f858d19 100644 --- a/arangod/Scheduler/ApplicationScheduler.cpp +++ b/arangod/Scheduler/ApplicationScheduler.cpp @@ -26,8 +26,8 @@ #include #include "Basics/Exceptions.h" -#include "Basics/Logger.h" #include "Basics/process-utils.h" +#include "Logger/Logger.h" #include "Scheduler/PeriodicTask.h" #include "Scheduler/SchedulerLibev.h" #include "Scheduler/SignalTask.h" diff --git a/arangod/Scheduler/ListenTask.cpp b/arangod/Scheduler/ListenTask.cpp index fa71850637..dd388166fb 100644 --- a/arangod/Scheduler/ListenTask.cpp +++ b/arangod/Scheduler/ListenTask.cpp @@ -42,7 +42,7 @@ #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/socket-utils.h" #include "Basics/StringUtils.h" diff --git a/arangod/Scheduler/Scheduler.cpp b/arangod/Scheduler/Scheduler.cpp index 59137272c3..74492d9ade 100644 --- a/arangod/Scheduler/Scheduler.cpp +++ b/arangod/Scheduler/Scheduler.cpp @@ -31,7 +31,9 @@ #include "Basics/MutexLocker.h" #include "Basics/StringUtils.h" #include "Basics/Thread.h" -#include "Basics/Logger.h" +#include "Basics/json.h" +#include "Basics/JsonHelper.h" +#include "Logger/Logger.h" #include "Scheduler/SchedulerThread.h" #include "Scheduler/Task.h" diff --git a/arangod/Scheduler/SchedulerLibev.cpp b/arangod/Scheduler/SchedulerLibev.cpp index bd4f242033..86f0457eea 100644 --- a/arangod/Scheduler/SchedulerLibev.cpp +++ b/arangod/Scheduler/SchedulerLibev.cpp @@ -31,7 +31,7 @@ #include #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Scheduler/SchedulerThread.h" #include "Scheduler/Task.h" diff --git a/arangod/Scheduler/SchedulerThread.cpp b/arangod/Scheduler/SchedulerThread.cpp index 63956abaa8..c9ec281560 100644 --- a/arangod/Scheduler/SchedulerThread.cpp +++ b/arangod/Scheduler/SchedulerThread.cpp @@ -24,7 +24,7 @@ #include "SchedulerThread.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #ifdef _WIN32 diff --git a/arangod/Scheduler/SchedulerThread.h b/arangod/Scheduler/SchedulerThread.h index 362a2af81c..d5a24d2304 100644 --- a/arangod/Scheduler/SchedulerThread.h +++ b/arangod/Scheduler/SchedulerThread.h @@ -139,12 +139,6 @@ class SchedulerThread : public Thread, private TaskManager { std::deque _queue; - ////////////////////////////////////////////////////////////////////////////// - /// @brief open for business - ////////////////////////////////////////////////////////////////////////////// - - std::atomic _open; - ////////////////////////////////////////////////////////////////////////////// /// @brief work indicator ////////////////////////////////////////////////////////////////////////////// diff --git a/arangod/Scheduler/SignalTask.cpp b/arangod/Scheduler/SignalTask.cpp index d9bbf64480..ac404831c0 100644 --- a/arangod/Scheduler/SignalTask.cpp +++ b/arangod/Scheduler/SignalTask.cpp @@ -25,7 +25,7 @@ #include "SignalTask.h" #include "Basics/MutexLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Scheduler/Scheduler.h" diff --git a/arangod/Scheduler/SocketTask.cpp b/arangod/Scheduler/SocketTask.cpp index cd1546c682..444e56e96c 100644 --- a/arangod/Scheduler/SocketTask.cpp +++ b/arangod/Scheduler/SocketTask.cpp @@ -24,7 +24,7 @@ #include "SocketTask.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/StringBuffer.h" #include "Basics/socket-utils.h" diff --git a/arangod/Scheduler/TimerTask.cpp b/arangod/Scheduler/TimerTask.cpp index 4f3e4b85ee..0923f7b62a 100644 --- a/arangod/Scheduler/TimerTask.cpp +++ b/arangod/Scheduler/TimerTask.cpp @@ -23,7 +23,8 @@ //////////////////////////////////////////////////////////////////////////////// #include "TimerTask.h" -#include "Basics/Logger.h" +#include "Basics/json.h" +#include "Logger/Logger.h" #include "Scheduler/Scheduler.h" #include diff --git a/arangod/Statistics/statistics.cpp b/arangod/Statistics/statistics.cpp index 0713b93526..ff8ae4741d 100644 --- a/arangod/Statistics/statistics.cpp +++ b/arangod/Statistics/statistics.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "statistics.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" #include "Basics/threads.h" diff --git a/arangod/Utils/CollectionKeysRepository.cpp b/arangod/Utils/CollectionKeysRepository.cpp index 6d1aa692fe..5310c6402e 100644 --- a/arangod/Utils/CollectionKeysRepository.cpp +++ b/arangod/Utils/CollectionKeysRepository.cpp @@ -23,7 +23,7 @@ #include "CollectionKeysRepository.h" #include "Basics/json.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "VocBase/server.h" #include "VocBase/vocbase.h" diff --git a/arangod/Utils/CursorRepository.cpp b/arangod/Utils/CursorRepository.cpp index 260a74145c..39cc8cab6a 100644 --- a/arangod/Utils/CursorRepository.cpp +++ b/arangod/Utils/CursorRepository.cpp @@ -22,8 +22,9 @@ //////////////////////////////////////////////////////////////////////////////// #include "CursorRepository.h" -#include "Basics/Logger.h" +#include "Basics/json.h" #include "Basics/MutexLocker.h" +#include "Logger/Logger.h" #include "Utils/CollectionExport.h" #include "VocBase/server.h" #include "VocBase/vocbase.h" diff --git a/arangod/Utils/WorkMonitorArangod.cpp b/arangod/Utils/WorkMonitorArangod.cpp index 0e9c81a5c5..8bfa6b2e25 100644 --- a/arangod/Utils/WorkMonitorArangod.cpp +++ b/arangod/Utils/WorkMonitorArangod.cpp @@ -28,7 +28,7 @@ #include #include "Aql/QueryList.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringBuffer.h" #include "HttpServer/HttpHandler.h" #include "Scheduler/Scheduler.h" diff --git a/arangod/V8Server/ApplicationV8.cpp b/arangod/V8Server/ApplicationV8.cpp index 72d33b7d3a..4639779591 100644 --- a/arangod/V8Server/ApplicationV8.cpp +++ b/arangod/V8Server/ApplicationV8.cpp @@ -28,7 +28,6 @@ #include "Aql/QueryRegistry.h" #include "Basics/ConditionLocker.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" #include "Basics/random.h" @@ -42,6 +41,7 @@ #include "Cluster/v8-cluster.h" #include "Dispatcher/ApplicationDispatcher.h" #include "Dispatcher/DispatcherThread.h" +#include "Logger/Logger.h" #include "Rest/HttpRequest.h" #include "Scheduler/ApplicationScheduler.h" #include "Scheduler/Scheduler.h" diff --git a/arangod/V8Server/V8Job.cpp b/arangod/V8Server/V8Job.cpp index 4c5033fadd..12d8ce7b94 100644 --- a/arangod/V8Server/V8Job.cpp +++ b/arangod/V8Server/V8Job.cpp @@ -22,8 +22,9 @@ //////////////////////////////////////////////////////////////////////////////// #include "V8Job.h" -#include "Basics/Logger.h" +#include "Basics/json.h" #include "Dispatcher/DispatcherQueue.h" +#include "Logger/Logger.h" #include "V8/v8-utils.h" #include "V8/v8-vpack.h" #include "V8Server/ApplicationV8.h" diff --git a/arangod/V8Server/V8QueueJob.cpp b/arangod/V8Server/V8QueueJob.cpp index c6f9b46118..b9d97d6fd0 100644 --- a/arangod/V8Server/V8QueueJob.cpp +++ b/arangod/V8Server/V8QueueJob.cpp @@ -22,8 +22,9 @@ //////////////////////////////////////////////////////////////////////////////// #include "V8QueueJob.h" -#include "Basics/Logger.h" +#include "Basics/json.h" #include "Dispatcher/DispatcherQueue.h" +#include "Logger/Logger.h" #include "V8/v8-utils.h" #include "V8/v8-vpack.h" #include "V8Server/ApplicationV8.h" diff --git a/arangod/V8Server/V8VPackWrapper.cpp b/arangod/V8Server/V8VPackWrapper.cpp index e9d553dcc4..4688dde5c9 100644 --- a/arangod/V8Server/V8VPackWrapper.cpp +++ b/arangod/V8Server/V8VPackWrapper.cpp @@ -23,7 +23,7 @@ #include "V8VPackWrapper.h" #include "Basics/conversions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Utils/CollectionNameResolver.h" #include "Utils/Transaction.h" #include "V8/v8-conv.h" diff --git a/arangod/V8Server/v8-actions.cpp b/arangod/V8Server/v8-actions.cpp index 26b827e49f..454cf90cc6 100644 --- a/arangod/V8Server/v8-actions.cpp +++ b/arangod/V8Server/v8-actions.cpp @@ -29,10 +29,11 @@ #include "Basics/WriteLocker.h" #include "Basics/conversions.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Basics/json.h" #include "Basics/tri-strings.h" #include "Cluster/ClusterComm.h" #include "Cluster/ServerState.h" +#include "Logger/Logger.h" #include "HttpServer/HttpServer.h" #include "Rest/HttpRequest.h" #include "Rest/HttpResponse.h" diff --git a/arangod/V8Server/v8-dispatcher.cpp b/arangod/V8Server/v8-dispatcher.cpp index e3a1acadba..b331ac7c51 100644 --- a/arangod/V8Server/v8-dispatcher.cpp +++ b/arangod/V8Server/v8-dispatcher.cpp @@ -23,7 +23,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "v8-dispatcher.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/StringUtils.h" #include "Dispatcher/ApplicationDispatcher.h" diff --git a/arangod/V8Server/v8-shape-conv.cpp b/arangod/V8Server/v8-shape-conv.cpp index 2b677f1383..43830882fe 100644 --- a/arangod/V8Server/v8-shape-conv.cpp +++ b/arangod/V8Server/v8-shape-conv.cpp @@ -24,7 +24,7 @@ #include "v8-shape-conv.h" #include "Basics/conversions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringBuffer.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" diff --git a/arangod/V8Server/v8-wrapshapedjson.cpp b/arangod/V8Server/v8-wrapshapedjson.cpp index 73e9534475..940c140cd7 100644 --- a/arangod/V8Server/v8-wrapshapedjson.cpp +++ b/arangod/V8Server/v8-wrapshapedjson.cpp @@ -23,7 +23,7 @@ #include "v8-wrapshapedjson.h" #include "Basics/conversions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Utils/CollectionNameResolver.h" #include "Utils/SingleCollectionTransaction.h" #include "Utils/V8TransactionContext.h" diff --git a/arangod/VocBase/DatafileStatistics.cpp b/arangod/VocBase/DatafileStatistics.cpp index 01b3d026be..6cad06e1d4 100644 --- a/arangod/VocBase/DatafileStatistics.cpp +++ b/arangod/VocBase/DatafileStatistics.cpp @@ -23,7 +23,7 @@ #include "DatafileStatistics.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/WriteLocker.h" #include "VocBase/datafile.h" diff --git a/arangod/VocBase/Ditch.cpp b/arangod/VocBase/Ditch.cpp index 03918dd07b..2688952bcc 100644 --- a/arangod/VocBase/Ditch.cpp +++ b/arangod/VocBase/Ditch.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "Ditch.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "VocBase/document-collection.h" diff --git a/arangod/VocBase/MasterPointers.cpp b/arangod/VocBase/MasterPointers.cpp index 5b72d2215e..94295a53a3 100644 --- a/arangod/VocBase/MasterPointers.cpp +++ b/arangod/VocBase/MasterPointers.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "MasterPointers.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "VocBase/MasterPointer.h" using namespace arangodb; diff --git a/arangod/VocBase/VocShaper.cpp b/arangod/VocBase/VocShaper.cpp index 4211cc5169..8fec5b4974 100644 --- a/arangod/VocBase/VocShaper.cpp +++ b/arangod/VocBase/VocShaper.cpp @@ -32,7 +32,7 @@ #include "Basics/WriteLocker.h" #include "Basics/associative.h" #include "Basics/hashes.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/Utf8Helper.h" #include "VocBase/document-collection.h" diff --git a/arangod/VocBase/auth.cpp b/arangod/VocBase/auth.cpp index 19e929fc29..bf7ea7b352 100644 --- a/arangod/VocBase/auth.cpp +++ b/arangod/VocBase/auth.cpp @@ -22,11 +22,11 @@ //////////////////////////////////////////////////////////////////////////////// #include "auth.h" -#include "Basics/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/tri-strings.h" #include "Basics/VelocyPackHelper.h" #include "Basics/WriteLocker.h" +#include "Logger/Logger.h" #include "Rest/SslInterface.h" #include "Utils/SingleCollectionTransaction.h" #include "Utils/StandaloneTransactionContext.h" diff --git a/arangod/VocBase/cleanup.cpp b/arangod/VocBase/cleanup.cpp index 0cf7bf803d..7bf59b21f5 100644 --- a/arangod/VocBase/cleanup.cpp +++ b/arangod/VocBase/cleanup.cpp @@ -23,8 +23,9 @@ #include "cleanup.h" #include "Basics/files.h" -#include "Basics/Logger.h" #include "Basics/ReadLocker.h" +#include "Basics/tri-strings.h" +#include "Logger/Logger.h" #include "Utils/CursorRepository.h" #include "VocBase/compactor.h" #include "VocBase/Ditch.h" diff --git a/arangod/VocBase/collection.cpp b/arangod/VocBase/collection.cpp index 0a912575c4..c07c28ea50 100644 --- a/arangod/VocBase/collection.cpp +++ b/arangod/VocBase/collection.cpp @@ -25,7 +25,7 @@ #include "Basics/FileUtils.h" #include "Basics/JsonHelper.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" #include "Basics/files.h" diff --git a/arangod/VocBase/compactor.cpp b/arangod/VocBase/compactor.cpp index 3358ef5bae..54566e364b 100644 --- a/arangod/VocBase/compactor.cpp +++ b/arangod/VocBase/compactor.cpp @@ -30,10 +30,10 @@ #include "Basics/files.h" #include "Basics/FileUtils.h" #include "Basics/memory-map.h" -#include "Basics/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/tri-strings.h" #include "Basics/WriteLocker.h" +#include "Logger/Logger.h" #include "Indexes/PrimaryIndex.h" #include "Utils/SingleCollectionTransaction.h" #include "Utils/StandaloneTransactionContext.h" diff --git a/arangod/VocBase/datafile.cpp b/arangod/VocBase/datafile.cpp index 9cb404040e..76e0f85fff 100644 --- a/arangod/VocBase/datafile.cpp +++ b/arangod/VocBase/datafile.cpp @@ -22,14 +22,13 @@ //////////////////////////////////////////////////////////////////////////////// #include "datafile.h" - #include "Basics/FileUtils.h" -#include "Basics/Logger.h" #include "Basics/StringUtils.h" #include "Basics/files.h" #include "Basics/hashes.h" #include "Basics/memory-map.h" #include "Basics/tri-strings.h" +#include "Logger/Logger.h" #include "VocBase/DatafileHelper.h" #include "VocBase/server.h" diff --git a/arangod/VocBase/document-collection.cpp b/arangod/VocBase/document-collection.cpp index 830b27c72b..089eefabe1 100644 --- a/arangod/VocBase/document-collection.cpp +++ b/arangod/VocBase/document-collection.cpp @@ -28,7 +28,7 @@ #include "Basics/Exceptions.h" #include "Basics/FileUtils.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/ThreadPool.h" #include "Basics/VelocyPackHelper.h" diff --git a/arangod/VocBase/edge-collection.cpp b/arangod/VocBase/edge-collection.cpp index 4de5de50cb..a0155e36bb 100644 --- a/arangod/VocBase/edge-collection.cpp +++ b/arangod/VocBase/edge-collection.cpp @@ -23,7 +23,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "edge-collection.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Indexes/EdgeIndex.h" #include "Utils/CollectionNameResolver.h" #include "Utils/Transaction.h" diff --git a/arangod/VocBase/replication-applier.cpp b/arangod/VocBase/replication-applier.cpp index 1b82e83ded..9b4239c614 100644 --- a/arangod/VocBase/replication-applier.cpp +++ b/arangod/VocBase/replication-applier.cpp @@ -23,7 +23,6 @@ #include "replication-applier.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/ScopeGuard.h" #include "Basics/StringUtils.h" @@ -34,6 +33,7 @@ #include "Basics/files.h" #include "Basics/json.h" #include "Basics/tri-strings.h" +#include "Logger/Logger.h" #include "Replication/ContinuousSyncer.h" #include "Rest/Version.h" #include "VocBase/collection.h" diff --git a/arangod/VocBase/replication-dump.cpp b/arangod/VocBase/replication-dump.cpp index 209e0d0a8a..4168813b1a 100644 --- a/arangod/VocBase/replication-dump.cpp +++ b/arangod/VocBase/replication-dump.cpp @@ -22,9 +22,9 @@ //////////////////////////////////////////////////////////////////////////////// #include "replication-dump.h" -#include "Basics/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/VPackStringBufferAdapter.h" +#include "Logger/Logger.h" #include "VocBase/collection.h" #include "VocBase/DatafileHelper.h" #include "VocBase/datafile.h" diff --git a/arangod/VocBase/server.cpp b/arangod/VocBase/server.cpp index f753e38c3d..060f457b18 100644 --- a/arangod/VocBase/server.cpp +++ b/arangod/VocBase/server.cpp @@ -31,7 +31,6 @@ #include "Aql/QueryRegistry.h" #include "Basics/Exceptions.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/StringUtils.h" #include "Basics/conversions.h" @@ -42,6 +41,7 @@ #include "Basics/tri-strings.h" #include "Basics/VelocyPackHelper.h" #include "Cluster/ServerState.h" +#include "Logger/Logger.h" #include "Utils/CursorRepository.h" #include "VocBase/auth.h" #include "VocBase/replication-applier.h" diff --git a/arangod/VocBase/shape-accessor.cpp b/arangod/VocBase/shape-accessor.cpp index e1725bde63..e4698744fd 100644 --- a/arangod/VocBase/shape-accessor.cpp +++ b/arangod/VocBase/shape-accessor.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "shape-accessor.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/vector.h" #include "VocBase/shaped-json.h" #include "VocBase/VocShaper.h" diff --git a/arangod/VocBase/shaped-json.cpp b/arangod/VocBase/shaped-json.cpp index 5828b8dc5a..7ed04be9c2 100644 --- a/arangod/VocBase/shaped-json.cpp +++ b/arangod/VocBase/shaped-json.cpp @@ -24,7 +24,7 @@ #include "shaped-json.h" #include "Basics/hashes.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringBuffer.h" #include "Basics/tri-strings.h" #include "Basics/vector.h" diff --git a/arangod/VocBase/transaction.cpp b/arangod/VocBase/transaction.cpp index cc7475e553..a413b8ca3e 100644 --- a/arangod/VocBase/transaction.cpp +++ b/arangod/VocBase/transaction.cpp @@ -25,7 +25,7 @@ #include "Aql/QueryCache.h" #include "Basics/conversions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/Exceptions.h" #include "VocBase/DatafileHelper.h" diff --git a/arangod/VocBase/vocbase.cpp b/arangod/VocBase/vocbase.cpp index 36d952f2ea..03a03f09f7 100644 --- a/arangod/VocBase/vocbase.cpp +++ b/arangod/VocBase/vocbase.cpp @@ -28,7 +28,7 @@ #include "Basics/files.h" #include "Basics/hashes.h" #include "Basics/locks.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/memory-map.h" #include "Basics/random.h" #include "Basics/tri-strings.h" diff --git a/arangod/Wal/AllocatorThread.cpp b/arangod/Wal/AllocatorThread.cpp index da025331c6..d5f7775c1e 100644 --- a/arangod/Wal/AllocatorThread.cpp +++ b/arangod/Wal/AllocatorThread.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "AllocatorThread.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" #include "Wal/LogfileManager.h" diff --git a/arangod/Wal/CollectorThread.cpp b/arangod/Wal/CollectorThread.cpp index b49e6d60cd..5526bf641a 100644 --- a/arangod/Wal/CollectorThread.cpp +++ b/arangod/Wal/CollectorThread.cpp @@ -25,7 +25,7 @@ #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" #include "Basics/hashes.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/memory-map.h" #include "Basics/MutexLocker.h" #include "Basics/ReadLocker.h" diff --git a/arangod/Wal/Logfile.h b/arangod/Wal/Logfile.h index 83a71a0801..4df6738d79 100644 --- a/arangod/Wal/Logfile.h +++ b/arangod/Wal/Logfile.h @@ -25,7 +25,7 @@ #define ARANGOD_WAL_LOGFILE_H 1 #include "Basics/Common.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "VocBase/datafile.h" #include "VocBase/DatafileHelper.h" #include "VocBase/voc-types.h" diff --git a/arangod/Wal/LogfileManager.cpp b/arangod/Wal/LogfileManager.cpp index 27e6e4e173..9cde5a9d80 100644 --- a/arangod/Wal/LogfileManager.cpp +++ b/arangod/Wal/LogfileManager.cpp @@ -24,7 +24,7 @@ #include "LogfileManager.h" #include "Basics/Exceptions.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/ReadLocker.h" #include "Basics/StringUtils.h" diff --git a/arangod/Wal/RemoverThread.cpp b/arangod/Wal/RemoverThread.cpp index 43bf5c42f9..d8427f4bd9 100644 --- a/arangod/Wal/RemoverThread.cpp +++ b/arangod/Wal/RemoverThread.cpp @@ -23,7 +23,7 @@ #include "RemoverThread.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" #include "Wal/LogfileManager.h" diff --git a/arangod/Wal/Slots.cpp b/arangod/Wal/Slots.cpp index 1d386ae9b0..8126c379b9 100644 --- a/arangod/Wal/Slots.cpp +++ b/arangod/Wal/Slots.cpp @@ -24,7 +24,7 @@ #include "Slots.h" #include "Basics/ConditionLocker.h" #include "Basics/MutexLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "VocBase/DatafileHelper.h" #include "VocBase/datafile.h" #include "VocBase/server.h" diff --git a/arangod/Wal/SynchronizerThread.cpp b/arangod/Wal/SynchronizerThread.cpp index 50d88ba01d..f075e4870e 100644 --- a/arangod/Wal/SynchronizerThread.cpp +++ b/arangod/Wal/SynchronizerThread.cpp @@ -23,7 +23,7 @@ #include "SynchronizerThread.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" #include "VocBase/server.h" diff --git a/arangosh/ArangoShell/ArangoClient.cpp b/arangosh/ArangoShell/ArangoClient.cpp deleted file mode 100644 index 75082e2f13..0000000000 --- a/arangosh/ArangoShell/ArangoClient.cpp +++ /dev/null @@ -1,979 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -//////////////////////////////////////////////////////////////////////////////// - -#include "ArangoClient.h" - -#include "Basics/FileUtils.h" -#include "Basics/Logger.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/StringUtils.h" -#include "Basics/files.h" -#include "Basics/messages.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Rest/Endpoint.h" - -#include - -using namespace arangodb; -using namespace arangodb::basics; -using namespace arangodb::rest; - -double const ArangoClient::DEFAULT_CONNECTION_TIMEOUT = 5.0; -double const ArangoClient::DEFAULT_REQUEST_TIMEOUT = 1200.0; -size_t const ArangoClient::DEFAULT_RETRIES = 2; - -double const ArangoClient::LONG_TIMEOUT = 86400.0; -#ifdef _WIN32 -bool cygwinShell = false; -#endif -namespace { -#ifdef _WIN32 -bool _newLine() { - COORD pos; - CONSOLE_SCREEN_BUFFER_INFO bufferInfo; - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); - if (bufferInfo.dwCursorPosition.Y + 1 >= bufferInfo.dwSize.Y) { - // when we are at the last visible line of the console - // the first line of console is deleted (the content of the console - // is scrolled one line above - SMALL_RECT srctScrollRect; - srctScrollRect.Top = 0; - srctScrollRect.Bottom = bufferInfo.dwCursorPosition.Y + 1; - srctScrollRect.Left = 0; - srctScrollRect.Right = bufferInfo.dwSize.X; - COORD coordDest; - coordDest.X = 0; - coordDest.Y = -1; - CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo; - CHAR_INFO chiFill; - chiFill.Char.AsciiChar = (char)' '; - if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), - &consoleScreenBufferInfo)) { - chiFill.Attributes = consoleScreenBufferInfo.wAttributes; - } else { - // Fill the bottom row with green blanks. - chiFill.Attributes = BACKGROUND_GREEN | FOREGROUND_RED; - } - ScrollConsoleScreenBuffer(GetStdHandle(STD_OUTPUT_HANDLE), &srctScrollRect, - nullptr, coordDest, &chiFill); - pos.Y = bufferInfo.dwCursorPosition.Y; - pos.X = 0; - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); - return true; - } else { - pos.Y = bufferInfo.dwCursorPosition.Y + 1; - pos.X = 0; - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); - return false; - } -} - -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ignore sequence used for prompt length calculation (starting point) -/// -/// This sequence must be used before any non-visible characters in the prompt. -//////////////////////////////////////////////////////////////////////////////// - -char const* ArangoClient::PROMPT_IGNORE_START = "\001"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ignore sequence used for prompt length calculation (end point) -/// -/// This sequence must be used behind any non-visible characters in the prompt. -//////////////////////////////////////////////////////////////////////////////// - -char const* ArangoClient::PROMPT_IGNORE_END = "\002"; - -ArangoClient::ArangoClient(char const* appName) - : _configFile(), - _tempPath(), - _quiet(false), - - _colorOptions(false), - _noColors(false), - - _autoCompleteOptions(false), - _noAutoComplete(false), - - _prettyPrintOptions(false), - _prettyPrint(false), - - _pagerOptions(false), - _outputPager("less -X -R -F -L"), - _pager(stdout), - _usePager(false), - - _auditLog(""), - _auditFile(nullptr), - - _serverOptions(false), - _disableAuthentication(false), - _endpointString(), - _endpointServer(nullptr), - _databaseName("_system"), - _username("root"), - _password(""), - _hasPassword(false), - _connectTimeout(DEFAULT_CONNECTION_TIMEOUT), - _requestTimeout(DEFAULT_REQUEST_TIMEOUT), - _sslProtocol(4) { - TRI_SetApplicationName(appName); - std::string p = TRI_GetTempPath(); - - _logLevel.push_back("info"); - - if (p.empty()) { - _tempPath = p; - } -} - -ArangoClient::~ArangoClient() { delete _endpointServer; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up a program-specific help message -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupSpecificHelp(std::string const& progname, - std::string const& message) { - _specificHelp.progname = progname; - _specificHelp.message = message; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the general and logging options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupGeneral(ProgramOptionsDescription& description) { - ProgramOptionsDescription loggingOptions("LOGGING options"); - - // clang-format off - - loggingOptions - ("log.level,l", &_logLevel, "log level") - ("log.use-local-time", "log local dates and times in log messages") - ("log.output,o", &_logOutput, "log output") - ; - - description - ("configuration,c", &_configFile, "read configuration file") - ("help,h", "help message") - ("temp-path", &_tempPath, "path for temporary files") - ("quiet,s", "no banner") - (loggingOptions, false) - ; - - // clang-format on -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the color options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupColors(ProgramOptionsDescription& description) { - ProgramOptionsDescription hiddenOptions("HIDDEN options"); - - // clang-format off - - hiddenOptions - ("colors", "activate color support") - ; - - description - ("no-colors", "deactivate color support") - (hiddenOptions, true) - ; - - // clang-format on - - _colorOptions = true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the auto-complete options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupAutoComplete(ProgramOptionsDescription& description) { - ProgramOptionsDescription hiddenOptions("HIDDEN options"); - - // clang-format off - - hiddenOptions - ("auto-complete", "enable auto completion, use no-auto-complete to disable") - ; - - description - ("no-auto-complete", "disable auto completion") - (hiddenOptions, true) - ; - - // clang-format on - - _autoCompleteOptions = true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the pretty-printing options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupPrettyPrint(ProgramOptionsDescription& description) { - ProgramOptionsDescription hiddenOptions("HIDDEN options"); - - // clang-format off - - hiddenOptions - ("no-pretty-print", "disable pretty printting") - ; - - description - ("pretty-print", "pretty print values") - (hiddenOptions, true) - ; - - // clang-format on - - _prettyPrintOptions = true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the log options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupLog(ProgramOptionsDescription& description) { - // clang-format off - - description - ("audit-log", &_auditLog, "audit log file to save commands and results to") - ; - - // clang-format on -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the pager options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupPager(ProgramOptionsDescription& description) { - // clang-format off - - description - ("pager", &_outputPager, "output pager") - ("use-pager", "use pager") - ; - - // clang-format on - - _pagerOptions = true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets up the server options -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setupServer(ProgramOptionsDescription& description) { - ProgramOptionsDescription clientOptions("CLIENT options"); - - // clang-format off - - clientOptions - ("server.database", &_databaseName, "database name to use when connecting") - ("server.disable-authentication", &_disableAuthentication, - "disable the password prompt and authentication when connecting (note: " - "this doesn't control whether a server requires authentication)") - ("server.endpoint", &_endpointString, - "endpoint to connect to, use 'none' to start without a server") - ("server.username", &_username, "username to use when connecting") - ("server.password", &_password, - "password to use when connecting. Don't specify this option to be " - "prompted for the password (note: this requires " - "--server.disable-authentication to be 'false')") - ("server.connect-timeout", &_connectTimeout, "connect timeout in seconds") - ("server.request-timeout", &_requestTimeout, "request timeout in seconds") - ("server.ssl-protocol", &_sslProtocol, - "1 = SSLv2, 2 = SSLv23, 3 = SSLv3, 4 = TLSv1") - ; - - description - (clientOptions, false) - ; - - // clang-format on - - _serverOptions = true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses command line and config file and prepares logging -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::parse(ProgramOptions& options, - ProgramOptionsDescription& description, - std::string const& example, int argc, char* argv[], - std::string const& initFilename) { - // if options are invalid, exit directly - if (!options.parse(description, argc, argv)) { - LOG(FATAL) << options.lastError(); - FATAL_ERROR_EXIT(); - } - - // setup the logging - Logger::setLogLevel(_logLevel); - Logger::setUseLocalTime(options.has("log.use-local-time")); - Logger::setShowLineNumber(false); - Logger::setShowThreadIdentifier(false); - - std::unordered_set existingAppenders; - if (_logOutput.empty()) { - Logger::addAppender("-", true, "", existingAppenders); - } else { - for (auto& definition : _logOutput) { - Logger::addAppender(definition, true, "", existingAppenders); - } - } - - // parse config file - std::string configFile = ""; - bool allowLocal = false; - - if (!_configFile.empty()) { - if (StringUtils::tolower(_configFile) == std::string("none")) { - LOG(DEBUG) << "using no init file at all"; - } else { - configFile = _configFile; - } - } - - else { - char* d = TRI_LocateConfigDirectory(); - - if (d != nullptr) { - std::string sysDir = std::string(d) + initFilename; - TRI_FreeString(TRI_CORE_MEM_ZONE, d); - - if (FileUtils::exists(sysDir)) { - configFile = sysDir; - allowLocal = true; - } else { - LOG(DEBUG) << "no system init file '" << sysDir << "'"; - } - } - } - - if (!configFile.empty()) { - if (allowLocal) { - std::string localConfigFile = configFile + ".local"; - - if (FileUtils::exists(localConfigFile)) { - LOG(DEBUG) << "using init override file '" << localConfigFile - << "'"; - - if (!options.parse(description, localConfigFile)) { - LOG(FATAL) << "cannot parse config file '" << localConfigFile - << "': " << options.lastError(); - FATAL_ERROR_EXIT(); - } - } - } - - LOG(DEBUG) << "using init file '" << configFile << "'"; - - if (!options.parse(description, configFile)) { - LOG(FATAL) << "cannot parse config file '" << configFile - << "': " << options.lastError(); - FATAL_ERROR_EXIT(); - } - } - - // configuration is parsed and valid if we got to this point - - // check for --help - std::set help = options.needHelp("help"); - - if (!help.empty()) { - if (!example.empty()) { - std::cout << "USAGE: " << argv[0] << " " << example << std::endl - << std::endl; - } - std::cout << description.usage(help) << std::endl; - - // check for program-specific help - std::string const progname(argv[0]); - if (!_specificHelp.progname.empty() && - progname.size() >= _specificHelp.progname.size() && - progname.substr(progname.size() - _specificHelp.progname.size(), - _specificHelp.progname.size()) == - _specificHelp.progname) { - // found a program-specific help - std::cout << _specificHelp.message << std::endl; - } - - // --help always returns success - TRI_EXIT_FUNCTION(EXIT_SUCCESS, nullptr); - } - - // set temp path - if (options.has("temp-path")) { - TRI_SetUserTempPath((char*)_tempPath.c_str()); - } - - if (options.has("server.username")) { - // if a username is specified explicitly, assume authentication is desired - _disableAuthentication = false; - } - - // check if have a password - _hasPassword = options.has("server.password") || _disableAuthentication || - options.has("jslint") || options.has("javascript.unit-tests"); - - // set colors - if (options.has("colors")) { - _noColors = false; - } - - if (options.has("no-colors")) { - _noColors = true; - } - - // set auto-completion - if (options.has("auto-complete")) { - _noAutoComplete = false; - } - - if (options.has("no-auto-complete")) { - _noAutoComplete = true; - } - - // set pretty print - if (options.has("pretty-print")) { - _prettyPrint = true; - } - - if (options.has("no-pretty-print")) { - _prettyPrint = false; - } - - // set pager - if (options.has("use-pager")) { - _usePager = true; - } - - // set quiet - if (options.has("quiet")) { - _quiet = true; - } - - // ............................................................................. - // server options - // ............................................................................. - - if (_serverOptions) { - // check connection args - if (_connectTimeout < 0.0) { - LOG(FATAL) << "invalid value for --server.connect-timeout, must be >= 0"; - FATAL_ERROR_EXIT(); - } else if (_connectTimeout == 0.0) { - _connectTimeout = LONG_TIMEOUT; - } - - if (_requestTimeout < 0.0) { - LOG(FATAL) - << "invalid value for --server.request-timeout, must be positive"; - FATAL_ERROR_EXIT(); - } else if (_requestTimeout == 0.0) { - _requestTimeout = LONG_TIMEOUT; - } - - // must specify a user name - if (_username.size() == 0) { - LOG(FATAL) << "no value specified for --server.username"; - FATAL_ERROR_EXIT(); - } - - // no password given on command-line - if (!_hasPassword) { - usleep(10 * 1000); - printContinuous("Please specify a password: "); - -// now prompt for it -#ifdef TRI_HAVE_TERMIOS_H - TRI_SetStdinVisibility(false); - getline(std::cin, _password); - - TRI_SetStdinVisibility(true); -#else - getline(std::cin, _password); -#endif - printLine(""); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints a string and a newline to stderr -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::printErrLine(std::string const& s) { -#ifdef _WIN32 - // no, we can use std::cerr as this doesn't support UTF-8 on Windows - printLine(s); -#else - fprintf(stderr, "%s\n", s.c_str()); -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints a string and a newline to stdout -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::_printLine(std::string const& s) { -#ifdef _WIN32 - LPWSTR wBuf = (LPWSTR)TRI_Allocate(TRI_CORE_MEM_ZONE, - (sizeof WCHAR) * (s.size() + 1), true); - int wLen = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wBuf, - (int)((sizeof WCHAR) * (s.size() + 1))); - - if (wLen) { - DWORD n; - COORD pos; - CONSOLE_SCREEN_BUFFER_INFO bufferInfo; - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); - // save old cursor position - pos = bufferInfo.dwCursorPosition; - - size_t newX = static_cast(pos.X) + s.size(); - // size_t oldY = static_cast(pos.Y); - if (newX >= static_cast(bufferInfo.dwSize.X)) { - for (size_t i = 0; i <= newX / bufferInfo.dwSize.X; ++i) { - // insert as many newlines as we need. this prevents running out of - // buffer space when printing lines - // at the end of the console output buffer - if (_newLine()) { - pos.Y = pos.Y - 1; - } - } - } - - // save new cursor position - GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); - auto newPos = bufferInfo.dwCursorPosition; - - // print the actual string. note: printing does not advance the cursor - // position - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); - WriteConsoleOutputCharacterW(GetStdHandle(STD_OUTPUT_HANDLE), wBuf, - (DWORD)s.size(), pos, &n); - - // finally set the cursor position to where the printing should have stopped - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), newPos); - } else { - fprintf(stdout, "window error: '%d' \r\n", GetLastError()); - fprintf(stdout, "%s\r\n", s.c_str()); - } - - if (wBuf) { - TRI_Free(TRI_CORE_MEM_ZONE, wBuf); - } -#endif -} - -void ArangoClient::printLine(std::string const& s, bool forceNewLine) { -#if _WIN32 - if (!cygwinShell) { - // no, we cannot use std::cout as this doesn't support UTF-8 on Windows - // fprintf(stdout, "%s\r\n", s.c_str()); - TRI_vector_string_t subStrings = TRI_SplitString(s.c_str(), '\n'); - bool hasNewLines = (s.find("\n") != std::string::npos) | forceNewLine; - if (hasNewLines) { - for (size_t i = 0; i < subStrings._length; i++) { - _printLine(subStrings._buffer[i]); - _newLine(); - } - } else { - _printLine(s); - } - TRI_DestroyVectorString(&subStrings); - } else -#endif - fprintf(stdout, "%s\n", s.c_str()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints a string to stdout, without a newline (Non-Windows only) -/// on Windows, we'll print the line and a newline -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::printContinuous(std::string const& s) { -// no, we cannot use std::cout as this doesn't support UTF-8 on Windows -#ifdef _WIN32 - // On Windows, we just print the line followed by a newline - printLine(s, true); -#else - fprintf(stdout, "%s", s.c_str()); - fflush(stdout); -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief starts pager -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::startPager() { -#ifndef _WIN32 - if (!_usePager || _outputPager == "" || _outputPager == "stdout" || - _outputPager == "-") { - _pager = stdout; - return; - } - - _pager = popen(_outputPager.c_str(), "w"); - - if (_pager == nullptr) { - printf("popen() failed! Using stdout instead!\n"); - _pager = stdout; - _usePager = false; - } -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief stops pager -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::stopPager() { -#ifndef _WIN32 - if (_pager != stdout) { - pclose(_pager); - _pager = stdout; - } -#endif -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief strips binary data from string -/// this is done before sending the string to a pager or writing it to the log -//////////////////////////////////////////////////////////////////////////////// - -static std::string StripBinary(char const* value) { - std::string result; - - char const* p = value; - bool inBinary = false; - - while (*p) { - if (inBinary) { - if (*p == 'm') { - inBinary = false; - } - } else { - if (*p == '\x1b') { - inBinary = true; - } else { - result.push_back(*p); - } - } - ++p; - } - - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints to pager -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::internalPrint(std::string const& str) { - if (_pager == stdout) { -#ifdef _WIN32 - // at moment the formating is ignored in windows - printLine(str); -#else - fprintf(_pager, "%s", str.c_str()); -#endif - if (_auditFile) { - std::string sanitized = StripBinary(str.c_str()); - log("%s", sanitized.c_str()); - } - } else { - std::string sanitized = StripBinary(str.c_str()); - - if (!sanitized.empty()) { - fprintf(_pager, "%s", sanitized.c_str()); - log("%s", sanitized.c_str()); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief opens the log file -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::openLog() { - if (!_auditLog.empty()) { - _auditFile = fopen(_auditLog.c_str(), "w"); - - std::ostringstream s; - if (_auditFile == nullptr) { - s << "Cannot open file '" << _auditLog << "' for logging."; - printErrLine(s.str()); - } else { - s << "Logging input and output to '" << _auditLog << "'."; - printLine(s.str()); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief closes the log file -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::closeLog() { - if (!_auditLog.empty() && _auditFile != nullptr) { - fclose(_auditFile); - _auditFile = nullptr; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints info message -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::printWelcomeInfo() { - if (_usePager) { - std::ostringstream s; - s << "Using pager '" << _outputPager << "' for output buffering."; - - printLine(s.str()); - } - - if (_prettyPrint) { - printLine("Pretty printing values."); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints bye-bye -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::printByeBye() { - if (!_quiet) { - printLine(""); - printLine(TRI_BYE_MESSAGE); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief logs output, without prompt -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::log(char const* format, char const* str) { - if (_auditFile) { - std::string sanitized = StripBinary(str); - - if (!sanitized.empty()) { - // do not print terminal escape sequences into log - fprintf(_auditFile, format, sanitized.c_str()); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief logs output, with prompt -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::log(std::string const& format, std::string const& prompt, - std::string const& str) { - if (_auditFile) { - std::string sanitized = StripBinary(str.c_str()); - - if (!sanitized.empty()) { - // do not print terminal escape sequences into log - fprintf(_auditFile, format.c_str(), prompt.c_str(), sanitized.c_str()); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief flushes log output -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::flushLog() { - if (_auditFile) { - fflush(_auditFile); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a new endpoint -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::createEndpoint() { createEndpoint(_endpointString); } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a new endpoint -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::createEndpoint(std::string const& definition) { - // close previous endpoint - if (_endpointServer != nullptr) { - delete _endpointServer; - _endpointServer = nullptr; - } - - _endpointServer = Endpoint::clientFactory(definition); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief quiet start -//////////////////////////////////////////////////////////////////////////////// - -bool ArangoClient::quiet() const { return _quiet; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief shuts up arangosh -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::shutup() { _quiet = true; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief deactivates colors -//////////////////////////////////////////////////////////////////////////////// - -bool ArangoClient::colors() const { - return (!_noColors && isatty(STDIN_FILENO)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief gets the auto completion flag -//////////////////////////////////////////////////////////////////////////////// - -bool ArangoClient::autoComplete() const { return !_noAutoComplete; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief use pretty print -//////////////////////////////////////////////////////////////////////////////// - -bool ArangoClient::prettyPrint() const { return _prettyPrint; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief gets the output pager -//////////////////////////////////////////////////////////////////////////////// - -std::string const& ArangoClient::outputPager() const { return _outputPager; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief gets use pager -//////////////////////////////////////////////////////////////////////////////// - -bool ArangoClient::usePager() const { return _usePager; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets use pager -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setUsePager(bool value) { _usePager = value; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief gets endpoint to connect to as string -//////////////////////////////////////////////////////////////////////////////// - -std::string const& ArangoClient::endpointString() const { - return _endpointString; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets endpoint to connect to as string -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setEndpointString(std::string const& value) { - _endpointString = value; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief endpoint -//////////////////////////////////////////////////////////////////////////////// - -Endpoint* ArangoClient::endpointServer() const { return _endpointServer; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief database name -//////////////////////////////////////////////////////////////////////////////// - -std::string const& ArangoClient::databaseName() const { return _databaseName; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief user to send to endpoint -//////////////////////////////////////////////////////////////////////////////// - -std::string const& ArangoClient::username() const { return _username; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief password to send to endpoint -//////////////////////////////////////////////////////////////////////////////// - -std::string const& ArangoClient::password() const { return _password; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets database name -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setDatabaseName(std::string const& databaseName) { - _databaseName = databaseName; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets username -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setUsername(std::string const& username) { - _username = username; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sets password -//////////////////////////////////////////////////////////////////////////////// - -void ArangoClient::setPassword(std::string const& password) { - _password = password; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief connect timeout (in seconds) -//////////////////////////////////////////////////////////////////////////////// - -double ArangoClient::connectTimeout() const { return _connectTimeout; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief request timeout (in seconds) -//////////////////////////////////////////////////////////////////////////////// - -double ArangoClient::requestTimeout() const { return _requestTimeout; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ssl protocol -//////////////////////////////////////////////////////////////////////////////// - -uint32_t ArangoClient::sslProtocol() const { return _sslProtocol; } diff --git a/arangosh/ArangoShell/ArangoClient.h b/arangosh/ArangoShell/ArangoClient.h deleted file mode 100644 index 1f48a6e41f..0000000000 --- a/arangosh/ArangoShell/ArangoClient.h +++ /dev/null @@ -1,561 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -//////////////////////////////////////////////////////////////////////////////// - -#ifndef ARANGOSH_ARANGO_SHELL_ARANGO_CLIENT_H -#define ARANGOSH_ARANGO_SHELL_ARANGO_CLIENT_H 1 - -#include "Basics/Common.h" - -namespace arangodb { -namespace basics { -class ProgramOptionsDescription; -class ProgramOptions; -} - -namespace rest { -class Endpoint; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief arango shell client base -//////////////////////////////////////////////////////////////////////////////// - -class ArangoClient { - private: - ArangoClient(const ArangoClient&); - ArangoClient operator=(const ArangoClient&); - - public: - ////////////////////////////////////////////////////////////////////////////// - /// @brief default request timeout - ////////////////////////////////////////////////////////////////////////////// - - static double const DEFAULT_REQUEST_TIMEOUT; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief default number of retries - ////////////////////////////////////////////////////////////////////////////// - - static size_t const DEFAULT_RETRIES; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief default connection timeout - ////////////////////////////////////////////////////////////////////////////// - - static double const DEFAULT_CONNECTION_TIMEOUT; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief default "long" timeout - ////////////////////////////////////////////////////////////////////////////// - - static double const LONG_TIMEOUT; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief ignore sequence used for prompt length calculation (starting point) - /// - /// This sequence must be used before any non-visible characters in the - /// prompt. - /// - /// \\001 (^A) start non-visible characters - /// \\002 (^B) end non-visible characters - /// - /// All characters except \\001 and \\002 (following a \\001) are copied to - /// the returned string; all characters except those between \001 and - /// \\002 are assumed to be `visible'. - ////////////////////////////////////////////////////////////////////////////// - - static char const* PROMPT_IGNORE_START; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief ignore sequence used for prompt length calculation (end point) - /// - /// This sequence must be used behind any non-visible characters in the - /// prompt. - ////////////////////////////////////////////////////////////////////////////// - - static char const* PROMPT_IGNORE_END; - - public: - explicit ArangoClient(char const* appName); - - ~ArangoClient(); - - public: - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up a program-specific help message - ////////////////////////////////////////////////////////////////////////////// - - void setupSpecificHelp(std::string const&, std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the general and logging options - ////////////////////////////////////////////////////////////////////////////// - - void setupGeneral(arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the color options - ////////////////////////////////////////////////////////////////////////////// - - void setupColors(arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the auto-complete options - ////////////////////////////////////////////////////////////////////////////// - - void setupAutoComplete( - arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the pretty-printing options - ////////////////////////////////////////////////////////////////////////////// - - void setupPrettyPrint( - arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the pager options - ////////////////////////////////////////////////////////////////////////////// - - void setupPager(arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the log options - ////////////////////////////////////////////////////////////////////////////// - - void setupLog(arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets up the server options - ////////////////////////////////////////////////////////////////////////////// - - void setupServer(arangodb::basics::ProgramOptionsDescription& description); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief parses command line and config file and prepares logging - ////////////////////////////////////////////////////////////////////////////// - - void parse(arangodb::basics::ProgramOptions&, - arangodb::basics::ProgramOptionsDescription& description, - std::string const& example, int argc, char* argv[], - std::string const& initFilename); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print a string and a newline to stderr, necessary for Windows - ////////////////////////////////////////////////////////////////////////////// - - void printErrLine(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print a string and a newline to stdout, necessary for Windows - ////////////////////////////////////////////////////////////////////////////// - - void printLine(std::string const&, bool forceNewLine = false); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print a string to stdout, without a newline, necessary for Windows - ////////////////////////////////////////////////////////////////////////////// - - void printContinuous(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief starts pager - ////////////////////////////////////////////////////////////////////////////// - - void startPager(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief stops pager - ////////////////////////////////////////////////////////////////////////////// - - void stopPager(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print to pager - ////////////////////////////////////////////////////////////////////////////// - - void internalPrint(std::string const& str); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief open log - ////////////////////////////////////////////////////////////////////////////// - - void openLog(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief close log - ////////////////////////////////////////////////////////////////////////////// - - void closeLog(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print info message - ////////////////////////////////////////////////////////////////////////////// - - void printWelcomeInfo(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief print bye-bye - ////////////////////////////////////////////////////////////////////////////// - - void printByeBye(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief log output, without prompt - ////////////////////////////////////////////////////////////////////////////// - - void log(char const*, char const*); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief log output, with prompt - ////////////////////////////////////////////////////////////////////////////// - - void log(std::string const& format, std::string const& prompt, - std::string const& str); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief flush log - ////////////////////////////////////////////////////////////////////////////// - - void flushLog(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief creates a new endpoint - ////////////////////////////////////////////////////////////////////////////// - - void createEndpoint(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief creates a new endpoint - ////////////////////////////////////////////////////////////////////////////// - - void createEndpoint(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief quiet start - ////////////////////////////////////////////////////////////////////////////// - - bool quiet() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief shut up arangosh - ////////////////////////////////////////////////////////////////////////////// - - void shutup(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief deactivate colors - ////////////////////////////////////////////////////////////////////////////// - - bool colors() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief gets the auto completion flag - ////////////////////////////////////////////////////////////////////////////// - - bool autoComplete() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use pretty print - ////////////////////////////////////////////////////////////////////////////// - - bool prettyPrint() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief gets the output pager - ////////////////////////////////////////////////////////////////////////////// - - std::string const& outputPager() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief gets use pager - ////////////////////////////////////////////////////////////////////////////// - - bool usePager() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets use pager - ////////////////////////////////////////////////////////////////////////////// - - void setUsePager(bool); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief gets endpoint to connect to as string - ////////////////////////////////////////////////////////////////////////////// - - std::string const& endpointString() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief sets endpoint to connect to as string - ////////////////////////////////////////////////////////////////////////////// - - void setEndpointString(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief endpoint - ////////////////////////////////////////////////////////////////////////////// - - arangodb::rest::Endpoint* endpointServer() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief database name - ////////////////////////////////////////////////////////////////////////////// - - std::string const& databaseName() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief set database name - ////////////////////////////////////////////////////////////////////////////// - - void setDatabaseName(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief user to send to endpoint - ////////////////////////////////////////////////////////////////////////////// - - std::string const& username() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief password to send to endpoint - ////////////////////////////////////////////////////////////////////////////// - - std::string const& password() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief set username - ////////////////////////////////////////////////////////////////////////////// - - void setUsername(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief set password - ////////////////////////////////////////////////////////////////////////////// - - void setPassword(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief connect timeout (in seconds) - ////////////////////////////////////////////////////////////////////////////// - - double connectTimeout() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief request timeout (in seconds) - ////////////////////////////////////////////////////////////////////////////// - - double requestTimeout() const; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief ssl protocol - ////////////////////////////////////////////////////////////////////////////// - - uint32_t sslProtocol() const; - - private: - ////////////////////////////////////////////////////////////////////////////// - /// @brief prints a line - ////////////////////////////////////////////////////////////////////////////// - - void _printLine(std::string const&); - - private: - ////////////////////////////////////////////////////////////////////////////// - /// @brief configuration file - ////////////////////////////////////////////////////////////////////////////// - - std::string _configFile; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief temporary path - ////////////////////////////////////////////////////////////////////////////// - - std::string _tempPath; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief log level - ////////////////////////////////////////////////////////////////////////////// - - std::vector _logLevel; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief log output - ////////////////////////////////////////////////////////////////////////////// - - std::vector _logOutput; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief quiet start - ////////////////////////////////////////////////////////////////////////////// - - bool _quiet; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use color options - ////////////////////////////////////////////////////////////////////////////// - - bool _colorOptions; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief deactivate colors - ////////////////////////////////////////////////////////////////////////////// - - bool _noColors; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use auto-complete options - ////////////////////////////////////////////////////////////////////////////// - - bool _autoCompleteOptions; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief disable auto completion - ////////////////////////////////////////////////////////////////////////////// - - bool _noAutoComplete; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use pretty-print options - ////////////////////////////////////////////////////////////////////////////// - - bool _prettyPrintOptions; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use pretty print - ////////////////////////////////////////////////////////////////////////////// - - bool _prettyPrint; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use pager options - ////////////////////////////////////////////////////////////////////////////// - - bool _pagerOptions; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief the output pager - ////////////////////////////////////////////////////////////////////////////// - - std::string _outputPager; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief the pager FILE - ////////////////////////////////////////////////////////////////////////////// - - FILE* _pager; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use pager - ////////////////////////////////////////////////////////////////////////////// - - bool _usePager; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief log filename - ////////////////////////////////////////////////////////////////////////////// - - std::string _auditLog; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief the log FILE - ////////////////////////////////////////////////////////////////////////////// - - FILE* _auditFile; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief use server options - ////////////////////////////////////////////////////////////////////////////// - - bool _serverOptions; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief whether or not to turn off authentication - ////////////////////////////////////////////////////////////////////////////// - - bool _disableAuthentication; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief endpoint to connect to as string - ////////////////////////////////////////////////////////////////////////////// - - std::string _endpointString; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief endpoint - ////////////////////////////////////////////////////////////////////////////// - - arangodb::rest::Endpoint* _endpointServer; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief database name - ////////////////////////////////////////////////////////////////////////////// - - std::string _databaseName; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief user to send to endpoint - ////////////////////////////////////////////////////////////////////////////// - - std::string _username; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief password to send to endpoint - ////////////////////////////////////////////////////////////////////////////// - - std::string _password; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief whether or not a password was specified on the command line - ////////////////////////////////////////////////////////////////////////////// - - bool _hasPassword; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief connect timeout (in seconds) - ////////////////////////////////////////////////////////////////////////////// - - double _connectTimeout; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief request timeout (in seconds) - ////////////////////////////////////////////////////////////////////////////// - - double _requestTimeout; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief ssl protocol - ////////////////////////////////////////////////////////////////////////////// - - uint32_t _sslProtocol; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief program-specific help message - ////////////////////////////////////////////////////////////////////////////// - - struct { - std::string progname; - std::string message; - } _specificHelp; -}; -} - -#endif diff --git a/arangosh/Benchmark/ArangobFeature.cpp b/arangosh/Benchmark/ArangobFeature.cpp new file mode 100644 index 0000000000..69ea33334c --- /dev/null +++ b/arangosh/Benchmark/ArangobFeature.cpp @@ -0,0 +1,328 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangobFeature.h" + +#include + +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/StringUtils.h" +#include "Basics/random.h" +#include "Benchmark/BenchmarkCounter.h" +#include "Benchmark/BenchmarkOperation.h" +#include "Benchmark/BenchmarkThread.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" +#include "SimpleHttpClient/SimpleHttpClient.h" +#include "SimpleHttpClient/SimpleHttpResult.h" + +using namespace arangodb; +using namespace arangodb::arangob; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::options; +using namespace arangodb::rest; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief includes all the test cases +/// +/// We use an evil global pointer here. +//////////////////////////////////////////////////////////////////////////////// + +ArangobFeature* ARANGOB; +#include "Benchmark/test-cases.h" + +ArangobFeature::ArangobFeature(application_features::ApplicationServer* server, + int* result) + : ApplicationFeature(server, "ArangobFeature"), + _async(false), + _concurreny(1), + _operations(1000), + _batchSize(0), + _keepAlive(true), + _collection("ArangoBenchmark"), + _testCase("version"), + _complexity(1), + _delay(false), + _progress(true), + _verbose(false), + _quiet(false), + _result(result) { + requiresElevatedPrivileges(false); + setOptional(false); + startsAfter("ClientFeature"); + startsAfter("ConfigFeature"); + startsAfter("LoggerFeature"); +} + +void ArangobFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption("--async", "send asynchronous requests", + new BooleanParameter(&_async)); + + options->addOption("--concurrency", "number of parallel connections", + new UInt64Parameter(&_concurreny)); + + options->addOption("--requests", "total number of operations", + new UInt64Parameter(&_operations)); + + options->addOption("--batch-size", + "number of operations in one batch (0 disables batching)", + new UInt64Parameter(&_batchSize)); + + options->addOption("--keep-alive", "use HTTP keep-alive", + new BooleanParameter(&_keepAlive)); + + options->addOption("--collection", "collection name to use in tests", + new StringParameter(&_collection)); + + std::unordered_set cases = {"version", + "document", + "collection", + "import-document", + "hash", + "skiplist", + "edge", + "shapes", + "shapes-append", + "random-shapes", + "crud", + "crud-append", + "crud-write-read", + "aqltrx", + "counttrx", + "multitrx", + "multi-collection", + "aqlinsert", + "aqlv8"}; + std::vector casesVector(cases.begin(), cases.end()); + std::string casesJoined = StringUtils::join(casesVector, ", "); + + options->addOption( + "--test-case", "test case to use (possible values: " + casesJoined + ")", + new DiscreteValuesParameter(&_testCase, cases)); + + options->addOption("--complexity", "complexity parameter for the test", + new UInt64Parameter(&_complexity)); + + options->addOption("--delay", + "use a startup delay (necessary only when run in series)", + new BooleanParameter(&_delay)); + + options->addOption("--progress", "show progress", + new BooleanParameter(&_progress)); + + options->addOption("--verbose", + "print out replies if the http-header indicates db-errors", + new BooleanParameter(&_verbose, false)); + + options->addOption("--quiet", "supress status messages", + new BooleanParameter(&_quiet, false)); +} + +void ArangobFeature::status(std::string const& value) { + if (!_quiet) { + std::cout << value << std::endl; + } +} + +std::atomic ArangobFeature::_started; + +void ArangobFeature::updateStartCounter() { ++_started; } + +int ArangobFeature::getStartCounter() { return _started; } + +void ArangobFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + client->setRetries(3); + client->setWarn(true); + + int ret = EXIT_SUCCESS; + + *_result = ret; + ARANGOB = this; + + std::unique_ptr benchmark(GetTestCase(_testCase)); + + if (benchmark == nullptr) { + ARANGOB = nullptr; + LOG(FATAL) << "invalid test case name '" << _testCase << "'"; + FATAL_ERROR_EXIT(); + } + + status("starting threads..."); + + BenchmarkCounter operationsCounter(0, + (unsigned long)_operations); + ConditionVariable startCondition; + + std::vector endpoints; + std::vector threads; + + double const stepSize = (double)_operations / (double)_concurreny; + int64_t realStep = (int64_t)stepSize; + + if (stepSize - (double)((int64_t)stepSize) > 0.0) { + realStep++; + } + + if (realStep % 1000 != 0) { + realStep += 1000 - (realStep % 1000); + } + + // add some more offset so we don't get into trouble with threads of different + // speed + realStep += 10000; + + // start client threads + for (uint64_t i = 0; i < _concurreny; ++i) { + Endpoint* endpoint = Endpoint::clientFactory(client->endpoint()); + endpoints.push_back(endpoint); + + BenchmarkThread* thread = new BenchmarkThread( + benchmark.get(), &startCondition, &ArangobFeature::updateStartCounter, + i, (unsigned long)_batchSize, &operationsCounter, client, _keepAlive, + _async, _verbose); + + threads.push_back(thread); + thread->setOffset((size_t)(i * realStep)); + thread->start(); + } + + // give all threads a chance to start so they will not miss the broadcast + while (getStartCounter() < (int)_concurreny) { + usleep(5000); + } + + if (_delay) { + status("sleeping (startup delay)..."); + sleep(10); + } + + status("executing tests..."); + + double start = TRI_microtime(); + + // broadcast the start signal to all threads + { + CONDITION_LOCKER(guard, startCondition); + guard.broadcast(); + } + + size_t const stepValue = _operations / 20; + size_t nextReportValue = stepValue; + + if (nextReportValue < 100) { + nextReportValue = 100; + } + + while (true) { + size_t const numOperations = operationsCounter.getDone(); + + if (numOperations >= (size_t)_operations) { + break; + } + + if (_progress && numOperations >= nextReportValue) { + LOG(INFO) << "number of operations: " << nextReportValue; + nextReportValue += stepValue; + } + + usleep(20000); + } + + double time = TRI_microtime() - start; + double requestTime = 0.0; + + for (uint64_t i = 0; i < _concurreny; ++i) { + requestTime += threads[i]->getTime(); + } + + size_t failures = operationsCounter.failures(); + size_t incomplete = operationsCounter.incompleteFailures(); + + std::cout << std::endl; + + std::cout << "Total number of operations: " << _operations + << ", keep alive: " << (_keepAlive ? "yes" : "no") + << ", async: " << (_async ? "yes" : "no") + << ", batch size: " << _batchSize + << ", concurrency level (threads): " << _concurreny << std::endl; + + std::cout << "Test case: " << _testCase << ", complexity: " << _complexity + << ", database: '" << client->databaseName() << "', collection: '" + << _collection << "'" << std::endl; + + std::cout << "Total request/response duration (sum of all threads): " + << std::fixed << requestTime << " s" << std::endl; + + std::cout << "Request/response duration (per thread): " << std::fixed + << (requestTime / (double)_concurreny) << " s" << std::endl; + + std::cout << "Time needed per operation: " << std::fixed + << (time / _operations) << " s" << std::endl; + + std::cout << "Time needed per operation per thread: " << std::fixed + << (time / (double)_operations * (double)_concurreny) << " s" + << std::endl; + + std::cout << "Operations per second rate: " << std::fixed + << ((double)_operations / time) << std::endl; + + std::cout << "Elapsed time since start: " << std::fixed << time << " s" + << std::endl + << std::endl; + + if (failures > 0) { + LOG(WARN) << "WARNING: " << failures << " arangob request(s) failed!"; + } + if (incomplete > 0) { + LOG(WARN) << "WARNING: " << incomplete + << " arangob requests with incomplete results!"; + } + + benchmark->tearDown(); + + for (uint64_t i = 0; i < _concurreny; ++i) { + delete threads[i]; + delete endpoints[i]; + } + + if (failures > 0) { + ret = EXIT_FAILURE; + } + + *_result = ret; +} + +void ArangobFeature::stop() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; + + ARANGOB = nullptr; +} diff --git a/arangosh/Benchmark/ArangobFeature.h b/arangosh/Benchmark/ArangobFeature.h new file mode 100644 index 0000000000..273cb6f224 --- /dev/null +++ b/arangosh/Benchmark/ArangobFeature.h @@ -0,0 +1,81 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGOB_FEATURE_H +#define APPLICATION_FEATURES_ARANGOB_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class ArangobFeature final : public application_features::ApplicationFeature { + public: + ArangobFeature(application_features::ApplicationServer* server, int* result); + + public: + void collectOptions(std::shared_ptr) override; + void start() override; + void stop() override; + + public: + bool async() const { return _async; } + uint64_t const& concurrency() const { return _concurreny; } + uint64_t const& operations() const { return _operations; } + uint64_t const& batchSize() const { return _batchSize; } + bool keepAlive() const { return _keepAlive; } + std::string const& collection() const { return _collection; } + std::string const& testCase() const { return _testCase; } + uint64_t const& complexity() const { return _complexity; } + bool delay() const { return _delay; } + bool progress() const { return _progress; } + bool verbose() const { return _verbose; } + bool quit() const { return _quiet; } + + private: + void status(std::string const& value); + + private: + bool _async; + uint64_t _concurreny; + uint64_t _operations; + uint64_t _batchSize; + bool _keepAlive; + std::string _collection; + std::string _testCase; + uint64_t _complexity; + bool _delay; + bool _progress; + bool _verbose; + bool _quiet; + + private: + int* _result; + + private: + static void updateStartCounter(); + static int getStartCounter(); + + private: + static std::atomic _started; +}; +} + +#endif diff --git a/arangosh/Benchmark/BenchmarkThread.h b/arangosh/Benchmark/BenchmarkThread.h index 7995710214..dc147e838e 100644 --- a/arangosh/Benchmark/BenchmarkThread.h +++ b/arangosh/Benchmark/BenchmarkThread.h @@ -29,7 +29,7 @@ #include "Basics/ConditionLocker.h" #include "Basics/ConditionVariable.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Thread.h" #include "Basics/hashes.h" #include "Benchmark/BenchmarkCounter.h" @@ -48,12 +48,9 @@ class BenchmarkThread : public arangodb::Thread { basics::ConditionVariable* condition, void (*callback)(), int threadNumber, const unsigned long batchSize, BenchmarkCounter* operationsCounter, - rest::Endpoint* endpoint, std::string const& databaseName, - std::string const& username, std::string const& password, - double requestTimeout, double connectTimeout, - uint32_t sslProtocol, bool keepAlive, bool async, + ClientFeature* client, bool keepAlive, bool async, bool verbose) - : Thread("arangob"), + : Thread("BenchmarkThread"), _operation(operation), _startCondition(condition), _callback(callback), @@ -61,18 +58,14 @@ class BenchmarkThread : public arangodb::Thread { _batchSize(batchSize), _warningCount(0), _operationsCounter(operationsCounter), - _endpoint(endpoint), + _client(client), _headers(), - _databaseName(databaseName), - _username(username), - _password(password), - _requestTimeout(requestTimeout), - _connectTimeout(connectTimeout), - _sslProtocol(sslProtocol), + _databaseName(client->databaseName()), + _username(client->username()), + _password(client->password()), _keepAlive(keepAlive), _async(async), - _client(nullptr), - _connection(nullptr), + _httpClient(nullptr), _offset(0), _counter(0), _time(0.0), @@ -81,11 +74,7 @@ class BenchmarkThread : public arangodb::Thread { basics::StringUtils::tolower(rest::HttpResponse::BatchErrorHeader); } - ~BenchmarkThread() { - shutdown(); - delete _client; - delete _connection; - } + ~BenchmarkThread() { shutdown(); } protected: ////////////////////////////////////////////////////////////////////////////// @@ -93,31 +82,22 @@ class BenchmarkThread : public arangodb::Thread { ////////////////////////////////////////////////////////////////////////////// void run() { - _connection = httpclient::GeneralClientConnection::factory( - _endpoint, _requestTimeout, _connectTimeout, 3, _sslProtocol); - - if (_connection == nullptr) { - LOG(FATAL) << "out of memory"; + try { + _httpClient = _client->createHttpClient(); + } catch (...) { + LOG(FATAL) << "cannot create server connection, giving up!"; FATAL_ERROR_EXIT(); } - _client = - new httpclient::SimpleHttpClient(_connection, _requestTimeout, true); + _httpClient->setLocationRewriter(this, &rewriteLocation); - if (_client == nullptr) { - LOG(FATAL) << "out of memory"; - FATAL_ERROR_EXIT(); - } - - _client->setLocationRewriter(this, &rewriteLocation); - - _client->setUserNamePassword("/", _username, _password); - _client->setKeepAlive(_keepAlive); + _httpClient->setUserNamePassword("/", _username, _password); + _httpClient->setKeepAlive(_keepAlive); // test the connection httpclient::SimpleHttpResult* result = - _client->request(rest::HttpRequest::HTTP_REQUEST_GET, "/_api/version", - nullptr, 0, _headers); + _httpClient->request(rest::HttpRequest::HTTP_REQUEST_GET, + "/_api/version", nullptr, 0, _headers); if (!result || !result->isComplete()) { if (result) { @@ -132,7 +112,7 @@ class BenchmarkThread : public arangodb::Thread { // if we're the first thread, set up the test if (_threadNumber == 0) { - if (!_operation->setUp(_client)) { + if (!_operation->setUp(_httpClient.get())) { LOG(FATAL) << "could not set up the test"; FATAL_ERROR_EXIT(); } @@ -150,7 +130,7 @@ class BenchmarkThread : public arangodb::Thread { guard.wait(); } - while (1) { + while (!isStopping()) { unsigned long numOps = _operationsCounter->next(_batchSize); if (numOps == 0) { @@ -178,6 +158,7 @@ class BenchmarkThread : public arangodb::Thread { FATAL_ERROR_EXIT(); } } + _operationsCounter->done(_batchSize > 0 ? _batchSize : 1); } } @@ -272,9 +253,9 @@ class BenchmarkThread : public arangodb::Thread { rest::HttpRequest::MultiPartContentType + "; boundary=" + boundary; double start = TRI_microtime(); - httpclient::SimpleHttpResult* result = - _client->request(rest::HttpRequest::HTTP_REQUEST_POST, "/_api/batch", - batchPayload.c_str(), batchPayload.length(), _headers); + httpclient::SimpleHttpResult* result = _httpClient->request( + rest::HttpRequest::HTTP_REQUEST_POST, "/_api/batch", + batchPayload.c_str(), batchPayload.length(), _headers); _time += TRI_microtime() - start; if (result == nullptr || !result->isComplete()) { @@ -355,7 +336,7 @@ class BenchmarkThread : public arangodb::Thread { double start = TRI_microtime(); httpclient::SimpleHttpResult* result = - _client->request(type, url, payload, payloadLength, _headers); + _httpClient->request(type, url, payload, payloadLength, _headers); _time += TRI_microtime() - start; if (mustFree) { @@ -446,10 +427,10 @@ class BenchmarkThread : public arangodb::Thread { arangob::BenchmarkCounter* _operationsCounter; ////////////////////////////////////////////////////////////////////////////// - /// @brief endpoint to use + /// @brief client feature ////////////////////////////////////////////////////////////////////////////// - rest::Endpoint* _endpoint; + ClientFeature* _client; ////////////////////////////////////////////////////////////////////////////// /// @brief extra request headers @@ -475,24 +456,6 @@ class BenchmarkThread : public arangodb::Thread { std::string const _password; - ////////////////////////////////////////////////////////////////////////////// - /// @brief the request timeout (in s) - ////////////////////////////////////////////////////////////////////////////// - - double _requestTimeout; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief the connection timeout (in s) - ////////////////////////////////////////////////////////////////////////////// - - double _connectTimeout; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief ssl protocol - ////////////////////////////////////////////////////////////////////////////// - - uint32_t _sslProtocol; - ////////////////////////////////////////////////////////////////////////////// /// @brief use HTTP keep-alive ////////////////////////////////////////////////////////////////////////////// @@ -506,16 +469,10 @@ class BenchmarkThread : public arangodb::Thread { bool _async; ////////////////////////////////////////////////////////////////////////////// - /// @brief underlying client + /// @brief underlying http client ////////////////////////////////////////////////////////////////////////////// - arangodb::httpclient::SimpleHttpClient* _client; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief connection to the server - ////////////////////////////////////////////////////////////////////////////// - - arangodb::httpclient::GeneralClientConnection* _connection; + std::unique_ptr _httpClient; ////////////////////////////////////////////////////////////////////////////// /// @brief thread offset value diff --git a/arangosh/Benchmark/arangob.cpp b/arangosh/Benchmark/arangob.cpp index d3dc34b007..2123b05d19 100644 --- a/arangosh/Benchmark/arangob.cpp +++ b/arangosh/Benchmark/arangob.cpp @@ -23,428 +23,46 @@ #include "Basics/Common.h" -#include - -#include "ArangoShell/ArangoClient.h" -#include "Basics/Logger.h" -#include "Basics/Mutex.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/StringBuffer.h" -#include "Basics/StringUtils.h" -#include "Basics/random.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Benchmark/BenchmarkCounter.h" -#include "Benchmark/BenchmarkOperation.h" -#include "Benchmark/BenchmarkThread.h" -#include "Rest/Endpoint.h" +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConfigFeature.h" +#include "ApplicationFeatures/LoggerFeature.h" +#include "ApplicationFeatures/ShutdownFeature.h" +#include "ApplicationFeatures/TempFeature.h" +#include "Benchmark/ArangobFeature.h" +#include "ProgramOptions2/ProgramOptions.h" #include "Rest/InitializeRest.h" -#include "SimpleHttpClient/SimpleHttpClient.h" -#include "SimpleHttpClient/SimpleHttpResult.h" using namespace arangodb; +using namespace arangodb::application_features; using namespace arangodb::basics; -using namespace arangodb::httpclient; using namespace arangodb::rest; -using namespace arangodb::arangob; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief base class for clients -//////////////////////////////////////////////////////////////////////////////// - -ArangoClient BaseClient("arangob"); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief started counter -//////////////////////////////////////////////////////////////////////////////// - -static std::atomic Started; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief mutex for start counter -//////////////////////////////////////////////////////////////////////////////// - -Mutex StartMutex; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief send asynchronous requests -//////////////////////////////////////////////////////////////////////////////// - -static bool Async = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief number of operations in one batch -//////////////////////////////////////////////////////////////////////////////// - -static int BatchSize = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief collection to use -//////////////////////////////////////////////////////////////////////////////// - -static std::string Collection = "ArangoBenchmark"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief complexity parameter for tests -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t Complexity = 1; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief concurrency -//////////////////////////////////////////////////////////////////////////////// - -static int ThreadConcurrency = 1; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief use a startup delay -//////////////////////////////////////////////////////////////////////////////// - -static bool Delay = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief use HTTP keep-alive -//////////////////////////////////////////////////////////////////////////////// - -static bool KeepAlive = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief number of operations to perform -//////////////////////////////////////////////////////////////////////////////// - -static int Operations = 1000; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief display progress -//////////////////////////////////////////////////////////////////////////////// - -static bool Progress = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief test case to use -//////////////////////////////////////////////////////////////////////////////// - -static std::string TestCase = "version"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief print out replies on error -//////////////////////////////////////////////////////////////////////////////// - -static bool verbose = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief includes all the test cases -//////////////////////////////////////////////////////////////////////////////// - -#include "Benchmark/test-cases.h" - -//////////////////////////////////////////////////////////////////////////////// -/// @brief update the number of ready threads. this is a callback function -/// that is called by each thread after it is created -//////////////////////////////////////////////////////////////////////////////// - -static void UpdateStartCounter() { ++Started; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the value of the number of started threads counter -//////////////////////////////////////////////////////////////////////////////// - -static int GetStartCounter() { return Started; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief print a status line (if ! quiet) -//////////////////////////////////////////////////////////////////////////////// - -static void Status(std::string const& value) { - if (!BaseClient.quiet()) { - std::cout << value << std::endl; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses the program options -//////////////////////////////////////////////////////////////////////////////// - -static void ParseProgramOptions(int argc, char* argv[]) { - ProgramOptionsDescription description("STANDARD options"); - - description("async", &Async, "send asynchronous requests")( - "concurrency", &ThreadConcurrency, "number of parallel connections")( - "requests", &Operations, "total number of operations")( - "batch-size", &BatchSize, - "number of operations in one batch (0 disables batching)")( - "keep-alive", &KeepAlive, "use HTTP keep-alive")( - "collection", &Collection, "collection name to use in tests")( - "test-case", &TestCase, - "test case to use (possible values: version, document, collection, " - "import-document, hash, skiplist, edge, shapes, shapes-append, " - "random-shapes, crud, crud-append, crud-write-read, aqltrx, counttrx, " - "multitrx, multi-collection, aqlinsert, aqlv8)")( - "complexity", &Complexity, "complexity parameter for the test")( - "delay", &Delay, - "use a startup delay (necessary only when run in series)")( - "progress", &Progress, "show progress")( - "verbose", &verbose, - "print out replies if the http-header indicates db-errors"); - - BaseClient.setupGeneral(description); - BaseClient.setupServer(description); - - std::vector arguments; - description.arguments(&arguments); - - ProgramOptions options; - BaseClient.parse( - options, description, - "--concurrency --requests --test-case ...", - argc, argv, "arangob.conf"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup and exit functions -//////////////////////////////////////////////////////////////////////////////// - -static void arangobEntryFunction(); -static void arangobExitFunction(int, void*); - -#ifdef _WIN32 - -// ............................................................................. -// Call this function to do various initializations for windows only -// ............................................................................. - -void arangobEntryFunction() { - int maxOpenFiles = 1024; - int res = 0; - - // ........................................................................... - // Uncomment this to call this for extended debug information. - // If you familiar with valgrind ... then this is not like that, however - // you do get some similar functionality. - // ........................................................................... - // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); - - res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, - (char const*)(&maxOpenFiles)); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); - if (res != 0) { - _exit(1); - } - - TRI_Application_Exit_SetExit(arangobExitFunction); -} - -static void arangobExitFunction(int exitCode, void* data) { - int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - exit(1); - } - - exit(exitCode); -} -#else - -static void arangobEntryFunction() {} - -static void arangobExitFunction(int exitCode, void* data) {} - -#endif //////////////////////////////////////////////////////////////////////////////// /// @brief main //////////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { - int ret = EXIT_SUCCESS; + ADB_WindowsEntryFunction(); + TRIAGENS_REST_INITIALIZE(); - arangobEntryFunction(); + std::shared_ptr options(new options::ProgramOptions( + argv[0], "Usage: arangob []", "For more information use:")); - TRIAGENS_REST_INITIALIZE(argc, argv); + ApplicationServer server(options); - Logger::initialize(false); + int ret; - BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); + server.addFeature(new LoggerFeature(&server)); + server.addFeature(new TempFeature(&server, "arangob")); + server.addFeature(new ConfigFeature(&server, "arangob")); + server.addFeature(new ClientFeature(&server)); + server.addFeature(new ArangobFeature(&server, &ret)); + server.addFeature(new ShutdownFeature(&server, "ArangobFeature")); - // ............................................................................. - // parse the program options - // ............................................................................. - - ParseProgramOptions(argc, argv); - - // ............................................................................. - // set-up client connection - // ............................................................................. - - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - std::string endpointString = BaseClient.endpointString(); - LOG(FATAL) << "invalid value for --server.endpoint ('" - << endpointString << "')"; - FATAL_ERROR_EXIT(); - } - - BenchmarkOperation* testCase = GetTestCase(TestCase); - - if (testCase == nullptr) { - LOG(FATAL) << "invalid test case name '" << TestCase << "'"; - FATAL_ERROR_EXIT(); - return EXIT_FAILURE; // will not be reached - } - - Status("starting threads..."); - - BenchmarkCounter operationsCounter(0, - (unsigned long)Operations); - ConditionVariable startCondition; - - std::vector endpoints; - std::vector threads; - - double const stepSize = (double)Operations / (double)ThreadConcurrency; - int64_t realStep = (int64_t)stepSize; - if (stepSize - (double)((int64_t)stepSize) > 0.0) { - realStep++; - } - if (realStep % 1000 != 0) { - realStep += 1000 - (realStep % 1000); - } - // add some more offset so we don't get into trouble with threads of different - // speed - realStep += 10000; - - // start client threads - for (int i = 0; i < ThreadConcurrency; ++i) { - Endpoint* endpoint = Endpoint::clientFactory(BaseClient.endpointString()); - endpoints.push_back(endpoint); - - BenchmarkThread* thread = new BenchmarkThread( - testCase, &startCondition, &UpdateStartCounter, i, - (unsigned long)BatchSize, &operationsCounter, endpoint, - BaseClient.databaseName(), BaseClient.username(), BaseClient.password(), - BaseClient.requestTimeout(), BaseClient.connectTimeout(), - BaseClient.sslProtocol(), KeepAlive, Async, verbose); - - threads.push_back(thread); - thread->setOffset((size_t)(i * realStep)); - thread->start(); - } - - // give all threads a chance to start so they will not miss the broadcast - while (GetStartCounter() < ThreadConcurrency) { - usleep(5000); - } - - if (Delay) { - Status("sleeping (startup delay)..."); - sleep(10); - } - Status("executing tests..."); - - double start = TRI_microtime(); - - // broadcast the start signal to all threads - { - CONDITION_LOCKER(guard, startCondition); - guard.broadcast(); - } - - size_t const stepValue = (Operations / 20); - size_t nextReportValue = stepValue; - - if (nextReportValue < 100) { - nextReportValue = 100; - } - - while (1) { - size_t const numOperations = operationsCounter.getDone(); - - if (numOperations >= (size_t)Operations) { - break; - } - - if (Progress && numOperations >= nextReportValue) { - LOG(INFO) << "number of operations: " << nextReportValue; - nextReportValue += stepValue; - } - - usleep(20000); - } - - double time = TRI_microtime() - start; - double requestTime = 0.0; - - for (int i = 0; i < ThreadConcurrency; ++i) { - requestTime += threads[i]->getTime(); - } - - size_t failures = operationsCounter.failures(); - size_t incomplete = operationsCounter.incompleteFailures(); - - std::cout << std::endl; - std::cout << "Total number of operations: " << Operations - << ", keep alive: " << (KeepAlive ? "yes" : "no") - << ", async: " << (Async ? "yes" : "no") - << ", batch size: " << BatchSize - << ", concurrency level (threads): " << ThreadConcurrency - << std::endl; - - std::cout << "Test case: " << TestCase << ", complexity: " << Complexity - << ", database: '" << BaseClient.databaseName() - << "', collection: '" << Collection << "'" << std::endl; - - std::cout << "Total request/response duration (sum of all threads): " - << std::fixed << requestTime << " s" << std::endl; - std::cout << "Request/response duration (per thread): " << std::fixed - << (requestTime / (double)ThreadConcurrency) << " s" << std::endl; - std::cout << "Time needed per operation: " << std::fixed - << (time / Operations) << " s" << std::endl; - std::cout << "Time needed per operation per thread: " << std::fixed - << (time / (double)Operations * (double)ThreadConcurrency) << " s" - << std::endl; - std::cout << "Operations per second rate: " << std::fixed - << ((double)Operations / time) << std::endl; - std::cout << "Elapsed time since start: " << std::fixed << time << " s" - << std::endl - << std::endl; - - if (failures > 0) { - std::cerr << "WARNING: " << failures << " arangob request(s) failed!!" - << std::endl; - } - if (incomplete > 0) { - std::cerr << "WARNING: " << incomplete - << " arangob requests with incomplete results!!" << std::endl; - } - - testCase->tearDown(); - - for (int i = 0; i < ThreadConcurrency; ++i) { - threads[i]->beginShutdown(); - delete threads[i]; - delete endpoints[i]; - } - - delete testCase; + server.run(argc, argv); TRIAGENS_REST_SHUTDOWN; - - if (failures > 0) { - ret = EXIT_FAILURE; - } - - arangobExitFunction(ret, nullptr); + ADB_WindowsExitFunction(ret, nullptr); return ret; } diff --git a/arangosh/Benchmark/test-cases.h b/arangosh/Benchmark/test-cases.h index e7091b32d2..cd6c94b54e 100644 --- a/arangosh/Benchmark/test-cases.h +++ b/arangosh/Benchmark/test-cases.h @@ -72,8 +72,8 @@ struct DocumentCrudAppendTest : public BenchmarkOperation { ~DocumentCrudAppendTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -83,12 +83,12 @@ struct DocumentCrudAppendTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 4); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -117,7 +117,7 @@ struct DocumentCrudAppendTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0 || mod == 2) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -163,8 +163,8 @@ struct DocumentCrudWriteReadTest : public BenchmarkOperation { ~DocumentCrudWriteReadTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -174,12 +174,12 @@ struct DocumentCrudWriteReadTest : public BenchmarkOperation { size_t const mod = globalCounter % 2; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 2); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -201,7 +201,7 @@ struct DocumentCrudWriteReadTest : public BenchmarkOperation { size_t const mod = globalCounter % 2; if (mod == 0) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -244,8 +244,8 @@ struct ShapesTest : public BenchmarkOperation { ~ShapesTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -255,12 +255,12 @@ struct ShapesTest : public BenchmarkOperation { size_t const mod = globalCounter % 3; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 3); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -284,7 +284,7 @@ struct ShapesTest : public BenchmarkOperation { size_t const mod = globalCounter % 3; if (mod == 0) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -296,7 +296,7 @@ struct ShapesTest : public BenchmarkOperation { TRI_AppendStringStringBuffer(buffer, "\""); for (uint64_t i = 1; i <= n; ++i) { - uint64_t mod = Operations / 10; + uint64_t mod = ARANGOB->operations() / 10; if (mod < 100) { mod = 100; } @@ -330,8 +330,8 @@ struct ShapesAppendTest : public BenchmarkOperation { ~ShapesAppendTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -341,12 +341,12 @@ struct ShapesAppendTest : public BenchmarkOperation { size_t const mod = globalCounter % 2; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 2); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -367,7 +367,7 @@ struct ShapesAppendTest : public BenchmarkOperation { size_t const mod = globalCounter % 2; if (mod == 0) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -379,7 +379,7 @@ struct ShapesAppendTest : public BenchmarkOperation { TRI_AppendStringStringBuffer(buffer, "\""); for (uint64_t i = 1; i <= n; ++i) { - uint64_t mod = Operations / 10; + uint64_t mod = ARANGOB->operations() / 10; if (mod < 100) { mod = 100; } @@ -415,8 +415,8 @@ struct RandomShapesTest : public BenchmarkOperation { ~RandomShapesTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -426,13 +426,13 @@ struct RandomShapesTest : public BenchmarkOperation { size_t const mod = globalCounter % 3; if (mod == 0) { - return std::string("/_api/document?collection=") + Collection; + return std::string("/_api/document?collection=") + ARANGOB->collection(); } else { size_t keyId = (size_t)(globalCounter / 3); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/") + Collection + std::string("/") + - key; + return std::string("/_api/document/") + ARANGOB->collection() + + std::string("/") + key; } } @@ -456,7 +456,7 @@ struct RandomShapesTest : public BenchmarkOperation { size_t const mod = globalCounter % 3; if (mod == 0) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -507,8 +507,8 @@ struct DocumentCrudTest : public BenchmarkOperation { ~DocumentCrudTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -518,12 +518,12 @@ struct DocumentCrudTest : public BenchmarkOperation { size_t const mod = globalCounter % 5; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 5); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -554,7 +554,7 @@ struct DocumentCrudTest : public BenchmarkOperation { size_t const mod = globalCounter % 5; if (mod == 0 || mod == 2) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -600,8 +600,8 @@ struct EdgeCrudTest : public BenchmarkOperation { ~EdgeCrudTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 3); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 3); } void tearDown() {} @@ -611,16 +611,16 @@ struct EdgeCrudTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0) { - return std::string("/_api/edge?collection=" + Collection + "&from=" + - Collection.c_str() + "%2Ftestfrom" + + return std::string("/_api/edge?collection=" + ARANGOB->collection() + + "&from=" + ARANGOB->collection() + "%2Ftestfrom" + StringUtils::itoa(globalCounter) + "&to=" + - Collection.c_str() + "%2Ftestto" + + ARANGOB->collection() + "%2Ftestto" + StringUtils::itoa(globalCounter)); } else { size_t keyId = (size_t)(globalCounter / 4); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/edge/" + Collection + "/" + key); + return std::string("/_api/edge/" + ARANGOB->collection() + "/" + key); } } @@ -655,7 +655,7 @@ struct EdgeCrudTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0 || mod == 2) { - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); TRI_string_buffer_t* buffer; buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); @@ -701,9 +701,9 @@ struct SkiplistTest : public BenchmarkOperation { ~SkiplistTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2) && - CreateIndex(client, Collection, "skiplist", "[\"value\"]"); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2) && + CreateIndex(client, ARANGOB->collection(), "skiplist", "[\"value\"]"); } void tearDown() {} @@ -713,12 +713,12 @@ struct SkiplistTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 4); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -784,9 +784,9 @@ struct HashTest : public BenchmarkOperation { ~HashTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2) && - CreateIndex(client, Collection, "hash", "[\"value\"]"); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2) && + CreateIndex(client, ARANGOB->collection(), "hash", "[\"value\"]"); } void tearDown() {} @@ -796,12 +796,12 @@ struct HashTest : public BenchmarkOperation { size_t const mod = globalCounter % 4; if (mod == 0) { - return std::string("/_api/document?collection=" + Collection); + return std::string("/_api/document?collection=" + ARANGOB->collection()); } else { size_t keyId = (size_t)(globalCounter / 4); std::string const key = "testkey" + StringUtils::itoa(keyId); - return std::string("/_api/document/" + Collection + "/" + key); + return std::string("/_api/document/" + ARANGOB->collection() + "/" + key); } } @@ -863,9 +863,9 @@ struct HashTest : public BenchmarkOperation { struct DocumentImportTest : public BenchmarkOperation { DocumentImportTest() : BenchmarkOperation(), _url(), _buffer(0) { - _url = "/_api/import?collection=" + Collection + "&type=documents"; + _url = "/_api/import?collection=" + ARANGOB->collection() + "&type=documents"; - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); _buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 16384); for (uint64_t i = 0; i < n; ++i) { @@ -882,8 +882,8 @@ struct DocumentImportTest : public BenchmarkOperation { ~DocumentImportTest() { TRI_FreeStringBuffer(TRI_UNKNOWN_MEM_ZONE, _buffer); } bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -916,9 +916,9 @@ struct DocumentImportTest : public BenchmarkOperation { struct DocumentCreationTest : public BenchmarkOperation { DocumentCreationTest() : BenchmarkOperation(), _url(), _buffer(0) { - _url = "/_api/document?collection=" + Collection; + _url = "/_api/document?collection=" + ARANGOB->collection(); - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); _buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 4096); TRI_AppendCharStringBuffer(_buffer, '{'); @@ -942,8 +942,8 @@ struct DocumentCreationTest : public BenchmarkOperation { } bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -1007,7 +1007,7 @@ struct CollectionCreationTest : public BenchmarkOperation { return 0; } TRI_AppendStringStringBuffer(buffer, "{\"name\":\""); - TRI_AppendStringStringBuffer(buffer, Collection.c_str()); + TRI_AppendStringStringBuffer(buffer, ARANGOB->collection().c_str()); TRI_AppendUInt64StringBuffer(buffer, ++_counter); TRI_AppendStringStringBuffer(buffer, "\"}"); @@ -1034,9 +1034,9 @@ struct TransactionAqlTest : public BenchmarkOperation { ~TransactionAqlTest() {} bool setUp(SimpleHttpClient* client) { - _c1 = std::string(Collection + "1"); - _c2 = std::string(Collection + "2"); - _c3 = std::string(Collection + "3"); + _c1 = std::string(ARANGOB->collection() + "1"); + _c2 = std::string(ARANGOB->collection() + "2"); + _c3 = std::string(ARANGOB->collection() + "3"); return DeleteCollection(client, _c1) && DeleteCollection(client, _c2) && DeleteCollection(client, _c3) && CreateCollection(client, _c1, 2) && @@ -1128,8 +1128,8 @@ struct TransactionCountTest : public BenchmarkOperation { ~TransactionCountTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -1152,11 +1152,11 @@ struct TransactionCountTest : public BenchmarkOperation { buffer = TRI_CreateSizedStringBuffer(TRI_UNKNOWN_MEM_ZONE, 256); TRI_AppendStringStringBuffer(buffer, "{ \"collections\": { \"write\": \""); - TRI_AppendStringStringBuffer(buffer, Collection.c_str()); + TRI_AppendStringStringBuffer(buffer, ARANGOB->collection().c_str()); TRI_AppendStringStringBuffer(buffer, "\" }, \"action\": \"function () { var c = " "require(\\\"internal\\\").db[\\\""); - TRI_AppendStringStringBuffer(buffer, Collection.c_str()); + TRI_AppendStringStringBuffer(buffer, ARANGOB->collection().c_str()); TRI_AppendStringStringBuffer(buffer, "\\\"]; var startcount = c.count(); for (var " "i = 0; i < 50; ++i) { if (startcount + i !== " @@ -1178,8 +1178,8 @@ struct TransactionDeadlockTest : public BenchmarkOperation { ~TransactionDeadlockTest() {} bool setUp(SimpleHttpClient* client) { - _c1 = std::string(Collection + "1"); - _c2 = std::string(Collection + "2"); + _c1 = std::string(ARANGOB->collection() + "1"); + _c2 = std::string(ARANGOB->collection() + "2"); return DeleteCollection(client, _c1) && DeleteCollection(client, _c2) && CreateCollection(client, _c1, 2) && @@ -1247,8 +1247,8 @@ struct TransactionMultiTest : public BenchmarkOperation { ~TransactionMultiTest() {} bool setUp(SimpleHttpClient* client) { - _c1 = std::string(Collection + "1"); - _c2 = std::string(Collection + "2"); + _c1 = std::string(ARANGOB->collection() + "1"); + _c2 = std::string(ARANGOB->collection() + "2"); return DeleteCollection(client, _c1) && DeleteCollection(client, _c2) && CreateCollection(client, _c1, 2) && @@ -1331,8 +1331,8 @@ struct TransactionMultiCollectionTest : public BenchmarkOperation { ~TransactionMultiCollectionTest() {} bool setUp(SimpleHttpClient* client) { - _c1 = std::string(Collection + "1"); - _c2 = std::string(Collection + "2"); + _c1 = std::string(ARANGOB->collection() + "1"); + _c2 = std::string(ARANGOB->collection() + "2"); return DeleteCollection(client, _c1) && DeleteCollection(client, _c2) && CreateCollection(client, _c1, 2) && CreateCollection(client, _c2, 2); @@ -1375,7 +1375,7 @@ struct TransactionMultiCollectionTest : public BenchmarkOperation { TRI_AppendStringStringBuffer(buffer, "\\\"]; "); TRI_AppendStringStringBuffer(buffer, "var doc = {"); - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); for (uint64_t i = 0; i < n; ++i) { if (i > 0) { TRI_AppendStringStringBuffer(buffer, ", "); @@ -1407,8 +1407,8 @@ struct AqlInsertTest : public BenchmarkOperation { ~AqlInsertTest() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -1435,7 +1435,7 @@ struct AqlInsertTest : public BenchmarkOperation { TRI_AppendInt64StringBuffer(buffer, (int64_t)globalCounter); TRI_AppendStringStringBuffer(buffer, "\\\""); - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); for (uint64_t i = 1; i <= n; ++i) { TRI_AppendStringStringBuffer(buffer, ",\\\"value"); TRI_AppendUInt64StringBuffer(buffer, i); @@ -1443,7 +1443,7 @@ struct AqlInsertTest : public BenchmarkOperation { } TRI_AppendStringStringBuffer(buffer, " } INTO "); - TRI_AppendStringStringBuffer(buffer, Collection.c_str()); + TRI_AppendStringStringBuffer(buffer, ARANGOB->collection().c_str()); TRI_AppendStringStringBuffer(buffer, "\"}"); *length = TRI_LengthStringBuffer(buffer); @@ -1461,8 +1461,8 @@ struct AqlV8Test : public BenchmarkOperation { ~AqlV8Test() {} bool setUp(SimpleHttpClient* client) { - return DeleteCollection(client, Collection) && - CreateCollection(client, Collection, 2); + return DeleteCollection(client, ARANGOB->collection()) && + CreateCollection(client, ARANGOB->collection(), 2); } void tearDown() {} @@ -1489,7 +1489,7 @@ struct AqlV8Test : public BenchmarkOperation { TRI_AppendInt64StringBuffer(buffer, (int64_t)globalCounter); TRI_AppendStringStringBuffer(buffer, "\\\""); - uint64_t const n = Complexity; + uint64_t const n = ARANGOB->complexity(); for (uint64_t i = 1; i <= n; ++i) { TRI_AppendStringStringBuffer(buffer, ",\\\"value"); TRI_AppendUInt64StringBuffer(buffer, i); @@ -1499,7 +1499,7 @@ struct AqlV8Test : public BenchmarkOperation { } TRI_AppendStringStringBuffer(buffer, " } INTO "); - TRI_AppendStringStringBuffer(buffer, Collection.c_str()); + TRI_AppendStringStringBuffer(buffer, ARANGOB->collection().c_str()); TRI_AppendStringStringBuffer(buffer, "\"}"); *length = TRI_LengthStringBuffer(buffer); diff --git a/arangosh/CMakeLists.txt b/arangosh/CMakeLists.txt index 44fcbdfad4..b4095b6cb6 100644 --- a/arangosh/CMakeLists.txt +++ b/arangosh/CMakeLists.txt @@ -23,7 +23,7 @@ endif () add_executable(${BIN_ARANGOB} ${ProductVersionFiles_arangob} ${PROJECT_SOURCE_DIR}/lib/Basics/WorkMonitorDummy.cpp - ArangoShell/ArangoClient.cpp + Benchmark/ArangobFeature.cpp Benchmark/arangob.cpp ) @@ -61,8 +61,9 @@ endif () add_executable(${BIN_ARANGODUMP} ${ProductVersionFiles_arangodump} ${PROJECT_SOURCE_DIR}/lib/Basics/WorkMonitorDummy.cpp - ArangoShell/ArangoClient.cpp - V8Client/arangodump.cpp + Dump/ArangodumpFeature.cpp + Dump/arangodump.cpp + V8Client/ArangoClientHelper.cpp ) target_link_libraries(${BIN_ARANGODUMP} @@ -99,10 +100,12 @@ endif () add_executable(${BIN_ARANGOIMP} ${ProductVersionFiles_arangoimp} ${PROJECT_SOURCE_DIR}/lib/Basics/WorkMonitorDummy.cpp - ArangoShell/ArangoClient.cpp - V8Client/ImportHelper.cpp - V8Client/arangoimp.cpp + Import/ArangoimpFeature.cpp + Import/ImportHelper.cpp + Import/arangoimp.cpp + V8Client/ArangoClientHelper.cpp ) + target_link_libraries(${BIN_ARANGOIMP} ${LIB_ARANGO} ${LINENOISE_LIBS} @@ -137,8 +140,9 @@ endif () add_executable(${BIN_ARANGORESTORE} ${ProductVersionFiles_arangorestore} ${PROJECT_SOURCE_DIR}/lib/Basics/WorkMonitorDummy.cpp - ArangoShell/ArangoClient.cpp - V8Client/arangorestore.cpp + Restore/ArangorestoreFeature.cpp + Restore/arangorestore.cpp + V8Client/ArangoClientHelper.cpp ) target_link_libraries(${BIN_ARANGORESTORE} @@ -175,10 +179,12 @@ endif () add_executable(${BIN_ARANGOSH} ${ProductVersionFiles_arangosh} ${PROJECT_SOURCE_DIR}/lib/Basics/WorkMonitorDummy.cpp - ArangoShell/ArangoClient.cpp - V8Client/ImportHelper.cpp - V8Client/V8ClientConnection.cpp - V8Client/arangosh.cpp + Import/ImportHelper.cpp + Shell/ArangoshFeature.cpp + Shell/V8ClientConnection.cpp + Shell/V8ShellFeature.cpp + Shell/arangosh.cpp + V8Client/ArangoClientHelper.cpp ) target_link_libraries(${BIN_ARANGOSH} diff --git a/arangosh/Dump/ArangodumpFeature.cpp b/arangosh/Dump/ArangodumpFeature.cpp new file mode 100644 index 0000000000..89daac2538 --- /dev/null +++ b/arangosh/Dump/ArangodumpFeature.cpp @@ -0,0 +1,1111 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangodumpFeature.h" +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/FileUtils.h" +#include "Basics/StringUtils.h" +#include "Basics/VelocyPackHelper.h" +#include "Basics/files.h" +#include "Basics/tri-strings.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/Endpoint.h" +#include "Rest/HttpResponse.h" +#include "Rest/SslInterface.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" +#include "SimpleHttpClient/SimpleHttpResult.h" + +#include +#include + +#include + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::options; +using namespace arangodb::rest; + +ArangodumpFeature::ArangodumpFeature( + application_features::ApplicationServer* server, int* result) + : ApplicationFeature(server, "ArangodumpFeature"), + _collections(), + _chunkSize(1024 * 1024 * 2), + _maxChunkSize(1024 * 1024 * 12), + _dumpData(true), + _force(false), + _includeSystemCollections(false), + _outputDirectory(), + _overwrite(false), + _progress(true), + _tickStart(0), + _tickEnd(0), + _result(result), + _batchId(0), + _clusterMode(false) { + requiresElevatedPrivileges(false); + setOptional(false); + startsAfter("ClientFeature"); + startsAfter("LoggerFeature"); + + _outputDirectory = + FileUtils::buildFilename(FileUtils::currentDirectory(), "dump"); +} + +void ArangodumpFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption( + "--collection", + "restrict to collection name (can be specified multiple times)", + new VectorParameter(&_collections)); + + options->addOption("--initial-batch-size", + "initial size for individual data batches (in bytes)", + new UInt64Parameter(&_chunkSize)); + + options->addOption("--batch-size", + "initial size for individual data batches (in bytes)", + new UInt64Parameter(&_maxChunkSize)); + + options->addOption("--dump-data", "dump collection data", + new BooleanParameter(&_dumpData)); + + options->addOption( + "--force", "continue dumping even in the face of some server-side errors", + new BooleanParameter(&_force, false)); + + options->addOption("--include-system-collections", + "include system collections", + new BooleanParameter(&_includeSystemCollections)); + + options->addOption("--output-directory", "output directory", + new StringParameter(&_outputDirectory)); + + options->addOption("--overwrite", "overwrite data in output directory", + new BooleanParameter(&_overwrite, false)); + + options->addOption("--progress", "show progress", + new BooleanParameter(&_progress)); + + options->addOption("--tick-start", "only include data after this tick", + new UInt64Parameter(&_tickStart)); + + options->addOption("--tick-end", "last tick to be included in data dump", + new UInt64Parameter(&_tickEnd)); +} + +void ArangodumpFeature::validateOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + auto const& positionals = options->processingResult()._positionals; + size_t n = positionals.size(); + + if (1 == n) { + _outputDirectory = positionals[0]; + } else if (1 < n) { + LOG(ERR) << "expecting at most one directory, got " + + StringUtils::join(positionals, ", "); + abortInvalidParameters(); + } + + if (_chunkSize < 1024 * 128) { + _chunkSize = 1024 * 128; + } + + if (_maxChunkSize < _chunkSize) { + _maxChunkSize = _chunkSize; + } + + if (_tickStart < _tickEnd) { + LOG(ERR) << "invalid values for --tick-start or --tick-end"; + abortInvalidParameters(); + } + + // trim trailing slash from path because it may cause problems on ... + // Windows + if (!_outputDirectory.empty() && + _outputDirectory.back() == TRI_DIR_SEPARATOR_CHAR) { + TRI_ASSERT(_outputDirectory.size() > 0); + _outputDirectory.pop_back(); + } +} + +void ArangodumpFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + + bool isDirectory = false; + bool isEmptyDirectory = false; + + if (!_outputDirectory.empty()) { + isDirectory = TRI_IsDirectory(_outputDirectory.c_str()); + + if (isDirectory) { + std::vector files(TRI_FullTreeDirectory(_outputDirectory.c_str())); + // we don't care if the target directory is empty + isEmptyDirectory = (files.empty()); // TODO: TRI_FullTreeDirectory always returns at least one element (""), even if directory is empty? + } + } + + if (_outputDirectory.empty() || + (TRI_ExistsFile(_outputDirectory.c_str()) && !isDirectory)) { + LOG(FATAL) << "cannot write to output directory '" << _outputDirectory + << "'"; + FATAL_ERROR_EXIT(); + } + + if (isDirectory && !isEmptyDirectory && !_overwrite) { + LOG(FATAL) << "output directory '" << _outputDirectory + << "' already exists. use \"--overwrite true\" to " + "overwrite data in it"; + FATAL_ERROR_EXIT(); + } + + if (!isDirectory) { + long systemError; + std::string errorMessage; + int res = TRI_CreateDirectory(_outputDirectory.c_str(), systemError, + errorMessage); + + if (res != TRI_ERROR_NO_ERROR) { + LOG(ERR) << "unable to create output directory '" << _outputDirectory + << "': " << errorMessage; + FATAL_ERROR_EXIT(); + } + } +} + +// start a batch +int ArangodumpFeature::startBatch(std::string DBserver, std::string& errorMsg) { + std::string const url = "/_api/replication/batch"; + std::string const body = "{\"ttl\":300}"; + + std::string urlExt; + if (!DBserver.empty()) { + urlExt = "?DBserver=" + DBserver; + } + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_POST, url + urlExt, body.c_str(), body.size())); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + if (_force) { + return TRI_ERROR_NO_ERROR; + } + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + errorMsg = "got invalid response from server: HTTP " + + StringUtils::itoa(response->getHttpReturnCode()) + ": " + + response->getHttpReturnMessage(); + + return TRI_ERROR_INTERNAL; + } + + std::shared_ptr parsedBody; + try { + parsedBody = response->getBodyVelocyPack(); + } catch (...) { + errorMsg = "got malformed JSON"; + return TRI_ERROR_INTERNAL; + } + VPackSlice const resBody = parsedBody->slice(); + + // look up "id" value + std::string const id = + arangodb::basics::VelocyPackHelper::getStringValue(resBody, "id", ""); + + _batchId = StringUtils::uint64(id); + + return TRI_ERROR_NO_ERROR; +} + +// prolongs a batch +void ArangodumpFeature::extendBatch(std::string DBserver) { + TRI_ASSERT(_batchId > 0); + + std::string const url = + "/_api/replication/batch/" + StringUtils::itoa(_batchId); + std::string const body = "{\"ttl\":300}"; + std::string urlExt; + if (!DBserver.empty()) { + urlExt = "?DBserver=" + DBserver; + } + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_PUT, url + urlExt, body.c_str(), body.size())); + + // ignore any return value +} + +// end a batch +void ArangodumpFeature::endBatch(std::string DBserver) { + TRI_ASSERT(_batchId > 0); + + std::string const url = + "/_api/replication/batch/" + StringUtils::itoa(_batchId); + std::string urlExt; + if (!DBserver.empty()) { + urlExt = "?DBserver=" + DBserver; + } + + _batchId = 0; + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_DELETE, url + urlExt, nullptr, 0)); + + // ignore any return value +} + +/// @brief dump a single collection +int ArangodumpFeature::dumpCollection(int fd, std::string const& cid, + std::string const& name, uint64_t maxTick, + std::string& errorMsg) { + uint64_t chunkSize = _chunkSize; + + std::string const baseUrl = "/_api/replication/dump?collection=" + cid + + "&ticks=false&translateIds=true&flush=false"; + + uint64_t fromTick = _tickStart; + + while (true) { + std::string url = baseUrl + "&from=" + StringUtils::itoa(fromTick) + + "&chunkSize=" + StringUtils::itoa(chunkSize); + + if (maxTick > 0) { + url += "&to=" + StringUtils::itoa(maxTick); + } + + if (_force) { + url += "&failOnUnknown=false"; + } else { + url += "&failOnUnknown=true"; + } + + _stats._totalBatches++; + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + errorMsg = getHttpErrorMessage(response.get(), nullptr); + + return TRI_ERROR_INTERNAL; + } + + int res = TRI_ERROR_NO_ERROR; // just to please the compiler + bool checkMore = false; + bool found; + + // TODO: fix hard-coded headers + std::string header = + response->getHeaderField("x-arango-replication-checkmore", found); + + if (found) { + checkMore = StringUtils::boolean(header); + res = TRI_ERROR_NO_ERROR; + + if (checkMore) { + // TODO: fix hard-coded headers + header = response->getHeaderField("x-arango-replication-lastincluded", + found); + + if (found) { + uint64_t tick = StringUtils::uint64(header); + + if (tick > fromTick) { + fromTick = tick; + } else { + // we got the same tick again, this indicates we're at the end + checkMore = false; + } + } + } + } + + if (!found) { + errorMsg = "got invalid response server: required header is missing"; + res = TRI_ERROR_REPLICATION_INVALID_RESPONSE; + } + + if (res == TRI_ERROR_NO_ERROR) { + StringBuffer const& body = response->getBody(); + + if (!TRI_WritePointer(fd, body.c_str(), body.length())) { + res = TRI_ERROR_CANNOT_WRITE_FILE; + } else { + _stats._totalWritten += (uint64_t)body.length(); + } + } + + if (res != TRI_ERROR_NO_ERROR) { + return res; + } + + if (!checkMore || fromTick == 0) { + // done + return res; + } + + if (chunkSize < _maxChunkSize) { + // adaptively increase chunksize + chunkSize = static_cast(chunkSize * 1.5); + + if (chunkSize > _maxChunkSize) { + chunkSize = _maxChunkSize; + } + } + } + + TRI_ASSERT(false); + return TRI_ERROR_INTERNAL; +} + +// execute a WAL flush request +void ArangodumpFeature::flushWal() { + std::string const url = + "/_admin/wal/flush?waitForSync=true&waitForCollector=true"; + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_PUT, url, nullptr, 0)); + + if (response == nullptr || !response->isComplete() || + response->wasHttpError()) { + std::cerr << "got invalid response from server: " + + _httpClient->getErrorMessage() + << std::endl; + } +} + +// dump data from server +int ArangodumpFeature::runDump(std::string& dbName, std::string& errorMsg) { + std::string const url = + "/_api/replication/inventory?includeSystem=" + + std::string(_includeSystemCollections ? "true" : "false"); + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + errorMsg = "got invalid response from server: HTTP " + + StringUtils::itoa(response->getHttpReturnCode()) + ": " + + response->getHttpReturnMessage(); + return TRI_ERROR_INTERNAL; + } + + flushWal(); + std::shared_ptr parsedBody; + try { + parsedBody = response->getBodyVelocyPack(); + } catch (...) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + VPackSlice const body = parsedBody->slice(); + + if (!body.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + VPackSlice const collections = body.get("collections"); + + if (!collections.isArray()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + // read the server's max tick value + std::string const tickString = + arangodb::basics::VelocyPackHelper::getStringValue(body, "tick", ""); + + if (tickString == "") { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + std::cout << "Last tick provided by server is: " << tickString << std::endl; + + uint64_t maxTick = StringUtils::uint64(tickString); + // check if the user specified a max tick value + if (_tickEnd > 0 && maxTick > _tickEnd) { + maxTick = _tickEnd; + } + + try { + VPackBuilder meta; + meta.openObject(); + meta.add("database", VPackValue(dbName)); + meta.add("lastTickAtDumpStart", VPackValue(tickString)); + + // save last tick in file + std::string fileName = + _outputDirectory + TRI_DIR_SEPARATOR_STR + "dump.json"; + + int fd; + + // remove an existing file first + if (TRI_ExistsFile(fileName.c_str())) { + TRI_UnlinkFile(fileName.c_str()); + } + + fd = TRI_CREATE(fileName.c_str(), O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, + S_IRUSR | S_IWUSR); + + if (fd < 0) { + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + meta.close(); + + std::string const metaString = meta.slice().toJson(); + if (!TRI_WritePointer(fd, metaString.c_str(), metaString.size())) { + TRI_CLOSE(fd); + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + TRI_CLOSE(fd); + } catch (...) { + errorMsg = "out of memory"; + + return TRI_ERROR_OUT_OF_MEMORY; + } + + // create a lookup table for collections + std::map restrictList; + for (size_t i = 0; i < _collections.size(); ++i) { + restrictList.insert(std::pair(_collections[i], true)); + } + + // iterate over collections + for (VPackSlice const& collection : VPackArrayIterator(collections)) { + if (!collection.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + VPackSlice const parameters = collection.get("parameters"); + + if (!parameters.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + std::string const cid = arangodb::basics::VelocyPackHelper::getStringValue( + parameters, "cid", ""); + std::string const name = arangodb::basics::VelocyPackHelper::getStringValue( + parameters, "name", ""); + bool const deleted = arangodb::basics::VelocyPackHelper::getBooleanValue( + parameters, "deleted", false); + int type = arangodb::basics::VelocyPackHelper::getNumericValue( + parameters, "type", 2); + std::string const collectionType(type == 2 ? "document" : "edge"); + + if (cid == "" || name == "") { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + if (deleted) { + continue; + } + + if (name[0] == '_' && !_includeSystemCollections) { + continue; + } + + if (!restrictList.empty() && + restrictList.find(name) == restrictList.end()) { + // collection name not in list + continue; + } + + std::string const hexString(arangodb::rest::SslInterface::sslMD5(name)); + + // found a collection! + if (_progress) { + std::cout << "# Dumping " << collectionType << " collection '" << name + << "'..." << std::endl; + } + + // now save the collection meta data and/or the actual data + _stats._totalCollections++; + + { + // save meta data + std::string fileName = _outputDirectory + TRI_DIR_SEPARATOR_STR + name + + "_" + hexString + ".structure.json"; + + int fd; + + // remove an existing file first + if (TRI_ExistsFile(fileName.c_str())) { + TRI_UnlinkFile(fileName.c_str()); + } + + fd = TRI_CREATE(fileName.c_str(), + O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, + S_IRUSR | S_IWUSR); + + if (fd < 0) { + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + std::string const collectionInfo = collection.toJson(); + + if (!TRI_WritePointer(fd, collectionInfo.c_str(), + collectionInfo.size())) { + TRI_CLOSE(fd); + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + TRI_CLOSE(fd); + } + + if (_dumpData) { + // save the actual data + std::string fileName; + fileName = _outputDirectory + TRI_DIR_SEPARATOR_STR + name + "_" + + hexString + ".data.json"; + + int fd; + + // remove an existing file first + if (TRI_ExistsFile(fileName.c_str())) { + TRI_UnlinkFile(fileName.c_str()); + } + + fd = TRI_CREATE(fileName.c_str(), + O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, + S_IRUSR | S_IWUSR); + + if (fd < 0) { + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + extendBatch(""); + int res = dumpCollection(fd, cid, name, maxTick, errorMsg); + + TRI_CLOSE(fd); + + if (res != TRI_ERROR_NO_ERROR) { + if (errorMsg.empty()) { + errorMsg = "cannot write to file '" + fileName + "'"; + } + + return res; + } + } + } + + return TRI_ERROR_NO_ERROR; +} + +/// @brief dump a single shard, that is a collection on a DBserver +int ArangodumpFeature::dumpShard(int fd, std::string const& DBserver, + std::string const& name, + std::string& errorMsg) { + std::string const baseUrl = "/_api/replication/dump?DBserver=" + DBserver + + "&collection=" + name + "&chunkSize=" + + StringUtils::itoa(_chunkSize) + + "&ticks=false&translateIds=true"; + + uint64_t fromTick = 0; + uint64_t maxTick = UINT64_MAX; + + while (true) { + std::string url = baseUrl + "&from=" + StringUtils::itoa(fromTick); + + if (maxTick > 0) { + url += "&to=" + StringUtils::itoa(maxTick); + } + + _stats._totalBatches++; + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + errorMsg = getHttpErrorMessage(response.get(), nullptr); + + return TRI_ERROR_INTERNAL; + } + + int res = TRI_ERROR_NO_ERROR; // just to please the compiler + bool checkMore = false; + bool found; + + // TODO: fix hard-coded headers + std::string header = + response->getHeaderField("x-arango-replication-checkmore", found); + + if (found) { + checkMore = StringUtils::boolean(header); + res = TRI_ERROR_NO_ERROR; + + if (checkMore) { + // TODO: fix hard-coded headers + header = response->getHeaderField("x-arango-replication-lastincluded", + found); + + if (found) { + uint64_t tick = StringUtils::uint64(header); + + if (tick > fromTick) { + fromTick = tick; + } else { + // we got the same tick again, this indicates we're at the end + checkMore = false; + } + } + } + } + + if (!found) { + errorMsg = "got invalid response server: required header is missing"; + res = TRI_ERROR_REPLICATION_INVALID_RESPONSE; + } + + if (res == TRI_ERROR_NO_ERROR) { + StringBuffer const& body = response->getBody(); + + if (!TRI_WritePointer(fd, body.c_str(), body.length())) { + res = TRI_ERROR_CANNOT_WRITE_FILE; + } else { + _stats._totalWritten += (uint64_t)body.length(); + } + } + + if (res != TRI_ERROR_NO_ERROR) { + return res; + } + + if (!checkMore || fromTick == 0) { + // done + return res; + } + } + + TRI_ASSERT(false); + return TRI_ERROR_INTERNAL; +} + +// dump data from cluster via a coordinator +int ArangodumpFeature::runClusterDump(std::string& errorMsg) { + int res; + + std::string const url = + "/_api/replication/clusterInventory?includeSystem=" + + std::string(_includeSystemCollections ? "true" : "false"); + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + errorMsg = "got invalid response from server: HTTP " + + StringUtils::itoa(response->getHttpReturnCode()) + ": " + + response->getHttpReturnMessage(); + + return TRI_ERROR_INTERNAL; + } + + std::shared_ptr parsedBody; + try { + parsedBody = response->getBodyVelocyPack(); + } catch (...) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + VPackSlice const body = parsedBody->slice(); + + if (!body.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + VPackSlice const collections = body.get("collections"); + + if (!collections.isArray()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + // create a lookup table for collections + std::map restrictList; + for (size_t i = 0; i < _collections.size(); ++i) { + restrictList.insert(std::pair(_collections[i], true)); + } + + // iterate over collections + for (auto const& collection : VPackArrayIterator(collections)) { + if (!collection.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + VPackSlice const parameters = collection.get("parameters"); + + if (!parameters.isObject()) { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + std::string const id = arangodb::basics::VelocyPackHelper::getStringValue( + parameters, "id", ""); + std::string const name = arangodb::basics::VelocyPackHelper::getStringValue( + parameters, "name", ""); + bool const deleted = arangodb::basics::VelocyPackHelper::getBooleanValue( + parameters, "deleted", false); + + if (id == "" || name == "") { + errorMsg = "got malformed JSON response from server"; + + return TRI_ERROR_INTERNAL; + } + + if (deleted) { + continue; + } + + if (name[0] == '_' && !_includeSystemCollections) { + continue; + } + + if (!restrictList.empty() && + restrictList.find(name) == restrictList.end()) { + // collection name not in list + continue; + } + + // found a collection! + if (_progress) { + std::cout << "# Dumping collection '" << name << "'..." << std::endl; + } + + // now save the collection meta data and/or the actual data + _stats._totalCollections++; + + { + // save meta data + std::string fileName = + _outputDirectory + TRI_DIR_SEPARATOR_STR + name + ".structure.json"; + + // remove an existing file first + if (TRI_ExistsFile(fileName.c_str())) { + TRI_UnlinkFile(fileName.c_str()); + } + + int fd = TRI_CREATE(fileName.c_str(), + O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, + S_IRUSR | S_IWUSR); + + if (fd < 0) { + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + std::string const collectionInfo = collection.toJson(); + + if (!TRI_WritePointer(fd, collectionInfo.c_str(), + collectionInfo.size())) { + TRI_CLOSE(fd); + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + TRI_CLOSE(fd); + } + + if (_dumpData) { + // save the actual data + + // Now set up the output file: + std::string const hexString(arangodb::rest::SslInterface::sslMD5(name)); + std::string fileName = _outputDirectory + TRI_DIR_SEPARATOR_STR + name + + "_" + hexString + ".data.json"; + + // remove an existing file first + if (TRI_ExistsFile(fileName.c_str())) { + TRI_UnlinkFile(fileName.c_str()); + } + + int fd = TRI_CREATE(fileName.c_str(), + O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, + S_IRUSR | S_IWUSR); + + if (fd < 0) { + errorMsg = "cannot write to file '" + fileName + "'"; + + return TRI_ERROR_CANNOT_WRITE_FILE; + } + + // First we have to go through all the shards, what are they? + VPackSlice const shards = parameters.get("shards"); + + // Iterate over the Map of shardId to server list + for (auto const it : VPackObjectIterator(shards)) { + TRI_ASSERT(it.key.isString()); + + std::string shardName = it.key.copyString(); + + if (!it.value.isArray() || it.value.length() == 0 || + !it.value[0].isString()) { + TRI_CLOSE(fd); + errorMsg = "unexpected value for 'shards' attribute"; + + return TRI_ERROR_BAD_PARAMETER; + } + + std::string DBserver = it.value[0].copyString(); + + if (_progress) { + std::cout << "# Dumping shard '" << shardName << "' from DBserver '" + << DBserver << "' ..." << std::endl; + } + res = startBatch(DBserver, errorMsg); + if (res != TRI_ERROR_NO_ERROR) { + TRI_CLOSE(fd); + return res; + } + res = dumpShard(fd, DBserver, shardName, errorMsg); + if (res != TRI_ERROR_NO_ERROR) { + TRI_CLOSE(fd); + return res; + } + endBatch(DBserver); + } + + res = TRI_CLOSE(fd); + + if (res != TRI_ERROR_NO_ERROR) { + if (errorMsg.empty()) { + errorMsg = "cannot write to file '" + fileName + "'"; + } + + return res; + } + } + } + + return TRI_ERROR_NO_ERROR; +} + +void ArangodumpFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + + int ret = EXIT_SUCCESS; + *_result = ret; + + try { + _httpClient = client->createHttpClient(); + } catch (...) { + LOG(FATAL) << "cannot create server connection, giving up!"; + FATAL_ERROR_EXIT(); + } + + std::string dbName = client->databaseName(); + + _httpClient->setLocationRewriter((void*)client, &rewriteLocation); + _httpClient->setUserNamePassword("/", client->username(), client->password()); + + std::string const versionString = getArangoVersion(nullptr); + + if (!_httpClient->isConnected()) { + LOG(ERR) << "Could not connect to endpoint '" << client->endpoint() + << "', database: '" << dbName << "', username: '" + << client->username() << "'"; + LOG(FATAL) << "Error message: '" << _httpClient->getErrorMessage() << "'"; + + FATAL_ERROR_EXIT(); + } + + // successfully connected + std::cout << "Server version: " << versionString << std::endl; + + // validate server version + int major = 0; + int minor = 0; + + if (sscanf(versionString.c_str(), "%d.%d", &major, &minor) != 2) { + LOG(FATAL) << "invalid server version '" << versionString << "'"; + FATAL_ERROR_EXIT(); + } + + if (major != 3) { + // we can connect to 3.x + LOG(ERR) << "Error: got incompatible server version '" << versionString + << "'"; + + if (!_force) { + FATAL_ERROR_EXIT(); + } + } + + if (major >= 2) { + // Version 1.4 did not yet have a cluster mode + _clusterMode = getArangoIsCluster(nullptr); + + if (_clusterMode) { + if (_tickStart != 0 || _tickEnd != 0) { + LOG(ERR) << "Error: cannot use tick-start or tick-end on a cluster"; + FATAL_ERROR_EXIT(); + } + } + } + + if (!_httpClient->isConnected()) { + LOG(ERR) << "Lost connection to endpoint '" << client->endpoint() + << "', database: '" << dbName << "', username: '" + << client->username() << "'"; + LOG(FATAL) << "Error message: '" << _httpClient->getErrorMessage() << "'"; + FATAL_ERROR_EXIT(); + } + + if (_progress) { + std::cout << "Connected to ArangoDB '" << client->endpoint() + << "', database: '" << dbName << "', username: '" + << client->username() << "'" << std::endl; + + std::cout << "Writing dump to output directory '" << _outputDirectory << "'" + << std::endl; + } + + memset(&_stats, 0, sizeof(_stats)); + + std::string errorMsg = ""; + + int res; + + try { + if (!_clusterMode) { + res = startBatch("", errorMsg); + + if (res != TRI_ERROR_NO_ERROR && _force) { + res = TRI_ERROR_NO_ERROR; + } + + if (res == TRI_ERROR_NO_ERROR) { + res = runDump(dbName, errorMsg); + } + + if (_batchId > 0) { + endBatch(""); + } + } else { + res = runClusterDump(errorMsg); + } + } catch (std::exception const& ex) { + LOG(ERR) << "caught exception " << ex.what(); + res = TRI_ERROR_INTERNAL; + } catch (...) { + LOG(ERR) << "Error: caught unknown exception"; + res = TRI_ERROR_INTERNAL; + } + + if (res != TRI_ERROR_NO_ERROR) { + if (!errorMsg.empty()) { + LOG(ERR) << errorMsg; + } else { + LOG(ERR) << "An error occurred"; + } + ret = EXIT_FAILURE; + } + + if (_progress) { + if (_dumpData) { + std::cout << "Processed " << _stats._totalCollections + << " collection(s), " + << "wrote " << _stats._totalWritten + << " byte(s) into datafiles, " + << "sent " << _stats._totalBatches << " batch(es)" << std::endl; + } else { + std::cout << "Processed " << _stats._totalCollections << " collection(s)" + << std::endl; + } + } + + *_result = ret; +} diff --git a/arangosh/Dump/ArangodumpFeature.h b/arangosh/Dump/ArangodumpFeature.h new file mode 100644 index 0000000000..e3533cd969 --- /dev/null +++ b/arangosh/Dump/ArangodumpFeature.h @@ -0,0 +1,90 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGODUMP_FEATURE_H +#define APPLICATION_FEATURES_ARANGODUMP_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" +#include "V8Client/ArangoClientHelper.h" + +namespace arangodb { +namespace httpclient { +class SimpleHttpResult; +} + +class ArangodumpFeature final : public application_features::ApplicationFeature, + public ArangoClientHelper { + public: + ArangodumpFeature(application_features::ApplicationServer* server, + int* result); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + void prepare() override; + void start() override; + + private: + std::vector _collections; + uint64_t _chunkSize; + uint64_t _maxChunkSize; + bool _dumpData; + bool _force; + bool _includeSystemCollections; + std::string _outputDirectory; + bool _overwrite; + bool _progress; + uint64_t _tickStart; + uint64_t _tickEnd; + + private: + int startBatch(std::string DBserver, std::string& errorMsg); + void extendBatch(std::string DBserver); + void endBatch(std::string DBserver); + int dumpCollection(int fd, std::string const& cid, std::string const& name, + uint64_t maxTick, std::string& errorMsg); + void flushWal(); + int runDump(std::string& dbName, std::string& errorMsg); + int dumpShard(int fd, std::string const& DBserver, std::string const& name, + std::string& errorMsg); + int runClusterDump(std::string& errorMsg); + + private: + int* _result; + + // our batch id + uint64_t _batchId; + + // cluster mode flag + bool _clusterMode; + + // statistics + struct { + uint64_t _totalBatches; + uint64_t _totalCollections; + uint64_t _totalWritten; + } _stats; +}; +} + +#endif diff --git a/arangosh/Dump/arangodump.cpp b/arangosh/Dump/arangodump.cpp new file mode 100644 index 0000000000..9182ab39a7 --- /dev/null +++ b/arangosh/Dump/arangodump.cpp @@ -0,0 +1,64 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "Basics/Common.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConfigFeature.h" +#include "ApplicationFeatures/LoggerFeature.h" +#include "ApplicationFeatures/ShutdownFeature.h" +#include "Dump/ArangodumpFeature.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/InitializeRest.h" + +using namespace arangodb; +using namespace arangodb::application_features; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief main +//////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char* argv[]) { + ADB_WindowsEntryFunction(); + TRIAGENS_REST_INITIALIZE(); + + std::shared_ptr options(new options::ProgramOptions( + argv[0], "Usage: arangodump []", "For more information use:")); + + ApplicationServer server(options); + + int ret; + + server.addFeature(new LoggerFeature(&server)); + server.addFeature(new ConfigFeature(&server, "arangodump")); + server.addFeature(new ClientFeature(&server)); + server.addFeature(new ArangodumpFeature(&server, &ret)); + server.addFeature(new ShutdownFeature(&server, "ArangodumpFeature")); + + server.run(argc, argv); + + TRIAGENS_REST_SHUTDOWN; + ADB_WindowsExitFunction(ret, nullptr); + + return ret; +} diff --git a/arangosh/Import/ArangoimpFeature.cpp b/arangosh/Import/ArangoimpFeature.cpp new file mode 100644 index 0000000000..aba55c2cc1 --- /dev/null +++ b/arangosh/Import/ArangoimpFeature.cpp @@ -0,0 +1,329 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangoimpFeature.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/StringUtils.h" +#include "Basics/FileUtils.h" +#include "Import/ImportHelper.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::options; + +ArangoimpFeature::ArangoimpFeature( + application_features::ApplicationServer* server, int* result) + : ApplicationFeature(server, "ArangoimpFeature"), + _filename(""), + _useBackslash(false), + _chunkSize(1024 * 1024 * 16), + _collectionName(""), + _createCollection(false), + _createCollectionType("document"), + _typeImport("json"), + _overwrite(false), + _quote("\""), + _separator(","), + _progress(true), + _onDuplicateAction("error"), + _result(result) { + requiresElevatedPrivileges(false); + setOptional(false); + startsAfter("ClientFeature"); + startsAfter("ConfigFeature"); + startsAfter("LoggerFeature"); +} + +void ArangoimpFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption("--file", "file name (\"-\" for STDIN)", + new StringParameter(&_filename)); + + options->addOption( + "--backslash-escape", + "use backslash as the escape character for quotes, used for csv", + new BooleanParameter(&_useBackslash)); + + options->addOption("--batch-size", + "size for individual data batches (in bytes)", + new UInt64Parameter(&_chunkSize)); + + options->addOption("--collection", "collection name", + new StringParameter(&_collectionName)); + + options->addOption("--create-collection", + "create collection if it does not yet exist", + new BooleanParameter(&_createCollection)); + + std::unordered_set types = {"document", "edge"}; + std::vector typesVector(types.begin(), types.end()); + std::string typesJoined = StringUtils::join(typesVector, " or "); + + options->addOption( + "--create-collection-type", + "type of collection if collection is created (" + typesJoined + ")", + new DiscreteValuesParameter(&_createCollectionType, + types)); + + std::unordered_set imports = {"csv", "tsv", "json"}; + std::vector importsVector(imports.begin(), imports.end()); + std::string importsJoined = StringUtils::join(importsVector, ", "); + + options->addOption( + "--type", "type of file (" + importsJoined + ")", + new DiscreteValuesParameter(&_typeImport, imports)); + + options->addOption( + "--overwrite", + "overwrite collection if it exist (WARNING: this will remove any data " + "from the collection)", + new BooleanParameter(&_overwrite, false)); + + options->addOption("--quote", "quote character(s), used for csv", + new StringParameter(&_quote)); + + options->addOption("--separator", "field separator, used for csv", + new StringParameter(&_separator)); + + options->addOption("--progress", "show progress", + new BooleanParameter(&_progress)); + + std::unordered_set actions = {"error", "update", "replace", + "ignore"}; + std::vector actionsVector(actions.begin(), actions.end()); + std::string actionsJoined = StringUtils::join(actionsVector, ", "); + + options->addOption( + "--on-duplicate", + "action to perform when a unique key constraint " + "violation occurs. Possible values: " + + actionsJoined, + new DiscreteValuesParameter(&_typeImport, actions)); +} + +void ArangoimpFeature::validateOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + auto const& positionals = options->processingResult()._positionals; + size_t n = positionals.size(); + + if (1 == n) { + _filename = positionals[0]; + } else if (1 < n) { + LOG(ERR) << "expecting at most one filename, got " + + StringUtils::join(positionals, ", "); + abortInvalidParameters(); + } +} + +void ArangoimpFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + + int ret = EXIT_SUCCESS; + *_result = ret; + + std::unique_ptr httpClient; + + try { + httpClient = client->createHttpClient(); + } catch (...) { + LOG(FATAL) << "cannot create server connection, giving up!"; + FATAL_ERROR_EXIT(); + } + + std::string dbName = client->databaseName(); + + httpClient->setLocationRewriter((void*)client, &rewriteLocation); + httpClient->setUserNamePassword("/", client->username(), client->password()); + + // must stay here in order to establish the connection + httpClient->getServerVersion(); + + if (!httpClient->isConnected()) { + LOG(ERR) << "Could not connect to endpoint '" << client->endpoint() + << "', database: '" << client->databaseName() << "', username: '" + << client->username() << "'"; + LOG(FATAL) << httpClient->getErrorMessage() << "'"; + FATAL_ERROR_EXIT(); + } + + // successfully connected + std::cout << "Connected to ArangoDB '" + << httpClient->getEndpointSpecification() << "', version " + << httpClient->getServerVersion() << ", database: '" + << client->databaseName() << "', username: '" << client->username() + << "'" << std::endl; + + std::cout << "----------------------------------------" << std::endl; + std::cout << "database: " << client->databaseName() << std::endl; + std::cout << "collection: " << _collectionName << std::endl; + std::cout << "create: " << (_createCollection ? "yes" : "no") + << std::endl; + std::cout << "file: " << _filename << std::endl; + std::cout << "type: " << _typeImport << std::endl; + + if (_typeImport == "csv") { + std::cout << "quote: " << _quote << std::endl; + std::cout << "separator: " << _separator << std::endl; + } + + std::cout << "connect timeout: " << client->connectionTimeout() << std::endl; + std::cout << "request timeout: " << client->requestTimeout() << std::endl; + std::cout << "----------------------------------------" << std::endl; + + arangodb::import::ImportHelper ih(httpClient.get(), _chunkSize); + + // create colletion + if (_createCollection) { + ih.setCreateCollection(true); + } + + if (_createCollectionType == "document" || _createCollectionType == "edge") { + ih.setCreateCollectionType(_createCollectionType); + } + + ih.setOverwrite(_overwrite); + ih.useBackslash(_useBackslash); + + // quote + if (_quote.length() <= 1) { + ih.setQuote(_quote); + } else { + LOG(FATAL) << "Wrong length of quote character."; + FATAL_ERROR_EXIT(); + } + + // separator + if (_separator.length() == 1) { + ih.setSeparator(_separator); + } else { + LOG(FATAL) << "_separator must be exactly one character."; + FATAL_ERROR_EXIT(); + } + + // collection name + if (_collectionName == "") { + LOG(FATAL) << "Collection name is missing."; + FATAL_ERROR_EXIT(); + } + + // filename + if (_filename == "") { + LOG(FATAL) << "File name is missing."; + FATAL_ERROR_EXIT(); + } + + if (_filename != "-" && !FileUtils::isRegularFile(_filename)) { + if (!FileUtils::exists(_filename)) { + LOG(FATAL) << "Cannot open file '" << _filename << "'. File not found."; + } else if (FileUtils::isDirectory(_filename)) { + LOG(FATAL) << "Specified file '" << _filename + << "' is a directory. Please use a regular file."; + } else { + LOG(FATAL) << "Cannot open '" << _filename << "'. Invalid file type."; + } + + FATAL_ERROR_EXIT(); + } + + // progress + if (_progress) { + ih.setProgress(true); + } + + if (_onDuplicateAction != "error" && _onDuplicateAction != "update" && + _onDuplicateAction != "replace" && _onDuplicateAction != "ignore") { + LOG(FATAL) + << "Invalid value for '--on-duplicate'. Possible values: 'error', " + "'update', 'replace', 'ignore'."; + FATAL_ERROR_EXIT(); + } + + ih.setOnDuplicateAction(_onDuplicateAction); + + try { + bool ok = false; + + // import type + if (_typeImport == "csv") { + std::cout << "Starting CSV import..." << std::endl; + ok = ih.importDelimited(_collectionName, _filename, + arangodb::import::ImportHelper::CSV); + } + + else if (_typeImport == "tsv") { + std::cout << "Starting TSV import..." << std::endl; + ih.setQuote(""); + ih.setSeparator("\\t"); + ok = ih.importDelimited(_collectionName, _filename, + arangodb::import::ImportHelper::TSV); + } + + else if (_typeImport == "json") { + std::cout << "Starting JSON import..." << std::endl; + ok = ih.importJson(_collectionName, _filename); + } + + else { + LOG(FATAL) << "Wrong type '" << _typeImport << "'."; + FATAL_ERROR_EXIT(); + } + + std::cout << std::endl; + + // give information about import + if (ok) { + std::cout << "created: " << ih.getNumberCreated() << std::endl; + std::cout << "warnings/errors: " << ih.getNumberErrors() << std::endl; + std::cout << "updated/replaced: " << ih.getNumberUpdated() << std::endl; + std::cout << "ignored: " << ih.getNumberIgnored() << std::endl; + + if (_typeImport == "csv" || _typeImport == "tsv") { + std::cout << "lines read: " << ih.getReadLines() << std::endl; + } + + } else { + LOG(ERR) << "error message: " << ih.getErrorMessage(); + } + } catch (std::exception const& ex) { + LOG(ERR) << "Caught exception " << ex.what() << " during import"; + } catch (...) { + LOG(ERR) << "Got an unknown exception during import"; + } + + *_result = ret; +} diff --git a/arangosh/Import/ArangoimpFeature.h b/arangosh/Import/ArangoimpFeature.h new file mode 100644 index 0000000000..b8bd5c93ed --- /dev/null +++ b/arangosh/Import/ArangoimpFeature.h @@ -0,0 +1,67 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGOIMP_FEATURE_H +#define APPLICATION_FEATURES_ARANGOIMP_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" +#include "V8Client/ArangoClientHelper.h" + +namespace arangodb { +namespace httpclient { +class GeneralClientConnection; +class SimpleHttpClient; +class SimpleHttpResult; +} + +class ArangoimpFeature final : public application_features::ApplicationFeature, + public ArangoClientHelper { + public: + ArangoimpFeature(application_features::ApplicationServer* server, + int* result); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + void start() override; + + private: + std::string _filename; + bool _useBackslash; + uint64_t _chunkSize; + std::string _collectionName; + bool _createCollection; + std::string _createCollectionType; + std::string _typeImport; + bool _overwrite; + std::string _quote; + std::string _separator; + bool _progress; + std::string _onDuplicateAction; + + private: + int* _result; +}; +} + +#endif diff --git a/arangosh/V8Client/ImportHelper.cpp b/arangosh/Import/ImportHelper.cpp similarity index 99% rename from arangosh/V8Client/ImportHelper.cpp rename to arangosh/Import/ImportHelper.cpp index f95922c662..54961932cd 100644 --- a/arangosh/V8Client/ImportHelper.cpp +++ b/arangosh/Import/ImportHelper.cpp @@ -26,7 +26,7 @@ #include "Basics/StringUtils.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/VelocyPackHelper.h" #include "Rest/HttpRequest.h" @@ -122,7 +122,7 @@ static bool IsDecimal(char const* field, size_t fieldLength) { } namespace arangodb { -namespace v8client { +namespace import { //////////////////////////////////////////////////////////////////////////////// /// initialize step value for progress reports diff --git a/arangosh/V8Client/ImportHelper.h b/arangosh/Import/ImportHelper.h similarity index 99% rename from arangosh/V8Client/ImportHelper.h rename to arangosh/Import/ImportHelper.h index ee24232068..31186ecb92 100644 --- a/arangosh/V8Client/ImportHelper.h +++ b/arangosh/Import/ImportHelper.h @@ -46,7 +46,7 @@ class SimpleHttpResult; //////////////////////////////////////////////////////////////////////////////// namespace arangodb { -namespace v8client { +namespace import { class ImportHelper { public: diff --git a/arangosh/Import/arangoimp.cpp b/arangosh/Import/arangoimp.cpp new file mode 100644 index 0000000000..a772f55576 --- /dev/null +++ b/arangosh/Import/arangoimp.cpp @@ -0,0 +1,66 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "Basics/Common.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConfigFeature.h" +#include "ApplicationFeatures/LoggerFeature.h" +#include "ApplicationFeatures/ShutdownFeature.h" +#include "ApplicationFeatures/TempFeature.h" +#include "Import/ArangoimpFeature.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/InitializeRest.h" + +using namespace arangodb; +using namespace arangodb::application_features; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief main +//////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char* argv[]) { + ADB_WindowsEntryFunction(); + TRIAGENS_REST_INITIALIZE(); + + std::shared_ptr options(new options::ProgramOptions( + argv[0], "Usage: arangoimp []", "For more information use:")); + + ApplicationServer server(options); + + int ret; + + server.addFeature(new LoggerFeature(&server)); + server.addFeature(new TempFeature(&server, "arangoimp")); + server.addFeature(new ConfigFeature(&server, "arangoimp")); + server.addFeature(new ClientFeature(&server)); + server.addFeature(new ArangoimpFeature(&server, &ret)); + server.addFeature(new ShutdownFeature(&server, "ArangoimpFeature")); + + server.run(argc, argv); + + TRIAGENS_REST_SHUTDOWN; + ADB_WindowsExitFunction(ret, nullptr); + + return ret; +} diff --git a/arangosh/Restore/ArangorestoreFeature.cpp b/arangosh/Restore/ArangorestoreFeature.cpp new file mode 100644 index 0000000000..178af3abb9 --- /dev/null +++ b/arangosh/Restore/ArangorestoreFeature.cpp @@ -0,0 +1,751 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangorestoreFeature.h" + +#include "Basics/FileUtils.h" +#include "Basics/StringUtils.h" +#include "Basics/VelocyPackHelper.h" +#include "Basics/files.h" +#include "Basics/terminal-utils.h" +#include "Basics/tri-strings.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/Endpoint.h" +#include "Rest/HttpResponse.h" +#include "Rest/InitializeRest.h" +#include "Rest/SslInterface.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" +#include "SimpleHttpClient/SimpleHttpResult.h" + +#include +#include + +#include + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::options; +using namespace arangodb::rest; + +ArangorestoreFeature::ArangorestoreFeature( + application_features::ApplicationServer* server, int* result) + : ApplicationFeature(server, "ArangorestoreFeature"), + _collections(), + _chunkSize(1024 * 1024 * 8), + _includeSystemCollections(false), + _createDatabase(false), + _inputDirectory(), + _importData(true), + _importStructure(true), + _progress(true), + _overwrite(true), + _recycleIds(false), + _force(false), + _clusterMode(false), + _defaultNumberOfShards(1), + _result(result) { + requiresElevatedPrivileges(false); + setOptional(false); + startsAfter("ClientFeature"); + startsAfter("LoggerFeature"); + + _inputDirectory = + FileUtils::buildFilename(FileUtils::currentDirectory(), "dump"); +} + +void ArangorestoreFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption( + "--collection", + "restrict to collection name (can be specified multiple times)", + new VectorParameter(&_collections)); + + options->addOption("--batch-size", + "maximum size for individual data batches (in bytes)", + new UInt64Parameter(&_chunkSize)); + + options->addOption("--include-system-collections", + "include system collections", + new BooleanParameter(&_includeSystemCollections)); + + options->addOption("--create-database", + "create the target database if it does not exist", + new BooleanParameter(&_createDatabase)); + + options->addOption("--input-directory", "input directory", + new StringParameter(&_inputDirectory)); + + options->addOption("--import-data", "import data into collection", + new BooleanParameter(&_importData)); + + options->addOption("--create-collection", "create collection structure", + new BooleanParameter(&_importStructure)); + + options->addOption("--progress", "show progress", + new BooleanParameter(&_progress)); + + options->addOption("--overwrite", "overwrite collections if they exist", + new BooleanParameter(&_overwrite, false)); + + options->addOption("--recycle-ids", + "recycle collection and revision ids from dump", + new BooleanParameter(&_recycleIds)); + + options->addOption("--default-number-of-shards", + "default value for numberOfShards if not specified", + new UInt64Parameter(&_defaultNumberOfShards)); + + options->addOption( + "--force", "continue restore even in the face of some server-side errors", + new BooleanParameter(&_force, false)); +} + +void ArangorestoreFeature::validateOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + auto const& positionals = options->processingResult()._positionals; + size_t n = positionals.size(); + + if (1 == n) { + _inputDirectory = positionals[0]; + } else if (1 < n) { + LOG(ERR) << "expecting at most one directory, got " + + StringUtils::join(positionals, ", "); + abortInvalidParameters(); + } + + // use a minimum value for batches + if (_chunkSize < 1024 * 128) { + _chunkSize = 1024 * 128; + } +} + +void ArangorestoreFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + + if (!_inputDirectory.empty() && + _inputDirectory.back() == TRI_DIR_SEPARATOR_CHAR) { + // trim trailing slash from path because it may cause problems on ... + // Windows + TRI_ASSERT(_inputDirectory.size() > 0); + _inputDirectory.pop_back(); + } + + // ............................................................................. + // check input directory + // ............................................................................. + + if (_inputDirectory == "" || !TRI_IsDirectory(_inputDirectory.c_str())) { + LOG(FATAL) << "input directory '" << _inputDirectory << "' does not exist"; + FATAL_ERROR_EXIT(); + } + + if (!_importStructure && !_importData) { + LOG(FATAL) + << "Error: must specify either --create-collection or --import-data"; + FATAL_ERROR_EXIT(); + } +} + +int ArangorestoreFeature::tryCreateDatabase(ClientFeature* client, + std::string const& name) { + VPackBuilder builder; + builder.openObject(); + builder.add("name", VPackValue(name)); + builder.add("users", VPackValue(VPackValueType::Array)); + builder.openObject(); + builder.add("username", VPackValue(client->username())); + builder.add("passwd", VPackValue(client->password())); + builder.close(); + builder.close(); + + std::string const body = builder.slice().toJson(); + + std::unique_ptr response( + _httpClient->request(HttpRequest::HTTP_REQUEST_POST, "/_api/database", + body.c_str(), body.size())); + + if (response == nullptr || !response->isComplete()) { + return TRI_ERROR_INTERNAL; + } + + auto returnCode = response->getHttpReturnCode(); + + if (returnCode == HttpResponse::OK || returnCode == HttpResponse::CREATED) { + // all ok + return TRI_ERROR_NO_ERROR; + } else if (returnCode == HttpResponse::UNAUTHORIZED || + returnCode == HttpResponse::FORBIDDEN) { + // invalid authorization + _httpClient->setErrorMessage(getHttpErrorMessage(response.get(), nullptr), + false); + return TRI_ERROR_FORBIDDEN; + } + + // any other error + _httpClient->setErrorMessage(getHttpErrorMessage(response.get(), nullptr), + false); + return TRI_ERROR_INTERNAL; +} + +int ArangorestoreFeature::sendRestoreCollection(VPackSlice const& slice, + std::string const& name, + std::string& errorMsg) { + std::string url = + "/_api/replication/restore-collection" + "?overwrite=" + + std::string(_overwrite ? "true" : "false") + "&recycleIds=" + + std::string(_recycleIds ? "true" : "false") + "&force=" + + std::string(_force ? "true" : "false"); + + if (_clusterMode && + !slice.hasKey(std::vector({"parameters", "shards"})) && + !slice.hasKey( + std::vector({"parameters", "numberOfShards"}))) { + // no "shards" and no "numberOfShards" attribute present. now assume + // default value from --default-number-of-shards + std::cerr << "# no sharding information specified for collection '" << name + << "', using default number of shards " << _defaultNumberOfShards + << std::endl; + url += "&numberOfShards=" + std::to_string(_defaultNumberOfShards); + } + + std::string const body = slice.toJson(); + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size())); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + int err; + errorMsg = getHttpErrorMessage(response.get(), &err); + + if (err != TRI_ERROR_NO_ERROR) { + return err; + } + + return TRI_ERROR_INTERNAL; + } + + return TRI_ERROR_NO_ERROR; +} + +int ArangorestoreFeature::sendRestoreIndexes(VPackSlice const& slice, + std::string& errorMsg) { + std::string const url = "/_api/replication/restore-indexes?force=" + + std::string(_force ? "true" : "false"); + std::string const body = slice.toJson(); + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size())); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + int err; + errorMsg = getHttpErrorMessage(response.get(), &err); + + if (err != TRI_ERROR_NO_ERROR) { + return err; + } + + return TRI_ERROR_INTERNAL; + } + + return TRI_ERROR_NO_ERROR; +} + +int ArangorestoreFeature::sendRestoreData(std::string const& cname, + char const* buffer, size_t bufferSize, + std::string& errorMsg) { + std::string const url = "/_api/replication/restore-data?collection=" + + StringUtils::urlEncode(cname) + "&recycleIds=" + + (_recycleIds ? "true" : "false") + "&force=" + + (_force ? "true" : "false"); + + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_PUT, url, buffer, bufferSize)); + + if (response == nullptr || !response->isComplete()) { + errorMsg = + "got invalid response from server: " + _httpClient->getErrorMessage(); + + return TRI_ERROR_INTERNAL; + } + + if (response->wasHttpError()) { + int err; + errorMsg = getHttpErrorMessage(response.get(), &err); + + if (err != TRI_ERROR_NO_ERROR) { + return err; + } + + return TRI_ERROR_INTERNAL; + } + + return TRI_ERROR_NO_ERROR; +} + +static bool SortCollections(VPackSlice const& l, VPackSlice const& r) { + VPackSlice const& left = l.get("parameters"); + VPackSlice const& right = r.get("parameters"); + + int leftType = + arangodb::basics::VelocyPackHelper::getNumericValue(left, "type", 0); + int rightType = arangodb::basics::VelocyPackHelper::getNumericValue( + right, "type", 0); + + if (leftType != rightType) { + return leftType < rightType; + } + + std::string leftName = + arangodb::basics::VelocyPackHelper::getStringValue(left, "name", ""); + std::string rightName = + arangodb::basics::VelocyPackHelper::getStringValue(right, "name", ""); + + return strcasecmp(leftName.c_str(), rightName.c_str()) < 0; +} + +int ArangorestoreFeature::processInputDirectory(std::string& errorMsg) { + // create a lookup table for collections + std::map restrictList; + for (size_t i = 0; i < _collections.size(); ++i) { + restrictList.insert(std::pair(_collections[i], true)); + } + try { + std::vector const files = + FileUtils::listFiles(_inputDirectory); + std::string const suffix = std::string(".structure.json"); + std::vector> collectionBuilders; + std::vector collections; + + // Step 1 determine all collections to process + { + // loop over all files in InputDirectory, and look for all structure.json + // files + for (std::string const& file : files) { + size_t const nameLength = file.size(); + + if (nameLength <= suffix.size() || + file.substr(file.size() - suffix.size()) != suffix) { + // some other file + continue; + } + + // found a structure.json file + std::string name = file.substr(0, file.size() - suffix.size()); + + if (!_includeSystemCollections && name[0] == '_') { + continue; + } + + std::string const fqn = _inputDirectory + TRI_DIR_SEPARATOR_STR + file; + std::shared_ptr fileContentBuilder = + arangodb::basics::VelocyPackHelper::velocyPackFromFile(fqn); + VPackSlice const fileContent = fileContentBuilder->slice(); + + if (!fileContent.isObject()) { + errorMsg = "could not read collection structure file '" + fqn + "'"; + return TRI_ERROR_INTERNAL; + } + + VPackSlice const parameters = fileContent.get("parameters"); + VPackSlice const indexes = fileContent.get("indexes"); + + if (!parameters.isObject() || !indexes.isArray()) { + errorMsg = "could not read collection structure file '" + fqn + "'"; + return TRI_ERROR_INTERNAL; + } + + std::string const cname = + arangodb::basics::VelocyPackHelper::getStringValue(parameters, + "name", ""); + + bool overwriteName = false; + + if (cname != name && + name != + (cname + "_" + arangodb::rest::SslInterface::sslMD5(cname))) { + // file has a different name than found in structure file + if (_importStructure) { + // we cannot go on if there is a mismatch + errorMsg = + "collection name mismatch in collection structure file '" + + fqn + "' (offending value: '" + cname + "')"; + return TRI_ERROR_INTERNAL; + } else { + // we can patch the name in our array and go on + std::cout << "ignoring collection name mismatch in collection " + "structure file '" + + fqn + "' (offending value: '" + cname + "')" + << std::endl; + + overwriteName = true; + } + } + + if (!restrictList.empty() && + restrictList.find(cname) == restrictList.end()) { + // collection name not in list + continue; + } + + if (overwriteName) { + // TODO MAX + // Situation: + // Ich habe ein Json-Object von Datei (teile des Inhalts im Zweifel + // unbekannt) + // Es gibt ein Sub-Json-Object "parameters" mit einem Attribute "name" + // der gesetzt ist. + // Ich muss nur diesen namen überschreiben, der Rest soll identisch + // bleiben. + } else { + collectionBuilders.emplace_back(fileContentBuilder); + collections.emplace_back(fileContent); + } + } + } + + std::sort(collections.begin(), collections.end(), SortCollections); + + StringBuffer buffer(TRI_UNKNOWN_MEM_ZONE); + + // step2: run the actual import + for (VPackSlice const& collection : collections) { + VPackSlice const parameters = collection.get("parameters"); + VPackSlice const indexes = collection.get("indexes"); + std::string const cname = + arangodb::basics::VelocyPackHelper::getStringValue(parameters, "name", + ""); + int type = arangodb::basics::VelocyPackHelper::getNumericValue( + parameters, "type", 2); + + std::string const collectionType(type == 2 ? "document" : "edge"); + + if (_importStructure) { + // re-create collection + if (_progress) { + if (_overwrite) { + std::cout << "# Re-creating " << collectionType << " collection '" + << cname << "'..." << std::endl; + } else { + std::cout << "# Creating " << collectionType << " collection '" + << cname << "'..." << std::endl; + } + } + + int res = sendRestoreCollection(collection, cname, errorMsg); + + if (res != TRI_ERROR_NO_ERROR) { + if (_force) { + std::cerr << errorMsg << std::endl; + continue; + } + return TRI_ERROR_INTERNAL; + } + } + _stats._totalCollections++; + + if (_importData) { + // import data. check if we have a datafile + std::string datafile = + _inputDirectory + TRI_DIR_SEPARATOR_STR + cname + "_" + + arangodb::rest::SslInterface::sslMD5(cname) + ".data.json"; + if (!TRI_ExistsFile(datafile.c_str())) { + datafile = + _inputDirectory + TRI_DIR_SEPARATOR_STR + cname + ".data.json"; + } + + if (TRI_ExistsFile(datafile.c_str())) { + // found a datafile + + if (_progress) { + std::cout << "# Loading data into " << collectionType + << " collection '" << cname << "'..." << std::endl; + } + + int fd = TRI_OPEN(datafile.c_str(), O_RDONLY | TRI_O_CLOEXEC); + + if (fd < 0) { + errorMsg = "cannot open collection data file '" + datafile + "'"; + + return TRI_ERROR_INTERNAL; + } + + buffer.clear(); + + while (true) { + if (buffer.reserve(16384) != TRI_ERROR_NO_ERROR) { + TRI_CLOSE(fd); + errorMsg = "out of memory"; + + return TRI_ERROR_OUT_OF_MEMORY; + } + + ssize_t numRead = TRI_READ(fd, buffer.end(), 16384); + + if (numRead < 0) { + // error while reading + int res = TRI_errno(); + TRI_CLOSE(fd); + errorMsg = std::string(TRI_errno_string(res)); + + return res; + } + + // read something + buffer.increaseLength(numRead); + + _stats._totalRead += (uint64_t)numRead; + + if (buffer.length() < _chunkSize && numRead > 0) { + // still continue reading + continue; + } + + // do we have a buffer? + if (buffer.length() > 0) { + // look for the last \n in the buffer + char* found = (char*)memrchr((const void*)buffer.begin(), '\n', + buffer.length()); + size_t length; + + if (found == nullptr) { + // no \n found... + if (numRead == 0) { + // we're at the end. send the complete buffer anyway + length = buffer.length(); + } else { + // read more + continue; + } + } else { + // found a \n somewhere + length = found - buffer.begin(); + } + + TRI_ASSERT(length > 0); + + _stats._totalBatches++; + + int res = + sendRestoreData(cname, buffer.begin(), length, errorMsg); + + if (res != TRI_ERROR_NO_ERROR) { + TRI_CLOSE(fd); + if (errorMsg.empty()) { + errorMsg = std::string(TRI_errno_string(res)); + } else { + errorMsg = + std::string(TRI_errno_string(res)) + ": " + errorMsg; + } + + if (_force) { + std::cerr << errorMsg << std::endl; + continue; + } + + return res; + } + + buffer.erase_front(length); + } + + if (numRead == 0) { + // EOF + break; + } + } + + TRI_CLOSE(fd); + } + } + + if (_importStructure) { + // re-create indexes + if (indexes.length() > 0) { + // we actually have indexes + if (_progress) { + std::cout << "# Creating indexes for collection '" << cname + << "'..." << std::endl; + } + + int res = sendRestoreIndexes(collection, errorMsg); + + if (res != TRI_ERROR_NO_ERROR) { + if (_force) { + std::cerr << errorMsg << std::endl; + continue; + } + return TRI_ERROR_INTERNAL; + } + } + } + } + } catch (...) { + errorMsg = "out of memory"; + return TRI_ERROR_OUT_OF_MEMORY; + } + return TRI_ERROR_NO_ERROR; +} + +void ArangorestoreFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + + int ret = EXIT_SUCCESS; + *_result = ret; + + try { + _httpClient = client->createHttpClient(); + } catch (...) { + LOG(FATAL) << "cannot create server connection, giving up!"; + FATAL_ERROR_EXIT(); + } + + std::string dbName = client->databaseName(); + + _httpClient->setLocationRewriter((void*)client, &rewriteLocation); + _httpClient->setUserNamePassword("/", client->username(), client->password()); + + int err; + std::string versionString = getArangoVersion(&err); + + if (_createDatabase && err == TRI_ERROR_ARANGO_DATABASE_NOT_FOUND) { + // database not found, but database creation requested + std::cout << "Creating database '" << dbName << "'" << std::endl; + + client->setDatabaseName("_system"); + + int res = tryCreateDatabase(client, dbName); + + if (res != TRI_ERROR_NO_ERROR) { + LOG(ERR) << "Could not create database '" << dbName << "'"; + LOG(FATAL) << _httpClient->getErrorMessage() << "'"; + FATAL_ERROR_EXIT(); + } + + // restore old database name + client->setDatabaseName(dbName); + + // re-fetch version + versionString = getArangoVersion(nullptr); + } + + if (!_httpClient->isConnected()) { + LOG(ERR) << "Could not connect to endpoint " + << _httpClient->getEndpointSpecification(); + LOG(FATAL) << _httpClient->getErrorMessage() << "'"; + FATAL_ERROR_EXIT(); + } + + // successfully connected + std::cout << "Server version: " << versionString << std::endl; + + // validate server version + int major = 0; + int minor = 0; + + if (sscanf(versionString.c_str(), "%d.%d", &major, &minor) != 2) { + LOG(FATAL) << "Error: invalid server version '" << versionString << "'"; + FATAL_ERROR_EXIT(); + } + + if (major != 3) { + // we can connect to 3.x + LOG(ERR) << "got incompatible server version '" << versionString << "'"; + + if (!_force) { + LOG(FATAL) << "giving up!"; + FATAL_ERROR_EXIT(); + } + } + + if (major >= 2) { + // Version 1.4 did not yet have a cluster mode + _clusterMode = getArangoIsCluster(nullptr); + } + + if (_progress) { + std::cout << "# Connected to ArangoDB '" + << _httpClient->getEndpointSpecification() << "'" << std::endl; + } + + memset(&_stats, 0, sizeof(_stats)); + + std::string errorMsg = ""; + + int res; + try { + res = processInputDirectory(errorMsg); + } catch (std::exception const& ex) { + LOG(ERR) << "caught exception " << ex.what(); + res = TRI_ERROR_INTERNAL; + } catch (...) { + LOG(ERR) << "Error: caught unknown exception"; + res = TRI_ERROR_INTERNAL; + } + + if (res != TRI_ERROR_NO_ERROR) { + if (!errorMsg.empty()) { + LOG(ERR) << errorMsg; + } else { + LOG(ERR) << "An error occurred"; + } + ret = EXIT_FAILURE; + } + + if (_progress) { + if (_importData) { + std::cout << "Processed " << _stats._totalCollections + << " collection(s), " + << "read " << _stats._totalRead << " byte(s) from datafiles, " + << "sent " << _stats._totalBatches << " batch(es)" << std::endl; + } else if (_importStructure) { + std::cout << "Processed " << _stats._totalCollections << " collection(s)" + << std::endl; + } + } +} diff --git a/arangosh/Restore/ArangorestoreFeature.h b/arangosh/Restore/ArangorestoreFeature.h new file mode 100644 index 0000000000..f41da10ae3 --- /dev/null +++ b/arangosh/Restore/ArangorestoreFeature.h @@ -0,0 +1,87 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H +#define APPLICATION_FEATURES_ARANGORESTORE_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/VelocyPackHelper.h" +#include "V8Client/ArangoClientHelper.h" + +namespace arangodb { +namespace httpclient { +class SimpleHttpResult; +} + +class ArangorestoreFeature final + : public application_features::ApplicationFeature, + public ArangoClientHelper { + public: + ArangorestoreFeature(application_features::ApplicationServer* server, + int* result); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + void prepare() override; + void start() override; + + private: + std::vector _collections; + uint64_t _chunkSize; + bool _includeSystemCollections; + bool _createDatabase; + std::string _inputDirectory; + bool _importData; + bool _importStructure; + bool _progress; + bool _overwrite; + bool _recycleIds; + bool _force; + bool _clusterMode; + uint64_t _defaultNumberOfShards; + + private: + int tryCreateDatabase(ClientFeature*, std::string const& name); + int sendRestoreCollection(VPackSlice const& slice, std::string const& name, + std::string& errorMsg); + int sendRestoreIndexes(VPackSlice const& slice, std::string& errorMsg); + int sendRestoreData(std::string const& cname, char const* buffer, + size_t bufferSize, std::string& errorMsg); + int processInputDirectory(std::string& errorMsg); + + private: + int* _result; + + // statistics + struct { + uint64_t _totalBatches; + uint64_t _totalCollections; + uint64_t _totalRead; + } _stats; +}; +} + +#endif diff --git a/arangosh/Restore/arangorestore.cpp b/arangosh/Restore/arangorestore.cpp new file mode 100644 index 0000000000..fea559d32e --- /dev/null +++ b/arangosh/Restore/arangorestore.cpp @@ -0,0 +1,66 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "Basics/Common.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConfigFeature.h" +#include "ApplicationFeatures/LoggerFeature.h" +#include "ApplicationFeatures/ShutdownFeature.h" +#include "ApplicationFeatures/TempFeature.h" +#include "Restore/ArangorestoreFeature.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/InitializeRest.h" + +using namespace arangodb; +using namespace arangodb::application_features; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief main +//////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char* argv[]) { + ADB_WindowsEntryFunction(); + TRIAGENS_REST_INITIALIZE(); + + std::shared_ptr options(new options::ProgramOptions( + argv[0], "Usage: arangorestore []", "For more information use:")); + + ApplicationServer server(options); + + int ret; + + server.addFeature(new LoggerFeature(&server)); + server.addFeature(new TempFeature(&server, "arangorestore")); + server.addFeature(new ConfigFeature(&server, "arangorestore")); + server.addFeature(new ClientFeature(&server)); + server.addFeature(new ArangorestoreFeature(&server, &ret)); + server.addFeature(new ShutdownFeature(&server, "ArangorestoreFeature")); + + server.run(argc, argv); + + TRIAGENS_REST_SHUTDOWN; + ADB_WindowsExitFunction(ret, nullptr); + + return ret; +} diff --git a/arangosh/Shell/ArangoshFeature.cpp b/arangosh/Shell/ArangoshFeature.cpp new file mode 100644 index 0000000000..2796370ddf --- /dev/null +++ b/arangosh/Shell/ArangoshFeature.cpp @@ -0,0 +1,182 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangoshFeature.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Shell/V8ShellFeature.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::options; + +ArangoshFeature::ArangoshFeature( + application_features::ApplicationServer* server, int* result) + : ApplicationFeature(server, "ArangoshFeature"), + _jslint(), + _result(result), + _runMode(RunMode::INTERACTIVE) { + requiresElevatedPrivileges(false); + setOptional(false); + startsAfter("ConfigFeature"); + startsAfter("LanguageFeature"); + startsAfter("LoggerFeature"); + startsAfter("V8ShellFeature"); +} + +void ArangoshFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption("--jslint", "do not start as shell, run jslint instead", + new VectorParameter(&_jslint)); + + options->addSection("javascript", "Configure the Javascript engine"); + + options->addOption("--javascript.execute", + "execute Javascript code from file", + new VectorParameter(&_executeScripts)); + + options->addOption("--javascript.execute-string", + "execute Javascript code from string", + new VectorParameter(&_executeStrings)); + + options->addOption("--javascript.check-syntax", + "syntax check code Javascript code from file", + new VectorParameter(&_checkSyntaxFiles)); + + options->addOption("--javascript.unit-tests", + "do not start as shell, run unit tests instead", + new VectorParameter(&_unitTests)); +} + +void ArangoshFeature::validateOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + _positionals = options->processingResult()._positionals; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + + ConsoleFeature* console = + dynamic_cast(server()->feature("ConsoleFeature")); + + if (client->endpoint() == "none") { + client->disable(); + } + + if (!_jslint.empty()) { + client->disable(); + } + + size_t n = 0; + + _runMode = RunMode::INTERACTIVE; + + if (!_executeScripts.empty()) { + console->setQuiet(true); + _runMode = RunMode::EXECUTE_SCRIPT; + ++n; + } + + if (!_executeStrings.empty()) { + console->setQuiet(true); + _runMode = RunMode::EXECUTE_STRING; + ++n; + } + + if (!_checkSyntaxFiles.empty()) { + console->setQuiet(true); + _runMode = RunMode::CHECK_SYNTAX; + ++n; + } + + if (!_unitTests.empty()) { + console->setQuiet(true); + _runMode = RunMode::UNIT_TESTS; + ++n; + } + + if (!_jslint.empty()) { + console->setQuiet(true); + _runMode = RunMode::JSLINT; + ++n; + } + + if (1 < n) { + LOG(ERR) << "you cannot specify more than one type (" + << "jslint, execute, execute-string, check-syntax, unit-tests)"; + } +} + +void ArangoshFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + *_result = EXIT_FAILURE; + + V8ShellFeature* shell = + dynamic_cast(server()->feature("V8ShellFeature")); + + bool ok = false; + + try { + switch (_runMode) { + case RunMode::INTERACTIVE: + ok = shell->runShell(_positionals); + break; + + case RunMode::EXECUTE_SCRIPT: + ok = shell->runScript(_executeScripts, _positionals, true); + break; + + case RunMode::EXECUTE_STRING: + ok = shell->runString(_executeStrings, _positionals); + break; + + case RunMode::CHECK_SYNTAX: + ok = shell->runScript(_checkSyntaxFiles, _positionals, false); + break; + + case RunMode::UNIT_TESTS: + ok = shell->runUnitTests(_unitTests, _positionals); + break; + + case RunMode::JSLINT: + ok = shell->jslint(_jslint); + break; + } + } catch (std::exception const& ex) { + LOG(ERR) << "caught exception " << ex.what(); + ok = false; + } catch (...) { + LOG(ERR) << "caught unknown exception"; + ok = false; + } + + *_result = ok ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/arangosh/Shell/ArangoshFeature.h b/arangosh/Shell/ArangoshFeature.h new file mode 100644 index 0000000000..3d47612406 --- /dev/null +++ b/arangosh/Shell/ArangoshFeature.h @@ -0,0 +1,63 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGOSH_FEATURE_H +#define APPLICATION_FEATURES_ARANGOSH_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class ArangoshFeature final : public application_features::ApplicationFeature { + public: + ArangoshFeature(application_features::ApplicationServer* server, int* result); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + void start() override; + + private: + std::vector _jslint; + std::vector _executeScripts; + std::vector _executeStrings; + std::vector _checkSyntaxFiles; + std::vector _unitTests; + + public: + enum class RunMode { + INTERACTIVE, + EXECUTE_SCRIPT, + EXECUTE_STRING, + CHECK_SYNTAX, + UNIT_TESTS, + JSLINT + }; + + private: + int* _result; + RunMode _runMode; + std::vector _positionals; +}; +} + +#endif diff --git a/arangosh/Shell/V8ClientConnection.cpp b/arangosh/Shell/V8ClientConnection.cpp new file mode 100644 index 0000000000..dec359fbe7 --- /dev/null +++ b/arangosh/Shell/V8ClientConnection.cpp @@ -0,0 +1,1677 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Achim Brandt +//////////////////////////////////////////////////////////////////////////////// + +#include "V8ClientConnection.h" + +#include +#include + +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConsoleFeature.h" +#include "Basics/FileUtils.h" +#include "Basics/StringUtils.h" +#include "Basics/VelocyPackHelper.h" +#include "Import/ImportHelper.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" +#include "SimpleHttpClient/SimpleHttpResult.h" +#include "V8/v8-conv.h" +#include "V8/v8-json.h" +#include "V8/v8-utils.h" + +using namespace arangodb; +using namespace arangodb::application_features; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::import; +using namespace arangodb::rest; + +V8ClientConnection::V8ClientConnection( + std::unique_ptr& connection, + std::string const& database, std::string const& username, + std::string const& password, double requestTimeout) + : _databaseName(database), + _username(username), + _password(password), + _requestTimeout(requestTimeout), + _client(nullptr), + _lastHttpReturnCode(0), + _lastErrorMessage(""), + _httpResult(nullptr), + _version("arango"), + _mode("unknown mode") { + init(connection); +} + +V8ClientConnection::~V8ClientConnection() {} + +void V8ClientConnection::init( + std::unique_ptr& connection) { + _client.reset(new SimpleHttpClient(connection, _requestTimeout, false)); + _client->setLocationRewriter(this, &rewriteLocation); + _client->setUserNamePassword("/", _username, _password); + + // connect to server and get version number + std::map headerFields; + std::unique_ptr result( + _client->request(HttpRequest::HTTP_REQUEST_GET, + "/_api/version?details=true", nullptr, 0, headerFields)); + + if (result.get() == nullptr || !result->isComplete()) { + // save error message + _lastErrorMessage = _client->getErrorMessage(); + _lastHttpReturnCode = 500; + } else { + _lastHttpReturnCode = result->getHttpReturnCode(); + + if (result->getHttpReturnCode() == HttpResponse::OK) { + try { + std::shared_ptr parsedBody = result->getBodyVelocyPack(); + VPackSlice const body = parsedBody->slice(); + std::string const server = + VelocyPackHelper::getStringValue(body, "server", ""); + + // "server" value is a string and content is "arango" + if (server == "arango") { + // look up "version" value + _version = VelocyPackHelper::getStringValue(body, "version", ""); + VPackSlice const details = body.get("details"); + if (details.isObject()) { + VPackSlice const mode = details.get("mode"); + if (mode.isString()) { + _mode = mode.copyString(); + } + } + } + } catch (...) { + // Ignore all parse errors + } + } else { + // initial request for /_api/version returned some non-HTTP 200 response. + // now set up an error message + _lastErrorMessage = _client->getErrorMessage(); + + if (result->getHttpReturnCode() > 0) { + _lastErrorMessage = StringUtils::itoa(result->getHttpReturnCode()) + + ": " + result->getHttpReturnMessage(); + } + } + } +} + +std::string V8ClientConnection::rewriteLocation(void* data, + std::string const& location) { + V8ClientConnection* c = static_cast(data); + + TRI_ASSERT(c != nullptr); + + if (c->_databaseName.empty()) { + // no database name provided + return location; + } + + if (location[0] == '/') { + if (location.size() >= 5 && location[1] == '_' && location[2] == 'd' && + location[3] == 'b' && location[4] == '/') { + // location already contains /_db/ + return location; + } + + return "/_db/" + c->_databaseName + location; + } + + return "/_db/" + c->_databaseName + "/" + location; +} + +void V8ClientConnection::setInterrupted(bool value) { + _client->setInterrupted(value); +} + +bool V8ClientConnection::isConnected() { return _client->isConnected(); } + +std::string V8ClientConnection::endpointSpecification() const { + return _client->getEndpointSpecification(); +} + +void V8ClientConnection::reconnect(ClientFeature* client) { + try { + std::unique_ptr connection = + client->createConnection(client->endpoint()); + init(connection); + } catch (...) { + std::string errorMessage = "error in '" + client->endpoint() + "'"; + throw errorMessage; + } + + if (isConnected() && _lastHttpReturnCode == HttpResponse::OK) { + LOG(INFO) << "Connected to ArangoDB " + << "'" << endpointSpecification() << "', " + << "version " << _version << " [" << _mode << "], " + << "database '" << _databaseName << "', " + << "username: '" << _username << "'"; + } else { + LOG(ERR) << "Could not connect to endpoint '" << client->endpoint() + << "', username: '" << client->username() << "'"; + + std::string errorMsg = "could not connect"; + + if (!_lastErrorMessage.empty()) { + errorMsg = _lastErrorMessage; + } + + throw errorMsg; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief enum for wrapped V8 objects +//////////////////////////////////////////////////////////////////////////////// + +enum WRAP_CLASS_TYPES { WRAP_TYPE_CONNECTION = 1 }; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief map of connection objects +//////////////////////////////////////////////////////////////////////////////// + +static std::unordered_map> Connections; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief object template for the initial connection +//////////////////////////////////////////////////////////////////////////////// + +static v8::Persistent ConnectionTempl; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief copies v8::Object to std::map +//////////////////////////////////////////////////////////////////////////////// + +static void ObjectToMap(v8::Isolate* isolate, + std::map& myMap, + v8::Handle val) { + v8::Local v8Headers = val.As(); + + if (v8Headers->IsObject()) { + v8::Local const props = v8Headers->GetPropertyNames(); + + for (uint32_t i = 0; i < props->Length(); i++) { + v8::Local key = props->Get(v8::Integer::New(isolate, i)); + myMap.emplace(TRI_ObjectToString(key), + TRI_ObjectToString(v8Headers->Get(key))); + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief weak reference callback for queries (call the destructor here) +//////////////////////////////////////////////////////////////////////////////// + +static void DestroyV8ClientConnection(V8ClientConnection* v8connection) { + TRI_ASSERT(v8connection != nullptr); + + auto it = Connections.find(v8connection); + + if (it != Connections.end()) { + (*it).second.Reset(); + Connections.erase(it); + } + + delete v8connection; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns a new client connection instance +//////////////////////////////////////////////////////////////////////////////// + +static V8ClientConnection* CreateV8ClientConnection( + std::unique_ptr& connection, + ClientFeature* client) { + return new V8ClientConnection(connection, client->databaseName(), + client->username(), client->password(), + client->requestTimeout()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief weak reference callback for queries (call the destructor here) +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_DestructorCallback( + const v8::WeakCallbackData>& + data) { + auto persistent = data.GetParameter(); + auto myConnection = + v8::Local::New(data.GetIsolate(), *persistent); + auto v8connection = static_cast(myConnection->Value()); + + DestroyV8ClientConnection(v8connection); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief wrap V8ClientConnection in a v8::Object +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle WrapV8ClientConnection( + v8::Isolate* isolate, V8ClientConnection* v8connection) { + v8::EscapableHandleScope scope(isolate); + auto localConnectionTempl = + v8::Local::New(isolate, ConnectionTempl); + v8::Local result = localConnectionTempl->NewInstance(); + + auto myConnection = v8::External::New(isolate, v8connection); + result->SetInternalField(SLOT_CLASS_TYPE, + v8::Integer::New(isolate, WRAP_TYPE_CONNECTION)); + result->SetInternalField(SLOT_CLASS, myConnection); + Connections[v8connection].Reset(isolate, myConnection); + Connections[v8connection].SetWeak(&Connections[v8connection], + ClientConnection_DestructorCallback); + return scope.Escape(result); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection constructor +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_ConstructorCallback( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + std::unique_ptr connection; + + try { + if (args.Length() > 0 && args[0]->IsString()) { + std::string definition = TRI_ObjectToString(args[0]); + connection = client->createConnection(definition); + } else { + connection = client->createConnection(); + } + } catch (...) { + TRI_V8_THROW_EXCEPTION_PARAMETER("cannot connect to client"); + } + + std::unique_ptr v8connection( + CreateV8ClientConnection(connection, client)); + + if (v8connection->isConnected() && + v8connection->lastHttpReturnCode() == HttpResponse::OK) { + LOG(INFO) << "Connected to ArangoDB " + << "'" << v8connection->endpointSpecification() << "', " + << "version " << v8connection->version() << " [" + << v8connection->mode() << "], " + << "database '" << v8connection->databaseName() << "', " + << "username: '" << v8connection->username() << "'"; + + } else { + std::string errorMessage = + "Could not connect. Error message: " + v8connection->lastErrorMessage(); + + TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT, + errorMessage.c_str()); + } + + TRI_V8_RETURN(WrapV8ClientConnection(isolate, v8connection.release())); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "reconnect" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_reconnect( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + if (v8connection == nullptr || client == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() < 2) { + TRI_V8_THROW_EXCEPTION_USAGE( + "reconnect(, , [, , ])"); + } + + std::string const endpoint = TRI_ObjectToString(args[0]); + std::string databaseName = TRI_ObjectToString(args[1]); + + std::string username; + + if (args.Length() < 3) { + username = client->username(); + } else { + username = TRI_ObjectToString(args[2]); + } + + std::string password; + + if (args.Length() < 4) { + ConsoleFeature* console = dynamic_cast( + ApplicationServer::lookupFeature("ConsoleFeature")); + + if (console == nullptr || !console->isEnabled()) { + std::cout << "Please specify a password: " << std::flush; + getline(std::cin, password); + } else { + password = console->readPassword("Please specify a password: "); + } + } else { + password = TRI_ObjectToString(args[3]); + } + + client->setEndpoint(endpoint); + client->setDatabaseName(databaseName); + client->setUsername(username); + client->setPassword(password); + + try { + v8connection->reconnect(client); + } catch (std::string const& errorMessage) { + TRI_V8_THROW_EXCEPTION_PARAMETER(errorMessage.c_str()); + } catch (...) { + std::string errorMessage = "error in '" + endpoint + "'"; + TRI_V8_THROW_EXCEPTION_PARAMETER(errorMessage.c_str()); + } + + TRI_V8_RETURN_TRUE(); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "GET" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpGetAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("get([, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + // check header fields + std::map headerFields; + + if (args.Length() > 1) { + ObjectToMap(isolate, headerFields, args[1]); + } + + TRI_V8_RETURN(v8connection->getData(isolate, *url, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "GET" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpGet( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpGetAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "GET_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpGetRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpGetAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "HEAD" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpHeadAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("head([, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + + // check header fields + std::map headerFields; + + if (args.Length() > 1) { + ObjectToMap(isolate, headerFields, args[1]); + } + + TRI_V8_RETURN(v8connection->headData(isolate, *url, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "HEAD" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpHead( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpHeadAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "HEAD_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpHeadRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpHeadAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "DELETE" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpDeleteAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("delete([, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + + // check header fields + std::map headerFields; + + if (args.Length() > 1) { + ObjectToMap(isolate, headerFields, args[1]); + } + + TRI_V8_RETURN(v8connection->deleteData(isolate, *url, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "DELETE" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpDelete( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpDeleteAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "DELETE_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpDeleteRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpDeleteAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "OPTIONS" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpOptionsAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || + !args[1]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("options(, [, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + v8::String::Utf8Value body(args[1]); + + // check header fields + std::map headerFields; + + if (args.Length() > 2) { + ObjectToMap(isolate, headerFields, args[2]); + } + + TRI_V8_RETURN( + v8connection->optionsData(isolate, *url, *body, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "OPTIONS" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpOptions( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpOptionsAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "OPTIONS_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpOptionsRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpOptionsAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "POST" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPostAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || + !args[1]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("post(, [, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + v8::String::Utf8Value body(args[1]); + + // check header fields + std::map headerFields; + + if (args.Length() > 2) { + ObjectToMap(isolate, headerFields, args[2]); + } + + TRI_V8_RETURN( + v8connection->postData(isolate, *url, *body, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "POST" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPost( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPostAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "POST_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPostRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPostAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PUT" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPutAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || + !args[1]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("put(, [, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + v8::String::Utf8Value body(args[1]); + + // check header fields + std::map headerFields; + + if (args.Length() > 2) { + ObjectToMap(isolate, headerFields, args[2]); + } + + TRI_V8_RETURN(v8connection->putData(isolate, *url, *body, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PUT" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPut( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPutAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PUT_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPutRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPutAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PATCH" helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPatchAny( + v8::FunctionCallbackInfo const& args, bool raw) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || + !args[1]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("patch(, [, ])"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + v8::String::Utf8Value body(args[1]); + + // check header fields + std::map headerFields; + + if (args.Length() > 2) { + ObjectToMap(isolate, headerFields, args[2]); + } + + TRI_V8_RETURN( + v8connection->patchData(isolate, *url, *body, headerFields, raw)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PATCH" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPatch( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPatchAny(args, false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "PATCH_RAW" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpPatchRaw( + v8::FunctionCallbackInfo const& args) { + ClientConnection_httpPatchAny(args, true); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection send file helper +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_httpSendFile( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("sendFile(, )"); + } + + TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); + + std::string const infile = TRI_ObjectToString(args[1]); + + if (!FileUtils::exists(infile)) { + TRI_V8_THROW_EXCEPTION(TRI_ERROR_FILE_NOT_FOUND); + } + + std::string body; + + try { + body = FileUtils::slurp(infile); + } catch (...) { + TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_errno(), "could not read file"); + } + + v8::TryCatch tryCatch; + + // check header fields + std::map headerFields; + + v8::Local result = + v8connection->postData(isolate, *url, body, headerFields); + + if (tryCatch.HasCaught()) { + isolate->ThrowException(tryCatch.Exception()); + return; + } + + TRI_V8_RETURN(result); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "getEndpoint" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_getEndpoint( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + if (v8connection == nullptr || client == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("getEndpoint()"); + } + + TRI_V8_RETURN_STD_STRING(client->endpoint()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief imports a CSV file +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t DefaultChunkSize = 1024 * 1024 * 4; + +static void ClientConnection_importCsv( + v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + if (args.Length() < 2) { + TRI_V8_THROW_EXCEPTION_USAGE( + "importCsvFile(, [, ])"); + } + + // extract the filename + v8::String::Utf8Value filename(args[0]); + + if (*filename == nullptr) { + TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); + } + + v8::String::Utf8Value collection(args[1]); + + if (*collection == nullptr) { + TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); + } + + // extract the options + v8::Handle separatorKey = TRI_V8_ASCII_STRING("separator"); + v8::Handle quoteKey = TRI_V8_ASCII_STRING("quote"); + + std::string separator = ","; + std::string quote = "\""; + + if (3 <= args.Length()) { + v8::Handle options = args[2]->ToObject(); + // separator + if (options->Has(separatorKey)) { + separator = TRI_ObjectToString(options->Get(separatorKey)); + + if (separator.length() < 1) { + TRI_V8_THROW_EXCEPTION_PARAMETER( + ".separator must be at least one character"); + } + } + + // quote + if (options->Has(quoteKey)) { + quote = TRI_ObjectToString(options->Get(quoteKey)); + + if (quote.length() > 1) { + TRI_V8_THROW_EXCEPTION_PARAMETER( + ".quote must be at most one character"); + } + } + } + + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + std::unique_ptr httpClient = + client->createHttpClient(v8connection->endpointSpecification()); + + ImportHelper ih(httpClient.get(), DefaultChunkSize); + + ih.setQuote(quote); + ih.setSeparator(separator.c_str()); + + std::string fileName = TRI_ObjectToString(args[0]); + std::string collectionName = TRI_ObjectToString(args[1]); + + if (ih.importDelimited(collectionName, fileName, ImportHelper::CSV)) { + v8::Handle result = v8::Object::New(isolate); + + result->Set(TRI_V8_ASCII_STRING("lines"), + v8::Integer::New(isolate, (int32_t)ih.getReadLines())); + + result->Set(TRI_V8_ASCII_STRING("created"), + v8::Integer::New(isolate, (int32_t)ih.getNumberCreated())); + + result->Set(TRI_V8_ASCII_STRING("errors"), + v8::Integer::New(isolate, (int32_t)ih.getNumberErrors())); + + result->Set(TRI_V8_ASCII_STRING("updated"), + v8::Integer::New(isolate, (int32_t)ih.getNumberUpdated())); + + result->Set(TRI_V8_ASCII_STRING("ignored"), + v8::Integer::New(isolate, (int32_t)ih.getNumberIgnored())); + + TRI_V8_RETURN(result); + } + + TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_FAILED, + ih.getErrorMessage().c_str()); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief imports a JSON file +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_importJson( + v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + if (args.Length() < 2) { + TRI_V8_THROW_EXCEPTION_USAGE("importJsonFile(, )"); + } + + // extract the filename + v8::String::Utf8Value filename(args[0]); + + if (*filename == nullptr) { + TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); + } + + v8::String::Utf8Value collection(args[1]); + + if (*collection == nullptr) { + TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); + } + + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + std::unique_ptr httpClient = + client->createHttpClient(v8connection->endpointSpecification()); + + ImportHelper ih(httpClient.get(), DefaultChunkSize); + + std::string fileName = TRI_ObjectToString(args[0]); + std::string collectionName = TRI_ObjectToString(args[1]); + + if (ih.importJson(collectionName, fileName)) { + v8::Handle result = v8::Object::New(isolate); + + result->Set(TRI_V8_ASCII_STRING("lines"), + v8::Integer::New(isolate, (int32_t)ih.getReadLines())); + + result->Set(TRI_V8_ASCII_STRING("created"), + v8::Integer::New(isolate, (int32_t)ih.getNumberCreated())); + + result->Set(TRI_V8_ASCII_STRING("errors"), + v8::Integer::New(isolate, (int32_t)ih.getNumberErrors())); + + result->Set(TRI_V8_ASCII_STRING("updated"), + v8::Integer::New(isolate, (int32_t)ih.getNumberUpdated())); + + result->Set(TRI_V8_ASCII_STRING("ignored"), + v8::Integer::New(isolate, (int32_t)ih.getNumberIgnored())); + + TRI_V8_RETURN(result); + } + + TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_FAILED, + ih.getErrorMessage().c_str()); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "lastError" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_lastHttpReturnCode( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("lastHttpReturnCode()"); + } + + TRI_V8_RETURN(v8::Integer::New(isolate, v8connection->lastHttpReturnCode())); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "lastErrorMessage" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_lastErrorMessage( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + // check params + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("lastErrorMessage()"); + } + + TRI_V8_RETURN_STD_STRING(v8connection->lastErrorMessage()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "isConnected" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_isConnected( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("isConnected()"); + } + + if (v8connection->isConnected()) { + TRI_V8_RETURN_TRUE(); + } else { + TRI_V8_RETURN_FALSE(); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "isConnected" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_toString( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("toString()"); + } + + std::string result = + "[object ArangoConnection:" + v8connection->endpointSpecification(); + + if (v8connection->isConnected()) { + result += "," + v8connection->version() + ",connected]"; + } else { + result += ",unconnected]"; + } + + TRI_V8_RETURN_STD_STRING(result); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "getVersion" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_getVersion( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("getVersion()"); + } + + TRI_V8_RETURN_STD_STRING(v8connection->version()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "getMode" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_getMode( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("getMode()"); + } + + TRI_V8_RETURN_STD_STRING(v8connection->mode()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "getDatabaseName" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_getDatabaseName( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + if (v8connection == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 0) { + TRI_V8_THROW_EXCEPTION_USAGE("getDatabaseName()"); + } + + TRI_V8_RETURN_STD_STRING(v8connection->databaseName()); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ClientConnection method "setDatabaseName" +//////////////////////////////////////////////////////////////////////////////// + +static void ClientConnection_setDatabaseName( + v8::FunctionCallbackInfo const& args) { + v8::Isolate* isolate = args.GetIsolate(); + v8::HandleScope scope(isolate); + + // get the connection + V8ClientConnection* v8connection = + TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ClientFeature* client = (ClientFeature*)(wrap->Value()); + + if (v8connection == nullptr || client == nullptr) { + TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); + } + + if (args.Length() != 1 || !args[0]->IsString()) { + TRI_V8_THROW_EXCEPTION_USAGE("setDatabaseName()"); + } + + std::string const dbName = TRI_ObjectToString(args[0]); + v8connection->setDatabaseName(dbName); + client->setDatabaseName(dbName); + + TRI_V8_RETURN_TRUE(); +} + +v8::Handle V8ClientConnection::getData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_GET, location, "", + headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_GET, location, "", + headerFields); +} + +v8::Handle V8ClientConnection::headData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_HEAD, location, "", + headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_HEAD, location, "", + headerFields); +} + +v8::Handle V8ClientConnection::deleteData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_DELETE, location, + "", headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_DELETE, location, "", + headerFields); +} + +v8::Handle V8ClientConnection::optionsData( + v8::Isolate* isolate, std::string const& location, std::string const& body, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_OPTIONS, location, + body, headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_OPTIONS, location, body, + headerFields); +} + +v8::Handle V8ClientConnection::postData( + v8::Isolate* isolate, std::string const& location, std::string const& body, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_POST, location, + body, headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_POST, location, body, + headerFields); +} + +v8::Handle V8ClientConnection::putData( + v8::Isolate* isolate, std::string const& location, std::string const& body, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_PUT, location, + body, headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_PUT, location, body, + headerFields); +} + +v8::Handle V8ClientConnection::patchData( + v8::Isolate* isolate, std::string const& location, std::string const& body, + std::map const& headerFields, bool raw) { + if (raw) { + return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_PATCH, location, + body, headerFields); + } + return requestData(isolate, HttpRequest::HTTP_REQUEST_PATCH, location, body, + headerFields); +} + +v8::Handle V8ClientConnection::requestData( + v8::Isolate* isolate, HttpRequest::HttpRequestType method, + std::string const& location, std::string const& body, + std::map const& headerFields) { + _lastErrorMessage = ""; + _lastHttpReturnCode = 0; + + if (body.empty()) { + _httpResult.reset( + _client->request(method, location, nullptr, 0, headerFields)); + } else { + _httpResult.reset(_client->request(method, location, body.c_str(), + body.length(), headerFields)); + } + + return handleResult(isolate); +} + +v8::Handle V8ClientConnection::requestDataRaw( + v8::Isolate* isolate, HttpRequest::HttpRequestType method, + std::string const& location, std::string const& body, + std::map const& headerFields) { + v8::EscapableHandleScope scope(isolate); + + _lastErrorMessage = ""; + _lastHttpReturnCode = 0; + + if (body.empty()) { + _httpResult.reset( + _client->request(method, location, nullptr, 0, headerFields)); + } else { + _httpResult.reset(_client->request(method, location, body.c_str(), + body.size(), headerFields)); + } + + if (!_httpResult->isComplete()) { + // not complete + _lastErrorMessage = _client->getErrorMessage(); + + if (_lastErrorMessage.empty()) { + _lastErrorMessage = "Unknown error"; + } + + _lastHttpReturnCode = HttpResponse::SERVER_ERROR; + + v8::Handle result = v8::Object::New(isolate); + result->ForceSet(TRI_V8_ASCII_STRING("code"), + v8::Integer::New(isolate, HttpResponse::SERVER_ERROR)); + + int errorNumber = 0; + + switch (_httpResult->getResultType()) { + case (SimpleHttpResult::COULD_NOT_CONNECT): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT; + break; + + case (SimpleHttpResult::READ_ERROR): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_READ; + break; + + case (SimpleHttpResult::WRITE_ERROR): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_WRITE; + break; + + default: + errorNumber = TRI_SIMPLE_CLIENT_UNKNOWN_ERROR; + break; + } + + result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), + v8::Integer::New(isolate, errorNumber)); + result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), + TRI_V8_STD_STRING(_lastErrorMessage)); + + return scope.Escape(result); + } + + // complete + + _lastHttpReturnCode = _httpResult->getHttpReturnCode(); + + // create raw response + v8::Handle result = v8::Object::New(isolate); + + result->ForceSet(TRI_V8_ASCII_STRING("code"), + v8::Integer::New(isolate, _lastHttpReturnCode)); + + if (_lastHttpReturnCode >= 400) { + std::string returnMessage(_httpResult->getHttpReturnMessage()); + + result->ForceSet(TRI_V8_ASCII_STRING("error"), + v8::Boolean::New(isolate, true)); + result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), + v8::Integer::New(isolate, _lastHttpReturnCode)); + result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), + TRI_V8_STD_STRING(returnMessage)); + } else { + result->ForceSet(TRI_V8_ASCII_STRING("error"), + v8::Boolean::New(isolate, false)); + } + + // got a body, copy it into the result + StringBuffer& sb = _httpResult->getBody(); + if (sb.length() > 0) { + v8::Handle b = TRI_V8_STD_STRING(sb); + + result->ForceSet(TRI_V8_ASCII_STRING("body"), b); + } + + // copy all headers + v8::Handle headers = v8::Object::New(isolate); + auto const& hf = _httpResult->getHeaderFields(); + + for (auto const& it : hf) { + v8::Handle key = TRI_V8_STD_STRING(it.first); + v8::Handle val = TRI_V8_STD_STRING(it.second); + + headers->ForceSet(key, val); + } + + result->ForceSet(TRI_V8_ASCII_STRING("headers"), headers); + + // and returns + return scope.Escape(result); +} + +v8::Handle V8ClientConnection::handleResult(v8::Isolate* isolate) { + v8::EscapableHandleScope scope(isolate); + + if (_httpResult.get() == nullptr) { + return scope.Escape(v8::Undefined(isolate)); + } + + // not complete + if (!_httpResult->isComplete()) { + _lastErrorMessage = _client->getErrorMessage(); + + if (_lastErrorMessage.empty()) { + _lastErrorMessage = "Unknown error"; + } + + _lastHttpReturnCode = HttpResponse::SERVER_ERROR; + + v8::Local result = v8::Object::New(isolate); + result->ForceSet(TRI_V8_ASCII_STRING("error"), + v8::Boolean::New(isolate, true)); + result->ForceSet(TRI_V8_ASCII_STRING("code"), + v8::Integer::New(isolate, HttpResponse::SERVER_ERROR)); + + int errorNumber = 0; + + switch (_httpResult->getResultType()) { + case (SimpleHttpResult::COULD_NOT_CONNECT): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT; + break; + + case (SimpleHttpResult::READ_ERROR): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_READ; + break; + + case (SimpleHttpResult::WRITE_ERROR): + errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_WRITE; + break; + + default: + errorNumber = TRI_SIMPLE_CLIENT_UNKNOWN_ERROR; + break; + } + + result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), + v8::Integer::New(isolate, errorNumber)); + result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), + TRI_V8_STD_STRING(_lastErrorMessage)); + + return scope.Escape(result); + } + + // complete + _lastHttpReturnCode = _httpResult->getHttpReturnCode(); + + // got a body + StringBuffer& sb = _httpResult->getBody(); + + if (sb.length() > 0) { + isolate->GetCurrentContext()->Global(); + + if (_httpResult->isJson()) { + return scope.Escape( + TRI_FromJsonString(isolate, sb.c_str(), nullptr)); + } + + // return body as string + return scope.Escape(TRI_V8_STD_STRING(sb)); + } + + // no body + + v8::Local result = v8::Object::New(isolate); + + result->ForceSet(TRI_V8_ASCII_STRING("code"), + v8::Integer::New(isolate, _lastHttpReturnCode)); + + if (_lastHttpReturnCode >= 400) { + std::string returnMessage(_httpResult->getHttpReturnMessage()); + + result->ForceSet(TRI_V8_ASCII_STRING("error"), + v8::Boolean::New(isolate, true)); + result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), + v8::Integer::New(isolate, _lastHttpReturnCode)); + result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), + TRI_V8_STD_STRING(returnMessage)); + } else { + result->ForceSet(TRI_V8_ASCII_STRING("error"), + v8::Boolean::New(isolate, false)); + } + + return scope.Escape(result); +} + +void V8ClientConnection::initServer(v8::Isolate* isolate, + v8::Handle context, + ClientFeature* client) { + v8::Local v8client = v8::External::New(isolate, client); + + v8::Local connection_templ = + v8::FunctionTemplate::New(isolate); + + connection_templ->SetClassName(TRI_V8_ASCII_STRING("ArangoConnection")); + + v8::Local connection_proto = + connection_templ->PrototypeTemplate(); + + connection_proto->Set( + isolate, "DELETE", + v8::FunctionTemplate::New(isolate, ClientConnection_httpDelete)); + + connection_proto->Set( + isolate, "DELETE_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpDeleteRaw)); + + connection_proto->Set(isolate, "GET", v8::FunctionTemplate::New( + isolate, ClientConnection_httpGet)); + + connection_proto->Set( + isolate, "GET_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpGetRaw)); + + connection_proto->Set( + isolate, "HEAD", + v8::FunctionTemplate::New(isolate, ClientConnection_httpHead)); + + connection_proto->Set( + isolate, "HEAD_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpHeadRaw)); + + connection_proto->Set( + isolate, "OPTIONS", + v8::FunctionTemplate::New(isolate, ClientConnection_httpOptions)); + + connection_proto->Set( + isolate, "OPTIONS_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpOptionsRaw)); + + connection_proto->Set( + isolate, "PATCH", + v8::FunctionTemplate::New(isolate, ClientConnection_httpPatch)); + + connection_proto->Set( + isolate, "PATCH_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpPatchRaw)); + + connection_proto->Set( + isolate, "POST", + v8::FunctionTemplate::New(isolate, ClientConnection_httpPost)); + + connection_proto->Set( + isolate, "POST_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpPostRaw)); + + connection_proto->Set(isolate, "PUT", v8::FunctionTemplate::New( + isolate, ClientConnection_httpPut)); + connection_proto->Set( + isolate, "PUT_RAW", + v8::FunctionTemplate::New(isolate, ClientConnection_httpPutRaw)); + + connection_proto->Set( + isolate, "SEND_FILE", + v8::FunctionTemplate::New(isolate, ClientConnection_httpSendFile)); + + connection_proto->Set(isolate, "getEndpoint", + v8::FunctionTemplate::New( + isolate, ClientConnection_getEndpoint, v8client)); + + connection_proto->Set( + isolate, "lastHttpReturnCode", + v8::FunctionTemplate::New(isolate, ClientConnection_lastHttpReturnCode)); + + connection_proto->Set( + isolate, "lastErrorMessage", + v8::FunctionTemplate::New(isolate, ClientConnection_lastErrorMessage)); + + connection_proto->Set( + isolate, "isConnected", + v8::FunctionTemplate::New(isolate, ClientConnection_isConnected)); + + connection_proto->Set( + isolate, "reconnect", + v8::FunctionTemplate::New(isolate, ClientConnection_reconnect, v8client)); + + connection_proto->Set( + isolate, "toString", + v8::FunctionTemplate::New(isolate, ClientConnection_toString)); + + connection_proto->Set( + isolate, "getVersion", + v8::FunctionTemplate::New(isolate, ClientConnection_getVersion)); + + connection_proto->Set( + isolate, "getMode", + v8::FunctionTemplate::New(isolate, ClientConnection_getMode)); + + connection_proto->Set( + isolate, "getDatabaseName", + v8::FunctionTemplate::New(isolate, ClientConnection_getDatabaseName)); + + connection_proto->Set( + isolate, "setDatabaseName", + v8::FunctionTemplate::New(isolate, ClientConnection_setDatabaseName, + v8client)); + + connection_proto->Set( + isolate, "importCsv", + v8::FunctionTemplate::New(isolate, ClientConnection_importCsv, v8client)); + + connection_proto->Set(isolate, "importJson", + v8::FunctionTemplate::New( + isolate, ClientConnection_importJson, v8client)); + + connection_proto->SetCallAsFunctionHandler( + ClientConnection_ConstructorCallback, v8client); + + v8::Local connection_inst = + connection_templ->InstanceTemplate(); + + connection_inst->SetInternalFieldCount(2); + + TRI_AddGlobalVariableVocbase(isolate, context, + TRI_V8_ASCII_STRING("ArangoConnection"), + connection_proto->NewInstance()); + + ConnectionTempl.Reset(isolate, connection_inst); + + // add the client connection to the context: + TRI_AddGlobalVariableVocbase(isolate, context, + TRI_V8_ASCII_STRING("SYS_ARANGO"), + WrapV8ClientConnection(isolate, this)); +} diff --git a/arangosh/Shell/V8ClientConnection.h b/arangosh/Shell/V8ClientConnection.h new file mode 100644 index 0000000000..3de6970936 --- /dev/null +++ b/arangosh/Shell/V8ClientConnection.h @@ -0,0 +1,141 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Achim Brandt +//////////////////////////////////////////////////////////////////////////////// + +#ifndef ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H +#define ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H 1 + +#include "Basics/Common.h" + +#include "Rest/HttpRequest.h" + +#include + +namespace arangodb { +class ClientFeature; + +namespace httpclient { +class GeneralClientConnection; +class SimpleHttpClient; +class SimpleHttpResult; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief class for http requests +//////////////////////////////////////////////////////////////////////////////// + +class V8ClientConnection { + V8ClientConnection(V8ClientConnection const&) = delete; + V8ClientConnection& operator=(V8ClientConnection const&) = delete; + + public: + V8ClientConnection( + std::unique_ptr& connection, + std::string const&, std::string const&, std::string const&, double); + ~V8ClientConnection(); + + public: + void setInterrupted(bool value); + bool isConnected(); + void reconnect(ClientFeature*); + + std::string const& databaseName() const { return _databaseName; } + void setDatabaseName(std::string const& value) { _databaseName = value; } + std::string const& username() const { return _username; } + std::string const& password() const { return _password; } + int lastHttpReturnCode() const { return _lastHttpReturnCode; } + std::string lastErrorMessage() const { return _lastErrorMessage; } + std::string const& version() const { return _version; } + std::string const& mode() const { return _mode; } + std::string endpointSpecification() const; + + v8::Handle getData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw); + + v8::Handle headData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw); + + v8::Handle deleteData( + v8::Isolate* isolate, std::string const& location, + std::map const& headerFields, bool raw); + + v8::Handle optionsData( + v8::Isolate* isolate, std::string const& location, + std::string const& body, + std::map const& headerFields, bool raw); + + v8::Handle postData( + v8::Isolate* isolate, std::string const& location, + std::string const& body, + std::map const& headerFields, bool raw = false); + + v8::Handle putData( + v8::Isolate* isolate, std::string const& location, + std::string const& body, + std::map const& headerFields, bool raw); + + v8::Handle patchData( + v8::Isolate* isolate, std::string const& location, + std::string const& body, + std::map const& headerFields, bool raw); + + void initServer(v8::Isolate*, v8::Handle context, + ClientFeature*); + + private: + static std::string rewriteLocation(void*, std::string const&); + + private: + void init(std::unique_ptr&); + + v8::Handle requestData( + v8::Isolate* isolate, rest::HttpRequest::HttpRequestType method, + std::string const& location, std::string const& body, + std::map const& headerFields); + + v8::Handle requestDataRaw( + v8::Isolate* isolate, rest::HttpRequest::HttpRequestType method, + std::string const& location, std::string const& body, + std::map const& headerFields); + + v8::Handle handleResult(v8::Isolate* isolate); + + private: + std::string _databaseName; + std::string _username; + std::string _password; + double _requestTimeout; + + std::unique_ptr _client; + int _lastHttpReturnCode; + std::string _lastErrorMessage; + std::unique_ptr _httpResult; + + std::string _version; + std::string _mode; +}; +} + +#endif diff --git a/arangosh/Shell/V8ShellFeature.cpp b/arangosh/Shell/V8ShellFeature.cpp new file mode 100644 index 0000000000..0b31836a3b --- /dev/null +++ b/arangosh/Shell/V8ShellFeature.cpp @@ -0,0 +1,904 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "V8ShellFeature.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/FileUtils.h" +#include "Basics/StringUtils.h" +#include "Basics/Utf8Helper.h" +#include "Basics/shell-colors.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" +#include "Rest/HttpResponse.h" +#include "Rest/Version.h" +#include "Shell/V8ClientConnection.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "V8/JSLoader.h" +#include "V8/V8LineEditor.h" +#include "V8/v8-buffer.h" +#include "V8/v8-conv.h" +#include "V8/v8-shell.h" +#include "V8/v8-utils.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::options; +using namespace arangodb::rest; + +V8ShellFeature::V8ShellFeature(application_features::ApplicationServer* server, + std::string const& name) + : ApplicationFeature(server, "V8ShellFeature"), + _startupDirectory("js"), + _currentModuleDirectory(true), + _gcInterval(10), + _name(name), + _isolate(nullptr), + _console(nullptr) { + requiresElevatedPrivileges(false); + setOptional(false); + + startsAfter("LoggerFeature"); + startsAfter("ConsoleFeature"); + startsAfter("V8PlatformFeature"); +} + +void V8ShellFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection("javascript", "Configure the Javascript engine"); + + options->addHiddenOption("--javascript.startup-directory", + "startup paths containing the Javascript files", + new StringParameter(&_startupDirectory)); + + options->addOption("--javascript.current-module-directory", + "add current directory to module path", + new BooleanParameter(&_currentModuleDirectory)); + + options->addOption( + "--javascript.gc-interval", + "request-based garbage collection interval (each n.th commands)", + new UInt64Parameter(&_gcInterval)); +} + +void V8ShellFeature::validateOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + if (_startupDirectory.empty()) { + LOG(FATAL) << "'--javascript.startup-directory' is empty, giving up"; + abortInvalidParameters(); + } + + LOG_TOPIC(DEBUG, Logger::V8) << "using Javascript startup files at '" + << _startupDirectory << "'"; +} + +void V8ShellFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + _console = dynamic_cast(server()->feature("ConsoleFeature")); + + _isolate = v8::Isolate::New(); + + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + // create the global template + v8::Local global = v8::ObjectTemplate::New(_isolate); + + // create the context + _context.Reset(_isolate, v8::Context::New(_isolate, nullptr, global)); + + auto context = v8::Local::New(_isolate, _context); + + if (context.IsEmpty()) { + LOG(FATAL) << "cannot initialize V8 engine"; + FATAL_ERROR_EXIT(); + } + + // fill the global object + v8::Context::Scope context_scope{context}; + + v8::Handle globalObj = context->Global(); + globalObj->Set(TRI_V8_ASCII_STRING2(_isolate, "GLOBAL"), globalObj); + globalObj->Set(TRI_V8_ASCII_STRING2(_isolate, "global"), globalObj); + globalObj->Set(TRI_V8_ASCII_STRING2(_isolate, "root"), globalObj); + + initGlobals(); +} + +void V8ShellFeature::stop() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; + + { + v8::Locker locker{_isolate}; + v8::Isolate::Scope isolate_scope{_isolate}; + _context.Reset(); + } + + _isolate->Dispose(); +} + +bool V8ShellFeature::printHello(V8ClientConnection* v8connection) { + bool promptError = false; + + // for the banner see + // http://www.network-science.de/ascii/ Font: ogre + + if (!_console->quiet()) { + std::string g = TRI_SHELL_COLOR_GREEN; + std::string r = TRI_SHELL_COLOR_RED; + std::string z = TRI_SHELL_COLOR_RESET; + + if (!_console->colors()) { + g = ""; + r = ""; + z = ""; + } + + // clang-format off + + _console->printLine(""); + _console->printLine(g + " " + r + " _ " + z); + _console->printLine(g + " __ _ _ __ __ _ _ __ __ _ ___ " + r + " ___| |__ " + z); + _console->printLine(g + " / _` | '__/ _` | '_ \\ / _` |/ _ \\" + r + "/ __| '_ \\ " + z); + _console->printLine(g + "| (_| | | | (_| | | | | (_| | (_) " + r + "\\__ \\ | | |" + z); + _console->printLine(g + " \\__,_|_| \\__,_|_| |_|\\__, |\\___/" + r + "|___/_| |_|" + z); + _console->printLine(g + " |___/ " + r + " " + z); + _console->printLine(""); + + // clang-format on + + std::ostringstream s; + + s << "arangosh (" << rest::Version::getVerboseVersionString() << ")\n" + << "Copyright (c) ArangoDB GmbH"; + + _console->printLine(s.str(), true); + _console->printLine("", true); + + _console->printWelcomeInfo(); + + if (v8connection != nullptr) { + if (v8connection->isConnected() && + v8connection->lastHttpReturnCode() == HttpResponse::OK) { + std::ostringstream is; + + is << "Connected to ArangoDB '" << v8connection->endpointSpecification() + << "' version: " << v8connection->version() << " [" + << v8connection->mode() << "], database: '" + << v8connection->databaseName() << "', username: '" + << v8connection->username() << "'"; + + _console->printLine(is.str(), true); + } else { + std::ostringstream is; + + is << "Could not connect to endpoint '" + << v8connection->endpointSpecification() << "', database: '" + << v8connection->databaseName() << "', username: '" + << v8connection->username() << "'"; + + _console->printErrorLine(is.str()); + + if (!v8connection->lastErrorMessage().empty()) { + std::ostringstream is2; + + is2 << "Error message '" << v8connection->lastErrorMessage() << "'"; + + _console->printErrorLine(is2.str()); + } + + promptError = true; + } + + _console->printLine("", true); + } + } + + return promptError; +} + +// the result is wrapped in a Javascript variable SYS_ARANGO +V8ClientConnection* V8ShellFeature::setup( + v8::Local& context, bool createConnection, + std::vector const& positionals, bool* promptError) { + std::unique_ptr v8connection; + + ClientFeature* client = nullptr; + + if (createConnection) { + client = dynamic_cast(server()->feature("ClientFeature")); + + if (client != nullptr && client->isEnabled()) { + auto connection = client->createConnection(); + v8connection = std::make_unique( + connection, client->databaseName(), client->username(), + client->password(), client->requestTimeout()); + } + else { + client = nullptr; + } + } + + initMode(ArangoshFeature::RunMode::INTERACTIVE, positionals); + + if (createConnection && client != nullptr) { + v8connection->initServer(_isolate, context, client); + } + + bool pe = printHello(v8connection.get()); + loadModules(ArangoshFeature::RunMode::INTERACTIVE); + + if (promptError != nullptr) { + *promptError = pe; + } + + return v8connection.release(); +} + +int V8ShellFeature::runShell(std::vector const& positionals) { + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + v8::Local context = + v8::Local::New(_isolate, _context); + + v8::Context::Scope context_scope{context}; + + bool promptError; + auto v8connection = setup(context, true, positionals, &promptError); + + V8LineEditor v8LineEditor(_isolate, context, "." + _name + ".history"); + + v8LineEditor.setSignalFunction( + [&v8connection]() { v8connection->setInterrupted(true); }); + + v8LineEditor.open(_console->autoComplete()); + + v8::Local name( + TRI_V8_ASCII_STRING2(_isolate, TRI_V8_SHELL_COMMAND_NAME)); + + uint64_t nrCommands = 0; + + ClientFeature* client = + dynamic_cast(server()->feature("ClientFeature")); + + if (!client->isEnabled()) { + client = nullptr; + } + + while (true) { + _console->setPromptError(promptError); + auto prompt = _console->buildPrompt(client); + + bool eof; + std::string input = + v8LineEditor.prompt(prompt._colored, prompt._plain, eof); + + if (eof) { + break; + } + + if (input.empty()) { + promptError = false; + continue; + } + + _console->log(prompt._plain + input + "\n"); + + std::string i = StringUtils::trim(input); + + if (i == "exit" || i == "quit" || i == "exit;" || i == "quit;") { + break; + } + + if (i == "help" || i == "help;") { + input = "help()"; + } + + v8LineEditor.addHistory(input); + + v8::TryCatch tryCatch; + + _console->startPager(); + + // assume the command succeeds + promptError = false; + + // execute command and register its result in __LAST__ + v8LineEditor.setExecutingCommand(true); + + v8::Handle v = TRI_ExecuteJavaScriptString( + _isolate, context, TRI_V8_STRING2(_isolate, input.c_str()), name, true); + + v8LineEditor.setExecutingCommand(false); + + if (v.IsEmpty()) { + context->Global()->Set(TRI_V8_ASCII_STRING2(_isolate, "_last"), + v8::Undefined(_isolate)); + } else { + context->Global()->Set(TRI_V8_ASCII_STRING2(_isolate, "_last"), v); + } + + // command failed + if (tryCatch.HasCaught()) { + std::string exception; + + if (!tryCatch.CanContinue() || tryCatch.HasTerminated()) { + exception = "command locally aborted\n"; + } else { + exception = TRI_StringifyV8Exception(_isolate, &tryCatch); + } + + _console->printErrorLine(exception); + _console->log(exception); + + // this will change the prompt for the next round + promptError = true; + } + + v8connection->setInterrupted(false); + + _console->stopPager(); + _console->printLine(""); + + _console->log("\n"); + + // make sure the last command result makes it into the log file + _console->flushLog(); + + // gc + if (++nrCommands >= _gcInterval) { + nrCommands = 0; + TRI_RunGarbageCollectionV8(_isolate, 500.0); + } + } + + _console->printLine(""); + _console->printByeBye(); + + return promptError ? TRI_ERROR_INTERNAL : TRI_ERROR_NO_ERROR; +} + +bool V8ShellFeature::runScript(std::vector const& files, + std::vector const& positionals, + bool execute) { + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + v8::Local context = + v8::Local::New(_isolate, _context); + + v8::Context::Scope context_scope{context}; + + setup(context, execute, positionals); + + bool ok = true; + + for (auto const& file : files) { + if (!FileUtils::exists(file)) { + LOG(ERR) << "error: Javascript file not found: '" << file << "'"; + ok = false; + continue; + } + + if (execute) { + v8::TryCatch tryCatch; + + v8::Handle name = TRI_V8_STD_STRING2(_isolate, file); + v8::Handle args[] = {name}; + v8::Handle filename = args[0]; + + v8::Handle current = _isolate->GetCurrentContext()->Global(); + + auto oldFilename = + current->Get(TRI_V8_ASCII_STRING2(_isolate, "__filename")); + + current->ForceSet(TRI_V8_ASCII_STRING2(_isolate, "__filename"), filename); + + auto oldDirname = + current->Get(TRI_V8_ASCII_STRING2(_isolate, "__dirname")); + + auto dirname = FileUtils::dirname(TRI_ObjectToString(filename).c_str()); + + current->ForceSet(TRI_V8_ASCII_STRING2(_isolate, "__dirname"), + TRI_V8_STD_STRING2(_isolate, dirname)); + + ok = TRI_ExecuteGlobalJavaScriptFile(_isolate, file.c_str()); + + // restore old values for __dirname and __filename + if (oldFilename.IsEmpty() || oldFilename->IsUndefined()) { + current->Delete(TRI_V8_ASCII_STRING2(_isolate, "__filename")); + } else { + current->ForceSet(TRI_V8_ASCII_STRING2(_isolate, "__filename"), + oldFilename); + } + + if (oldDirname.IsEmpty() || oldDirname->IsUndefined()) { + current->Delete(TRI_V8_ASCII_STRING2(_isolate, "__dirname")); + } else { + current->ForceSet(TRI_V8_ASCII_STRING2(_isolate, "__dirname"), + oldDirname); + } + + if (tryCatch.HasCaught()) { + std::string exception(TRI_StringifyV8Exception(_isolate, &tryCatch)); + LOG(ERR) << exception; + ok = false; + } + } else { + ok = TRI_ParseJavaScriptFile(_isolate, file.c_str()); + } + } + + _console->flushLog(); + + return ok; +} + +bool V8ShellFeature::runString(std::vector const& strings, + std::vector const& positionals) { + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + v8::Local context = + v8::Local::New(_isolate, _context); + + v8::Context::Scope context_scope{context}; + + setup(context, true, positionals); + + bool ok = true; + + for (auto const& script : strings) { + v8::TryCatch tryCatch; + + v8::Handle result = TRI_ExecuteJavaScriptString( + _isolate, context, TRI_V8_STD_STRING2(_isolate, script), + TRI_V8_ASCII_STRING2(_isolate, "(command-line)"), false); + + if (tryCatch.HasCaught()) { + std::string exception(TRI_StringifyV8Exception(_isolate, &tryCatch)); + LOG(ERR) << exception; + ok = false; + } else { + // check return value of script + if (result->IsNumber()) { + int64_t intResult = TRI_ObjectToInt64(result); + + if (intResult != 0) { + ok = false; + } + } + } + } + + _console->flushLog(); + + return ok; +} + +bool V8ShellFeature::jslint(std::vector const& files) { + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + v8::Local context = + v8::Local::New(_isolate, _context); + + v8::Context::Scope context_scope{context}; + + setup(context, false, {}); + + bool ok = true; + + // set-up jslint files array + v8::Handle sysTestFiles = v8::Array::New(_isolate); + + uint32_t i = 0; + for (auto& file : files) { + if (!FileUtils::exists(file)) { + LOG(ERR) << "error: Javascript file not found: '" << file << "'"; + ok = false; + continue; + } + + sysTestFiles->Set(i, TRI_V8_STD_STRING2(_isolate, file)); + ++i; + } + + context->Global()->Set(TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS"), + sysTestFiles); + + context->Global()->Set( + TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS_RESULT"), + v8::True(_isolate)); + + // run tests + auto input = TRI_V8_ASCII_STRING2( + _isolate, "require(\"jslint\").runCommandLineTests({});"); + + auto name = TRI_V8_ASCII_STRING2(_isolate, TRI_V8_SHELL_COMMAND_NAME); + + v8::TryCatch tryCatch; + TRI_ExecuteJavaScriptString(_isolate, context, input, name, true); + + if (tryCatch.HasCaught()) { + LOG(ERR) << TRI_StringifyV8Exception(_isolate, &tryCatch); + ok = false; + } else { + bool res = TRI_ObjectToBoolean(context->Global()->Get( + TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS_RESULT"))); + + ok = ok && res; + } + + return ok; +} + +bool V8ShellFeature::runUnitTests(std::vector const& files, + std::vector const& positionals) { + v8::Locker locker{_isolate}; + + v8::Isolate::Scope isolate_scope(_isolate); + v8::HandleScope handle_scope(_isolate); + + v8::Local context = + v8::Local::New(_isolate, _context); + + v8::Context::Scope context_scope{context}; + + setup(context, true, positionals); + + bool ok = true; + + // set-up unit tests array + v8::Handle sysTestFiles = v8::Array::New(_isolate); + + uint32_t i = 0; + + for (auto const& file : files) { + if (!FileUtils::exists(file)) { + LOG(ERR) << "error: Javascript file not found: '" << file << "'"; + ok = false; + continue; + } + + sysTestFiles->Set(i, TRI_V8_STD_STRING2(_isolate, file)); + ++i; + } + + TRI_AddGlobalVariableVocbase(_isolate, context, + TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS"), + sysTestFiles); + + // do not use TRI_AddGlobalVariableVocBase because it creates read-only + // variables!! + context->Global()->Set( + TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS_RESULT"), + v8::True(_isolate)); + + // run tests + auto input = TRI_V8_ASCII_STRING2( + _isolate, "require(\"@arangodb/testrunner\").runCommandLineTests();"); + + auto name = TRI_V8_ASCII_STRING2(_isolate, TRI_V8_SHELL_COMMAND_NAME); + + v8::TryCatch tryCatch; + TRI_ExecuteJavaScriptString(_isolate, context, input, name, true); + + if (tryCatch.HasCaught()) { + std::string exception(TRI_StringifyV8Exception(_isolate, &tryCatch)); + LOG(ERR) << exception; + ok = false; + } else { + bool res = TRI_ObjectToBoolean(context->Global()->Get( + TRI_V8_ASCII_STRING2(_isolate, "SYS_UNIT_TESTS_RESULT"))); + + ok = ok && res; + } + + return ok; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief outputs the arguments +//////////////////////////////////////////////////////////////////////////////// + +static void JS_PagerOutput(v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ConsoleFeature* console = (ConsoleFeature*)(wrap->Value()); + + for (int i = 0; i < args.Length(); i++) { + // extract the next argument + v8::Handle val = args[i]; + + std::string str = TRI_ObjectToString(val); + + console->print(str); + } + + TRI_V8_RETURN_UNDEFINED(); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief starts the output pager +//////////////////////////////////////////////////////////////////////////////// + +static void JS_StartOutputPager( + v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ConsoleFeature* console = (ConsoleFeature*)(wrap->Value()); + + if (console->pager()) { + console->print("Using pager already.\n"); + } else { + console->setPager(true); + console->print(std::string(std::string("Using pager ") + + console->pagerCommand() + + " for output buffering.\n")); + } + + TRI_V8_RETURN_UNDEFINED(); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief stops the output pager +//////////////////////////////////////////////////////////////////////////////// + +static void JS_StopOutputPager( + v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + v8::Local wrap = v8::Local::Cast(args.Data()); + ConsoleFeature* console = (ConsoleFeature*)(wrap->Value()); + + if (console->pager()) { + console->print("Stopping pager.\n"); + } else { + console->print("Pager not running.\n"); + } + + console->setPager(false); + + TRI_V8_RETURN_UNDEFINED(); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief normalizes UTF 16 strings +//////////////////////////////////////////////////////////////////////////////// + +static void JS_NormalizeString( + v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + if (args.Length() != 1) { + TRI_V8_THROW_EXCEPTION_USAGE("NORMALIZE_STRING()"); + } + + TRI_normalize_V8_Obj(args, args[0]); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief compare two UTF 16 strings +//////////////////////////////////////////////////////////////////////////////// + +static void JS_CompareString(v8::FunctionCallbackInfo const& args) { + TRI_V8_TRY_CATCH_BEGIN(isolate); + v8::HandleScope scope(isolate); + + if (args.Length() != 2) { + TRI_V8_THROW_EXCEPTION_USAGE( + "COMPARE_STRING(, )"); + } + + v8::String::Value left(args[0]); + v8::String::Value right(args[1]); + + int result = Utf8Helper::DefaultUtf8Helper.compareUtf16( + *left, left.length(), *right, right.length()); + + TRI_V8_RETURN(v8::Integer::New(isolate, result)); + TRI_V8_TRY_CATCH_END +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initializes global Javascript variables +//////////////////////////////////////////////////////////////////////////////// + +void V8ShellFeature::initGlobals() { + auto context = _isolate->GetCurrentContext(); + + // set pretty print default + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "PRETTY_PRINT"), + v8::Boolean::New(_isolate, _console->prettyPrint())); + + // add colors for print.js + TRI_AddGlobalVariableVocbase(_isolate, context, + TRI_V8_ASCII_STRING2(_isolate, "COLOR_OUTPUT"), + v8::Boolean::New(_isolate, _console->colors())); + + // string functions + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "NORMALIZE_STRING"), + v8::FunctionTemplate::New(_isolate, JS_NormalizeString)->GetFunction()); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "COMPARE_STRING"), + v8::FunctionTemplate::New(_isolate, JS_CompareString)->GetFunction()); + + // is quite + TRI_AddGlobalVariableVocbase(_isolate, context, + TRI_V8_ASCII_STRING2(_isolate, "ARANGO_QUIET"), + v8::Boolean::New(_isolate, _console->quiet())); + + // initialize standard modules + std::string modules = + FileUtils::buildFilename(_startupDirectory, "client/modules") + ";" + + FileUtils::buildFilename(_startupDirectory, "common/modules") + ";" + + FileUtils::buildFilename(_startupDirectory, "node"); + + if (_currentModuleDirectory) { + modules += ";" + FileUtils::currentDirectory(); + } + + TRI_InitV8Buffer(_isolate, context); + TRI_InitV8Utils(_isolate, context, _startupDirectory, modules); + TRI_InitV8Shell(_isolate, context); + + // pager functions (overwrite existing SYS_OUTPUT from InitV8Utils) + if (_console != nullptr) { + v8::Local console = v8::External::New(_isolate, _console); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "SYS_OUTPUT"), + v8::FunctionTemplate::New(_isolate, JS_PagerOutput, console) + ->GetFunction()); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "SYS_START_PAGER"), + v8::FunctionTemplate::New(_isolate, JS_StartOutputPager, console) + ->GetFunction()); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "SYS_STOP_PAGER"), + v8::FunctionTemplate::New(_isolate, JS_StopOutputPager, console) + ->GetFunction()); + } +} + +void V8ShellFeature::initMode(ArangoshFeature::RunMode runMode, + std::vector const& positionals) { + auto context = _isolate->GetCurrentContext(); + + // add positional arguments + v8::Handle p = v8::Array::New(_isolate, (int)positionals.size()); + + for (uint32_t i = 0; i < positionals.size(); ++i) { + p->Set(i, TRI_V8_STD_STRING2(_isolate, positionals[i])); + } + + TRI_AddGlobalVariableVocbase(_isolate, context, + TRI_V8_ASCII_STRING2(_isolate, "ARGUMENTS"), p); + + // set mode flags + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "IS_EXECUTE_SCRIPT"), + v8::Boolean::New(_isolate, + runMode == ArangoshFeature::RunMode::EXECUTE_SCRIPT)); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "IS_EXECUTE_STRING"), + v8::Boolean::New(_isolate, + runMode == ArangoshFeature::RunMode::EXECUTE_STRING)); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "IS_CHECK_SCRIPT"), + v8::Boolean::New(_isolate, + runMode == ArangoshFeature::RunMode::CHECK_SYNTAX)); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "IS_UNIT_TESTS"), + v8::Boolean::New(_isolate, + runMode == ArangoshFeature::RunMode::UNIT_TESTS)); + + TRI_AddGlobalVariableVocbase( + _isolate, context, TRI_V8_ASCII_STRING2(_isolate, "IS_JS_LINT"), + v8::Boolean::New(_isolate, runMode == ArangoshFeature::RunMode::JSLINT)); +} + +void V8ShellFeature::loadModules(ArangoshFeature::RunMode runMode) { + auto context = _isolate->GetCurrentContext(); + + JSLoader loader; + loader.setDirectory(_startupDirectory); + + // load all init files + std::vector files; + + files.push_back("common/bootstrap/scaffolding.js"); + files.push_back("common/bootstrap/modules/internal.js"); // deps: - + files.push_back("common/bootstrap/errors.js"); // deps: internal + files.push_back("client/bootstrap/modules/internal.js"); // deps: internal + files.push_back("common/bootstrap/modules/vm.js"); // deps: internal + files.push_back("common/bootstrap/modules/console.js"); // deps: internal + files.push_back("common/bootstrap/modules/assert.js"); // deps: - + files.push_back("common/bootstrap/modules/buffer.js"); // deps: internal + files.push_back( + "common/bootstrap/modules/fs.js"); // deps: internal, buffer (hidden) + files.push_back("common/bootstrap/modules/path.js"); // deps: internal, fs + files.push_back("common/bootstrap/modules/events.js"); // deps: - + files.push_back("common/bootstrap/modules/process.js"); // deps: internal, + // fs, events, + // console + files.push_back( + "common/bootstrap/modules.js"); // must come last before patches + + if (runMode != ArangoshFeature::RunMode::JSLINT) { + files.push_back("common/bootstrap/monkeypatches.js"); + } + + files.push_back("client/client.js"); // needs internal + + for (size_t i = 0; i < files.size(); ++i) { + switch (loader.loadScript(_isolate, context, files[i])) { + case JSLoader::eSuccess: + LOG(TRACE) << "loaded JavaScript file '" << files[i] << "'"; + break; + case JSLoader::eFailLoad: + LOG(FATAL) << "cannot load JavaScript file '" << files[i] << "'"; + FATAL_ERROR_EXIT(); + break; + case JSLoader::eFailExecute: + LOG(FATAL) << "error during execution of JavaScript file '" << files[i] + << "'"; + FATAL_ERROR_EXIT(); + break; + } + } +} diff --git a/arangosh/Shell/V8ShellFeature.h b/arangosh/Shell/V8ShellFeature.h new file mode 100644 index 0000000000..4a0a30f782 --- /dev/null +++ b/arangosh/Shell/V8ShellFeature.h @@ -0,0 +1,82 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef SHELL_V8_SHELL_FEATURE_H +#define SHELL_V8_SHELL_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +#include +#include + +#include "ApplicationFeatures/ConsoleFeature.h" +#include "Shell/ArangoshFeature.h" + +namespace arangodb { +class ConsoleFeature; +class V8ClientConnection; + +class V8ShellFeature final : public application_features::ApplicationFeature { + public: + V8ShellFeature(application_features::ApplicationServer* server, + std::string const&); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + void start() override; + void stop() override; + + private: + std::string _startupDirectory; + bool _currentModuleDirectory; + uint64_t _gcInterval; + + public: + int runShell(std::vector const&); + bool runScript(std::vector const& files, + std::vector const&, bool); + bool runString(std::vector const& files, + std::vector const&); + bool runUnitTests(std::vector const& files, + std::vector const&); + bool jslint(std::vector const& files); + + private: + bool printHello(V8ClientConnection*); + void initGlobals(); + void initMode(ArangoshFeature::RunMode, std::vector const&); + void loadModules(ArangoshFeature::RunMode); + V8ClientConnection* setup(v8::Local& context, bool, + std::vector const&, + bool* promptError = nullptr); + + private: + std::string _name; + v8::Isolate* _isolate; + v8::Persistent _context; + ConsoleFeature* _console; +}; +} + +#endif diff --git a/arangosh/Shell/arangosh.cpp b/arangosh/Shell/arangosh.cpp new file mode 100644 index 0000000000..d2b9498787 --- /dev/null +++ b/arangosh/Shell/arangosh.cpp @@ -0,0 +1,77 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany +/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "Basics/Common.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "ApplicationFeatures/ConfigFeature.h" +#include "ApplicationFeatures/ConsoleFeature.h" +#include "ApplicationFeatures/LanguageFeature.h" +#include "ApplicationFeatures/LoggerFeature.h" +#include "ApplicationFeatures/ShutdownFeature.h" +#include "ApplicationFeatures/TempFeature.h" +#include "ApplicationFeatures/V8PlatformFeature.h" +#include "Basics/files.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "Rest/InitializeRest.h" +#include "Shell/ArangoshFeature.h" +#include "Shell/V8ShellFeature.h" + +using namespace arangodb; +using namespace arangodb::application_features; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief main +//////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char* argv[]) { + ADB_WindowsEntryFunction(); + TRIAGENS_REST_INITIALIZE(); + + std::string name = TRI_BinaryName(argv[0]); + + std::shared_ptr options(new options::ProgramOptions( + argv[0], "Usage: " + name + " []", "For more information use:")); + + ApplicationServer server(options); + + int ret; + + server.addFeature(new ConfigFeature(&server, name)); + server.addFeature(new TempFeature(&server, name)); + server.addFeature(new LoggerFeature(&server)); + server.addFeature(new LanguageFeature(&server)); + server.addFeature(new ClientFeature(&server)); + server.addFeature(new ConsoleFeature(&server)); + server.addFeature(new V8PlatformFeature(&server)); + server.addFeature(new V8ShellFeature(&server, name)); + server.addFeature(new ArangoshFeature(&server, &ret)); + server.addFeature(new ShutdownFeature(&server, "ArangoshFeature")); + + server.run(argc, argv); + + TRIAGENS_REST_SHUTDOWN; + ADB_WindowsExitFunction(ret, nullptr); + + return ret; +} diff --git a/arangosh/V8Client/ArangoClientHelper.cpp b/arangosh/V8Client/ArangoClientHelper.cpp new file mode 100644 index 0000000000..b32e69251a --- /dev/null +++ b/arangosh/V8Client/ArangoClientHelper.cpp @@ -0,0 +1,169 @@ +////////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#include "ArangoClientHelper.h" + +#include +#include + +#include "Basics/VelocyPackHelper.h" +#include "ApplicationFeatures/ClientFeature.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" +#include "SimpleHttpClient/SimpleHttpResult.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::httpclient; +using namespace arangodb::rest; + +ArangoClientHelper::ArangoClientHelper() : _httpClient(nullptr) {} + +// helper to rewrite HTTP location +std::string ArangoClientHelper::rewriteLocation(void* data, + std::string const& location) { + if (location.substr(0, 5) == "/_db/") { + return location; + } + + ClientFeature* client = (ClientFeature*)data; + std::string const& dbname = client->databaseName(); + + if (location[0] == '/') { + return "/_db/" + dbname + location; + } else { + return "/_db/" + dbname + "/" + location; + } +} + +// extract an error message from a response +std::string ArangoClientHelper::getHttpErrorMessage(SimpleHttpResult* result, + int* err) { + if (err != nullptr) { + *err = TRI_ERROR_NO_ERROR; + } + std::string details; + + try { + std::shared_ptr parsedBody = result->getBodyVelocyPack(); + VPackSlice const body = parsedBody->slice(); + + std::string const& errorMessage = + arangodb::basics::VelocyPackHelper::getStringValue(body, "errorMessage", + ""); + int errorNum = arangodb::basics::VelocyPackHelper::getNumericValue( + body, "errorNum", 0); + + if (errorMessage != "" && errorNum > 0) { + if (err != nullptr) { + *err = errorNum; + } + details = + ": ArangoError " + StringUtils::itoa(errorNum) + ": " + errorMessage; + } + } catch (...) { + // No action, fallthrough for error + } + return "got error from server: HTTP " + + StringUtils::itoa(result->getHttpReturnCode()) + " (" + + result->getHttpReturnMessage() + ")" + details; +} + +// TODO(fc) is this SimpleHttpClient::getServerVersion? + +// fetch the version from the server +std::string ArangoClientHelper::getArangoVersion(int* err) { + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_GET, "/_api/version", nullptr, 0)); + + if (response == nullptr || !response->isComplete()) { + return ""; + } + + std::string version; + + if (response->getHttpReturnCode() == HttpResponse::OK) { + // default value + version = "arango"; + + try { + std::shared_ptr parsedBody = response->getBodyVelocyPack(); + VPackSlice const body = parsedBody->slice(); + + // look up "server" value + std::string const server = + arangodb::basics::VelocyPackHelper::getStringValue(body, "server", + ""); + + // "server" value is a string and content is "arango" + if (server == "arango") { + // look up "version" value + version = arangodb::basics::VelocyPackHelper::getStringValue( + body, "version", ""); + } + + } catch (...) { + // No Action + } + } else { + if (response->wasHttpError()) { + _httpClient->setErrorMessage(getHttpErrorMessage(response.get(), err), + false); + } + + _httpClient->disconnect(); + } + + return version; +} + +// check if server is a coordinator of a cluster +bool ArangoClientHelper::getArangoIsCluster(int* err) { + std::unique_ptr response(_httpClient->request( + HttpRequest::HTTP_REQUEST_GET, "/_admin/server/role", "", 0)); + + if (response == nullptr || !response->isComplete()) { + return false; + } + + std::string role = "UNDEFINED"; + + if (response->getHttpReturnCode() == HttpResponse::OK) { + try { + std::shared_ptr parsedBody = response->getBodyVelocyPack(); + VPackSlice const body = parsedBody->slice(); + role = arangodb::basics::VelocyPackHelper::getStringValue(body, "role", + "UNDEFINED"); + } catch (...) { + // No Action + } + } else { + if (response->wasHttpError()) { + _httpClient->setErrorMessage(getHttpErrorMessage(response.get(), err), + false); + } + + _httpClient->disconnect(); + } + + return role == "COORDINATOR"; +} diff --git a/arangosh/V8Client/ArangoClientHelper.h b/arangosh/V8Client/ArangoClientHelper.h new file mode 100644 index 0000000000..173a06c3ea --- /dev/null +++ b/arangosh/V8Client/ArangoClientHelper.h @@ -0,0 +1,52 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Jan Steemann +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H +#define APPLICATION_FEATURES_ARANGO_CLIENT_HELPER_H 1 + +#include "Basics/Common.h" + +namespace arangodb { +namespace httpclient { +class GeneralClientConnection; +class SimpleHttpClient; +class SimpleHttpResult; +} + +class ArangoClientHelper { + public: + ArangoClientHelper(); + + public: + static std::string rewriteLocation(void* data, std::string const& location); + + public: + std::string getHttpErrorMessage(httpclient::SimpleHttpResult*, int* err); + std::string getArangoVersion(int* err); + bool getArangoIsCluster(int* err); + + protected: + std::unique_ptr _httpClient; +}; +} + +#endif diff --git a/arangosh/V8Client/V8ClientConnection.cpp b/arangosh/V8Client/V8ClientConnection.cpp deleted file mode 100644 index 254e4632ea..0000000000 --- a/arangosh/V8Client/V8ClientConnection.cpp +++ /dev/null @@ -1,591 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Achim Brandt -//////////////////////////////////////////////////////////////////////////////// - -#include "V8ClientConnection.h" - -#include "Basics/StringUtils.h" -#include "Basics/VelocyPackHelper.h" -#include "Rest/HttpRequest.h" -#include "Rest/HttpResponse.h" -#include "SimpleHttpClient/GeneralClientConnection.h" -#include "SimpleHttpClient/SimpleHttpClient.h" -#include "SimpleHttpClient/SimpleHttpResult.h" -#include "V8/v8-json.h" -#include "V8/v8-globals.h" - -using namespace arangodb::basics; -using namespace arangodb::httpclient; -using namespace arangodb::rest; -using namespace arangodb::v8client; -using namespace std; - -V8ClientConnection::V8ClientConnection( - Endpoint* endpoint, std::string databaseName, std::string const& username, - std::string const& password, double requestTimeout, double connectTimeout, - size_t numRetries, uint32_t sslProtocol, bool warn) - : _connection(nullptr), - _databaseName(databaseName), - _lastHttpReturnCode(0), - _lastErrorMessage(""), - _client(nullptr), - _httpResult(nullptr) { - _connection = GeneralClientConnection::factory( - endpoint, requestTimeout, connectTimeout, numRetries, sslProtocol); - - if (_connection == nullptr) { - throw "out of memory"; - } - - _client = new SimpleHttpClient(_connection, requestTimeout, warn); - - if (_client == nullptr) { - LOG(FATAL) << "out of memory"; FATAL_ERROR_EXIT(); - } - - _client->setLocationRewriter(this, &rewriteLocation); - _client->setUserNamePassword("/", username, password); - - // connect to server and get version number - std::map headerFields; - std::unique_ptr result( - _client->request(HttpRequest::HTTP_REQUEST_GET, - "/_api/version?details=true", nullptr, 0, headerFields)); - - if (result == nullptr || !result->isComplete()) { - // save error message - _lastErrorMessage = _client->getErrorMessage(); - _lastHttpReturnCode = 500; - } else { - _lastHttpReturnCode = result->getHttpReturnCode(); - - if (result->getHttpReturnCode() == HttpResponse::OK) { - // default value - _version = "arango"; - _mode = "unknown mode"; - - try { - std::shared_ptr parsedBody = result->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - std::string const server = - arangodb::basics::VelocyPackHelper::getStringValue(body, "server", - ""); - - // "server" value is a string and content is "arango" - if (server == "arango") { - // look up "version" value - _version = arangodb::basics::VelocyPackHelper::getStringValue( - body, "version", ""); - VPackSlice const details = body.get("details"); - if (details.isObject()) { - VPackSlice const mode = details.get("mode"); - if (mode.isString()) { - _mode = mode.copyString(); - } - } - } - } catch (...) { - // Ignore all parse errors - } - } else { - // initial request for /_api/version returned some non-HTTP 200 response. - // now set up an error message - _lastErrorMessage = _client->getErrorMessage(); - - if (result->getHttpReturnCode() > 0) { - _lastErrorMessage = StringUtils::itoa(result->getHttpReturnCode()) + - ": " + result->getHttpReturnMessage(); - } - } - } -} - -V8ClientConnection::~V8ClientConnection() { - delete _httpResult; - delete _client; - delete _connection; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief request location rewriter (injects database name) -//////////////////////////////////////////////////////////////////////////////// - -std::string V8ClientConnection::rewriteLocation(void* data, - std::string const& location) { - V8ClientConnection* c = static_cast(data); - - TRI_ASSERT(c != nullptr); - - if (c->_databaseName.empty()) { - // no database name provided - return location; - } - - if (location[0] == '/') { - if (location.size() >= 5 && location[1] == '_' && location[2] == 'd' && - location[3] == 'b' && location[4] == '/') { - // location already contains /_db/ - return location; - } - - return "/_db/" + c->_databaseName + location; - } - - return "/_db/" + c->_databaseName + "/" + location; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns true if it is connected -//////////////////////////////////////////////////////////////////////////////// - -bool V8ClientConnection::isConnected() { return _connection->isConnected(); } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief set the current operation to interrupted -//////////////////////////////////////////////////////////////////////////////// - -void V8ClientConnection::setInterrupted(bool value) { - _connection->setInterrupted(value); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the current database name -//////////////////////////////////////////////////////////////////////////////// - -std::string const& V8ClientConnection::getDatabaseName() { - return _databaseName; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief set the current database name -//////////////////////////////////////////////////////////////////////////////// - -void V8ClientConnection::setDatabaseName(std::string const& databaseName) { - _databaseName = databaseName; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the version and build number of the arango server -//////////////////////////////////////////////////////////////////////////////// - -std::string const& V8ClientConnection::getVersion() { return _version; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the server mode -//////////////////////////////////////////////////////////////////////////////// - -std::string const& V8ClientConnection::getMode() { return _mode; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the last http return code -//////////////////////////////////////////////////////////////////////////////// - -int V8ClientConnection::getLastHttpReturnCode() { return _lastHttpReturnCode; } - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the last error message -//////////////////////////////////////////////////////////////////////////////// - -std::string const& V8ClientConnection::getErrorMessage() { - return _lastErrorMessage; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the simple http client -//////////////////////////////////////////////////////////////////////////////// - -arangodb::httpclient::SimpleHttpClient* V8ClientConnection::getHttpClient() { - return _client; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "GET" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::getData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_GET, location, "", - headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_GET, location, "", - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "DELETE" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::deleteData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_DELETE, location, - "", headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_DELETE, location, "", - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "HEAD" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::headData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_HEAD, location, "", - headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_HEAD, location, "", - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do an "OPTIONS" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::optionsData( - v8::Isolate* isolate, std::string const& location, std::string const& body, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_OPTIONS, location, - body, headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_OPTIONS, location, body, - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "POST" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::postData( - v8::Isolate* isolate, std::string const& location, std::string const& body, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_POST, location, - body, headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_POST, location, body, - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "POST" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::postData( - v8::Isolate* isolate, std::string const& location, char const* body, - size_t bodySize, std::map const& headerFields) { - return requestData(isolate, HttpRequest::HTTP_REQUEST_POST, location, body, - bodySize, headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "PUT" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::putData( - v8::Isolate* isolate, std::string const& location, std::string const& body, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_PUT, location, - body, headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_PUT, location, body, - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do a "PATCH" request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::patchData( - v8::Isolate* isolate, std::string const& location, std::string const& body, - std::map const& headerFields, bool raw) { - if (raw) { - return requestDataRaw(isolate, HttpRequest::HTTP_REQUEST_PATCH, location, - body, headerFields); - } - return requestData(isolate, HttpRequest::HTTP_REQUEST_PATCH, location, body, - headerFields); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::requestData( - v8::Isolate* isolate, HttpRequest::HttpRequestType method, - std::string const& location, char const* body, size_t bodySize, - std::map const& headerFields) { - _lastErrorMessage = ""; - _lastHttpReturnCode = 0; - - delete _httpResult; - _httpResult = nullptr; - - _httpResult = - _client->request(method, location, body, bodySize, headerFields); - - return handleResult(isolate); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a request -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::requestData( - v8::Isolate* isolate, HttpRequest::HttpRequestType method, - std::string const& location, std::string const& body, - std::map const& headerFields) { - _lastErrorMessage = ""; - _lastHttpReturnCode = 0; - - delete _httpResult; - _httpResult = nullptr; - - if (body.empty()) { - _httpResult = _client->request(method, location, nullptr, 0, headerFields); - } else { - _httpResult = _client->request(method, location, body.c_str(), - body.length(), headerFields); - } - - return handleResult(isolate); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief handles a result -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::handleResult(v8::Isolate* isolate) { - v8::EscapableHandleScope scope(isolate); - - if (_httpResult == nullptr) { - return scope.Escape(v8::Undefined(isolate)); - } - - if (!_httpResult->isComplete()) { - // not complete - _lastErrorMessage = _client->getErrorMessage(); - - if (_lastErrorMessage.empty()) { - _lastErrorMessage = "Unknown error"; - } - - _lastHttpReturnCode = HttpResponse::SERVER_ERROR; - - v8::Handle result = v8::Object::New(isolate); - result->ForceSet(TRI_V8_ASCII_STRING("error"), - v8::Boolean::New(isolate, true)); - result->ForceSet(TRI_V8_ASCII_STRING("code"), - v8::Integer::New(isolate, HttpResponse::SERVER_ERROR)); - - int errorNumber = 0; - - switch (_httpResult->getResultType()) { - case (SimpleHttpResult::COULD_NOT_CONNECT): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT; - break; - - case (SimpleHttpResult::READ_ERROR): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_READ; - break; - - case (SimpleHttpResult::WRITE_ERROR): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_WRITE; - break; - - default: - errorNumber = TRI_SIMPLE_CLIENT_UNKNOWN_ERROR; - break; - } - - result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), - v8::Integer::New(isolate, errorNumber)); - result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), - TRI_V8_STD_STRING(_lastErrorMessage)); - - return scope.Escape(result); - } - - // complete - - _lastHttpReturnCode = _httpResult->getHttpReturnCode(); - - // got a body - StringBuffer& sb = _httpResult->getBody(); - - if (sb.length() > 0) { - isolate->GetCurrentContext()->Global(); - - if (_httpResult->isJson()) { - return scope.Escape( - TRI_FromJsonString(isolate, sb.c_str(), nullptr)); - } - - // return body as string - return scope.Escape(TRI_V8_STD_STRING(sb)); - } - - // no body - - v8::Handle result = v8::Object::New(isolate); - - result->ForceSet(TRI_V8_ASCII_STRING("code"), - v8::Integer::New(isolate, _lastHttpReturnCode)); - - if (_lastHttpReturnCode >= 400) { - std::string returnMessage(_httpResult->getHttpReturnMessage()); - - result->ForceSet(TRI_V8_ASCII_STRING("error"), - v8::Boolean::New(isolate, true)); - result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), - v8::Integer::New(isolate, _lastHttpReturnCode)); - result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), - TRI_V8_STD_STRING(returnMessage)); - } else { - result->ForceSet(TRI_V8_ASCII_STRING("error"), - v8::Boolean::New(isolate, false)); - } - - return scope.Escape(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a request and returns raw response -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle V8ClientConnection::requestDataRaw( - v8::Isolate* isolate, HttpRequest::HttpRequestType method, - std::string const& location, std::string const& body, - std::map const& headerFields) { - v8::EscapableHandleScope scope(isolate); - - _lastErrorMessage = ""; - _lastHttpReturnCode = 0; - - delete _httpResult; - _httpResult = nullptr; - - if (body.empty()) { - _httpResult = _client->request(method, location, nullptr, 0, headerFields); - } else { - _httpResult = _client->request(method, location, body.c_str(), - body.length(), headerFields); - } - - if (!_httpResult->isComplete()) { - // not complete - _lastErrorMessage = _client->getErrorMessage(); - - if (_lastErrorMessage.empty()) { - _lastErrorMessage = "Unknown error"; - } - - _lastHttpReturnCode = HttpResponse::SERVER_ERROR; - - v8::Handle result = v8::Object::New(isolate); - result->ForceSet(TRI_V8_ASCII_STRING("code"), - v8::Integer::New(isolate, HttpResponse::SERVER_ERROR)); - - int errorNumber = 0; - - switch (_httpResult->getResultType()) { - case (SimpleHttpResult::COULD_NOT_CONNECT): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT; - break; - - case (SimpleHttpResult::READ_ERROR): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_READ; - break; - - case (SimpleHttpResult::WRITE_ERROR): - errorNumber = TRI_SIMPLE_CLIENT_COULD_NOT_WRITE; - break; - - default: - errorNumber = TRI_SIMPLE_CLIENT_UNKNOWN_ERROR; - break; - } - - result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), - v8::Integer::New(isolate, errorNumber)); - result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), - TRI_V8_STD_STRING(_lastErrorMessage)); - - return scope.Escape(result); - } - - // complete - - _lastHttpReturnCode = _httpResult->getHttpReturnCode(); - - // create raw response - v8::Handle result = v8::Object::New(isolate); - - result->ForceSet(TRI_V8_ASCII_STRING("code"), - v8::Integer::New(isolate, _lastHttpReturnCode)); - - if (_lastHttpReturnCode >= 400) { - std::string returnMessage(_httpResult->getHttpReturnMessage()); - - result->ForceSet(TRI_V8_ASCII_STRING("error"), - v8::Boolean::New(isolate, true)); - result->ForceSet(TRI_V8_ASCII_STRING("errorNum"), - v8::Integer::New(isolate, _lastHttpReturnCode)); - result->ForceSet(TRI_V8_ASCII_STRING("errorMessage"), - TRI_V8_STD_STRING(returnMessage)); - } else { - result->ForceSet(TRI_V8_ASCII_STRING("error"), - v8::Boolean::New(isolate, false)); - } - - // got a body, copy it into the result - StringBuffer& sb = _httpResult->getBody(); - if (sb.length() > 0) { - v8::Handle b = TRI_V8_STD_STRING(sb); - - result->ForceSet(TRI_V8_ASCII_STRING("body"), b); - } - - // copy all headers - v8::Handle headers = v8::Object::New(isolate); - auto const& hf = _httpResult->getHeaderFields(); - - for (auto const& it : hf) { - v8::Handle key = TRI_V8_STD_STRING(it.first); - v8::Handle val = TRI_V8_STD_STRING(it.second); - - headers->ForceSet(key, val); - } - - result->ForceSet(TRI_V8_ASCII_STRING("headers"), headers); - - // and returns - return scope.Escape(result); -} diff --git a/arangosh/V8Client/V8ClientConnection.h b/arangosh/V8Client/V8ClientConnection.h deleted file mode 100644 index fb91ab99ac..0000000000 --- a/arangosh/V8Client/V8ClientConnection.h +++ /dev/null @@ -1,335 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Achim Brandt -//////////////////////////////////////////////////////////////////////////////// - -#ifndef ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H -#define ARANGOSH_V8_CLIENT_V8_CLIENT_CONNECTION_H 1 - -#include "Basics/Common.h" -#include "Rest/HttpRequest.h" - -#include - -namespace arangodb { -namespace httpclient { -class GeneralClientConnection; -class SimpleHttpClient; -class SimpleHttpResult; -} - -namespace rest { -class Endpoint; -} -} - -namespace arangodb { -namespace v8client { - -//////////////////////////////////////////////////////////////////////////////// -/// @brief class for http requests -//////////////////////////////////////////////////////////////////////////////// - -class V8ClientConnection { - private: - V8ClientConnection(V8ClientConnection const&); - V8ClientConnection& operator=(V8ClientConnection const&); - - public: - V8ClientConnection(arangodb::rest::Endpoint*, std::string, std::string const&, - std::string const&, double, double, size_t, uint32_t, - bool); - - ~V8ClientConnection(); - - public: - ////////////////////////////////////////////////////////////////////////////// - /// @brief request location rewriter (injects database name) - ////////////////////////////////////////////////////////////////////////////// - - static std::string rewriteLocation(void*, std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief returns true if it is connected - ////////////////////////////////////////////////////////////////////////////// - - bool isConnected(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief set the current operation to interrupted - ////////////////////////////////////////////////////////////////////////////// - - void setInterrupted(bool); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief returns the current database name - ////////////////////////////////////////////////////////////////////////////// - - std::string const& getDatabaseName(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief set the current database name - ////////////////////////////////////////////////////////////////////////////// - - void setDatabaseName(std::string const&); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief returns the version and build number of the arango server - ////////////////////////////////////////////////////////////////////////////// - - std::string const& getVersion(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief returns the server mode - ////////////////////////////////////////////////////////////////////////////// - - std::string const& getMode(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief get the last http return code - /// - /// @return int the code - ////////////////////////////////////////////////////////////////////////////// - - int getLastHttpReturnCode(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief get the last error message - /// - /// @return string the error message - ////////////////////////////////////////////////////////////////////////////// - - std::string const& getErrorMessage(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief get the endpoint string - /// - /// @return string - ////////////////////////////////////////////////////////////////////////////// - - std::string getEndpointSpecification(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief get the simple http client - /// - /// @return arangodb::httpclient::SimpleHttpClient* then client connection - ////////////////////////////////////////////////////////////////////////////// - - arangodb::httpclient::SimpleHttpClient* getHttpClient(); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "GET" request - /// - /// @param string location the request location - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle getData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "DELETE" request - /// - /// @param string location the request location - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle deleteData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "HEAD" request - /// - /// @param string location the request location - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle headData( - v8::Isolate* isolate, std::string const& location, - std::map const& headerFields, bool raw); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do an "OPTIONS" request - /// - /// @param string location the request location - /// @param string body the request body - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle optionsData( - v8::Isolate* isolate, std::string const& location, - std::string const& body, - std::map const& headerFields, bool raw); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "POST" request - /// - /// @param string location the request location - /// @param string body the request body - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle postData( - v8::Isolate* isolate, std::string const& location, - std::string const& body, - std::map const& headerFields, bool raw); - - v8::Handle postData( - v8::Isolate* isolate, std::string const& location, char const* body, - size_t bodySize, std::map const& headerFields); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "PUT" request - /// - /// @param string location the request location - /// @param string body the request body - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle putData( - v8::Isolate* isolate, std::string const& location, - std::string const& body, - std::map const& headerFields, bool raw); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief do a "PATCH" request - /// - /// @param string location the request location - /// @param string body the request body - /// @param map headerFields additional header fields - /// @param raw return the raw response - /// - /// @return v8::Value a V8 JavaScript object - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle patchData( - v8::Isolate* isolate, std::string const& location, - std::string const& body, - std::map const& headerFields, bool raw); - - private: - ////////////////////////////////////////////////////////////////////////////// - /// @brief executes a request - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle requestData( - v8::Isolate* isolate, rest::HttpRequest::HttpRequestType method, - std::string const& location, char const* body, size_t bodySize, - std::map const& headerFields); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief executes a request - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle requestData( - v8::Isolate* isolate, rest::HttpRequest::HttpRequestType method, - std::string const& location, std::string const& body, - std::map const& headerFields); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief handles a result - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle handleResult(v8::Isolate* isolate); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief executes a request and returns raw response - ////////////////////////////////////////////////////////////////////////////// - - v8::Handle requestDataRaw( - v8::Isolate* isolate, rest::HttpRequest::HttpRequestType method, - std::string const& location, std::string const& body, - std::map const& headerFields); - - private: - ////////////////////////////////////////////////////////////////////////////// - /// @brief connection - ////////////////////////////////////////////////////////////////////////////// - - arangodb::httpclient::GeneralClientConnection* _connection; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief database name - ////////////////////////////////////////////////////////////////////////////// - - std::string _databaseName; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief server version - ////////////////////////////////////////////////////////////////////////////// - - std::string _version; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief mode - ////////////////////////////////////////////////////////////////////////////// - - std::string _mode; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief last http return code - ////////////////////////////////////////////////////////////////////////////// - - int _lastHttpReturnCode; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief last error message - ////////////////////////////////////////////////////////////////////////////// - - std::string _lastErrorMessage; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief underlying client - ////////////////////////////////////////////////////////////////////////////// - - arangodb::httpclient::SimpleHttpClient* _client; - - ////////////////////////////////////////////////////////////////////////////// - /// @brief last result - ////////////////////////////////////////////////////////////////////////////// - - arangodb::httpclient::SimpleHttpResult* _httpResult; -}; -} -} - -#endif diff --git a/arangosh/V8Client/arangodump.cpp b/arangosh/V8Client/arangodump.cpp deleted file mode 100644 index a618da048d..0000000000 --- a/arangosh/V8Client/arangodump.cpp +++ /dev/null @@ -1,1412 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Jan Steemann -//////////////////////////////////////////////////////////////////////////////// - -#include "Basics/Common.h" - -#include - -#include -#include - -#include "ArangoShell/ArangoClient.h" -#include "Basics/FileUtils.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/StringUtils.h" -#include "Basics/VelocyPackHelper.h" -#include "Basics/VelocyPackHelper.h" -#include "Basics/files.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Rest/Endpoint.h" -#include "Rest/HttpResponse.h" -#include "Rest/InitializeRest.h" -#include "Rest/SslInterface.h" -#include "SimpleHttpClient/GeneralClientConnection.h" -#include "SimpleHttpClient/SimpleHttpClient.h" -#include "SimpleHttpClient/SimpleHttpResult.h" - -using namespace arangodb; -using namespace arangodb::basics; -using namespace arangodb::httpclient; -using namespace arangodb::rest; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief base class for clients -//////////////////////////////////////////////////////////////////////////////// - -ArangoClient BaseClient("arangodump"); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief the initial default connection -//////////////////////////////////////////////////////////////////////////////// - -arangodb::httpclient::GeneralClientConnection* Connection = nullptr; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief HTTP client -//////////////////////////////////////////////////////////////////////////////// - -arangodb::httpclient::SimpleHttpClient* Client = nullptr; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief chunk size -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t ChunkSize = 1024 * 1024 * 2; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief max chunk size -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t MaxChunkSize = 1024 * 1024 * 12; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief collections -//////////////////////////////////////////////////////////////////////////////// - -static std::vector Collections; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief include system collections -//////////////////////////////////////////////////////////////////////////////// - -static bool IncludeSystemCollections; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief output directory -//////////////////////////////////////////////////////////////////////////////// - -static std::string OutputDirectory; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief overwrite output directory -//////////////////////////////////////////////////////////////////////////////// - -static bool Overwrite = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief progress -//////////////////////////////////////////////////////////////////////////////// - -static bool Progress = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief go on even in the face of errors -//////////////////////////////////////////////////////////////////////////////// - -static bool Force = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief save data -//////////////////////////////////////////////////////////////////////////////// - -static bool DumpData = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief first tick to be included in data dump -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t TickStart = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief last tick to be included in data dump -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t TickEnd = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief our batch id -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t BatchId = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief cluster mode flag -//////////////////////////////////////////////////////////////////////////////// - -static bool clusterMode = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief statistics -//////////////////////////////////////////////////////////////////////////////// - -static struct { - uint64_t _totalBatches; - uint64_t _totalCollections; - uint64_t _totalWritten; -} Stats; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses the program options -//////////////////////////////////////////////////////////////////////////////// - -static void ParseProgramOptions(int argc, char* argv[]) { - ProgramOptionsDescription description("STANDARD options"); - - description("collection", &Collections, - "restrict to collection name (can be specified multiple times)")( - "initial-batch-size", &ChunkSize, - "initial size for individual data batches (in bytes)")( - "batch-size", &MaxChunkSize, - "maximum size for individual data batches (in bytes)")( - "dump-data", &DumpData, "dump collection data")( - "force", &Force, - "continue dumping even in the face of some server-side errors")( - "include-system-collections", &IncludeSystemCollections, - "include system collections")("output-directory", &OutputDirectory, - "output directory")( - "overwrite", &Overwrite, "overwrite data in output directory")( - "progress", &Progress, "show progress")( - "tick-start", &TickStart, "only include data after this tick")( - "tick-end", &TickEnd, "last tick to be included in data dump"); - - BaseClient.setupGeneral(description); - BaseClient.setupServer(description); - - std::vector arguments; - description.arguments(&arguments); - - ProgramOptions options; - BaseClient.parse(options, description, "", argc, argv, "arangodump.conf"); - - if (1 == arguments.size()) { - OutputDirectory = arguments[0]; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup and exit functions -//////////////////////////////////////////////////////////////////////////////// - -static void LocalEntryFunction(); -static void LocalExitFunction(int, void*); - -#ifdef _WIN32 - -// ............................................................................. -// Call this function to do various initializations for windows only -// ............................................................................. - -static void LocalEntryFunction() { - int maxOpenFiles = 1024; - int res = 0; - - // ........................................................................... - // Uncomment this to call this for extended debug information. - // If you familiar with valgrind ... then this is not like that, however - // you do get some similar functionality. - // ........................................................................... - // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); - - res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, - (char const*)(&maxOpenFiles)); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); - if (res != 0) { - _exit(1); - } - - TRI_Application_Exit_SetExit(LocalExitFunction); -} - -static void LocalExitFunction(int exitCode, void* data) { - int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - exit(1); - } - - exit(exitCode); -} -#else - -static void LocalEntryFunction() {} - -static void LocalExitFunction(int exitCode, void* data) {} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extract an error message from a response -//////////////////////////////////////////////////////////////////////////////// - -static std::string GetHttpErrorMessage(SimpleHttpResult* result) { - std::string details; - try { - std::shared_ptr parsedBody = result->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - - std::string const& errorMessage = - arangodb::basics::VelocyPackHelper::getStringValue(body, "errorMessage", - ""); - int errorNum = arangodb::basics::VelocyPackHelper::getNumericValue( - body, "errorNum", 0); - - if (errorMessage != "" && errorNum > 0) { - details = - ": ArangoError " + StringUtils::itoa(errorNum) + ": " + errorMessage; - } - } catch (...) { - // No action, fallthrough for error - } - return "got error from server: HTTP " + - StringUtils::itoa(result->getHttpReturnCode()) + " (" + - result->getHttpReturnMessage() + ")" + details; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief fetch the version from the server -//////////////////////////////////////////////////////////////////////////////// - -static std::string GetArangoVersion() { - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_GET, "/_api/version", nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - return ""; - } - - std::string version; - - if (response->getHttpReturnCode() == HttpResponse::OK) { - // default value - version = "arango"; - try { - std::shared_ptr parsedBody = response->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - - // look up "server" value - std::string const server = - arangodb::basics::VelocyPackHelper::getStringValue(body, "server", - ""); - - // "server" value is a string and content is "arango" - if (server == "arango") { - // look up "version" value - version = arangodb::basics::VelocyPackHelper::getStringValue( - body, "version", ""); - } - - } catch (...) { - // No Action - } - } else { - if (response->wasHttpError()) { - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - } - - Connection->disconnect(); - } - - return version; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief check if server is a coordinator of a cluster -//////////////////////////////////////////////////////////////////////////////// - -static bool GetArangoIsCluster() { - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_GET, "/_admin/server/role", "", 0)); - - if (response == nullptr || !response->isComplete()) { - return false; - } - - std::string role = "UNDEFINED"; - - if (response->getHttpReturnCode() == HttpResponse::OK) { - try { - std::shared_ptr parsedBody = response->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - role = arangodb::basics::VelocyPackHelper::getStringValue(body, "role", - "UNDEFINED"); - } catch (...) { - // No Action - } - } else { - if (response->wasHttpError()) { - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - } - - Connection->disconnect(); - } - - return role == "COORDINATOR"; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief start a batch -//////////////////////////////////////////////////////////////////////////////// - -static int StartBatch(std::string DBserver, std::string& errorMsg) { - std::string const url = "/_api/replication/batch"; - std::string const body = "{\"ttl\":300}"; - - std::string urlExt; - if (!DBserver.empty()) { - urlExt = "?DBserver=" + DBserver; - } - - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_POST, url + urlExt, body.c_str(), body.size())); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - if (Force) { - return TRI_ERROR_NO_ERROR; - } - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = "got invalid response from server: HTTP " + - StringUtils::itoa(response->getHttpReturnCode()) + ": " + - response->getHttpReturnMessage(); - - return TRI_ERROR_INTERNAL; - } - - std::shared_ptr parsedBody; - try { - parsedBody = response->getBodyVelocyPack(); - } catch (...) { - errorMsg = "got malformed JSON"; - return TRI_ERROR_INTERNAL; - } - VPackSlice const resBody = parsedBody->slice(); - - // look up "id" value - std::string const id = - arangodb::basics::VelocyPackHelper::getStringValue(resBody, "id", ""); - - BatchId = StringUtils::uint64(id); - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prolongs a batch -//////////////////////////////////////////////////////////////////////////////// - -static void ExtendBatch(std::string DBserver) { - TRI_ASSERT(BatchId > 0); - - std::string const url = - "/_api/replication/batch/" + StringUtils::itoa(BatchId); - std::string const body = "{\"ttl\":300}"; - std::string urlExt; - if (!DBserver.empty()) { - urlExt = "?DBserver=" + DBserver; - } - - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_PUT, url + urlExt, body.c_str(), body.size())); - - // ignore any return value -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief end a batch -//////////////////////////////////////////////////////////////////////////////// - -static void EndBatch(std::string DBserver) { - TRI_ASSERT(BatchId > 0); - - std::string const url = - "/_api/replication/batch/" + StringUtils::itoa(BatchId); - std::string urlExt; - if (!DBserver.empty()) { - urlExt = "?DBserver=" + DBserver; - } - - BatchId = 0; - - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_DELETE, url + urlExt, nullptr, 0)); - - // ignore any return value -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief dump a single collection -//////////////////////////////////////////////////////////////////////////////// - -static int DumpCollection(int fd, std::string const& cid, - std::string const& name, uint64_t maxTick, - std::string& errorMsg) { - uint64_t chunkSize = ChunkSize; - - std::string const baseUrl = "/_api/replication/dump?collection=" + cid + - "&ticks=false&flush=false"; - - uint64_t fromTick = TickStart; - - while (true) { - std::string url = baseUrl + "&from=" + StringUtils::itoa(fromTick) + - "&chunkSize=" + StringUtils::itoa(chunkSize); - - if (maxTick > 0) { - url += "&to=" + StringUtils::itoa(maxTick); - } - - Stats._totalBatches++; - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - errorMsg = - "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = GetHttpErrorMessage(response.get()); - - return TRI_ERROR_INTERNAL; - } - - int res = TRI_ERROR_NO_ERROR; // just to please the compiler - bool checkMore = false; - bool found; - - // TODO: fix hard-coded headers - std::string header = - response->getHeaderField("x-arango-replication-checkmore", found); - - if (found) { - checkMore = StringUtils::boolean(header); - res = TRI_ERROR_NO_ERROR; - - if (checkMore) { - // TODO: fix hard-coded headers - header = response->getHeaderField("x-arango-replication-lastincluded", - found); - - if (found) { - uint64_t tick = StringUtils::uint64(header); - - if (tick > fromTick) { - fromTick = tick; - } else { - // we got the same tick again, this indicates we're at the end - checkMore = false; - } - } - } - } - - if (!found) { - errorMsg = "got invalid response server: required header is missing"; - res = TRI_ERROR_REPLICATION_INVALID_RESPONSE; - } - - if (res == TRI_ERROR_NO_ERROR) { - StringBuffer const& body = response->getBody(); - - if (!TRI_WritePointer(fd, body.c_str(), body.length())) { - res = TRI_ERROR_CANNOT_WRITE_FILE; - } else { - Stats._totalWritten += (uint64_t)body.length(); - } - } - - if (res != TRI_ERROR_NO_ERROR) { - return res; - } - - if (!checkMore || fromTick == 0) { - // done - return res; - } - - if (chunkSize < MaxChunkSize) { - // adaptively increase chunksize - chunkSize = static_cast(chunkSize * 1.5); - - if (chunkSize > MaxChunkSize) { - chunkSize = MaxChunkSize; - } - } - } - - TRI_ASSERT(false); - return TRI_ERROR_INTERNAL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief execute a WAL flush request -//////////////////////////////////////////////////////////////////////////////// - -static void FlushWal() { - std::string const url = - "/_admin/wal/flush?waitForSync=true&waitForCollector=true"; - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_PUT, url, nullptr, 0)); - - if (response == nullptr || !response->isComplete() || - response->wasHttpError()) { - std::cerr << "got invalid response from server: " + - Client->getErrorMessage() << std::endl; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief dump data from server -//////////////////////////////////////////////////////////////////////////////// - -static int RunDump(std::string& errorMsg) { - std::string const url = - "/_api/replication/inventory?includeSystem=" + - std::string(IncludeSystemCollections ? "true" : "false"); - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = "got invalid response from server: HTTP " + - StringUtils::itoa(response->getHttpReturnCode()) + ": " + - response->getHttpReturnMessage(); - return TRI_ERROR_INTERNAL; - } - - FlushWal(); - std::shared_ptr parsedBody; - try { - parsedBody = response->getBodyVelocyPack(); - } catch (...) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - VPackSlice const body = parsedBody->slice(); - - if (!body.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - VPackSlice const collections = body.get("collections"); - - if (!collections.isArray()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - // read the server's max tick value - std::string const tickString = - arangodb::basics::VelocyPackHelper::getStringValue(body, "tick", ""); - - if (tickString == "") { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - std::cout << "Last tick provided by server is: " << tickString << std::endl; - - uint64_t maxTick = StringUtils::uint64(tickString); - // check if the user specified a max tick value - if (TickEnd > 0 && maxTick > TickEnd) { - maxTick = TickEnd; - } - - try { - VPackBuilder meta; - meta.openObject(); - meta.add("database", VPackValue(BaseClient.databaseName())); - meta.add("lastTickAtDumpStart", VPackValue(tickString)); - - // save last tick in file - std::string fileName = - OutputDirectory + TRI_DIR_SEPARATOR_STR + "dump.json"; - - int fd; - - // remove an existing file first - if (TRI_ExistsFile(fileName.c_str())) { - TRI_UnlinkFile(fileName.c_str()); - } - - fd = TRI_CREATE(fileName.c_str(), O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, - S_IRUSR | S_IWUSR); - - if (fd < 0) { - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - meta.close(); - - std::string const metaString = meta.slice().toJson(); - if (!TRI_WritePointer(fd, metaString.c_str(), metaString.size())) { - TRI_CLOSE(fd); - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - TRI_CLOSE(fd); - } catch (...) { - errorMsg = "out of memory"; - - return TRI_ERROR_OUT_OF_MEMORY; - } - - // create a lookup table for collections - std::map restrictList; - for (size_t i = 0; i < Collections.size(); ++i) { - restrictList.insert(std::pair(Collections[i], true)); - } - - // iterate over collections - for (VPackSlice const& collection : VPackArrayIterator(collections)) { - if (!collection.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - VPackSlice const parameters = collection.get("parameters"); - - if (!parameters.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - std::string const cid = arangodb::basics::VelocyPackHelper::getStringValue( - parameters, "cid", ""); - std::string const name = arangodb::basics::VelocyPackHelper::getStringValue( - parameters, "name", ""); - bool const deleted = arangodb::basics::VelocyPackHelper::getBooleanValue( - parameters, "deleted", false); - int type = arangodb::basics::VelocyPackHelper::getNumericValue( - parameters, "type", 2); - std::string const collectionType(type == 2 ? "document" : "edge"); - - if (cid == "" || name == "") { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - if (deleted) { - continue; - } - - if (name[0] == '_' && !IncludeSystemCollections) { - continue; - } - - if (!restrictList.empty() && - restrictList.find(name) == restrictList.end()) { - // collection name not in list - continue; - } - - std::string const hexString(arangodb::rest::SslInterface::sslMD5(name)); - - // found a collection! - if (Progress) { - std::cout << "# Dumping " << collectionType << " collection '" << name - << "'..." << std::endl; - } - - // now save the collection meta data and/or the actual data - Stats._totalCollections++; - - { - // save meta data - std::string fileName = OutputDirectory + TRI_DIR_SEPARATOR_STR + name + - "_" + hexString + ".structure.json"; - - int fd; - - // remove an existing file first - if (TRI_ExistsFile(fileName.c_str())) { - TRI_UnlinkFile(fileName.c_str()); - } - - fd = TRI_CREATE(fileName.c_str(), - O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, - S_IRUSR | S_IWUSR); - - if (fd < 0) { - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - std::string const collectionInfo = collection.toJson(); - - if (!TRI_WritePointer(fd, collectionInfo.c_str(), - collectionInfo.size())) { - TRI_CLOSE(fd); - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - TRI_CLOSE(fd); - } - - if (DumpData) { - // save the actual data - std::string fileName; - fileName = OutputDirectory + TRI_DIR_SEPARATOR_STR + name + "_" + - hexString + ".data.json"; - - int fd; - - // remove an existing file first - if (TRI_ExistsFile(fileName.c_str())) { - TRI_UnlinkFile(fileName.c_str()); - } - - fd = TRI_CREATE(fileName.c_str(), - O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, - S_IRUSR | S_IWUSR); - - if (fd < 0) { - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - ExtendBatch(""); - int res = DumpCollection(fd, cid, name, maxTick, errorMsg); - - TRI_CLOSE(fd); - - if (res != TRI_ERROR_NO_ERROR) { - if (errorMsg.empty()) { - errorMsg = "cannot write to file '" + fileName + "'"; - } - - return res; - } - } - } - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief dump a single shard, that is a collection on a DBserver -//////////////////////////////////////////////////////////////////////////////// - -static int DumpShard(int fd, std::string const& DBserver, - std::string const& name, std::string& errorMsg) { - std::string const baseUrl = "/_api/replication/dump?DBserver=" + DBserver + - "&collection=" + name + "&chunkSize=" + - StringUtils::itoa(ChunkSize) + - "&ticks=false"; - - uint64_t fromTick = 0; - uint64_t maxTick = UINT64_MAX; - - while (1) { - std::string url = baseUrl + "&from=" + StringUtils::itoa(fromTick); - - if (maxTick > 0) { - url += "&to=" + StringUtils::itoa(maxTick); - } - - Stats._totalBatches++; - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - errorMsg = - "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = GetHttpErrorMessage(response.get()); - - return TRI_ERROR_INTERNAL; - } - - int res = TRI_ERROR_NO_ERROR; // just to please the compiler - bool checkMore = false; - bool found; - - // TODO: fix hard-coded headers - std::string header = - response->getHeaderField("x-arango-replication-checkmore", found); - - if (found) { - checkMore = StringUtils::boolean(header); - res = TRI_ERROR_NO_ERROR; - - if (checkMore) { - // TODO: fix hard-coded headers - header = response->getHeaderField("x-arango-replication-lastincluded", - found); - - if (found) { - uint64_t tick = StringUtils::uint64(header); - - if (tick > fromTick) { - fromTick = tick; - } else { - // we got the same tick again, this indicates we're at the end - checkMore = false; - } - } - } - } - - if (!found) { - errorMsg = "got invalid response server: required header is missing"; - res = TRI_ERROR_REPLICATION_INVALID_RESPONSE; - } - - if (res == TRI_ERROR_NO_ERROR) { - StringBuffer const& body = response->getBody(); - - if (!TRI_WritePointer(fd, body.c_str(), body.length())) { - res = TRI_ERROR_CANNOT_WRITE_FILE; - } else { - Stats._totalWritten += (uint64_t)body.length(); - } - } - - if (res != TRI_ERROR_NO_ERROR) { - return res; - } - - if (!checkMore || fromTick == 0) { - // done - return res; - } - } - - TRI_ASSERT(false); - return TRI_ERROR_INTERNAL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief dump data from cluster via a coordinator -//////////////////////////////////////////////////////////////////////////////// - -static int RunClusterDump(std::string& errorMsg) { - int res; - - std::string const url = - "/_api/replication/clusterInventory?includeSystem=" + - std::string(IncludeSystemCollections ? "true" : "false"); - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_GET, url, nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = "got invalid response from server: HTTP " + - StringUtils::itoa(response->getHttpReturnCode()) + ": " + - response->getHttpReturnMessage(); - - return TRI_ERROR_INTERNAL; - } - - std::shared_ptr parsedBody; - try { - parsedBody = response->getBodyVelocyPack(); - } catch (...) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - VPackSlice const body = parsedBody->slice(); - - if (!body.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - VPackSlice const collections = body.get("collections"); - - if (!collections.isArray()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - // create a lookup table for collections - std::map restrictList; - for (size_t i = 0; i < Collections.size(); ++i) { - restrictList.insert(std::pair(Collections[i], true)); - } - - // iterate over collections - for (auto const& collection : VPackArrayIterator(collections)) { - if (!collection.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - VPackSlice const parameters = collection.get("parameters"); - - if (!parameters.isObject()) { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - std::string const id = arangodb::basics::VelocyPackHelper::getStringValue( - parameters, "id", ""); - std::string const name = arangodb::basics::VelocyPackHelper::getStringValue( - parameters, "name", ""); - bool const deleted = arangodb::basics::VelocyPackHelper::getBooleanValue( - parameters, "deleted", false); - - if (id == "" || name == "") { - errorMsg = "got malformed JSON response from server"; - - return TRI_ERROR_INTERNAL; - } - - if (deleted) { - continue; - } - - if (name[0] == '_' && !IncludeSystemCollections) { - continue; - } - - if (!restrictList.empty() && - restrictList.find(name) == restrictList.end()) { - // collection name not in list - continue; - } - - // found a collection! - if (Progress) { - std::cout << "# Dumping collection '" << name << "'..." << std::endl; - } - - // now save the collection meta data and/or the actual data - Stats._totalCollections++; - - { - // save meta data - std::string fileName = - OutputDirectory + TRI_DIR_SEPARATOR_STR + name + ".structure.json"; - - // remove an existing file first - if (TRI_ExistsFile(fileName.c_str())) { - TRI_UnlinkFile(fileName.c_str()); - } - - int fd = TRI_CREATE(fileName.c_str(), - O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, - S_IRUSR | S_IWUSR); - - if (fd < 0) { - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - std::string const collectionInfo = collection.toJson(); - - if (!TRI_WritePointer(fd, collectionInfo.c_str(), - collectionInfo.size())) { - TRI_CLOSE(fd); - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - TRI_CLOSE(fd); - } - - if (DumpData) { - // save the actual data - - // Now set up the output file: - std::string const hexString(arangodb::rest::SslInterface::sslMD5(name)); - std::string fileName = OutputDirectory + TRI_DIR_SEPARATOR_STR + name + - "_" + hexString + ".data.json"; - - // remove an existing file first - if (TRI_ExistsFile(fileName.c_str())) { - TRI_UnlinkFile(fileName.c_str()); - } - - int fd = TRI_CREATE(fileName.c_str(), - O_CREAT | O_EXCL | O_RDWR | TRI_O_CLOEXEC, - S_IRUSR | S_IWUSR); - - if (fd < 0) { - errorMsg = "cannot write to file '" + fileName + "'"; - - return TRI_ERROR_CANNOT_WRITE_FILE; - } - - // First we have to go through all the shards, what are they? - VPackSlice const shards = parameters.get("shards"); - - // Iterate over the Map of shardId to server list - for (auto const it : VPackObjectIterator(shards)) { - TRI_ASSERT(it.key.isString()); - - std::string shardName = it.key.copyString(); - - if (! it.value.isArray() || it.value.length() == 0 || !it.value[0].isString()) { - TRI_CLOSE(fd); - errorMsg = "unexpected value for 'shards' attribute"; - - return TRI_ERROR_BAD_PARAMETER; - } - - std::string DBserver = it.value[0].copyString(); - - if (Progress) { - std::cout << "# Dumping shard '" << shardName << "' from DBserver '" - << DBserver << "' ..." << std::endl; - } - res = StartBatch(DBserver, errorMsg); - if (res != TRI_ERROR_NO_ERROR) { - TRI_CLOSE(fd); - return res; - } - res = DumpShard(fd, DBserver, shardName, errorMsg); - if (res != TRI_ERROR_NO_ERROR) { - TRI_CLOSE(fd); - return res; - } - EndBatch(DBserver); - } - - res = TRI_CLOSE(fd); - - if (res != TRI_ERROR_NO_ERROR) { - if (errorMsg.empty()) { - errorMsg = "cannot write to file '" + fileName + "'"; - } - - return res; - } - } - } - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief request location rewriter (injects database name) -//////////////////////////////////////////////////////////////////////////////// - -static std::string rewriteLocation(void* data, std::string const& location) { - if (location.substr(0, 5) == "/_db/") { - // location already contains /_db/ - return location; - } - - if (location[0] == '/') { - return "/_db/" + BaseClient.databaseName() + location; - } else { - return "/_db/" + BaseClient.databaseName() + "/" + location; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief main -//////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char* argv[]) { - int ret = EXIT_SUCCESS; - - LocalEntryFunction(); - - TRIAGENS_REST_INITIALIZE(argc, argv); - - Logger::initialize(false); - - // ............................................................................. - // set defaults - // ............................................................................. - - int err = 0; - OutputDirectory = FileUtils::currentDirectory(&err) - .append(TRI_DIR_SEPARATOR_STR) - .append("dump"); - BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); - - // ............................................................................. - // parse the program options - // ............................................................................. - - ParseProgramOptions(argc, argv); - - // use a minimum value for batches - if (ChunkSize < 1024 * 128) { - ChunkSize = 1024 * 128; - } - if (MaxChunkSize < ChunkSize) { - MaxChunkSize = ChunkSize; - } - - if (TickStart < TickEnd) { - std::cerr << "Error: invalid values for --tick-start or --tick-end" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (!OutputDirectory.empty() && - OutputDirectory.back() == TRI_DIR_SEPARATOR_CHAR) { - // trim trailing slash from path because it may cause problems on ... - // Windows - TRI_ASSERT(OutputDirectory.size() > 0); - OutputDirectory.pop_back(); - } - - // ............................................................................. - // create output directory - // ............................................................................. - - bool isDirectory = false; - bool isEmptyDirectory = false; - - if (!OutputDirectory.empty()) { - isDirectory = TRI_IsDirectory(OutputDirectory.c_str()); - - if (isDirectory) { - std::vector files(TRI_FullTreeDirectory(OutputDirectory.c_str())); - // we don't care if the target directory is empty - isEmptyDirectory = (files.empty()); // TODO: TRI_FullTreeDirectory always returns at least one element (""), even if directory is empty? - } - } - - if (OutputDirectory.empty() || - (TRI_ExistsFile(OutputDirectory.c_str()) && !isDirectory)) { - std::cerr << "Error: cannot write to output directory '" << OutputDirectory - << "'" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (isDirectory && !isEmptyDirectory && !Overwrite) { - std::cerr - << "Error: output directory '" << OutputDirectory - << "' already exists. use \"--overwrite true\" to overwrite data in it" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // ............................................................................. - // set-up client connection - // ............................................................................. - - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - std::cerr << "invalid value for --server.endpoint ('" - << BaseClient.endpointString() << "')" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - Connection = GeneralClientConnection::factory( - BaseClient.endpointServer(), BaseClient.requestTimeout(), - BaseClient.connectTimeout(), ArangoClient::DEFAULT_RETRIES, - BaseClient.sslProtocol()); - - if (Connection == nullptr) { - std::cerr << "out of memory" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - Client = new SimpleHttpClient(Connection, BaseClient.requestTimeout(), false); - - Client->setLocationRewriter(0, &rewriteLocation); - Client->setUserNamePassword("/", BaseClient.username(), - BaseClient.password()); - - std::string const versionString = GetArangoVersion(); - - if (!Connection->isConnected()) { - std::cerr << "Could not connect to endpoint '" - << BaseClient.endpointString() << "', database: '" - << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'" << std::endl; - std::cerr << "Error message: '" << Client->getErrorMessage() << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // successfully connected - std::cout << "Server version: " << versionString << std::endl; - - // validate server version - int major = 0; - int minor = 0; - - if (sscanf(versionString.c_str(), "%d.%d", &major, &minor) != 2) { - std::cerr << "Error: invalid server version '" << versionString << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (major != 3) { - // we can connect to 3.x - std::cerr << "Error: got incompatible server version '" << versionString - << "'" << std::endl; - if (!Force) { - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - } - - if (major >= 2) { - // Version 1.4 did not yet have a cluster mode - clusterMode = GetArangoIsCluster(); - if (clusterMode) { - if (TickStart != 0 || TickEnd != 0) { - std::cerr << "Error: cannot use tick-start or tick-end on a cluster" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - } - } - - if (!Connection->isConnected()) { - std::cerr << "Lost connection to endpoint '" << BaseClient.endpointString() - << "', database: '" << BaseClient.databaseName() - << "', username: '" << BaseClient.username() << "'" << std::endl; - std::cerr << "Error message: '" << Client->getErrorMessage() << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (!isDirectory) { - long systemError; - std::string errorMessage; - int res = - TRI_CreateDirectory(OutputDirectory.c_str(), systemError, errorMessage); - - if (res != TRI_ERROR_NO_ERROR) { - std::cerr << "Error: unable to create output directory '" - << OutputDirectory << "': " << errorMessage << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - } - - if (Progress) { - std::cout << "Connected to ArangoDB '" << BaseClient.endpointString() - << "', database: '" << BaseClient.databaseName() - << "', username: '" << BaseClient.username() << "'" << std::endl; - - std::cout << "Writing dump to output directory '" << OutputDirectory << "'" - << std::endl; - } - - memset(&Stats, 0, sizeof(Stats)); - - std::string errorMsg = ""; - - int res; - - try { - if (!clusterMode) { - res = StartBatch("", errorMsg); - if (res != TRI_ERROR_NO_ERROR && Force) { - res = TRI_ERROR_NO_ERROR; - } - - if (res == TRI_ERROR_NO_ERROR) { - res = RunDump(errorMsg); - } - - if (BatchId > 0) { - EndBatch(""); - } - } else { // clusterMode == true - res = RunClusterDump(errorMsg); - } - } catch (std::exception const& ex) { - std::cerr << "Error: caught exception " << ex.what() << std::endl; - res = TRI_ERROR_INTERNAL; - } catch (...) { - std::cerr << "Error: caught unknown exception" << std::endl; - res = TRI_ERROR_INTERNAL; - } - - if (res != TRI_ERROR_NO_ERROR) { - if (!errorMsg.empty()) { - std::cerr << "Error: " << errorMsg << std::endl; - } else { - std::cerr << "An error occurred" << std::endl; - } - ret = EXIT_FAILURE; - } - - if (Progress) { - if (DumpData) { - std::cout << "Processed " << Stats._totalCollections << " collection(s), " - << "wrote " << Stats._totalWritten - << " byte(s) into datafiles, " - << "sent " << Stats._totalBatches << " batch(es)" << std::endl; - } else { - std::cout << "Processed " << Stats._totalCollections << " collection(s)" - << std::endl; - } - } - - delete Client; - - TRIAGENS_REST_SHUTDOWN; - - LocalExitFunction(ret, nullptr); - - return ret; -} diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp deleted file mode 100644 index 3642ebd211..0000000000 --- a/arangosh/V8Client/arangoimp.cpp +++ /dev/null @@ -1,484 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -//////////////////////////////////////////////////////////////////////////////// - -#include "ImportHelper.h" - -#include - -#include "ArangoShell/ArangoClient.h" -#include "Basics/FileUtils.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/files.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Rest/Endpoint.h" -#include "Rest/HttpResponse.h" -#include "Rest/InitializeRest.h" -#include "SimpleHttpClient/GeneralClientConnection.h" -#include "SimpleHttpClient/SimpleHttpClient.h" - -using namespace arangodb; -using namespace arangodb::basics; -using namespace arangodb::httpclient; -using namespace arangodb::rest; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief base class for clients -//////////////////////////////////////////////////////////////////////////////// - -ArangoClient BaseClient("arangoimp"); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief max size body size (used for imports) -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t ChunkSize = 1024 * 1024 * 16; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief quote character(s) -//////////////////////////////////////////////////////////////////////////////// - -static std::string Quote = "\""; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief separator -//////////////////////////////////////////////////////////////////////////////// - -static std::string Separator = ","; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief whether or not backslashes can be used to escape quotes -//////////////////////////////////////////////////////////////////////////////// - -static bool UseBackslash = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief file-name -//////////////////////////////////////////////////////////////////////////////// - -static std::string FileName = ""; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief collection-name -//////////////////////////////////////////////////////////////////////////////// - -static std::string CollectionName = ""; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief import type -//////////////////////////////////////////////////////////////////////////////// - -static std::string TypeImport = "json"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create collection if necessary -//////////////////////////////////////////////////////////////////////////////// - -static bool CreateCollection = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief collection type if collection is to be created -//////////////////////////////////////////////////////////////////////////////// - -static std::string CreateCollectionType = "document"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief whether or not to overwrite existing data in a collection -//////////////////////////////////////////////////////////////////////////////// - -static bool Overwrite = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief type of action to perform on duplicate _key -//////////////////////////////////////////////////////////////////////////////// - -static std::string OnDuplicateAction = "error"; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief progress -//////////////////////////////////////////////////////////////////////////////// - -static bool Progress = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses the program options -//////////////////////////////////////////////////////////////////////////////// - -static void ParseProgramOptions(int argc, char* argv[]) { - ProgramOptionsDescription deprecatedOptions("DEPRECATED options"); - - deprecatedOptions("max-upload-size", &ChunkSize, - "size for individual data batches (in bytes)"); - - ProgramOptionsDescription description("STANDARD options"); - - description("file", &FileName, "file name (\"-\" for STDIN)")( - "backslash-escape", &UseBackslash, - "use backslash as the escape character for quotes, used for csv")( - "batch-size", &ChunkSize, "size for individual data batches (in bytes)")( - "collection", &CollectionName, "collection name")( - "create-collection", &CreateCollection, - "create collection if it does not yet exist")( - "create-collection-type", &CreateCollectionType, - "type of collection if collection is created ('document' or 'edge')")( - "type", &TypeImport, "type of file (\"csv\", \"tsv\", or \"json\")")( - "overwrite", &Overwrite, - "overwrite collection if it exist (WARNING: this will remove any data " - "from the collection)")("quote", &Quote, - "quote character(s), used for csv")( - "separator", &Separator, "field separator, used for csv")( - "progress", &Progress, "show progress")( - "on-duplicate", &OnDuplicateAction, - "action to perform when a unique key constraint " - "violation occurs. Possible values: 'error', 'update', " - "'replace', 'ignore')")(deprecatedOptions, true); - - BaseClient.setupGeneral(description); - BaseClient.setupServer(description); - - std::vector arguments; - description.arguments(&arguments); - - ProgramOptions options; - BaseClient.parse(options, description, - "--file --type --collection ", - argc, argv, "arangoimp.conf"); - - if (FileName == "" && arguments.size() > 0) { - FileName = arguments[0]; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup and exit functions -//////////////////////////////////////////////////////////////////////////////// - -static void LocalEntryFunction(); -static void LocalExitFunction(int, void*); - -#ifdef _WIN32 - -// ............................................................................. -// Call this function to do various initializations for windows only -// ............................................................................. - -static void LocalEntryFunction() { - int maxOpenFiles = 1024; - int res = 0; - - // ........................................................................... - // Uncomment this to call this for extended debug information. - // If you familiar with valgrind ... then this is not like that, however - // you do get some similar functionality. - // ........................................................................... - // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); - - res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); - - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, - (char const*)(&maxOpenFiles)); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); - if (res != 0) { - _exit(1); - } - - TRI_Application_Exit_SetExit(LocalExitFunction); -} - -static void LocalExitFunction(int exitCode, void* data) { - int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - exit(1); - } - - exit(exitCode); -} -#else - -static void LocalEntryFunction() {} - -static void LocalExitFunction(int exitCode, void* data) {} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief request location rewriter (injects database name) -//////////////////////////////////////////////////////////////////////////////// - -static std::string RewriteLocation(void* data, std::string const& location) { - if (location.substr(0, 5) == "/_db/") { - // location already contains /_db/ - return location; - } - - if (location[0] == '/') { - return "/_db/" + BaseClient.databaseName() + location; - } else { - return "/_db/" + BaseClient.databaseName() + "/" + location; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief main -//////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char* argv[]) { - int ret = EXIT_SUCCESS; - - LocalEntryFunction(); - - TRIAGENS_REST_INITIALIZE(argc, argv); - - Logger::initialize(false); - - BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); - - // ............................................................................. - // parse the program options - // ............................................................................. - - ParseProgramOptions(argc, argv); - - // ............................................................................. - // set-up client connection - // ............................................................................. - - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - std::cerr << "invalid value for --server.endpoint ('" - << BaseClient.endpointString() << "')" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // create a connection - { - std::unique_ptr connection; - - connection.reset(GeneralClientConnection::factory( - BaseClient.endpointServer(), BaseClient.requestTimeout(), - BaseClient.connectTimeout(), ArangoClient::DEFAULT_RETRIES, - BaseClient.sslProtocol())); - - if (connection == nullptr) { - std::cerr << "out of memory" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // simple http client is only valid inside this scope - { - SimpleHttpClient client(connection.get(), BaseClient.requestTimeout(), - false); - - client.setLocationRewriter(nullptr, &RewriteLocation); - client.setUserNamePassword("/", BaseClient.username(), - BaseClient.password()); - - // must stay here in order to establish the connection - client.getServerVersion(); - - if (!connection->isConnected()) { - std::cerr << "Could not connect to endpoint '" - << BaseClient.endpointString() << "', database: '" - << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'" << std::endl; - std::cerr << "Error message: '" << client.getErrorMessage() << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // successfully connected - std::cout << "Connected to ArangoDB '" - << BaseClient.endpointServer()->getSpecification() - << "', version " << client.getServerVersion() << ", database: '" - << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'" << std::endl; - - std::cout << "----------------------------------------" << std::endl; - std::cout << "database: " << BaseClient.databaseName() - << std::endl; - std::cout << "collection: " << CollectionName << std::endl; - std::cout << "create: " << (CreateCollection ? "yes" : "no") - << std::endl; - std::cout << "file: " << FileName << std::endl; - std::cout << "type: " << TypeImport << std::endl; - - if (TypeImport == "csv") { - std::cout << "quote: " << Quote << std::endl; - std::cout << "separator: " << Separator << std::endl; - } - - std::cout << "connect timeout: " << BaseClient.connectTimeout() - << std::endl; - std::cout << "request timeout: " << BaseClient.requestTimeout() - << std::endl; - std::cout << "----------------------------------------" << std::endl; - - arangodb::v8client::ImportHelper ih(&client, ChunkSize); - - // create colletion - if (CreateCollection) { - ih.setCreateCollection(true); - } - - if (CreateCollectionType == "document" || - CreateCollectionType == "edge") { - ih.setCreateCollectionType(CreateCollectionType); - } - - ih.setOverwrite(Overwrite); - ih.useBackslash(UseBackslash); - - // quote - if (Quote.length() <= 1) { - ih.setQuote(Quote); - } else { - std::cerr << "Wrong length of quote character." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // separator - if (Separator.length() == 1) { - ih.setSeparator(Separator); - } else { - std::cerr << "Separator must be exactly one character." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // collection name - if (CollectionName == "") { - std::cerr << "Collection name is missing." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // filename - if (FileName == "") { - std::cerr << "File name is missing." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (FileName != "-" && !FileUtils::isRegularFile(FileName)) { - if (!FileUtils::exists(FileName)) { - std::cerr << "Cannot open file '" << FileName << "'. File not found." - << std::endl; - } else if (FileUtils::isDirectory(FileName)) { - std::cerr << "Specified file '" << FileName - << "' is a directory. Please use a regular file." - << std::endl; - } else { - std::cerr << "Cannot open '" << FileName << "'. Invalid file type." - << std::endl; - } - - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // progress - if (Progress) { - ih.setProgress(true); - } - - if (OnDuplicateAction != "error" && OnDuplicateAction != "update" && - OnDuplicateAction != "replace" && OnDuplicateAction != "ignore") { - std::cerr - << "Invalid value for '--on-duplicate'. Possible values: 'error', " - "'update', 'replace', 'ignore'." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - ih.setOnDuplicateAction(OnDuplicateAction); - - try { - bool ok = false; - - // import type - if (TypeImport == "csv") { - std::cout << "Starting CSV import..." << std::endl; - ok = ih.importDelimited(CollectionName, FileName, - arangodb::v8client::ImportHelper::CSV); - } - - else if (TypeImport == "tsv") { - std::cout << "Starting TSV import..." << std::endl; - ih.setQuote(""); - ih.setSeparator("\\t"); - ok = ih.importDelimited(CollectionName, FileName, - arangodb::v8client::ImportHelper::TSV); - } - - else if (TypeImport == "json") { - std::cout << "Starting JSON import..." << std::endl; - ok = ih.importJson(CollectionName, FileName); - } - - else { - std::cerr << "Wrong type '" << TypeImport << "'." << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - std::cout << std::endl; - - // give information about import - if (ok) { - std::cout << "created: " << ih.getNumberCreated() - << std::endl; - std::cout << "warnings/errors: " << ih.getNumberErrors() - << std::endl; - std::cout << "updated/replaced: " << ih.getNumberUpdated() - << std::endl; - std::cout << "ignored: " << ih.getNumberIgnored() - << std::endl; - - if (TypeImport == "csv" || TypeImport == "tsv") { - std::cout << "lines read: " << ih.getReadLines() << std::endl; - } - - } else { - std::cerr << "error message: " << ih.getErrorMessage() - << std::endl; - } - } catch (std::exception const& ex) { - std::cerr << "Caught exception " << ex.what() << " during import" - << std::endl; - } catch (...) { - std::cerr << "Got an unknown exception during import" << std::endl; - } - } - } - - TRIAGENS_REST_SHUTDOWN; - - LocalExitFunction(ret, nullptr); - - return ret; -} diff --git a/arangosh/V8Client/arangorestore.cpp b/arangosh/V8Client/arangorestore.cpp deleted file mode 100644 index 5ef84d92c9..0000000000 --- a/arangosh/V8Client/arangorestore.cpp +++ /dev/null @@ -1,1052 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Jan Steemann -//////////////////////////////////////////////////////////////////////////////// - -#include "Basics/Common.h" -#include "ArangoShell/ArangoClient.h" -#include "Basics/FileUtils.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/StringUtils.h" -#include "Basics/VelocyPackHelper.h" -#include "Basics/files.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Rest/Endpoint.h" -#include "Rest/HttpResponse.h" -#include "Rest/InitializeRest.h" -#include "Rest/SslInterface.h" -#include "SimpleHttpClient/GeneralClientConnection.h" -#include "SimpleHttpClient/SimpleHttpClient.h" -#include "SimpleHttpClient/SimpleHttpResult.h" - -#include -#include -#include -#include - -#include - -using namespace arangodb; -using namespace arangodb::basics; -using namespace arangodb::httpclient; -using namespace arangodb::rest; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief base class for clients -//////////////////////////////////////////////////////////////////////////////// - -ArangoClient BaseClient("arangorestore"); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief the initial default connection -//////////////////////////////////////////////////////////////////////////////// - -arangodb::httpclient::GeneralClientConnection* Connection = nullptr; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief HTTP client -//////////////////////////////////////////////////////////////////////////////// - -arangodb::httpclient::SimpleHttpClient* Client = nullptr; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief chunk size -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t ChunkSize = 1024 * 1024 * 8; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief collections -//////////////////////////////////////////////////////////////////////////////// - -static std::vector Collections; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief include system collections -//////////////////////////////////////////////////////////////////////////////// - -static bool IncludeSystemCollections; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create target database -//////////////////////////////////////////////////////////////////////////////// - -static bool CreateDatabase = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief input directory -//////////////////////////////////////////////////////////////////////////////// - -static std::string InputDirectory; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief import data -//////////////////////////////////////////////////////////////////////////////// - -static bool ImportData = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief import structure -//////////////////////////////////////////////////////////////////////////////// - -static bool ImportStructure = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief progress -//////////////////////////////////////////////////////////////////////////////// - -static bool Progress = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief overwrite collections if they exist -//////////////////////////////////////////////////////////////////////////////// - -static bool Overwrite = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief re-use collection ids and revision ids on import -//////////////////////////////////////////////////////////////////////////////// - -static bool RecycleIds = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief continue restore even in the face of errors -//////////////////////////////////////////////////////////////////////////////// - -static bool Force = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief cluster mode flag -//////////////////////////////////////////////////////////////////////////////// - -static bool ClusterMode = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief last error code received -//////////////////////////////////////////////////////////////////////////////// - -static int LastErrorCode = TRI_ERROR_NO_ERROR; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief default number of shards -//////////////////////////////////////////////////////////////////////////////// - -static int DefaultNumberOfShards = 1; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief statistics -//////////////////////////////////////////////////////////////////////////////// - -static struct { - uint64_t _totalBatches; - uint64_t _totalCollections; - uint64_t _totalRead; -} Stats; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses the program options -//////////////////////////////////////////////////////////////////////////////// - -static void ParseProgramOptions(int argc, char* argv[]) { - ProgramOptionsDescription description("STANDARD options"); - - description("collection", &Collections, - "restrict to collection name (can be specified multiple times)")( - "create-database", &CreateDatabase, - "create the target database if it does not exist")( - "batch-size", &ChunkSize, - "maximum size for individual data batches (in bytes)")( - "import-data", &ImportData, "import data into collection")( - "recycle-ids", &RecycleIds, - "recycle collection and revision ids from dump")( - "default-number-of-shards", &DefaultNumberOfShards, - "default value for numberOfShards if not specified")( - "force", &Force, - "continue restore even in the face of some server-side errors")( - "create-collection", &ImportStructure, "create collection structure")( - "include-system-collections", &IncludeSystemCollections, - "include system collections")("input-directory", &InputDirectory, - "input directory")( - "overwrite", &Overwrite, "overwrite collections if they exist")( - "progress", &Progress, "show progress"); - - BaseClient.setupGeneral(description); - BaseClient.setupServer(description); - - std::vector arguments; - description.arguments(&arguments); - - ProgramOptions options; - BaseClient.parse(options, description, "", argc, argv, "arangorestore.conf"); - - if (1 == arguments.size()) { - InputDirectory = arguments[0]; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup and exit functions -//////////////////////////////////////////////////////////////////////////////// - -static void LocalEntryFunction(); -static void LocalExitFunction(int, void*); - -#ifdef _WIN32 - -// ............................................................................. -// Call this function to do various initializations for windows only -// ............................................................................. - -static void LocalEntryFunction() { - int maxOpenFiles = 1024; - int res = 0; - - // ........................................................................... - // Uncomment this to call this for extended debug information. - // If you familiar with valgrind ... then this is not like that, however - // you do get some similar functionality. - // ........................................................................... - // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); - - res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, - (char const*)(&maxOpenFiles)); - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); - if (res != 0) { - _exit(1); - } - - TRI_Application_Exit_SetExit(LocalExitFunction); -} - -static void LocalExitFunction(int exitCode, void* data) { - int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - exit(1); - } - - exit(exitCode); -} -#else - -static void LocalEntryFunction() {} - -static void LocalExitFunction(int exitCode, void* data) {} - -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extract an error message from a response -//////////////////////////////////////////////////////////////////////////////// - -static std::string GetHttpErrorMessage(SimpleHttpResult* result) { - LastErrorCode = TRI_ERROR_NO_ERROR; - std::string details; - try { - std::shared_ptr parsedBody = result->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - - std::string const& errorMessage = - arangodb::basics::VelocyPackHelper::getStringValue(body, "errorMessage", - ""); - int const errorNum = - arangodb::basics::VelocyPackHelper::getNumericValue(body, - "errorNum", 0); - if (errorMessage != "" && errorNum > 0) { - details = - ": ArangoError " + StringUtils::itoa(errorNum) + ": " + errorMessage; - LastErrorCode = errorNum; - } - } catch (...) { - // No action - } - return "got error from server: HTTP " + - StringUtils::itoa(result->getHttpReturnCode()) + " (" + - result->getHttpReturnMessage() + ")" + details; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief try to create a database on the server -//////////////////////////////////////////////////////////////////////////////// - -static int TryCreateDatabase(std::string const& name) { - VPackBuilder builder; - builder.openObject(); - builder.add("name", VPackValue(name)); - builder.add("users", VPackValue(VPackValueType::Array)); - builder.openObject(); - builder.add("username", VPackValue(BaseClient.username())); - builder.add("passwd", VPackValue(BaseClient.password())); - builder.close(); - builder.close(); - - std::string const body = builder.slice().toJson(); - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_POST, "/_api/database", - body.c_str(), body.size())); - - if (response == nullptr || !response->isComplete()) { - return TRI_ERROR_INTERNAL; - } - - auto returnCode = response->getHttpReturnCode(); - - if (returnCode == HttpResponse::OK || returnCode == HttpResponse::CREATED) { - // all ok - return TRI_ERROR_NO_ERROR; - } else if (returnCode == HttpResponse::UNAUTHORIZED || - returnCode == HttpResponse::FORBIDDEN) { - // invalid authorization - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - return TRI_ERROR_FORBIDDEN; - } - - // any other error - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - return TRI_ERROR_INTERNAL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief fetch the version from the server -//////////////////////////////////////////////////////////////////////////////// - -static std::string GetArangoVersion() { - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_GET, "/_api/version", nullptr, 0)); - - if (response == nullptr || !response->isComplete()) { - return ""; - } - - std::string version; - - if (response->getHttpReturnCode() == HttpResponse::OK) { - // default value - version = "arango"; - - try { - // convert response body to VPack - std::shared_ptr parsedBody = response->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - - // look up "server" value - std::string const server = - arangodb::basics::VelocyPackHelper::getStringValue(body, "server", - ""); - - // "server" value is a string and content is "arango" - if (server == "arango") { - // look up "version" value - version = arangodb::basics::VelocyPackHelper::getStringValue( - body, "version", ""); - } - } catch (...) { - // No action - } - } else { - if (response->wasHttpError()) { - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - } - - Connection->disconnect(); - } - - return version; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief check if server is a coordinator of a cluster -//////////////////////////////////////////////////////////////////////////////// - -static bool GetArangoIsCluster() { - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_GET, "/_admin/server/role", "", 0)); - - if (response == nullptr || !response->isComplete()) { - return false; - } - - std::string role = "UNDEFINED"; - - if (response->getHttpReturnCode() == HttpResponse::OK) { - // convert response body to json - try { - std::shared_ptr parsedBody = response->getBodyVelocyPack(); - VPackSlice const body = parsedBody->slice(); - role = arangodb::basics::VelocyPackHelper::getStringValue(body, "role", - "UNDEFINED"); - } catch (...) { - // No action - } - } else { - if (response->wasHttpError()) { - Client->setErrorMessage(GetHttpErrorMessage(response.get()), false); - } - - Connection->disconnect(); - } - - return role == "COORDINATOR"; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief send the request to re-create a collection -//////////////////////////////////////////////////////////////////////////////// - -static int SendRestoreCollection(VPackSlice const& slice, - std::string const& name, - std::string& errorMsg) { - std::string url = - "/_api/replication/restore-collection" - "?overwrite=" + - std::string(Overwrite ? "true" : "false") + "&recycleIds=" + - std::string(RecycleIds ? "true" : "false") + "&force=" + - std::string(Force ? "true" : "false"); - - if (ClusterMode && - !slice.hasKey(std::vector({"parameters", "shards"})) && - !slice.hasKey( - std::vector({"parameters", "numberOfShards"}))) { - // no "shards" and no "numberOfShards" attribute present. now assume - // default value from --default-number-of-shards - std::cerr << "# no sharding information specified for collection '" << name - << "', using default number of shards " << DefaultNumberOfShards - << std::endl; - url += "&numberOfShards=" + std::to_string(DefaultNumberOfShards); - } - - std::string const body = slice.toJson(); - - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size())); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = GetHttpErrorMessage(response.get()); - if (LastErrorCode != TRI_ERROR_NO_ERROR) { - return LastErrorCode; - } - - return TRI_ERROR_INTERNAL; - } - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief send the request to re-create indexes for a collection -//////////////////////////////////////////////////////////////////////////////// - -static int SendRestoreIndexes(VPackSlice const& slice, std::string& errorMsg) { - std::string const url = "/_api/replication/restore-indexes?force=" + - std::string(Force ? "true" : "false"); - std::string const body = slice.toJson(); - - std::unique_ptr response(Client->request( - HttpRequest::HTTP_REQUEST_PUT, url, body.c_str(), body.size())); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = GetHttpErrorMessage(response.get()); - if (LastErrorCode != TRI_ERROR_NO_ERROR) { - return LastErrorCode; - } - - return TRI_ERROR_INTERNAL; - } - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief send the request to load data into a collection -//////////////////////////////////////////////////////////////////////////////// - -static int SendRestoreData(std::string const& cname, char const* buffer, - size_t bufferSize, std::string& errorMsg) { - std::string const url = "/_api/replication/restore-data?collection=" + - StringUtils::urlEncode(cname) + "&recycleIds=" + - (RecycleIds ? "true" : "false") + "&force=" + - (Force ? "true" : "false"); - - std::unique_ptr response( - Client->request(HttpRequest::HTTP_REQUEST_PUT, url, buffer, bufferSize)); - - if (response == nullptr || !response->isComplete()) { - errorMsg = "got invalid response from server: " + Client->getErrorMessage(); - - return TRI_ERROR_INTERNAL; - } - - if (response->wasHttpError()) { - errorMsg = GetHttpErrorMessage(response.get()); - if (LastErrorCode != TRI_ERROR_NO_ERROR) { - return LastErrorCode; - } - - return TRI_ERROR_INTERNAL; - } - - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief comparator to sort collections -/// sort order is by collection type first (vertices before edges, this is -/// because edges depend on vertices being there), then name -//////////////////////////////////////////////////////////////////////////////// - -static bool SortCollections(VPackSlice const& l, VPackSlice const& r) { - VPackSlice const& left = l.get("parameters"); - VPackSlice const& right = r.get("parameters"); - - int leftType = - arangodb::basics::VelocyPackHelper::getNumericValue(left, "type", 0); - int rightType = arangodb::basics::VelocyPackHelper::getNumericValue( - right, "type", 0); - - if (leftType != rightType) { - return leftType < rightType; - } - - std::string leftName = - arangodb::basics::VelocyPackHelper::getStringValue(left, "name", ""); - std::string rightName = - arangodb::basics::VelocyPackHelper::getStringValue(right, "name", ""); - - return strcasecmp(leftName.c_str(), rightName.c_str()) < 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief process all files from the input directory -//////////////////////////////////////////////////////////////////////////////// - -static int ProcessInputDirectory(std::string& errorMsg) { - // create a lookup table for collections - std::map restrictList; - for (size_t i = 0; i < Collections.size(); ++i) { - restrictList.insert(std::pair(Collections[i], true)); - } - try { - std::vector const files = FileUtils::listFiles(InputDirectory); - std::string const suffix = std::string(".structure.json"); - std::vector> collectionBuilders; - std::vector collections; - - // Step 1 determine all collections to process - { - // loop over all files in InputDirectory, and look for all structure.json - // files - for (std::string const& file : files) { - size_t const nameLength = file.size(); - - if (nameLength <= suffix.size() || - file.substr(file.size() - suffix.size()) != suffix) { - // some other file - continue; - } - - // found a structure.json file - std::string name = file.substr(0, file.size() - suffix.size()); - - if (!IncludeSystemCollections && name[0] == '_') { - continue; - } - - std::string const fqn = InputDirectory + TRI_DIR_SEPARATOR_STR + file; - std::shared_ptr fileContentBuilder = - arangodb::basics::VelocyPackHelper::velocyPackFromFile(fqn); - VPackSlice const fileContent = fileContentBuilder->slice(); - - if (!fileContent.isObject()) { - errorMsg = "could not read collection structure file '" + fqn + "'"; - return TRI_ERROR_INTERNAL; - } - - VPackSlice const parameters = fileContent.get("parameters"); - VPackSlice const indexes = fileContent.get("indexes"); - - if (!parameters.isObject() || !indexes.isArray()) { - errorMsg = "could not read collection structure file '" + fqn + "'"; - return TRI_ERROR_INTERNAL; - } - - std::string const cname = - arangodb::basics::VelocyPackHelper::getStringValue(parameters, - "name", ""); - - bool overwriteName = false; - - if (cname != name && - name != - (cname + "_" + arangodb::rest::SslInterface::sslMD5(cname))) { - // file has a different name than found in structure file - if (ImportStructure) { - // we cannot go on if there is a mismatch - errorMsg = - "collection name mismatch in collection structure file '" + - fqn + "' (offending value: '" + cname + "')"; - return TRI_ERROR_INTERNAL; - } else { - // we can patch the name in our array and go on - std::cout << "ignoring collection name mismatch in collection " - "structure file '" + - fqn + "' (offending value: '" + cname + - "')" << std::endl; - - overwriteName = true; - } - } - - if (!restrictList.empty() && - restrictList.find(cname) == restrictList.end()) { - // collection name not in list - continue; - } - - if (overwriteName) { - // TODO MAX - // Situation: - // Ich habe ein Json-Object von Datei (teile des Inhalts im Zweifel - // unbekannt) - // Es gibt ein Sub-Json-Object "parameters" mit einem Attribute "name" - // der gesetzt ist. - // Ich muss nur diesen namen überschreiben, der Rest soll identisch - // bleiben. - } else { - collectionBuilders.emplace_back(fileContentBuilder); - collections.emplace_back(fileContent); - } - } - } - - std::sort(collections.begin(), collections.end(), SortCollections); - - StringBuffer buffer(TRI_UNKNOWN_MEM_ZONE); - - // step2: run the actual import - for (VPackSlice const& collection : collections) { - VPackSlice const parameters = collection.get("parameters"); - VPackSlice const indexes = collection.get("indexes"); - std::string const cname = - arangodb::basics::VelocyPackHelper::getStringValue(parameters, "name", - ""); - int type = arangodb::basics::VelocyPackHelper::getNumericValue( - parameters, "type", 2); - - std::string const collectionType(type == 2 ? "document" : "edge"); - - if (ImportStructure) { - // re-create collection - if (Progress) { - if (Overwrite) { - std::cout << "# Re-creating " << collectionType << " collection '" - << cname << "'..." << std::endl; - } else { - std::cout << "# Creating " << collectionType << " collection '" - << cname << "'..." << std::endl; - } - } - - int res = SendRestoreCollection(collection, cname, errorMsg); - - if (res != TRI_ERROR_NO_ERROR) { - if (Force) { - std::cerr << errorMsg << std::endl; - continue; - } - return TRI_ERROR_INTERNAL; - } - } - Stats._totalCollections++; - - if (ImportData) { - // import data. check if we have a datafile - std::string datafile = - InputDirectory + TRI_DIR_SEPARATOR_STR + cname + "_" + - arangodb::rest::SslInterface::sslMD5(cname) + ".data.json"; - if (!TRI_ExistsFile(datafile.c_str())) { - datafile = - InputDirectory + TRI_DIR_SEPARATOR_STR + cname + ".data.json"; - } - - if (TRI_ExistsFile(datafile.c_str())) { - // found a datafile - - if (Progress) { - std::cout << "# Loading data into " << collectionType - << " collection '" << cname << "'..." << std::endl; - } - - int fd = TRI_OPEN(datafile.c_str(), O_RDONLY | TRI_O_CLOEXEC); - - if (fd < 0) { - errorMsg = "cannot open collection data file '" + datafile + "'"; - - return TRI_ERROR_INTERNAL; - } - - buffer.clear(); - - while (true) { - if (buffer.reserve(16384) != TRI_ERROR_NO_ERROR) { - TRI_CLOSE(fd); - errorMsg = "out of memory"; - - return TRI_ERROR_OUT_OF_MEMORY; - } - - ssize_t numRead = TRI_READ(fd, buffer.end(), 16384); - - if (numRead < 0) { - // error while reading - int res = TRI_errno(); - TRI_CLOSE(fd); - errorMsg = std::string(TRI_errno_string(res)); - - return res; - } - - // read something - buffer.increaseLength(numRead); - - Stats._totalRead += (uint64_t)numRead; - - if (buffer.length() < ChunkSize && numRead > 0) { - // still continue reading - continue; - } - - // do we have a buffer? - if (buffer.length() > 0) { - // look for the last \n in the buffer - char* found = (char*)memrchr((const void*)buffer.begin(), '\n', - buffer.length()); - size_t length; - - if (found == nullptr) { - // no \n found... - if (numRead == 0) { - // we're at the end. send the complete buffer anyway - length = buffer.length(); - } else { - // read more - continue; - } - } else { - // found a \n somewhere - length = found - buffer.begin(); - } - - TRI_ASSERT(length > 0); - - Stats._totalBatches++; - - int res = - SendRestoreData(cname, buffer.begin(), length, errorMsg); - - if (res != TRI_ERROR_NO_ERROR) { - TRI_CLOSE(fd); - if (errorMsg.empty()) { - errorMsg = std::string(TRI_errno_string(res)); - } else { - errorMsg = - std::string(TRI_errno_string(res)) + ": " + errorMsg; - } - - if (Force) { - std::cerr << errorMsg << std::endl; - continue; - } - - return res; - } - - buffer.erase_front(length); - } - - if (numRead == 0) { - // EOF - break; - } - } - - TRI_CLOSE(fd); - } - } - - if (ImportStructure) { - // re-create indexes - if (indexes.length() > 0) { - // we actually have indexes - if (Progress) { - std::cout << "# Creating indexes for collection '" << cname - << "'..." << std::endl; - } - - int res = SendRestoreIndexes(collection, errorMsg); - - if (res != TRI_ERROR_NO_ERROR) { - if (Force) { - std::cerr << errorMsg << std::endl; - continue; - } - return TRI_ERROR_INTERNAL; - } - } - } - } - } catch (...) { - errorMsg = "out of memory"; - return TRI_ERROR_OUT_OF_MEMORY; - } - return TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief request location rewriter (injects database name) -//////////////////////////////////////////////////////////////////////////////// - -static std::string rewriteLocation(void* data, std::string const& location) { - if (location.substr(0, 5) == "/_db/") { - // location already contains /_db/ - return location; - } - - if (location[0] == '/') { - return "/_db/" + BaseClient.databaseName() + location; - } else { - return "/_db/" + BaseClient.databaseName() + "/" + location; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief main -//////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char* argv[]) { - int ret = EXIT_SUCCESS; - - LocalEntryFunction(); - - TRIAGENS_REST_INITIALIZE(argc, argv); - - Logger::initialize(false); - - // ............................................................................. - // set defaults - // ............................................................................. - - BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); - - // ............................................................................. - // parse the program options - // ............................................................................. - - ParseProgramOptions(argc, argv); - - // use a minimum value for batches - if (ChunkSize < 1024 * 128) { - ChunkSize = 1024 * 128; - } - - if (!InputDirectory.empty() && - InputDirectory.back() == TRI_DIR_SEPARATOR_CHAR) { - // trim trailing slash from path because it may cause problems on ... - // Windows - TRI_ASSERT(InputDirectory.size() > 0); - InputDirectory.pop_back(); - } - - // ............................................................................. - // check input directory - // ............................................................................. - - if (InputDirectory == "" || !TRI_IsDirectory(InputDirectory.c_str())) { - std::cerr << "Error: input directory '" << InputDirectory - << "' does not exist" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (!ImportStructure && !ImportData) { - std::cerr - << "Error: must specify either --create-collection or --import-data" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // ............................................................................. - // set-up client connection - // ............................................................................. - - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - std::cerr << "Error: invalid value for --server.endpoint ('" - << BaseClient.endpointString() << "')" << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - Connection = GeneralClientConnection::factory( - BaseClient.endpointServer(), BaseClient.requestTimeout(), - BaseClient.connectTimeout(), ArangoClient::DEFAULT_RETRIES, - BaseClient.sslProtocol()); - - Client = new SimpleHttpClient(Connection, BaseClient.requestTimeout(), false); - - Client->setLocationRewriter(nullptr, &rewriteLocation); - Client->setUserNamePassword("/", BaseClient.username(), - BaseClient.password()); - - std::string versionString = GetArangoVersion(); - - if (CreateDatabase && LastErrorCode == TRI_ERROR_ARANGO_DATABASE_NOT_FOUND) { - // database not found, but database creation requested - - std::string old = BaseClient.databaseName(); - std::cout << "Creating database '" << old << "'" << std::endl; - - BaseClient.setDatabaseName("_system"); - - int res = TryCreateDatabase(old); - - if (res != TRI_ERROR_NO_ERROR) { - std::cerr << "Could not create database '" << old << "'" << std::endl; - std::cerr << "Error message: '" << Client->getErrorMessage() << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // restore old database name - BaseClient.setDatabaseName(old); - - // re-fetch version - versionString = GetArangoVersion(); - } - - if (!Connection->isConnected()) { - std::cerr << "Could not connect to endpoint " - << BaseClient.endpointServer()->getSpecification() << std::endl; - std::cerr << "Error message: '" << Client->getErrorMessage() << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - // successfully connected - std::cout << "Server version: " << versionString << std::endl; - - // validate server version - int major = 0; - int minor = 0; - - if (sscanf(versionString.c_str(), "%d.%d", &major, &minor) != 2) { - std::cerr << "Error: invalid server version '" << versionString << "'" - << std::endl; - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - if (major != 3) { - // we can connect to 3.x - std::cerr << "Error: got incompatible server version '" << versionString - << "'" << std::endl; - if (!Force) { - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - } - - if (major >= 2) { - // Version 1.4 did not yet have a cluster mode - ClusterMode = GetArangoIsCluster(); - } - - if (Progress) { - std::cout << "# Connected to ArangoDB '" - << BaseClient.endpointServer()->getSpecification() << "'" - << std::endl; - } - - memset(&Stats, 0, sizeof(Stats)); - - std::string errorMsg = ""; - - int res; - try { - res = ProcessInputDirectory(errorMsg); - } catch (std::exception const& ex) { - std::cerr << "Error: caught exception " << ex.what() << std::endl; - res = TRI_ERROR_INTERNAL; - } catch (...) { - std::cerr << "Error: caught unknown exception" << std::endl; - res = TRI_ERROR_INTERNAL; - } - - if (res != TRI_ERROR_NO_ERROR) { - if (!errorMsg.empty()) { - std::cerr << "Error: " << errorMsg << std::endl; - } else { - std::cerr << "An error occurred" << std::endl; - } - ret = EXIT_FAILURE; - } - - if (Progress) { - if (ImportData) { - std::cout << "Processed " << Stats._totalCollections << " collection(s), " - << "read " << Stats._totalRead << " byte(s) from datafiles, " - << "sent " << Stats._totalBatches << " batch(es)" << std::endl; - } else if (ImportStructure) { - std::cout << "Processed " << Stats._totalCollections << " collection(s)" - << std::endl; - } - } - - if (Client != nullptr) { - delete Client; - } - - TRIAGENS_REST_SHUTDOWN; - - LocalExitFunction(ret, nullptr); - - return ret; -} diff --git a/arangosh/V8Client/arangosh.cpp b/arangosh/V8Client/arangosh.cpp deleted file mode 100644 index 0b7c7c9aa5..0000000000 --- a/arangosh/V8Client/arangosh.cpp +++ /dev/null @@ -1,2621 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany -/// -/// Licensed under the Apache License, Version 2.0 (the "License"); -/// you may not use this file except in compliance with the License. -/// You may obtain a copy of the License at -/// -/// http://www.apache.org/licenses/LICENSE-2.0 -/// -/// Unless required by applicable law or agreed to in writing, software -/// distributed under the License is distributed on an "AS IS" BASIS, -/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -/// See the License for the specific language governing permissions and -/// limitations under the License. -/// -/// Copyright holder is ArangoDB GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -//////////////////////////////////////////////////////////////////////////////// - -#include "Basics/Common.h" - -#include - -#include -#include - -#include "ArangoShell/ArangoClient.h" -#include "Basics/Exceptions.h" -#include "Basics/FileUtils.h" -#include "Basics/Logger.h" -#include "Basics/ProgramOptions.h" -#include "Basics/ProgramOptionsDescription.h" -#include "Basics/StringUtils.h" -#include "Basics/Utf8Helper.h" -#include "Basics/files.h" -#include "Basics/messages.h" -#include "Basics/shell-colors.h" -#include "Basics/terminal-utils.h" -#include "Basics/tri-strings.h" -#include "Rest/Endpoint.h" -#include "Rest/HttpResponse.h" -#include "Rest/InitializeRest.h" -#include "Rest/Version.h" -#include "V8/JSLoader.h" -#include "V8/V8LineEditor.h" -#include "V8/v8-buffer.h" -#include "V8/v8-conv.h" -#include "V8/v8-shell.h" -#include "V8/v8-utils.h" -#include "V8Client/ImportHelper.h" -#include "V8Client/V8ClientConnection.h" - -#include "3rdParty/valgrind/valgrind.h" - -using namespace std; -using namespace arangodb::basics; -using namespace arangodb::rest; -using namespace arangodb::httpclient; -using namespace arangodb::v8client; - -using namespace arangodb; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief command prompt -//////////////////////////////////////////////////////////////////////////////// - -static std::string Prompt = "%E@%d> "; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief base class for clients -//////////////////////////////////////////////////////////////////////////////// - -ArangoClient BaseClient("arangosh"); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief the initial default connection -//////////////////////////////////////////////////////////////////////////////// - -V8ClientConnection* ClientConnection = nullptr; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief map of connection objects -//////////////////////////////////////////////////////////////////////////////// - -std::unordered_map> Connections; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Windows console codepage -//////////////////////////////////////////////////////////////////////////////// - -#ifdef _WIN32 -static int CodePage = -1; -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief object template for the initial connection -//////////////////////////////////////////////////////////////////////////////// - -v8::Persistent ConnectionTempl; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief max size body size (used for imports) -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t ChunkSize = 1024 * 1024 * 4; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup JavaScript files -//////////////////////////////////////////////////////////////////////////////// - -static JSLoader StartupLoader; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief path for JavaScript modules files -//////////////////////////////////////////////////////////////////////////////// - -static std::string StartupModules = ""; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief path for JavaScript files -//////////////////////////////////////////////////////////////////////////////// - -static std::string StartupPath = ""; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief put current directory into module path -//////////////////////////////////////////////////////////////////////////////// - -static bool UseCurrentModulePath = true; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief options to pass to V8 -//////////////////////////////////////////////////////////////////////////////// - -static std::string V8Options; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief javascript files to execute -//////////////////////////////////////////////////////////////////////////////// - -static std::vector ExecuteScripts; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief javascript string to execute -//////////////////////////////////////////////////////////////////////////////// - -static std::string ExecuteString; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief javascript files to syntax check -//////////////////////////////////////////////////////////////////////////////// - -static std::vector CheckScripts; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief unit file test cases -//////////////////////////////////////////////////////////////////////////////// - -static std::vector UnitTests; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief files to jslint -//////////////////////////////////////////////////////////////////////////////// - -static std::vector JsLint; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief garbage collection interval -//////////////////////////////////////////////////////////////////////////////// - -static uint64_t GcInterval = 10; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief voice mode -//////////////////////////////////////////////////////////////////////////////// - -static bool VoiceMode = false; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief outputs the arguments -/// -/// @FUN{internal.output(@FA{string1}, @FA{string2}, @FA{string3}, ...)} -/// -/// Outputs the arguments to standard output. -/// -/// @verbinclude fluent39 -//////////////////////////////////////////////////////////////////////////////// - -static void JS_PagerOutput(v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - for (int i = 0; i < args.Length(); i++) { - // extract the next argument - v8::Handle val = args[i]; - - std::string str = TRI_ObjectToString(val); - - BaseClient.internalPrint(str); - } - - TRI_V8_RETURN_UNDEFINED(); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief starts the output pager -//////////////////////////////////////////////////////////////////////////////// - -static void JS_StartOutputPager( - v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - - if (BaseClient.usePager()) { - BaseClient.internalPrint("Using pager already.\n"); - } else { - BaseClient.setUsePager(true); - BaseClient.internalPrint(std::string(std::string("Using pager ") + - BaseClient.outputPager() + - " for output buffering.\n")); - } - - TRI_V8_RETURN_UNDEFINED(); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief stops the output pager -//////////////////////////////////////////////////////////////////////////////// - -static void JS_StopOutputPager( - v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - - if (BaseClient.usePager()) { - BaseClient.internalPrint("Stopping pager.\n"); - } else { - BaseClient.internalPrint("Pager not running.\n"); - } - - BaseClient.setUsePager(false); - - TRI_V8_RETURN_UNDEFINED(); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief imports a CSV file -/// -/// @FUN{importCsvFile(@FA{filename}, @FA{collection})} -/// -/// Imports data of a CSV file. The data is imported to @FA{collection}. -////The separator is @CODE{\,} and the quote is @CODE{"}. -/// -/// @FUN{importCsvFile(@FA{filename}, @FA{collection}, @FA{options})} -/// -/// Imports data of a CSV file. The data is imported to @FA{collection}. -////The separator is @CODE{\,} and the quote is @CODE{"}. -//////////////////////////////////////////////////////////////////////////////// - -static void JS_ImportCsvFile(v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - - if (args.Length() < 2) { - TRI_V8_THROW_EXCEPTION_USAGE( - "importCsvFile(, [, ])"); - } - - // extract the filename - v8::String::Utf8Value filename(args[0]); - - if (*filename == nullptr) { - TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); - } - - v8::String::Utf8Value collection(args[1]); - - if (*collection == nullptr) { - TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); - } - - // extract the options - v8::Handle separatorKey = TRI_V8_ASCII_STRING("separator"); - v8::Handle quoteKey = TRI_V8_ASCII_STRING("quote"); - - std::string separator = ","; - std::string quote = "\""; - - if (3 <= args.Length()) { - v8::Handle options = args[2]->ToObject(); - // separator - if (options->Has(separatorKey)) { - separator = TRI_ObjectToString(options->Get(separatorKey)); - - if (separator.length() < 1) { - TRI_V8_THROW_EXCEPTION_PARAMETER( - ".separator must be at least one character"); - } - } - - // quote - if (options->Has(quoteKey)) { - quote = TRI_ObjectToString(options->Get(quoteKey)); - - if (quote.length() > 1) { - TRI_V8_THROW_EXCEPTION_PARAMETER( - ".quote must be at most one character"); - } - } - } - - ImportHelper ih(ClientConnection->getHttpClient(), ChunkSize); - - ih.setQuote(quote); - ih.setSeparator(separator.c_str()); - - std::string fileName = TRI_ObjectToString(args[0]); - std::string collectionName = TRI_ObjectToString(args[1]); - - if (ih.importDelimited(collectionName, fileName, ImportHelper::CSV)) { - v8::Handle result = v8::Object::New(isolate); - result->Set(TRI_V8_ASCII_STRING("lines"), - v8::Integer::New(isolate, (int32_t)ih.getReadLines())); - result->Set(TRI_V8_ASCII_STRING("created"), - v8::Integer::New(isolate, (int32_t)ih.getNumberCreated())); - result->Set(TRI_V8_ASCII_STRING("errors"), - v8::Integer::New(isolate, (int32_t)ih.getNumberErrors())); - result->Set(TRI_V8_ASCII_STRING("updated"), - v8::Integer::New(isolate, (int32_t)ih.getNumberUpdated())); - result->Set(TRI_V8_ASCII_STRING("ignored"), - v8::Integer::New(isolate, (int32_t)ih.getNumberIgnored())); - TRI_V8_RETURN(result); - } - - TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_FAILED, - ih.getErrorMessage().c_str()); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief imports a JSON file -/// -/// @FUN{importJsonFile(@FA{filename}, @FA{collection})} -/// -/// Imports data of a CSV file. The data is imported to @FA{collection}. -/// -//////////////////////////////////////////////////////////////////////////////// - -static void JS_ImportJsonFile(v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - - if (args.Length() < 2) { - TRI_V8_THROW_EXCEPTION_USAGE("importJsonFile(, )"); - } - - // extract the filename - v8::String::Utf8Value filename(args[0]); - - if (*filename == nullptr) { - TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); - } - - v8::String::Utf8Value collection(args[1]); - - if (*collection == nullptr) { - TRI_V8_THROW_TYPE_ERROR(" must be a UTF-8 filename"); - } - - ImportHelper ih(ClientConnection->getHttpClient(), ChunkSize); - - std::string fileName = TRI_ObjectToString(args[0]); - std::string collectionName = TRI_ObjectToString(args[1]); - - if (ih.importJson(collectionName, fileName)) { - v8::Handle result = v8::Object::New(isolate); - result->Set(TRI_V8_ASCII_STRING("lines"), - v8::Integer::New(isolate, (int32_t)ih.getReadLines())); - result->Set(TRI_V8_ASCII_STRING("created"), - v8::Integer::New(isolate, (int32_t)ih.getNumberCreated())); - result->Set(TRI_V8_ASCII_STRING("errors"), - v8::Integer::New(isolate, (int32_t)ih.getNumberErrors())); - result->Set(TRI_V8_ASCII_STRING("updated"), - v8::Integer::New(isolate, (int32_t)ih.getNumberUpdated())); - result->Set(TRI_V8_ASCII_STRING("ignored"), - v8::Integer::New(isolate, (int32_t)ih.getNumberIgnored())); - TRI_V8_RETURN(result); - } - - TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_FAILED, - ih.getErrorMessage().c_str()); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief normalizes UTF 16 strings -//////////////////////////////////////////////////////////////////////////////// - -static void JS_NormalizeString( - v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - if (args.Length() != 1) { - TRI_V8_THROW_EXCEPTION_USAGE("NORMALIZE_STRING()"); - } - - TRI_normalize_V8_Obj(args, args[0]); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief compare two UTF 16 strings -//////////////////////////////////////////////////////////////////////////////// - -static void JS_CompareString(v8::FunctionCallbackInfo const& args) { - TRI_V8_TRY_CATCH_BEGIN(isolate); - v8::HandleScope scope(isolate); - - if (args.Length() != 2) { - TRI_V8_THROW_EXCEPTION_USAGE( - "COMPARE_STRING(, )"); - } - - v8::String::Value left(args[0]); - v8::String::Value right(args[1]); - - int result = Utf8Helper::DefaultUtf8Helper.compareUtf16( - *left, left.length(), *right, right.length()); - - TRI_V8_RETURN(v8::Integer::New(isolate, result)); - TRI_V8_TRY_CATCH_END -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief enum for wrapped V8 objects -//////////////////////////////////////////////////////////////////////////////// - -enum WRAP_CLASS_TYPES { WRAP_TYPE_CONNECTION = 1 }; - -typedef enum __eRunMode { - eInteractive, - eExecuteScript, - eExecuteString, - eCheckScripts, - eUnitTests, - eJsLint -} eRunMode; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parses the program options -//////////////////////////////////////////////////////////////////////////////// - -static std::vector ParseProgramOptions(int argc, char* args[], - eRunMode* runMode) { - ProgramOptionsDescription description("STANDARD options"); - ProgramOptionsDescription javascript("JAVASCRIPT options"); - - javascript("javascript.execute", &ExecuteScripts, - "execute Javascript code from file")( - "javascript.execute-string", &ExecuteString, - "execute Javascript code from string")( - "javascript.check", &CheckScripts, - "syntax check code Javascript code from file")( - "javascript.gc-interval", &GcInterval, - "JavaScript request-based garbage collection interval (each x commands)")( - "javascript.startup-directory", &StartupPath, - "startup paths containing the JavaScript files")( - "javascript.unit-tests", &UnitTests, - "do not start as shell, run unit tests instead")( - "javascript.current-module-directory", &UseCurrentModulePath, - "add current directory to module path")( - "javascript.v8-options", &V8Options, "options to pass to v8")( - "jslint", &JsLint, "do not start as shell, run jslint instead"); - -#ifdef _WIN32 - description("code-page", &CodePage, "windows codepage"); -#endif - -#ifdef __APPLE__ - description("voice", "enable voice based welcome"); -#endif - - description("chunk-size", &ChunkSize, - "maximum size for individual data batches (in bytes)")( - "prompt", &Prompt, "command prompt")(javascript, false); - - std::vector arguments; - *runMode = eInteractive; - - description.arguments(&arguments); - - // fill in used options - BaseClient.setupGeneral(description); - BaseClient.setupColors(description); - BaseClient.setupAutoComplete(description); - BaseClient.setupPrettyPrint(description); - BaseClient.setupPager(description); - BaseClient.setupLog(description); - BaseClient.setupServer(description); - - // and parse the command line and config file - ProgramOptions options; - - std::string conf = TRI_BinaryName(args[0]) + ".conf"; - - BaseClient.parse(options, description, "", argc, args, conf); - - // derive other paths from `--javascript.directory` - StartupModules = StartupPath + TRI_DIR_SEPARATOR_STR + "client" + - TRI_DIR_SEPARATOR_STR + "modules;" + StartupPath + - TRI_DIR_SEPARATOR_STR + "common" + TRI_DIR_SEPARATOR_STR + - "modules;" + StartupPath + TRI_DIR_SEPARATOR_STR + "node"; - - if (UseCurrentModulePath) { - StartupModules += ";" + FileUtils::currentDirectory(); - } - - // turn on paging automatically if "pager" option is set - if (options.has("pager") && !options.has("use-pager")) { - BaseClient.setUsePager(true); - } - - // disable excessive output in non-interactive mode - if (!ExecuteScripts.empty() || !ExecuteString.empty() || - !CheckScripts.empty() || !UnitTests.empty() || !JsLint.empty()) { - BaseClient.shutup(); - } - - // voice mode - if (options.has("voice")) { - VoiceMode = true; - } - - if (!ExecuteScripts.empty()) { - *runMode = eExecuteScript; - } else if (!ExecuteString.empty()) { - *runMode = eExecuteString; - } else if (!CheckScripts.empty()) { - *runMode = eCheckScripts; - } else if (!UnitTests.empty()) { - *runMode = eUnitTests; - } else if (!JsLint.empty()) { - *runMode = eJsLint; - } - - // return the positional arguments - return arguments; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief copies v8::Object to std::map -//////////////////////////////////////////////////////////////////////////////// - -static void ObjectToMap(v8::Isolate* isolate, - std::map& myMap, - v8::Handle val) { - v8::Handle v8Headers = val.As(); - - if (v8Headers->IsObject()) { - v8::Handle const props = v8Headers->GetPropertyNames(); - - for (uint32_t i = 0; i < props->Length(); i++) { - v8::Handle key = props->Get(v8::Integer::New(isolate, i)); - myMap.emplace(TRI_ObjectToString(key), - TRI_ObjectToString(v8Headers->Get(key))); - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for queries (call the destructor here) -//////////////////////////////////////////////////////////////////////////////// - -static void DestroyConnection(V8ClientConnection* connection) { - TRI_ASSERT(connection != nullptr); - - auto it = Connections.find(connection); - - if (it != Connections.end()) { - (*it).second.Reset(); - Connections.erase(it); - } - - delete connection; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns a new client connection instance -//////////////////////////////////////////////////////////////////////////////// - -static V8ClientConnection* CreateConnection() { - return new V8ClientConnection( - BaseClient.endpointServer(), BaseClient.databaseName(), - BaseClient.username(), BaseClient.password(), BaseClient.requestTimeout(), - BaseClient.connectTimeout(), ArangoClient::DEFAULT_RETRIES, - BaseClient.sslProtocol(), false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for queries (call the destructor here) -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_DestructorCallback( - const v8::WeakCallbackData>& - data) { - auto persistent = data.GetParameter(); - auto myConnection = - v8::Local::New(data.GetIsolate(), *persistent); - auto connection = static_cast(myConnection->Value()); - - DestroyConnection(connection); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief wrap V8ClientConnection in a v8::Object -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle WrapV8ClientConnection( - v8::Isolate* isolate, V8ClientConnection* connection) { - v8::EscapableHandleScope scope(isolate); - auto localConnectionTempl = - v8::Local::New(isolate, ConnectionTempl); - v8::Handle result = localConnectionTempl->NewInstance(); - - auto myConnection = v8::External::New(isolate, connection); - result->SetInternalField(SLOT_CLASS_TYPE, - v8::Integer::New(isolate, WRAP_TYPE_CONNECTION)); - result->SetInternalField(SLOT_CLASS, myConnection); - Connections[connection].Reset(isolate, myConnection); - Connections[connection].SetWeak(&Connections[connection], - ClientConnection_DestructorCallback); - return scope.Escape(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection constructor -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_ConstructorCallback( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - if (args.Length() > 0 && args[0]->IsString()) { - std::string definition = TRI_ObjectToString(args[0]); - - BaseClient.createEndpoint(definition); - - if (BaseClient.endpointServer() == nullptr) { - std::string errorMessage = "error in '" + definition + "'"; - TRI_V8_THROW_EXCEPTION_PARAMETER(errorMessage.c_str()); - } - } - - if (BaseClient.endpointServer() == nullptr) { - TRI_V8_RETURN_UNDEFINED(); - } - - V8ClientConnection* connection = CreateConnection(); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY); - } - - if (connection->isConnected() && - connection->getLastHttpReturnCode() == HttpResponse::OK) { - ostringstream s; - s << "Connected to ArangoDB '" - << BaseClient.endpointServer()->getSpecification() << "', version " - << connection->getVersion() << " [" << connection->getMode() - << "], database '" << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'"; - BaseClient.printLine(s.str()); - } else { - std::string errorMessage = - "Could not connect. Error message: " + connection->getErrorMessage(); - delete connection; - TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT, - errorMessage.c_str()); - } - - TRI_V8_RETURN(WrapV8ClientConnection(isolate, connection)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "reconnect" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_reconnect( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() < 2) { - TRI_V8_THROW_EXCEPTION_USAGE( - "reconnect(, , [, , ])"); - } - - std::string const definition = TRI_ObjectToString(args[0]); - std::string databaseName = TRI_ObjectToString(args[1]); - - std::string username; - if (args.Length() < 3) { - username = BaseClient.username(); - } else { - username = TRI_ObjectToString(args[2]); - } - - std::string password; - if (args.Length() < 4) { - BaseClient.printContinuous("Please specify a password: "); - -// now prompt for it -#ifdef TRI_HAVE_TERMIOS_H - TRI_SetStdinVisibility(false); - getline(cin, password); - - TRI_SetStdinVisibility(true); -#else - getline(cin, password); -#endif - BaseClient.printLine(""); - } else { - password = TRI_ObjectToString(args[3]); - } - - std::string const oldDefinition = BaseClient.endpointString(); - std::string const oldDatabaseName = BaseClient.databaseName(); - std::string const oldUsername = BaseClient.username(); - std::string const oldPassword = BaseClient.password(); - - DestroyConnection(connection); - ClientConnection = nullptr; - - BaseClient.setEndpointString(definition); - BaseClient.setDatabaseName(databaseName); - BaseClient.setUsername(username); - BaseClient.setPassword(password); - - // re-connect using new options - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - BaseClient.setEndpointString(oldDefinition); - BaseClient.setDatabaseName(oldDatabaseName); - BaseClient.setUsername(oldUsername); - BaseClient.setPassword(oldPassword); - BaseClient.createEndpoint(); - - std::string errorMessage = "error in '" + definition + "'"; - TRI_V8_THROW_EXCEPTION_PARAMETER(errorMessage.c_str()); - } - - V8ClientConnection* newConnection = CreateConnection(); - - if (newConnection->isConnected() && - newConnection->getLastHttpReturnCode() == HttpResponse::OK) { - ostringstream s; - s << "Connected to ArangoDB '" - << BaseClient.endpointServer()->getSpecification() - << "' version: " << newConnection->getVersion() << " [" - << newConnection->getMode() << "], database: '" - << BaseClient.databaseName() << "', username: '" << BaseClient.username() - << "'"; - - BaseClient.printLine(s.str()); - - args.Holder()->SetInternalField(SLOT_CLASS, - v8::External::New(isolate, newConnection)); - - v8::Handle db = - isolate->GetCurrentContext()->Global()->Get(TRI_V8_ASCII_STRING("db")); - if (db->IsObject()) { - v8::Handle dbObj = v8::Handle::Cast(db); - - if (dbObj->Has(TRI_V8_ASCII_STRING("_flushCache")) && - dbObj->Get(TRI_V8_ASCII_STRING("_flushCache"))->IsFunction()) { - v8::Handle func = v8::Handle::Cast( - dbObj->Get(TRI_V8_ASCII_STRING("_flushCache"))); - - v8::Handle* args = nullptr; - func->Call(dbObj, 0, args); - } - } - - ClientConnection = newConnection; - - // ok - TRI_V8_RETURN_TRUE(); - } else { - ostringstream s; - s << "Could not connect to endpoint '" << BaseClient.endpointString() - << "', username: '" << BaseClient.username() << "'"; - BaseClient.printErrLine(s.str()); - - std::string errorMsg = "could not connect"; - if (newConnection->getErrorMessage() != "") { - errorMsg = newConnection->getErrorMessage(); - } - - delete newConnection; - - // rollback - BaseClient.setEndpointString(oldDefinition); - BaseClient.setDatabaseName(oldDatabaseName); - BaseClient.setUsername(oldUsername); - BaseClient.setPassword(oldPassword); - BaseClient.createEndpoint(); - - ClientConnection = CreateConnection(); - args.Holder()->SetInternalField( - SLOT_CLASS, v8::External::New(isolate, ClientConnection)); - - TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_SIMPLE_CLIENT_COULD_NOT_CONNECT, - errorMsg.c_str()); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "GET" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpGetAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("get([, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - // check header fields - std::map headerFields; - - if (args.Length() > 1) { - ObjectToMap(isolate, headerFields, args[1]); - } - - TRI_V8_RETURN(connection->getData(isolate, *url, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "GET" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpGet( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpGetAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "GET_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpGetRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpGetAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "HEAD" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpHeadAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("head([, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - - // check header fields - std::map headerFields; - - if (args.Length() > 1) { - ObjectToMap(isolate, headerFields, args[1]); - } - - TRI_V8_RETURN(connection->headData(isolate, *url, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "HEAD" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpHead( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpHeadAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "HEAD_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpHeadRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpHeadAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "DELETE" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpDeleteAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 1 || args.Length() > 2 || !args[0]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("delete([, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - - // check header fields - std::map headerFields; - - if (args.Length() > 1) { - ObjectToMap(isolate, headerFields, args[1]); - } - - TRI_V8_RETURN(connection->deleteData(isolate, *url, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "DELETE" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpDelete( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpDeleteAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "DELETE_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpDeleteRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpDeleteAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "OPTIONS" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpOptionsAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || - !args[1]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("options(, [, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - v8::String::Utf8Value body(args[1]); - - // check header fields - std::map headerFields; - - if (args.Length() > 2) { - ObjectToMap(isolate, headerFields, args[2]); - } - - TRI_V8_RETURN( - connection->optionsData(isolate, *url, *body, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "OPTIONS" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpOptions( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpOptionsAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "OPTIONS_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpOptionsRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpOptionsAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "POST" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPostAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || - !args[1]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("post(, [, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - v8::String::Utf8Value body(args[1]); - - // check header fields - std::map headerFields; - - if (args.Length() > 2) { - ObjectToMap(isolate, headerFields, args[2]); - } - - TRI_V8_RETURN(connection->postData(isolate, *url, *body, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "POST" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPost( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPostAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "POST_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPostRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPostAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PUT" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPutAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || - !args[1]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("put(, [, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - v8::String::Utf8Value body(args[1]); - - // check header fields - std::map headerFields; - - if (args.Length() > 2) { - ObjectToMap(isolate, headerFields, args[2]); - } - - TRI_V8_RETURN(connection->putData(isolate, *url, *body, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PUT" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPut( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPutAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PUT_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPutRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPutAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PATCH" helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPatchAny( - v8::FunctionCallbackInfo const& args, bool raw) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() < 2 || args.Length() > 3 || !args[0]->IsString() || - !args[1]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("patch(, [, ])"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - v8::String::Utf8Value body(args[1]); - - // check header fields - std::map headerFields; - - if (args.Length() > 2) { - ObjectToMap(isolate, headerFields, args[2]); - } - - TRI_V8_RETURN(connection->patchData(isolate, *url, *body, headerFields, raw)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PATCH" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPatch( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPatchAny(args, false); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "PATCH_RAW" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpPatchRaw( - v8::FunctionCallbackInfo const& args) { - ClientConnection_httpPatchAny(args, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection send file helper -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_httpSendFile( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("sendFile(, )"); - } - - TRI_Utf8ValueNFC url(TRI_UNKNOWN_MEM_ZONE, args[0]); - - std::string const infile = TRI_ObjectToString(args[1]); - - if (!TRI_ExistsFile(infile.c_str())) { - TRI_V8_THROW_EXCEPTION(TRI_ERROR_FILE_NOT_FOUND); - } - - size_t bodySize; - char* body = TRI_SlurpFile(TRI_UNKNOWN_MEM_ZONE, infile.c_str(), &bodySize); - - if (body == nullptr) { - TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_errno(), "could not read file"); - } - - v8::TryCatch tryCatch; - - // check header fields - std::map headerFields; - - v8::Handle result = - connection->postData(isolate, *url, body, bodySize, headerFields); - TRI_Free(TRI_UNKNOWN_MEM_ZONE, body); - - if (tryCatch.HasCaught()) { - // string exception = TRI_StringifyV8Exception(isolate, &tryCatch); - isolate->ThrowException(tryCatch.Exception()); - return; - } - - TRI_V8_RETURN(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "getEndpoint" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_getEndpoint( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("getEndpoint()"); - } - - std::string const endpoint = BaseClient.endpointString(); - TRI_V8_RETURN_STD_STRING(endpoint); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "lastError" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_lastHttpReturnCode( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("lastHttpReturnCode()"); - } - - TRI_V8_RETURN(v8::Integer::New(isolate, connection->getLastHttpReturnCode())); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "lastErrorMessage" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_lastErrorMessage( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - // check params - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("lastErrorMessage()"); - } - - TRI_V8_RETURN_STD_STRING(connection->getErrorMessage()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "isConnected" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_isConnected( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("isConnected()"); - } - - if (connection->isConnected()) { - TRI_V8_RETURN_TRUE(); - } else { - TRI_V8_RETURN_FALSE(); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "isConnected" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_toString( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("toString()"); - } - - std::string result = "[object ArangoConnection:" + - BaseClient.endpointServer()->getSpecification(); - - if (connection->isConnected()) { - result += "," + connection->getVersion() + ",connected]"; - } else { - result += ",unconnected]"; - } - - TRI_V8_RETURN_STD_STRING(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "getVersion" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_getVersion( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("getVersion()"); - } - - TRI_V8_RETURN_STD_STRING(connection->getVersion()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "getMode" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_getMode( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("getMode()"); - } - - TRI_V8_RETURN_STD_STRING(connection->getMode()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "getDatabaseName" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_getDatabaseName( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 0) { - TRI_V8_THROW_EXCEPTION_USAGE("getDatabaseName()"); - } - - TRI_V8_RETURN_STD_STRING(connection->getDatabaseName()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief ClientConnection method "setDatabaseName" -//////////////////////////////////////////////////////////////////////////////// - -static void ClientConnection_setDatabaseName( - v8::FunctionCallbackInfo const& args) { - v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); - - // get the connection - V8ClientConnection* connection = - TRI_UnwrapClass(args.Holder(), WRAP_TYPE_CONNECTION); - - if (connection == nullptr) { - TRI_V8_THROW_EXCEPTION_INTERNAL("connection class corrupted"); - } - - if (args.Length() != 1 || !args[0]->IsString()) { - TRI_V8_THROW_EXCEPTION_USAGE("setDatabaseName()"); - } - - std::string const dbName = TRI_ObjectToString(args[0]); - connection->setDatabaseName(dbName); - BaseClient.setDatabaseName(dbName); - - TRI_V8_RETURN_TRUE(); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief dynamically replace %d, %e, %u in the prompt -//////////////////////////////////////////////////////////////////////////////// - -static std::string BuildPrompt() { - std::string result; - - char const* p = Prompt.c_str(); - bool esc = false; - - while (true) { - char const c = *p; - - if (c == '\0') { - break; - } - - if (esc) { - if (c == '%') { - result.push_back(c); - } else if (c == 'd') { - result.append(BaseClient.databaseName()); - } else if (c == 'e' || c == 'E') { - std::string ep; - - if (ClientConnection == nullptr) { - ep = "none"; - } else { - ep = BaseClient.endpointString(); - } - - if (c == 'E') { - // replace protocol - if (ep.find("tcp://") == 0) { - ep = ep.substr(6); - } else if (ep.find("ssl://") == 0) { - ep = ep.substr(6); - } else if (ep.find("unix://") == 0) { - ep = ep.substr(7); - } - } - - result.append(ep); - } else if (c == 'u') { - result.append(BaseClient.username()); - } - - esc = false; - } else { - if (c == '%') { - esc = true; - } else { - result.push_back(c); - } - } - - ++p; - } - - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes the shell -//////////////////////////////////////////////////////////////////////////////// - -static int RunShell(v8::Isolate* isolate, v8::Handle context, - bool promptError) { - v8::Context::Scope contextScope(context); - v8::Local name(TRI_V8_ASCII_STRING(TRI_V8_SHELL_COMMAND_NAME)); - - auto cc = ClientConnection; - - V8LineEditor console(isolate, context, ".arangosh.history"); - console.setSignalFunction([&cc]() { - if (cc != nullptr) { - cc->setInterrupted(true); - } - }); - - console.open(BaseClient.autoComplete()); - - uint64_t nrCommands = 0; - -#ifdef __APPLE__ - if (VoiceMode) { - system("say -v zarvox 'welcome to Arango shell' &"); - } -#endif - - while (true) { - // set up prompts - std::string dynamicPrompt = BuildPrompt(); - - std::string goodPrompt; - std::string badPrompt; - -#if _WIN32 - - // ........................................................................................ - // Windows console is not coloured by escape sequences. So the method given - // below will not - // work. For now we simply ignore the colours until we move the windows - // version into - // a GUI Window. - // ........................................................................................ - - goodPrompt = badPrompt = dynamicPrompt; - -#else - - if (BaseClient.colors() && console.supportsColors()) { - // TODO: this should be a function defined in "console" - goodPrompt = - TRI_SHELL_COLOR_BOLD_GREEN + dynamicPrompt + TRI_SHELL_COLOR_RESET; - badPrompt = - TRI_SHELL_COLOR_BOLD_RED + dynamicPrompt + TRI_SHELL_COLOR_RESET; - } else { - goodPrompt = badPrompt = dynamicPrompt; - } - -#endif - - // gc - if (++nrCommands >= GcInterval) { - nrCommands = 0; - - TRI_RunGarbageCollectionV8(isolate, 500.0); - } - -#ifdef __APPLE__ - if (VoiceMode && promptError) { - system("say -v 'whisper' 'oh, no' &"); - } -#endif - - bool eof; - std::string input = console.prompt( - promptError ? badPrompt.c_str() : goodPrompt.c_str(), "arangosh", eof); - - if (eof) { - break; - } - - if (input.empty()) { - // input string is empty, but we must still free it - continue; - } - - BaseClient.log("%s%s\n", dynamicPrompt, input); - - std::string i = arangodb::basics::StringUtils::trim(input); - - if (i == "exit" || i == "quit" || i == "exit;" || i == "quit;") { - break; - } - - if (i == "help" || i == "help;") { - input = "help()"; - } - - console.addHistory(input); - - v8::TryCatch tryCatch; - - BaseClient.startPager(); - - // assume the command succeeds - promptError = false; - - console.setExecutingCommand(true); - - // execute command and register its result in __LAST__ - v8::Handle v = TRI_ExecuteJavaScriptString( - isolate, context, TRI_V8_STRING(input.c_str()), name, true); - - console.setExecutingCommand(false); - - if (v.IsEmpty()) { - context->Global()->Set(TRI_V8_ASCII_STRING("_last"), - v8::Undefined(isolate)); - } else { - context->Global()->Set(TRI_V8_ASCII_STRING("_last"), v); - } - - if (tryCatch.HasCaught()) { - // command failed - std::string exception; - - if (!tryCatch.CanContinue() || tryCatch.HasTerminated()) { - exception = "command locally aborted\n"; - } else { - exception = TRI_StringifyV8Exception(isolate, &tryCatch); - } - - BaseClient.printErrLine(exception); - BaseClient.log("%s", exception.c_str()); - - // this will change the prompt for the next round - promptError = true; - } - - if (ClientConnection) { - ClientConnection->setInterrupted(false); - } - - BaseClient.stopPager(); - BaseClient.printLine(""); - - BaseClient.log("%s\n", ""); - // make sure the last command result makes it into the log file - BaseClient.flushLog(); - } - -#ifdef __APPLE__ - if (VoiceMode) { - system("say -v zarvox 'Good-Bye' &"); - } -#endif - - BaseClient.printLine(""); - - BaseClient.printByeBye(); - - return promptError ? TRI_ERROR_INTERNAL : TRI_ERROR_NO_ERROR; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief runs the unit tests -//////////////////////////////////////////////////////////////////////////////// - -static bool RunUnitTests(v8::Isolate* isolate, - v8::Handle context) { - v8::TryCatch tryCatch; - v8::HandleScope scope(isolate); - - bool ok; - - // set-up unit tests array - v8::Handle sysTestFiles = v8::Array::New(isolate); - - for (size_t i = 0; i < UnitTests.size(); ++i) { - sysTestFiles->Set((uint32_t)i, TRI_V8_STD_STRING(UnitTests[i])); - } - - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_UNIT_TESTS"), sysTestFiles); - // do not use TRI_AddGlobalVariableVocBase because it creates read-only - // variables!! - context->Global()->Set(TRI_V8_ASCII_STRING("SYS_UNIT_TESTS_RESULT"), - v8::True(isolate)); - - // run tests - auto input = TRI_V8_ASCII_STRING( - "require(\"@arangodb/testrunner\").runCommandLineTests();"); - auto name = TRI_V8_ASCII_STRING(TRI_V8_SHELL_COMMAND_NAME); - TRI_ExecuteJavaScriptString(isolate, context, input, name, true); - - if (tryCatch.HasCaught()) { - std::string exception(TRI_StringifyV8Exception(isolate, &tryCatch)); - BaseClient.printErrLine(exception); - ok = false; - } else { - ok = TRI_ObjectToBoolean( - context->Global()->Get(TRI_V8_ASCII_STRING("SYS_UNIT_TESTS_RESULT"))); - } - - return ok; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes the Javascript files -//////////////////////////////////////////////////////////////////////////////// - -static bool RunScripts(v8::Isolate* isolate, v8::Handle context, - std::vector const& scripts, bool execute) { - v8::TryCatch tryCatch; - v8::HandleScope scope(isolate); - - bool ok = true; - - for (size_t i = 0; i < scripts.size(); ++i) { - if (!FileUtils::exists(scripts[i])) { - std::string msg = - "error: Javascript file not found: '" + scripts[i] + "'"; - - BaseClient.printErrLine(msg.c_str()); - BaseClient.log("%s", msg.c_str()); - - ok = false; - break; - } - - if (execute) { - v8::Handle name = TRI_V8_STD_STRING(scripts[i]); - v8::Handle args[] = {name}; - v8::Handle filename = args[0]; - - v8::Handle current = isolate->GetCurrentContext()->Global(); - auto oldFilename = current->Get(TRI_V8_ASCII_STRING("__filename")); - current->ForceSet(TRI_V8_ASCII_STRING("__filename"), filename); - - auto oldDirname = current->Get(TRI_V8_ASCII_STRING("__dirname")); - auto dirname = TRI_Dirname(TRI_ObjectToString(filename).c_str()); - current->ForceSet(TRI_V8_ASCII_STRING("__dirname"), - TRI_V8_STRING(dirname)); - TRI_FreeString(TRI_CORE_MEM_ZONE, dirname); - - ok = TRI_ExecuteGlobalJavaScriptFile(isolate, scripts[i].c_str()); - - // restore old values for __dirname and __filename - if (oldFilename.IsEmpty() || oldFilename->IsUndefined()) { - current->Delete(TRI_V8_ASCII_STRING("__filename")); - } else { - current->ForceSet(TRI_V8_ASCII_STRING("__filename"), oldFilename); - } - if (oldDirname.IsEmpty() || oldDirname->IsUndefined()) { - current->Delete(TRI_V8_ASCII_STRING("__dirname")); - } else { - current->ForceSet(TRI_V8_ASCII_STRING("__dirname"), oldDirname); - } - } else { - TRI_ParseJavaScriptFile(isolate, scripts[i].c_str()); - } - - if (tryCatch.HasCaught()) { - std::string exception(TRI_StringifyV8Exception(isolate, &tryCatch)); - - BaseClient.printErrLine(exception); - BaseClient.log("%s\n", exception.c_str()); - - ok = false; - break; - } - if (!ok) { - break; - } - } - - BaseClient.flushLog(); - - return ok; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes the Javascript string -//////////////////////////////////////////////////////////////////////////////// - -static bool RunString(v8::Isolate* isolate, v8::Handle context, - std::string const& script) { - v8::TryCatch tryCatch; - v8::HandleScope scope(isolate); - bool ok = true; - - v8::Handle result = - TRI_ExecuteJavaScriptString(isolate, context, TRI_V8_STD_STRING(script), - TRI_V8_ASCII_STRING("(command-line)"), false); - - if (tryCatch.HasCaught()) { - std::string exception(TRI_StringifyV8Exception(isolate, &tryCatch)); - - BaseClient.printErrLine(exception); - BaseClient.log("%s\n", exception.c_str()); - ok = false; - } else { - // check return value of script - if (result->IsNumber()) { - int64_t intResult = TRI_ObjectToInt64(result); - - if (intResult != 0) { - ok = false; - } - } - } - - BaseClient.flushLog(); - - return ok; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief runs the jslint tests -//////////////////////////////////////////////////////////////////////////////// - -static bool RunJsLint(v8::Isolate* isolate, v8::Handle context) { - v8::TryCatch tryCatch; - v8::HandleScope scope(isolate); - bool ok; - - // set-up jslint files array - v8::Handle sysTestFiles = v8::Array::New(isolate); - - for (size_t i = 0; i < JsLint.size(); ++i) { - sysTestFiles->Set((uint32_t)i, TRI_V8_STD_STRING(JsLint[i])); - } - - context->Global()->Set(TRI_V8_ASCII_STRING("SYS_UNIT_TESTS"), sysTestFiles); - context->Global()->Set(TRI_V8_ASCII_STRING("SYS_UNIT_TESTS_RESULT"), - v8::True(isolate)); - - // run tests - auto input = - TRI_V8_ASCII_STRING("require(\"jslint\").runCommandLineTests({ });"); - auto name = TRI_V8_ASCII_STRING(TRI_V8_SHELL_COMMAND_NAME); - TRI_ExecuteJavaScriptString(isolate, context, input, name, true); - - if (tryCatch.HasCaught()) { - BaseClient.printErrLine(TRI_StringifyV8Exception(isolate, &tryCatch)); - ok = false; - } else { - ok = TRI_ObjectToBoolean( - context->Global()->Get(TRI_V8_ASCII_STRING("SYS_UNIT_TESTS_RESULT"))); - } - - return ok; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief startup and exit functions -//////////////////////////////////////////////////////////////////////////////// - -void* arangoshResourcesAllocated = nullptr; -static void LocalEntryFunction(); -static void LocalExitFunction(int, void*); - -#ifdef _WIN32 - -// ............................................................................. -// Call this function to do various initializations for windows only -// -// TODO can we move this to a general function for all binaries? -// ............................................................................. - -void LocalEntryFunction() { - int maxOpenFiles = 1024; - int res = 0; - - // ........................................................................... - // Uncomment this to call this for extended debug information. - // If you familiar with valgrind ... then this is not like that, however - // you do get some similar functionality. - // ........................................................................... - // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); - - res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); - - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, - (char const*)(&maxOpenFiles)); - - if (res != 0) { - _exit(1); - } - - res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - _exit(1); - } - - TRI_Application_Exit_SetExit(LocalExitFunction); -} - -static void LocalExitFunction(int exitCode, void* data) { - int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); - - if (res != 0) { - exit(1); - } - - exit(exitCode); -} -#else - -static void LocalEntryFunction() {} - -static void LocalExitFunction(int exitCode, void* data) {} - -#endif - -static bool PrintHelo(bool useServer) { - bool promptError = false; - - // ............................................................................. - // banner - // ............................................................................. - - // http://www.network-science.de/ascii/ Font: ogre - - if (!BaseClient.quiet()) { -#ifdef _WIN32 - - // ............................................................................. - // Quick hack for windows - // ............................................................................. - - if (BaseClient.colors()) { - int greenColour = FOREGROUND_GREEN | FOREGROUND_INTENSITY; - int redColour = FOREGROUND_RED | FOREGROUND_INTENSITY; - int defaultColour = 0; - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - - if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), - &csbiInfo) != 0) { - defaultColour = csbiInfo.wAttributes; - } - - // not sure about the code page. let user set code page by command-line - // argument if required - if (CodePage > 0) { - SetConsoleOutputCP((UINT)CodePage); - } else { - UINT cp = GetConsoleOutputCP(); - SetConsoleOutputCP(cp); - } - - // TODO we should have a special "printf" which can handle the color - // escape sequences! - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf(" "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf(" _ "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf(" __ _ _ __ __ _ _ __ __ _ ___ "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf(" ___| |__ "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf(" / _` | '__/ _` | '_ \\ / _` |/ _ \\"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf("/ __| '_ \\ "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf("| (_| | | | (_| | | | | (_| | (_) "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf("\\__ \\ | | |"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf(" \\__,_|_| \\__,_|_| |_|\\__, |\\___/"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf("|___/_| |_|"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), greenColour); - printf(" |___/ "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), redColour); - printf(" "); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), defaultColour); - printf("\n"); - } - -#else - - char const* g = TRI_SHELL_COLOR_GREEN; - char const* r = TRI_SHELL_COLOR_RED; - char const* z = TRI_SHELL_COLOR_RESET; - - if (!BaseClient.colors()) { - g = ""; - r = ""; - z = ""; - } - - BaseClient.printLine(""); - - printf("%s %s _ %s\n", g, r, z); - printf("%s __ _ _ __ __ _ _ __ __ _ ___ %s ___| |__ %s\n", g, r, z); - printf("%s / _` | '__/ _` | '_ \\ / _` |/ _ \\%s/ __| '_ \\ %s\n", g, r, z); - printf("%s| (_| | | | (_| | | | | (_| | (_) %s\\__ \\ | | |%s\n", g, r, z); - printf("%s \\__,_|_| \\__,_|_| |_|\\__, |\\___/%s|___/_| |_|%s\n", g, r, - z); - printf("%s |___/ %s %s\n", g, r, z); - -#endif - BaseClient.printLine(""); - - ostringstream s; - s << "arangosh (" << arangodb::rest::Version::getVerboseVersionString() - << ")" << std::endl; - s << "Copyright (c) ArangoDB GmbH"; - - BaseClient.printLine(s.str(), true); - BaseClient.printLine("", true); - - BaseClient.printWelcomeInfo(); - - if (useServer) { - if (ClientConnection && ClientConnection->isConnected() && - ClientConnection->getLastHttpReturnCode() == HttpResponse::OK) { - ostringstream is; - is << "Connected to ArangoDB '" << BaseClient.endpointString() - << "' version: " << ClientConnection->getVersion() << " [" - << ClientConnection->getMode() << "], database: '" - << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'"; - - BaseClient.printLine(is.str(), true); - } else { - ostringstream is; - is << "Could not connect to endpoint '" << BaseClient.endpointString() - << "', database: '" << BaseClient.databaseName() << "', username: '" - << BaseClient.username() << "'"; - BaseClient.printErrLine(is.str()); - - if (ClientConnection && ClientConnection->getErrorMessage() != "") { - ostringstream is2; - is2 << "Error message '" << ClientConnection->getErrorMessage() - << "'"; - BaseClient.printErrLine(is2.str()); - } - promptError = true; - } - - BaseClient.printLine("", true); - } - } - - return promptError; -} - -static void InitCallbacks(v8::Isolate* isolate, bool useServer, - eRunMode runMode) { - auto context = isolate->GetCurrentContext(); - // set pretty print default: (used in print.js) - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("PRETTY_PRINT"), - v8::Boolean::New(isolate, BaseClient.prettyPrint())); - - // add colors for print.js - TRI_AddGlobalVariableVocbase(isolate, context, - TRI_V8_ASCII_STRING("COLOR_OUTPUT"), - v8::Boolean::New(isolate, BaseClient.colors())); - - // add function SYS_OUTPUT to use pager - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_OUTPUT"), - v8::FunctionTemplate::New(isolate, JS_PagerOutput)->GetFunction()); - - TRI_InitV8Buffer(isolate, context); - - TRI_InitV8Utils(isolate, context, StartupPath, StartupModules); - TRI_InitV8Shell(isolate, context); - - // ............................................................................. - // define ArangoConnection class - // ............................................................................. - - if (useServer) { - v8::Handle connection_templ = - v8::FunctionTemplate::New(isolate); - connection_templ->SetClassName(TRI_V8_ASCII_STRING("ArangoConnection")); - - v8::Handle connection_proto = - connection_templ->PrototypeTemplate(); - - connection_proto->Set( - isolate, "DELETE", - v8::FunctionTemplate::New(isolate, ClientConnection_httpDelete)); - connection_proto->Set( - isolate, "DELETE_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpDeleteRaw)); - connection_proto->Set( - isolate, "GET", - v8::FunctionTemplate::New(isolate, ClientConnection_httpGet)); - connection_proto->Set( - isolate, "GET_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpGetRaw)); - connection_proto->Set( - isolate, "HEAD", - v8::FunctionTemplate::New(isolate, ClientConnection_httpHead)); - connection_proto->Set( - isolate, "HEAD_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpHeadRaw)); - connection_proto->Set( - isolate, "OPTIONS", - v8::FunctionTemplate::New(isolate, ClientConnection_httpOptions)); - connection_proto->Set( - isolate, "OPTIONS_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpOptionsRaw)); - connection_proto->Set( - isolate, "PATCH", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPatch)); - connection_proto->Set( - isolate, "PATCH_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPatchRaw)); - connection_proto->Set( - isolate, "POST", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPost)); - connection_proto->Set( - isolate, "POST_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPostRaw)); - connection_proto->Set( - isolate, "PUT", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPut)); - connection_proto->Set( - isolate, "PUT_RAW", - v8::FunctionTemplate::New(isolate, ClientConnection_httpPutRaw)); - connection_proto->Set( - isolate, "SEND_FILE", - v8::FunctionTemplate::New(isolate, ClientConnection_httpSendFile)); - connection_proto->Set( - isolate, "getEndpoint", - v8::FunctionTemplate::New(isolate, ClientConnection_getEndpoint)); - connection_proto->Set(isolate, "lastHttpReturnCode", - v8::FunctionTemplate::New( - isolate, ClientConnection_lastHttpReturnCode)); - connection_proto->Set( - isolate, "lastErrorMessage", - v8::FunctionTemplate::New(isolate, ClientConnection_lastErrorMessage)); - connection_proto->Set( - isolate, "isConnected", - v8::FunctionTemplate::New(isolate, ClientConnection_isConnected)); - connection_proto->Set( - isolate, "reconnect", - v8::FunctionTemplate::New(isolate, ClientConnection_reconnect)); - connection_proto->Set( - isolate, "toString", - v8::FunctionTemplate::New(isolate, ClientConnection_toString)); - connection_proto->Set( - isolate, "getVersion", - v8::FunctionTemplate::New(isolate, ClientConnection_getVersion)); - connection_proto->Set( - isolate, "getMode", - v8::FunctionTemplate::New(isolate, ClientConnection_getMode)); - connection_proto->Set( - isolate, "getDatabaseName", - v8::FunctionTemplate::New(isolate, ClientConnection_getDatabaseName)); - connection_proto->Set( - isolate, "setDatabaseName", - v8::FunctionTemplate::New(isolate, ClientConnection_setDatabaseName)); - connection_proto->SetCallAsFunctionHandler( - ClientConnection_ConstructorCallback); - - v8::Handle connection_inst = - connection_templ->InstanceTemplate(); - connection_inst->SetInternalFieldCount(2); - - TRI_AddGlobalVariableVocbase(isolate, context, - TRI_V8_ASCII_STRING("ArangoConnection"), - connection_proto->NewInstance()); - ConnectionTempl.Reset(isolate, connection_inst); - - // add the client connection to the context: - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_ARANGO"), - WrapV8ClientConnection(isolate, ClientConnection)); - } - - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_START_PAGER"), - v8::FunctionTemplate::New(isolate, JS_StartOutputPager)->GetFunction()); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_STOP_PAGER"), - v8::FunctionTemplate::New(isolate, JS_StopOutputPager)->GetFunction()); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_IMPORT_CSV_FILE"), - v8::FunctionTemplate::New(isolate, JS_ImportCsvFile)->GetFunction()); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("SYS_IMPORT_JSON_FILE"), - v8::FunctionTemplate::New(isolate, JS_ImportJsonFile)->GetFunction()); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("NORMALIZE_STRING"), - v8::FunctionTemplate::New(isolate, JS_NormalizeString)->GetFunction()); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("COMPARE_STRING"), - v8::FunctionTemplate::New(isolate, JS_CompareString)->GetFunction()); - - TRI_AddGlobalVariableVocbase(isolate, context, - TRI_V8_ASCII_STRING("ARANGO_QUIET"), - v8::Boolean::New(isolate, BaseClient.quiet())); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("VALGRIND"), - v8::Boolean::New(isolate, (RUNNING_ON_VALGRIND > 0))); - - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("IS_EXECUTE_SCRIPT"), - v8::Boolean::New(isolate, runMode == eExecuteScript)); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("IS_EXECUTE_STRING"), - v8::Boolean::New(isolate, runMode == eExecuteString)); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("IS_CHECK_SCRIPT"), - v8::Boolean::New(isolate, runMode == eCheckScripts)); - TRI_AddGlobalVariableVocbase( - isolate, context, TRI_V8_ASCII_STRING("IS_UNIT_TESTS"), - v8::Boolean::New(isolate, runMode == eUnitTests)); - TRI_AddGlobalVariableVocbase(isolate, context, - TRI_V8_ASCII_STRING("IS_JS_LINT"), - v8::Boolean::New(isolate, runMode == eJsLint)); -} - -static int WarmupEnvironment(v8::Isolate* isolate, - std::vector& positionals, - eRunMode runMode) { - auto context = isolate->GetCurrentContext(); - // ............................................................................. - // read files - // ............................................................................. - - // load java script from js/bootstrap/*.h files - if (StartupPath.empty()) { - LOG(FATAL) << "no 'javascript.startup-directory' has been supplied, giving up"; FATAL_ERROR_EXIT(); - } - - LOG(DEBUG) << "using JavaScript startup files at '" << StartupPath << "'"; - - StartupLoader.setDirectory(StartupPath); - - // load all init files - std::vector files; - - files.push_back("common/bootstrap/scaffolding.js"); - files.push_back("common/bootstrap/modules/internal.js"); // deps: - - files.push_back("common/bootstrap/errors.js"); // deps: internal - files.push_back("client/bootstrap/modules/internal.js"); // deps: internal - files.push_back("common/bootstrap/modules/vm.js"); // deps: internal - files.push_back("common/bootstrap/modules/console.js"); // deps: internal - files.push_back("common/bootstrap/modules/assert.js"); // deps: - - files.push_back("common/bootstrap/modules/buffer.js"); // deps: internal - files.push_back( - "common/bootstrap/modules/fs.js"); // deps: internal, buffer (hidden) - files.push_back("common/bootstrap/modules/path.js"); // deps: internal, fs - files.push_back("common/bootstrap/modules/events.js"); // deps: - - files.push_back("common/bootstrap/modules/process.js"); // deps: internal, - // fs, events, - // console - files.push_back( - "common/bootstrap/modules.js"); // must come last before patches - - if (runMode != eJsLint) { - files.push_back("common/bootstrap/monkeypatches.js"); - } - - files.push_back("client/client.js"); // needs internal - - for (size_t i = 0; i < files.size(); ++i) { - switch (StartupLoader.loadScript(isolate, context, files[i])) { - case JSLoader::eSuccess: - LOG(TRACE) << "loaded JavaScript file '" << files[i] << "'"; - break; - case JSLoader::eFailLoad: - LOG(FATAL) << "cannot load JavaScript file '" << files[i] << "'"; FATAL_ERROR_EXIT(); - break; - case JSLoader::eFailExecute: - LOG(FATAL) << "error during execution of JavaScript file '" << files[i] << "'"; FATAL_ERROR_EXIT(); - break; - } - } - - // ............................................................................. - // create arguments - // ............................................................................. - - v8::Handle p = v8::Array::New(isolate, (int)positionals.size()); - - for (uint32_t i = 0; i < positionals.size(); ++i) { - p->Set(i, TRI_V8_STD_STRING(positionals[i])); - } - - TRI_AddGlobalVariableVocbase(isolate, context, - TRI_V8_ASCII_STRING("ARGUMENTS"), p); - return EXIT_SUCCESS; -} - -static int Run(v8::Isolate* isolate, eRunMode runMode, bool promptError) { - auto context = isolate->GetCurrentContext(); - bool ok = false; - try { - switch (runMode) { - case eInteractive: - ok = RunShell(isolate, context, promptError) == TRI_ERROR_NO_ERROR; - if (isatty(STDIN_FILENO)) { - ok = true; - } - break; - case eExecuteScript: - // we have scripts to execute - ok = RunScripts(isolate, context, ExecuteScripts, true); - break; - case eExecuteString: - // we have string to execute - ok = RunString(isolate, context, ExecuteString); - break; - case eCheckScripts: - // we have scripts to syntax check - ok = RunScripts(isolate, context, CheckScripts, false); - break; - case eUnitTests: - // we have unit tests - ok = RunUnitTests(isolate, context); - break; - case eJsLint: - // we don't have unittests, but we have files to jslint - ok = RunJsLint(isolate, context); - break; - } - } catch (std::exception const& ex) { - cerr << "caught exception " << ex.what() << endl; - ok = false; - } catch (...) { - cerr << "caught unknown exception" << endl; - ok = false; - } - return (ok) ? EXIT_SUCCESS : EXIT_FAILURE; -} - -class BufferAllocator : public v8::ArrayBuffer::Allocator { - public: - virtual void* Allocate(size_t length) { - void* data = AllocateUninitialized(length); - if (data != nullptr) { - memset(data, 0, length); - } - return data; - } - virtual void* AllocateUninitialized(size_t length) { return malloc(length); } - virtual void Free(void* data, size_t) { - if (data != nullptr) { - free(data); - } - } -}; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief main -//////////////////////////////////////////////////////////////////////////////// - -int main(int argc, char* args[]) { - int ret = EXIT_SUCCESS; - eRunMode runMode = eInteractive; -#if _WIN32 - extern bool cygwinShell; - if (getenv("SHELL") != nullptr) { - cygwinShell = true; - } - if (!TRI_InitWindowsEventLog()) { - std::cerr << "failed to init event log" << std::endl; - return EXIT_FAILURE; - } -#endif - LocalEntryFunction(); - - TRIAGENS_REST_INITIALIZE(argc, args); - - Logger::initialize(false); - - { - std::ostringstream foxxManagerHelp; - foxxManagerHelp - << "Use " << args[0] - << " help to get an overview of the actions specific to foxx-manager." - << endl - << endl; - foxxManagerHelp << "There is also an online manual available at:" << endl - << "https://docs.arangodb.com/Foxx/Install/" << endl - << endl; - - BaseClient.setupSpecificHelp("foxx-manager", foxxManagerHelp.str()); - } - - BaseClient.setEndpointString(Endpoint::getDefaultEndpoint()); - - // ............................................................................. - // parse the program options - // ............................................................................. - - std::vector positionals = - ParseProgramOptions(argc, args, &runMode); - - // ............................................................................. - // set-up client connection - // ............................................................................. - - // check if we want to connect to a server - bool useServer = (BaseClient.endpointString() != "none"); - - // if we are in jslint mode, we will not need the server at all - if (!JsLint.empty()) { - useServer = false; - } - - if (useServer) { - BaseClient.createEndpoint(); - - if (BaseClient.endpointServer() == nullptr) { - ostringstream s; - s << "invalid value for --server.endpoint ('" - << BaseClient.endpointString() << "')"; - - BaseClient.printErrLine(s.str()); - - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - ClientConnection = CreateConnection(); - } - - // ............................................................................. - // set-up V8 objects - // ............................................................................. - - if (!Utf8Helper::DefaultUtf8Helper.setCollatorLanguage("en")) { - std::string msg = - "cannot initialize ICU; please make sure ICU*dat is available ; " - "ICU_DATA='"; - if (getenv("ICU_DATA") != nullptr) { - msg += getenv("ICU_DATA"); - } - msg += "'"; - BaseClient.printErrLine(msg); - return EXIT_FAILURE; - } - v8::V8::InitializeICU(); - - // set V8 options - if (!V8Options.empty()) { - // explicit option --javascript.v8-options used - v8::V8::SetFlagsFromString(V8Options.c_str(), (int)V8Options.size()); - } else { - // no explicit option used, now pass all command-line arguments to v8 - v8::V8::SetFlagsFromCommandLine(&argc, args, true); - } - -#ifdef TRI_FORCE_ARMV6 - std::string const forceARMv6 = "--noenable-armv7"; - v8::V8::SetFlagsFromString(forceARMv6.c_str(), (int)forceARMv6.size()); -#endif - - v8::Platform* platform = v8::platform::CreateDefaultPlatform(); - v8::V8::InitializePlatform(platform); - v8::V8::Initialize(); - - BufferAllocator bufferAllocator; - v8::V8::SetArrayBufferAllocator(&bufferAllocator); - - v8::Isolate* isolate = v8::Isolate::New(); - isolate->Enter(); - { - v8::Isolate::Scope isolate_scope(isolate); - v8::HandleScope handle_scope(isolate); - { - // create the global template - v8::Handle global = v8::ObjectTemplate::New(isolate); - - // create the context - v8::Persistent context; - context.Reset(isolate, v8::Context::New(isolate, 0, global)); - auto localContext = v8::Local::New(isolate, context); - - if (localContext.IsEmpty()) { - BaseClient.printErrLine("cannot initialize V8 engine"); - TRI_EXIT_FUNCTION(EXIT_FAILURE, nullptr); - } - - localContext->Enter(); - - v8::Handle globalObj = localContext->Global(); - globalObj->Set(TRI_V8_ASCII_STRING("GLOBAL"), globalObj); - globalObj->Set(TRI_V8_ASCII_STRING("global"), globalObj); - globalObj->Set(TRI_V8_ASCII_STRING("root"), globalObj); - - InitCallbacks(isolate, useServer, runMode); - - // reset the prompt error flag (will determine prompt colors) - bool promptError = PrintHelo(useServer); - - ret = WarmupEnvironment(isolate, positionals, runMode); - - if (ret == EXIT_SUCCESS) { - BaseClient.openLog(); - - try { - ret = Run(isolate, runMode, promptError); - } catch (std::bad_alloc const&) { - LOG(ERR) << "caught exception " << TRI_errno_string(TRI_ERROR_OUT_OF_MEMORY); - ret = EXIT_FAILURE; - } catch (...) { - LOG(ERR) << "caught unknown exception"; - ret = EXIT_FAILURE; - } - } - - isolate->LowMemoryNotification(); - - // spend at least 3 seconds in GC - LOG(DEBUG) << "entering final garbage collection"; - TRI_RunGarbageCollectionV8(isolate, 3000); - LOG(DEBUG) << "final garbage collection completed"; - - localContext->Exit(); - context.Reset(); - } - } - - if (ClientConnection != nullptr) { - DestroyConnection(ClientConnection); - ClientConnection = nullptr; - } - - TRI_v8_global_t* v8g = TRI_GetV8Globals(isolate); - delete v8g; - - isolate->Exit(); - isolate->Dispose(); - - BaseClient.closeLog(); - - TRIAGENS_REST_SHUTDOWN; - - v8::V8::Dispose(); - v8::V8::ShutdownPlatform(); - delete platform; - LocalExitFunction(ret, nullptr); - - return ret; -} diff --git a/etc/relative/arangob.conf b/etc/relative/arangob.conf index 7a82145a89..54be5f1503 100644 --- a/etc/relative/arangob.conf +++ b/etc/relative/arangob.conf @@ -2,5 +2,5 @@ keep-alive = true progress = true [server] -disable-authentication = true +authentication = false diff --git a/etc/relative/arangodump.conf b/etc/relative/arangodump.conf index db5cb3b996..a28bf966b5 100644 --- a/etc/relative/arangodump.conf +++ b/etc/relative/arangodump.conf @@ -1,5 +1,5 @@ progress = true [server] -disable-authentication = true +authentication = false diff --git a/etc/relative/arangoimp.conf b/etc/relative/arangoimp.conf index c395eb319e..d02ba05af3 100644 --- a/etc/relative/arangoimp.conf +++ b/etc/relative/arangoimp.conf @@ -1,3 +1,3 @@ [server] -disable-authentication = true +authentication = false diff --git a/etc/relative/arangorestore.conf b/etc/relative/arangorestore.conf index db5cb3b996..a28bf966b5 100644 --- a/etc/relative/arangorestore.conf +++ b/etc/relative/arangorestore.conf @@ -1,5 +1,5 @@ progress = true [server] -disable-authentication = true +authentication = false diff --git a/etc/relative/arangosh.conf b/etc/relative/arangosh.conf index 33d8b3f156..596da4dab4 100644 --- a/etc/relative/arangosh.conf +++ b/etc/relative/arangosh.conf @@ -1,7 +1,8 @@ +[console] pretty-print = true [server] -disable-authentication = true +authentication = false [javascript] startup-directory = ./js diff --git a/etc/relative/foxx-manager.conf b/etc/relative/foxx-manager.conf index ab2ddbaafc..e78e224dc8 100644 --- a/etc/relative/foxx-manager.conf +++ b/etc/relative/foxx-manager.conf @@ -1,7 +1,8 @@ +[console] pretty-print = true [server] -disable-authentication = true +authentication = false [javascript] startup-directory = ./js diff --git a/js/apps/system/_admin/aardvark/APP/build/extra-minified.css b/js/apps/system/_admin/aardvark/APP/build/extra-minified.css index 7e1405778a..02a88034d1 100644 --- a/js/apps/system/_admin/aardvark/APP/build/extra-minified.css +++ b/js/apps/system/_admin/aardvark/APP/build/extra-minified.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.badge,.label,sub,sup{vertical-align:baseline}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal:after,.row-fluid:after,.row:after{clear:both}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover,.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.dropdown,.dropup,sub,sup{position:relative}.nvd3 .nv-distribution,.nvd3.nv-sparklineplus g.nv-hoverValue,.nvtooltip{pointer-events:none}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{width:auto;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button,input[type=button],input[type=reset],input[type=submit],input[type=radio],input[type=checkbox],label,select{cursor:pointer}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.clearfix:after,.clearfix:before{display:table;line-height:0;content:""}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.navbar-search .search-query,body,button,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.img-polaroid,body,select{background-color:#fff}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-size:14px;line-height:20px;color:#333}.row-fluid:after,.row-fluid:before,.row:after,.row:before{display:table;line-height:0;content:""}a,a:hover{color:#5E7B36;text-decoration:none}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.row-fluid,.row-fluid .span12{width:100%}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid [class*=span]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.127659574468085%}.row-fluid .span11{width:91.48936170212765%}.row-fluid .span10{width:82.97872340425532%}.row-fluid .span9{width:74.46808510638297%}.row-fluid .span8{width:65.95744680851064%}.row-fluid .span7{width:57.44680851063829%}.row-fluid .span6{width:48.93617021276595%}.row-fluid .span5{width:40.42553191489362%}.row-fluid .span4{width:31.914893617021278%}.row-fluid .span3{width:23.404255319148934%}.row-fluid .span2{width:14.893617021276595%}.row-fluid .span1{width:6.382978723404255%}.row-fluid .offset12{margin-left:104.25531914893617%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%}.row-fluid .offset11{margin-left:95.74468085106382%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%}.row-fluid .offset10{margin-left:87.23404255319149%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%}.row-fluid .offset9{margin-left:78.72340425531914%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%}.row-fluid .offset8{margin-left:70.2127659574468%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%}.row-fluid .offset7{margin-left:61.70212765957446%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%}.row-fluid .offset6{margin-left:53.191489361702125%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%}.row-fluid .offset5{margin-left:44.68085106382979%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%}.row-fluid .offset4{margin-left:36.170212765957444%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%}.row-fluid .offset3{margin-left:27.659574468085104%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%}.row-fluid .offset2{margin-left:19.148936170212764%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%}.row-fluid .offset1{margin-left:10.638297872340425%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.container-fluid:after,.container-fluid:before,.container:after,.container:before{display:table;line-height:0;content:""}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto}.container-fluid{padding-right:20px;padding-left:20px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}dt,strong{font-weight:700}small{font-size:85%}em{font-style:italic}address,cite{font-style:normal}.muted{color:#999}a.muted:hover{color:grey}.text-warning{color:#c09853}a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:hover{color:#356635}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h1 small,h3{font-size:24.5px}h2 small,h4{font-size:17.5px}h3 small,h4 small,h5{font-size:14px}h6{font-size:11.9px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}blockquote p,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl,legend,pre.prettyprint{margin-bottom:20px}ol,ul{padding:0;margin:0 0 10px 25px}li{line-height:19px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd,dt{line-height:20px}dd{margin-left:10px}.dl-horizontal:after,.dl-horizontal:before{display:table;line-height:0;content:""}address,blockquote small,pre{line-height:20px;display:block}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.controls-row:after,.dropdown-menu li>a,.form-actions:after,.form-horizontal .control-group:after,.modal-footer:after,.nav-pills:after,.nav-tabs:after,.navbar-form:after,.navbar-inner:after,.pager:after,.thumbnails:after,.ui-helper-clearfix:after{clear:both}pre,pre code{white-space:pre}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:16px;font-weight:300;line-height:25px}blockquote small{color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before,q:after,q:before{content:""}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}fieldset,legend,pre code{padding:0;border:0}pre code{color:inherit;white-space:pre-wrap;background-color:transparent}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}legend{display:block;width:100%;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}label{display:block;margin-bottom:5px}.uneditable-input,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=tel],input[type=color],input[type=search],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span],.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=tel],input[type=color],input[type=search],textarea{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}.uneditable-input:focus,input[type=text]:focus,input[type=password]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=week]:focus,input[type=number]:focus,input[type=email]:focus,input[type=url]:focus,input[type=tel]:focus,input[type=color]:focus,input[type=search]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;outline:dotted thin\9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=button],input[type=reset],input[type=submit],input[type=file],input[type=image],input[type=radio],input[type=checkbox]{width:auto}input[type=file],select{height:30px;line-height:30px}select{width:220px;border:1px solid #ccc}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus,select:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);box-shadow:inset 0 1px 2px rgba(0,0,0,.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.controls-row:after,.controls-row:before,.form-actions:after,.form-actions:before{display:table;line-height:0;content:""}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=radio][disabled],input[type=radio][readonly],input[type=checkbox][disabled],input[type=checkbox][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;padding-left:5px;vertical-align:middle}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append .dropdown-menu,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px\9;padding-left:14px;padding-left:4px\9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;margin-bottom:0;vertical-align:middle}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;line-height:0;content:""}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.btn-block,.table,input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.form-horizontal .controls{margin-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.btn,.pagination-centered{text-align:center}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child td,.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child td,.table thead:first-child tr:first-child th{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.jsoneditor .search .frame table,.ui-datepicker table{border-collapse:collapse}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class*=" icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;margin-top:1px;line-height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:url(../img/glyphicons-halflings-white.png)}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.alert .close,.btn-group,.btn-group>.btn,.collapse,.dropdown-submenu,.navbar-search{position:relative}.dropdown-menu.pull-right,.pull-right>.dropdown-menu{right:0;left:auto}.dropdown-menu li>a,.dropdown-submenu:hover>.dropdown-menu,.open>.dropdown-menu{display:block}.dropdown-menu .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu li>a{padding:3px 20px;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.close,.nav-header{font-weight:700;line-height:20px}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;background-color:#0081c2;background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px;-moz-border-radius:0 6px 6px;border-radius:0 6px 6px}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent transparent transparent #ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.btn,.btn-group,.btn-group-vertical{display:inline-block}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.btn-group+.btn-group,.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.breadcrumb,.typeahead{-webkit-border-radius:4px;-moz-border-radius:4px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-small,.well-small{-webkit-border-radius:3px;-moz-border-radius:3px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.btn,.btn-danger,.btn-info,.btn-inverse,.btn-primary,.btn-success,.btn-warning,.navbar-inverse .btn-navbar,.navbar-inverse .navbar-inner,.progress,.progress .bar,.progress .bar-danger,.progress .bar-info,.progress .bar-success,.progress .bar-warning,.progress-danger .bar,.progress-info .bar,.progress-success .bar,.progress-warning .bar{background-repeat:repeat-x}.btn{padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);border:1px solid #c5c5c5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);border-color:rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25)}.btn-danger,.btn-info,.btn-inverse,.btn-primary,.btn-success,.btn-warning,.navbar .btn-navbar{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.btn.active,.btn.disabled,.btn:active,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6}.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-color:#ccc\9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link,.nav>.dropdown.active>a:hover{cursor:pointer}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}.btn-primary{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c}.btn-primary.active,.btn-primary:active{background-color:#039\9}.btn-warning{color:#fff;background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406}.btn-warning.active,.btn-warning:active{background-color:#c67605\9}.btn-danger{color:#fff;background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f}.btn-danger.active,.btn-danger:active{background-color:#942a25\9}.btn-success{color:#fff;background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351}.btn-success.active,.btn-success:active{background-color:#408140\9}.btn-info{color:#fff;background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4}.btn-info.active,.btn-info:active{background-color:#24748c\9}.btn-inverse{color:#fff;background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222}.btn-inverse.active,.btn-inverse:active{background-color:#080808\9}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.btn-group>.btn,.btn-link{-webkit-border-radius:0;-moz-border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;border-color:transparent;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{font-size:0;white-space:nowrap;vertical-align:middle}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-group>.btn{border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding-right:5px;padding-left:5px}.btn-group>.btn-large+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret,.btn-mini .caret,.btn-small .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-header,.nav>li>a{display:block}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info,.alert-info h4{color:#3a87ad}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{padding:3px 15px;font-size:11px;color:#999;text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-right:-15px;margin-left:-15px}.nav-list>li>a{padding:3px 15px}.nav-pills>li>a,.nav-tabs>li>a{padding-top:8px;padding-bottom:8px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;background-color:#08c}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;line-height:0;content:""}.nav-pills>li,.nav-tabs>li{float:left}.nav-stacked>li,.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open.active .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.modal-backdrop.fade,.tooltip{opacity:0}.tabs-stacked .open>a:hover{border-color:#999}.tabbable:after,.tabbable:before{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#333232;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0)}.navbar-inner:after,.navbar-inner:before{display:table;line-height:0;content:""}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-prepend .btn{margin-top:0}.navbar-form{margin-bottom:0}.navbar-form:after,.navbar-form:before{display:table;line-height:0;content:""}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=image],.navbar-form input[type=radio],.navbar-form input[type=checkbox]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-size:13px;font-weight:400;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-bottom{bottom:0}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:7px 15px 10px;color:#FFF;text-decoration:none}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#FFF;text-decoration:none;background-color:#96B54A}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;background-color:#ededed;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5}.navbar .btn-navbar.active,.navbar .btn-navbar:active{background-color:#ccc\9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{right:0;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{right:12px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{right:13px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);-moz-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar:active{background-color:#000\9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block;text-shadow:0 1px 0 #fff}.badge,.label,.progress .bar{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pager .next>a,.pager .next>span,.pull-right{float:right}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none}.modal-footer,.modal-form{margin-bottom:0}.pager:after,.pager:before{display:table;line-height:0;content:""}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.popover,.tooltip,.tooltip-arrow{position:absolute}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:after,.modal-footer:before{display:table;line-height:0;content:""}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{z-index:1030;display:block;padding:5px;font-size:11px;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:700px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.tooltip-arrow{width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:4px;border-radius:4px}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none}.thumbnails:after,.thumbnails:before{display:table;line-height:0;content:""}.media-object,.thumbnail{display:block}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,.055);box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,.25);box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-heading{margin:0 0 5px}.accordion,.progress{margin-bottom:20px}.media .pull-left{margin-right:10px}.media .pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.84px;font-weight:700;line-height:14px;color:#fff;white-space:nowrap;background-color:#999}.ui-spinner,.ui-spinner-input{vertical-align:middle;padding:0}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:hover,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f89406}.badge-warning[href],.label-warning[href]{background-color:#c67605}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress .bar-danger,.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-success,.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-info,.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-warning,.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}/*! jQuery UI - v1.9.2 - 2012-12-21 + */.badge,.label,sub,sup{vertical-align:baseline}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal:after,.row-fluid:after,.row:after{clear:both}.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover,.input-append .uneditable-input:focus,.input-append input:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-prepend input:focus,.input-prepend select:focus{z-index:2}.dropdown,.dropup,sub,sup{position:relative}.nvd3 .nv-distribution,.nvd3.nv-sparklineplus g.nv-hoverValue,.nvtooltip{pointer-events:none}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}a:active,a:hover{outline:0}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{width:auto;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button,input[type=button],input[type=reset],input[type=submit],input[type=radio],input[type=checkbox],label,select{cursor:pointer}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*{color:#000!important;text-shadow:none!important;background:0 0!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.clearfix:after,.clearfix:before{display:table;line-height:0;content:""}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.img-polaroid,body,select{background-color:#fff}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333}.row-fluid:after,.row-fluid:before,.row:after,.row:before{display:table;line-height:0;content:""}a,a:hover{color:#5E7B36;text-decoration:none}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,.1);box-shadow:0 1px 3px rgba(0,0,0,.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px}[class*=span]{float:left;min-height:1px;margin-left:20px}.container,.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container,.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.row-fluid,.row-fluid .span12{width:100%}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid [class*=span]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*=span]:first-child{margin-left:0}.row-fluid .controls-row [class*=span]+[class*=span]{margin-left:2.127659574468085%}.row-fluid .span11{width:91.48936170212765%}.row-fluid .span10{width:82.97872340425532%}.row-fluid .span9{width:74.46808510638297%}.row-fluid .span8{width:65.95744680851064%}.row-fluid .span7{width:57.44680851063829%}.row-fluid .span6{width:48.93617021276595%}.row-fluid .span5{width:40.42553191489362%}.row-fluid .span4{width:31.914893617021278%}.row-fluid .span3{width:23.404255319148934%}.row-fluid .span2{width:14.893617021276595%}.row-fluid .span1{width:6.382978723404255%}.row-fluid .offset12{margin-left:104.25531914893617%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%}.row-fluid .offset11{margin-left:95.74468085106382%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%}.row-fluid .offset10{margin-left:87.23404255319149%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%}.row-fluid .offset9{margin-left:78.72340425531914%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%}.row-fluid .offset8{margin-left:70.2127659574468%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%}.row-fluid .offset7{margin-left:61.70212765957446%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%}.row-fluid .offset6{margin-left:53.191489361702125%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%}.row-fluid .offset5{margin-left:44.68085106382979%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%}.row-fluid .offset4{margin-left:36.170212765957444%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%}.row-fluid .offset3{margin-left:27.659574468085104%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%}.row-fluid .offset2{margin-left:19.148936170212764%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%}.row-fluid .offset1{margin-left:10.638297872340425%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%}.row-fluid [class*=span].hide,[class*=span].hide{display:none}.container-fluid:after,.container-fluid:before,.container:after,.container:before{display:table;line-height:0;content:""}.row-fluid [class*=span].pull-right,[class*=span].pull-right{float:right}.container{margin-right:auto;margin-left:auto}.container-fluid{padding-right:20px;padding-left:20px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:700}em{font-style:italic}address,cite{font-style:normal}.muted{color:#999}a.muted:hover{color:grey}.text-warning{color:#c09853}a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:hover{color:#356635}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:700;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h1 small,h3{font-size:24.5px}h2 small,h4{font-size:17.5px}h3 small,h4 small,h5{font-size:14px}h6{font-size:11.9px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}blockquote p,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl,legend,pre.prettyprint{margin-bottom:20px}ol,ul{padding:0;margin:0 0 10px 25px}li{line-height:19px}ol.inline,ol.unstyled,ul.inline,ul.unstyled{margin-left:0;list-style:none}ol.inline>li,ul.inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd,dt{line-height:20px}dt{font-weight:700}dd{margin-left:10px}.dl-horizontal:after,.dl-horizontal:before{display:table;line-height:0;content:""}address,blockquote small,pre{line-height:20px;display:block}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.controls-row:after,.dropdown-menu li>a,.form-actions:after,.form-horizontal .control-group:after,.modal-footer:after,.nav-pills:after,.nav-tabs:after,.navbar-form:after,.navbar-inner:after,.pager:after,.thumbnails:after,.ui-helper-clearfix:after{clear:both}pre,pre code{white-space:pre}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:16px;font-weight:300;line-height:25px}blockquote small{color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before,q:after,q:before{content:""}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.navbar-search .search-query,button,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}fieldset,legend,pre code{padding:0;border:0}pre code{color:inherit;white-space:pre-wrap;background-color:transparent}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{margin:0}legend{display:block;width:100%;font-size:21px;line-height:40px;color:#333;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}button,input,label,select,textarea{font-size:14px;font-weight:400;line-height:20px}label{display:block;margin-bottom:5px}.uneditable-input,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=tel],input[type=color],input[type=search],select,textarea{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.controls-row .checkbox[class*=span],.controls-row .radio[class*=span],.controls>.checkbox:first-child,.controls>.radio:first-child{padding-top:5px}.uneditable-input,input,textarea{width:206px}textarea{height:auto}.uneditable-input,input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=tel],input[type=color],input[type=search],textarea{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}.uneditable-input:focus,input[type=text]:focus,input[type=password]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=week]:focus,input[type=number]:focus,input[type=email]:focus,input[type=url]:focus,input[type=tel]:focus,input[type=color]:focus,input[type=search]:focus,textarea:focus{border-color:rgba(82,168,236,.8);outline:0;outline:dotted thin\9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.6)}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=button],input[type=reset],input[type=submit],input[type=file],input[type=image],input[type=radio],input[type=checkbox]{width:auto}input[type=file],select{height:30px;line-height:30px}select{width:220px;border:1px solid #ccc}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus,select:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.025);box-shadow:inset 0 1px 2px rgba(0,0,0,.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.checkbox,.radio{min-height:20px;padding-left:20px}.checkbox input[type=checkbox],.radio input[type=radio]{float:left;margin-left:-20px}.checkbox.inline,.radio.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.checkbox.inline+.checkbox.inline,.radio.inline+.radio.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span],.uneditable-input[class*=span],input[class*=span],select[class*=span],textarea[class*=span]{float:none;margin-left:0}.input-append .uneditable-input[class*=span],.input-append input[class*=span],.input-prepend .uneditable-input[class*=span],.input-prepend input[class*=span],.row-fluid .input-append [class*=span],.row-fluid .input-prepend [class*=span],.row-fluid .uneditable-input[class*=span],.row-fluid input[class*=span],.row-fluid select[class*=span],.row-fluid textarea[class*=span]{display:inline-block}.controls-row:after,.controls-row:before,.form-actions:after,.form-actions:before{display:table;line-height:0;content:""}.uneditable-input,input,textarea{margin-left:0}.controls-row [class*=span]+[class*=span]{margin-left:20px}.uneditable-input.span12,input.span12,textarea.span12{width:926px}.uneditable-input.span11,input.span11,textarea.span11{width:846px}.uneditable-input.span10,input.span10,textarea.span10{width:766px}.uneditable-input.span9,input.span9,textarea.span9{width:686px}.uneditable-input.span8,input.span8,textarea.span8{width:606px}.uneditable-input.span7,input.span7,textarea.span7{width:526px}.uneditable-input.span6,input.span6,textarea.span6{width:446px}.uneditable-input.span5,input.span5,textarea.span5{width:366px}.uneditable-input.span4,input.span4,textarea.span4{width:286px}.uneditable-input.span3,input.span3,textarea.span3{width:206px}.uneditable-input.span2,input.span2,textarea.span2{width:126px}.uneditable-input.span1,input.span1,textarea.span1{width:46px}.controls-row [class*=span],.row-fluid .controls-row [class*=span]{float:left}input[disabled],input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type=radio][disabled],input[type=radio][readonly],input[type=checkbox][disabled],input[type=checkbox][readonly]{background-color:transparent}.control-group.warning .checkbox,.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #dbc59e}.control-group.warning .input-append .add-on,.control-group.warning .input-prepend .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .checkbox,.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #d59392}.control-group.error .input-append .add-on,.control-group.error .input-prepend .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .checkbox,.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7aba7b}.control-group.success .input-append .add-on,.control-group.success .input-prepend .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .checkbox,.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #7ab5d3}.control-group.info .input-append .add-on,.control-group.info .input-prepend .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;padding-left:5px;vertical-align:middle}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append .dropdown-menu,.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .dropdown-menu,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{font-size:14px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .uneditable-input,.input-prepend input,.input-prepend select{position:relative;margin-bottom:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:400;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-append .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .add-on,.input-prepend .btn,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-append .uneditable-input,.input-append input,.input-append select,.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append .uneditable-input+.btn-group .btn:last-child,.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn-group:last-child>.dropdown-toggle,.input-append .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .uneditable-input,.input-prepend.input-append input,.input-prepend.input-append select{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .uneditable-input+.btn-group .btn,.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px\9;padding-left:14px;padding-left:4px\9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn,.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-horizontal .help-inline,.form-horizontal .input-append,.form-horizontal .input-prepend,.form-horizontal .uneditable-input,.form-horizontal input,.form-horizontal select,.form-horizontal textarea,.form-inline .help-inline,.form-inline .input-append,.form-inline .input-prepend,.form-inline .uneditable-input,.form-inline input,.form-inline select,.form-inline textarea,.form-search .help-inline,.form-search .input-append,.form-search .input-prepend,.form-search .uneditable-input,.form-search input,.form-search select,.form-search textarea{display:inline-block;margin-bottom:0;vertical-align:middle}.form-horizontal .hide,.form-inline .hide,.form-search .hide{display:none}.form-inline .btn-group,.form-inline label,.form-search .btn-group,.form-search label{display:inline-block}.form-inline .input-append,.form-inline .input-prepend,.form-search .input-append,.form-search .input-prepend{margin-bottom:0}.form-inline .checkbox,.form-inline .radio,.form-search .checkbox,.form-search .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio],.form-search .checkbox input[type=checkbox],.form-search .radio input[type=radio]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px}.form-horizontal .control-group:after,.form-horizontal .control-group:before{display:table;line-height:0;content:""}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.btn-block,.table,input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.form-horizontal .controls{margin-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal .input-append+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{margin-bottom:20px}.table td,.table th{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.btn,.pagination-centered{text-align:center}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child td,.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child td,.table thead:first-child tr:first-child th{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed td,.table-condensed th{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.jsoneditor .search .frame table,.ui-datepicker table{border-collapse:collapse}.table-bordered td,.table-bordered th{border-left:1px solid #ddd}.table-bordered caption+tbody tr:first-child td,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+thead tr:first-child th,.table-bordered tbody:first-child tr:first-child td,.table-bordered tbody:first-child tr:first-child th,.table-bordered thead:first-child tr:first-child th{border-top:0}.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered thead:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered thead:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered thead:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered thead:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered caption+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered caption+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}.row-fluid table td[class*=span],.row-fluid table th[class*=span],table td[class*=span],table th[class*=span]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class*=" icon-"],[class^=icon-]{display:inline-block;width:14px;height:14px;margin-top:1px;line-height:14px;vertical-align:text-top;background-image:url(../img/glyphicons-halflings.png);background-position:14px 14px;background-repeat:no-repeat}.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-menu>.active>a>[class^=icon-],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^=icon-],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^=icon-],.icon-white,.nav-list>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^=icon-],.nav-pills>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^=icon-],.navbar-inverse .nav>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^=icon-]{background-image:url(../img/glyphicons-halflings-white.png)}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.alert .close,.btn-group,.btn-group>.btn,.collapse,.dropdown-submenu,.navbar-search{position:relative}.dropdown-menu.pull-right,.pull-right>.dropdown-menu{right:0;left:auto}.dropdown-menu li>a,.dropdown-submenu:hover>.dropdown-menu,.open>.dropdown-menu{display:block}.dropdown-menu .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu li>a{padding:3px 20px;font-weight:400;line-height:20px;color:#333;white-space:nowrap}.close,.nav-header{font-weight:700;line-height:20px}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;background-color:#0081c2;background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px;-moz-border-radius:0 6px 6px;border-radius:0 6px 6px}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent transparent transparent #ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.btn,.btn-group,.btn-group-vertical{display:inline-block}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.btn-group+.btn-group,.btn-toolbar>.btn+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn{margin-left:5px}.breadcrumb,.typeahead{-webkit-border-radius:4px;-moz-border-radius:4px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-small,.well-small{-webkit-border-radius:3px;-moz-border-radius:3px}.well-small{padding:9px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.btn,.btn-danger,.btn-info,.btn-inverse,.btn-primary,.btn-success,.btn-warning,.navbar-inverse .btn-navbar,.navbar-inverse .navbar-inner,.progress,.progress .bar,.progress .bar-danger,.progress .bar-info,.progress .bar-success,.progress .bar-warning,.progress-danger .bar,.progress-info .bar,.progress-success .bar,.progress-warning .bar{background-repeat:repeat-x}.btn{padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);border:1px solid #c5c5c5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);border-color:rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25)}.btn-danger,.btn-info,.btn-inverse,.btn-primary,.btn-success,.btn-warning,.navbar .btn-navbar{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.btn.active,.btn.disabled,.btn:active,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6}.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-color:#ccc\9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link,.nav>.dropdown.active>a:hover{cursor:pointer}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}.btn-primary{color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c}.btn-primary.active,.btn-primary:active{background-color:#039\9}.btn-warning{color:#fff;background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406}.btn-warning.active,.btn-warning:active{background-color:#c67605\9}.btn-danger{color:#fff;background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger.active,.btn-danger.disabled,.btn-danger:active,.btn-danger:hover,.btn-danger[disabled]{color:#fff;background-color:#bd362f}.btn-danger.active,.btn-danger:active{background-color:#942a25\9}.btn-success{color:#fff;background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success.active,.btn-success.disabled,.btn-success:active,.btn-success:hover,.btn-success[disabled]{color:#fff;background-color:#51a351}.btn-success.active,.btn-success:active{background-color:#408140\9}.btn-info{color:#fff;background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info.active,.btn-info.disabled,.btn-info:active,.btn-info:hover,.btn-info[disabled]{color:#fff;background-color:#2f96b4}.btn-info.active,.btn-info:active{background-color:#24748c\9}.btn-inverse{color:#fff;background-color:#363636;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);border-color:#222 #222 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse.active,.btn-inverse.disabled,.btn-inverse:active,.btn-inverse:hover,.btn-inverse[disabled]{color:#fff;background-color:#222}.btn-inverse.active,.btn-inverse:active{background-color:#080808\9}button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0}.btn-group>.btn,.btn-link{-webkit-border-radius:0;-moz-border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;border-color:transparent;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{font-size:0;white-space:nowrap;vertical-align:middle}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-group>.btn{border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125),inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn-group>.btn-mini+.dropdown-toggle{padding-right:5px;padding-left:5px}.btn-group>.btn-large+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret,.btn-mini .caret,.btn-small .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-danger .caret,.btn-info .caret,.btn-inverse .caret,.btn-primary .caret,.btn-success .caret,.btn-warning .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-header,.nav>li>a{display:block}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info,.alert-info h4{color:#3a87ad}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{padding:3px 15px;font-size:11px;color:#999;text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list .nav-header,.nav-list>li>a{margin-right:-15px;margin-left:-15px}.nav-list>li>a{padding:3px 15px}.nav-pills>li>a,.nav-tabs>li>a{padding-top:8px;padding-bottom:8px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;background-color:#08c}.nav-list [class*=" icon-"],.nav-list [class^=icon-]{margin-right:2px}.nav-list .divider{height:1px;margin:9px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-pills:after,.nav-pills:before,.nav-tabs:after,.nav-tabs:before{display:table;line-height:0;content:""}.nav-pills>li,.nav-tabs>li{float:left}.nav-stacked>li,.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.nav-pills>li>a,.nav-tabs>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav-pills .open .dropdown-toggle,.nav-tabs .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open.active .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.modal-backdrop.fade,.tooltip{opacity:0}.tabs-stacked .open>a:hover{border-color:#999}.tabbable:after,.tabbable:before{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-left>.nav-tabs,.tabs-right>.nav-tabs{border-bottom:0}.pill-content>.pill-pane,.tab-content>.tab-pane{display:none}.pill-content>.active,.tab-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#333232;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0)}.navbar-inner:after,.navbar-inner:before{display:table;line-height:0;content:""}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px;margin-left:-20px;font-size:20px;font-weight:200;color:#777}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-append .btn,.navbar .input-prepend .btn{margin-top:0}.navbar-form{margin-bottom:0}.navbar-form:after,.navbar-form:before{display:table;line-height:0;content:""}.navbar-form .checkbox,.navbar-form .radio,.navbar-form input,.navbar-form select{margin-top:5px}.navbar-form .btn,.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type=image],.navbar-form input[type=radio],.navbar-form input[type=checkbox]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-size:13px;font-weight:400;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1)}.navbar-fixed-bottom .navbar-inner,.navbar-fixed-top .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-bottom .container,.navbar-fixed-top .container,.navbar-static-top .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-bottom{bottom:0}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:7px 15px 10px;color:#FFF;text-decoration:none}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#FFF;text-decoration:none;background-color:#96B54A}.navbar .nav>.active>a,.navbar .nav>.active>a:focus,.navbar .nav>.active>a:hover{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,.125);box-shadow:inset 0 3px 8px rgba(0,0,0,.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;background-color:#ededed;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.075)}.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar:active,.navbar .btn-navbar:hover,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5}.navbar .btn-navbar.active,.navbar .btn-navbar:active{background-color:#ccc\9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle,.navbar .nav li.dropdown.open>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .nav>li>.dropdown-menu.pull-right,.navbar .pull-right>li>.dropdown-menu{right:0;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:before,.navbar .pull-right>li>.dropdown-menu:before{right:12px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right:after,.navbar .pull-right>li>.dropdown-menu:after{right:13px;left:auto}.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu,.navbar .pull-right>li>.dropdown-menu .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .brand,.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:focus,.navbar-inverse .nav .active>a:hover{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query.focused,.navbar-inverse .navbar-search .search-query:focus{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,.15);-moz-box-shadow:0 0 3px rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);border-color:#040404 #040404 #000;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404}.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar:active{background-color:#000\9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block;text-shadow:0 1px 0 #fff}.badge,.label,.progress .bar{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pager .next>a,.pager .next>span,.pull-right{float:right}.pagination ul>.active>a,.pagination ul>.active>span,.pagination ul>li>a:hover{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>span{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>a,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>a,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none}.modal-footer,.modal-form{margin-bottom:0}.pager:after,.pager:before{display:table;line-height:0;content:""}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.popover,.tooltip,.tooltip-arrow{position:absolute}.modal-footer{padding:14px 15px 15px;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:after,.modal-footer:before{display:table;line-height:0;content:""}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{z-index:1030;display:block;padding:5px;font-size:11px;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:700px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.tooltip-arrow{width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);-webkit-border-radius:3px;-moz-border-radius:4px;border-radius:4px}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none}.thumbnails:after,.thumbnails:before{display:table;line-height:0;content:""}.media-object,.thumbnail{display:block}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,.055);box-shadow:0 1px 3px rgba(0,0,0,.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,.25);box-shadow:0 1px 4px rgba(0,105,214,.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-heading{margin:0 0 5px}.accordion,.progress{margin-bottom:20px}.media .pull-left{margin-right:10px}.media .pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.badge,.label{display:inline-block;padding:2px 4px;font-size:11.84px;font-weight:700;line-height:14px;color:#fff;white-space:nowrap;background-color:#999}.ui-spinner,.ui-spinner-input{vertical-align:middle;padding:0}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.badge:empty,.label:empty{display:none}a.badge:hover,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.badge-important,.label-important{background-color:#b94a48}.badge-important[href],.label-important[href]{background-color:#953b39}.badge-warning,.label-warning{background-color:#f89406}.badge-warning[href],.label-warning[href]{background-color:#c67605}.badge-success,.label-success{background-color:#468847}.badge-success[href],.label-success[href]{background-color:#356635}.badge-info,.label-info{background-color:#3a87ad}.badge-info[href],.label-info[href]{background-color:#2d6987}.badge-inverse,.label-inverse{background-color:#333}.badge-inverse[href],.label-inverse[href]{background-color:#1a1a1a}.btn .badge,.btn .label{position:relative;top:-1px}.btn-mini .badge,.btn-mini .label{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15),inset 0 -1px 0 rgba(0,0,0,.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress .bar-danger,.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-success,.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0)}.progress-striped .bar-success,.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-info,.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress .bar-warning,.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0)}.progress-striped .bar-warning,.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.15)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.15)),color-stop(.75,rgba(255,255,255,.15)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}/*! jQuery UI - v1.9.2 - 2012-12-21 * http://jqueryui.com * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px diff --git a/js/apps/system/_admin/aardvark/APP/build/extra-minified.css.gz b/js/apps/system/_admin/aardvark/APP/build/extra-minified.css.gz index 582c4c9d97..d528145f3a 100644 Binary files a/js/apps/system/_admin/aardvark/APP/build/extra-minified.css.gz and b/js/apps/system/_admin/aardvark/APP/build/extra-minified.css.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css index bd134fc80a..f12ec0766e 100644 --- a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css +++ b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css @@ -1,4 +1,4 @@ @charset "UTF-8";.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.fa,.fa-stack{display:inline-block}.clusterDownBtn,.clusterDownBtn button,.fa-fw,.fa-li,.fa-stack-1x,.fa-stack-2x,.footer,.modal-body th .valueCell,.modal-body th th.actionCell,.modal-body th th.keyCell,.waitModal,div.toolbox div.gv_action_button{text-align:center}.page-title span,.pingback a.url,body,input,textarea{font-family:'Open Sans',sans-serif!important;font-weight:400}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local("Open Sans Light"),local("OpenSans-Light"),url(../fonts/opensans/OpenSansLight.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(../fonts/opensans/OpenSans.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(../fonts/opensans/OpenSansBold.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:local("Open Sans Light Italic"),local("OpenSansLight-Italic"),url(../fonts/opensans/OpenSansLightItalic.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local("Open Sans Italic"),local("OpenSans-Italic"),url(../fonts/opensans/OpenSansItalic.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url(../fonts/opensans/OpenSansBoldItalic.woff) format("woff")}/*! * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome/fontawesome-webfont.eot?v=4.4.0);src:url(../fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(../fonts/fontawesome/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(../fonts/fontawesome/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(../fonts/fontawesome/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(../fonts/fontawesome/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.modal-body,button{font-family:'Open Sans',sans-serif!important}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.contentDiv li,.dashboard-bar-chart-container,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage,.dashboard-full-width-chart,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart,.dashboard-half-height-legend,.dashboard-large-chart,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-legend,.dashboard-medium-chart,.dashboard-medium-chart .dashboard-interior-chart,.dashboard-small-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart,.dashboard-sub-bar,.dashboard-sub-bar .dashboard-sub-bar-title,.dashboard-tendency-container,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar,.dashboard-title-bar .dashboard-half-title-bar,.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.machineClass,.modal-chart-detail,.modal-chart-detail .modal-body,.modal-chart-detail .modal-dashboard-legend,.modal-chart-detail .modal-inner-detail,.navlist li,.navlogo,.pull-left,.scenarioMachine,.script-dropdown-menu,.user-dropdown-menu,a.button-gui,a.headerButton,div .bigtile,div .bigtile a span.add-Icon,div .tile,div .tile a span.add-Icon,div.centralContent,div.dropdownInner ul,div.footer-center,div.footer-left,div.footer-left p{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.dashboard-sub-bar-menu,.headerBar>div.headerButtonBar,.navmenu,.search-field,div .bigtile .iconSet span,div .tile .iconSet span,div.footer-right,div.footer-right p,ul.headerButtonList li{float:right}.dashboard-bar-chart-container .dashboard-bar-chart:after,.dashboard-medium-chart .dashboard-medium-chart-inner:after,.dashboard-medium-chart .dashboard-medium-chart-menu:after,.dashboard-row:after,.dashboard-sub-bar:after,.dashboard-tendency-container .dashboard-tendency-chart:after,.detail-chart:after,.headerBar>div.headerButtonBar:after,.machineClass:after,.resizecontainer:after,.scenarioSingleMachine:after,.tileList:after{clear:both;content:'.';display:block;font-size:0;height:0;visibility:hidden}.addButton,.arangoicon,.clusterDownBtn button,.contentDiv .icon,.deleteButton i,.gv-search-submit-icon,.icon-info-sign,.scenarioImage,.script-dropdown-menu .dropdown-item,.search-submit-icon,a.button-gui,a.headerButton,div .bigtile,div .bigtile .iconSet span,div .bigtile a span.icon,div .bigtile a svg,div .tile .iconSet span,div .tile a span.icon,div .tile a svg,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,div.toolbox div.gv_action_button{cursor:pointer}.navbar,footer.footer{background-color:rgba(245,248,240,.95);color:#fff;left:0;position:fixed;right:0;width:100%;z-index:1000}.button-danger{background-color:#da4f49}.button-danger:focus,.button-danger:hover{background-color:#be342e}.deleteButton i,a.danger.coordinator,a.danger.dbserver{color:#da4f49}.deleteButton i:focus,.deleteButton i:hover,a.danger.coordinator:focus,a.danger.coordinator:hover,a.danger.dbserver:focus,a.danger.dbserver:hover{color:#be342e}a.danger.coordinator,a.danger.dbserver{fill:#da4f49}a.danger.coordinator:focus,a.danger.coordinator:hover,a.danger.dbserver:focus,a.danger.dbserver:hover{fill:#be342e}.button-success{background-color:#8aa051}.button-success:focus,.button-success:hover{background-color:#788f3d}.addButton,a.success.coordinator,a.success.dbserver{color:#8aa051}.addButton:focus,.addButton:hover,a.success.coordinator:focus,a.success.coordinator:hover,a.success.dbserver:focus,a.success.dbserver:hover{color:#788f3d}a.success.coordinator,a.success.dbserver{fill:#8aa051}a.success.coordinator:focus,a.success.coordinator:hover,a.success.dbserver:focus,a.success.dbserver:hover{fill:#788f3d}.button-warning{background-color:#faa732}.button-warning:focus,.button-warning:hover{background-color:#f89406}a.warning.coordinator,a.warning.dbserver{color:#faa732;fill:#faa732}a.warning.coordinator:focus,a.warning.coordinator:hover,a.warning.dbserver:focus,a.warning.dbserver:hover{color:#f89406;fill:#f89406}.button-close,.button-neutral{background-color:#8f8d8c}.button-close:focus,.button-close:hover,.button-neutral:focus,.button-neutral:hover{background-color:#736b68}.dashboard-sub-bar-menu{color:#8f8d8c}.dashboard-sub-bar-menu:focus,.dashboard-sub-bar-menu:hover{color:#736b68}.button-primary{background-color:#564e4a}.button-primary:focus,.button-primary:hover{background-color:#3a322e}.button-header,a.button-gui,a.headerButton{background-color:#fff;border:1px solid #fff;color:#555}.button-header:focus,.button-header:hover,a.button-gui:focus,a.button-gui:hover,a.headerButton:focus,a.headerButton:hover{background-color:#8aa051;border:1px solid #8aa051;color:#fff}.button-notification{background-color:#faa020}.button-notification:focus,.button-notification:hover{background-color:#f87c0f}.button-inactive,.button-inactive:focus,.button-inactive:hover,[class^=button-]:disabled,[class^=button-]:focus:disabled,[class^=button-]:hover:disabled,button.disabled,button.disabled:focus,button.disabled:hover{background-color:#d3d3d3}a.headerButton.disabled,a.headerButton.disabled:focus,a.headerButton.disabled:hover,a.inactive.coordinator,a.inactive.coordinator:focus,a.inactive.coordinator:hover,a.inactive.dbserver,a.inactive.dbserver:focus,a.inactive.dbserver:hover{color:#d3d3d3}a.inactive.coordinator,a.inactive.coordinator:focus,a.inactive.coordinator:hover,a.inactive.dbserver,a.inactive.dbserver:focus,a.inactive.dbserver:hover{fill:#d3d3d3}div.queryline .fa.fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:relative;right:21px;top:-1px}div.queryline .fa.fa-search:hover{cursor:pointer;opacity:1}.modal-body .select2-choices input,.modal-body input,.modal-body select,.modal-body textarea,.navbar .arango-collection-select,div.queryline input,div.queryline select,input.search-input{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff!important;border:1px solid rgba(140,138,137,.25);box-shadow:none;outline:transparent 0}.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus,.navbar .arango-collection-select:focus,div.queryline input:focus,div.queryline select:focus,input.search-input:focus{border-color:#999;box-shadow:none;outline:transparent 0}.button-close:focus,.button-danger:focus,.button-inactive:focus,.button-neutral:focus,.button-notification:focus,.button-primary:focus,.button-success:focus,.button-warning:focus,div.headerBar select:focus{outline:0}.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.script-dropdown-menu,.user-dropdown-menu{background-color:#f5f8f0;border-color:#666;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;display:none;list-style:none;margin:5px 0 0;padding:5px 0;position:absolute;right:0;top:80%;z-index:1000}.script-dropdown-menu .dropdown-item a,.tab{display:block}.dropdown-toolbar li,.gv-dropdown-menu li,.link-dropdown-menu li,.script-dropdown-menu li,.user-dropdown-menu li{line-height:23px;white-space:nowrap;width:100%}.dropdown-toolbar .dropdown-header,.gv-dropdown-menu .dropdown-header,.link-dropdown-menu .dropdown-header,.script-dropdown-menu .dropdown-header,.user-dropdown-menu .dropdown-header{color:#999;font-size:15px;font-weight:600;font-variant:small-caps;padding:0}.dropdown-toolbar .dropdown-header:hover,.gv-dropdown-menu .dropdown-header:hover,.link-dropdown-menu .dropdown-header:hover,.script-dropdown-menu .dropdown-header:hover,.user-dropdown-menu .dropdown-header:hover{cursor:default}.dropdown-toolbar .divider,.gv-dropdown-menu .divider,.link-dropdown-menu .divider,.script-dropdown-menu .divider,.user-dropdown-menu .divider{background-color:#666;height:1px;margin:10px 0 5px}.dropdown-toolbar a,.gv-dropdown-menu a,.link-dropdown-menu a,.script-dropdown-menu a,.user-dropdown-menu a{color:#fff;padding:0 20px}.navbar{-webkit-font-smoothing:subpixel-antialiased;height:44px;margin-bottom:3px;padding-top:6px;top:0}.navbar .no-left-margin{border:0;margin-left:0}.navbar .no-left-margin.hover{background-color:transparent}.navbar .arangodbLogo{height:auto;margin-left:-5px;margin-top:-1px;width:40%}.navbar .arango-collection-select{position:relative;right:-22px;top:4px}.navbar .nav .dropdown .active>.dropdown-toggle,.navbar .nav .dropdown .open.active>.dropdown-toggle,.navbar .nav .dropdown .open>.dropdown-toggle{background:#788f3d}.navbar .nav>.active>a{-webkit-box-shadow:0 0 0 transparent inset;-moz-box-shadow:0 0 0 transparent inset;box-shadow:0 0 0 transparent inset;background-color:#fff;color:#000}.navbar .nav>li>a:focus{background-color:#fff}.navbar .nav>li>a:hover{background-color:#000;color:#686766}.navlist .dropdown-item:hover a,.navlist>.active a,.navlist>.active:hover a,.navlist>li:hover a{color:#000}.navlogo{margin-left:5px;margin-right:-3px;padding-top:3px}.navlist{list-style:none}.navlist>li{height:39px}.navlist li{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid transparent;margin-left:7px}.navlist li.dropdown:hover{background-color:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-left:1px solid rgba(0,0,0,.2);border-right:1px solid rgba(0,0,0,.2);border-top:1px solid rgba(0,0,0,.2)}.navlist li.dropdown:hover a{border-bottom:2px solid #fff}.navlist li.divider,.navlist li.navbar-spacer{border:0}.navlist li.divider{background-color:rgba(0,0,0,.2)}.navlist li.navbar-spacer{background-color:#a0a0a0;height:21px;margin-top:9px;width:1px}.navlist li.navbar-spacer.big{margin-left:15px;margin-right:15px}.navlist li.navbar-spacer.med{margin-left:5px;margin-right:5px}.navlist .dropdown-item,.script-dropdown-menu .dropdown-item{margin-left:0}.navlist li.navbar-spacer:hover{background-color:#a0a0a0}.navlist .active .tab{border-bottom:2px solid #8aa051;padding-bottom:4px}.navlist>.active{background-color:transparent}.navlist>.active:hover{background-color:#fff}.navlist .dropdown-item:hover,.navlist>li:hover{background-color:#fff;border-radius:3px}.navlist .dropdown-item a{border-bottom:0;display:block;font-size:11pt}.navlist .dropdown-item a:hover{background-color:#dee9cf;color:#686766}.tab{color:#686766;font-size:12pt;font-weight:100;padding:9px 5px 10px}.tab.userImg{padding-bottom:5px}.dropdown-item a{border-bottom:0!important;font-weight:300}.dropdown-toolbar,div.headerBar,div.headerDropdown{border:1px solid rgba(140,138,137,.25)}.dropdown-toolbar li a,footer.footer p{font-weight:100}.dropdown-toolbar{background-color:#fff!important}.dropdown-toolbar li a:hover{background:0 0;background-color:#dee9cf!important;color:#000!important}.link-dropdown-menu,.user-dropdown-menu{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-top-right-radius:0;margin-right:-1px;margin-top:7px;z-index:-10}.link-dropdown-menu .dropdown-item,.user-dropdown-menu .dropdown-item{border-left:0;border-right:0}.script-dropdown-menu .dropdown-item a:hover{color:#fff}.script-dropdown-menu .dropdown-item:hover{background-color:#8aa051}.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:rgba(0,0,0,.7);border:1px solid #c2c2c2;margin-right:-20px;margin-top:6px}.gv-dropdown-menu:after{border-bottom-color:#fff}.gv-dropdown-menu li:hover{background-color:#fff;background-image:none}.gv-dropdown-menu li a{padding:0}.gv-dropdown-menu li a label{color:#fff;padding-left:5px}.gv-dropdown-menu li a:focus{background-color:#8aa051!important;background-image:none}#arangoCollectionSelect{display:none;float:right;margin-bottom:0;margin-right:15px;padding-bottom:0}.caret{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #686766;content:'';display:inline-block;height:0;vertical-align:top;width:0}.applications-menu{display:block}.arango-logo{height:34px;padding:0!important}.arango-logo img{margin-left:22px}.footer{bottom:0;font-size:14px;left:0;position:fixed;right:0;z-index:1000}.modal,.select2-drop-active{z-index:9999999}footer.footer{bottom:0;height:40px}footer.footer p{font-size:10pt;margin-bottom:0;padding-bottom:10px;padding-top:10px}div.footer-left{background:none;color:#686766;width:45%}div.footer-left .social-icons{margin-top:5px}div.footer-left .social-icons a{display:block;float:left;height:25px;width:25px}div.footer-left .social-icons p{background:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;height:25px;margin-right:10px;padding:0;width:25px}div.footer-left .social-icons p:hover{background:#8aa051;cursor:pointer}div.footer-left .social-icons p:hover i{color:#fff}div.footer-left .social-icons i{color:#000;margin-top:6px;position:absolute}div.footer-left .social-icons i.fa-twitter{margin-left:-5px}div.footer-left .social-icons i.fa-envelope{margin-left:-19px}div.footer-left .social-icons i.fa-google{margin-left:-17px;margin-top:7px}div.footer-left .social-icons i.fa-stack-overflow{margin-left:-17px}div.footer-center{background:none;color:#686766;width:10%}div.footer-center i{background-color:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;margin-left:1px;padding:6px 2px;width:20px}div.footer-center i:hover{background-color:#8aa051;color:#fff}div.footer-center p{padding-top:5px}div.footer-center p:hover{cursor:pointer}[class*=' button-']:disabled,[class^=button-]:disabled,a.headerButton.disabled,button.disabled{cursor:not-allowed}div.footer-right{background:none;color:#686766;width:45%}div.footer-right p{color:#fff}div.footer-right i{color:#da4f49;font-size:18px}div.footer-right a{color:#686766;margin-left:5px;position:relative;top:-1px}div.footer-right .isOnline{color:#8aa051!important}.button-close,.button-danger,.button-header,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;font-size:14px;font-weight:300!important}.addButton,.deleteButton i{font-size:16pt;position:relative}.button-close,.button-danger,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{border:0;color:#fff;margin-left:10px;padding:5px 16px}.button-close i,.button-danger i,.button-inactive i,.button-neutral i,.button-notification i,.button-primary i,.button-success i,.button-warning i{margin-left:-5px}.button-header{margin-top:5px}.addButton{margin-right:7px;margin-top:2px}.deleteButton i{padding-right:3px;top:3px}#closeBtnInfoView{margin-left:0!important}button.btn-server{width:120px}button.gv-zoom-btn{background-size:14px 14px;height:14px;vertical-align:baseline;width:14px}button.gv-zoom-btn.btn-zoom-right{border:0;box-shadow:none;right:0;top:13px}button.gv-zoom-btn.pan-right{background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-right:hover{background:inherit;background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-left{background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-left:hover{background:inherit;background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-top{background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-top:hover{background:inherit;background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-bottom{background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.pan-bottom:hover{background:inherit;background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.btn-zoom{height:14px;margin:0;padding:0;position:absolute;width:16px}button.gv-zoom-btn.btn-zoom-top{border:0;box-shadow:none;left:13px;top:1}button.gv-zoom-btn.btn-zoom-left{border:0;box-shadow:none;left:0;top:13px}button.gv-zoom-btn.btn-zoom-bottom{border:0;box-shadow:none;left:13px;top:25px}button.gv-icon-btn{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;background-size:36px 36px;height:36px;width:36px}button.gv-icon-btn.active{background-color:#8aa051}button.gv_dropdown_entry{height:30px;margin:4px 4px 4px 12px;width:160px}button.gv_context_button{width:65px}button.large-distance{margin-left:12px}button.short-distance{margin-left:6px}button.shutdown{margin-top:6px;padding:3px 14px}button.graphViewer-icon-button{background-color:transparent;border:0;height:20px;margin-left:5px;margin-top:-2px;padding:0;width:20px}button.graphViewer-icon-button img{height:20px;padding-bottom:10px;width:20px}ul.headerButtonList{display:inline-block;margin-bottom:0;margin-left:0;padding-left:0!important}ul.headerButtonList li{display:inline}a.button-gui,a.headerButton{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;margin-left:5px;margin-right:5px}a.headerButton{margin-top:2px;position:relative}a.headerButton .fa,a.headerButton [class*=" icon_"],a.headerButton [class^=icon_]{display:block;height:23px;line-height:23px;position:static;right:0;text-align:center;top:0;width:27px}a.button-gui.button-gui-disabled,div.headerDropdown,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox{display:none}a.headerButton .icon_arangodb_arrowleft,a.headerButton .icon_arangodb_arrowright{font-weight:700}a.headerButton.activated{background-color:#788f3d;border:1px solid #788f3d;color:#fff}div.toolbox,div.toolbox div.gv_action_button{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff}a.headerButton.activated:hover{background-color:#fff;color:#788f3d}div.toolbox{border-radius:3px;border:1px solid rgba(140,138,137,.25);margin-right:5px;margin-top:-3px;padding-bottom:5px;padding-top:5px;position:absolute}div.toolbox div.gv_action_button{border-radius:3px;color:#555;height:30px;margin:5px;position:relative;width:30px}div.toolbox div.gv_action_button.active{background-color:#8aa051;color:#fff}div.toolbox div.gv_action_button:first-child{margin-top:0}div.toolbox div.gv_action_button:last-child{margin-bottom:0}h6.gv_button_title,h6.gv_icon_icon{left:0;margin:0;position:absolute;right:0}h6.gv_icon_icon{font-size:22px;left:1px;top:4px}h6.gv_button_title{bottom:1px;display:none}.btn-icon{background-color:#383434;padding:4px}.gv-icon-small{background-size:16px 16px;height:16px!important;width:16px!important}.gv-icon-small.delete{background-image:url(../img/icon_delete.png)}.gv-icon-small.add{background-image:url(../img/plus_icon.png)}a.pagination-button,ul.arango-pagination a{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.badge,.btn,.label{text-shadow:none!important}.navbar-inner,.thumbnail{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0}.modal-body th.actionCell>button{margin-top:-12px}.btn-old-padding{padding-bottom:4px!important;padding-top:4px!important}button.btn-overview,button.btn-server{margin:5px}a.button-gui{height:auto;margin-bottom:0;margin-top:0;padding-bottom:1px;padding-top:1px;position:absolute;right:2px;text-decoration:none!important;top:2px;width:auto}.clusterDownBtn{padding-bottom:10px;padding-top:10px}.clusterDownBtn button{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#f1f1f1;border:1px solid rgba(0,0,0,.1875);color:#333;font-size:20px;font-weight:300;margin:0;padding:12px 18px;text-decoration:none!important;width:250px}.clusterDownBtn button:hover{background-color:#e8e8e8;color:#4a6c30;-webkit-transition-delay:0;-webkit-transition-duration:.2s;-webkit-transition-property:all;-webkit-transition-timing-function:ease-in}.clusterDownBtn button.green{background-color:#617e2b;color:#fff}.clusterDownBtn button.green:hover{background-color:#8ba142}.bottomButtonBar{background-color:#fff;border-top:1px solid rgba(104,103,102,.1);height:30px;padding:10px}.clusterInfoIcon{float:left;padding-left:5px;padding-top:2px}.waitModal.icon{font-size:100px;height:120px}.waitModal.message{font-size:20px}.icon_arangodb_info{color:#333;font-size:23px}li a [class*=" icon_arangodb"],li a [class^=icon_arangodb]{font-size:18px;position:absolute;right:4px;top:2px}.fa-minus-circle{color:#da4f49;font-size:14pt}.fa-minus-circle:hover{cursor:pointer}div.headerDropdown{background-color:#fff;border-radius:3px;clear:both;padding:10px;position:relative;width:auto}div.headerDropdown.smallDropdown .dropdownInner{min-height:20px}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.dropdown-title{margin-bottom:10px}div.dropdownInner{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;min-height:125px;position:relative;width:auto}div.dropdownInner .nav-header{font-size:10pt}div.dropdownInner>.nav-header{color:#000;font-size:10pt;font-weight:400}div.dropdownInner>label{color:#000;font-weight:300}div.dropdownInner ul{border-left:1px solid rgba(140,138,137,.25);display:inline;list-style-type:none;margin-left:10px;margin-top:10px;min-height:105px;width:175px}div.dropdownInner ul:first-of-type,div.queryline input[type=file]{border:0}div.dropdownInner ul label{color:#000;padding-left:20px}div.dropdownInner ul li .fa{color:#999;margin-right:5px}div.dropdownInner ul li .fa.fa-square-o{margin-left:1px;margin-right:6px}div.dropdownInner ul li .fa.fa-check-circle-o,div.dropdownInner ul li .fa.fa-check-square-o,div.dropdownInner ul li .fa.fa-dot-circle-o{color:#8aa051}div.queryline{color:#000;height:35px}div.queryline .textDiv{margin-right:10px;margin-top:4px}div.queryline input,div.queryline select{margin-bottom:5px}div.queryline input{width:16%}div.queryline.querylineAdd span{color:#fff;padding-left:10px;position:relative;top:-21px}div.queryline .removeFilterItem i{margin-left:5px!important;margin-top:0!important}div.queryline div.searchByAttribute{margin-left:6px;margin-right:6px;position:relative}div.queryline div.searchByAttribute input{width:140px}div.queryline div.searchByAttribute>ul.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:#fff;color:#fff;display:none;left:0;position:absolute;top:20px;width:247px}div.dropdownImport{background-color:#fff;border-radius:3px;display:none;position:relative;padding:10px 10px 5px}div.dropdownImport input{line-height:0;margin-bottom:-15px;margin-top:5px}select.filterSelect{color:#00f;margin-left:10px;margin-right:10px;width:80px}#filterHeader button{float:right;margin-left:10px!important;margin-top:1px}div.input-append button.gv_example_toggle{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;background-color:#8f8d8c;height:30px;margin-left:-1px;padding-left:10px;padding-right:10px;padding-top:12px;vertical-align:top}div.input-append button.gv_example_toggle:hover{background-color:#8aa051}div.headerBar,div.headerBar .infoField{background-color:#fff;padding-left:5px;padding-right:5px}.searchEqualsLabel{margin-left:6px;margin-right:6px}img.gv-throbber{background-image:url(../img/swagger/throbber.gif)}span.gv_caret{border-top:5px solid #fff;margin-top:2px!important}input.search-input{height:14px;line-height:18px;margin-right:-1px;margin-top:6px;width:120px}.search-field{margin-left:10px}.search-field .fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:absolute;right:9px;top:9px}.search-field .fa-search:hover{cursor:pointer;opacity:1}.gv-search-submit-icon,.search-submit-icon{background-image:url(../img/enter_icon.png);background-size:14px;height:14px;margin-left:-18px;opacity:.2;position:absolute;width:14px}.gv-search-submit-icon:hover,.search-submit-icon:hover{opacity:.8}.search-submit-icon{margin-top:11px}.gv-search-submit-icon{margin-top:6px}div.headerBar{border-radius:3px;color:#fff;font-size:16px;height:36px;margin-bottom:5px;margin-top:15px;position:relative}div.headerBar .infoField{border:1px solid rgba(140,138,137,.25);border-radius:3px!important;color:#000;float:right;font-size:12px;margin-right:7px;margin-top:7px}div.headerBar .infoField .fa{cursor:pointer;margin-left:5px}div.headerBar input[type=checkbox].css-checkbox{display:none}div.headerBar input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;cursor:pointer;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerBar input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.headerBar input[type=radio]{display:none}div.headerBar input[type=radio] label span{background:url(../img/check_radio_sheet.png) -38px top no-repeat;cursor:pointer;display:inline-block;height:19px;margin:-1px 4px 0 0;vertical-align:middle;width:19px}#transparentHeader input[type=checkbox].css-checkbox,.lineGraph .many .dygraph-legend>span,.modal-delete-confirmation{display:none}div.headerBar input[type=radio]:checked+label span{background:url(../img/check_radio_sheet.png) -57px top no-repeat}.headerButtonList a.error{color:#da4f49}.headerButtonList a.error:hover{background-color:#da4f49;border-color:#da4f49;color:#fff}.headerBar a.arangoHeader{color:#000;font-size:11.5pt;font-weight:100;left:0;position:relative;top:7px}.headerBar>div.headerButtonBar{margin:4px 0;margin-bottom:0!important}.breadcrumb{background:0 0;border:0;border-radius:0;padding:7px 0}.breadcrumb .disabledBread{color:#666;float:left;font-size:11.5pt;font-weight:100;padding-right:5px;position:relative}.breadcrumb .disabledBread i{font-size:10pt;margin-left:10px}.breadcrumb .activeBread{color:#8aa051;float:left;font-size:11.5pt;font-weight:100}.breadcrumb #app-development-path{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);border-left:1px solid rgba(140,138,137,.25);border-radius:3px;border-right:1px solid rgba(140,138,137,.25);height:24px;margin-left:-6px;margin-top:-10px;padding-left:5px;width:100%}.arangoHeader{font-weight:400}.checkboxLabel{margin-top:4px;padding-left:0}.css-label{background-image:url(../img/dark-check-green.png)}.css-label-round{background-image:url(../img/dark-check-green-round.png)}.modal-dashboard-header,.modal-header{background-color:#fff;border-bottom:0!important;border-radius:3px;margin-top:5px;padding-left:5px;padding-right:10px;padding-top:4px}.modal-dashboard-header .arangoHeader,.modal-header .arangoHeader{color:#000;font-size:13pt;font-weight:100;left:5px;position:relative;top:2px}.modal-dashboard-header a,.modal-header a{top:2px!important}.modal-dashboard-header .close,.modal-header .close{color:#fff;font-weight:300;margin-top:2px;opacity:.5}.modal-dashboard-header .close:hover,.modal-header .close:hover{opacity:1}.modal-tabbar{border-bottom:1px solid #666}.modal-body{color:#736b68;font-size:14px;font-weight:300;max-height:410px}.modal-body .select2-choices{background-image:none!important;border:1px solid #999;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.modal-body .select2-choices input:active{-webkit-box-shadow:none;box-shadow:none;outline:0!important}.modal-body .select2-choices .select2-search-choice{margin:5px 0 3px 5px!important}.modal-body .select2-choices li{background-color:#fff!important;background-image:none!important;color:#000}.modal-body tr.first,.modal-body tr.last,.modal-body tr.middle{background-color:#f5f8f0}.modal-body .select2-choices li a{margin-left:1px;margin-top:-1px}.modal-body .select2-choices:active{border:1px solid #999;-webkit-box-shadow:none!important;box-shadow:none!important;outline:transparent!important}.modal-body .nav-tabs{margin-top:15px}.modal-body .nav-tabs>li>a:hover{border-color:#8c8a89}.modal-body input,.modal-body select,.modal-body textarea{margin-top:10px}.modal-body input[type=checkbox]{margin-bottom:10px}.modal-body input[type=text].invalid-input{border-color:rgba(234,23,23,.6)}.modal-body input[type=text].invalid-input:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6)}.modal-body input[type=file]{line-height:17px}.modal-body tr.spacer{height:10px}.modal-body tr.first th:first-child{border-top-left-radius:3px}.modal-body tr.first th:last-child{border-top-right-radius:3px}.modal-body tr.middle{padding-left:10px;padding-right:10px}.modal-body tr.last th:first-child{border-bottom-left-radius:3px}.modal-body tr.last th:last-child{border-bottom-right-radius:3px}.modal-body tr.first th:first-child,.modal-body tr.last th:first-child,.modal-body tr.middle th:first-child{padding-left:10px}.modal-body tr.first th:last-child,.modal-body tr.last th:last-child,.modal-body tr.middle th:last-child{padding-right:10px}.modal-body th.actionCell{width:30px}.modal-body th.keyCell{width:170px}.modal-body th.keyCell input{width:150px}.modal-body th .valueCell{width:300px}.modal-body th .valueCell input{width:290px}.modal-body th .select2-container{margin-bottom:10px;margin-top:10px}.modal-body .icon-info-sign{margin-bottom:10px;margin-left:10px;opacity:.7;padding-bottom:5px}.modal-body .icon-info-sign:hover{opacity:1}.modal-body .icon_arangodb_info{color:#736b68;font-size:18px;margin-top:-10px;position:absolute;right:12px}.modal-body .icon_arangodb_info:hover{color:#000}.modal-body .collapse{margin-right:-14px;position:relative}.modal-body .accordion-inner{border-top:0;margin-left:0;padding-left:0;padding-right:0}.modal-body .accordion-toggle span .caret{border-top-color:#000;float:right;margin-top:5px}.modal-body .accordion-toggle.collapsed span .caret{-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.modal-body input{width:436px}.modal-body select{width:450px}.modal-body .collectionTh{height:50px}.modal-body .tab-content{min-height:200px}.modal-body .tab-content .tab-pane{border-top:1px solid #666!important;margin-left:0!important;padding-top:10px}.modal-body .tab-content .tab-pane-modal{border-top:none!important}.modal-body .tab-content #appstore{max-height:290px}.modal-body .errorMessage{color:#da4f49;font-size:9pt;font-weight:400;margin-bottom:5px;margin-top:-9px;position:absolute}.modal-body .nav .tab-icon{margin-right:5px;margin-top:-3px;width:20px}.modal-text{font-weight:300;padding-bottom:3px;padding-top:3px}.modal-backdrop,.modal-backdrop.fade.in{opacity:.4}.fade{opacity:0;-moz-transition:opacity 30ms linear;-ms-transition:opacity 30ms linear;-o-transition:opacity 30ms linear;-webkit-transition:opacity 30ms linear;transition:opacity 30ms linear}.modal{border:0!important;border-radius:3px!important;box-shadow:0;margin-left:-325px!important;width:650px}.modal .fade.in{top:12.1%!important}.modal table tr:last-child{border-bottom:0!important}.waitModal{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;border:0;color:#fff}.waitModalBackdrop{opacity:.7!important}.modalTooltips span{color:#736b68;font-size:20px}.modalTooltips span:hover{color:#000}.gv-object-view{text-align:left;white-space:pre}.capitalize{text-transform:capitalize}.modal-footer{border-top:0!important;padding-right:17px}.modal-footer .button-close{margin-left:20px;margin-right:10px}.modal-header{margin-left:5px;margin-right:5px}.modal-dashboard-header{margin-left:0;margin-right:0;padding-bottom:9px}.modal table tr,.thBorderBottom{border-bottom:1px solid #f7f3f2!important}.modal-delete-confirmation button{margin-right:10px;margin-top:-4px}.modal-delete-confirmation button .modal-confirm-delete{margin-right:-18px}.modal-delete-confirmation fieldset input{float:left}.modal-delete-confirmation fieldset label{float:left;margin-left:10px}.createModalDialog table{width:100%}.createModalDialog .collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.createModalDialog .figures1,.createModalDialog .figures2{margin-bottom:20px;width:300px}.createModalDialog .figures2{margin-left:20px!important}.createModalDialog .figures3{margin-bottom:0;width:100%}.foxx-store-row .foxx-name{font-weight:700}.foxx-store-row .foxx-author{font-size:10pt;font-weight:300;margin-top:-4px}.foxx-store-row .foxx-version{font-weight:400}#new-app-mount{margin-right:24px;width:360px}#control_event_edge_delete_modal,#control_event_edge_edit_modal,#control_event_new_node_modal,#control_event_node_delete_modal,#control_event_node_edit_modal{margin-left:-320px;width:640px}.scenarioImage{height:70%;width:auto}svg.clusterChart{height:auto;margin:auto;width:auto}.lineGraph{position:absolute}.lineGraph .few .dygraph-legend>span.highlight{border:1px solid grey}.lineGraph .many .dygraph-legend>span.highlight{display:inline}a.coordinator,a.dbserver{color:#000;height:50px;position:absolute;top:10px;width:50px}a.coordinator h6.serverName,a.dbserver h6.serverName{bottom:0;font-size:11px;left:0;margin:0;position:absolute;right:0}a.coordinator.single{left:90px}a.coordinator.double{left:60px}a.dbserver.single{right:90px}a.dbserver.double{right:60px}.cluster-connection-check-success{color:#8aa051;margin-left:20px}.cluster-connection-check-fail{color:#da4f49;margin-left:20px}.cluster-unreachable-info{margin:0 auto;max-width:320px;padding-top:17px;text-align:center}.machineClass{background-color:#e1e1e1;margin-left:31px;margin-right:31px;padding:10px}.scenarioBox{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:rgba(0,0,0,.075);border:1px solid rgba(0,0,0,.19);height:65px;left:10px;margin-top:30px;position:absolute;right:10px;width:auto}.scenarioMachine,div .bigtile,div .tile{background-color:#fff;position:relative}.scenarioBox.bottomBox{bottom:30px}.scenarioBoxHeader{border-bottom:1px solid rgba(0,0,0,.19);height:18px;line-height:18px;margin-top:0;padding-bottom:0;text-align:center;width:auto}.scenarioBoxText{font-size:13px;font-weight:400;margin-top:17px;text-align:center;width:auto}.collectionName,div .bigtile .badge-success,div .tile .badge-success{font-weight:300}.scenarioMachine{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border:1px solid rgba(0,0,0,.19);height:257px;margin-right:17px;width:109px}.scenarioMachine:last-child{margin-right:0}.scenarioSingleMachine{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background-color:#fff;border:1px solid rgba(0,0,0,.19)}.scenarioSingleMachine .scenarioMachine{border:1px solid transparent;height:238px}.bigtile.informationtile{cursor:auto}.informationText{background:#fff;font-size:12px;margin:10px;padding:5px;text-align:left}.tileList{margin-left:-6px;margin-right:-6px}.tileList legend{padding-left:5px}.tileList .tile:first-child a{opacity:.8}.tileList .tile:first-child a:hover{opacity:1}div .bigtile,div .tile{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:1px solid #f5f8f0;border-radius:3px;font-size:14px;list-style:none;margin-bottom:13px;margin-left:6px;margin-right:6px;text-align:center;z-index:1}div .bigtile progress[value],div .tile progress[value]{color:#5bc0de}div .bigtile progress::-webkit-progress-bar-value,div .tile progress::-webkit-progress-bar-value{background:#5bc0de}div .bigtile progress::-webkit-progress-value,div .tile progress::-webkit-progress-value{background:#5bc0de}div .bigtile progress::-moz-progress-bar,div .tile progress::-moz-progress-bar{background:#5bc0de}div .bigtile progress,div .tile progress{-webkit-appearance:none;border-radius:0;height:2px;margin-top:16px;position:relative;width:100%;z-index:10}div .bigtile:hover,div .tile:hover{cursor:pointer}div .locked.bigtile,div .locked.tile{cursor:not-allowed}div .locked.bigtile .borderBox,div .locked.bigtile .collection-type-icon,div .locked.bigtile .collectionName,div .locked.bigtile .iconSet,div .locked.tile .borderBox,div .locked.tile .collection-type-icon,div .locked.tile .collectionName,div .locked.tile .iconSet{opacity:.5}div .locked.bigtile .iconSet span:hover,div .locked.tile .iconSet span:hover{background-color:#fff!important;color:#000;cursor:not-allowed!important}div .locked.bigtile .iconSet:hover,div .locked.tile .iconSet:hover{cursor:not-allowed!important}div .bigtile .collection-type-icon:hover,div .bigtile img:hover,div .tile .collection-type-icon:hover,div .tile img:hover{cursor:pointer}div .bigtile .warning-icons,div .tile .warning-icons{background-color:#da4f49;border-radius:3px;color:#fff;font-size:11px;height:17px;left:0;line-height:13px;margin-left:5px;margin-top:5px;padding-left:9px;padding-right:9px;position:absolute;top:0}div .bigtile a svg.icon,div .bigtile img.icon,div .tile a svg.icon,div .tile img.icon{height:50px;width:50px}div .bigtile .warning-icons .fa,div .tile .warning-icons .fa{font-size:11pt;margin-left:1px}div .bigtile .collection-type-icon,div .tile .collection-type-icon{color:#666;font-size:30pt;margin-top:12pt}div .bigtile img,div .tile img{position:relative}div .bigtile a span.add-Icon,div .tile a span.add-Icon{font-size:20px;margin-left:22px;margin-right:10px;position:relative;top:0}div .bigtile a span.icon,div .tile a span.icon{font-size:50px}div .bigtile .tile-icon-svg,div .tile .tile-icon-svg{cursor:pointer;fill:#686766;height:50px;margin-left:90px;margin-top:10px;position:absolute;width:50px}div .bigtile .tile-icon,div .tile .tile-icon{color:#686766;font-size:50px;line-height:1.2}div .bigtile .icon_arangodb_edge5-2,div .tile .icon_arangodb_edge5-2{display:inline-block;position:relative;top:15px;-moz-transform:rotate(80deg);-o-transform:rotate(80deg);-webkit-transform:rotate(80deg)}div .bigtile h5,div .tile h5{background:#8c8a89;color:#fff;font-size:12px;margin:0;overflow:hidden!important;padding:4px 8px;text-overflow:ellipsis!important;white-space:nowrap!important}div .bigtile h5.inProgress,div .tile h5.inProgress{color:#5bc0de}div .bigtile .tileSelects,div .tile .tileSelects{margin-left:40px;position:relative;z-index:9999}div .bigtile .tileSelects select,div .tile .tileSelects select{float:right;height:20px;margin-right:5px;margin-top:16px;width:70px}div .bigtile .fullBorderBox,div .tile .fullBorderBox{border:1px solid rgba(140,138,137,.25);border-radius:3px;height:100%;position:absolute;width:100%}div .bigtile .borderBox,div .tile .borderBox{border:1px solid rgba(140,138,137,.25);border-bottom:0;border-radius:3px;height:75px;position:absolute;width:224px}.collectionName,.dashboard-sub-bar{border-bottom-left-radius:3px;border-bottom-right-radius:3px}div .bigtile .iconSet,div .tile .iconSet{position:absolute;right:5px;top:5px}div .bigtile .iconSet span,div .tile .iconSet span{border-radius:3px;color:#666;font-size:18px;z-index:2;padding:2px 3px}div .bigtile .iconSet span:hover,div .tile .iconSet span:hover{background-color:#8aa051;color:#fff}div .bigtile .iconSet span.disabled,div .tile .iconSet span.disabled{cursor:default;opacity:.2}div .bigtile .iconSet span.disabled:hover,div .tile .iconSet span.disabled:hover{background-color:#fff;color:#000;cursor:default;opacity:.2}div .bigtile .unloaded div,div .tile .unloaded div{border-bottom:16px solid #ff8f35}div .bigtile .deleted div,div .tile .deleted div{border-bottom:16px solid #700}div .bigtile .tileBadge,div .tile .tileBadge{bottom:29px;font-size:11px;font-weight:300;position:absolute;right:0}div .bigtile .tileBadge button,div .tile .tileBadge button{margin-left:0;margin-right:5px}div .bigtile .tileBadge span,div .tile .tileBadge span{display:inline-block;line-height:15px}div .bigtile .tileBadge span .corneredBadge,div .tile .tileBadge span .corneredBadge{border-bottom-style:solid;border-bottom-width:17px;border-left:5px solid transparent;border-radius:3px;color:#fff;height:0;margin-bottom:4px;margin-right:5px;padding-left:1px;padding-right:6px}div .bigtile .tileBadge span .corneredBadge.loading,div .tile .tileBadge span .corneredBadge.loading{border-bottom-color:#ff8f35}div .bigtile .tileBadge span .corneredBadge.loaded,div .tile .tileBadge span .corneredBadge.loaded{border-bottom-color:#8aa051}div .bigtile .tileBadge span .corneredBadge.inProgress,div .tile .tileBadge span .corneredBadge.inProgress{border-bottom-color:#5bc0de}div .bigtile .tileBadge span .corneredBadge.development,div .bigtile .tileBadge span .corneredBadge.unloaded,div .tile .tileBadge span .corneredBadge.development,div .tile .tileBadge span .corneredBadge.unloaded{border-bottom-color:#ff8f35}div .tile{height:100px;width:226px}div .tile-graph .tile-icon:hover{cursor:pointer}div .bigtile{height:309px;width:452px}div .bigtile .shardContainer{font-size:30px}div .bigtile .shardContainer span{padding:2px}.collectionName{bottom:0;left:0;position:absolute;right:0;text-align:left}.dashboard-bar-chart-container,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-medium-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-tendency-container{border-top-left-radius:3px;border-top-right-radius:3px}.dashboard-bar-chart-container:first-child,.dashboard-full-width-chart .dashboard-full-width-chart-inner:first-child,.dashboard-large-chart .dashboard-large-chart-inner:first-child,.dashboard-medium-chart:first-child,.dashboard-small-chart .dashboard-small-chart-inner:first-child,.dashboard-tendency-container:first-child{margin-left:0}.dashboard-bar-chart-container,.dashboard-full-width-chart,.dashboard-large-chart,.dashboard-medium-chart,.dashboard-small-chart,.dashboard-tendency-container{margin-bottom:10px;position:relative}.dashboard-sub-bar-menu{cursor:pointer;position:absolute;right:9px;top:6px}.dataNotReadyYet{color:#faa732;font-family:'Open Sans',sans-serif;font-size:14px;font-weight:100;text-align:center}.dashboard-sub-bar{background-color:#686766;color:#fff;height:24px;line-height:24px;margin:0;padding:0 6px}.dashboard-full-width-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-subtitle-bar.top{border-bottom:1px solid #e1e1e1;height:48px;line-height:48px;text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{border-left:1px solid #e1e1e1}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner{margin-left:10px;margin-right:10px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table{margin-bottom:10px;margin-top:10px;table-layout:fixed;width:100%}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-medium-chart .dashboard-interior-chart{margin-bottom:0}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table .no-data{font-style:italic;font-weight:100}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table tr{border-bottom:1px solid rgba(0,0,0,.025)}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:first-child{width:100px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:last-child{text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart:first-child{border-left:0}.dashboard-full-width-chart .state{background-color:#fff;border-radius:5px;color:#000;margin-left:5px;padding-left:6px;padding-right:4px}.dashboard-large-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-large-chart .dashboard-large-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-small-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-small-chart .dashboard-small-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:5px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart-outer:first-child{margin-right:10px}.dashboard-medium-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;margin-bottom:0;padding-top:10px}.dashboard-medium-chart:first-child{margin-right:12px}.dashboard-medium-chart .dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart .dashboard-medium-chart-menu{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:0 solid rgba(0,0,0,.3);color:rgba(0,0,0,.3);cursor:pointer;padding:0 4px;position:absolute;z-index:1000}.dashboard-medium-chart .dashboard-medium-chart-menu:hover{color:rgba(0,0,0,.7)}.dashboard-medium-chart .dashboard-medium-chart-inner{padding-bottom:10px}.dashboard-medium-chart .clusterChart .slice path{fill-opacity:.15;stroke-opacity:1;stroke-width:1.5px}.dashboard-tendency-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-tendency-container .dashboard-tendency-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{background-color:#fff;margin-top:5px;padding:0 8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency:first-child{border-right:1px solid #e1e1e1}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar{border-bottom:1px solid #e1e1e1;text-align:right}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure{text-align:center}.dashboard-bar-chart-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-bar-chart-container .dashboard-bar-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{margin-top:5px;padding:0 8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{font-weight:400}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{text-align:right}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-legend .dashboard-legend-inner{padding:0 5px 5px 0}.dashboard-spacer{margin:0 12px}.headerBar.dashboard-headerbar{margin:20px 0}.modal-chart-detail .modal-dashboard-legend .dashboard-legend-inner{padding-left:20px}.dashboard-half-height-legend .dashboard-legend-inner{padding-top:20px}.dashboard-title-bar{background-color:#686766;color:#fff;font-size:14.5px;font-weight:400;height:30px;line-height:30px;padding:0 5px 0 10px}.dashboard-title-bar .dashboard-half-title-bar{border-left:1px solid #000;margin-left:-1px;width:50%}.dashboard-title-bar .dashboard-half-title-bar:first-child{border-left:0;margin-left:0}.dashboard-row{margin-bottom:0;margin-left:0;margin-right:0}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{color:#666}.resizecontainer{margin:0 auto}@media (max-width:738px){#arangoCollectionUl,.footer-center p{display:none}#collectionsDropdown ul{width:auto!important}#arangoCollectionSelect{display:inline-block;height:29px;margin-top:1px}#queryContent #querySize,#queryContent #querySizeDiv,#queryContent .styled-select{width:90px!important}}@media (max-width:970px){#documentsDiv #totalDocuments{display:none}.navmenu{padding-left:20px;padding-top:0;position:absolute}}@media (min-width:739px) and (max-width:1041px){#arangoCollectionUl a{font-size:12px;height:12px;padding:8px 5px}}@media (min-width:1042px) and (max-width:1284px){#arangoCollectionUl a{font-size:14px}}@media (min-width:250px) and (max-width:489px){.resizecontainer{width:228px}.dashboard-full-width-chart{width:225px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:215px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:69.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:214px}.dashboard-large-chart{width:146px}.dashboard-large-chart .dashboard-sub-bar{width:134px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:136px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:106px}.dashboard-medium-chart{width:96px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:95px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:96px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:79px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:66px}.dashboard-small-chart .dashboard-sub-bar{width:54px}.dashboard-small-chart .dashboard-small-chart-inner{width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:54px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:56px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:40px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-114px;width:248px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:208px}.modal-body .dashboard-large-chart{width:143px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:131px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:133px}.modal-body .dashboard-medium-chart-outer{float:left;width:91px}.modal-body .dashboard-medium-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:89px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:74px}.modal-body .dashboard-small-chart{width:61px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:49px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:51px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:6.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:51px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:56px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:40px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:228px}.application-detail-view aside.meta{display:none}}@media (min-width:490px) and (max-width:729px){.resizecontainer{width:468px}.dashboard-full-width-chart{width:465px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:455px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:149.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart{width:306px}.dashboard-large-chart .dashboard-sub-bar{width:294px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:296px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:226px}.dashboard-medium-chart{width:216px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:215px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:216px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:199px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:146px}.dashboard-small-chart .dashboard-sub-bar{width:134px}.dashboard-small-chart .dashboard-small-chart-inner{width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:48px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:134px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:136px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:120px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-234px;width:488px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:448px}.modal-body .dashboard-large-chart{width:303px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:291px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:293px}.modal-body .dashboard-medium-chart-outer{float:left;width:211px}.modal-body .dashboard-medium-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:194px}.modal-body .dashboard-small-chart{width:141px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:129px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:131px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:46.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:131px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:136px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:120px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:468px}.application-detail-view aside.meta{display:none}}@media (min-width:730px) and (max-width:969px){.resizecontainer{width:708px}.dashboard-full-width-chart{width:705px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:695px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:229.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:694px}.dashboard-large-chart{width:466px}.dashboard-large-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:456px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:346px}.dashboard-medium-chart{width:336px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:335px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:319px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:226px}.dashboard-small-chart .dashboard-sub-bar{width:214px}.dashboard-small-chart .dashboard-small-chart-inner{width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:88px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:214px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:216px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:200px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-354px;width:728px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:688px}.modal-body .dashboard-large-chart{width:463px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:451px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:453px}.modal-body .dashboard-medium-chart-outer{float:left;width:331px}.modal-body .dashboard-medium-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:329px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:314px}.modal-body .dashboard-small-chart{width:221px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:211px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:86.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:211px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:216px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:200px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:508px}}@media (min-width:970px) and (max-width:1209px){.resizecontainer{width:948px}.dashboard-full-width-chart{width:945px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:935px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:309.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart{width:626px}.dashboard-large-chart .dashboard-sub-bar{width:614px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:220px;width:496px}.dashboard-sub-bar-menu{font-size:13px}.dashboard-medium-chart-outer{float:left;width:466px}.dashboard-medium-chart{width:456px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:455px}.dashboard-medium-chart .dashboard-interior-chart{height:220px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:13px;left:438px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:220px;width:456px}.dashboard-medium-chart #clusterGraphs svg text{font-size:11px}.dashboard-small-chart{width:306px}.dashboard-small-chart .dashboard-sub-bar{width:294px}.dashboard-small-chart .dashboard-small-chart-inner{width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:229px;width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:11px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:96.5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:128px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:31.17px;line-height:31.17px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:52.33px;line-height:25.17px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:294px}.dashboard-bar-chart-container{height:98px}.dashboard-bar-chart-container .dashboard-bar-chart{height:96px;width:296px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:31.33px;line-height:31.33px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:45.67px;line-height:45.67px;padding:5px 8px 10px;width:280px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:50.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-474px;width:968px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:13px;min-height:225px;width:130px}.absolut,.percentage{font-size:15px}.modal-chart-detail .modal-inner-detail{width:808px}.modal-body .dashboard-large-chart{width:623px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:611px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:493px}.modal-body .dashboard-medium-chart-outer{float:left;width:451px}.modal-body .dashboard-medium-chart{width:451px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:433px}.modal-body .dashboard-small-chart{width:301px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:289px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:291px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:126.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:291px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:296px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:280px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:11px;font-weight:400}.dashboard-subtitle-bar{font-size:15px;font-weight:300}.dashboard-figure{font-size:18px;font-weight:400}.dashboard-figurePer{font-size:16px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:11px}.dashboard-legend{height:225px;margin-top:-3px;width:120px}.dashboard-half-height-legend{font-size:11px;height:117.5px;width:60px}.application-detail-view section.info{width:748px}}@media (min-width:1210px) and (max-width:1449px){.resizecontainer{width:1188px}.dashboard-full-width-chart{width:1185px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1175px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:389.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1174px}.dashboard-large-chart{width:786px}.dashboard-large-chart .dashboard-sub-bar{width:774px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:255px;width:646px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:586px}.dashboard-medium-chart{width:576px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:575px}.dashboard-medium-chart .dashboard-interior-chart{height:255px;width:446px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:16px;left:555px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:255px;width:576px}.dashboard-medium-chart #clusterGraphs svg text{font-size:12px}.dashboard-small-chart{width:386px}.dashboard-small-chart .dashboard-sub-bar{width:374px}.dashboard-small-chart .dashboard-small-chart-inner{width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:264px;width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:114px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:168px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:37px;line-height:37px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:64px;line-height:31px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:374px}.dashboard-bar-chart-container{height:115.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:113.5px;width:376px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:37.17px;line-height:37.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:57.33px;line-height:57.33px;padding:5px 8px 10px;width:360px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:62.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-594px;width:1208px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:14px;min-height:260px;width:140px}.absolut,.percentage{font-size:18px}.modal-chart-detail .modal-inner-detail{width:1038px}.modal-body .dashboard-large-chart{width:783px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:771px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:643px}.modal-body .dashboard-medium-chart-outer{float:left;width:571px}.modal-body .dashboard-medium-chart{width:571px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:569px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:441px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:550px}.modal-body .dashboard-small-chart{width:381px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:369px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:371px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:166.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:371px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:376px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:360px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:18px;font-weight:300}.dashboard-figure{font-size:22px;font-weight:400}.dashboard-figurePer{font-size:20px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:13px;font-weight:400}.dashboard-legend{font-size:12px;font-weight:400;height:260px;margin-top:-3px;width:130px}.dashboard-half-height-legend{font-size:12px;height:135px;width:65px}.application-detail-view section.info{width:988px}}@media (min-width:1450px) and (max-width:1689px){.resizecontainer{width:1428px}.dashboard-full-width-chart{width:1425px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1415px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:469.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart{width:946px}.dashboard-large-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:796px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:706px}.dashboard-medium-chart{width:696px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:695px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:556px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:18px;left:673px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:696px}.dashboard-medium-chart #clusterGraphs svg text{font-size:13px}.dashboard-small-chart{width:466px}.dashboard-small-chart .dashboard-sub-bar{width:454px}.dashboard-small-chart .dashboard-small-chart-inner{width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:208px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:454px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:456px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:440px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-714px;width:1448px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:15px;min-height:290px;width:150px}.absolut,.percentage{font-size:20px}.modal-chart-detail .modal-inner-detail{width:1268px}.modal-body .dashboard-large-chart{width:943px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:931px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:793px}.modal-body .dashboard-medium-chart-outer{float:left;width:691px}.modal-body .dashboard-medium-chart{width:691px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:551px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:668px}.modal-body .dashboard-small-chart{width:461px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:451px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:206.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:451px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:456px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:440px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:20px;font-weight:300}.dashboard-figure{font-size:26px;font-weight:400}.dashboard-figurePer{font-size:24px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:13px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:13px;height:150px;width:70px}.application-detail-view section.info{width:1228px}}@media (min-width:1690px) and (max-width:1929px){.resizecontainer{width:1668px}.dashboard-full-width-chart{width:1665px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1655px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:549.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1654px}.dashboard-large-chart{width:1106px}.dashboard-large-chart .dashboard-sub-bar{width:1094px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:325px;width:936px}.dashboard-sub-bar-menu{font-size:16px}.dashboard-medium-chart-outer{float:left;width:826px}.dashboard-medium-chart{width:816px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:815px}.dashboard-medium-chart .dashboard-interior-chart{height:325px;width:656px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:22px;left:789px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:325px;width:816px}.dashboard-medium-chart #clusterGraphs svg text{font-size:14px}.dashboard-small-chart{width:546px}.dashboard-small-chart .dashboard-sub-bar{width:534px}.dashboard-small-chart .dashboard-small-chart-inner{width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:334px;width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:149px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:248px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:48.67px;line-height:48.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:87.33px;line-height:42.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:534px}.dashboard-bar-chart-container{height:150.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:148.5px;width:536px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:48.83px;line-height:48.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:80.67px;line-height:80.67px;padding:5px 8px 10px;width:520px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:85.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-834px;width:1688px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:16px;min-height:330px;width:170px}.absolut,.percentage{font-size:24px}.modal-chart-detail .modal-inner-detail{width:1488px}.modal-body .dashboard-large-chart{width:1103px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1091px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:933px}.modal-body .dashboard-medium-chart-outer{float:left;width:811px}.modal-body .dashboard-medium-chart{width:811px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:809px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:651px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:784px}.modal-body .dashboard-small-chart{width:541px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:529px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:531px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:246.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:531px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:536px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:520px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:14px;font-weight:400}.dashboard-subtitle-bar{font-size:24px;font-weight:300}.dashboard-figure{font-size:30px;font-weight:400}.dashboard-figurePer{font-size:28px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:14px}.dashboard-legend{height:330px;margin-top:-3px;width:160px}.dashboard-half-height-legend{font-size:14px;height:170px;width:80px}.application-detail-view section.info{width:1468px}}@media (min-width:1930px) and (max-width:2169px){.resizecontainer{width:1908px}.dashboard-full-width-chart{width:1905px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1895px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:629.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1894px}.dashboard-large-chart{width:1266px}.dashboard-large-chart .dashboard-sub-bar{width:1254px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:385px;width:1086px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:946px}.dashboard-medium-chart{width:936px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:935px}.dashboard-medium-chart .dashboard-interior-chart{height:385px;width:766px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:26px;left:905px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:385px;width:936px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:626px}.dashboard-small-chart .dashboard-sub-bar{width:614px}.dashboard-small-chart .dashboard-small-chart-inner{width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:394px;width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:179px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:288px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:58.67px;line-height:58.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:107.33px;line-height:52.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:614px}.dashboard-bar-chart-container{height:180.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:178.5px;width:616px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:58.83px;line-height:58.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:100.67px;line-height:100.67px;padding:5px 8px 10px;width:600px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:105.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-954px;width:1928px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:390px;width:180px}.absolut,.percentage{font-size:28px}.modal-chart-detail .modal-inner-detail{width:1718px}.modal-body .dashboard-large-chart{width:1263px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1251px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1083px}.modal-body .dashboard-medium-chart-outer{float:left;width:931px}.modal-body .dashboard-medium-chart{width:931px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:929px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:761px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:900px}.modal-body .dashboard-small-chart{width:621px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:609px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:611px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:286.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:611px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:616px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:600px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:28px;font-weight:300}.dashboard-figure{font-size:34px;font-weight:400}.dashboard-figurePer{font-size:32px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:14px;font-weight:400}.dashboard-legend{font-size:15px;font-weight:400;height:390px;margin-top:-3px;width:170px}.dashboard-half-height-legend{font-size:15px;height:200px;width:85px}.application-detail-view section.info{width:1708px}}@media (min-width:2170px) and (max-width:2409px){.resizecontainer{width:2148px}.dashboard-full-width-chart{width:2145px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2135px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:709.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2134px}.dashboard-large-chart{width:1426px}.dashboard-large-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1276px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1066px}.dashboard-medium-chart{width:1056px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1055px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:916px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1031px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1056px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:706px}.dashboard-small-chart .dashboard-sub-bar{width:694px}.dashboard-small-chart .dashboard-small-chart-inner{width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:328px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:694px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:696px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:680px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1074px;width:2168px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:1988px}.modal-body .dashboard-large-chart{width:1423px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1411px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1273px}.modal-body .dashboard-medium-chart-outer{float:left;width:1051px}.modal-body .dashboard-medium-chart{width:1051px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1049px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:911px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1026px}.modal-body .dashboard-small-chart{width:701px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:691px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:326.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:691px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:696px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:680px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:1948px}}@media (min-width:2410px) and (max-width:2649px){.resizecontainer{width:2388px}.dashboard-full-width-chart{width:2385px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2375px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:789.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2374px}.dashboard-large-chart{width:1586px}.dashboard-large-chart .dashboard-sub-bar{width:1574px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1436px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1186px}.dashboard-medium-chart{width:1176px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1175px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1036px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1151px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1176px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:786px}.dashboard-small-chart .dashboard-sub-bar{width:774px}.dashboard-small-chart .dashboard-small-chart-inner{width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:368px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:774px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:776px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:760px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1194px;width:2408px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2228px}.modal-body .dashboard-large-chart{width:1583px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1571px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1433px}.modal-body .dashboard-medium-chart-outer{float:left;width:1171px}.modal-body .dashboard-medium-chart{width:1171px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1169px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1031px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1146px}.modal-body .dashboard-small-chart{width:781px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:769px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:771px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:366.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:771px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:776px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:760px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2188px}}@media (min-width:2650px) and (max-width:2889px){.resizecontainer{width:2628px}.dashboard-full-width-chart{width:2625px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2615px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:869.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2614px}.dashboard-large-chart{width:1746px}.dashboard-large-chart .dashboard-sub-bar{width:1734px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1596px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1306px}.dashboard-medium-chart{width:1296px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1295px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1156px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1271px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1296px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:866px}.dashboard-small-chart .dashboard-sub-bar{width:854px}.dashboard-small-chart .dashboard-small-chart-inner{width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:408px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:854px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:856px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:840px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1314px;width:2648px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2468px}.modal-body .dashboard-large-chart{width:1743px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1731px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1593px}.modal-body .dashboard-medium-chart-outer{float:left;width:1291px}.modal-body .dashboard-medium-chart{width:1291px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1289px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1151px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1266px}.modal-body .dashboard-small-chart{width:861px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:849px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:851px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:406.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:851px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:856px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:840px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2428px}}div.centralRow{margin-bottom:40px;margin-top:40px}div.centralContent{background-color:transparent;height:100%;margin-left:-5px;margin-right:-5px;min-height:80px;padding:5px;width:100%}.contentDiv{list-style:none;padding:13px 0 0}.contentDiv li{background-color:rgba(0,0,0,.05)}.contentDiv a.add{display:block;font-weight:400;padding:40px 0;text-align:left}.contentDiv .icon{padding-left:5px;padding-right:5px;padding-top:10px}.contentDiv:after{clear:both}.contentDiv:after,.contentDiv:before{content:'';display:table;line-height:0}body{background-color:rgba(245,248,240,.95)}.headerButtonBar select{border:1px solid rgba(140,138,137,.25);height:28px} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome/fontawesome-webfont.eot?v=4.4.0);src:url(../fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(../fonts/fontawesome/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(../fonts/fontawesome/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(../fonts/fontawesome/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(../fonts/fontawesome/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.modal-body,button{font-family:'Open Sans',sans-serif!important}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.contentDiv li,.dashboard-bar-chart-container,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage,.dashboard-full-width-chart,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart,.dashboard-half-height-legend,.dashboard-large-chart,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-legend,.dashboard-medium-chart,.dashboard-medium-chart .dashboard-interior-chart,.dashboard-small-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart,.dashboard-sub-bar,.dashboard-sub-bar .dashboard-sub-bar-title,.dashboard-tendency-container,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar,.dashboard-title-bar .dashboard-half-title-bar,.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.machineClass,.modal-chart-detail,.modal-chart-detail .modal-body,.modal-chart-detail .modal-dashboard-legend,.modal-chart-detail .modal-inner-detail,.navlist li,.navlogo,.pull-left,.scenarioMachine,.script-dropdown-menu,.user-dropdown-menu,a.button-gui,a.headerButton,div .bigtile,div .bigtile a span.add-Icon,div .tile,div .tile a span.add-Icon,div.centralContent,div.dropdownInner ul,div.footer-center,div.footer-left,div.footer-left p{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.dashboard-sub-bar-menu,.headerBar>div.headerButtonBar,.navmenu,.search-field,div .bigtile .iconSet span,div .tile .iconSet span,div.footer-right,div.footer-right p,ul.headerButtonList li{float:right}.dashboard-bar-chart-container .dashboard-bar-chart:after,.dashboard-medium-chart .dashboard-medium-chart-inner:after,.dashboard-medium-chart .dashboard-medium-chart-menu:after,.dashboard-row:after,.dashboard-sub-bar:after,.dashboard-tendency-container .dashboard-tendency-chart:after,.detail-chart:after,.headerBar>div.headerButtonBar:after,.machineClass:after,.resizecontainer:after,.scenarioSingleMachine:after,.tileList:after{clear:both;content:'.';display:block;font-size:0;height:0;visibility:hidden}.addButton,.arangoicon,.clusterDownBtn button,.contentDiv .icon,.deleteButton i,.gv-search-submit-icon,.icon-info-sign,.scenarioImage,.script-dropdown-menu .dropdown-item,.search-submit-icon,a.button-gui,a.headerButton,div .bigtile,div .bigtile .iconSet span,div .bigtile a span.icon,div .bigtile a svg,div .tile .iconSet span,div .tile a span.icon,div .tile a svg,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,div.toolbox div.gv_action_button{cursor:pointer}.navbar,footer.footer{background-color:rgba(245,248,240,.95);color:#fff;left:0;position:fixed;right:0;width:100%;z-index:1000}.button-danger{background-color:#da4f49}.button-danger:focus,.button-danger:hover{background-color:#be342e}.deleteButton i,a.danger.coordinator,a.danger.dbserver{color:#da4f49}.deleteButton i:focus,.deleteButton i:hover,a.danger.coordinator:focus,a.danger.coordinator:hover,a.danger.dbserver:focus,a.danger.dbserver:hover{color:#be342e}a.danger.coordinator,a.danger.dbserver{fill:#da4f49}a.danger.coordinator:focus,a.danger.coordinator:hover,a.danger.dbserver:focus,a.danger.dbserver:hover{fill:#be342e}.button-success{background-color:#8aa051}.button-success:focus,.button-success:hover{background-color:#788f3d}.addButton,a.success.coordinator,a.success.dbserver{color:#8aa051}.addButton:focus,.addButton:hover,a.success.coordinator:focus,a.success.coordinator:hover,a.success.dbserver:focus,a.success.dbserver:hover{color:#788f3d}a.success.coordinator,a.success.dbserver{fill:#8aa051}a.success.coordinator:focus,a.success.coordinator:hover,a.success.dbserver:focus,a.success.dbserver:hover{fill:#788f3d}.button-warning{background-color:#faa732}.button-warning:focus,.button-warning:hover{background-color:#f89406}a.warning.coordinator,a.warning.dbserver{color:#faa732;fill:#faa732}a.warning.coordinator:focus,a.warning.coordinator:hover,a.warning.dbserver:focus,a.warning.dbserver:hover{color:#f89406;fill:#f89406}.button-close,.button-neutral{background-color:#8f8d8c}.button-close:focus,.button-close:hover,.button-neutral:focus,.button-neutral:hover{background-color:#736b68}.dashboard-sub-bar-menu{color:#8f8d8c}.dashboard-sub-bar-menu:focus,.dashboard-sub-bar-menu:hover{color:#736b68}.button-primary{background-color:#564e4a}.button-primary:focus,.button-primary:hover{background-color:#3a322e}.button-header,a.button-gui,a.headerButton{background-color:#fff;border:1px solid #fff;color:#555}.button-header:focus,.button-header:hover,a.button-gui:focus,a.button-gui:hover,a.headerButton:focus,a.headerButton:hover{background-color:#8aa051;border:1px solid #8aa051;color:#fff}.button-notification{background-color:#faa020}.button-notification:focus,.button-notification:hover{background-color:#f87c0f}.button-inactive,.button-inactive:focus,.button-inactive:hover,[class*=' button-']:disabled,[class*=' button-']:focus:disabled,[class*=' button-']:hover:disabled,[class^=button-]:disabled,[class^=button-]:focus:disabled,[class^=button-]:hover:disabled,button.disabled,button.disabled:focus,button.disabled:hover{background-color:#d3d3d3}a.headerButton.disabled,a.headerButton.disabled:focus,a.headerButton.disabled:hover,a.inactive.coordinator,a.inactive.coordinator:focus,a.inactive.coordinator:hover,a.inactive.dbserver,a.inactive.dbserver:focus,a.inactive.dbserver:hover{color:#d3d3d3}a.inactive.coordinator,a.inactive.coordinator:focus,a.inactive.coordinator:hover,a.inactive.dbserver,a.inactive.dbserver:focus,a.inactive.dbserver:hover{fill:#d3d3d3}div.queryline .fa.fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:relative;right:21px;top:-1px}div.queryline .fa.fa-search:hover{cursor:pointer;opacity:1}.modal-body .select2-choices input,.modal-body input,.modal-body select,.modal-body textarea,.navbar .arango-collection-select,div.queryline input,div.queryline select,input.search-input{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff!important;border:1px solid rgba(140,138,137,.25);box-shadow:none;outline:transparent 0}.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus,.navbar .arango-collection-select:focus,div.queryline input:focus,div.queryline select:focus,input.search-input:focus{border-color:#999;box-shadow:none;outline:transparent 0}.button-close:focus,.button-danger:focus,.button-inactive:focus,.button-neutral:focus,.button-notification:focus,.button-primary:focus,.button-success:focus,.button-warning:focus,div.headerBar select:focus{outline:0}.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.script-dropdown-menu,.user-dropdown-menu{background-color:#f5f8f0;border-color:#666;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;display:none;list-style:none;margin:5px 0 0;padding:5px 0;position:absolute;right:0;top:80%;z-index:1000}.script-dropdown-menu .dropdown-item a,.tab{display:block}.dropdown-toolbar li,.gv-dropdown-menu li,.link-dropdown-menu li,.script-dropdown-menu li,.user-dropdown-menu li{line-height:23px;white-space:nowrap;width:100%}.dropdown-toolbar .dropdown-header,.gv-dropdown-menu .dropdown-header,.link-dropdown-menu .dropdown-header,.script-dropdown-menu .dropdown-header,.user-dropdown-menu .dropdown-header{color:#999;font-size:15px;font-weight:600;font-variant:small-caps;padding:0}.dropdown-toolbar .dropdown-header:hover,.gv-dropdown-menu .dropdown-header:hover,.link-dropdown-menu .dropdown-header:hover,.script-dropdown-menu .dropdown-header:hover,.user-dropdown-menu .dropdown-header:hover{cursor:default}.dropdown-toolbar .divider,.gv-dropdown-menu .divider,.link-dropdown-menu .divider,.script-dropdown-menu .divider,.user-dropdown-menu .divider{background-color:#666;height:1px;margin:10px 0 5px}.dropdown-toolbar a,.gv-dropdown-menu a,.link-dropdown-menu a,.script-dropdown-menu a,.user-dropdown-menu a{color:#fff;padding:0 20px}.navbar{-webkit-font-smoothing:subpixel-antialiased;height:44px;margin-bottom:3px;padding-top:6px;top:0}.navbar .no-left-margin{border:0;margin-left:0}.navbar .no-left-margin.hover{background-color:transparent}.navbar .arangodbLogo{height:auto;margin-left:-5px;margin-top:-1px;width:40%}.navbar .arango-collection-select{position:relative;right:-22px;top:4px}.navbar .nav .dropdown .active>.dropdown-toggle,.navbar .nav .dropdown .open.active>.dropdown-toggle,.navbar .nav .dropdown .open>.dropdown-toggle{background:#788f3d}.navbar .nav>.active>a{-webkit-box-shadow:0 0 0 transparent inset;-moz-box-shadow:0 0 0 transparent inset;box-shadow:0 0 0 transparent inset;background-color:#fff;color:#000}.navbar .nav>li>a:focus{background-color:#fff}.navbar .nav>li>a:hover{background-color:#000;color:#686766}.navlist .dropdown-item:hover a,.navlist>.active a,.navlist>.active:hover a,.navlist>li:hover a{color:#000}.navlogo{margin-left:5px;margin-right:-3px;padding-top:3px}.navlist{list-style:none}.navlist>li{height:39px}.navlist li{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid transparent;margin-left:7px}.navlist li.dropdown:hover{background-color:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-left:1px solid rgba(0,0,0,.2);border-right:1px solid rgba(0,0,0,.2);border-top:1px solid rgba(0,0,0,.2)}.navlist li.dropdown:hover a{border-bottom:2px solid #fff}.navlist li.divider,.navlist li.navbar-spacer{border:0}.navlist li.divider{background-color:rgba(0,0,0,.2)}.navlist li.navbar-spacer{background-color:#a0a0a0;height:21px;margin-top:9px;width:1px}.navlist li.navbar-spacer.big{margin-left:15px;margin-right:15px}.navlist li.navbar-spacer.med{margin-left:5px;margin-right:5px}.navlist .dropdown-item,.script-dropdown-menu .dropdown-item{margin-left:0}.navlist li.navbar-spacer:hover{background-color:#a0a0a0}.navlist .active .tab{border-bottom:2px solid #8aa051;padding-bottom:4px}.navlist>.active{background-color:transparent}.navlist>.active:hover{background-color:#fff}.navlist .dropdown-item:hover,.navlist>li:hover{background-color:#fff;border-radius:3px}.navlist .dropdown-item a{border-bottom:0;display:block;font-size:11pt}.navlist .dropdown-item a:hover{background-color:#dee9cf;color:#686766}.tab{color:#686766;font-size:12pt;font-weight:100;padding:9px 5px 10px}.tab.userImg{padding-bottom:5px}.dropdown-item a{border-bottom:0!important;font-weight:300}.dropdown-toolbar,div.headerBar,div.headerDropdown{border:1px solid rgba(140,138,137,.25)}.dropdown-toolbar li a,footer.footer p{font-weight:100}.dropdown-toolbar{background-color:#fff!important}.dropdown-toolbar li a:hover{background:0 0;background-color:#dee9cf!important;color:#000!important}.link-dropdown-menu,.user-dropdown-menu{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-top-right-radius:0;margin-right:-1px;margin-top:7px;z-index:-10}.link-dropdown-menu .dropdown-item,.user-dropdown-menu .dropdown-item{border-left:0;border-right:0}.script-dropdown-menu .dropdown-item a:hover{color:#fff}.script-dropdown-menu .dropdown-item:hover{background-color:#8aa051}.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:rgba(0,0,0,.7);border:1px solid #c2c2c2;margin-right:-20px;margin-top:6px}.gv-dropdown-menu:after{border-bottom-color:#fff}.gv-dropdown-menu li:hover{background-color:#fff;background-image:none}.gv-dropdown-menu li a{padding:0}.gv-dropdown-menu li a label{color:#fff;padding-left:5px}.gv-dropdown-menu li a:focus{background-color:#8aa051!important;background-image:none}#arangoCollectionSelect{display:none;float:right;margin-bottom:0;margin-right:15px;padding-bottom:0}.caret{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #686766;content:'';display:inline-block;height:0;vertical-align:top;width:0}.applications-menu{display:block}.arango-logo{height:34px;padding:0!important}.arango-logo img{margin-left:22px}.footer{bottom:0;font-size:14px;left:0;position:fixed;right:0;z-index:1000}.modal,.select2-drop-active{z-index:9999999}footer.footer{bottom:0;height:40px}footer.footer p{font-size:10pt;margin-bottom:0;padding-bottom:10px;padding-top:10px}div.footer-left{background:none;color:#686766;width:45%}div.footer-left .social-icons{margin-top:5px}div.footer-left .social-icons a{display:block;float:left;height:25px;width:25px}div.footer-left .social-icons p{background:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;height:25px;margin-right:10px;padding:0;width:25px}div.footer-left .social-icons p:hover{background:#8aa051;cursor:pointer}div.footer-left .social-icons p:hover i{color:#fff}div.footer-left .social-icons i{color:#000;margin-top:6px;position:absolute}div.footer-left .social-icons i.fa-twitter{margin-left:-5px}div.footer-left .social-icons i.fa-envelope{margin-left:-19px}div.footer-left .social-icons i.fa-google{margin-left:-17px;margin-top:7px}div.footer-left .social-icons i.fa-stack-overflow{margin-left:-17px}div.footer-center{background:none;color:#686766;width:10%}div.footer-center i{background-color:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;margin-left:1px;padding:6px 2px;width:20px}div.footer-center i:hover{background-color:#8aa051;color:#fff}div.footer-center p{padding-top:5px}div.footer-center p:hover{cursor:pointer}[class*=' button-']:disabled,[class^=button-]:disabled,a.headerButton.disabled,button.disabled{cursor:not-allowed}div.footer-right{background:none;color:#686766;width:45%}div.footer-right p{color:#fff}div.footer-right i{color:#da4f49;font-size:18px}div.footer-right a{color:#686766;margin-left:5px;position:relative;top:-1px}div.footer-right .isOnline{color:#8aa051!important}.button-close,.button-danger,.button-header,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;font-size:14px;font-weight:300!important}.addButton,.deleteButton i{font-size:16pt;position:relative}.button-close,.button-danger,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{border:0;color:#fff;margin-left:10px;padding:5px 16px}.button-close i,.button-danger i,.button-inactive i,.button-neutral i,.button-notification i,.button-primary i,.button-success i,.button-warning i{margin-left:-5px}.button-header{margin-top:5px}.addButton{margin-right:7px;margin-top:2px}.deleteButton i{padding-right:3px;top:3px}#closeBtnInfoView{margin-left:0!important}button.btn-server{width:120px}button.gv-zoom-btn{background-size:14px 14px;height:14px;vertical-align:baseline;width:14px}button.gv-zoom-btn.btn-zoom-right{border:0;box-shadow:none;right:0;top:13px}button.gv-zoom-btn.pan-right{background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-right:hover{background:inherit;background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-left{background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-left:hover{background:inherit;background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-top{background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-top:hover{background:inherit;background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-bottom{background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.pan-bottom:hover{background:inherit;background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.btn-zoom{height:14px;margin:0;padding:0;position:absolute;width:16px}button.gv-zoom-btn.btn-zoom-top{border:0;box-shadow:none;left:13px;top:1}button.gv-zoom-btn.btn-zoom-left{border:0;box-shadow:none;left:0;top:13px}button.gv-zoom-btn.btn-zoom-bottom{border:0;box-shadow:none;left:13px;top:25px}button.gv-icon-btn{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;background-size:36px 36px;height:36px;width:36px}button.gv-icon-btn.active{background-color:#8aa051}button.gv_dropdown_entry{height:30px;margin:4px 4px 4px 12px;width:160px}button.gv_context_button{width:65px}button.large-distance{margin-left:12px}button.short-distance{margin-left:6px}button.shutdown{margin-top:6px;padding:3px 14px}button.graphViewer-icon-button{background-color:transparent;border:0;height:20px;margin-left:5px;margin-top:-2px;padding:0;width:20px}button.graphViewer-icon-button img{height:20px;padding-bottom:10px;width:20px}ul.headerButtonList{display:inline-block;margin-bottom:0;margin-left:0;padding-left:0!important}ul.headerButtonList li{display:inline}a.button-gui,a.headerButton{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;margin-left:5px;margin-right:5px}a.headerButton{margin-top:2px;position:relative}a.headerButton .fa,a.headerButton [class*=" icon_"],a.headerButton [class^=icon_]{display:block;height:23px;line-height:23px;position:static;right:0;text-align:center;top:0;width:27px}a.button-gui.button-gui-disabled,div.headerDropdown,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox{display:none}a.headerButton .icon_arangodb_arrowleft,a.headerButton .icon_arangodb_arrowright{font-weight:700}a.headerButton.activated{background-color:#788f3d;border:1px solid #788f3d;color:#fff}div.toolbox,div.toolbox div.gv_action_button{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff}a.headerButton.activated:hover{background-color:#fff;color:#788f3d}div.toolbox{border-radius:3px;border:1px solid rgba(140,138,137,.25);margin-right:5px;margin-top:-3px;padding-bottom:5px;padding-top:5px;position:absolute}div.toolbox div.gv_action_button{border-radius:3px;color:#555;height:30px;margin:5px;position:relative;width:30px}div.toolbox div.gv_action_button.active{background-color:#8aa051;color:#fff}div.toolbox div.gv_action_button:first-child{margin-top:0}div.toolbox div.gv_action_button:last-child{margin-bottom:0}h6.gv_button_title,h6.gv_icon_icon{left:0;margin:0;position:absolute;right:0}h6.gv_icon_icon{font-size:22px;left:1px;top:4px}h6.gv_button_title{bottom:1px;display:none}.btn-icon{background-color:#383434;padding:4px}.gv-icon-small{background-size:16px 16px;height:16px!important;width:16px!important}.gv-icon-small.delete{background-image:url(../img/icon_delete.png)}.gv-icon-small.add{background-image:url(../img/plus_icon.png)}a.pagination-button,ul.arango-pagination a{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.badge,.btn,.label{text-shadow:none!important}.navbar-inner,.thumbnail{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0}.modal-body th.actionCell>button{margin-top:-12px}.btn-old-padding{padding-bottom:4px!important;padding-top:4px!important}button.btn-overview,button.btn-server{margin:5px}a.button-gui{height:auto;margin-bottom:0;margin-top:0;padding-bottom:1px;padding-top:1px;position:absolute;right:2px;text-decoration:none!important;top:2px;width:auto}.clusterDownBtn{padding-bottom:10px;padding-top:10px}.clusterDownBtn button{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#f1f1f1;border:1px solid rgba(0,0,0,.1875);color:#333;font-size:20px;font-weight:300;margin:0;padding:12px 18px;text-decoration:none!important;width:250px}.clusterDownBtn button:hover{background-color:#e8e8e8;color:#4a6c30;-webkit-transition-delay:0;-webkit-transition-duration:.2s;-webkit-transition-property:all;-webkit-transition-timing-function:ease-in}.clusterDownBtn button.green{background-color:#617e2b;color:#fff}.clusterDownBtn button.green:hover{background-color:#8ba142}.bottomButtonBar{background-color:#fff;border-top:1px solid rgba(104,103,102,.1);height:30px;padding:10px}.clusterInfoIcon{float:left;padding-left:5px;padding-top:2px}.waitModal.icon{font-size:100px;height:120px}.waitModal.message{font-size:20px}.icon_arangodb_info{color:#333;font-size:23px}li a [class*=" icon_arangodb"],li a [class^=icon_arangodb]{font-size:18px;position:absolute;right:4px;top:2px}.fa-minus-circle{color:#da4f49;font-size:14pt}.fa-minus-circle:hover{cursor:pointer}div.headerDropdown{background-color:#fff;border-radius:3px;clear:both;padding:10px;position:relative;width:auto}div.headerDropdown.smallDropdown .dropdownInner{min-height:20px}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.dropdown-title{margin-bottom:10px}div.dropdownInner{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;min-height:125px;position:relative;width:auto}div.dropdownInner .nav-header{font-size:10pt}div.dropdownInner>.nav-header{color:#000;font-size:10pt;font-weight:400}div.dropdownInner>label{color:#000;font-weight:300}div.dropdownInner ul{border-left:1px solid rgba(140,138,137,.25);display:inline;list-style-type:none;margin-left:10px;margin-top:10px;min-height:105px;width:175px}div.dropdownInner ul:first-of-type,div.queryline input[type=file]{border:0}div.dropdownInner ul label{color:#000;padding-left:20px}div.dropdownInner ul li .fa{color:#999;margin-right:5px}div.dropdownInner ul li .fa.fa-square-o{margin-left:1px;margin-right:6px}div.dropdownInner ul li .fa.fa-check-circle-o,div.dropdownInner ul li .fa.fa-check-square-o,div.dropdownInner ul li .fa.fa-dot-circle-o{color:#8aa051}div.queryline{color:#000;height:35px}div.queryline .textDiv{margin-right:10px;margin-top:4px}div.queryline input,div.queryline select{margin-bottom:5px}div.queryline input{width:16%}div.queryline.querylineAdd span{color:#fff;padding-left:10px;position:relative;top:-21px}div.queryline .removeFilterItem i{margin-left:5px!important;margin-top:0!important}div.queryline div.searchByAttribute{margin-left:6px;margin-right:6px;position:relative}div.queryline div.searchByAttribute input{width:140px}div.queryline div.searchByAttribute>ul.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:#fff;color:#fff;display:none;left:0;position:absolute;top:20px;width:247px}div.dropdownImport{background-color:#fff;border-radius:3px;display:none;position:relative;padding:10px 10px 5px}div.dropdownImport input{line-height:0;margin-bottom:-15px;margin-top:5px}select.filterSelect{color:#00f;margin-left:10px;margin-right:10px;width:80px}#filterHeader button{float:right;margin-left:10px!important;margin-top:1px}div.input-append button.gv_example_toggle{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;background-color:#8f8d8c;height:30px;margin-left:-1px;padding-left:10px;padding-right:10px;padding-top:12px;vertical-align:top}div.input-append button.gv_example_toggle:hover{background-color:#8aa051}div.headerBar,div.headerBar .infoField{background-color:#fff;padding-left:5px;padding-right:5px}.searchEqualsLabel{margin-left:6px;margin-right:6px}img.gv-throbber{background-image:url(../img/swagger/throbber.gif)}span.gv_caret{border-top:5px solid #fff;margin-top:2px!important}input.search-input{height:14px;line-height:18px;margin-right:-1px;margin-top:6px;width:120px}.search-field{margin-left:10px}.search-field .fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:absolute;right:9px;top:9px}.search-field .fa-search:hover{cursor:pointer;opacity:1}.gv-search-submit-icon,.search-submit-icon{background-image:url(../img/enter_icon.png);background-size:14px;height:14px;margin-left:-18px;opacity:.2;position:absolute;width:14px}.gv-search-submit-icon:hover,.search-submit-icon:hover{opacity:.8}.search-submit-icon{margin-top:11px}.gv-search-submit-icon{margin-top:6px}div.headerBar{border-radius:3px;color:#fff;font-size:16px;height:36px;margin-bottom:5px;margin-top:15px;position:relative}div.headerBar .infoField{border:1px solid rgba(140,138,137,.25);border-radius:3px!important;color:#000;float:right;font-size:12px;margin-right:7px;margin-top:7px}div.headerBar .infoField .fa{cursor:pointer;margin-left:5px}div.headerBar input[type=checkbox].css-checkbox{display:none}div.headerBar input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;cursor:pointer;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerBar input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.headerBar input[type=radio]{display:none}div.headerBar input[type=radio] label span{background:url(../img/check_radio_sheet.png) -38px top no-repeat;cursor:pointer;display:inline-block;height:19px;margin:-1px 4px 0 0;vertical-align:middle;width:19px}#transparentHeader input[type=checkbox].css-checkbox,.lineGraph .many .dygraph-legend>span,.modal-delete-confirmation{display:none}div.headerBar input[type=radio]:checked+label span{background:url(../img/check_radio_sheet.png) -57px top no-repeat}.headerButtonList a.error{color:#da4f49}.headerButtonList a.error:hover{background-color:#da4f49;border-color:#da4f49;color:#fff}.headerBar a.arangoHeader{color:#000;font-size:11.5pt;font-weight:100;left:0;position:relative;top:7px}.headerBar>div.headerButtonBar{margin:4px 0;margin-bottom:0!important}.breadcrumb{background:0 0;border:0;border-radius:0;padding:7px 0}.breadcrumb .disabledBread{color:#666;float:left;font-size:11.5pt;font-weight:100;padding-right:5px;position:relative}.breadcrumb .disabledBread i{font-size:10pt;margin-left:10px}.breadcrumb .activeBread{color:#8aa051;float:left;font-size:11.5pt;font-weight:100}.breadcrumb #app-development-path{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);border-left:1px solid rgba(140,138,137,.25);border-radius:3px;border-right:1px solid rgba(140,138,137,.25);height:24px;margin-left:-6px;margin-top:-10px;padding-left:5px;width:100%}.arangoHeader{font-weight:400}.checkboxLabel{margin-top:4px;padding-left:0}.css-label{background-image:url(../img/dark-check-green.png)}.css-label-round{background-image:url(../img/dark-check-green-round.png)}.modal-dashboard-header,.modal-header{background-color:#fff;border-bottom:0!important;border-radius:3px;margin-top:5px;padding-left:5px;padding-right:10px;padding-top:4px}.modal-dashboard-header .arangoHeader,.modal-header .arangoHeader{color:#000;font-size:13pt;font-weight:100;left:5px;position:relative;top:2px}.modal-dashboard-header a,.modal-header a{top:2px!important}.modal-dashboard-header .close,.modal-header .close{color:#fff;font-weight:300;margin-top:2px;opacity:.5}.modal-dashboard-header .close:hover,.modal-header .close:hover{opacity:1}.modal-tabbar{border-bottom:1px solid #666}.modal-body{color:#736b68;font-size:14px;font-weight:300;max-height:410px}.modal-body .select2-choices{background-image:none!important;border:1px solid #999;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.modal-body .select2-choices input:active{-webkit-box-shadow:none;box-shadow:none;outline:0!important}.modal-body .select2-choices .select2-search-choice{margin:5px 0 3px 5px!important}.modal-body .select2-choices li{background-color:#fff!important;background-image:none!important;color:#000}.modal-body tr.first,.modal-body tr.last,.modal-body tr.middle{background-color:#f5f8f0}.modal-body .select2-choices li a{margin-left:1px;margin-top:-1px}.modal-body .select2-choices:active{border:1px solid #999;-webkit-box-shadow:none!important;box-shadow:none!important;outline:transparent!important}.modal-body .nav-tabs{margin-top:15px}.modal-body .nav-tabs>li>a:hover{border-color:#8c8a89}.modal-body input,.modal-body select,.modal-body textarea{margin-top:10px}.modal-body input[type=checkbox]{margin-bottom:10px}.modal-body input[type=text].invalid-input{border-color:rgba(234,23,23,.6)}.modal-body input[type=text].invalid-input:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6)}.modal-body input[type=file]{line-height:17px}.modal-body tr.spacer{height:10px}.modal-body tr.first th:first-child{border-top-left-radius:3px}.modal-body tr.first th:last-child{border-top-right-radius:3px}.modal-body tr.middle{padding-left:10px;padding-right:10px}.modal-body tr.last th:first-child{border-bottom-left-radius:3px}.modal-body tr.last th:last-child{border-bottom-right-radius:3px}.modal-body tr.first th:first-child,.modal-body tr.last th:first-child,.modal-body tr.middle th:first-child{padding-left:10px}.modal-body tr.first th:last-child,.modal-body tr.last th:last-child,.modal-body tr.middle th:last-child{padding-right:10px}.modal-body th.actionCell{width:30px}.modal-body th.keyCell{width:170px}.modal-body th.keyCell input{width:150px}.modal-body th .valueCell{width:300px}.modal-body th .valueCell input{width:290px}.modal-body th .select2-container{margin-bottom:10px;margin-top:10px}.modal-body .icon-info-sign{margin-bottom:10px;margin-left:10px;opacity:.7;padding-bottom:5px}.modal-body .icon-info-sign:hover{opacity:1}.modal-body .icon_arangodb_info{color:#736b68;font-size:18px;margin-top:-10px;position:absolute;right:12px}.modal-body .icon_arangodb_info:hover{color:#000}.modal-body .collapse{margin-right:-14px;position:relative}.modal-body .accordion-inner{border-top:0;margin-left:0;padding-left:0;padding-right:0}.modal-body .accordion-toggle span .caret{border-top-color:#000;float:right;margin-top:5px}.modal-body .accordion-toggle.collapsed span .caret{-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.modal-body input{width:436px}.modal-body select{width:450px}.modal-body .collectionTh{height:50px}.modal-body .tab-content{min-height:200px}.modal-body .tab-content .tab-pane{border-top:1px solid #666!important;margin-left:0!important;padding-top:10px}.modal-body .tab-content .tab-pane-modal{border-top:none!important}.modal-body .tab-content #appstore{max-height:290px}.modal-body .errorMessage{color:#da4f49;font-size:9pt;font-weight:400;margin-bottom:5px;margin-top:-9px;position:absolute}.modal-body .nav .tab-icon{margin-right:5px;margin-top:-3px;width:20px}.modal-text{font-weight:300;padding-bottom:3px;padding-top:3px}.modal-backdrop,.modal-backdrop.fade.in{opacity:.4}.fade{opacity:0;-moz-transition:opacity .03s linear;-ms-transition:opacity .03s linear;-o-transition:opacity .03s linear;-webkit-transition:opacity .03s linear;transition:opacity .03s linear}.modal{border:0!important;border-radius:3px!important;box-shadow:0;margin-left:-325px!important;width:650px}.modal .fade.in{top:12.1%!important}.modal table tr:last-child{border-bottom:0!important}.waitModal{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;border:0;color:#fff}.waitModalBackdrop{opacity:.7!important}.modalTooltips span{color:#736b68;font-size:20px}.modalTooltips span:hover{color:#000}.gv-object-view{text-align:left;white-space:pre}.capitalize{text-transform:capitalize}.modal-footer{border-top:0!important;padding-right:17px}.modal-footer .button-close{margin-left:20px;margin-right:10px}.modal-header{margin-left:5px;margin-right:5px}.modal-dashboard-header{margin-left:0;margin-right:0;padding-bottom:9px}.modal table tr,.thBorderBottom{border-bottom:1px solid #f7f3f2!important}.modal-delete-confirmation button{margin-right:10px;margin-top:-4px}.modal-delete-confirmation button .modal-confirm-delete{margin-right:-18px}.modal-delete-confirmation fieldset input{float:left}.modal-delete-confirmation fieldset label{float:left;margin-left:10px}.createModalDialog table{width:100%}.createModalDialog .collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.createModalDialog .figures1,.createModalDialog .figures2{margin-bottom:20px;width:300px}.createModalDialog .figures2{margin-left:20px!important}.createModalDialog .figures3{margin-bottom:0;width:100%}.foxx-store-row .foxx-name{font-weight:700}.foxx-store-row .foxx-author{font-size:10pt;font-weight:300;margin-top:-4px}.foxx-store-row .foxx-version{font-weight:400}#new-app-mount{margin-right:24px;width:360px}#control_event_edge_delete_modal,#control_event_edge_edit_modal,#control_event_new_node_modal,#control_event_node_delete_modal,#control_event_node_edit_modal{margin-left:-320px;width:640px}.scenarioImage{height:70%;width:auto}svg.clusterChart{height:auto;margin:auto;width:auto}.lineGraph{position:absolute}.lineGraph .few .dygraph-legend>span.highlight{border:1px solid grey}.lineGraph .many .dygraph-legend>span.highlight{display:inline}a.coordinator,a.dbserver{color:#000;height:50px;position:absolute;top:10px;width:50px}a.coordinator h6.serverName,a.dbserver h6.serverName{bottom:0;font-size:11px;left:0;margin:0;position:absolute;right:0}a.coordinator.single{left:90px}a.coordinator.double{left:60px}a.dbserver.single{right:90px}a.dbserver.double{right:60px}.cluster-connection-check-success{color:#8aa051;margin-left:20px}.cluster-connection-check-fail{color:#da4f49;margin-left:20px}.cluster-unreachable-info{margin:0 auto;max-width:320px;padding-top:17px;text-align:center}.machineClass{background-color:#e1e1e1;margin-left:31px;margin-right:31px;padding:10px}.scenarioBox{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:rgba(0,0,0,.075);border:1px solid rgba(0,0,0,.19);height:65px;left:10px;margin-top:30px;position:absolute;right:10px;width:auto}.scenarioMachine,div .bigtile,div .tile{background-color:#fff;position:relative}.scenarioBox.bottomBox{bottom:30px}.scenarioBoxHeader{border-bottom:1px solid rgba(0,0,0,.19);height:18px;line-height:18px;margin-top:0;padding-bottom:0;text-align:center;width:auto}.scenarioBoxText{font-size:13px;font-weight:400;margin-top:17px;text-align:center;width:auto}.collectionName,div .bigtile .badge-success,div .tile .badge-success{font-weight:300}.scenarioMachine{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border:1px solid rgba(0,0,0,.19);height:257px;margin-right:17px;width:109px}.scenarioMachine:last-child{margin-right:0}.scenarioSingleMachine{-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;background-color:#fff;border:1px solid rgba(0,0,0,.19)}.scenarioSingleMachine .scenarioMachine{border:1px solid transparent;height:238px}.bigtile.informationtile{cursor:auto}.informationText{background:#fff;font-size:12px;margin:10px;padding:5px;text-align:left}.tileList{margin-left:-6px;margin-right:-6px}.tileList legend{padding-left:5px}.tileList .tile:first-child a{opacity:.8}.tileList .tile:first-child a:hover{opacity:1}div .bigtile,div .tile{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border:1px solid #f5f8f0;border-radius:3px;font-size:14px;list-style:none;margin-bottom:13px;margin-left:6px;margin-right:6px;text-align:center;z-index:1}div .bigtile progress[value],div .tile progress[value]{color:#5bc0de}div .bigtile progress::-webkit-progress-bar-value,div .tile progress::-webkit-progress-bar-value{background:#5bc0de}div .bigtile progress::-webkit-progress-value,div .tile progress::-webkit-progress-value{background:#5bc0de}div .bigtile progress::-moz-progress-bar,div .tile progress::-moz-progress-bar{background:#5bc0de}div .bigtile progress,div .tile progress{-webkit-appearance:none;border-radius:0;height:2px;margin-top:16px;position:relative;width:100%;z-index:10}div .bigtile:hover,div .tile:hover{cursor:pointer}div .locked.bigtile,div .locked.tile{cursor:not-allowed}div .locked.bigtile .borderBox,div .locked.bigtile .collection-type-icon,div .locked.bigtile .collectionName,div .locked.bigtile .iconSet,div .locked.tile .borderBox,div .locked.tile .collection-type-icon,div .locked.tile .collectionName,div .locked.tile .iconSet{opacity:.5}div .locked.bigtile .iconSet span:hover,div .locked.tile .iconSet span:hover{background-color:#fff!important;color:#000;cursor:not-allowed!important}div .locked.bigtile .iconSet:hover,div .locked.tile .iconSet:hover{cursor:not-allowed!important}div .bigtile .collection-type-icon:hover,div .bigtile img:hover,div .tile .collection-type-icon:hover,div .tile img:hover{cursor:pointer}div .bigtile .warning-icons,div .tile .warning-icons{background-color:#da4f49;border-radius:3px;color:#fff;font-size:11px;height:17px;left:0;line-height:13px;margin-left:5px;margin-top:5px;padding-left:9px;padding-right:9px;position:absolute;top:0}div .bigtile a svg.icon,div .bigtile img.icon,div .tile a svg.icon,div .tile img.icon{height:50px;width:50px}div .bigtile .warning-icons .fa,div .tile .warning-icons .fa{font-size:11pt;margin-left:1px}div .bigtile .collection-type-icon,div .tile .collection-type-icon{color:#666;font-size:30pt;margin-top:12pt}div .bigtile img,div .tile img{position:relative}div .bigtile a span.add-Icon,div .tile a span.add-Icon{font-size:20px;margin-left:22px;margin-right:10px;position:relative;top:0}div .bigtile a span.icon,div .tile a span.icon{font-size:50px}div .bigtile .tile-icon-svg,div .tile .tile-icon-svg{cursor:pointer;fill:#686766;height:50px;margin-left:90px;margin-top:10px;position:absolute;width:50px}div .bigtile .tile-icon,div .tile .tile-icon{color:#686766;font-size:50px;line-height:1.2}div .bigtile .icon_arangodb_edge5-2,div .tile .icon_arangodb_edge5-2{display:inline-block;position:relative;top:15px;-moz-transform:rotate(80deg);-o-transform:rotate(80deg);-webkit-transform:rotate(80deg)}div .bigtile h5,div .tile h5{background:#8c8a89;color:#fff;font-size:12px;margin:0;overflow:hidden!important;padding:4px 8px;text-overflow:ellipsis!important;white-space:nowrap!important}div .bigtile h5.inProgress,div .tile h5.inProgress{color:#5bc0de}div .bigtile .tileSelects,div .tile .tileSelects{margin-left:40px;position:relative;z-index:9999}div .bigtile .tileSelects select,div .tile .tileSelects select{float:right;height:20px;margin-right:5px;margin-top:16px;width:70px}div .bigtile .fullBorderBox,div .tile .fullBorderBox{border:1px solid rgba(140,138,137,.25);border-radius:3px;height:100%;position:absolute;width:100%}div .bigtile .borderBox,div .tile .borderBox{border:1px solid rgba(140,138,137,.25);border-bottom:0;border-radius:3px;height:75px;position:absolute;width:224px}.collectionName,.dashboard-sub-bar{border-bottom-left-radius:3px;border-bottom-right-radius:3px}div .bigtile .iconSet,div .tile .iconSet{position:absolute;right:5px;top:5px}div .bigtile .iconSet span,div .tile .iconSet span{border-radius:3px;color:#666;font-size:18px;z-index:2;padding:2px 3px}div .bigtile .iconSet span:hover,div .tile .iconSet span:hover{background-color:#8aa051;color:#fff}div .bigtile .iconSet span.disabled,div .tile .iconSet span.disabled{cursor:default;opacity:.2}div .bigtile .iconSet span.disabled:hover,div .tile .iconSet span.disabled:hover{background-color:#fff;color:#000;cursor:default;opacity:.2}div .bigtile .unloaded div,div .tile .unloaded div{border-bottom:16px solid #ff8f35}div .bigtile .deleted div,div .tile .deleted div{border-bottom:16px solid #700}div .bigtile .tileBadge,div .tile .tileBadge{bottom:29px;font-size:11px;font-weight:300;position:absolute;right:0}div .bigtile .tileBadge button,div .tile .tileBadge button{margin-left:0;margin-right:5px}div .bigtile .tileBadge span,div .tile .tileBadge span{display:inline-block;line-height:15px}div .bigtile .tileBadge span .corneredBadge,div .tile .tileBadge span .corneredBadge{border-bottom-style:solid;border-bottom-width:17px;border-left:5px solid transparent;border-radius:3px;color:#fff;height:0;margin-bottom:4px;margin-right:5px;padding-left:1px;padding-right:6px}div .bigtile .tileBadge span .corneredBadge.loading,div .tile .tileBadge span .corneredBadge.loading{border-bottom-color:#ff8f35}div .bigtile .tileBadge span .corneredBadge.loaded,div .tile .tileBadge span .corneredBadge.loaded{border-bottom-color:#8aa051}div .bigtile .tileBadge span .corneredBadge.inProgress,div .tile .tileBadge span .corneredBadge.inProgress{border-bottom-color:#5bc0de}div .bigtile .tileBadge span .corneredBadge.development,div .bigtile .tileBadge span .corneredBadge.unloaded,div .tile .tileBadge span .corneredBadge.development,div .tile .tileBadge span .corneredBadge.unloaded{border-bottom-color:#ff8f35}div .tile{height:100px;width:226px}div .tile-graph .tile-icon:hover{cursor:pointer}div .bigtile{height:309px;width:452px}div .bigtile .shardContainer{font-size:30px}div .bigtile .shardContainer span{padding:2px}.collectionName{bottom:0;left:0;position:absolute;right:0;text-align:left}.dashboard-bar-chart-container,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-medium-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-tendency-container{border-top-left-radius:3px;border-top-right-radius:3px}.dashboard-bar-chart-container:first-child,.dashboard-full-width-chart .dashboard-full-width-chart-inner:first-child,.dashboard-large-chart .dashboard-large-chart-inner:first-child,.dashboard-medium-chart:first-child,.dashboard-small-chart .dashboard-small-chart-inner:first-child,.dashboard-tendency-container:first-child{margin-left:0}.dashboard-bar-chart-container,.dashboard-full-width-chart,.dashboard-large-chart,.dashboard-medium-chart,.dashboard-small-chart,.dashboard-tendency-container{margin-bottom:10px;position:relative}.dashboard-sub-bar-menu{cursor:pointer;position:absolute;right:9px;top:6px}.dataNotReadyYet{color:#faa732;font-family:'Open Sans',sans-serif;font-size:14px;font-weight:100;text-align:center}.dashboard-sub-bar{background-color:#686766;color:#fff;height:24px;line-height:24px;margin:0;padding:0 6px}.dashboard-full-width-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-subtitle-bar.top{border-bottom:1px solid #e1e1e1;height:48px;line-height:48px;text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{border-left:1px solid #e1e1e1}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner{margin-left:10px;margin-right:10px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table{margin-bottom:10px;margin-top:10px;table-layout:fixed;width:100%}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-medium-chart .dashboard-interior-chart{margin-bottom:0}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table .no-data{font-style:italic;font-weight:100}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table tr{border-bottom:1px solid rgba(0,0,0,.025)}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:first-child{width:100px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:last-child{text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart:first-child{border-left:0}.dashboard-full-width-chart .state{background-color:#fff;border-radius:5px;color:#000;margin-left:5px;padding-left:6px;padding-right:4px}.dashboard-large-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-large-chart .dashboard-large-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-small-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-small-chart .dashboard-small-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:5px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart-outer:first-child{margin-right:10px}.dashboard-medium-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;margin-bottom:0;padding-top:10px}.dashboard-medium-chart:first-child{margin-right:12px}.dashboard-medium-chart .dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart .dashboard-medium-chart-menu{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:0 solid rgba(0,0,0,.3);color:rgba(0,0,0,.3);cursor:pointer;padding:0 4px;position:absolute;z-index:1000}.dashboard-medium-chart .dashboard-medium-chart-menu:hover{color:rgba(0,0,0,.7)}.dashboard-medium-chart .dashboard-medium-chart-inner{padding-bottom:10px}.dashboard-medium-chart .clusterChart .slice path{fill-opacity:.15;stroke-opacity:1;stroke-width:1.5px}.dashboard-tendency-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-tendency-container .dashboard-tendency-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{background-color:#fff;margin-top:5px;padding:0 8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency:first-child{border-right:1px solid #e1e1e1}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar{border-bottom:1px solid #e1e1e1;text-align:right}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure{text-align:center}.dashboard-bar-chart-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-bar-chart-container .dashboard-bar-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{margin-top:5px;padding:0 8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{font-weight:400}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{text-align:right}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-legend .dashboard-legend-inner{padding:0 5px 5px 0}.dashboard-spacer{margin:0 12px}.headerBar.dashboard-headerbar{margin:20px 0}.modal-chart-detail .modal-dashboard-legend .dashboard-legend-inner{padding-left:20px}.dashboard-half-height-legend .dashboard-legend-inner{padding-top:20px}.dashboard-title-bar{background-color:#686766;color:#fff;font-size:14.5px;font-weight:400;height:30px;line-height:30px;padding:0 5px 0 10px}.dashboard-title-bar .dashboard-half-title-bar{border-left:1px solid #000;margin-left:-1px;width:50%}.dashboard-title-bar .dashboard-half-title-bar:first-child{border-left:0;margin-left:0}.dashboard-row{margin-bottom:0;margin-left:0;margin-right:0}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{color:#666}.resizecontainer{margin:0 auto}@media (max-width:738px){#arangoCollectionUl,.footer-center p{display:none}#collectionsDropdown ul{width:auto!important}#arangoCollectionSelect{display:inline-block;height:29px;margin-top:1px}#queryContent #querySize,#queryContent #querySizeDiv,#queryContent .styled-select{width:90px!important}}@media (max-width:970px){#documentsDiv #totalDocuments{display:none}.navmenu{padding-left:20px;padding-top:0;position:absolute}}@media (min-width:739px) and (max-width:1041px){#arangoCollectionUl a{font-size:12px;height:12px;padding:8px 5px}}@media (min-width:1042px) and (max-width:1284px){#arangoCollectionUl a{font-size:14px}}@media (min-width:250px) and (max-width:489px){.resizecontainer{width:228px}.dashboard-full-width-chart{width:225px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:215px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:69.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:214px}.dashboard-large-chart{width:146px}.dashboard-large-chart .dashboard-sub-bar{width:134px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:136px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:106px}.dashboard-medium-chart{width:96px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:95px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:96px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:79px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:66px}.dashboard-small-chart .dashboard-sub-bar{width:54px}.dashboard-small-chart .dashboard-small-chart-inner{width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:54px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:56px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:40px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-114px;width:248px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:208px}.modal-body .dashboard-large-chart{width:143px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:131px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:133px}.modal-body .dashboard-medium-chart-outer{float:left;width:91px}.modal-body .dashboard-medium-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:89px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:74px}.modal-body .dashboard-small-chart{width:61px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:49px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:51px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:6.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:51px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:56px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:40px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:228px}.application-detail-view aside.meta{display:none}}@media (min-width:490px) and (max-width:729px){.resizecontainer{width:468px}.dashboard-full-width-chart{width:465px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:455px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:149.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart{width:306px}.dashboard-large-chart .dashboard-sub-bar{width:294px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:296px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:226px}.dashboard-medium-chart{width:216px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:215px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:216px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:199px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:146px}.dashboard-small-chart .dashboard-sub-bar{width:134px}.dashboard-small-chart .dashboard-small-chart-inner{width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:48px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:134px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:136px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:120px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-234px;width:488px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:448px}.modal-body .dashboard-large-chart{width:303px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:291px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:293px}.modal-body .dashboard-medium-chart-outer{float:left;width:211px}.modal-body .dashboard-medium-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:194px}.modal-body .dashboard-small-chart{width:141px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:129px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:131px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:46.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:131px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:136px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:120px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:468px}.application-detail-view aside.meta{display:none}}@media (min-width:730px) and (max-width:969px){.resizecontainer{width:708px}.dashboard-full-width-chart{width:705px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:695px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:229.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:694px}.dashboard-large-chart{width:466px}.dashboard-large-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:456px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:346px}.dashboard-medium-chart{width:336px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:335px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:319px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:226px}.dashboard-small-chart .dashboard-sub-bar{width:214px}.dashboard-small-chart .dashboard-small-chart-inner{width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:88px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:214px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:216px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:200px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-354px;width:728px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:688px}.modal-body .dashboard-large-chart{width:463px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:451px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:453px}.modal-body .dashboard-medium-chart-outer{float:left;width:331px}.modal-body .dashboard-medium-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:329px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:314px}.modal-body .dashboard-small-chart{width:221px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:211px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:86.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:211px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:216px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:200px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:508px}}@media (min-width:970px) and (max-width:1209px){.resizecontainer{width:948px}.dashboard-full-width-chart{width:945px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:935px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:309.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart{width:626px}.dashboard-large-chart .dashboard-sub-bar{width:614px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:220px;width:496px}.dashboard-sub-bar-menu{font-size:13px}.dashboard-medium-chart-outer{float:left;width:466px}.dashboard-medium-chart{width:456px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:455px}.dashboard-medium-chart .dashboard-interior-chart{height:220px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:13px;left:438px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:220px;width:456px}.dashboard-medium-chart #clusterGraphs svg text{font-size:11px}.dashboard-small-chart{width:306px}.dashboard-small-chart .dashboard-sub-bar{width:294px}.dashboard-small-chart .dashboard-small-chart-inner{width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:229px;width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:11px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:96.5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:128px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:31.17px;line-height:31.17px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:52.33px;line-height:25.17px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:294px}.dashboard-bar-chart-container{height:98px}.dashboard-bar-chart-container .dashboard-bar-chart{height:96px;width:296px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:31.33px;line-height:31.33px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:45.67px;line-height:45.67px;padding:5px 8px 10px;width:280px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:50.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-474px;width:968px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:13px;min-height:225px;width:130px}.absolut,.percentage{font-size:15px}.modal-chart-detail .modal-inner-detail{width:808px}.modal-body .dashboard-large-chart{width:623px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:611px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:493px}.modal-body .dashboard-medium-chart-outer{float:left;width:451px}.modal-body .dashboard-medium-chart{width:451px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:433px}.modal-body .dashboard-small-chart{width:301px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:289px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:291px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:126.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:291px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:296px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:280px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:11px;font-weight:400}.dashboard-subtitle-bar{font-size:15px;font-weight:300}.dashboard-figure{font-size:18px;font-weight:400}.dashboard-figurePer{font-size:16px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:11px}.dashboard-legend{height:225px;margin-top:-3px;width:120px}.dashboard-half-height-legend{font-size:11px;height:117.5px;width:60px}.application-detail-view section.info{width:748px}}@media (min-width:1210px) and (max-width:1449px){.resizecontainer{width:1188px}.dashboard-full-width-chart{width:1185px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1175px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:389.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1174px}.dashboard-large-chart{width:786px}.dashboard-large-chart .dashboard-sub-bar{width:774px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:255px;width:646px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:586px}.dashboard-medium-chart{width:576px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:575px}.dashboard-medium-chart .dashboard-interior-chart{height:255px;width:446px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:16px;left:555px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:255px;width:576px}.dashboard-medium-chart #clusterGraphs svg text{font-size:12px}.dashboard-small-chart{width:386px}.dashboard-small-chart .dashboard-sub-bar{width:374px}.dashboard-small-chart .dashboard-small-chart-inner{width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:264px;width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:114px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:168px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:37px;line-height:37px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:64px;line-height:31px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:374px}.dashboard-bar-chart-container{height:115.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:113.5px;width:376px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:37.17px;line-height:37.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:57.33px;line-height:57.33px;padding:5px 8px 10px;width:360px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:62.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-594px;width:1208px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:14px;min-height:260px;width:140px}.absolut,.percentage{font-size:18px}.modal-chart-detail .modal-inner-detail{width:1038px}.modal-body .dashboard-large-chart{width:783px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:771px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:643px}.modal-body .dashboard-medium-chart-outer{float:left;width:571px}.modal-body .dashboard-medium-chart{width:571px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:569px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:441px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:550px}.modal-body .dashboard-small-chart{width:381px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:369px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:371px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:166.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:371px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:376px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:360px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:18px;font-weight:300}.dashboard-figure{font-size:22px;font-weight:400}.dashboard-figurePer{font-size:20px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:13px;font-weight:400}.dashboard-legend{font-size:12px;font-weight:400;height:260px;margin-top:-3px;width:130px}.dashboard-half-height-legend{font-size:12px;height:135px;width:65px}.application-detail-view section.info{width:988px}}@media (min-width:1450px) and (max-width:1689px){.resizecontainer{width:1428px}.dashboard-full-width-chart{width:1425px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1415px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:469.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart{width:946px}.dashboard-large-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:796px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:706px}.dashboard-medium-chart{width:696px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:695px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:556px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:18px;left:673px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:696px}.dashboard-medium-chart #clusterGraphs svg text{font-size:13px}.dashboard-small-chart{width:466px}.dashboard-small-chart .dashboard-sub-bar{width:454px}.dashboard-small-chart .dashboard-small-chart-inner{width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:208px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:454px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:456px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:440px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-714px;width:1448px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:15px;min-height:290px;width:150px}.absolut,.percentage{font-size:20px}.modal-chart-detail .modal-inner-detail{width:1268px}.modal-body .dashboard-large-chart{width:943px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:931px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:793px}.modal-body .dashboard-medium-chart-outer{float:left;width:691px}.modal-body .dashboard-medium-chart{width:691px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:551px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:668px}.modal-body .dashboard-small-chart{width:461px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:451px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:206.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:451px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:456px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:440px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:20px;font-weight:300}.dashboard-figure{font-size:26px;font-weight:400}.dashboard-figurePer{font-size:24px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:13px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:13px;height:150px;width:70px}.application-detail-view section.info{width:1228px}}@media (min-width:1690px) and (max-width:1929px){.resizecontainer{width:1668px}.dashboard-full-width-chart{width:1665px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1655px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:549.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1654px}.dashboard-large-chart{width:1106px}.dashboard-large-chart .dashboard-sub-bar{width:1094px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:325px;width:936px}.dashboard-sub-bar-menu{font-size:16px}.dashboard-medium-chart-outer{float:left;width:826px}.dashboard-medium-chart{width:816px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:815px}.dashboard-medium-chart .dashboard-interior-chart{height:325px;width:656px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:22px;left:789px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:325px;width:816px}.dashboard-medium-chart #clusterGraphs svg text{font-size:14px}.dashboard-small-chart{width:546px}.dashboard-small-chart .dashboard-sub-bar{width:534px}.dashboard-small-chart .dashboard-small-chart-inner{width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:334px;width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:149px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:248px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:48.67px;line-height:48.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:87.33px;line-height:42.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:534px}.dashboard-bar-chart-container{height:150.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:148.5px;width:536px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:48.83px;line-height:48.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:80.67px;line-height:80.67px;padding:5px 8px 10px;width:520px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:85.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-834px;width:1688px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:16px;min-height:330px;width:170px}.absolut,.percentage{font-size:24px}.modal-chart-detail .modal-inner-detail{width:1488px}.modal-body .dashboard-large-chart{width:1103px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1091px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:933px}.modal-body .dashboard-medium-chart-outer{float:left;width:811px}.modal-body .dashboard-medium-chart{width:811px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:809px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:651px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:784px}.modal-body .dashboard-small-chart{width:541px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:529px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:531px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:246.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:531px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:536px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:520px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:14px;font-weight:400}.dashboard-subtitle-bar{font-size:24px;font-weight:300}.dashboard-figure{font-size:30px;font-weight:400}.dashboard-figurePer{font-size:28px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:14px}.dashboard-legend{height:330px;margin-top:-3px;width:160px}.dashboard-half-height-legend{font-size:14px;height:170px;width:80px}.application-detail-view section.info{width:1468px}}@media (min-width:1930px) and (max-width:2169px){.resizecontainer{width:1908px}.dashboard-full-width-chart{width:1905px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1895px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:629.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1894px}.dashboard-large-chart{width:1266px}.dashboard-large-chart .dashboard-sub-bar{width:1254px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:385px;width:1086px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:946px}.dashboard-medium-chart{width:936px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:935px}.dashboard-medium-chart .dashboard-interior-chart{height:385px;width:766px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:26px;left:905px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:385px;width:936px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:626px}.dashboard-small-chart .dashboard-sub-bar{width:614px}.dashboard-small-chart .dashboard-small-chart-inner{width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:394px;width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:179px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:288px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:58.67px;line-height:58.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:107.33px;line-height:52.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:614px}.dashboard-bar-chart-container{height:180.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:178.5px;width:616px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:58.83px;line-height:58.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:100.67px;line-height:100.67px;padding:5px 8px 10px;width:600px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:105.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-954px;width:1928px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:390px;width:180px}.absolut,.percentage{font-size:28px}.modal-chart-detail .modal-inner-detail{width:1718px}.modal-body .dashboard-large-chart{width:1263px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1251px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1083px}.modal-body .dashboard-medium-chart-outer{float:left;width:931px}.modal-body .dashboard-medium-chart{width:931px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:929px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:761px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:900px}.modal-body .dashboard-small-chart{width:621px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:609px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:611px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:286.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:611px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:616px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:600px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:28px;font-weight:300}.dashboard-figure{font-size:34px;font-weight:400}.dashboard-figurePer{font-size:32px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:14px;font-weight:400}.dashboard-legend{font-size:15px;font-weight:400;height:390px;margin-top:-3px;width:170px}.dashboard-half-height-legend{font-size:15px;height:200px;width:85px}.application-detail-view section.info{width:1708px}}@media (min-width:2170px) and (max-width:2409px){.resizecontainer{width:2148px}.dashboard-full-width-chart{width:2145px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2135px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:709.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2134px}.dashboard-large-chart{width:1426px}.dashboard-large-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1276px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1066px}.dashboard-medium-chart{width:1056px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1055px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:916px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1031px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1056px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:706px}.dashboard-small-chart .dashboard-sub-bar{width:694px}.dashboard-small-chart .dashboard-small-chart-inner{width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:328px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:694px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:696px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:680px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1074px;width:2168px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:1988px}.modal-body .dashboard-large-chart{width:1423px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1411px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1273px}.modal-body .dashboard-medium-chart-outer{float:left;width:1051px}.modal-body .dashboard-medium-chart{width:1051px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1049px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:911px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1026px}.modal-body .dashboard-small-chart{width:701px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:691px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:326.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:691px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:696px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:680px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:1948px}}@media (min-width:2410px) and (max-width:2649px){.resizecontainer{width:2388px}.dashboard-full-width-chart{width:2385px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2375px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:789.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2374px}.dashboard-large-chart{width:1586px}.dashboard-large-chart .dashboard-sub-bar{width:1574px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1436px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1186px}.dashboard-medium-chart{width:1176px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1175px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1036px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1151px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1176px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:786px}.dashboard-small-chart .dashboard-sub-bar{width:774px}.dashboard-small-chart .dashboard-small-chart-inner{width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:368px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:774px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:776px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:760px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1194px;width:2408px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2228px}.modal-body .dashboard-large-chart{width:1583px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1571px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1433px}.modal-body .dashboard-medium-chart-outer{float:left;width:1171px}.modal-body .dashboard-medium-chart{width:1171px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1169px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1031px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1146px}.modal-body .dashboard-small-chart{width:781px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:769px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:771px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:366.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:771px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:776px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:760px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2188px}}@media (min-width:2650px) and (max-width:2889px){.resizecontainer{width:2628px}.dashboard-full-width-chart{width:2625px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2615px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:869.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2614px}.dashboard-large-chart{width:1746px}.dashboard-large-chart .dashboard-sub-bar{width:1734px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1596px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1306px}.dashboard-medium-chart{width:1296px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1295px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1156px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1271px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1296px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:866px}.dashboard-small-chart .dashboard-sub-bar{width:854px}.dashboard-small-chart .dashboard-small-chart-inner{width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:408px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:854px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:856px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:840px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1314px;width:2648px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2468px}.modal-body .dashboard-large-chart{width:1743px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1731px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1593px}.modal-body .dashboard-medium-chart-outer{float:left;width:1291px}.modal-body .dashboard-medium-chart{width:1291px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1289px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1151px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1266px}.modal-body .dashboard-small-chart{width:861px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:849px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:851px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:406.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:851px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:856px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:840px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2428px}}div.centralRow{margin-bottom:40px;margin-top:40px}div.centralContent{background-color:transparent;height:100%;margin-left:-5px;margin-right:-5px;min-height:80px;padding:5px;width:100%}.contentDiv{list-style:none;padding:13px 0 0}.contentDiv li{background-color:rgba(0,0,0,.05)}.contentDiv a.add{display:block;font-weight:400;padding:40px 0;text-align:left}.contentDiv .icon{padding-left:5px;padding-right:5px;padding-top:10px}.contentDiv:after{clear:both}.contentDiv:after,.contentDiv:before{content:'';display:table;line-height:0}body{background-color:rgba(245,248,240,.95)}.headerButtonBar select{border:1px solid rgba(140,138,137,.25);height:28px} \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css.gz b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css.gz index 128b185df4..378ad64725 100644 Binary files a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css.gz and b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style-minified.css.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css index bf1c420e83..82cea0d2bc 100644 --- a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css +++ b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css @@ -58,7 +58,7 @@ textarea, .fa { display: inline-block; - font: normal normal normal 14px/1 FontAwesome; + font: normal normal normal 14px / 1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; @@ -103,7 +103,7 @@ textarea, left: -1.8571428571em; } .fa-border { - padding: 0.2em 0.25em 0.15em; + padding: .2em .25em .15em; border: solid 0.08em #eee; border-radius: .1em; } @@ -2164,11 +2164,14 @@ a.warning.coordinator, a.warning.dbserver { background-color: #f87c0f; } [class^='button-']:disabled, -button.disabled, .button-inactive { +button.disabled, +[class*=' button-']:disabled, .button-inactive { background-color: #d3d3d3; } [class^='button-']:hover:disabled, - button.disabled:hover, .button-inactive:hover, [class^='button-']:focus:disabled, - button.disabled:focus, .button-inactive:focus { + button.disabled:hover, + [class*=' button-']:hover:disabled, .button-inactive:hover, [class^='button-']:focus:disabled, + button.disabled:focus, + [class*=' button-']:focus:disabled, .button-inactive:focus { background-color: #d3d3d3; } a.headerButton.disabled, a.inactive.coordinator, a.inactive.dbserver { @@ -5688,11 +5691,11 @@ div.headerBar { .fade { opacity: 0; - -moz-transition: opacity 0.03s linear; - -ms-transition: opacity 0.03s linear; - -o-transition: opacity 0.03s linear; - -webkit-transition: opacity 0.03s linear; - transition: opacity 0.03s linear; } + -moz-transition: opacity .03s linear; + -ms-transition: opacity .03s linear; + -o-transition: opacity .03s linear; + -webkit-transition: opacity .03s linear; + transition: opacity .03s linear; } .modal { border: 0 !important; diff --git a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css.gz b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css.gz index 77984f608f..d6fa0db9f6 100644 Binary files a/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css.gz and b/js/apps/system/_admin/aardvark/APP/clusterFrontend/build/style.css.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.js b/js/apps/system/_admin/aardvark/APP/frontend/build/app.js index 4c9da7474e..e7c65f23db 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/app.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/app.js @@ -13322,7 +13322,7 @@ exports.setUnitTestsResult = function(value){global.SYS_UNIT_TESTS_RESULT = valu /// @param longOptsEqual whether long-options are in the type --opt=value /// or --opt value //////////////////////////////////////////////////////////////////////////////// -exports.toArgv = function(structure,longOptsEqual){if(typeof longOptsEqual === 'undefined'){longOptsEqual = false;}var vec=[];for(var key in structure) {if(structure.hasOwnProperty(key)){if(key === 'commandSwitches'){var multivec='';for(var _i=0;_i < structure[key].length;_i++) {if(structure[key][_i].length > 1){vec.push(structure[key][_i]);}else {multivec += structure[key][_i];}}if(multivec.length > 0){vec.push(multivec);}}else if(key === 'flatCommands'){vec = vec.concat(structure[key]);}else {if(longOptsEqual){vec.push('--' + key + '=' + structure[key]);}else {vec.push('--' + key);if(structure[key] !== false){if(structure[key] !== true){vec.push(structure[key]);}else {vec.push('true');}}else {vec.push('false');}}}}}return vec;}; //////////////////////////////////////////////////////////////////////////////// +exports.toArgv = function(structure,longOptsEqual){if(typeof longOptsEqual === 'undefined'){longOptsEqual = false;}var vec=[];for(var key in structure) {if(structure.hasOwnProperty(key)){if(key === 'commandSwitches'){var multivec='';for(var i=0;i < structure[key].length;i++) {if(structure[key][i].length > 1){vec.push(structure[key][i]);}else {multivec += structure[key][i];}}if(multivec.length > 0){vec.push(multivec);}}else if(key === 'flatCommands'){vec = vec.concat(structure[key]);}else {if(longOptsEqual){vec.push('--' + key + '=' + structure[key]);}else {vec.push('--' + key);if(structure[key] !== false){if(structure[key] !== true){vec.push(structure[key]);}else {vec.push('true');}}else {vec.push('false');}}}}}return vec;}; //////////////////////////////////////////////////////////////////////////////// /// @brief argv to structured //////////////////////////////////////////////////////////////////////////////// exports.parseArgv = function(argv,startOffset){var i;function setOption(ret,option,value){if(option.indexOf(':') > 0){var n=option.indexOf(':');var topOption=option.slice(0,n);if(!ret.hasOwnProperty(topOption)){ret[topOption] = {};}setOption(ret[topOption],option.slice(n + 1,option.length),value);}else if(argv[i + 1] === 'true'){ret[option] = true;}else if(argv[i + 1] === 'false'){ret[option] = false;}else if(!isNaN(argv[i + 1])){ret[option] = parseInt(argv[i + 1]);}else {ret[option] = argv[i + 1];}}function setSwitch(ret,option){if(!ret.hasOwnProperty('commandSwitches')){ret.commandSwitches = [];}ret.commandSwitches.push(option);}function setSwitchVec(ret,option){for(var i=0;i < option.length;i++) {setSwitch(ret,option[i]);}}function setFlatCommand(ret,thisString){if(!ret.hasOwnProperty('flatCommands')){ret.flatCommands = [];}ret.flatCommands.push(thisString);}var inFlat=false;var ret={};for(i = startOffset;i < argv.length;i++) {var thisString=argv[i];if(!inFlat){if(thisString.length > 2 && thisString.slice(0,2) === '--'){var option=thisString.slice(2,thisString.length);if(argv.length > i && argv[i + 1].slice(0,1) !== '-'){setOption(ret,option,argv[i + 1]);i++;}else {setSwitch(ret,option);}}else if(thisString === '--'){inFlat = true;}else if(thisString.length > 1 && thisString.slice(0,1) === '-'){setSwitchVec(ret,thisString.slice(1,thisString.length));}else {setFlatCommand(ret,thisString);}}else {setFlatCommand(ret,thisString);}}return ret;}; //////////////////////////////////////////////////////////////////////////////// @@ -13357,11 +13357,11 @@ var quotable=/[\\\"\x00-\x1f]/g;function quoteJsonString(str){return '"' + str.r function printIndent(context){var j;var indent='';if(context.prettyPrint){indent += '\n';for(j = 0;j < context.level;++j) {indent += ' ';}}context.output += indent;} //////////////////////////////////////////////////////////////////////////////// /// @brief prints the JSON representation of an array //////////////////////////////////////////////////////////////////////////////// -function printArray(object,context){var useColor=context.useColor;if(object.length === 0){if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[ ]';if(useColor){context.output += colors.COLOR_RESET;}}else {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;var sep=' ';context.level = newLevel;for(var _i2=0;_i2 < object.length;_i2++) {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);var path=context.path;context.path += '[' + _i2 + ']';printRecursive(object[_i2],context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}context.path = path;sep = ', ';}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += ']';if(useColor){context.output += colors.COLOR_RESET;}}} //////////////////////////////////////////////////////////////////////////////// +function printArray(object,context){var useColor=context.useColor;if(object.length === 0){if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[ ]';if(useColor){context.output += colors.COLOR_RESET;}}else {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;var sep=' ';context.level = newLevel;for(var i=0;i < object.length;i++) {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);var path=context.path;context.path += '[' + i + ']';printRecursive(object[i],context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}context.path = path;sep = ', ';}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += ']';if(useColor){context.output += colors.COLOR_RESET;}}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints an object //////////////////////////////////////////////////////////////////////////////// function printObject(object,context){var useColor=context.useColor;var sep=' ';if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '{';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;context.level = newLevel;var keys;try{keys = Object.keys(object);}catch(err) { // ES6 proxy objects don't support key enumeration -keys = [];}for(var _i3=0,n=keys.length;_i3 < n;++_i3) {var k=keys[_i3];var val=object[k];if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);if(useColor){context.output += colors.COLOR_INDEX;}context.output += quoteJsonString(k);if(useColor){context.output += colors.COLOR_RESET;}context.output += ' : ';var path=context.path;context.path += '[' + k + ']';printRecursive(val,context);context.path = path;sep = ', ';if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '}';if(useColor){context.output += colors.COLOR_RESET;}} //////////////////////////////////////////////////////////////////////////////// +keys = [];}for(var i=0,n=keys.length;i < n;++i) {var k=keys[i];var val=object[k];if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);if(useColor){context.output += colors.COLOR_INDEX;}context.output += quoteJsonString(k);if(useColor){context.output += colors.COLOR_RESET;}context.output += ' : ';var path=context.path;context.path += '[' + k + ']';printRecursive(val,context);context.path = path;sep = ', ';if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '}';if(useColor){context.output += colors.COLOR_RESET;}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints objects to standard output without a new-line //////////////////////////////////////////////////////////////////////////////// var funcRE=/function ([^\(]*)?\(\) \{ \[native code\] \}/;var func2RE=/function ([^\(]*)?\((.*)\) \{/;exports.printRecursive = printRecursive = function(value,context){var useColor=context.useColor;var customInspect=context.customInspect;var useToString=context.useToString;var limitString=context.limitString;var showFunction=context.showFunction;if(typeof context.seen === 'undefined'){context.seen = [];context.names = [];}var p=context.seen.indexOf(value);if(p >= 0){context.output += context.names[p];}else {if(value && (value instanceof Object || typeof value === 'object' && Object.getPrototypeOf(value) === null)){context.seen.push(value);context.names.push(context.path);if(customInspect && typeof value._PRINT === 'function'){value._PRINT(context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}else if(value instanceof Array){printArray(value,context);}else if(value.toString === Object.prototype.toString || typeof value === 'object' && Object.getPrototypeOf(value) === null){var handled=false;try{if(value instanceof Set || value instanceof Map || value instanceof WeakSet || value instanceof WeakMap || typeof value[Symbol.iterator] === 'function'){ // ES6 iterators @@ -13372,7 +13372,7 @@ try{var s=value.toString();if(context.level > 0 && !showFunction){var a=s.split( if(useColor){context.output += colors.COLOR_NULL;}context.output += value.toString();if(useColor){context.output += colors.COLOR_RESET;}}else {context.output += String(value);}}}; //////////////////////////////////////////////////////////////////////////////// /// @brief buffers output instead of printing it //////////////////////////////////////////////////////////////////////////////// -function bufferOutput(){for(var _i4=0;_i4 < arguments.length;++_i4) {var value=arguments[_i4];var text;if(value === null){text = 'null';}else if(value === undefined){text = 'undefined';}else if(typeof value === 'object'){try{text = JSON.stringify(value);}catch(err) {text = String(value);}}else {text = String(value);}exports.outputBuffer += text;}} //////////////////////////////////////////////////////////////////////////////// +function bufferOutput(){for(var i=0;i < arguments.length;++i) {var value=arguments[i];var text;if(value === null){text = 'null';}else if(value === undefined){text = 'undefined';}else if(typeof value === 'object'){try{text = JSON.stringify(value);}catch(err) {text = String(value);}}else {text = String(value);}exports.outputBuffer += text;}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints all arguments /// /// @FUN{exports.printShell(@FA{arg1}, @FA{arg2}, @FA{arg3}, ...)} @@ -13382,10 +13382,10 @@ function bufferOutput(){for(var _i4=0;_i4 < arguments.length;++_i4) {var value=a /// Prints the arguments. If an argument is an object having a function /// @FN{_PRINT}, then this function is called. A final newline is printed. //////////////////////////////////////////////////////////////////////////////// -function printShell(){var output=exports.output;for(var _i5=0;_i5 < arguments.length;++_i5) {if(_i5 > 0){output(' ');}if(typeof arguments[_i5] === 'string'){output(arguments[_i5]);}else {var context={customInspect:true,emit:16384,level:0,limitString:printShell.limitString,names:[],output:'',path:'~',prettyPrint:usePrettyPrint,seen:[],showFunction:false,useColor:useColor,useToString:true};printRecursive(arguments[_i5],context);output(context.output);}}output('\n');}printShell.limitString = 80; //////////////////////////////////////////////////////////////////////////////// +function printShell(){var output=exports.output;for(var i=0;i < arguments.length;++i) {if(i > 0){output(' ');}if(typeof arguments[i] === 'string'){output(arguments[i]);}else {var context={customInspect:true,emit:16384,level:0,limitString:printShell.limitString,names:[],output:'',path:'~',prettyPrint:usePrettyPrint,seen:[],showFunction:false,useColor:useColor,useToString:true};printRecursive(arguments[i],context);output(context.output);}}output('\n');}printShell.limitString = 80; //////////////////////////////////////////////////////////////////////////////// /// @brief flatten //////////////////////////////////////////////////////////////////////////////// -var hasOwnProperty=Function.prototype.call.bind(Object.prototype.hasOwnProperty);exports.flatten = function(obj,seen){if(!obj || typeof obj !== 'object' && typeof obj !== 'function'){return obj;}if(obj instanceof Date){return obj.toJSON();}if(!seen){seen = [];}var result=Object.create(null),src=obj,keys,key,val;if(typeof obj === 'function'){result.__exec = String(obj);}while(src) {if(seen.indexOf(src) !== -1 || obj.constructor && src === obj.constructor.prototype){break;}seen.push(src);keys = Object.getOwnPropertyNames(src);for(var _i6=0;_i6 < keys.length;_i6++) {key = keys[_i6];if(typeof src !== 'function' || key !== 'arguments' && key !== 'caller' && key !== 'callee'){if(key.charAt(0) !== '_' && !hasOwnProperty(result,key)){val = obj[key];if(seen.indexOf(val) !== -1 && (typeof val === 'object' || typeof val === 'function')){result[key] = '[Circular]';}else {result[key] = exports.flatten(val,seen);}}}}src = Object.getPrototypeOf(src);}if(obj.constructor && obj.constructor.name){if(obj instanceof Error && obj.name === Error.name){result.name = obj.constructor.name;}else if(!hasOwnProperty(result,'constructor')){result.constructor = {name:obj.constructor.name};}}return result;}; //////////////////////////////////////////////////////////////////////////////// +var hasOwnProperty=Function.prototype.call.bind(Object.prototype.hasOwnProperty);exports.flatten = function(obj,seen){if(!obj || typeof obj !== 'object' && typeof obj !== 'function'){return obj;}if(obj instanceof Date){return obj.toJSON();}if(!seen){seen = [];}var result=Object.create(null),src=obj,keys,key,val;if(typeof obj === 'function'){result.__exec = String(obj);}while(src) {if(seen.indexOf(src) !== -1 || obj.constructor && src === obj.constructor.prototype){break;}seen.push(src);keys = Object.getOwnPropertyNames(src);for(var i=0;i < keys.length;i++) {key = keys[i];if(typeof src !== 'function' || key !== 'arguments' && key !== 'caller' && key !== 'callee'){if(key.charAt(0) !== '_' && !hasOwnProperty(result,key)){val = obj[key];if(seen.indexOf(val) !== -1 && (typeof val === 'object' || typeof val === 'function')){result[key] = '[Circular]';}else {result[key] = exports.flatten(val,seen);}}}}src = Object.getPrototypeOf(src);}if(obj.constructor && obj.constructor.name){if(obj instanceof Error && obj.name === Error.name){result.name = obj.constructor.name;}else if(!hasOwnProperty(result,'constructor')){result.constructor = {name:obj.constructor.name};}}return result;}; //////////////////////////////////////////////////////////////////////////////// /// @brief inspect //////////////////////////////////////////////////////////////////////////////// exports.inspect = function(object,options){var context={customInspect:options && options.customInspect,emit:false,level:0,limitString:false,names:[],output:'',prettyPrint:true,path:'~',seen:[],showFunction:true,useColor:false,useToString:false};if(options && options.hasOwnProperty('prettyPrint')){context.prettyPrint = options.prettyPrint;}printRecursive(object,context);return context.output;}; //////////////////////////////////////////////////////////////////////////////// @@ -13439,7 +13439,7 @@ global.print = exports.print; ////////////////////////////////////////////////// global.printf = function printf(){var internal=require('internal');internal.printf.apply(internal.printf,arguments);}; //////////////////////////////////////////////////////////////////////////////// /// @brief print_plain //////////////////////////////////////////////////////////////////////////////// -global.print_plain = function print_plain(){var output=require('internal').output;var printRecursive=require('internal').printRecursive;for(var _i7=0;_i7 < arguments.length;++_i7) {if(_i7 > 0){output(' ');}if(typeof arguments[_i7] === 'string'){output(arguments[_i7]);}else {var context={names:[],seen:[],path:'~',level:0,output:'',prettyPrint:false,useColor:false,customInspect:true};printRecursive(arguments[_i7],context);output(context.output);}}output('\n');}; //////////////////////////////////////////////////////////////////////////////// +global.print_plain = function print_plain(){var output=require('internal').output;var printRecursive=require('internal').printRecursive;for(var i=0;i < arguments.length;++i) {if(i > 0){output(' ');}if(typeof arguments[i] === 'string'){output(arguments[i]);}else {var context={names:[],seen:[],path:'~',level:0,output:'',prettyPrint:false,useColor:false,customInspect:true};printRecursive(arguments[i],context);output(context.output);}}output('\n');}; //////////////////////////////////////////////////////////////////////////////// /// @brief start_pretty_print //////////////////////////////////////////////////////////////////////////////// global.start_pretty_print = function start_pretty_print(){require('internal').startPrettyPrint();}; //////////////////////////////////////////////////////////////////////////////// @@ -13497,7 +13497,7 @@ log = function(level,message){if(typeof jqconsole !== 'undefined'){jqconsole.Wri function logGroup(level,msg){log(level,groupLevel + msg);} //////////////////////////////////////////////////////////////////////////////// /// @brief try to prettify //////////////////////////////////////////////////////////////////////////////// -function prepareArgs(args){var ShapedJson=require('internal').ShapedJson;var result=[];if(args.length > 0 && typeof args[0] !== 'string'){result.push('%s');}for(var _i8=0;_i8 < args.length;++_i8) {var arg=args[_i8];if(typeof arg === 'object'){if(ShapedJson !== undefined && arg instanceof ShapedJson){arg = inspect(arg,{prettyPrint:false});}else if(arg === null){arg = 'null';}else if(arg instanceof Date || arg instanceof RegExp){arg = String(arg);}else if(Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)){arg = inspect(arg,{prettyPrint:false});}}result.push(arg);}return result;} //////////////////////////////////////////////////////////////////////////////// +function prepareArgs(args){var ShapedJson=require('internal').ShapedJson;var result=[];if(args.length > 0 && typeof args[0] !== 'string'){result.push('%s');}for(var i=0;i < args.length;++i) {var arg=args[i];if(typeof arg === 'object'){if(ShapedJson !== undefined && arg instanceof ShapedJson){arg = inspect(arg,{prettyPrint:false});}else if(arg === null){arg = 'null';}else if(arg instanceof Date || arg instanceof RegExp){arg = String(arg);}else if(Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)){arg = inspect(arg,{prettyPrint:false});}}result.push(arg);}return result;} //////////////////////////////////////////////////////////////////////////////// /// @brief assert //////////////////////////////////////////////////////////////////////////////// exports.assert = function(condition){if(condition){return;}var args=Array.prototype.slice.call(arguments,1);var msg;try{msg = sprintf.apply(sprintf,prepareArgs(args));}catch(e) {msg = msg = e + ': ' + args;}logGroup('error',msg);require('assert').ok(condition,msg);}; //////////////////////////////////////////////////////////////////////////////// @@ -13506,7 +13506,7 @@ exports.assert = function(condition){if(condition){return;}var args=Array.protot exports.debug = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('debug',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief debugLines //////////////////////////////////////////////////////////////////////////////// -exports.debugLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i9=0;_i9 < a.length;++_i9) {logGroup('debug',a[_i9]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.debugLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('debug',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief dir //////////////////////////////////////////////////////////////////////////////// exports.dir = function(object){logGroup('info',inspect(object));}; //////////////////////////////////////////////////////////////////////////////// @@ -13515,7 +13515,7 @@ exports.dir = function(object){logGroup('info',inspect(object));}; ///////////// exports.error = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('error',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief errorLines //////////////////////////////////////////////////////////////////////////////// -exports.errorLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i10=0;_i10 < a.length;++_i10) {logGroup('error',a[_i10]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.errorLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('error',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief getline //////////////////////////////////////////////////////////////////////////////// if(global.SYS_GETLINE){exports.getline = global.SYS_GETLINE;delete global.SYS_GETLINE;} //////////////////////////////////////////////////////////////////////////////// @@ -13533,7 +13533,7 @@ exports.groupEnd = function(){groupLevel = groupLevel.substr(2);}; ///////////// exports.info = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('info',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief infoLines //////////////////////////////////////////////////////////////////////////////// -exports.infoLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i11=0;_i11 < a.length;++_i11) {logGroup('info',a[_i11]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.infoLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('info',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief log //////////////////////////////////////////////////////////////////////////////// exports.log = exports.info;exports._log = log; //////////////////////////////////////////////////////////////////////////////// @@ -13548,7 +13548,7 @@ exports.time = function(label){if(typeof label !== 'string'){throw new Error('la exports.timeEnd = function(label){var symbol=typeof Symbol === 'undefined'?'%' + label:Symbol['for'](label);var time=timers[symbol];if(!time){throw new Error('No such label: ' + label);}var duration=Date.now() - time;delete timers[symbol];logGroup('info',sprintf('%s: %dms',label,duration));}; //////////////////////////////////////////////////////////////////////////////// /// @brief trace //////////////////////////////////////////////////////////////////////////////// -exports.trace = function(){var err=new Error();err.name = 'Trace';err.message = sprintf.apply(sprintf,prepareArgs(arguments));Error.captureStackTrace(err,exports.trace);var a=err.stack.split('\n');while(!a[a.length - 1]) {a.pop();}for(var _i12=0;_i12 < a.length;++_i12) {logGroup('info',a[_i12]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.trace = function(){var err=new Error();err.name = 'Trace';err.message = sprintf.apply(sprintf,prepareArgs(arguments));Error.captureStackTrace(err,exports.trace);var a=err.stack.split('\n');while(!a[a.length - 1]) {a.pop();}for(var i=0;i < a.length;++i) {logGroup('info',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief warn //////////////////////////////////////////////////////////////////////////////// exports.warn = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('warning',msg);}; //////////////////////////////////////////////////////////////////////////////// @@ -14586,13 +14586,13 @@ var maxLength=4096;if(query.length > maxLength){stringBuilder.appendLine(section // var addHint = function (dst, currentNode, msg) { // dst.push({ code: "Hint", message: "Node #" + currentNode + ": " + msg }); // }; -var buildExpression=function buildExpression(_x){var _again=true;_function: while(_again) {var node=_x;binaryOperator = i = ref = out = collectionName = collectionObject = isEdgeCollection = isSystem = undefined;_again = false;var binaryOperator=function binaryOperator(node,name){var lhs=buildExpression(node.subNodes[0]);var rhs=buildExpression(node.subNodes[1]);if(node.subNodes.length === 3){ // array operator node... prepend "all" | "any" | "none" to node type +var buildExpression=function buildExpression(_x){var _again=true;_function: while(_again) {var node=_x;_again = false;var binaryOperator=function binaryOperator(node,name){var lhs=buildExpression(node.subNodes[0]);var rhs=buildExpression(node.subNodes[1]);if(node.subNodes.length === 3){ // array operator node... prepend "all" | "any" | "none" to node type name = node.subNodes[2].quantifier + " " + name;}if(node.sorted){return lhs + " " + name + " " + annotation("/* sorted */") + " " + rhs;}return lhs + " " + name + " " + rhs;};isConst = isConst && ["value","object","object element","array"].indexOf(node.type) !== -1;if(node.type !== "attribute access" && node.hasOwnProperty("subNodes")){for(var i=0;i < node.subNodes.length;++i) {if(node.subNodes[i].type === "reference" && collectionVariables.hasOwnProperty(node.subNodes[i].id)){addHint(explain.warnings,currentNode,"reference to collection document variable '" + node.subNodes[i].name + "' used in potentially non-working way");break;}}}switch(node.type){case "reference":if(references.hasOwnProperty(node.name)){var ref=references[node.name];delete references[node.name];if(Array.isArray(ref)){var out=buildExpression(ref[1]) + "[" + new Array(ref[0] + 1).join('*');if(ref[2].type !== "no-op"){out += " " + keyword("FILTER") + " " + buildExpression(ref[2]);}if(ref[3].type !== "no-op"){out += " " + keyword("LIMIT ") + " " + buildExpression(ref[3]);}if(ref[4].type !== "no-op"){out += " " + keyword("RETURN ") + " " + buildExpression(ref[4]);}out += "]";return out;}return buildExpression(ref) + "[*]";}return variableName(node);case "collection":addHint(explain.warnings,currentNode,"using all documents from collection '" + node.name + "' in expression");return collection(node.name) + " " + annotation("/* all collection documents */");case "value":return value(JSON.stringify(node.value));case "object":if(node.hasOwnProperty("subNodes")){if(node.subNodes.length > 20){ // print only the first 20 values from the objects return "{ " + node.subNodes.slice(0,20).map(buildExpression).join(", ") + ", ... }";}return "{ " + node.subNodes.map(buildExpression).join(", ") + " }";}return "{ }";case "object element":return value(JSON.stringify(node.name)) + " : " + buildExpression(node.subNodes[0]);case "calculated object element":return "[ " + buildExpression(node.subNodes[0]) + " ] : " + buildExpression(node.subNodes[1]);case "array":if(node.hasOwnProperty("subNodes")){if(node.subNodes.length > 20){ // print only the first 20 values from the array return "[ " + node.subNodes.slice(0,20).map(buildExpression).join(", ") + ", ... ]";}return "[ " + node.subNodes.map(buildExpression).join(", ") + " ]";}return "[ ]";case "unary not":return "! " + buildExpression(node.subNodes[0]);case "unary plus":return "+ " + buildExpression(node.subNodes[0]);case "unary minus":return "- " + buildExpression(node.subNodes[0]);case "array limit":return buildExpression(node.subNodes[0]) + ", " + buildExpression(node.subNodes[1]);case "attribute access":if(node.subNodes[0].type === "reference" && collectionVariables.hasOwnProperty(node.subNodes[0].id)){ // top-level attribute access var collectionName=collectionVariables[node.subNodes[0].id],collectionObject=db._collection(collectionName);if(collectionObject !== null){var isEdgeCollection=collectionObject.type() === 3,isSystem=node.name[0] === '_';if(isSystem && ["_key","_id","_rev"].concat(isEdgeCollection?["_from","_to"]:[]).indexOf(node.name) === -1 || !isSystem && isEdgeCollection && ["from","to"].indexOf(node.name) !== -1){addHint(explain.warnings,currentNode,"reference to potentially non-existing attribute '" + node.name + "'");}}}return buildExpression(node.subNodes[0]) + "." + attribute(node.name);case "indexed access":return buildExpression(node.subNodes[0]) + "[" + buildExpression(node.subNodes[1]) + "]";case "range":return buildExpression(node.subNodes[0]) + " .. " + buildExpression(node.subNodes[1]) + " " + annotation("/* range */");case "expand":case "expansion":if(node.subNodes.length > 2){ // [FILTER ...] references[node.subNodes[0].subNodes[0].name] = [node.levels,node.subNodes[0].subNodes[1],node.subNodes[2],node.subNodes[3],node.subNodes[4]];}else { // [*] -references[node.subNodes[0].subNodes[0].name] = node.subNodes[0].subNodes[1];}_x = node.subNodes[1];_again = true;continue _function;case "user function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")" + " " + annotation("/* user-defined function */");case "function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")";case "plus":return "(" + binaryOperator(node,"+") + ")";case "minus":return "(" + binaryOperator(node,"-") + ")";case "times":return "(" + binaryOperator(node,"*") + ")";case "division":return "(" + binaryOperator(node,"/") + ")";case "modulus":return "(" + binaryOperator(node,"%") + ")";case "compare not in":case "array compare not in":return "(" + binaryOperator(node,"not in") + ")";case "compare in":case "array compare in":return "(" + binaryOperator(node,"in") + ")";case "compare ==":case "array compare ==":return "(" + binaryOperator(node,"==") + ")";case "compare !=":case "array compare !=":return "(" + binaryOperator(node,"!=") + ")";case "compare >":case "array compare >":return "(" + binaryOperator(node,">") + ")";case "compare >=":case "array compare >=":return "(" + binaryOperator(node,">=") + ")";case "compare <":case "array compare <":return "(" + binaryOperator(node,"<") + ")";case "compare <=":case "array compare <=":return "(" + binaryOperator(node,"<=") + ")";case "logical or":return "(" + binaryOperator(node,"||") + ")";case "logical and":return "(" + binaryOperator(node,"&&") + ")";case "ternary":return "(" + buildExpression(node.subNodes[0]) + " ? " + buildExpression(node.subNodes[1]) + " : " + buildExpression(node.subNodes[2]) + ")";case "n-ary or":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" || "));}return "";case "n-ary and":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" && "));}return "";default:return "unhandled node type (" + node.type + ")";}}};var buildSimpleExpression=function buildSimpleExpression(simpleExpressions){var rc="";for(var indexNo in simpleExpressions) {if(simpleExpressions.hasOwnProperty(indexNo)){if(rc.length > 0){rc += " AND ";}for(var i=0;i < simpleExpressions[indexNo].length;i++) {var item=simpleExpressions[indexNo][i];rc += attribute("Path") + ".";if(item.isEdgeAccess){rc += attribute("edges");}else {rc += attribute("vertices");}rc += "[" + value(indexNo) + "] -> ";rc += buildExpression(item.varAccess);rc += " " + item.comparisonTypeStr + " ";rc += buildExpression(item.compareTo);}}}return rc;};var buildBound=function buildBound(attr,operators,bound){var boundValue=bound.isConstant?value(JSON.stringify(bound.bound)):buildExpression(bound.bound);return attribute(attr) + " " + operators[bound.include?1:0] + " " + boundValue;};var buildRanges=function buildRanges(ranges){var results=[];ranges.forEach(function(range){var attr=range.attr;if(range.lowConst.hasOwnProperty("bound") && range.highConst.hasOwnProperty("bound") && JSON.stringify(range.lowConst.bound) === JSON.stringify(range.highConst.bound)){range.equality = true;}if(range.equality){if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,["==","=="],range.lowConst));}else if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,["==","=="],bound));});}}else {if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,[">",">="],range.lowConst));}if(range.highConst.hasOwnProperty("bound")){results.push(buildBound(attr,["<","<="],range.highConst));}if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,[">",">="],bound));});}if(range.hasOwnProperty("highs")){range.highs.forEach(function(bound){results.push(buildBound(attr,["<","<="],bound));});}}});if(results.length > 1){return "(" + results.join(" && ") + ")";}return results[0];};var label=function label(node){switch(node.type){case "SingletonNode":return keyword("ROOT");case "NoResultsNode":return keyword("EMPTY") + " " + annotation("/* empty result set */");case "EnumerateCollectionNode":collectionVariables[node.outVariable.id] = node.collection;return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* full collection scan" + (node.random?", random order":"") + " */");case "EnumerateListNode":return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + variableName(node.inVariable) + " " + annotation("/* list iteration */");case "IndexNode":collectionVariables[node.outVariable.id] = node.collection;var types=[];node.indexes.forEach(function(idx,i){var what=(node.reverse?"reverse ":"") + idx.type + " index scan";if(types.length === 0 || what !== types[types.length - 1]){types.push(what);}idx.collection = node.collection;idx.node = node.id;if(node.condition.type && node.condition.type === 'n-ary or'){idx.condition = buildExpression(node.condition.subNodes[i]);}else {idx.condition = "*"; // empty condition. this is likely an index used for sorting only +references[node.subNodes[0].subNodes[0].name] = node.subNodes[0].subNodes[1];}_x = node.subNodes[1];_again = true;binaryOperator = i = ref = out = collectionName = collectionObject = isEdgeCollection = isSystem = undefined;continue _function;case "user function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")" + " " + annotation("/* user-defined function */");case "function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")";case "plus":return "(" + binaryOperator(node,"+") + ")";case "minus":return "(" + binaryOperator(node,"-") + ")";case "times":return "(" + binaryOperator(node,"*") + ")";case "division":return "(" + binaryOperator(node,"/") + ")";case "modulus":return "(" + binaryOperator(node,"%") + ")";case "compare not in":case "array compare not in":return "(" + binaryOperator(node,"not in") + ")";case "compare in":case "array compare in":return "(" + binaryOperator(node,"in") + ")";case "compare ==":case "array compare ==":return "(" + binaryOperator(node,"==") + ")";case "compare !=":case "array compare !=":return "(" + binaryOperator(node,"!=") + ")";case "compare >":case "array compare >":return "(" + binaryOperator(node,">") + ")";case "compare >=":case "array compare >=":return "(" + binaryOperator(node,">=") + ")";case "compare <":case "array compare <":return "(" + binaryOperator(node,"<") + ")";case "compare <=":case "array compare <=":return "(" + binaryOperator(node,"<=") + ")";case "logical or":return "(" + binaryOperator(node,"||") + ")";case "logical and":return "(" + binaryOperator(node,"&&") + ")";case "ternary":return "(" + buildExpression(node.subNodes[0]) + " ? " + buildExpression(node.subNodes[1]) + " : " + buildExpression(node.subNodes[2]) + ")";case "n-ary or":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" || "));}return "";case "n-ary and":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" && "));}return "";default:return "unhandled node type (" + node.type + ")";}}};var buildSimpleExpression=function buildSimpleExpression(simpleExpressions){var rc="";for(var indexNo in simpleExpressions) {if(simpleExpressions.hasOwnProperty(indexNo)){if(rc.length > 0){rc += " AND ";}for(var i=0;i < simpleExpressions[indexNo].length;i++) {var item=simpleExpressions[indexNo][i];rc += attribute("Path") + ".";if(item.isEdgeAccess){rc += attribute("edges");}else {rc += attribute("vertices");}rc += "[" + value(indexNo) + "] -> ";rc += buildExpression(item.varAccess);rc += " " + item.comparisonTypeStr + " ";rc += buildExpression(item.compareTo);}}}return rc;};var buildBound=function buildBound(attr,operators,bound){var boundValue=bound.isConstant?value(JSON.stringify(bound.bound)):buildExpression(bound.bound);return attribute(attr) + " " + operators[bound.include?1:0] + " " + boundValue;};var buildRanges=function buildRanges(ranges){var results=[];ranges.forEach(function(range){var attr=range.attr;if(range.lowConst.hasOwnProperty("bound") && range.highConst.hasOwnProperty("bound") && JSON.stringify(range.lowConst.bound) === JSON.stringify(range.highConst.bound)){range.equality = true;}if(range.equality){if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,["==","=="],range.lowConst));}else if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,["==","=="],bound));});}}else {if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,[">",">="],range.lowConst));}if(range.highConst.hasOwnProperty("bound")){results.push(buildBound(attr,["<","<="],range.highConst));}if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,[">",">="],bound));});}if(range.hasOwnProperty("highs")){range.highs.forEach(function(bound){results.push(buildBound(attr,["<","<="],bound));});}}});if(results.length > 1){return "(" + results.join(" && ") + ")";}return results[0];};var label=function label(node){switch(node.type){case "SingletonNode":return keyword("ROOT");case "NoResultsNode":return keyword("EMPTY") + " " + annotation("/* empty result set */");case "EnumerateCollectionNode":collectionVariables[node.outVariable.id] = node.collection;return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* full collection scan" + (node.random?", random order":"") + " */");case "EnumerateListNode":return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + variableName(node.inVariable) + " " + annotation("/* list iteration */");case "IndexNode":collectionVariables[node.outVariable.id] = node.collection;var types=[];node.indexes.forEach(function(idx,i){var what=(node.reverse?"reverse ":"") + idx.type + " index scan";if(types.length === 0 || what !== types[types.length - 1]){types.push(what);}idx.collection = node.collection;idx.node = node.id;if(node.condition.type && node.condition.type === 'n-ary or'){idx.condition = buildExpression(node.condition.subNodes[i]);}else {idx.condition = "*"; // empty condition. this is likely an index used for sorting only }indexes.push(idx);});return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* " + types.join(", ") + " */");case "IndexRangeNode":collectionVariables[node.outVariable.id] = node.collection;var index=node.index;index.ranges = node.ranges.map(buildRanges).join(" || ");index.collection = node.collection;index.node = node.id;indexes.push(index);return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* " + (node.reverse?"reverse ":"") + node.index.type + " index scan */");case "TraversalNode":node.minMaxDepth = node.minDepth + ".." + node.maxDepth;node.minMaxDepthLen = node.minMaxDepth.length;var rc=keyword("FOR ") + variableName(node.vertexOutVariable) + " " + annotation("/* vertex */");if(node.hasOwnProperty('edgeOutVariable')){rc += " , " + variableName(node.edgeOutVariable) + " " + annotation("/* edge */");}if(node.hasOwnProperty('pathOutVariable')){rc += " , " + variableName(node.pathOutVariable) + " " + annotation("/* paths */");}rc += " " + keyword("IN") + " " + value(node.minMaxDepth) + " " + annotation("/* min..maxPathDepth */") + " ";var translate=["ANY","INBOUND","OUTBOUND"];var defaultDirection=node.directions[0];rc += keyword(translate[defaultDirection]);if(node.hasOwnProperty("vertexId")){rc += " '" + value(node.vertexId) + "' ";}else {rc += " " + variableName(node.inVariable) + " ";}rc += annotation("/* startnode */") + " ";if(Array.isArray(node.graph)){rc += node.graph.map(function(g,index){var tmp="";if(node.directions[index] !== defaultDirection){tmp += keyword(translate[node.directions[index]]);tmp += " ";}return tmp + collection(g);}).join(", ");}else {rc += keyword("GRAPH") + " '" + value(node.graph) + "'";}traversalDetails.push(node);if(node.hasOwnProperty('simpleExpressions')){node.ConditionStr = buildSimpleExpression(node.simpleExpressions);}var e=[];if(node.hasOwnProperty('graphDefinition')){var v=[];node.graphDefinition.vertexCollectionNames.forEach(function(vcn){v.push(collection(vcn));});node.vertexCollectionNameStr = v.join(", ");node.vertexCollectionNameStrLen = node.graphDefinition.vertexCollectionNames.join(", ").length;node.graphDefinition.edgeCollectionNames.forEach(function(ecn){e.push(collection(ecn));});node.edgeCollectionNameStr = e.join(", ");node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;}else {var edgeCols=node.graph || [];edgeCols.forEach(function(ecn){e.push(collection(ecn));});node.edgeCollectionNameStr = e.join(", ");node.edgeCollectionNameStrLen = edgeCols.join(", ").length;node.graph = "";}return rc;case "CalculationNode":return keyword("LET") + " " + variableName(node.outVariable) + " = " + buildExpression(node.expression) + " " + annotation("/* " + node.expressionType + " expression */");case "FilterNode":return keyword("FILTER") + " " + variableName(node.inVariable);case "AggregateNode": /* old-style COLLECT node */return keyword("COLLECT") + " " + node.aggregates.map(function(node){return variableName(node.outVariable) + " = " + variableName(node.inVariable);}).join(", ") + (node.count?" " + keyword("WITH COUNT"):"") + (node.outVariable?" " + keyword("INTO") + " " + variableName(node.outVariable):"") + (node.keepVariables?" " + keyword("KEEP") + " " + node.keepVariables.map(function(variable){return variableName(variable);}).join(", "):"") + " " + annotation("/* " + node.aggregationOptions.method + " */");case "CollectNode":var collect=keyword("COLLECT") + " " + node.groups.map(function(node){return variableName(node.outVariable) + " = " + variableName(node.inVariable);}).join(", ");if(node.hasOwnProperty("aggregates") && node.aggregates.length > 0){if(node.groups.length > 0){collect += " ";}collect += keyword("AGGREGATE") + " " + node.aggregates.map(function(node){return variableName(node.outVariable) + " = " + func(node.type) + "(" + variableName(node.inVariable) + ")";}).join(", ");}collect += (node.count?" " + keyword("WITH COUNT"):"") + (node.outVariable?" " + keyword("INTO") + " " + variableName(node.outVariable):"") + (node.keepVariables?" " + keyword("KEEP") + " " + node.keepVariables.map(function(variable){return variableName(variable);}).join(", "):"") + " " + annotation("/* " + node.collectOptions.method + "*/");return collect;case "SortNode":return keyword("SORT") + " " + node.elements.map(function(node){return variableName(node.inVariable) + " " + keyword(node.ascending?"ASC":"DESC");}).join(", ");case "LimitNode":return keyword("LIMIT") + " " + value(JSON.stringify(node.offset)) + ", " + value(JSON.stringify(node.limit));case "ReturnNode":return keyword("RETURN") + " " + variableName(node.inVariable);case "SubqueryNode":return keyword("LET") + " " + variableName(node.outVariable) + " = ... " + annotation("/* subquery */");case "InsertNode":modificationFlags = node.modificationFlags;return keyword("INSERT") + " " + variableName(node.inVariable) + " " + keyword("IN") + " " + collection(node.collection);case "UpdateNode":modificationFlags = node.modificationFlags;if(node.hasOwnProperty("inKeyVariable")){return keyword("UPDATE") + " " + variableName(node.inKeyVariable) + " " + keyword("WITH") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);}return keyword("UPDATE") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);case "ReplaceNode":modificationFlags = node.modificationFlags;if(node.hasOwnProperty("inKeyVariable")){return keyword("REPLACE") + " " + variableName(node.inKeyVariable) + " " + keyword("WITH") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);}return keyword("REPLACE") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);case "UpsertNode":modificationFlags = node.modificationFlags;return keyword("UPSERT") + " " + variableName(node.inDocVariable) + " " + keyword("INSERT") + " " + variableName(node.insertVariable) + " " + keyword(node.isReplace?"REPLACE":"UPDATE") + " " + variableName(node.updateVariable) + " " + keyword("IN") + " " + collection(node.collection);case "RemoveNode":modificationFlags = node.modificationFlags;return keyword("REMOVE") + " " + variableName(node.inVariable) + " " + keyword("IN") + " " + collection(node.collection);case "RemoteNode":return keyword("REMOTE");case "DistributeNode":return keyword("DISTRIBUTE");case "ScatterNode":return keyword("SCATTER");case "GatherNode":return keyword("GATHER");}return "unhandled node type (" + node.type + ")";};var level=0,subqueries=[];var indent=function indent(level,isRoot){return pad(1 + level + level) + (isRoot?"* ":"- ");};var preHandle=function preHandle(node){usedVariables = {};currentNode = node.id;isConst = true;if(node.type === "SubqueryNode"){subqueries.push(level);}};var postHandle=function postHandle(node){var isLeafNode=!parents.hasOwnProperty(node.id);if(["EnumerateCollectionNode","EnumerateListNode","IndexRangeNode","IndexNode","SubqueryNode"].indexOf(node.type) !== -1){level++;}else if(isLeafNode && subqueries.length > 0){level = subqueries.pop();}else if(node.type === "SingletonNode"){level++;}};var constNess=function constNess(){if(isConst){return " " + annotation("/* const assignment */");}return "";};var variablesUsed=function variablesUsed(){var used=[];for(var a in usedVariables) {if(usedVariables.hasOwnProperty(a)){used.push(variable(a) + " : " + collection(usedVariables[a]));}}if(used.length > 0){return " " + annotation("/* collections used:") + " " + used.join(", ") + " " + annotation("*/");}return "";};var printNode=function printNode(node){preHandle(node);var line=" " + pad(1 + maxIdLen - String(node.id).length) + variable(node.id) + " " + keyword(node.type) + pad(1 + maxTypeLen - String(node.type).length) + " ";if(cluster && cluster.isCluster && cluster.isCluster()){line += variable(node.site) + pad(1 + maxSiteLen - String(node.site).length) + " ";}line += pad(1 + maxEstimateLen - String(node.estimatedNrItems).length) + value(node.estimatedNrItems) + " " + indent(level,node.type === "SingletonNode") + label(node);if(node.type === "CalculationNode"){line += variablesUsed() + constNess();}stringBuilder.appendLine(line);postHandle(node);};printQuery(query);stringBuilder.appendLine(section("Execution plan:"));var line=" " + pad(1 + maxIdLen - String("Id").length) + header("Id") + " " + header("NodeType") + pad(1 + maxTypeLen - String("NodeType").length) + " ";if(cluster && cluster.isCluster && cluster.isCluster()){line += header("Site") + pad(1 + maxSiteLen - String("Site").length) + " ";}line += pad(1 + maxEstimateLen - String("Est.").length) + header("Est.") + " " + header("Comment");stringBuilder.appendLine(line);var walk=[rootNode];while(walk.length > 0) {var id=walk.pop();var node=nodes[id];printNode(node);if(parents.hasOwnProperty(id)){walk = walk.concat(parents[id]);}if(node.type === "SubqueryNode"){walk = walk.concat([node.subquery.nodes[0].id]);}}stringBuilder.appendLine();printIndexes(indexes);printTraversalDetails(traversalDetails);stringBuilder.appendLine();printRules(plan.rules);printModificationFlags(modificationFlags);printWarnings(explain.warnings);} /* the exposed function */function explain(data,options,shouldPrint){'use strict';if(typeof data === "string"){data = {query:data};}if(!(data instanceof Object)){throw "ArangoStatement needs initial data";}if(options === undefined){options = data.options;}options = options || {};setColors(options.colors === undefined?true:options.colors);var stmt=db._createStatement(data);var result=stmt.explain(options);stringBuilder.clearOutput();processQuery(data.query,result,true);if(shouldPrint === undefined || shouldPrint){print(stringBuilder.getOutput());}else {return stringBuilder.getOutput();}}exports.explain = explain;});module.define("@arangodb/aql/functions",function(exports,module){ /*jshint strict: false */ //////////////////////////////////////////////////////////////////////////////// /// @brief AQL user functions management /// @@ -16291,7 +16291,7 @@ return +a === 0?1 / +a === 1 / b:+a === +b;case '[object Date]':case '[object Bo // of `NaN` are not equivalent. return +a === +b;}var areArrays=className === '[object Array]';if(!areArrays){if(typeof a != 'object' || typeof b != 'object')return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. -var aCtor=a.constructor,bCtor=b.constructor;if(aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)){return false;}} // Assume equality for cyclic structures. The algorithm for detecting cyclic +var aCtor=a.constructor,bCtor=b.constructor;if(aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b){return false;}} // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.js.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/app.js.gz index 91ee3eb358..7966975f91 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/app.js.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/app.js.gz differ 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 6a2b7c9622..2b64fa312f 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 @@ -5,7 +5,7 @@ type:"text",id:"expanded"},{type:"text",id:"collapsed"}],function(){var a=$("#"+ var e={};return c=w(c,d),u.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};u.groupBy=D(function(a,b,c){u.has(a,c)?a[c].push(b):a[c]=[b]}),u.indexBy=D(function(a,b,c){a[c]=b}),u.countBy=D(function(a,b,c){u.has(a,c)?a[c]++:a[c]=1}),u.toArray=function(a){return a?u.isArray(a)?m.call(a):C(a)?u.map(a,u.identity):u.values(a):[]},u.size=function(a){return null==a?0:C(a)?a.length:u.keys(a).length},u.partition=function(a,b,c){b=w(b,c);var d=[],e=[];return u.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},u.first=u.head=u.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:u.initial(a,a.length-b)},u.initial=function(a,b,c){return m.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},u.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:u.rest(a,Math.max(0,a.length-b))},u.rest=u.tail=u.drop=function(a,b,c){return m.call(a,null==b||c?1:b)},u.compact=function(a){return u.filter(a,u.identity)};var E=function(a,b,c,d){for(var e=[],f=0,g=d||0,h=B(a);h>g;g++){var i=a[g];if(C(i)&&(u.isArray(i)||u.isArguments(i))){b||(i=E(i,b,c));var j=0,k=i.length;for(e.length+=k;k>j;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};u.flatten=function(a,b){return E(a,b,!1)},u.without=function(a){return u.difference(a,m.call(arguments,1))},u.uniq=u.unique=function(a,b,c,d){u.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=w(c,d));for(var e=[],f=[],g=0,h=B(a);h>g;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?u.contains(f,j)||(f.push(j),e.push(i)):u.contains(e,i)||e.push(i)}return e},u.union=function(){return u.uniq(E(arguments,!0,!0))},u.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=B(a);e>d;d++){var f=a[d];if(!u.contains(b,f)){for(var g=1;c>g&&u.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},u.difference=function(a){var b=E(arguments,!0,!0,1);return u.filter(a,function(a){return!u.contains(b,a)})},u.zip=function(){return u.unzip(arguments)},u.unzip=function(a){for(var b=a&&u.max(a,B).length||0,c=Array(b),d=0;b>d;d++)c[d]=u.pluck(a,d);return c},u.object=function(a,b){for(var c={},d=0,e=B(a);e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},u.findIndex=d(1),u.findLastIndex=d(-1),u.sortedIndex=function(a,b,c,d){c=w(c,d,1);for(var e=c(b),f=0,g=B(a);g>f;){var h=Math.floor((f+g)/2);c(a[h])f;f++,a+=c)e[f]=a;return e};var F=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=y(a.prototype),g=a.apply(f,e);return u.isObject(g)?g:f};u.bind=function(a,b){if(r&&a.bind===r)return r.apply(a,m.call(arguments,1));if(!u.isFunction(a))throw new TypeError("Bind must be called on a function");var c=m.call(arguments,2),d=function(){return F(a,d,b,this,c.concat(m.call(arguments)))};return d},u.partial=function(a){var b=m.call(arguments,1),c=function(){for(var d=0,e=b.length,f=Array(e),g=0;e>g;g++)f[g]=b[g]===u?arguments[d++]:b[g];for(;d=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=u.bind(a[c],a);return a},u.memoize=function(a,b){var c=function(d){var e=c.cache,f=""+(b?b.apply(this,arguments):d);return u.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},u.delay=function(a,b){var c=m.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},u.defer=u.partial(u.delay,u,1),u.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:u.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=u.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k||k>b?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},u.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=u.now()-g;b>j&&j>=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=u.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},u.wrap=function(a,b){return u.partial(b,a)},u.negate=function(a){return function(){return!a.apply(this,arguments)}},u.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},u.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},u.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=null),c}},u.once=u.partial(u.before,2);var G=!{toString:null}.propertyIsEnumerable("toString"),H=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];u.keys=function(a){if(!u.isObject(a))return[];if(q)return q(a);var b=[];for(var c in a)u.has(a,c)&&b.push(c);return G&&f(a,b),b},u.allKeys=function(a){if(!u.isObject(a))return[];var b=[];for(var c in a)b.push(c);return G&&f(a,b),b},u.values=function(a){for(var b=u.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},u.mapObject=function(a,b,c){b=w(b,c);for(var d,e=u.keys(a),f=e.length,g={},h=0;f>h;h++)d=e[h],g[d]=b(a[d],d,a);return g},u.pairs=function(a){for(var b=u.keys(a),c=b.length,d=Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},u.invert=function(a){for(var b={},c=u.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},u.functions=u.methods=function(a){var b=[];for(var c in a)u.isFunction(a[c])&&b.push(c);return b.sort()},u.extend=x(u.allKeys),u.extendOwn=u.assign=x(u.keys),u.findKey=function(a,b,c){b=w(b,c);for(var d,e=u.keys(a),f=0,g=e.length;g>f;f++)if(d=e[f],b(a[d],d,a))return d},u.pick=function(a,b,c){var d,e,f={},g=a;if(null==g)return f;u.isFunction(b)?(e=u.allKeys(g),d=v(b,c)):(e=E(arguments,!1,!1,1),d=function(a,b,c){return b in c},g=Object(g));for(var h=0,i=e.length;i>h;h++){var j=e[h],k=g[j];d(k,j,g)&&(f[j]=k)}return f},u.omit=function(a,b,c){if(u.isFunction(b))b=u.negate(b);else{var d=u.map(E(arguments,!1,!1,1),String);b=function(a,b){return!u.contains(d,b)}}return u.pick(a,b,c)},u.defaults=x(u.allKeys,!0),u.create=function(a,b){var c=y(a);return b&&u.extendOwn(c,b),c},u.clone=function(a){return u.isObject(a)?u.isArray(a)?a.slice():u.extend({},a):a},u.tap=function(a,b){return b(a),a},u.isMatch=function(a,b){var c=u.keys(b),d=c.length;if(null==a)return!d;for(var e=Object(a),f=0;d>f;f++){var g=c[f];if(b[g]!==e[g]||!(g in e))return!1}return!0};var I=function(a,b,c,d){if(a===b)return 0!==a||1/a===1/b;if(null==a||null==b)return a===b;a instanceof u&&(a=a._wrapped),b instanceof u&&(b=b._wrapped);var e=n.call(a);if(e!==n.call(b))return!1;switch(e){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!==+a?+b!==+b:0===+a?1/+a===1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b}var f="[object Array]"===e;if(!f){if("object"!=typeof a||"object"!=typeof b)return!1;var g=a.constructor,h=b.constructor;if(g!==h&&!(u.isFunction(g)&&g instanceof g&&u.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1}c=c||[],d=d||[];for(var i=c.length;i--;)if(c[i]===a)return d[i]===b;if(c.push(a),d.push(b),f){if(i=a.length,i!==b.length)return!1;for(;i--;)if(!I(a[i],b[i],c,d))return!1}else{var j,k=u.keys(a);if(i=k.length,u.keys(b).length!==i)return!1;for(;i--;)if(j=k[i],!u.has(b,j)||!I(a[j],b[j],c,d))return!1}return c.pop(),d.pop(),!0};u.isEqual=function(a,b){return I(a,b)},u.isEmpty=function(a){return null==a?!0:C(a)&&(u.isArray(a)||u.isString(a)||u.isArguments(a))?0===a.length:0===u.keys(a).length},u.isElement=function(a){return!(!a||1!==a.nodeType)},u.isArray=p||function(a){return"[object Array]"===n.call(a)},u.isObject=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},u.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(a){u["is"+a]=function(b){return n.call(b)==="[object "+a+"]"}}),u.isArguments(arguments)||(u.isArguments=function(a){return u.has(a,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(u.isFunction=function(a){return"function"==typeof a||!1}),u.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},u.isNaN=function(a){return u.isNumber(a)&&a!==+a},u.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"===n.call(a)},u.isNull=function(a){return null===a},u.isUndefined=function(a){return void 0===a},u.has=function(a,b){return null!=a&&o.call(a,b)},u.noConflict=function(){return g._=h,this},u.identity=function(a){return a},u.constant=function(a){return function(){return a}},u.noop=function(){},u.property=z,u.propertyOf=function(a){return null==a?function(){}:function(b){return a[b]}},u.matcher=u.matches=function(a){return a=u.extendOwn({},a),function(b){return u.isMatch(b,a)}},u.times=function(a,b,c){var d=Array(Math.max(0,a));b=v(b,c,1);for(var e=0;a>e;e++)d[e]=b(e);return d},u.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},u.now=Date.now||function(){return(new Date).getTime()};var J={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},K=u.invert(J),L=function(a){var b=function(b){return a[b]},c="(?:"+u.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};u.escape=L(J),u.unescape=L(K),u.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),u.isFunction(d)?d.call(a):d};var M=0;u.uniqueId=function(a){var b=++M+"";return a?a+b:b},u.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var N=/(.)^/,O={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(a){return"\\"+O[a]};u.template=function(a,b,c){!b&&c&&(b=c),b=u.defaults({},b,u.templateSettings);var d=RegExp([(b.escape||N).source,(b.interpolate||N).source,(b.evaluate||N).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(P,Q),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,u)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},u.chain=function(a){var b=u(a);return b._chain=!0,b};var R=function(a,b){return a._chain?u(b).chain():b};u.mixin=function(a){u.each(u.functions(a),function(b){var c=u[b]=a[b];u.prototype[b]=function(){var a=[this._wrapped];return l.apply(a,arguments),R(this,c.apply(u,a))}})},u.mixin(u),u.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=i[a];u.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],R(this,c)}}),u.each(["concat","join","slice"],function(a){var b=i[a];u.prototype[a]=function(){return R(this,b.apply(this._wrapped,arguments))}}),u.prototype.value=function(){return this._wrapped},u.prototype.valueOf=u.prototype.toJSON=u.prototype.value,u.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return u})}).call(this)}),global.DEFINE_MODULE("internal",function(){"use strict";function a(a){if(i.hasOwnProperty(a))return i[a];var b,c=a.charCodeAt(0);return b=16>c?"\\u000":256>c?"\\u00":4096>c?"\\u0":"\\u",b+=c.toString(16),i[a]=b,b}function b(b){return'"'+b.replace(n,a)+'"'}function c(a){var b,c="";if(a.prettyPrint)for(c+="\n",b=0;b=b.emit&&(h.output(b.output),b.output=""),b.path=i,f=", "}b.level=e-1,b.output+=" ",c(b),d&&(b.output+=j.COLOR_PUNCTUATION),b.output+="]",d&&(b.output+=j.COLOR_RESET)}}function e(a,d){var e=d.useColor,f=" ";e&&(d.output+=j.COLOR_PUNCTUATION),d.output+="{",e&&(d.output+=j.COLOR_RESET);var g=d.level+1;d.level=g;var i;try{i=Object.keys(a)}catch(k){i=[]}for(var l=0,n=i.length;n>l;++l){var o=i[l],p=a[o];e&&(d.output+=j.COLOR_PUNCTUATION),d.output+=f,e&&(d.output+=j.COLOR_RESET),c(d),e&&(d.output+=j.COLOR_INDEX),d.output+=b(o),e&&(d.output+=j.COLOR_RESET),d.output+=" : ";var q=d.path;d.path+="["+o+"]",m(p,d),d.path=q,f=", ",d.emit&&d.output.length>=d.emit&&(h.output(d.output),d.output="")}d.level=g-1,d.output+=" ",c(d),e&&(d.output+=j.COLOR_PUNCTUATION),d.output+="}",e&&(d.output+=j.COLOR_RESET)}function f(){for(var a=0;a0&&a(" "),"string"==typeof arguments[b])a(arguments[b]);else{var c={customInspect:!0,emit:16384,level:0,limitString:g.limitString,names:[],output:"",path:"~",prettyPrint:l,seen:[],showFunction:!1,useColor:k,useToString:!0};m(arguments[b],c),a(c.output)}a("\n")}var h={};global.ArangoError?(h.ArangoError=global.ArangoError,delete global.ArangoError):(h.ArangoError=function(a){void 0!==a&&(this.error=a.error,this.code=a.code,this.errorNum=a.errorNum,this.errorMessage=a.errorMessage)},h.ArangoError.prototype=new Error),Object.defineProperty(h.ArangoError.prototype,"message",{configurable:!0,enumerable:!0,get:function(){return this.errorMessage}}),h.ArangoError.prototype.name="ArangoError",h.ArangoError.prototype._PRINT=function(a){a.output+="["+this.toString()+"]"},h.ArangoError.prototype.toString=function(){return this.name+" "+this.errorNum+": "+this.message},h.threadNumber=0,global.THREAD_NUMBER&&(h.threadNumber=global.THREAD_NUMBER,delete global.THREAD_NUMBER),h.developmentMode=!1,h.quiet=!1,global.ARANGO_QUIET&&(h.quiet=global.ARANGO_QUIET,delete global.ARANGO_QUIET),h.valgrind=!1,global.VALGRIND&&(h.valgrind=global.VALGRIND,delete global.VALGRIND),h.coverage=!1,global.COVERAGE&&(h.coverage=global.COVERAGE,delete global.COVERAGE),h.version="unknown",global.VERSION&&(h.version=global.VERSION,delete global.VERSION),h.platform="unknown",global.SYS_PLATFORM&&(h.platform=global.SYS_PLATFORM,delete global.SYS_PLATFORM),h.bytesSentDistribution=[],global.BYTES_SENT_DISTRIBUTION&&(h.bytesSentDistribution=global.BYTES_SENT_DISTRIBUTION,delete global.BYTES_SENT_DISTRIBUTION),h.bytesReceivedDistribution=[],global.BYTES_RECEIVED_DISTRIBUTION&&(h.bytesReceivedDistribution=global.BYTES_RECEIVED_DISTRIBUTION,delete global.BYTES_RECEIVED_DISTRIBUTION),h.connectionTimeDistribution=[],global.CONNECTION_TIME_DISTRIBUTION&&(h.connectionTimeDistribution=global.CONNECTION_TIME_DISTRIBUTION,delete global.CONNECTION_TIME_DISTRIBUTION),h.requestTimeDistribution=[],global.REQUEST_TIME_DISTRIBUTION&&(h.requestTimeDistribution=global.REQUEST_TIME_DISTRIBUTION,delete global.REQUEST_TIME_DISTRIBUTION),h.startupPath="",global.STARTUP_PATH&&(h.startupPath=global.STARTUP_PATH,delete global.STARTUP_PATH),""===h.startupPath&&(h.startupPath="."),global.CONFIGURE_ENDPOINT&&(h.configureEndpoint=global.CONFIGURE_ENDPOINT,delete global.CONFIGURE_ENDPOINT),global.REMOVE_ENDPOINT&&(h.removeEndpoint=global.REMOVE_ENDPOINT,delete global.REMOVE_ENDPOINT),global.LIST_ENDPOINTS&&(h.listEndpoints=global.LIST_ENDPOINTS,delete global.LIST_ENDPOINTS),global.SYS_BASE64DECODE&&(h.base64Decode=global.SYS_BASE64DECODE,delete global.SYS_BASE64DECODE),global.SYS_BASE64ENCODE&&(h.base64Encode=global.SYS_BASE64ENCODE,delete global.SYS_BASE64ENCODE),global.SYS_DEBUG_SEGFAULT&&(h.debugSegfault=global.SYS_DEBUG_SEGFAULT,delete global.SYS_DEBUG_SEGFAULT),global.SYS_DEBUG_SET_FAILAT&&(h.debugSetFailAt=global.SYS_DEBUG_SET_FAILAT,delete global.SYS_DEBUG_SET_FAILAT),global.SYS_DEBUG_REMOVE_FAILAT&&(h.debugRemoveFailAt=global.SYS_DEBUG_REMOVE_FAILAT,delete global.SYS_DEBUG_REMOVE_FAILAT),global.SYS_DEBUG_CLEAR_FAILAT&&(h.debugClearFailAt=global.SYS_DEBUG_CLEAR_FAILAT,delete global.SYS_DEBUG_CLEAR_FAILAT),global.SYS_DEBUG_CAN_USE_FAILAT&&(h.debugCanUseFailAt=global.SYS_DEBUG_CAN_USE_FAILAT,delete global.SYS_DEBUG_CAN_USE_FAILAT),global.SYS_DOWNLOAD&&(h.download=global.SYS_DOWNLOAD,delete global.SYS_DOWNLOAD),global.SYS_EXECUTE&&(h.executeScript=global.SYS_EXECUTE,delete global.SYS_EXECUTE),global.SYS_GET_CURRENT_REQUEST&&(h.getCurrentRequest=global.SYS_GET_CURRENT_REQUEST,delete global.SYS_GET_CURRENT_REQUEST),global.SYS_GET_CURRENT_RESPONSE&&(h.getCurrentResponse=global.SYS_GET_CURRENT_RESPONSE,delete global.SYS_GET_CURRENT_RESPONSE),h.extend=function(a,b){return Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))}),a},global.SYS_LOAD&&(h.load=global.SYS_LOAD,delete global.SYS_LOAD),global.SYS_LOG_LEVEL&&(h.logLevel=global.SYS_LOG_LEVEL,delete global.SYS_LOG_LEVEL),global.SYS_MD5&&(h.md5=global.SYS_MD5,delete global.SYS_MD5),global.SYS_GEN_RANDOM_NUMBERS&&(h.genRandomNumbers=global.SYS_GEN_RANDOM_NUMBERS,delete global.SYS_GEN_RANDOM_NUMBERS),global.SYS_GEN_RANDOM_ALPHA_NUMBERS&&(h.genRandomAlphaNumbers=global.SYS_GEN_RANDOM_ALPHA_NUMBERS,delete global.SYS_GEN_RANDOM_ALPHA_NUMBERS),global.SYS_GEN_RANDOM_SALT&&(h.genRandomSalt=global.SYS_GEN_RANDOM_SALT,delete global.SYS_GEN_RANDOM_SALT),global.SYS_HMAC&&(h.hmac=global.SYS_HMAC,delete global.SYS_HMAC),global.SYS_PBKDF2&&(h.pbkdf2=global.SYS_PBKDF2,delete global.SYS_PBKDF2),global.SYS_CREATE_NONCE&&(h.createNonce=global.SYS_CREATE_NONCE,delete global.SYS_CREATE_NONCE),global.SYS_CHECK_AND_MARK_NONCE&&(h.checkAndMarkNonce=global.SYS_CHECK_AND_MARK_NONCE,delete global.SYS_CHECK_AND_MARK_NONCE),global.SYS_OUTPUT&&(h.stdOutput=global.SYS_OUTPUT,h.output=h.stdOutput,delete global.SYS_OUTPUT),global.SYS_PARSE&&(h.parse=global.SYS_PARSE,delete global.SYS_PARSE),global.SYS_PARSE_FILE&&(h.parseFile=global.SYS_PARSE_FILE,delete global.SYS_PARSE_FILE),global.SYS_PROCESS_STATISTICS&&(h.processStatistics=global.SYS_PROCESS_STATISTICS,delete global.SYS_PROCESS_STATISTICS),global.SYS_RAND&&(h.rand=global.SYS_RAND,delete global.SYS_RAND),global.SYS_SHA512&&(h.sha512=global.SYS_SHA512,delete global.SYS_SHA512),global.SYS_SHA384&&(h.sha384=global.SYS_SHA384,delete global.SYS_SHA384),global.SYS_SHA256&&(h.sha256=global.SYS_SHA256,delete global.SYS_SHA256),global.SYS_SHA224&&(h.sha224=global.SYS_SHA224,delete global.SYS_SHA224),global.SYS_SHA1&&(h.sha1=global.SYS_SHA1,delete global.SYS_SHA1),global.SYS_SERVER_STATISTICS&&(h.serverStatistics=global.SYS_SERVER_STATISTICS,delete global.SYS_SERVER_STATISTICS),global.SYS_SLEEP&&(h.sleep=global.SYS_SLEEP,delete global.SYS_SLEEP),global.SYS_TIME&&(h.time=global.SYS_TIME,delete global.SYS_TIME),global.SYS_WAIT&&(h.wait=global.SYS_WAIT,delete global.SYS_WAIT),global.SYS_IMPORT_CSV_FILE&&(h.importCsvFile=global.SYS_IMPORT_CSV_FILE,delete global.SYS_IMPORT_CSV_FILE),global.SYS_IMPORT_JSON_FILE&&(h.importJsonFile=global.SYS_IMPORT_JSON_FILE,delete global.SYS_IMPORT_JSON_FILE),global.SYS_PROCESS_CSV_FILE&&(h.processCsvFile=global.SYS_PROCESS_CSV_FILE,delete global.SYS_PROCESS_CSV_FILE),global.SYS_PROCESS_JSON_FILE&&(h.processJsonFile=global.SYS_PROCESS_JSON_FILE,delete global.SYS_PROCESS_JSON_FILE),global.SYS_CLIENT_STATISTICS&&(h.clientStatistics=global.SYS_CLIENT_STATISTICS,delete global.SYS_CLIENT_STATISTICS),global.SYS_HTTP_STATISTICS&&(h.httpStatistics=global.SYS_HTTP_STATISTICS,delete global.SYS_HTTP_STATISTICS),global.SYS_EXECUTE_EXTERNAL&&(h.executeExternal=global.SYS_EXECUTE_EXTERNAL,delete global.SYS_EXECUTE_EXTERNAL),global.SYS_EXECUTE_EXTERNAL_AND_WAIT&&(h.executeExternalAndWait=global.SYS_EXECUTE_EXTERNAL_AND_WAIT,delete global.SYS_EXECUTE_EXTERNAL_AND_WAIT),global.SYS_KILL_EXTERNAL&&(h.killExternal=global.SYS_KILL_EXTERNAL,delete global.SYS_KILL_EXTERNAL),global.SYS_STATUS_EXTERNAL&&(h.statusExternal=global.SYS_STATUS_EXTERNAL,delete global.SYS_STATUS_EXTERNAL),global.SYS_REGISTER_TASK&&(h.registerTask=global.SYS_REGISTER_TASK,delete global.SYS_REGISTER_TASK),global.SYS_UNREGISTER_TASK&&(h.unregisterTask=global.SYS_UNREGISTER_TASK,delete global.SYS_UNREGISTER_TASK),global.SYS_GET_TASK&&(h.getTask=global.SYS_GET_TASK,delete global.SYS_GET_TASK),global.SYS_TEST_PORT&&(h.testPort=global.SYS_TEST_PORT,delete global.SYS_TEST_PORT),global.SYS_IS_IP&&(h.isIP=global.SYS_IS_IP,delete global.SYS_IS_IP),h.unitTests=function(){return global.SYS_UNIT_TESTS},h.setUnitTestsResult=function(a){global.SYS_UNIT_TESTS_RESULT=a},h.toArgv=function(a,b){"undefined"==typeof b&&(b=!1);var c=[];for(var d in a)if(a.hasOwnProperty(d))if("commandSwitches"===d){for(var e="",f=0;f1?c.push(a[d][f]):e+=a[d][f];e.length>0&&c.push(e)}else"flatCommands"===d?c=c.concat(a[d]):b?c.push("--"+d+"="+a[d]):(c.push("--"+d),a[d]!==!1?a[d]!==!0?c.push(a[d]):c.push("true"):c.push("false"));return c},h.parseArgv=function(a,b){function c(b,d,e){if(d.indexOf(":")>0){var f=d.indexOf(":"),h=d.slice(0,f);b.hasOwnProperty(h)||(b[h]={}),c(b[h],d.slice(f+1,d.length),e)}else"true"===a[g+1]?b[d]=!0:"false"===a[g+1]?b[d]=!1:isNaN(a[g+1])?b[d]=a[g+1]:b[d]=parseInt(a[g+1])}function d(a,b){a.hasOwnProperty("commandSwitches")||(a.commandSwitches=[]),a.commandSwitches.push(b)}function e(a,b){for(var c=0;c2&&"--"===j.slice(0,2)){var k=j.slice(2,j.length);a.length>g&&"-"!==a[g+1].slice(0,1)?(c(i,k,a[g+1]),g++):d(i,k)}else"--"===j?h=!0:j.length>1&&"-"===j.slice(0,1)?e(i,j.slice(1,j.length)):f(i,j)}return i},h.COLORS={},global.COLORS?(h.COLORS=global.COLORS,delete global.COLORS):["COLOR_RED","COLOR_BOLD_RED","COLOR_GREEN","COLOR_BOLD_GREEN","COLOR_BLUE","COLOR_BOLD_BLUE","COLOR_YELLOW","COLOR_BOLD_YELLOW","COLOR_WHITE","COLOR_BOLD_WHITE","COLOR_CYAN","COLOR_BOLD_CYAN","COLOR_MAGENTA","COLOR_BOLD_MAGENTA","COLOR_BLACK","COLOR_BOLD_BLACK","COLOR_BLINK","COLOR_BRIGHT","COLOR_RESET"].forEach(function(a){h.COLORS[a]=""}),h.COLORS.COLOR_PUNCTUATION=h.COLORS.COLOR_RESET,h.COLORS.COLOR_STRING=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_NUMBER=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_INDEX=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_TRUE=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_FALSE=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_NULL=h.COLORS.COLOR_BRIGHT,h.COLORS.COLOR_UNDEFINED=h.COLORS.COLOR_BRIGHT;var i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},j=h.COLORS,k=!1;global.COLOR_OUTPUT&&(k=global.COLOR_OUTPUT,delete global.COLOR_OUTPUT);var l=!1;global.PRETTY_PRINT&&(l=global.PRETTY_PRINT,delete global.PRETTY_PRINT);var m,n=/[\\\"\x00-\x1f]/g,o=/function ([^\(]*)?\(\) \{ \[native code\] \}/,p=/function ([^\(]*)?\((.*)\) \{/;h.printRecursive=m=function(a,c){var f=c.useColor,g=c.customInspect,i=c.useToString,k=c.limitString,l=c.showFunction;"undefined"==typeof c.seen&&(c.seen=[],c.names=[]);var m=c.seen.indexOf(a);if(m>=0)c.output+=c.names[m];else if(a&&(a instanceof Object||"object"==typeof a&&null===Object.getPrototypeOf(a)))if(c.seen.push(a),c.names.push(c.path),g&&"function"==typeof a._PRINT)a._PRINT(c),c.emit&&c.output.length>=c.emit&&(h.output(c.output),c.output="");else if(a instanceof Array)d(a,c);else if(a.toString===Object.prototype.toString||"object"==typeof a&&null===Object.getPrototypeOf(a)){var n=!1;try{(a instanceof Set||a instanceof Map||a instanceof WeakSet||a instanceof WeakMap||"function"==typeof a[Symbol.iterator])&&(c.output+=a.toString(),n=!0)}catch(q){}n||e(a,c),c.emit&&c.output.length>=c.emit&&(h.output(c.output),c.output="")}else if("function"==typeof a)try{var r=a.toString();if(c.level>0&&!l){var s=r.split("\n"),t=s[0],u=o.exec(t);null!==u?void 0===u[1]?c.output+="function { [native code] }":c.output+="function "+u[1]+" { [native code] }":(u=p.exec(t),null!==u?void 0===u[1]?c.output+="function ("+u[2]+") { ... }":c.output+="function "+u[1]+" ("+u[2]+") { ... }":(t=t.substr(8,t.length-10).trim(),c.output+='[Function "'+t+'" ...]'))}else c.output+=r}catch(v){h.stdOutput(String(v)),c.output+="[Function]"}else if(i&&"function"==typeof a.toString)try{c.output+=a.toString()}catch(w){c.output+="[Object ",e(a,c),c.output+="]"}else c.output+="[Object ",e(a,c),c.output+="]";else void 0===a?(f&&(c.output+=j.COLOR_UNDEFINED),c.output+="undefined",f&&(c.output+=j.COLOR_RESET)):"string"==typeof a?(f&&(c.output+=j.COLOR_STRING),k&&k0&&a(" "),"string"==typeof arguments[c])a(arguments[c]);else{var d={names:[],seen:[],path:"~",level:0,output:"",prettyPrint:!1,useColor:!1,customInspect:!0};b(arguments[c],d),a(d.output)}a("\n")},global.start_pretty_print=function(){require("internal").startPrettyPrint()},global.stop_pretty_print=function(){require("internal").stopPrettyPrint()},global.start_color_print=function(a){require("internal").startColorPrint(a,!1)},global.stop_color_print=function(){require("internal").stopColorPrint()},global.EXPORTS_SLOW_BUFFER&&(Object.keys(global.EXPORTS_SLOW_BUFFER).forEach(function(a){h[a]=global.EXPORTS_SLOW_BUFFER[a]}),delete global.EXPORTS_SLOW_BUFFER),global.APP_PATH&&(h.appPath=global.APP_PATH,delete global.APP_PATH),h}()),function(){"use strict";var a=require("internal");a.errors={ERROR_NO_ERROR:{code:0,message:"no error"},ERROR_FAILED:{code:1,message:"failed"},ERROR_SYS_ERROR:{code:2,message:"system error"},ERROR_OUT_OF_MEMORY:{code:3,message:"out of memory"},ERROR_INTERNAL:{code:4,message:"internal error"},ERROR_ILLEGAL_NUMBER:{code:5,message:"illegal number"},ERROR_NUMERIC_OVERFLOW:{code:6,message:"numeric overflow"},ERROR_ILLEGAL_OPTION:{code:7,message:"illegal option"},ERROR_DEAD_PID:{code:8,message:"dead process identifier"},ERROR_NOT_IMPLEMENTED:{code:9,message:"not implemented"},ERROR_BAD_PARAMETER:{code:10,message:"bad parameter"},ERROR_FORBIDDEN:{code:11,message:"forbidden"},ERROR_OUT_OF_MEMORY_MMAP:{code:12,message:"out of memory in mmap"},ERROR_CORRUPTED_CSV:{code:13,message:"csv is corrupt"},ERROR_FILE_NOT_FOUND:{code:14,message:"file not found"},ERROR_CANNOT_WRITE_FILE:{code:15,message:"cannot write file"},ERROR_CANNOT_OVERWRITE_FILE:{code:16,message:"cannot overwrite file"},ERROR_TYPE_ERROR:{code:17,message:"type error"},ERROR_LOCK_TIMEOUT:{code:18,message:"lock timeout"},ERROR_CANNOT_CREATE_DIRECTORY:{code:19,message:"cannot create directory"},ERROR_CANNOT_CREATE_TEMP_FILE:{code:20,message:"cannot create temporary file"},ERROR_REQUEST_CANCELED:{code:21,message:"canceled request"},ERROR_DEBUG:{code:22,message:"intentional debug error"},ERROR_AID_NOT_FOUND:{code:23,message:"internal error with attribute ID in shaper"},ERROR_LEGEND_INCOMPLETE:{code:24,message:"internal error if a legend could not be created"},ERROR_IP_ADDRESS_INVALID:{code:25,message:"IP address is invalid"},ERROR_LEGEND_NOT_IN_WAL_FILE:{code:26,message:"internal error if a legend for a marker does not yet exist in the same WAL file"},ERROR_FILE_EXISTS:{code:27,message:"file exists"},ERROR_LOCKED:{code:28,message:"locked"},ERROR_DEADLOCK:{code:29,message:"deadlock detected"},ERROR_HTTP_BAD_PARAMETER:{code:400,message:"bad parameter"},ERROR_HTTP_UNAUTHORIZED:{code:401,message:"unauthorized"},ERROR_HTTP_FORBIDDEN:{code:403,message:"forbidden"},ERROR_HTTP_NOT_FOUND:{code:404,message:"not found"},ERROR_HTTP_METHOD_NOT_ALLOWED:{code:405,message:"method not supported"},ERROR_HTTP_PRECONDITION_FAILED:{code:412,message:"precondition failed"},ERROR_HTTP_SERVER_ERROR:{code:500,message:"internal server error"},ERROR_HTTP_CORRUPTED_JSON:{code:600,message:"invalid JSON object"},ERROR_HTTP_SUPERFLUOUS_SUFFICES:{code:601,message:"superfluous URL suffices"},ERROR_ARANGO_ILLEGAL_STATE:{code:1e3, message:"illegal state"},ERROR_ARANGO_SHAPER_FAILED:{code:1001,message:"could not shape document"},ERROR_ARANGO_DATAFILE_SEALED:{code:1002,message:"datafile sealed"},ERROR_ARANGO_UNKNOWN_COLLECTION_TYPE:{code:1003,message:"unknown type"},ERROR_ARANGO_READ_ONLY:{code:1004,message:"read only"},ERROR_ARANGO_DUPLICATE_IDENTIFIER:{code:1005,message:"duplicate identifier"},ERROR_ARANGO_DATAFILE_UNREADABLE:{code:1006,message:"datafile unreadable"},ERROR_ARANGO_DATAFILE_EMPTY:{code:1007,message:"datafile empty"},ERROR_ARANGO_RECOVERY:{code:1008,message:"logfile recovery error"},ERROR_ARANGO_CORRUPTED_DATAFILE:{code:1100,message:"corrupted datafile"},ERROR_ARANGO_ILLEGAL_PARAMETER_FILE:{code:1101,message:"illegal or unreadable parameter file"},ERROR_ARANGO_CORRUPTED_COLLECTION:{code:1102,message:"corrupted collection"},ERROR_ARANGO_MMAP_FAILED:{code:1103,message:"mmap failed"},ERROR_ARANGO_FILESYSTEM_FULL:{code:1104,message:"filesystem full"},ERROR_ARANGO_NO_JOURNAL:{code:1105,message:"no journal"},ERROR_ARANGO_DATAFILE_ALREADY_EXISTS:{code:1106,message:"cannot create/rename datafile because it already exists"},ERROR_ARANGO_DATADIR_LOCKED:{code:1107,message:"database directory is locked"},ERROR_ARANGO_COLLECTION_DIRECTORY_ALREADY_EXISTS:{code:1108,message:"cannot create/rename collection because directory already exists"},ERROR_ARANGO_MSYNC_FAILED:{code:1109,message:"msync failed"},ERROR_ARANGO_DATADIR_UNLOCKABLE:{code:1110,message:"cannot lock database directory"},ERROR_ARANGO_SYNC_TIMEOUT:{code:1111,message:"sync timeout"},ERROR_ARANGO_CONFLICT:{code:1200,message:"conflict"},ERROR_ARANGO_DATADIR_INVALID:{code:1201,message:"invalid database directory"},ERROR_ARANGO_DOCUMENT_NOT_FOUND:{code:1202,message:"document not found"},ERROR_ARANGO_COLLECTION_NOT_FOUND:{code:1203,message:"collection not found"},ERROR_ARANGO_COLLECTION_PARAMETER_MISSING:{code:1204,message:"parameter 'collection' not found"},ERROR_ARANGO_DOCUMENT_HANDLE_BAD:{code:1205,message:"illegal document handle"},ERROR_ARANGO_MAXIMAL_SIZE_TOO_SMALL:{code:1206,message:"maximal size of journal too small"},ERROR_ARANGO_DUPLICATE_NAME:{code:1207,message:"duplicate name"},ERROR_ARANGO_ILLEGAL_NAME:{code:1208,message:"illegal name"},ERROR_ARANGO_NO_INDEX:{code:1209,message:"no suitable index known"},ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED:{code:1210,message:"unique constraint violated"},ERROR_ARANGO_INDEX_NOT_FOUND:{code:1212,message:"index not found"},ERROR_ARANGO_CROSS_COLLECTION_REQUEST:{code:1213,message:"cross collection request not allowed"},ERROR_ARANGO_INDEX_HANDLE_BAD:{code:1214,message:"illegal index handle"},ERROR_ARANGO_CAP_CONSTRAINT_ALREADY_DEFINED:{code:1215,message:"cap constraint already defined"},ERROR_ARANGO_DOCUMENT_TOO_LARGE:{code:1216,message:"document too large"},ERROR_ARANGO_COLLECTION_NOT_UNLOADED:{code:1217,message:"collection must be unloaded"},ERROR_ARANGO_COLLECTION_TYPE_INVALID:{code:1218,message:"collection type invalid"},ERROR_ARANGO_VALIDATION_FAILED:{code:1219,message:"validator failed"},ERROR_ARANGO_ATTRIBUTE_PARSER_FAILED:{code:1220,message:"parsing attribute name definition failed"},ERROR_ARANGO_DOCUMENT_KEY_BAD:{code:1221,message:"illegal document key"},ERROR_ARANGO_DOCUMENT_KEY_UNEXPECTED:{code:1222,message:"unexpected document key"},ERROR_ARANGO_DATADIR_NOT_WRITABLE:{code:1224,message:"server database directory not writable"},ERROR_ARANGO_OUT_OF_KEYS:{code:1225,message:"out of keys"},ERROR_ARANGO_DOCUMENT_KEY_MISSING:{code:1226,message:"missing document key"},ERROR_ARANGO_DOCUMENT_TYPE_INVALID:{code:1227,message:"invalid document type"},ERROR_ARANGO_DATABASE_NOT_FOUND:{code:1228,message:"database not found"},ERROR_ARANGO_DATABASE_NAME_INVALID:{code:1229,message:"database name invalid"},ERROR_ARANGO_USE_SYSTEM_DATABASE:{code:1230,message:"operation only allowed in system database"},ERROR_ARANGO_ENDPOINT_NOT_FOUND:{code:1231,message:"endpoint not found"},ERROR_ARANGO_INVALID_KEY_GENERATOR:{code:1232,message:"invalid key generator"},ERROR_ARANGO_INVALID_EDGE_ATTRIBUTE:{code:1233,message:"edge attribute missing"},ERROR_ARANGO_INDEX_DOCUMENT_ATTRIBUTE_MISSING:{code:1234,message:"index insertion warning - attribute missing in document"},ERROR_ARANGO_INDEX_CREATION_FAILED:{code:1235,message:"index creation failed"},ERROR_ARANGO_WRITE_THROTTLE_TIMEOUT:{code:1236,message:"write-throttling timeout"},ERROR_ARANGO_COLLECTION_TYPE_MISMATCH:{code:1237,message:"collection type mismatch"},ERROR_ARANGO_COLLECTION_NOT_LOADED:{code:1238,message:"collection not loaded"},ERROR_ARANGO_DATAFILE_FULL:{code:1300,message:"datafile full"},ERROR_ARANGO_EMPTY_DATADIR:{code:1301,message:"server database directory is empty"},ERROR_REPLICATION_NO_RESPONSE:{code:1400,message:"no response"},ERROR_REPLICATION_INVALID_RESPONSE:{code:1401,message:"invalid response"},ERROR_REPLICATION_MASTER_ERROR:{code:1402,message:"master error"},ERROR_REPLICATION_MASTER_INCOMPATIBLE:{code:1403,message:"master incompatible"},ERROR_REPLICATION_MASTER_CHANGE:{code:1404,message:"master change"},ERROR_REPLICATION_LOOP:{code:1405,message:"loop detected"},ERROR_REPLICATION_UNEXPECTED_MARKER:{code:1406,message:"unexpected marker"},ERROR_REPLICATION_INVALID_APPLIER_STATE:{code:1407,message:"invalid applier state"},ERROR_REPLICATION_UNEXPECTED_TRANSACTION:{code:1408,message:"invalid transaction"},ERROR_REPLICATION_INVALID_APPLIER_CONFIGURATION:{code:1410,message:"invalid replication applier configuration"},ERROR_REPLICATION_RUNNING:{code:1411,message:"cannot perform operation while applier is running"},ERROR_REPLICATION_APPLIER_STOPPED:{code:1412,message:"replication stopped"},ERROR_REPLICATION_NO_START_TICK:{code:1413,message:"no start tick"},ERROR_REPLICATION_START_TICK_NOT_PRESENT:{code:1414,message:"start tick not present"},ERROR_CLUSTER_NO_AGENCY:{code:1450,message:"could not connect to agency"},ERROR_CLUSTER_NO_COORDINATOR_HEADER:{code:1451,message:"missing coordinator header"},ERROR_CLUSTER_COULD_NOT_LOCK_PLAN:{code:1452,message:"could not lock plan in agency"},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_READ_CURRENT_VERSION:{code:1455,message:"could not read version in current in agency"},ERROR_CLUSTER_COULD_NOT_CREATE_COLLECTION:{code:1456,message:"could not create collection"},ERROR_CLUSTER_TIMEOUT:{code:1457,message:"timeout in cluster operation"},ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_PLAN:{code:1458,message:"could not remove collection from plan"},ERROR_CLUSTER_COULD_NOT_REMOVE_COLLECTION_IN_CURRENT:{code:1459,message:"could not remove collection from current"},ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE_IN_PLAN:{code:1460,message:"could not create database in plan"},ERROR_CLUSTER_COULD_NOT_CREATE_DATABASE:{code:1461,message:"could not create database"},ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_PLAN:{code:1462,message:"could not remove database from plan"},ERROR_CLUSTER_COULD_NOT_REMOVE_DATABASE_IN_CURRENT:{code:1463,message:"could not remove database from current"},ERROR_CLUSTER_SHARD_GONE:{code:1464,message:"no responsible shard found"},ERROR_CLUSTER_CONNECTION_LOST:{code:1465,message:"cluster internal HTTP connection broken"},ERROR_CLUSTER_MUST_NOT_SPECIFY_KEY:{code:1466,message:"must not specify _key for this collection"},ERROR_CLUSTER_GOT_CONTRADICTING_ANSWERS:{code:1467,message:"got contradicting answers from different shards"},ERROR_CLUSTER_NOT_ALL_SHARDING_ATTRIBUTES_GIVEN:{code:1468,message:"not all sharding attributes given"},ERROR_CLUSTER_MUST_NOT_CHANGE_SHARDING_ATTRIBUTES:{code:1469,message:"must not change the value of a shard key attribute"},ERROR_CLUSTER_UNSUPPORTED:{code:1470,message:"unsupported operation or parameter"},ERROR_CLUSTER_ONLY_ON_COORDINATOR:{code:1471,message:"this operation is only valid on a coordinator in a cluster"},ERROR_CLUSTER_READING_PLAN_AGENCY:{code:1472,message:"error reading Plan in agency"},ERROR_CLUSTER_COULD_NOT_TRUNCATE_COLLECTION:{code:1473,message:"could not truncate collection"},ERROR_CLUSTER_AQL_COMMUNICATION:{code:1474,message:"error in cluster internal communication for AQL"},ERROR_ARANGO_DOCUMENT_NOT_FOUND_OR_SHARDING_ATTRIBUTES_CHANGED:{code:1475,message:"document not found or sharding attributes changed"},ERROR_CLUSTER_COULD_NOT_DETERMINE_ID:{code:1476,message:"could not determine my ID from my local info"},ERROR_CLUSTER_ONLY_ON_DBSERVER:{code:1477,message:"this operation is only valid on a DBserver in a cluster"},ERROR_QUERY_KILLED:{code:1500,message:"query killed"},ERROR_QUERY_PARSE:{code:1501,message:"%s"},ERROR_QUERY_EMPTY:{code:1502,message:"query is empty"},ERROR_QUERY_SCRIPT:{code:1503,message:"runtime error '%s'"},ERROR_QUERY_NUMBER_OUT_OF_RANGE:{code:1504,message:"number out of range"},ERROR_QUERY_VARIABLE_NAME_INVALID:{code:1510,message:"variable name '%s' has an invalid format"},ERROR_QUERY_VARIABLE_REDECLARED:{code:1511,message:"variable '%s' is assigned multiple times"},ERROR_QUERY_VARIABLE_NAME_UNKNOWN:{code:1512,message:"unknown variable '%s'"},ERROR_QUERY_COLLECTION_LOCK_FAILED:{code:1521,message:"unable to read-lock collection %s"},ERROR_QUERY_TOO_MANY_COLLECTIONS:{code:1522,message:"too many collections"},ERROR_QUERY_DOCUMENT_ATTRIBUTE_REDECLARED:{code:1530,message:"document attribute '%s' is assigned multiple times"},ERROR_QUERY_FUNCTION_NAME_UNKNOWN:{code:1540,message:"usage of unknown function '%s()'"},ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH:{code:1541,message:"invalid number of arguments for function '%s()', expected number of arguments: minimum: %d, maximum: %d"},ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH:{code:1542,message:"invalid argument type in call to function '%s()'"},ERROR_QUERY_INVALID_REGEX:{code:1543,message:"invalid regex value"},ERROR_QUERY_BIND_PARAMETERS_INVALID:{code:1550,message:"invalid structure of bind parameters"},ERROR_QUERY_BIND_PARAMETER_MISSING:{code:1551,message:"no value specified for declared bind parameter '%s'"},ERROR_QUERY_BIND_PARAMETER_UNDECLARED:{code:1552,message:"bind parameter '%s' was not declared in the query"},ERROR_QUERY_BIND_PARAMETER_TYPE:{code:1553,message:"bind parameter '%s' has an invalid value or type"},ERROR_QUERY_INVALID_LOGICAL_VALUE:{code:1560,message:"invalid logical value"},ERROR_QUERY_INVALID_ARITHMETIC_VALUE:{code:1561,message:"invalid arithmetic value"},ERROR_QUERY_DIVISION_BY_ZERO:{code:1562,message:"division by zero"},ERROR_QUERY_ARRAY_EXPECTED:{code:1563,message:"array expected"},ERROR_QUERY_FAIL_CALLED:{code:1569,message:"FAIL(%s) called"},ERROR_QUERY_GEO_INDEX_MISSING:{code:1570,message:"no suitable geo index found for geo restriction on '%s'"},ERROR_QUERY_FULLTEXT_INDEX_MISSING:{code:1571,message:"no suitable fulltext index found for fulltext query on '%s'"},ERROR_QUERY_INVALID_DATE_VALUE:{code:1572,message:"invalid date value"},ERROR_QUERY_MULTI_MODIFY:{code:1573,message:"multi-modify query"},ERROR_QUERY_INVALID_AGGREGATE_EXPRESSION:{code:1574,message:"invalid aggregate expression"},ERROR_QUERY_COMPILE_TIME_OPTIONS:{code:1575,message:"query options must be readable at query compile time"},ERROR_QUERY_EXCEPTION_OPTIONS:{code:1576,message:"query options expected"},ERROR_QUERY_COLLECTION_USED_IN_EXPRESSION:{code:1577,message:"collection '%s' used as expression operand"},ERROR_QUERY_DISALLOWED_DYNAMIC_CALL:{code:1578,message:"disallowed dynamic call to '%s'"},ERROR_QUERY_ACCESS_AFTER_MODIFICATION:{code:1579,message:"access after data-modification"},ERROR_QUERY_FUNCTION_INVALID_NAME:{code:1580,message:"invalid user function name"},ERROR_QUERY_FUNCTION_INVALID_CODE:{code:1581,message:"invalid user function code"},ERROR_QUERY_FUNCTION_NOT_FOUND:{code:1582,message:"user function '%s()' not found"},ERROR_QUERY_FUNCTION_RUNTIME_ERROR:{code:1583,message:"user function runtime error: %s"},ERROR_QUERY_BAD_JSON_PLAN:{code:1590,message:"bad execution plan JSON"},ERROR_QUERY_NOT_FOUND:{code:1591,message:"query ID not found"},ERROR_QUERY_IN_USE:{code:1592,message:"query with this ID is in use"},ERROR_CURSOR_NOT_FOUND:{code:1600,message:"cursor not found"},ERROR_CURSOR_BUSY:{code:1601,message:"cursor is busy"},ERROR_TRANSACTION_INTERNAL:{code:1650,message:"internal transaction error"},ERROR_TRANSACTION_NESTED:{code:1651,message:"nested transactions detected"},ERROR_TRANSACTION_UNREGISTERED_COLLECTION:{code:1652,message:"unregistered collection used in transaction"},ERROR_TRANSACTION_DISALLOWED_OPERATION:{code:1653,message:"disallowed operation inside transaction"},ERROR_TRANSACTION_ABORTED:{code:1654,message:"transaction aborted"},ERROR_USER_INVALID_NAME:{code:1700,message:"invalid user name"},ERROR_USER_INVALID_PASSWORD:{code:1701,message:"invalid password"},ERROR_USER_DUPLICATE:{code:1702,message:"duplicate user"},ERROR_USER_NOT_FOUND:{code:1703,message:"user not found"},ERROR_USER_CHANGE_PASSWORD:{code:1704,message:"user must change his password"},ERROR_APPLICATION_INVALID_NAME:{code:1750,message:"invalid application name"},ERROR_APPLICATION_INVALID_MOUNT:{code:1751,message:"invalid mount"},ERROR_APPLICATION_DOWNLOAD_FAILED:{code:1752,message:"application download failed"},ERROR_APPLICATION_UPLOAD_FAILED:{code:1753,message:"application upload failed"},ERROR_KEYVALUE_INVALID_KEY:{code:1800,message:"invalid key declaration"},ERROR_KEYVALUE_KEY_EXISTS:{code:1801,message:"key already exists"},ERROR_KEYVALUE_KEY_NOT_FOUND:{code:1802,message:"key not found"},ERROR_KEYVALUE_KEY_NOT_UNIQUE:{code:1803,message:"key is not unique"},ERROR_KEYVALUE_KEY_NOT_CHANGED:{code:1804,message:"key value not changed"},ERROR_KEYVALUE_KEY_NOT_REMOVED:{code:1805,message:"key value not removed"},ERROR_KEYVALUE_NO_VALUE:{code:1806,message:"missing value"},ERROR_TASK_INVALID_ID:{code:1850,message:"invalid task id"},ERROR_TASK_DUPLICATE_ID:{code:1851,message:"duplicate task id"},ERROR_TASK_NOT_FOUND:{code:1852,message:"task not found"},ERROR_GRAPH_INVALID_GRAPH:{code:1901,message:"invalid graph"},ERROR_GRAPH_COULD_NOT_CREATE_GRAPH:{code:1902,message:"could not create graph"},ERROR_GRAPH_INVALID_VERTEX:{code:1903,message:"invalid vertex"},ERROR_GRAPH_COULD_NOT_CREATE_VERTEX:{code:1904,message:"could not create vertex"},ERROR_GRAPH_COULD_NOT_CHANGE_VERTEX:{code:1905,message:"could not change vertex"},ERROR_GRAPH_INVALID_EDGE:{code:1906,message:"invalid edge"},ERROR_GRAPH_COULD_NOT_CREATE_EDGE:{code:1907,message:"could not create edge"},ERROR_GRAPH_COULD_NOT_CHANGE_EDGE:{code:1908,message:"could not change edge"},ERROR_GRAPH_TOO_MANY_ITERATIONS:{code:1909,message:"too many iterations - try increasing the value of 'maxIterations'"},ERROR_GRAPH_INVALID_FILTER_RESULT:{code:1910,message:"invalid filter result"},ERROR_GRAPH_COLLECTION_MULTI_USE:{code:1920,message:"multi use of edge collection in edge def"},ERROR_GRAPH_COLLECTION_USE_IN_MULTI_GRAPHS:{code:1921,message:"edge collection already used in edge def"},ERROR_GRAPH_CREATE_MISSING_NAME:{code:1922,message:"missing graph name"},ERROR_GRAPH_CREATE_MALFORMED_EDGE_DEFINITION:{code:1923,message:"malformed edge definition"},ERROR_GRAPH_NOT_FOUND:{code:1924,message:"graph not found"},ERROR_GRAPH_DUPLICATE:{code:1925,message:"graph already exists"},ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST:{code:1926,message:"vertex collection does not exist or is not part of the graph"},ERROR_GRAPH_WRONG_COLLECTION_TYPE_VERTEX:{code:1927,message:"not a vertex collection"},ERROR_GRAPH_NOT_IN_ORPHAN_COLLECTION:{code:1928,message:"not in orphan collection"},ERROR_GRAPH_COLLECTION_USED_IN_EDGE_DEF:{code:1929,message:"collection already used in edge def"},ERROR_GRAPH_EDGE_COLLECTION_NOT_USED:{code:1930,message:"edge collection not used in graph"},ERROR_GRAPH_NOT_AN_ARANGO_COLLECTION:{code:1931,message:" is not an ArangoCollection"},ERROR_GRAPH_NO_GRAPH_COLLECTION:{code:1932,message:"collection _graphs does not exist"},ERROR_GRAPH_INVALID_EXAMPLE_ARRAY_OBJECT_STRING:{code:1933,message:"Invalid example type. Has to be String, Array or Object"},ERROR_GRAPH_INVALID_EXAMPLE_ARRAY_OBJECT:{code:1934,message:"Invalid example type. Has to be Array or Object"},ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS:{code:1935,message:"Invalid number of arguments. Expected: "},ERROR_GRAPH_INVALID_PARAMETER:{code:1936,message:"Invalid parameter type."},ERROR_GRAPH_INVALID_ID:{code:1937,message:"Invalid id"},ERROR_GRAPH_COLLECTION_USED_IN_ORPHANS:{code:1938,message:"collection used in orphans"},ERROR_GRAPH_EDGE_COL_DOES_NOT_EXIST:{code:1939,message:"edge collection does not exist or is not part of the graph"},ERROR_GRAPH_EMPTY:{code:1940,message:"empty graph"},ERROR_SESSION_UNKNOWN:{code:1950,message:"unknown session"},ERROR_SESSION_EXPIRED:{code:1951,message:"session expired"},SIMPLE_CLIENT_UNKNOWN_ERROR:{code:2e3,message:"unknown client error"},SIMPLE_CLIENT_COULD_NOT_CONNECT:{code:2001,message:"could not connect to server"},SIMPLE_CLIENT_COULD_NOT_WRITE:{code:2002,message:"could not write to server"},SIMPLE_CLIENT_COULD_NOT_READ:{code:2003,message:"could not read from server"},ERROR_MALFORMED_MANIFEST_FILE:{code:3e3,message:"malformed manifest file"},ERROR_INVALID_APPLICATION_MANIFEST:{code:3001,message:"manifest file is invalid"},ERROR_INVALID_FOXX_OPTIONS:{code:3004,message:"invalid foxx options"},ERROR_INVALID_MOUNTPOINT:{code:3007,message:"mountpoint is invalid"},ERROR_APP_NOT_FOUND:{code:3009,message:"App not found"},ERROR_APP_NEEDS_CONFIGURATION:{code:3010,message:"App not configured"},ERROR_MODULE_NOT_FOUND:{code:3100,message:"cannot locate module"},ERROR_MODULE_FAILURE:{code:3103,message:"failed to invoke module"},RESULT_ELEMENT_EXISTS:{code:1e4,message:"element not inserted into structure, because it already exists"},RESULT_ELEMENT_NOT_FOUND:{code:10001,message:"element not found in structure"},ERROR_QUEUE_ALREADY_EXISTS:{code:21e3,message:"named queue already exists"},ERROR_DISPATCHER_IS_STOPPING:{code:21001,message:"dispatcher stopped"},ERROR_QUEUE_UNKNOWN:{code:21002,message:"named queue does not exist"},ERROR_QUEUE_FULL:{code:21003,message:"named queue is full"}}}(),global.DEFINE_MODULE("console",function(){"use strict";function a(a,b){j(a,h+b)}function b(a){var b=require("internal").ShapedJson,c=[];a.length>0&&"string"!=typeof a[0]&&c.push("%s");for(var d=0;d curl ","POST"===e?(i=a.arango.POST_RAW(f,g,h),j+="-X "+e+" "):"PUT"===e?(i=a.arango.PUT_RAW(f,g,h),j+="-X "+e+" "):"GET"===e?i=a.arango.GET_RAW(f,h):"DELETE"===e?(i=a.arango.DELETE_RAW(f,h),j+="-X "+e+" "):"PATCH"===e?(i=a.arango.PATCH_RAW(f,g,h),j+="-X "+e+" "):"HEAD"===e?(i=a.arango.HEAD_RAW(f,h),j+="-X "+e+" "):"OPTION"===e&&(i=a.arango.OPTION_RAW(f,g,h),j+="-X "+e+" "),void 0!==h&&""!==h)for(k in h)h.hasOwnProperty(k)&&(j+="--header '"+k+": "+h[k]+"' ");return void 0!==g&&""!==g&&(j+="--data-binary @- "),j+="--dump - http://localhost:8529"+f,b(j),void 0!==g&&""!==g&&g&&(d(" <<EOF\n"),l?c(g):d(g),d("\nEOF")),d("\n\n"),i}},a.appendRawResponse=function(b,c){return function(d){var e,f=d.headers;b("HTTP/1.1 "+f["http/1.1"]+"\n");for(e in f)f.hasOwnProperty(e)&&"http/1.1"!==e&&"server"!==e&&"connection"!==e&&"content-length"!==e&&b(e+": "+f[e]+"\n");b("\n"),void 0!==d.body&&(c(a.inspect(d.body)),b("\n"))}},a.appendJsonResponse=function(b,c){return function(b){var d=a.appendRawResponse(c,c),e=b.body;b.body=JSON.parse(b.body),d(b),b.body=e}},a.log=function(b,c){a.output(b,": ",c,"\n")};try{"undefined"!=typeof window&&(a.sprintf=function(a){var b=arguments.length;if(0===b)return"";if(1>=b)return String(a);var c,d=[];for(c=1;c col = db.mycoll; \n > col = db._create("mycoll"); \n \nAdministration Functions: \n name() collection name \n status() status of the collection \n type() type of the collection \n truncate() delete all documents \n properties() show collection properties \n drop() delete a collection \n load() load a collection \n unload() unload a collection \n rename() renames a collection \n getIndexes() return defined indexes \n refresh() refreshes the status and name \n _help() this help \n \nDocument Functions: \n count() return number of documents \n save() create document and return handle \n document() get document by handle (_id or _key)\n replace(, , ) overwrite document \n update(, , , partially update document \n ) \n remove() delete document \n exists() checks whether a document exists \n first() first inserted/updated document \n last() last inserted/updated document \n \nAttributes: \n _database database object \n _id collection identifier ';d.prototype._help=function(){e.print(h)},d.prototype.name=function(){return null===this._name&&this.refresh(),this._name},d.prototype.status=function(){var a;return null===this._status&&this.refresh(),a=this._status,this._status===d.STATUS_UNLOADING&&(this._status=null),a},d.prototype.type=function(){return null===this._type&&this.refresh(),this._type},d.prototype.properties=function(a){var b,c,d={doCompact:!0,journalSize:!0,isSystem:!1,isVolatile:!1,waitForSync:!0,shardKeys:!1,numberOfShards:!1,keyOptions:!1,indexBuckets:!0};if(void 0===a)c=this._database._connection.GET(this._baseurl("properties")),f.checkRequestResult(c);else{var e={};for(b in d)d.hasOwnProperty(b)&&d[b]&&a.hasOwnProperty(b)&&(e[b]=a[b]);c=this._database._connection.PUT(this._baseurl("properties"),JSON.stringify(e)),f.checkRequestResult(c)}var g={};for(b in d)d.hasOwnProperty(b)&&c.hasOwnProperty(b)&&void 0!==c[b]&&(g[b]=c[b]);return g},d.prototype.rotate=function(){var a=this._database._connection.PUT(this._baseurl("rotate"),"");return f.checkRequestResult(a),a.result},d.prototype.figures=function(){var a=this._database._connection.GET(this._baseurl("figures"));return f.checkRequestResult(a),a.figures},d.prototype.checksum=function(a,b){var c="";a&&(c+="?withRevisions=true"),b&&(c+=(""===c?"?":"&")+"withData=true");var d=this._database._connection.GET(this._baseurl("checksum")+c);return f.checkRequestResult(d),{checksum:d.checksum,revision:d.revision}},d.prototype.revision=function(){var a=this._database._connection.GET(this._baseurl("revision"));return f.checkRequestResult(a),a.revision},d.prototype.drop=function(){var a=this._database._connection.DELETE(this._baseurl());null!==a&&a.error===!0&&a.errorNum!==e.errors.ERROR_ARANGO_COLLECTION_NOT_FOUND.code&&f.checkRequestResult(a),this._status=d.STATUS_DELETED;var b,c=this._database;for(b in c)if(c.hasOwnProperty(b)){var g=c[b];g instanceof d&&g.name()===this.name()&&delete c[b]}},d.prototype.truncate=function(){var a=this._database._connection.PUT(this._baseurl("truncate"),"");f.checkRequestResult(a),this._status=null},d.prototype.load=function(a){var b={count:!0};void 0!==a&&(b.count=a);var c=this._database._connection.PUT(this._baseurl("load"),JSON.stringify(b));f.checkRequestResult(c),this._status=null},d.prototype.unload=function(){var a=this._database._connection.PUT(this._baseurl("unload"),"");f.checkRequestResult(a),this._status=null},d.prototype.rename=function(a){var b={name:a},c=this._database._connection.PUT(this._baseurl("rename"),JSON.stringify(b));f.checkRequestResult(c),delete this._database[this._name],this._database[a]=this,this._status=null,this._name=null},d.prototype.refresh=function(){var a=this._database._connection.GET(this._database._collectionurl(this._id)+"?useId=true"); f.checkRequestResult(a),this._name=a.name,this._status=a.status,this._type=a.type},d.prototype.getIndexes=function(a){var b=this._database._connection.GET(this._indexurl()+"&withStats="+(a||!1));return f.checkRequestResult(b),b.indexes},d.prototype.index=function(a){a.hasOwnProperty("id")&&(a=a.id);var b=this._database._connection.GET(this._database._indexurl(a,this.name()));return f.checkRequestResult(b),b},d.prototype.dropIndex=function(a){a.hasOwnProperty("id")&&(a=a.id);var b=this._database._connection.DELETE(this._database._indexurl(a,this.name()));return null!==b&&b.error===!0&&b.errorNum===e.errors.ERROR_ARANGO_INDEX_NOT_FOUND.code?!1:(f.checkRequestResult(b),!0)},d.prototype.ensureCapConstraint=function(a,b){var c={type:"cap",size:a||void 0,byteSize:b||void 0},d=this._database._connection.POST(this._indexurl(),JSON.stringify(c));return f.checkRequestResult(d),d},d.prototype.ensureUniqueSkiplist=function(){var a=c({type:"skiplist",unique:!0},arguments),b=this._database._connection.POST(this._indexurl(),JSON.stringify(a));return f.checkRequestResult(b),b},d.prototype.ensureSkiplist=function(){var a=c({type:"skiplist",unique:!1},arguments),b=this._database._connection.POST(this._indexurl(),JSON.stringify(a));return f.checkRequestResult(b),b},d.prototype.ensureFulltextIndex=function(a,b){var c={type:"fulltext",minLength:b||void 0,fields:[a]},d=this._database._connection.POST(this._indexurl(),JSON.stringify(c));return f.checkRequestResult(d),d},d.prototype.ensureUniqueConstraint=function(){var a=c({type:"hash",unique:!0},arguments),b=this._database._connection.POST(this._indexurl(),JSON.stringify(a));return f.checkRequestResult(b),b},d.prototype.ensureHashIndex=function(){var a=c({type:"hash",unique:!1},arguments),b=this._database._connection.POST(this._indexurl(),JSON.stringify(a));return f.checkRequestResult(b),b},d.prototype.ensureGeoIndex=function(a,b){var c;if("string"!=typeof a)throw"usage: ensureGeoIndex(, ) or ensureGeoIndex([, ])";c="boolean"==typeof b?{type:"geo",fields:[a],geoJson:b}:void 0===b?{type:"geo",fields:[a],geoJson:!1}:{type:"geo",fields:[a,b],geoJson:!1};var d=this._database._connection.POST(this._indexurl(),JSON.stringify(c));return f.checkRequestResult(d),d},d.prototype.ensureGeoConstraint=function(a,b){return this.ensureGeoIndex(a,b)},d.prototype.ensureIndex=function(a){if("object"!=typeof a||Array.isArray(a))throw"usage: ensureIndex()";var b=this._database._connection.POST(this._indexurl(),JSON.stringify(a));return f.checkRequestResult(b),b},d.prototype.count=function(){var a=this._database._connection.GET(this._baseurl("count"));return f.checkRequestResult(a),a.count},d.prototype.document=function(a){var b,c=null;if(a.hasOwnProperty("_id")&&(a.hasOwnProperty("_rev")&&(c=a._rev),a=a._id),b=null===c?this._database._connection.GET(this._documenturl(a)):this._database._connection.GET(this._documenturl(a),{"if-match":JSON.stringify(c)}),null!==b&&b.error===!0&&b.errorNum===e.errors.ERROR_ARANGO_COLLECTION_NOT_FOUND.code)throw new g(b);return f.checkRequestResult(b),b},d.prototype.exists=function(a){var b,c=null;if(void 0===a||null===a)throw new g({errorNum:e.errors.ERROR_ARANGO_DOCUMENT_HANDLE_BAD.code,errorMessage:e.errors.ERROR_ARANGO_DOCUMENT_HANDLE_BAD.message});return a.hasOwnProperty("_id")&&(a.hasOwnProperty("_rev")&&(c=a._rev),a=a._id),b=null===c?this._database._connection.HEAD(this._documenturl(a)):this._database._connection.HEAD(this._documenturl(a),{"if-match":JSON.stringify(c)}),null===b||b.error!==!0||b.errorNum!==e.errors.ERROR_ARANGO_COLLECTION_NOT_FOUND.code&&b.errorNum!==e.errors.ERROR_HTTP_NOT_FOUND.code&&b.errorNum!==e.errors.ERROR_HTTP_PRECONDITION_FAILED.code?(f.checkRequestResult(b),!0):!1},d.prototype.any=function(){var a=this._database._connection.PUT(this._prefixurl("/_api/simple/any"),JSON.stringify({collection:this._name}));return f.checkRequestResult(a),a.document},d.prototype.firstExample=function(a){var b,c;if(1===arguments.length)b=a;else for(b={},c=0;c) get collection by identifier/name \n _create(, ) creates a new collection \n _createEdgeCollection() creates a new edge collection \n _drop() delete a collection \n \nDocument Functions: \n _document() get document by handle (_id) \n _replace(, , ) overwrite document \n _update(, , , partially update document \n ) \n _remove() delete document \n _exists() checks whether a document exists \n _truncate() delete all documents \n \nDatabase Management Functions: \n _createDatabase() creates a new database \n _dropDatabase() drops an existing database \n _useDatabase() switches into an existing database\n _drop() delete a collection \n _name() name of the current database \n \nQuery / Transaction Functions: \n _executeTransaction() execute transaction \n _query() execute AQL query \n _createStatement() create and return AQL query ";c.prototype._help=function(){e.print(i)},c.prototype.toString=function(){return'[object ArangoDatabase "'+this._name()+'"]'},c.prototype._collections=function(){var a=this._connection.GET(this._collectionurl());if(f.checkRequestResult(a),void 0!==a.collections){var b,c=a.collections,d=[];for(b=0;b1&&(a={query:a,bindVars:b,options:c}),require("@arangodb/aql/explainer").explain(a)},c.prototype._createDatabase=function(a,b,c){var d={name:a,options:b||{},users:c||[]},e=this._connection.POST("/_api/database",JSON.stringify(d));if(null!==e&&e.error===!0)throw new g(e);return f.checkRequestResult(e),e.result},c.prototype._dropDatabase=function(a){var b=this._connection.DELETE("/_api/database/"+encodeURIComponent(a));if(null!==b&&b.error===!0)throw new g(b);return f.checkRequestResult(b),b.result},c.prototype._listDatabases=function(){var a=this._connection.GET("/_api/database");if(null!==a&&a.error===!0)throw new g(a);return f.checkRequestResult(a),a.result},c.prototype._useDatabase=function(a){if(e.printBrowser)throw new g({error:!0,code:e.errors.ERROR_NOT_IMPLEMENTED.code,errorNum:e.errors.ERROR_NOT_IMPLEMENTED.code,errorMessage:"_useDatabase() is not supported in the web interface"});var b=this._connection.getDatabaseName();if(a===b)return!0;this._connection.setDatabaseName(a);try{this._queryProperties(!0),this._flushCache()}catch(c){if(this._connection.setDatabaseName(b),c.hasOwnProperty("errorNum"))throw c;throw new g({error:!0,code:e.errors.ERROR_BAD_PARAMETER.code,errorNum:e.errors.ERROR_BAD_PARAMETER.code,errorMessage:"cannot use database '"+a+"'"})}return!0},c.prototype._listEndpoints=function(){var a=this._connection.GET("/_api/endpoint");if(null!==a&&a.error===!0)throw new g(a);return f.checkRequestResult(a),a},c.prototype._executeTransaction=function(a){if(!a||"object"!=typeof a)throw new g({error:!0,code:e.errors.ERROR_HTTP_BAD_PARAMETER.code,errorNum:e.errors.ERROR_BAD_PARAMETER.code,errorMessage:"usage: _executeTransaction()"});if(!a.collections||"object"!=typeof a.collections)throw new g({error:!0,code:e.errors.ERROR_HTTP_BAD_PARAMETER.code,errorNum:e.errors.ERROR_BAD_PARAMETER.code,errorMessage:"missing/invalid collections definition for transaction"});if(!a.action||"string"!=typeof a.action&&"function"!=typeof a.action)throw new g({error:!0,code:e.errors.ERROR_HTTP_BAD_PARAMETER.code,errorNum:e.errors.ERROR_BAD_PARAMETER.code,errorMessage:"missing/invalid action definition for transaction"});"function"==typeof a.action&&(a.action=String(a.action));var b=this._connection.POST("/_api/transaction",JSON.stringify(a));if(null!==b&&b.error===!0)throw new g(b);return f.checkRequestResult(b),b.result}}),module.define("@arangodb/arango-query-cursor",function(a,b){function c(a,b){this._database=a,this._dbName=a._name(),this.data=b,this._hasNext=!1,this._hasMore=!1,this._pos=0,this._count=0,this._total=0,void 0!==b.result&&(this._count=b.result.length,this._pos0){if(a)d.print(b);else{var g=d.startCaptureMode();d.print(b),e+="\n\n"+d.stopCaptureMode(g)}this.hasNext()&&(e+="\ntype 'more' to show more documents\n",more=this)}return a||(d.print(e),e=""),e},c.prototype.toArray=function(){for(var a=[];this.hasNext();)a.push(this.next());return a};var f=e.createHelpHeadline("ArangoQueryCursor help")+'ArangoQueryCursor constructor: \n > cursor = stmt.execute() \nFunctions: \n hasNext() returns true if there are \n more results to fetch \n next() returns the next document \n toArray() returns all data from the cursor\n _help() this help \nAttributes: \n _database database object \nExample: \n > stmt = db._createStatement({ "query": "FOR c IN coll RETURN c" })\n > cursor = stmt.execute() \n > documents = cursor.toArray() \n > cursor = stmt.execute() \n > while (cursor.hasNext()) { print(cursor.next()) } ';c.prototype._help=function(){d.print(f)},c.prototype.hasNext=function(){return this._hasNext},c.prototype.next=function(){if(!this._hasNext)throw"No more results";var a=this.data.result[this._pos];if(this._pos++,this._pos===this._count&&(this._hasNext=!1,this._pos=0,this._hasMore&&this.data.id)){this._hasMore=!1;var b=this._database._connection.PUT(this._baseurl(),"");e.checkRequestResult(b),this.data=b,this._count=b.result.length,this._pos stmt = new ArangoStatement(db, { "query": "FOR..." }) \n > stmt = db._createStatement({ "query": "FOR..." }) \nSet query options: \n > stmt.setBatchSize() set the max. number of results \n to be transferred per roundtrip \n > stmt.setCount() set count flag (return number of\n results in "count" attribute) \nGet query options: \n > stmt.setBatchSize() return the max. number of results\n to be transferred per roundtrip \n > stmt.getCount() return count flag (return number\n of results in "count" attribute)\n > stmt.getQuery() return query string \n results in "count" attribute) \nBind parameters to a query: \n > stmt.bind(, ) bind single variable \n > stmt.bind() bind multiple variables \nExecute query: \n > cursor = stmt.execute() returns a cursor \nGet all results in an array: \n > docs = cursor.toArray() \nOr loop over the result set: \n > while (cursor.hasNext()) { print(cursor.next()) } ';e.prototype._help=function(){c.print(g)},e.prototype.parse=function(){var a={query:this._query},b=this._database._connection.POST("/_api/query",JSON.stringify(a));d.checkRequestResult(b);var c={bindVars:b.bindVars,collections:b.collections,ast:b.ast};return c},e.prototype.explain=function(a){var b=this._options||{};"object"==typeof b&&"object"==typeof a&&Object.keys(a).forEach(function(c){b[c]=a[c]});var c={query:this._query,bindVars:this._bindVars,options:b},e=this._database._connection.POST("/_api/explain",JSON.stringify(c));return d.checkRequestResult(e),b&&b.allPlans?{plans:e.plans,warnings:e.warnings,stats:e.stats}:{plan:e.plan,warnings:e.warnings,stats:e.stats,cacheable:e.cacheable}},e.prototype.execute=function(){var a={query:this._query,count:this._doCount,bindVars:this._bindVars};this._batchSize&&(a.batchSize=this._batchSize),this._options&&(a.options=this._options),void 0!==this._cache&&(a.cache=this._cache);var b=this._database._connection.POST("/_api/cursor",JSON.stringify(a));return d.checkRequestResult(b),new f(this._database,b)},a.ArangoStatement=e}),module.define("@arangodb/arangosh",function(a,b){var c=require("internal");a.getIdString=function(a,b){var c="[object "+b;return a._id?c+=":"+a._id:a.data&&a.data._id&&(c+=":"+a.data._id),c+="]"},a.createHelpHeadline=function(a){var b,c="",d=Math.abs(78-a.length)/2;for(b=0;d>b;++b)c+="-";return"\n"+c+" "+a+" "+c+"\n"};var d=require("@arangodb"),e=d.ArangoError;a.checkRequestResult=function(a){if(void 0===a)throw new e({error:!0,code:500,errorNum:d.ERROR_INTERNAL,errorMessage:"Unknown error. Request result is empty"});if(a.hasOwnProperty("error")){if(a.error){if(a.errorNum===d.ERROR_TYPE_ERROR)throw new TypeError(a.errorMessage);var b=new e(a);throw b.message=a.message,b}delete a.error}return a},a.HELP=a.createHelpHeadline("Help")+"Predefined objects: \n arango: ArangoConnection \n db: ArangoDatabase \n"+(c.printBrowser?"":" fm: FoxxManager \n")+"Examples: \n > db._collections() list all collections \n > db._query().toArray() execute an AQL query \n > db._explain() explain an AQL query \n > help show help pages \n > exit \nNote: collection names and statuses may be cached in arangosh. \nTo refresh the list of collections and their statuses, issue: \n > db._collections(); \n \n"+(c.printBrowser?"To cancel the current prompt, press CTRL + z. \n \nPlease note that all variables defined with the var keyword will \ndisappear when the command is finished. To introduce variables that\nare persisting until the next command, omit the var keyword. \n\nType 'tutorial' for a tutorial or 'help' to see common examples":"To cancel the current prompt, press CTRL + d. \n"), -a.helpExtended=a.createHelpHeadline("More help")+"Pager: \n > stop_pager() stop the pager output \n > start_pager() start the pager \nPretty printing: \n > stop_pretty_print() stop pretty printing \n > start_pretty_print() start pretty printing \nColor output: \n > stop_color_print() stop color printing \n > start_color_print() start color printing \nPrint function: \n > print(x) std. print function \n > print_plain(x) print without prettifying \n and without colors \n > clear() clear screen "}),module.define("@arangodb/graph-blueprint",function(a,b){var c=require("@arangodb"),d=require("@arangodb/is"),e=require("@arangodb/graph-common"),f=e.Edge,g=e.Graph,h=e.Vertex,i=e.GraphArray,j=e.Iterator,k=require("@arangodb/api/graph").GraphAPI;f.prototype.setProperty=function(a,b){var c,d=this._properties;return d[a]=b,this._graph.emptyCachedPredecessors(),c=k.putEdge(this._graph._properties._key,this._properties._key,d),this._properties=c.edge,a},h.prototype.edges=function(a,b){var c,d,e=new i;for(d=k.postEdges(this._graph._vertices._database,this._graph._properties._key,this,{filter:{direction:a,labels:b}});d.hasNext();)c=new f(this._graph,d.next()),e.push(c);return e},h.prototype.getInEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("in",a)},h.prototype.getOutEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("out",a)},h.prototype.getEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("any",a)},h.prototype.inbound=function(){return this.getInEdges()},h.prototype.outbound=function(){return this.getOutEdges()},h.prototype.setProperty=function(a,b){var c,d=this._properties;return d[a]=b,c=k.putVertex(this._graph._properties._key,this._properties._key,d),this._properties=c.vertex,a},g.prototype.initialize=function(a,b,e){var f;return d.notExisty(b)&&d.notExisty(e)?f=k.getGraph(a):("object"==typeof b&&"function"==typeof b.name&&(b=b.name()),"object"==typeof e&&"function"==typeof e.name&&(e=e.name()),f=k.postGraph({_key:a,vertices:b,edges:e})),this._properties=f.graph,this._vertices=c.db._collection(this._properties.edgeDefinitions[0].from[0]),this._edges=c.db._collection(this._properties.edgeDefinitions[0].collection),this._verticesCache={},this._edgesCache={},this.predecessors={},this.distances={},this},g.getAll=function(){return k.getAllGraphs()},g.drop=function(a){k.deleteGraph(a)},g.prototype.drop=function(){k.deleteGraph(this._properties._key)},g.prototype._saveEdge=function(a,b,c,d){var e;return this.emptyCachedPredecessors(),d._key=a,d._from=b,d._to=c,e=k.postEdge(this._properties._key,d),new f(this,e.edge)},g.prototype._saveVertex=function(a,b){var c;return d.existy(a)&&(b._key=a),c=k.postVertex(this._properties._key,b),new h(this,c.vertex)},g.prototype._replaceVertex=function(a,b){k.putVertex(this._properties._key,a,b)},g.prototype._replaceEdge=function(a,b){k.putEdge(this._properties._key,a,b)},g.prototype.getVertex=function(a){var b=k.getVertex(this._properties._key,a);return d.notExisty(b)?null:new h(this,b.vertex)},g.prototype.getVertices=function(){var a=k.getVertices(this._vertices._database,this._properties._key,{}),b=this,c=function(a){return new h(b,a)};return new j(c,a,"[vertex iterator]")},g.prototype.getEdge=function(a){var b=k.getEdge(this._properties._key,a);return d.notExisty(b)?null:new f(this,b.edge)},g.prototype.getEdges=function(){var a=k.getEdges(this._vertices._database,this._properties._key,{}),b=this,c=function(a){return new f(b,a)};return new j(c,a,"[edge iterator]")},g.prototype.removeVertex=function(a){this.emptyCachedPredecessors(),k.deleteVertex(this._properties._key,a._properties._key),a._properties=void 0},g.prototype.removeEdge=function(a){this.emptyCachedPredecessors(),k.deleteEdge(this._properties._key,a._properties._key),this._edgesCache[a._properties._id]=void 0,a._properties=void 0},a.Edge=f,a.Graph=g,a.Vertex=h,a.GraphArray=i,require("@arangodb/graph/algorithms-common")}),module.define("@arangodb/index",function(a,b){"use strict";var c=require("internal"),d=require("@arangodb/common");if(Object.keys(d).forEach(function(b){a[b]=d[b]}),a.isServer=!1,a.isClient=!0,a.ArangoCollection=require("@arangodb/arango-collection").ArangoCollection,a.ArangoConnection=c.ArangoConnection,a.ArangoDatabase=require("@arangodb/arango-database").ArangoDatabase,a.ArangoStatement=require("@arangodb/arango-statement").ArangoStatement,a.ArangoQueryCursor=require("@arangodb/arango-query-cursor").ArangoQueryCursor,"undefined"!=typeof c.arango)try{a.arango=c.arango,a.db=new a.ArangoDatabase(c.arango),c.db=a.db}catch(e){c.print("cannot connect to server: "+String(e))}a.plainServerVersion=function(){if(c.arango){var a=c.arango.getVersion(),b=a.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);return null!==b&&(a=b[1]),a}return void 0}}),module.define("@arangodb/replication",function(a,b){"use strict";var c=require("internal"),d=require("@arangodb/arangosh"),e={},f={};e.state=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-state");return d.checkRequestResult(b),b},e.tickRanges=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-tick-ranges");return d.checkRequestResult(b),b},e.firstTick=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-first-tick");return d.checkRequestResult(b),b.firstTick},f.start=function(a,b){var e=c.db,f="";void 0!==a&&(f="?from="+encodeURIComponent(a)),void 0!==b&&(f+=""===f?"?":"&",f+="barrierId="+encodeURIComponent(b));var g=e._connection.PUT("/_api/replication/applier-start"+f,"");return d.checkRequestResult(g),g},f.stop=f.shutdown=function(){var a=c.db,b=a._connection.PUT("/_api/replication/applier-stop","");return d.checkRequestResult(b),b},f.state=function(){var a=c.db,b=a._connection.GET("/_api/replication/applier-state");return d.checkRequestResult(b),b},f.forget=function(){var a=c.db,b=a._connection.DELETE("/_api/replication/applier-state");return d.checkRequestResult(b),b},f.properties=function(a){var b,e=c.db;return b=void 0===a?e._connection.GET("/_api/replication/applier-config"):e._connection.PUT("/_api/replication/applier-config",JSON.stringify(a)),d.checkRequestResult(b),b};var g=function(a,b){var e=c.db;a.hasOwnProperty("progress")||(a.progress=!0),c.sleep(1);for(var g=0;;){var h=e._connection.PUT("/_api/job/"+encodeURIComponent(b),"");if(d.checkRequestResult(h),204!==h.code)return h;if(++g,6>g?c.sleep(2):c.sleep(3),a.progress&&g%3===0)try{var i=f.state().state.progress,j=i.time+": "+i.message;c.print("still sychronizing... last received status: "+j)}catch(k){}}},h=function(a){var b=c.db,e=JSON.stringify(a||{}),f={"X-Arango-Async":"store"},h=b._connection.PUT_RAW("/_api/replication/sync",e,f);return d.checkRequestResult(h),a.async?h.headers["x-arango-async-id"]:g(a,h.headers["x-arango-async-id"])},i=function(a,b){return b=b||{},b.restrictType="include",b.restrictCollections=[a],b.includeSystem=!0,h(b)},j=function(a){a=a||{},a.hasOwnProperty("autoStart")||(a.autoStart=!0),a.hasOwnProperty("includeSystem")||(a.includeSystem=!0),a.hasOwnProperty("verbose")||(a.verbose=!1);var b=c.db,e=JSON.stringify(a),f={"X-Arango-Async":"store"},h=b._connection.PUT_RAW("/_api/replication/make-slave",e,f);return d.checkRequestResult(h),a.async?h.headers["x-arango-async-id"]:g(a,h.headers["x-arango-async-id"])},k=function(a){var b=c.db,e=b._connection.PUT_RAW("/_api/job/"+encodeURIComponent(a),"");return d.checkRequestResult(e),e.headers.hasOwnProperty("x-arango-async-id")?JSON.parse(e.body):!1},l=function(){var a=c.db,b=a._connection.GET("/_api/replication/server-id");return d.checkRequestResult(b),b.serverId};a.logger=e,a.applier=f,a.sync=h,a.syncCollection=i,a.setupReplication=j,a.getSyncResult=k,a.serverId=l}),module.define("@arangodb/simple-query",function(a,b){var c=require("@arangodb/arangosh"),d=require("@arangodb/arango-query-cursor").ArangoQueryCursor,e=require("@arangodb/simple-query-common"),f=e.GeneralArrayCursor,g=e.SimpleQueryAll,h=e.SimpleQueryArray,i=e.SimpleQueryByExample,j=e.SimpleQueryByCondition,k=e.SimpleQueryFulltext,l=e.SimpleQueryGeo,m=e.SimpleQueryNear,n=e.SimpleQueryRange,o=e.SimpleQueryWithin,p=e.SimpleQueryWithinRectangle;g.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name()};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/all",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},i.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),example:this._example};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e="by-example";if(this.hasOwnProperty("_type"))switch(b.index=this._index,this._type){case"hash":e="by-example-hash";break;case"skiplist":e="by-example-skiplist"}var f=this._collection._database._connection.PUT("/_api/simple/"+e,JSON.stringify(b));c.checkRequestResult(f),this._execution=new d(this._collection._database,f),f.hasOwnProperty("count")&&(this._countQuery=f.count,this._countTotal=f.count)}},j.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),condition:this._condition};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e="by-condition";if(this.hasOwnProperty("_type"))switch(b.index=this._index,this._type){case"skiplist":e="by-condition-skiplist"}var f=this._collection._database._connection.PUT("/_api/simple/"+e,JSON.stringify(b));c.checkRequestResult(f),this._execution=new d(this._collection._database,f),f.hasOwnProperty("count")&&(this._countQuery=f.count,this._countTotal=f.count)}},n.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),attribute:this._attribute,right:this._right,left:this._left,closed:1===this._type};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/range",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},m.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude:this._latitude,longitude:this._longitude};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/near",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},o.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude:this._latitude,longitude:this._longitude,radius:this._radius};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/within",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},p.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude1:this._latitude1,longitude1:this._longitude1,latitude2:this._latitude2,longitude2:this._longitude2};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/within-rectangle",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},k.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),attribute:this._attribute,query:this._query};null!==this._limit&&(b.limit=this._limit),null!==this._index&&(b.index=this._index),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/fulltext",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},a.GeneralArrayCursor=f,a.SimpleQueryAll=g,a.SimpleQueryArray=h,a.SimpleQueryByExample=i,a.SimpleQueryByCondition=j,a.SimpleQueryFulltext=k,a.SimpleQueryGeo=l,a.SimpleQueryNear=m,a.SimpleQueryRange=n,a.SimpleQueryWithin=o,a.SimpleQueryWithinRectangle=p}),module.define("@arangodb/tutorial",function(a,b){var c=0,d="Type 'tutorial' again to get to the next chapter.",e=[{title:"Welcome to the tutorial!",text:"This is a user-interactive tutorial on ArangoDB and the ArangoDB shell.\nIt will give you a first look into ArangoDB and how it works."},{title:"JavaScript Shell",text:"On this shell's prompt, you can issue arbitrary JavaScript commands.\nSo you are able to do things like...:\n\n number = 123;\n number = number * 10;"},{title:"Running Complex Instructions",text:"You can also run more complex instructions, such as for loops:\n\n for (i = 0; i < 10; i++) { number = number + 1; }"},{title:"Printing Results",text:'As you can see, the result of the last command executed is printed automatically. To explicitly print a value at any other time, there is the print function:\n\n for (i = 0; i < 5; ++i) { print("I am a JavaScript shell"); }'},{title:"Creating Collections",text:"ArangoDB is a document database. This means that we store data as documents (which are similar to JavaScript objects) in so-called 'collections'. Let's create a collection named 'places' now:\n\n db._create('places');\n\nNote: each collection is identified by a unique name. Trying to create a collection that already exists will produce an error."},{title:"Displaying Collections",text:"Now you can take a look at the collection(s) you just created:\n\n db._collections();\n\nPlease note that all collections will be returned, including ArangoDB's pre-defined system collections."},{title:"Creating Documents",text:'Now we have a collection, but it is empty. So let\'s create some documents!\n\n db.places.save({ _key : "foo", city : "foo-city" });\n for (i = 0; i <= 10; i++) { db.places.save({ _key: "example" + i, zipcode: i }) };'},{title:"Displaying All Documents",text:"You want to take a look at your docs? No problem:\n\n db.places.toArray();"},{title:"Counting Documents",text:"To see how many documents there are in a collection, use the 'count' method:\n\n db.places.count();"},{title:"Retrieving Single Documents",text:"As you can see, each document has some meta attributes '_id', '_key' and '_rev'.\nThe '_key' attribute can be used to quickly retrieve a single document from a collection:\n\n db.places.document(\"foo\");\n db.places.document(\"example5\");"},{title:"Retrieving Single Documents",text:"The '_id' attribute can also be used to retrieve documents using the 'db' object:\n\n db._document(\"places/foo\");\n db._document(\"places/example5\");"},{title:"Modifying Documents",text:'You can modify existing documents. Try to add a new attribute to a document and verify whether it has been added:\n\n db._update("places/foo", { zipcode: 39535 });\n db._document("places/foo");'},{title:"Document Revisions",text:"Note that after updating the document, its '_rev' attribute changed automatically.\nThe '_rev' attribute contains a document revision number, and it can be used for conditional modifications. Here's an example of how to avoid lost updates in case multiple clients are accessing the documents in parallel:\n\n doc = db._document(\"places/example1\");\n db._update(\"places/example1\", { someValue: 23 });\n db._update(doc, { someValue: 42 });\n\nNote that the first update will succeed because it was unconditional. The second update however is conditional because we're also passing the document's revision id in the first parameter to _update. As the revision id we're passing to update does not match the document's current revision anymore, the update is rejected."},{title:"Removing Documents",text:'Deleting single documents can be achieved by providing the document _id or _key:\n\n db._remove("places/example7");\n db.places.remove("example8");\n db.places.count();'},{title:"Searching Documents",text:'Searching for documents with specific attributes can be done by using the byExample method:\n\n db._create("users");\n for (i = 0; i < 10; ++i) { db.users.save({ name: "username" + i, active: (i % 3 == 0), age: 30 + i }); }\n db.users.byExample({ active: false }).toArray();\n db.users.byExample({ name: "username3", active: true }).toArray();\n'},{title:"Running AQL Queries",text:'ArangoDB also provides a query language for more complex matching:\n\n db._query("FOR u IN users FILTER u.active == true && u.age >= 33 RETURN { username: u.name, age: u.age }").toArray();'},{title:"Using Databases",text:"By default, the ArangoShell connects to the default database. The default database is named '_system'. To create another database, use the '_createDatabase' method of the 'db' object. To switch into an existing database, use '_useDatabase'. To get rid of a database and all of its collections, use '_dropDatabase':\n\n db._createDatabase(\"mydb\");\n db._useDatabase(\"mydb\");\n db._dropDatabase(\"mydb\");"}];a._PRINT=function(a){function b(a){return a.replace(/\n {2}(.+?)(?=\n)/g,"\n "+f.COLOR_MAGENTA+"$1"+f.COLOR_RESET)}var f=require("internal").COLORS,g=f.COLOR_BOLD_BLUE+(c+1)+". "+e[c].title+f.COLOR_RESET;a.output+="\n\n"+g+"\n\n"+b(e[c].text+"\n")+"\n",++c,c>=e.length?(a.output+="Congratulations! You finished the tutorial.\n",c=0):a.output+=d+"\n"}}),module.define("@arangodb/aql/explainer",function(a,b){function c(a){"use strict";["COLOR_RESET","COLOR_CYAN","COLOR_BLUE","COLOR_GREEN","COLOR_MAGENTA","COLOR_YELLOW","COLOR_RED","COLOR_WHITE","COLOR_BOLD_CYAN","COLOR_BOLD_BLUE","COLOR_BOLD_GREEN","COLOR_BOLD_MAGENTA","COLOR_BOLD_YELLOW","COLOR_BOLD_RED","COLOR_BOLD_WHITE"].forEach(function(b){C[b]=a?A[b]:""})}function d(a,b){"use strict";return a&&a.subNodes&&a.subNodes.length>1?"("+b+")":b}function e(a){"use strict";return"`"+a+"`"}function f(a){"use strict";return C.COLOR_CYAN+a+C.COLOR_RESET}function g(a){"use strict";return C.COLOR_BLUE+a+C.COLOR_RESET}function h(a){"use strict";return"string"==typeof a&&a.length>1024?C.COLOR_GREEN+a.substr(0,1024)+"..."+C.COLOR_RESET:C.COLOR_GREEN+a+C.COLOR_RESET}function i(a){"use strict";return"#"===a[0]?C.COLOR_MAGENTA+a+C.COLOR_RESET:C.COLOR_YELLOW+a+C.COLOR_RESET}function j(a){"use strict";return C.COLOR_GREEN+a+C.COLOR_RESET}function k(a){"use strict";return C.COLOR_RED+a+C.COLOR_RESET}function l(a){"use strict";return"`"+C.COLOR_YELLOW+a+C.COLOR_RESET+"`"}function m(a){"use strict";return C.COLOR_MAGENTA+a+C.COLOR_RESET}function n(a){"use strict";return C.COLOR_BOLD_BLUE+a+C.COLOR_RESET}function o(a){"use strict";return 0>a&&(a=0),new Array(a).join(" ")}function p(a,b){"use strict";var c=".{1,"+b+"}(\\s|$)|\\S+?(\\s|$)";return a.match(new RegExp(c,"g")).join("\n")}function q(a){"use strict";var b=4096;a.length>b?(D.appendLine(n("Query string (truncated):")),a=a.substr(0,b/2)+" ... "+a.substr(a.length-b/2)):D.appendLine(n("Query string:")),D.appendLine(" "+h(p(a,100).replace(/\n+/g,"\n ",a))),D.appendLine()}function r(a){"use strict";if(void 0!==a){D.appendLine(n("Write query options:"));var b=Object.keys(a),c="Option".length;b.forEach(function(a){a.length>c&&(c=a.length)}),D.appendLine(" "+m("Option")+o(1+c-"Option".length)+" "+m("Value")),b.forEach(function(b){D.appendLine(" "+f(b)+o(1+c-b.length)+" "+h(JSON.stringify(a[b])))}),D.appendLine()}}function s(a){"use strict";if(D.appendLine(n("Optimization rules applied:")),0===a.length)D.appendLine(" "+h("none"));else{var b=String("Id").length;D.appendLine(" "+o(1+b-String("Id").length)+m("Id")+" "+m("RuleName"));for(var c=0;cb&&(b=d),d=a.type.length,d>j&&(j=d),d=a.fields.map(e).join(", ").length+"[ ]".length,d>q&&(q=d),d=a.collection.length,d>c&&(c=d)});var r=" "+o(1+b-String("By").length)+m("By")+" "+m("Type")+o(1+j-"Type".length)+" "+m("Collection")+o(1+c-"Collection".length)+" "+m("Unique")+o(1+d-"Unique".length)+" "+m("Sparse")+o(1+g-"Sparse".length)+" "+m("Selectivity")+" "+m("Fields")+o(1+q-"Fields".length)+" "+m("Ranges");D.appendLine(r);for(var s=0;sb&&(b=g),a.minMaxDepthLen>c&&(c=a.minMaxDepthLen),a.hasOwnProperty("ConditionStr")&&a.ConditionStr.length>f&&(f=a.ConditionStr.length),a.hasOwnProperty("vertexCollectionNameStr")&&a.vertexCollectionNameStrLen>d&&(d=a.vertexCollectionNameStrLen),a.hasOwnProperty("edgeCollectionNameStr")&&a.edgeCollectionNameStrLen>e&&(e=a.edgeCollectionNameStrLen)});var g=" "+o(1+b-String("Id").length)+m("Id")+" "+m("Depth")+o(1+c-String("Depth").length)+" "+m("Vertex collections")+o(1+d-"Vertex collections".length)+" "+m("Edge collections")+o(1+e-"Edge collections".length)+" "+m("Filter conditions");D.appendLine(g);for(var h=0;hz&&(z=String(a.id).length),String(a.type).length>w&&(w=String(a.type).length),String(a.site).length>x&&(x=String(a.site).length),String(a.estimatedNrItems).length>A&&(A=String(a.estimatedNrItems).length)});for(var d=a.length,f="COOR";d>0;){--d;var g=a[d];g.site=f,"RemoteNode"===g.type&&(f="COOR"===f?"DBS":"COOR")}};F(C.nodes,0);var G,H={},I={},J={},K=[],L=[],M=!0,N=null,O=function(a){try{if(/^[0-9_]/.test(a.name))return i("#"+a.name)}catch(b){throw B(a),b}return I.hasOwnProperty(a.id)&&(J[a.name]=I[a.id]),i(a.name)},P=function(){},Q=function ga(a){var c=!0;a:for(;c;){var e=a;i=m=n=o=p=q=r=s=void 0,c=!1;var i=function(a,b){var c=ga(a.subNodes[0]),d=ga(a.subNodes[1]);return 3===a.subNodes.length&&(b=a.subNodes[2].quantifier+" "+b),a.sorted?c+" "+b+" "+g("/* sorted */")+" "+d:c+" "+b+" "+d};if(M=M&&-1!==["value","object","object element","array"].indexOf(e.type),"attribute access"!==e.type&&e.hasOwnProperty("subNodes"))for(var m=0;m20?"{ "+e.subNodes.slice(0,20).map(ga).join(", ")+", ... }":"{ "+e.subNodes.map(ga).join(", ")+" }":"{ }";case"object element":return h(JSON.stringify(e.name))+" : "+ga(e.subNodes[0]);case"calculated object element":return"[ "+ga(e.subNodes[0])+" ] : "+ga(e.subNodes[1]);case"array":return e.hasOwnProperty("subNodes")?e.subNodes.length>20?"[ "+e.subNodes.slice(0,20).map(ga).join(", ")+", ... ]":"[ "+e.subNodes.map(ga).join(", ")+" ]":"[ ]";case"unary not":return"! "+ga(e.subNodes[0]);case"unary plus":return"+ "+ga(e.subNodes[0]);case"unary minus":return"- "+ga(e.subNodes[0]);case"array limit":return ga(e.subNodes[0])+", "+ga(e.subNodes[1]);case"attribute access":if("reference"===e.subNodes[0].type&&I.hasOwnProperty(e.subNodes[0].id)){var p=I[e.subNodes[0].id],q=y._collection(p);if(null!==q){var r=3===q.type(),s="_"===e.name[0];(s&&-1===["_key","_id","_rev"].concat(r?["_from","_to"]:[]).indexOf(e.name)||!s&&r&&-1!==["from","to"].indexOf(e.name))&&P(b.warnings,N,"reference to potentially non-existing attribute '"+e.name+"'")}}return ga(e.subNodes[0])+"."+l(e.name);case"indexed access":return ga(e.subNodes[0])+"["+ga(e.subNodes[1])+"]";case"range":return ga(e.subNodes[0])+" .. "+ga(e.subNodes[1])+" "+g("/* range */");case"expand":case"expansion":e.subNodes.length>2?H[e.subNodes[0].subNodes[0].name]=[e.levels,e.subNodes[0].subNodes[1],e.subNodes[2],e.subNodes[3],e.subNodes[4]]:H[e.subNodes[0].subNodes[0].name]=e.subNodes[0].subNodes[1],a=e.subNodes[1],c=!0;continue a;case"user function call":return j(e.name)+"("+(e.subNodes&&e.subNodes[0].subNodes||[]).map(ga).join(", ")+") "+g("/* user-defined function */");case"function call":return j(e.name)+"("+(e.subNodes&&e.subNodes[0].subNodes||[]).map(ga).join(", ")+")";case"plus":return"("+i(e,"+")+")";case"minus":return"("+i(e,"-")+")";case"times":return"("+i(e,"*")+")";case"division":return"("+i(e,"/")+")";case"modulus":return"("+i(e,"%")+")";case"compare not in":case"array compare not in":return"("+i(e,"not in")+")";case"compare in":case"array compare in":return"("+i(e,"in")+")";case"compare ==":case"array compare ==":return"("+i(e,"==")+")";case"compare !=":case"array compare !=":return"("+i(e,"!=")+")";case"compare >":case"array compare >":return"("+i(e,">")+")";case"compare >=":case"array compare >=":return"("+i(e,">=")+")";case"compare <":case"array compare <":return"("+i(e,"<")+")";case"compare <=":case"array compare <=":return"("+i(e,"<=")+")";case"logical or":return"("+i(e,"||")+")";case"logical and":return"("+i(e,"&&")+")";case"ternary":return"("+ga(e.subNodes[0])+" ? "+ga(e.subNodes[1])+" : "+ga(e.subNodes[2])+")";case"n-ary or":return e.hasOwnProperty("subNodes")?d(e,e.subNodes.map(function(a){return ga(a)}).join(" || ")):"";case"n-ary and":return e.hasOwnProperty("subNodes")?d(e,e.subNodes.map(function(a){return ga(a)}).join(" && ")):"";default:return"unhandled node type ("+e.type+")"}}},R=function(a){var b="";for(var c in a)if(a.hasOwnProperty(c)){b.length>0&&(b+=" AND ");for(var d=0;d ",b+=Q(e.varAccess),b+=" "+e.comparisonTypeStr+" ",b+=Q(e.compareTo)}}return b},S=function(a,b,c){var d=c.isConstant?h(JSON.stringify(c.bound)):Q(c.bound);return l(a)+" "+b[c.include?1:0]+" "+d},T=function(a){var b=[];return a.forEach(function(a){var c=a.attr;a.lowConst.hasOwnProperty("bound")&&a.highConst.hasOwnProperty("bound")&&JSON.stringify(a.lowConst.bound)===JSON.stringify(a.highConst.bound)&&(a.equality=!0),a.equality?a.lowConst.hasOwnProperty("bound")?b.push(S(c,["==","=="],a.lowConst)):a.hasOwnProperty("lows")&&a.lows.forEach(function(a){b.push(S(c,["==","=="],a))}):(a.lowConst.hasOwnProperty("bound")&&b.push(S(c,[">",">="],a.lowConst)),a.highConst.hasOwnProperty("bound")&&b.push(S(c,["<","<="],a.highConst)),a.hasOwnProperty("lows")&&a.lows.forEach(function(a){b.push(S(c,[">",">="],a))}),a.hasOwnProperty("highs")&&a.highs.forEach(function(a){b.push(S(c,["<","<="],a))}))}),b.length>1?"("+b.join(" && ")+")":b[0]},U=function(a){switch(a.type){case"SingletonNode":return f("ROOT");case"NoResultsNode":return f("EMPTY")+" "+g("/* empty result set */");case"EnumerateCollectionNode":return I[a.outVariable.id]=a.collection,f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* full collection scan"+(a.random?", random order":"")+" */");case"EnumerateListNode":return f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+O(a.inVariable)+" "+g("/* list iteration */");case"IndexNode":I[a.outVariable.id]=a.collection;var b=[];return a.indexes.forEach(function(c,d){var e=(a.reverse?"reverse ":"")+c.type+" index scan";(0===b.length||e!==b[b.length-1])&&b.push(e),c.collection=a.collection,c.node=a.id,a.condition.type&&"n-ary or"===a.condition.type?c.condition=Q(a.condition.subNodes[d]):c.condition="*",K.push(c)}),f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* "+b.join(", ")+" */");case"IndexRangeNode":I[a.outVariable.id]=a.collection;var c=a.index;return c.ranges=a.ranges.map(T).join(" || "),c.collection=a.collection,c.node=a.id,K.push(c),f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* "+(a.reverse?"reverse ":"")+a.index.type+" index scan */"); +a.helpExtended=a.createHelpHeadline("More help")+"Pager: \n > stop_pager() stop the pager output \n > start_pager() start the pager \nPretty printing: \n > stop_pretty_print() stop pretty printing \n > start_pretty_print() start pretty printing \nColor output: \n > stop_color_print() stop color printing \n > start_color_print() start color printing \nPrint function: \n > print(x) std. print function \n > print_plain(x) print without prettifying \n and without colors \n > clear() clear screen "}),module.define("@arangodb/graph-blueprint",function(a,b){var c=require("@arangodb"),d=require("@arangodb/is"),e=require("@arangodb/graph-common"),f=e.Edge,g=e.Graph,h=e.Vertex,i=e.GraphArray,j=e.Iterator,k=require("@arangodb/api/graph").GraphAPI;f.prototype.setProperty=function(a,b){var c,d=this._properties;return d[a]=b,this._graph.emptyCachedPredecessors(),c=k.putEdge(this._graph._properties._key,this._properties._key,d),this._properties=c.edge,a},h.prototype.edges=function(a,b){var c,d,e=new i;for(d=k.postEdges(this._graph._vertices._database,this._graph._properties._key,this,{filter:{direction:a,labels:b}});d.hasNext();)c=new f(this._graph,d.next()),e.push(c);return e},h.prototype.getInEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("in",a)},h.prototype.getOutEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("out",a)},h.prototype.getEdges=function(){var a=Array.prototype.slice.call(arguments);return this.edges("any",a)},h.prototype.inbound=function(){return this.getInEdges()},h.prototype.outbound=function(){return this.getOutEdges()},h.prototype.setProperty=function(a,b){var c,d=this._properties;return d[a]=b,c=k.putVertex(this._graph._properties._key,this._properties._key,d),this._properties=c.vertex,a},g.prototype.initialize=function(a,b,e){var f;return d.notExisty(b)&&d.notExisty(e)?f=k.getGraph(a):("object"==typeof b&&"function"==typeof b.name&&(b=b.name()),"object"==typeof e&&"function"==typeof e.name&&(e=e.name()),f=k.postGraph({_key:a,vertices:b,edges:e})),this._properties=f.graph,this._vertices=c.db._collection(this._properties.edgeDefinitions[0].from[0]),this._edges=c.db._collection(this._properties.edgeDefinitions[0].collection),this._verticesCache={},this._edgesCache={},this.predecessors={},this.distances={},this},g.getAll=function(){return k.getAllGraphs()},g.drop=function(a){k.deleteGraph(a)},g.prototype.drop=function(){k.deleteGraph(this._properties._key)},g.prototype._saveEdge=function(a,b,c,d){var e;return this.emptyCachedPredecessors(),d._key=a,d._from=b,d._to=c,e=k.postEdge(this._properties._key,d),new f(this,e.edge)},g.prototype._saveVertex=function(a,b){var c;return d.existy(a)&&(b._key=a),c=k.postVertex(this._properties._key,b),new h(this,c.vertex)},g.prototype._replaceVertex=function(a,b){k.putVertex(this._properties._key,a,b)},g.prototype._replaceEdge=function(a,b){k.putEdge(this._properties._key,a,b)},g.prototype.getVertex=function(a){var b=k.getVertex(this._properties._key,a);return d.notExisty(b)?null:new h(this,b.vertex)},g.prototype.getVertices=function(){var a=k.getVertices(this._vertices._database,this._properties._key,{}),b=this,c=function(a){return new h(b,a)};return new j(c,a,"[vertex iterator]")},g.prototype.getEdge=function(a){var b=k.getEdge(this._properties._key,a);return d.notExisty(b)?null:new f(this,b.edge)},g.prototype.getEdges=function(){var a=k.getEdges(this._vertices._database,this._properties._key,{}),b=this,c=function(a){return new f(b,a)};return new j(c,a,"[edge iterator]")},g.prototype.removeVertex=function(a){this.emptyCachedPredecessors(),k.deleteVertex(this._properties._key,a._properties._key),a._properties=void 0},g.prototype.removeEdge=function(a){this.emptyCachedPredecessors(),k.deleteEdge(this._properties._key,a._properties._key),this._edgesCache[a._properties._id]=void 0,a._properties=void 0},a.Edge=f,a.Graph=g,a.Vertex=h,a.GraphArray=i,require("@arangodb/graph/algorithms-common")}),module.define("@arangodb/index",function(a,b){"use strict";var c=require("internal"),d=require("@arangodb/common");if(Object.keys(d).forEach(function(b){a[b]=d[b]}),a.isServer=!1,a.isClient=!0,a.ArangoCollection=require("@arangodb/arango-collection").ArangoCollection,a.ArangoConnection=c.ArangoConnection,a.ArangoDatabase=require("@arangodb/arango-database").ArangoDatabase,a.ArangoStatement=require("@arangodb/arango-statement").ArangoStatement,a.ArangoQueryCursor=require("@arangodb/arango-query-cursor").ArangoQueryCursor,"undefined"!=typeof c.arango)try{a.arango=c.arango,a.db=new a.ArangoDatabase(c.arango),c.db=a.db}catch(e){c.print("cannot connect to server: "+String(e))}a.plainServerVersion=function(){if(c.arango){var a=c.arango.getVersion(),b=a.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);return null!==b&&(a=b[1]),a}return void 0}}),module.define("@arangodb/replication",function(a,b){"use strict";var c=require("internal"),d=require("@arangodb/arangosh"),e={},f={};e.state=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-state");return d.checkRequestResult(b),b},e.tickRanges=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-tick-ranges");return d.checkRequestResult(b),b},e.firstTick=function(){var a=c.db,b=a._connection.GET("/_api/replication/logger-first-tick");return d.checkRequestResult(b),b.firstTick},f.start=function(a,b){var e=c.db,f="";void 0!==a&&(f="?from="+encodeURIComponent(a)),void 0!==b&&(f+=""===f?"?":"&",f+="barrierId="+encodeURIComponent(b));var g=e._connection.PUT("/_api/replication/applier-start"+f,"");return d.checkRequestResult(g),g},f.stop=f.shutdown=function(){var a=c.db,b=a._connection.PUT("/_api/replication/applier-stop","");return d.checkRequestResult(b),b},f.state=function(){var a=c.db,b=a._connection.GET("/_api/replication/applier-state");return d.checkRequestResult(b),b},f.forget=function(){var a=c.db,b=a._connection.DELETE("/_api/replication/applier-state");return d.checkRequestResult(b),b},f.properties=function(a){var b,e=c.db;return b=void 0===a?e._connection.GET("/_api/replication/applier-config"):e._connection.PUT("/_api/replication/applier-config",JSON.stringify(a)),d.checkRequestResult(b),b};var g=function(a,b){var e=c.db;a.hasOwnProperty("progress")||(a.progress=!0),c.sleep(1);for(var g=0;;){var h=e._connection.PUT("/_api/job/"+encodeURIComponent(b),"");if(d.checkRequestResult(h),204!==h.code)return h;if(++g,6>g?c.sleep(2):c.sleep(3),a.progress&&g%3===0)try{var i=f.state().state.progress,j=i.time+": "+i.message;c.print("still sychronizing... last received status: "+j)}catch(k){}}},h=function(a){var b=c.db,e=JSON.stringify(a||{}),f={"X-Arango-Async":"store"},h=b._connection.PUT_RAW("/_api/replication/sync",e,f);return d.checkRequestResult(h),a.async?h.headers["x-arango-async-id"]:g(a,h.headers["x-arango-async-id"])},i=function(a,b){return b=b||{},b.restrictType="include",b.restrictCollections=[a],b.includeSystem=!0,h(b)},j=function(a){a=a||{},a.hasOwnProperty("autoStart")||(a.autoStart=!0),a.hasOwnProperty("includeSystem")||(a.includeSystem=!0),a.hasOwnProperty("verbose")||(a.verbose=!1);var b=c.db,e=JSON.stringify(a),f={"X-Arango-Async":"store"},h=b._connection.PUT_RAW("/_api/replication/make-slave",e,f);return d.checkRequestResult(h),a.async?h.headers["x-arango-async-id"]:g(a,h.headers["x-arango-async-id"])},k=function(a){var b=c.db,e=b._connection.PUT_RAW("/_api/job/"+encodeURIComponent(a),"");return d.checkRequestResult(e),e.headers.hasOwnProperty("x-arango-async-id")?JSON.parse(e.body):!1},l=function(){var a=c.db,b=a._connection.GET("/_api/replication/server-id");return d.checkRequestResult(b),b.serverId};a.logger=e,a.applier=f,a.sync=h,a.syncCollection=i,a.setupReplication=j,a.getSyncResult=k,a.serverId=l}),module.define("@arangodb/simple-query",function(a,b){var c=require("@arangodb/arangosh"),d=require("@arangodb/arango-query-cursor").ArangoQueryCursor,e=require("@arangodb/simple-query-common"),f=e.GeneralArrayCursor,g=e.SimpleQueryAll,h=e.SimpleQueryArray,i=e.SimpleQueryByExample,j=e.SimpleQueryByCondition,k=e.SimpleQueryFulltext,l=e.SimpleQueryGeo,m=e.SimpleQueryNear,n=e.SimpleQueryRange,o=e.SimpleQueryWithin,p=e.SimpleQueryWithinRectangle;g.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name()};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/all",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},i.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),example:this._example};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e="by-example";if(this.hasOwnProperty("_type"))switch(b.index=this._index,this._type){case"hash":e="by-example-hash";break;case"skiplist":e="by-example-skiplist"}var f=this._collection._database._connection.PUT("/_api/simple/"+e,JSON.stringify(b));c.checkRequestResult(f),this._execution=new d(this._collection._database,f),f.hasOwnProperty("count")&&(this._countQuery=f.count,this._countTotal=f.count)}},j.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),condition:this._condition};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e="by-condition";if(this.hasOwnProperty("_type"))switch(b.index=this._index,this._type){case"skiplist":e="by-condition-skiplist"}var f=this._collection._database._connection.PUT("/_api/simple/"+e,JSON.stringify(b));c.checkRequestResult(f),this._execution=new d(this._collection._database,f),f.hasOwnProperty("count")&&(this._countQuery=f.count,this._countTotal=f.count)}},n.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),attribute:this._attribute,right:this._right,left:this._left,closed:1===this._type};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/range",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},m.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude:this._latitude,longitude:this._longitude};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/near",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},o.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude:this._latitude,longitude:this._longitude,radius:this._radius};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/within",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},p.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),latitude1:this._latitude1,longitude1:this._longitude1,latitude2:this._latitude2,longitude2:this._longitude2};null!==this._limit&&(b.limit=this._limit),null!==this._skip&&(b.skip=this._skip),null!==this._index&&(b.geo=this._index),null!==this._distance&&(b.distance=this._distance),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/within-rectangle",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},k.prototype.execute=function(a){if(null===this._execution){void 0!==a&&a>0&&(this._batchSize=a);var b={collection:this._collection.name(),attribute:this._attribute,query:this._query};null!==this._limit&&(b.limit=this._limit),null!==this._index&&(b.index=this._index),null!==this._skip&&(b.skip=this._skip),null!==this._batchSize&&(b.batchSize=this._batchSize);var e=this._collection._database._connection.PUT("/_api/simple/fulltext",JSON.stringify(b));c.checkRequestResult(e),this._execution=new d(this._collection._database,e),e.hasOwnProperty("count")&&(this._countQuery=e.count)}},a.GeneralArrayCursor=f,a.SimpleQueryAll=g,a.SimpleQueryArray=h,a.SimpleQueryByExample=i,a.SimpleQueryByCondition=j,a.SimpleQueryFulltext=k,a.SimpleQueryGeo=l,a.SimpleQueryNear=m,a.SimpleQueryRange=n,a.SimpleQueryWithin=o,a.SimpleQueryWithinRectangle=p}),module.define("@arangodb/tutorial",function(a,b){var c=0,d="Type 'tutorial' again to get to the next chapter.",e=[{title:"Welcome to the tutorial!",text:"This is a user-interactive tutorial on ArangoDB and the ArangoDB shell.\nIt will give you a first look into ArangoDB and how it works."},{title:"JavaScript Shell",text:"On this shell's prompt, you can issue arbitrary JavaScript commands.\nSo you are able to do things like...:\n\n number = 123;\n number = number * 10;"},{title:"Running Complex Instructions",text:"You can also run more complex instructions, such as for loops:\n\n for (i = 0; i < 10; i++) { number = number + 1; }"},{title:"Printing Results",text:'As you can see, the result of the last command executed is printed automatically. To explicitly print a value at any other time, there is the print function:\n\n for (i = 0; i < 5; ++i) { print("I am a JavaScript shell"); }'},{title:"Creating Collections",text:"ArangoDB is a document database. This means that we store data as documents (which are similar to JavaScript objects) in so-called 'collections'. Let's create a collection named 'places' now:\n\n db._create('places');\n\nNote: each collection is identified by a unique name. Trying to create a collection that already exists will produce an error."},{title:"Displaying Collections",text:"Now you can take a look at the collection(s) you just created:\n\n db._collections();\n\nPlease note that all collections will be returned, including ArangoDB's pre-defined system collections."},{title:"Creating Documents",text:'Now we have a collection, but it is empty. So let\'s create some documents!\n\n db.places.save({ _key : "foo", city : "foo-city" });\n for (i = 0; i <= 10; i++) { db.places.save({ _key: "example" + i, zipcode: i }) };'},{title:"Displaying All Documents",text:"You want to take a look at your docs? No problem:\n\n db.places.toArray();"},{title:"Counting Documents",text:"To see how many documents there are in a collection, use the 'count' method:\n\n db.places.count();"},{title:"Retrieving Single Documents",text:"As you can see, each document has some meta attributes '_id', '_key' and '_rev'.\nThe '_key' attribute can be used to quickly retrieve a single document from a collection:\n\n db.places.document(\"foo\");\n db.places.document(\"example5\");"},{title:"Retrieving Single Documents",text:"The '_id' attribute can also be used to retrieve documents using the 'db' object:\n\n db._document(\"places/foo\");\n db._document(\"places/example5\");"},{title:"Modifying Documents",text:'You can modify existing documents. Try to add a new attribute to a document and verify whether it has been added:\n\n db._update("places/foo", { zipcode: 39535 });\n db._document("places/foo");'},{title:"Document Revisions",text:"Note that after updating the document, its '_rev' attribute changed automatically.\nThe '_rev' attribute contains a document revision number, and it can be used for conditional modifications. Here's an example of how to avoid lost updates in case multiple clients are accessing the documents in parallel:\n\n doc = db._document(\"places/example1\");\n db._update(\"places/example1\", { someValue: 23 });\n db._update(doc, { someValue: 42 });\n\nNote that the first update will succeed because it was unconditional. The second update however is conditional because we're also passing the document's revision id in the first parameter to _update. As the revision id we're passing to update does not match the document's current revision anymore, the update is rejected."},{title:"Removing Documents",text:'Deleting single documents can be achieved by providing the document _id or _key:\n\n db._remove("places/example7");\n db.places.remove("example8");\n db.places.count();'},{title:"Searching Documents",text:'Searching for documents with specific attributes can be done by using the byExample method:\n\n db._create("users");\n for (i = 0; i < 10; ++i) { db.users.save({ name: "username" + i, active: (i % 3 == 0), age: 30 + i }); }\n db.users.byExample({ active: false }).toArray();\n db.users.byExample({ name: "username3", active: true }).toArray();\n'},{title:"Running AQL Queries",text:'ArangoDB also provides a query language for more complex matching:\n\n db._query("FOR u IN users FILTER u.active == true && u.age >= 33 RETURN { username: u.name, age: u.age }").toArray();'},{title:"Using Databases",text:"By default, the ArangoShell connects to the default database. The default database is named '_system'. To create another database, use the '_createDatabase' method of the 'db' object. To switch into an existing database, use '_useDatabase'. To get rid of a database and all of its collections, use '_dropDatabase':\n\n db._createDatabase(\"mydb\");\n db._useDatabase(\"mydb\");\n db._dropDatabase(\"mydb\");"}];a._PRINT=function(a){function b(a){return a.replace(/\n {2}(.+?)(?=\n)/g,"\n "+f.COLOR_MAGENTA+"$1"+f.COLOR_RESET)}var f=require("internal").COLORS,g=f.COLOR_BOLD_BLUE+(c+1)+". "+e[c].title+f.COLOR_RESET;a.output+="\n\n"+g+"\n\n"+b(e[c].text+"\n")+"\n",++c,c>=e.length?(a.output+="Congratulations! You finished the tutorial.\n",c=0):a.output+=d+"\n"}}),module.define("@arangodb/aql/explainer",function(a,b){function c(a){"use strict";["COLOR_RESET","COLOR_CYAN","COLOR_BLUE","COLOR_GREEN","COLOR_MAGENTA","COLOR_YELLOW","COLOR_RED","COLOR_WHITE","COLOR_BOLD_CYAN","COLOR_BOLD_BLUE","COLOR_BOLD_GREEN","COLOR_BOLD_MAGENTA","COLOR_BOLD_YELLOW","COLOR_BOLD_RED","COLOR_BOLD_WHITE"].forEach(function(b){C[b]=a?A[b]:""})}function d(a,b){"use strict";return a&&a.subNodes&&a.subNodes.length>1?"("+b+")":b}function e(a){"use strict";return"`"+a+"`"}function f(a){"use strict";return C.COLOR_CYAN+a+C.COLOR_RESET}function g(a){"use strict";return C.COLOR_BLUE+a+C.COLOR_RESET}function h(a){"use strict";return"string"==typeof a&&a.length>1024?C.COLOR_GREEN+a.substr(0,1024)+"..."+C.COLOR_RESET:C.COLOR_GREEN+a+C.COLOR_RESET}function i(a){"use strict";return"#"===a[0]?C.COLOR_MAGENTA+a+C.COLOR_RESET:C.COLOR_YELLOW+a+C.COLOR_RESET}function j(a){"use strict";return C.COLOR_GREEN+a+C.COLOR_RESET}function k(a){"use strict";return C.COLOR_RED+a+C.COLOR_RESET}function l(a){"use strict";return"`"+C.COLOR_YELLOW+a+C.COLOR_RESET+"`"}function m(a){"use strict";return C.COLOR_MAGENTA+a+C.COLOR_RESET}function n(a){"use strict";return C.COLOR_BOLD_BLUE+a+C.COLOR_RESET}function o(a){"use strict";return 0>a&&(a=0),new Array(a).join(" ")}function p(a,b){"use strict";var c=".{1,"+b+"}(\\s|$)|\\S+?(\\s|$)";return a.match(new RegExp(c,"g")).join("\n")}function q(a){"use strict";var b=4096;a.length>b?(D.appendLine(n("Query string (truncated):")),a=a.substr(0,b/2)+" ... "+a.substr(a.length-b/2)):D.appendLine(n("Query string:")),D.appendLine(" "+h(p(a,100).replace(/\n+/g,"\n ",a))),D.appendLine()}function r(a){"use strict";if(void 0!==a){D.appendLine(n("Write query options:"));var b=Object.keys(a),c="Option".length;b.forEach(function(a){a.length>c&&(c=a.length)}),D.appendLine(" "+m("Option")+o(1+c-"Option".length)+" "+m("Value")),b.forEach(function(b){D.appendLine(" "+f(b)+o(1+c-b.length)+" "+h(JSON.stringify(a[b])))}),D.appendLine()}}function s(a){"use strict";if(D.appendLine(n("Optimization rules applied:")),0===a.length)D.appendLine(" "+h("none"));else{var b=String("Id").length;D.appendLine(" "+o(1+b-String("Id").length)+m("Id")+" "+m("RuleName"));for(var c=0;cb&&(b=d),d=a.type.length,d>j&&(j=d),d=a.fields.map(e).join(", ").length+"[ ]".length,d>q&&(q=d),d=a.collection.length,d>c&&(c=d)});var r=" "+o(1+b-String("By").length)+m("By")+" "+m("Type")+o(1+j-"Type".length)+" "+m("Collection")+o(1+c-"Collection".length)+" "+m("Unique")+o(1+d-"Unique".length)+" "+m("Sparse")+o(1+g-"Sparse".length)+" "+m("Selectivity")+" "+m("Fields")+o(1+q-"Fields".length)+" "+m("Ranges");D.appendLine(r);for(var s=0;sb&&(b=g),a.minMaxDepthLen>c&&(c=a.minMaxDepthLen),a.hasOwnProperty("ConditionStr")&&a.ConditionStr.length>f&&(f=a.ConditionStr.length),a.hasOwnProperty("vertexCollectionNameStr")&&a.vertexCollectionNameStrLen>d&&(d=a.vertexCollectionNameStrLen),a.hasOwnProperty("edgeCollectionNameStr")&&a.edgeCollectionNameStrLen>e&&(e=a.edgeCollectionNameStrLen)});var g=" "+o(1+b-String("Id").length)+m("Id")+" "+m("Depth")+o(1+c-String("Depth").length)+" "+m("Vertex collections")+o(1+d-"Vertex collections".length)+" "+m("Edge collections")+o(1+e-"Edge collections".length)+" "+m("Filter conditions");D.appendLine(g);for(var h=0;hz&&(z=String(a.id).length),String(a.type).length>w&&(w=String(a.type).length),String(a.site).length>x&&(x=String(a.site).length),String(a.estimatedNrItems).length>A&&(A=String(a.estimatedNrItems).length)});for(var d=a.length,f="COOR";d>0;){--d;var g=a[d];g.site=f,"RemoteNode"===g.type&&(f="COOR"===f?"DBS":"COOR")}};F(C.nodes,0);var G,H={},I={},J={},K=[],L=[],M=!0,N=null,O=function(a){try{if(/^[0-9_]/.test(a.name))return i("#"+a.name)}catch(b){throw B(a),b}return I.hasOwnProperty(a.id)&&(J[a.name]=I[a.id]),i(a.name)},P=function(){},Q=function ga(a){var c=!0;a:for(;c;){var e=a;c=!1;var i=function(a,b){var c=ga(a.subNodes[0]),d=ga(a.subNodes[1]);return 3===a.subNodes.length&&(b=a.subNodes[2].quantifier+" "+b),a.sorted?c+" "+b+" "+g("/* sorted */")+" "+d:c+" "+b+" "+d};if(M=M&&-1!==["value","object","object element","array"].indexOf(e.type),"attribute access"!==e.type&&e.hasOwnProperty("subNodes"))for(var m=0;m20?"{ "+e.subNodes.slice(0,20).map(ga).join(", ")+", ... }":"{ "+e.subNodes.map(ga).join(", ")+" }":"{ }";case"object element":return h(JSON.stringify(e.name))+" : "+ga(e.subNodes[0]);case"calculated object element":return"[ "+ga(e.subNodes[0])+" ] : "+ga(e.subNodes[1]);case"array":return e.hasOwnProperty("subNodes")?e.subNodes.length>20?"[ "+e.subNodes.slice(0,20).map(ga).join(", ")+", ... ]":"[ "+e.subNodes.map(ga).join(", ")+" ]":"[ ]";case"unary not":return"! "+ga(e.subNodes[0]);case"unary plus":return"+ "+ga(e.subNodes[0]);case"unary minus":return"- "+ga(e.subNodes[0]);case"array limit":return ga(e.subNodes[0])+", "+ga(e.subNodes[1]);case"attribute access":if("reference"===e.subNodes[0].type&&I.hasOwnProperty(e.subNodes[0].id)){var p=I[e.subNodes[0].id],q=y._collection(p);if(null!==q){var r=3===q.type(),s="_"===e.name[0];(s&&-1===["_key","_id","_rev"].concat(r?["_from","_to"]:[]).indexOf(e.name)||!s&&r&&-1!==["from","to"].indexOf(e.name))&&P(b.warnings,N,"reference to potentially non-existing attribute '"+e.name+"'")}}return ga(e.subNodes[0])+"."+l(e.name);case"indexed access":return ga(e.subNodes[0])+"["+ga(e.subNodes[1])+"]";case"range":return ga(e.subNodes[0])+" .. "+ga(e.subNodes[1])+" "+g("/* range */");case"expand":case"expansion":e.subNodes.length>2?H[e.subNodes[0].subNodes[0].name]=[e.levels,e.subNodes[0].subNodes[1],e.subNodes[2],e.subNodes[3],e.subNodes[4]]:H[e.subNodes[0].subNodes[0].name]=e.subNodes[0].subNodes[1],a=e.subNodes[1],c=!0,i=m=n=o=p=q=r=s=void 0;continue a;case"user function call":return j(e.name)+"("+(e.subNodes&&e.subNodes[0].subNodes||[]).map(ga).join(", ")+") "+g("/* user-defined function */");case"function call":return j(e.name)+"("+(e.subNodes&&e.subNodes[0].subNodes||[]).map(ga).join(", ")+")";case"plus":return"("+i(e,"+")+")";case"minus":return"("+i(e,"-")+")";case"times":return"("+i(e,"*")+")";case"division":return"("+i(e,"/")+")";case"modulus":return"("+i(e,"%")+")";case"compare not in":case"array compare not in":return"("+i(e,"not in")+")";case"compare in":case"array compare in":return"("+i(e,"in")+")";case"compare ==":case"array compare ==":return"("+i(e,"==")+")";case"compare !=":case"array compare !=":return"("+i(e,"!=")+")";case"compare >":case"array compare >":return"("+i(e,">")+")";case"compare >=":case"array compare >=":return"("+i(e,">=")+")";case"compare <":case"array compare <":return"("+i(e,"<")+")";case"compare <=":case"array compare <=":return"("+i(e,"<=")+")";case"logical or":return"("+i(e,"||")+")";case"logical and":return"("+i(e,"&&")+")";case"ternary":return"("+ga(e.subNodes[0])+" ? "+ga(e.subNodes[1])+" : "+ga(e.subNodes[2])+")";case"n-ary or":return e.hasOwnProperty("subNodes")?d(e,e.subNodes.map(function(a){return ga(a)}).join(" || ")):"";case"n-ary and":return e.hasOwnProperty("subNodes")?d(e,e.subNodes.map(function(a){return ga(a)}).join(" && ")):"";default:return"unhandled node type ("+e.type+")"}}},R=function(a){var b="";for(var c in a)if(a.hasOwnProperty(c)){b.length>0&&(b+=" AND ");for(var d=0;d ",b+=Q(e.varAccess),b+=" "+e.comparisonTypeStr+" ",b+=Q(e.compareTo)}}return b},S=function(a,b,c){var d=c.isConstant?h(JSON.stringify(c.bound)):Q(c.bound);return l(a)+" "+b[c.include?1:0]+" "+d},T=function(a){var b=[];return a.forEach(function(a){var c=a.attr;a.lowConst.hasOwnProperty("bound")&&a.highConst.hasOwnProperty("bound")&&JSON.stringify(a.lowConst.bound)===JSON.stringify(a.highConst.bound)&&(a.equality=!0),a.equality?a.lowConst.hasOwnProperty("bound")?b.push(S(c,["==","=="],a.lowConst)):a.hasOwnProperty("lows")&&a.lows.forEach(function(a){b.push(S(c,["==","=="],a))}):(a.lowConst.hasOwnProperty("bound")&&b.push(S(c,[">",">="],a.lowConst)),a.highConst.hasOwnProperty("bound")&&b.push(S(c,["<","<="],a.highConst)),a.hasOwnProperty("lows")&&a.lows.forEach(function(a){b.push(S(c,[">",">="],a))}),a.hasOwnProperty("highs")&&a.highs.forEach(function(a){b.push(S(c,["<","<="],a))}))}),b.length>1?"("+b.join(" && ")+")":b[0]},U=function(a){switch(a.type){case"SingletonNode":return f("ROOT");case"NoResultsNode":return f("EMPTY")+" "+g("/* empty result set */");case"EnumerateCollectionNode":return I[a.outVariable.id]=a.collection,f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* full collection scan"+(a.random?", random order":"")+" */");case"EnumerateListNode":return f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+O(a.inVariable)+" "+g("/* list iteration */");case"IndexNode":I[a.outVariable.id]=a.collection;var b=[];return a.indexes.forEach(function(c,d){var e=(a.reverse?"reverse ":"")+c.type+" index scan";(0===b.length||e!==b[b.length-1])&&b.push(e),c.collection=a.collection,c.node=a.id,a.condition.type&&"n-ary or"===a.condition.type?c.condition=Q(a.condition.subNodes[d]):c.condition="*",K.push(c)}),f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* "+b.join(", ")+" */");case"IndexRangeNode":I[a.outVariable.id]=a.collection;var c=a.index;return c.ranges=a.ranges.map(T).join(" || "),c.collection=a.collection,c.node=a.id,K.push(c),f("FOR")+" "+O(a.outVariable)+" "+f("IN")+" "+k(a.collection)+" "+g("/* "+(a.reverse?"reverse ":"")+a.index.type+" index scan */"); case"TraversalNode":a.minMaxDepth=a.minDepth+".."+a.maxDepth,a.minMaxDepthLen=a.minMaxDepth.length;var d=f("FOR ")+O(a.vertexOutVariable)+" "+g("/* vertex */");a.hasOwnProperty("edgeOutVariable")&&(d+=" , "+O(a.edgeOutVariable)+" "+g("/* edge */")),a.hasOwnProperty("pathOutVariable")&&(d+=" , "+O(a.pathOutVariable)+" "+g("/* paths */")),d+=" "+f("IN")+" "+h(a.minMaxDepth)+" "+g("/* min..maxPathDepth */")+" ";var e=["ANY","INBOUND","OUTBOUND"],i=a.directions[0];d+=f(e[i]),d+=a.hasOwnProperty("vertexId")?" '"+h(a.vertexId)+"' ":" "+O(a.inVariable)+" ",d+=g("/* startnode */")+" ",d+=Array.isArray(a.graph)?a.graph.map(function(b,c){var d="";return a.directions[c]!==i&&(d+=f(e[a.directions[c]]),d+=" "),d+k(b)}).join(", "):f("GRAPH")+" '"+h(a.graph)+"'",L.push(a),a.hasOwnProperty("simpleExpressions")&&(a.ConditionStr=R(a.simpleExpressions));var l=[];if(a.hasOwnProperty("graphDefinition")){var m=[];a.graphDefinition.vertexCollectionNames.forEach(function(a){m.push(k(a))}),a.vertexCollectionNameStr=m.join(", "),a.vertexCollectionNameStrLen=a.graphDefinition.vertexCollectionNames.join(", ").length,a.graphDefinition.edgeCollectionNames.forEach(function(a){l.push(k(a))}),a.edgeCollectionNameStr=l.join(", "),a.edgeCollectionNameStrLen=a.graphDefinition.edgeCollectionNames.join(", ").length}else{var n=a.graph||[];n.forEach(function(a){l.push(k(a))}),a.edgeCollectionNameStr=l.join(", "),a.edgeCollectionNameStrLen=n.join(", ").length,a.graph=""}return d;case"CalculationNode":return f("LET")+" "+O(a.outVariable)+" = "+Q(a.expression)+" "+g("/* "+a.expressionType+" expression */");case"FilterNode":return f("FILTER")+" "+O(a.inVariable);case"AggregateNode":return f("COLLECT")+" "+a.aggregates.map(function(a){return O(a.outVariable)+" = "+O(a.inVariable)}).join(", ")+(a.count?" "+f("WITH COUNT"):"")+(a.outVariable?" "+f("INTO")+" "+O(a.outVariable):"")+(a.keepVariables?" "+f("KEEP")+" "+a.keepVariables.map(function(a){return O(a)}).join(", "):"")+" "+g("/* "+a.aggregationOptions.method+" */");case"CollectNode":var o=f("COLLECT")+" "+a.groups.map(function(a){return O(a.outVariable)+" = "+O(a.inVariable)}).join(", ");return a.hasOwnProperty("aggregates")&&a.aggregates.length>0&&(a.groups.length>0&&(o+=" "),o+=f("AGGREGATE")+" "+a.aggregates.map(function(a){return O(a.outVariable)+" = "+j(a.type)+"("+O(a.inVariable)+")"}).join(", ")),o+=(a.count?" "+f("WITH COUNT"):"")+(a.outVariable?" "+f("INTO")+" "+O(a.outVariable):"")+(a.keepVariables?" "+f("KEEP")+" "+a.keepVariables.map(function(a){return O(a)}).join(", "):"")+" "+g("/* "+a.collectOptions.method+"*/");case"SortNode":return f("SORT")+" "+a.elements.map(function(a){return O(a.inVariable)+" "+f(a.ascending?"ASC":"DESC")}).join(", ");case"LimitNode":return f("LIMIT")+" "+h(JSON.stringify(a.offset))+", "+h(JSON.stringify(a.limit));case"ReturnNode":return f("RETURN")+" "+O(a.inVariable);case"SubqueryNode":return f("LET")+" "+O(a.outVariable)+" = ... "+g("/* subquery */");case"InsertNode":return G=a.modificationFlags,f("INSERT")+" "+O(a.inVariable)+" "+f("IN")+" "+k(a.collection);case"UpdateNode":return G=a.modificationFlags,a.hasOwnProperty("inKeyVariable")?f("UPDATE")+" "+O(a.inKeyVariable)+" "+f("WITH")+" "+O(a.inDocVariable)+" "+f("IN")+" "+k(a.collection):f("UPDATE")+" "+O(a.inDocVariable)+" "+f("IN")+" "+k(a.collection);case"ReplaceNode":return G=a.modificationFlags,a.hasOwnProperty("inKeyVariable")?f("REPLACE")+" "+O(a.inKeyVariable)+" "+f("WITH")+" "+O(a.inDocVariable)+" "+f("IN")+" "+k(a.collection):f("REPLACE")+" "+O(a.inDocVariable)+" "+f("IN")+" "+k(a.collection);case"UpsertNode":return G=a.modificationFlags,f("UPSERT")+" "+O(a.inDocVariable)+" "+f("INSERT")+" "+O(a.insertVariable)+" "+f(a.isReplace?"REPLACE":"UPDATE")+" "+O(a.updateVariable)+" "+f("IN")+" "+k(a.collection);case"RemoveNode":return G=a.modificationFlags,f("REMOVE")+" "+O(a.inVariable)+" "+f("IN")+" "+k(a.collection);case"RemoteNode":return f("REMOTE");case"DistributeNode":return f("DISTRIBUTE");case"ScatterNode":return f("SCATTER");case"GatherNode":return f("GATHER")}return"unhandled node type ("+a.type+")"},V=0,W=[],X=function(a,b){return o(1+a+a)+(b?"* ":"- ")},Y=function(a){J={},N=a.id,M=!0,"SubqueryNode"===a.type&&W.push(V)},Z=function(a){var b=!e.hasOwnProperty(a.id);-1!==["EnumerateCollectionNode","EnumerateListNode","IndexRangeNode","IndexNode","SubqueryNode"].indexOf(a.type)?V++:b&&W.length>0?V=W.pop():"SingletonNode"===a.type&&V++},$=function(){return M?" "+g("/* const assignment */"):""},_=function(){var a=[];for(var b in J)J.hasOwnProperty(b)&&a.push(i(b)+" : "+k(J[b]));return a.length>0?" "+g("/* collections used:")+" "+a.join(", ")+" "+g("*/"):""},aa=function(a){Y(a);var b=" "+o(1+z-String(a.id).length)+i(a.id)+" "+f(a.type)+o(1+w-String(a.type).length)+" ";E&&E.isCluster&&E.isCluster()&&(b+=i(a.site)+o(1+x-String(a.site).length)+" "),b+=o(1+A-String(a.estimatedNrItems).length)+h(a.estimatedNrItems)+" "+X(V,"SingletonNode"===a.type)+U(a),"CalculationNode"===a.type&&(b+=_()+$()),D.appendLine(b),Z(a)};q(a),D.appendLine(n("Execution plan:"));var ba=" "+o(1+z-String("Id").length)+m("Id")+" "+m("NodeType")+o(1+w-String("NodeType").length)+" ";E&&E.isCluster&&E.isCluster()&&(ba+=m("Site")+o(1+x-String("Site").length)+" "),ba+=o(1+A-String("Est.").length)+m("Est.")+" "+m("Comment"),D.appendLine(ba);for(var ca=[p];ca.length>0;){var da=ca.pop(),ea=c[da];aa(ea),e.hasOwnProperty(da)&&(ca=ca.concat(e[da])),"SubqueryNode"===ea.type&&(ca=ca.concat([ea.subquery.nodes[0].id]))}D.appendLine(),u(K),v(L),D.appendLine(),s(C.rules),r(G),t(b.warnings)}function x(a,b,d){"use strict";if("string"==typeof a&&(a={query:a}),!(a instanceof Object))throw"ArangoStatement needs initial data";void 0===b&&(b=a.options),b=b||{},c(void 0===b.colors?!0:b.colors);var e=y._createStatement(a),f=e.explain(b);return D.clearOutput(),w(a.query,f,!0),void 0===d||d?void B(D.getOutput()):D.getOutput()}var y=require("@arangodb").db,z=require("internal"),A=z.COLORS,B=z.print,C={};"function"==typeof z.printBrowser&&(B=z.printBrowser);var D={output:"",appendLine:function(a){a?this.output+=a+"\n":this.output+="\n"},getOutput:function(){return this.output},clearOutput:function(){this.output=""}};a.explain=x}),module.define("@arangodb/aql/functions",function(a,b){var c=require("internal"),d=require("@arangodb"),e=d.db,f=d.ArangoError,g=function(){"use strict";var a=e._collection("_aqlfunctions");if(null===a){var b=new f;throw b.errorNum=d.errors.ERROR_ARANGO_COLLECTION_NOT_FOUND.code,b.errorMessage="collection '_aqlfunctions' not found",b}return a},h=function(a){"use strict";var b=[];if(null!==a&&void 0!==a&&a.length>0){var c=a.toUpperCase();a.length>1&&"::"!==a.substr(a.length-2,2)&&(c+="::"),g().toArray().forEach(function(a){a.name.toUpperCase().substr(0,c.length)===c&&b.push(a)})}else b=g().toArray();return b},i=function(a){"use strict";if("string"!=typeof a||!a.match(/^[a-zA-Z0-9_]+(::[a-zA-Z0-9_]+)+$/)||"_"===a.substr(0,1)){var b=new f;throw b.errorNum=d.errors.ERROR_QUERY_FUNCTION_INVALID_NAME.code,b.errorMessage=d.errors.ERROR_QUERY_FUNCTION_INVALID_NAME.message,b}},j=function(a,b){"use strict";if("function"==typeof a&&(a=String(a)+"\n"),"string"==typeof a){if(a="("+a+"\n)",!c.parse)return a;try{if(c.parse(a,b))return a}catch(e){}}var g=new f;throw g.errorNum=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.code,g.errorMessage=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.message,g},k=function(a){"use strict";var b=null;i(a);try{b=g().document(a.toUpperCase())}catch(e){}if(null===b){var h=new f;throw h.errorNum=d.errors.ERROR_QUERY_FUNCTION_NOT_FOUND.code,h.errorMessage=c.sprintf(d.errors.ERROR_QUERY_FUNCTION_NOT_FOUND.message,a),h}return g().remove(b._id),c.reloadAqlFunctions(),!0},l=function(a){"use strict";if(0===a.length){var b=new f;throw b.errorNum=d.errors.ERROR_BAD_PARAMETER.code,b.errorMessage=d.errors.ERROR_BAD_PARAMETER.message,b}var e=0;return h(a).forEach(function(a){g().remove(a._id),e++}),e>0&&c.reloadAqlFunctions(),e},m=function(a,b,h){i(a),b=j(b,a);var k,l="(function() { var callback = "+b+"; return callback; })()";try{if(c&&c.hasOwnProperty("executeScript")){var m=c.executeScript(l,void 0,"(user function "+a+")");if("function"!=typeof m)throw k=new f,k.errorNum=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.code,k.errorMessage=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.message+": code must be contained in function",k}}catch(n){throw k=new f,k.errorNum=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.code,k.errorMessage=d.errors.ERROR_QUERY_FUNCTION_INVALID_CODE.message,k}var o=e._executeTransaction({collections:{write:g().name()},action:function(a){var b=!1,c=require("internal").db._collection(a.collection),d=a.name;try{var e=c.document(d.toUpperCase());null!==e&&(c.remove(e._key),b=!0)}catch(f){}var g={_key:d.toUpperCase(),name:d,code:a.code,isDeterministic:a.isDeterministic||!1};return c.save(g),b},params:{name:a,code:b,isDeterministic:h,collection:g().name()}});return c.reloadAqlFunctions(),o},n=function(a){"use strict";var b=[];return h(a).forEach(function(a){b.push({name:a.name,code:a.code.substr(1,a.code.length-2).trim()})}),b};a.unregister=k,a.unregisterGroup=l,a.register=m,a.toArray=n}),module.define("@arangodb/arango-collection-common",function(a,b){var c=require("@arangodb/arango-collection").ArangoCollection,d=require("@arangodb"),e=d.ArangoError,f=d.sprintf,g=d.db,h=require("@arangodb/simple-query"),i=h.SimpleQueryAll,j=h.SimpleQueryByExample,k=h.SimpleQueryByCondition,l=h.SimpleQueryRange,m=h.SimpleQueryGeo,n=h.SimpleQueryNear,o=h.SimpleQueryWithin,p=h.SimpleQueryWithinRectangle,q=h.SimpleQueryFulltext;c.STATUS_CORRUPTED=0,c.STATUS_NEW_BORN=1,c.STATUS_UNLOADED=2,c.STATUS_LOADED=3,c.STATUS_UNLOADING=4,c.STATUS_DELETED=5,c.STATUS_LOADING=6,c.TYPE_DOCUMENT=2,c.TYPE_EDGE=3,c.prototype._PRINT=function(a){var b="unknown",d="unknown",e=this.name();switch(this.status()){case c.STATUS_NEW_BORN:b="new born";break;case c.STATUS_UNLOADED:b="unloaded";break;case c.STATUS_UNLOADING:b="unloading";break;case c.STATUS_LOADED:b="loaded";break;case c.STATUS_CORRUPTED:b="corrupted";break;case c.STATUS_DELETED:b="deleted"}switch(this.type()){case c.TYPE_DOCUMENT:d="document";break;case c.TYPE_EDGE:d="edge"}var f=require("internal").COLORS,g=a.useColor;a.output+="[ArangoCollection ",g&&(a.output+=f.COLOR_NUMBER),a.output+=this._id,g&&(a.output+=f.COLOR_RESET),a.output+=', "',g&&(a.output+=f.COLOR_STRING),a.output+=e||"unknown",g&&(a.output+=f.COLOR_RESET),a.output+='" (type '+d+", status "+b+")]"},c.prototype.toString=function(){return"[ArangoCollection: "+this._id+"]"},c.prototype.all=function(){return new i(this)},c.prototype.byExample=function(a){var b,c;if(1===arguments.length)b=a;else for(b={},c=0;c=1?h=this.all():(c=f("FOR d IN %s FILTER rand() >= @prob RETURN d",this.name()),c=g._createStatement({query:c}),1>j&&c.bind("prob",j),h=c.execute());else{if("number"!=typeof k){var l=new e;throw l.errorNum=d.errors.ERROR_ILLEGAL_NUMBER.code,l.errorMessage="expecting a number, got "+String(k),l}j>=1?h=this.all().limit(k):(c=f("FOR d IN %s FILTER rand() >= @prob LIMIT %d RETURN d",this.name(),k),c=g._createStatement({query:c}),1>j&&c.bind("prob",j),h=c.execute())}for(i=0;h.hasNext();){var m=h.next();a(m,i),i++}},c.prototype.removeByExample=function(a,b,c){throw"cannot call abstract removeByExample function"},c.prototype.replaceByExample=function(a,b,c,d){throw"cannot call abstract replaceByExample function"},c.prototype.updateByExample=function(a,b,c,d,e){throw"cannot call abstract updateExample function"}}),module.define("@arangodb/arango-statement-common",function(a,b){function c(a,b){if(this._database=a,this._doCount=!1,this._batchSize=null,this._bindVars={},this._options=void 0,this._cache=void 0,!b)throw"ArangoStatement needs initial data";if("string"==typeof b?b={query:b}:"object"==typeof b&&"function"==typeof b.toAQL&&(b={query:b.toAQL()}),!(b instanceof Object))throw"ArangoStatement needs initial data";if(void 0===b.query||""===b.query)throw"ArangoStatement needs a valid query attribute";this.setQuery(b.query),b.bindVars instanceof Object&&this.bind(b.bindVars),b.options instanceof Object&&this.setOptions(b.options),void 0!==b.count&&this.setCount(b.count),void 0!==b.batchSize&&this.setBatchSize(b.batchSize),void 0!==b.cache&&this.setCache(b.cache)}c.prototype.bind=function(a,b){if(a instanceof Object){if(void 0!==b)throw"invalid bind parameter declaration";this._bindVars=a}else if("string"==typeof a)this._bindVars[a]=b;else{if("number"!=typeof a)throw"invalid bind parameter declaration";var c=String(parseInt(a,10));if(c!==String(a))throw"invalid bind parameter declaration";this._bindVars[c]=b}},c.prototype.getBindVariables=function(){return this._bindVars},c.prototype.getCache=function(){return this._cache},c.prototype.getCount=function(){return this._doCount},c.prototype.getBatchSize=function(){return this._batchSize},c.prototype.getOptions=function(){return this._options},c.prototype.getQuery=function(){return this._query},c.prototype.setCache=function(a){this._cache=a?!0:!1},c.prototype.setCount=function(a){this._doCount=a?!0:!1},c.prototype.setBatchSize=function(a){var b=parseInt(a,10);b>0&&(this._batchSize=b)},c.prototype.setOptions=function(a){this._options=a},c.prototype.setQuery=function(a){this._query=a&&"function"==typeof a.toAQL?a.toAQL():a},c.prototype.parse=function(){throw"cannot call abstract method parse()"},c.prototype.explain=function(){throw"cannot call abstract method explain()"},c.prototype.execute=function(){throw"cannot call abstract method execute()"},a.ArangoStatement=c}),module.define("@arangodb/common",function(a,b){"use strict";var c=require("internal"),d=require("fs"),e=require("@arangodb/mimetypes").mimeTypes;Object.keys(c.errors).forEach(function(b){a[b]=c.errors[b].code}),a.errors=c.errors,a.ArangoError=c.ArangoError,a.defineModule=function(a,e){var f,g,h;f=d.read(e),h=c.db._collection("_modules"),null===h&&(h=c.db._create("_modules",{isSystem:!0})),a=b.normalize(a),g=h.firstExample({path:a}),null===g?h.save({path:a,content:f}):h.replace(g,{path:a,content:f})},a.guessContentType=function(a,b){var c=/\.([a-zA-Z0-9]+)$/,d=c.exec(a);if(null!==d){var f=d[1];if(e.hasOwnProperty(f)){var g=e[f];return g[1]?g[0]+"; charset=utf-8":g[0]}}return b?b:"text/plain; charset=utf-8"},a.normalizeURL=function(a){var b,c,d,e,f,g;if(""===a)return"./";for(d=a.split("/"),"."===d[0]||".."===d[0]?(f=d[0]+"/",d.shift(),e=d):""===d[0]?(f="/",d.shift(),e=d):(f="./",e=d),c=[],b=0;b0&&(l=d[h]>=k.length?d[h]:k.length);var m=h;e.hasOwnProperty("rename")&&e.rename.hasOwnProperty(h)&&(m=e.rename[h]),f.push({id:h,fixedLength:l,length:l||m.length}),g[0][j++]=m}b.forEach(function(a,b){g[b+1]=[],f.forEach(function(c){if(a.hasOwnProperty(c.id)){var d;d=e.prettyStrings&&"string"==typeof a[c.id]?a[c.id]:JSON.stringify(a[c.id])||"",g[b+1].push(d),d.length>c.length&&!c.fixedLength&&(c.length=Math.min(d.length,100))}else g[b+1].push("")})});var n=function(){var b=[];return f.forEach(function(c){b.push(a.stringPadding("",c.length,"-","r"))}),e.framed?"+-"+b.join("-+-")+"-+\n":b.join(" ")+"\n"},o=function(){var d="";return e.framed&&(d+=n()),g.forEach(function(b,c){var g=[];b.forEach(function(c,d){var e=f[d].length,h=b[d];h.length>e&&(h=h.substr(0,e-k.length)+k),g.push(a.stringPadding(h,e," ","r"))}),d+=e.framed?"| "+g.join(" | ")+" |\n":g.join(" ")+"\n",0===c&&(d+=n())}),d+=n(),e.hideTotal||(d+=c.sprintf(e.totalString,String(b.length))),d};Array.isArray(b)&&(0===b.length?a.print(e.emptyString||"no document(s)"):a.print(o()))},a.stringPadding=function(a,b,c,d){function e(a,b){var c,d="";for(c=0;a>c;++c)d+=b;return d}if("undefined"==typeof b&&(b=0),"undefined"==typeof c&&(c=" "),b+1>=a.length)switch(d||"r"){case"l":a=e(b+1-a.length,c)+a;break;case"b":var f=b-a.length,g=Math.ceil(f/2),h=f-g;a=e(h+1,c)+a+e(g+1,c);break;default:a+=e(b+1-a.length,c)}return a},a.throwDownloadError=function(b){throw new a.ArangoError({errorNum:a.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.code,errorMessage:a.errors.ERROR_APPLICATION_DOWNLOAD_FAILED.message+": "+String(b)})},a.throwFileNotFound=function(b){throw new a.ArangoError({errorNum:a.errors.ERROR_FILE_NOT_FOUND.code,errorMessage:a.errors.ERROR_FILE_NOT_FOUND.message+": "+String(b)})},a.throwBadParameter=function(b){throw new a.ArangoError({errorNum:a.errors.ERROR_BAD_PARAMETER.code,errorMessage:a.errors.ERROR_BAD_PARAMETER.message+": "+String(b)})},a.checkParameter=function(b,c,d){var e;for(e=0;e0){var h=new f;throw h.errorNum=c.errors.ERROR_BAD_PARAMETER.code,h.errorMessage=d+": "+e.join(" and ")+" are not known to the graph",h}return!0},s=function(a,b){this.query=a,b&&(this.type=b)};s.prototype.printQuery=function(){return this.query},s.prototype.isPathQuery=function(){return"path"===this.type},s.prototype.isPathVerticesQuery=function(){return"pathVertices"===this.type},s.prototype.isPathEdgesQuery=function(){return"pathEdges"===this.type},s.prototype.isEdgeQuery=function(){return"edge"===this.type},s.prototype.isVertexQuery=function(){return"vertex"===this.type},s.prototype.isNeighborQuery=function(){return"neighbor"===this.type},s.prototype.allowsRestrict=function(){return this.isEdgeQuery()||this.isVertexQuery()||this.isNeighborQuery()};var t=function(a){this.stack=[],this.callStack=[],this.bindVars={graphName:a.__name},this.graph=a,this.cursor=null,this.lastVar="",this._path=[],this._pathVertices=[],this._pathEdges=[],this._getPath=!1};t.prototype._addToPrint=function(a){var b=Array.prototype.slice.call(arguments);b.shift();var c={};c.name=a,b.length>0&&void 0!==b[0]?c.params=b:c.params=[],this.callStack.push(c)},t.prototype._PRINT=function(a){a.output="[ GraphAQL ",a.output+=this.graph.__name,i.each(this.callStack,function(b){a.prettyPrint&&(a.output+="\n"),a.output+=".",a.output+=b.name,a.output+="(";var c=0;for(c=0;c0&&(a.output+=", "),d.printRecursive(b.params[c],a);a.output+=")"}),a.output+=" ] "},t.prototype._clearCursor=function(){this.cursor&&(this.cursor.dispose(),this.cursor=null)},t.prototype._createCursor=function(){this.cursor||(this.cursor=this.execute())},t.prototype._edges=function(a,b){this._clearCursor(),this.options=b||{};var c=q(a),d="edges_"+this.stack.length,e="FOR "+d+" IN GRAPH_EDGES(@graphName";e+=this.getLastVar()?","+this.getLastVar():",{}",e+=",@options_"+this.stack.length+")",Array.isArray(c)||(c=[c]),this.options.edgeExamples=c,this.options.includeData=!0,this.bindVars["options_"+this.stack.length]=this.options;var f=new s(e,"edge");return this.stack.push(f),this.lastVar=d,this._path.push(d),this._pathEdges.push(d),this},t.prototype.edges=function(a){return this._addToPrint("edges",a),this._edges(a,{direction:"any"})},t.prototype.outEdges=function(a){return this._addToPrint("outEdges",a),this._edges(a,{direction:"outbound"})},t.prototype.inEdges=function(a){return this._addToPrint("inEdges",a),this._edges(a,{direction:"inbound"})},t.prototype._vertices=function(a,b,c){this._clearCursor(),this.options=b||{};var d=q(a),e="vertices_"+this.stack.length,f="FOR "+e+" IN GRAPH_VERTICES(@graphName,";if(void 0!==c)if(Array.isArray(c)){var g;for(f+="[",g=0;g0&&(f+=","),f+="MERGE(@vertexExample_"+this.stack.length+","+c[g]+")";f+="]"}else f+=Array.isArray(d)?"@vertexExample_"+this.stack.length+" [ * RETURN MERGE(CURRENT,"+c+")]":"MERGE(@vertexExample_"+this.stack.length+","+c+")";else f+="@vertexExample_"+this.stack.length;f+=",@options_"+this.stack.length+")",this.bindVars["vertexExample_"+this.stack.length]=d,this.bindVars["options_"+this.stack.length]=this.options;var h=new s(f,"vertex");return this.stack.push(h),this.lastVar=e,this._path.push(e),this._pathVertices.push(e),this},t.prototype.vertices=function(a){if(this._addToPrint("vertices",a),!this.getLastVar())return this._vertices(a);var b=this.getLastVar();return this._vertices(a,void 0,["{'_id': "+b+"._from}","{'_id': "+b+"._to}"])},t.prototype.fromVertices=function(a){if(this._addToPrint("fromVertices",a),!this.getLastVar())return this._vertices(a);var b=this.getLastVar();return this._vertices(a,void 0,"{'_id': "+b+"._from}")},t.prototype.toVertices=function(a){if(this._addToPrint("toVertices",a),!this.getLastVar())return this._vertices(a);var b=this.getLastVar();return this._vertices(a,void 0,"{'_id': "+b+"._to}")},t.prototype.getLastVar=function(){return""===this.lastVar?!1:this.lastVar},t.prototype.path=function(){this._clearCursor();var a=new s("","path");return this.stack.push(a),this},t.prototype.pathVertices=function(){this._clearCursor();var a=new s("","pathVertices");return this.stack.push(a),this},t.prototype.pathEdges=function(){this._clearCursor();var a=new s("","pathEdges");return this.stack.push(a),this},t.prototype.neighbors=function(a,b){this._addToPrint("neighbors",a,b);var c,d=q(a),e="neighbors_"+this.stack.length,f="FOR "+e+" IN GRAPH_NEIGHBORS(@graphName,"+this.getLastVar()+",@options_"+this.stack.length+")";c=b?i.extend({},b):{},c.neighborExamples=d,c.includeData=!0,this.bindVars["options_"+this.stack.length]=c;var g=new s(f,"neighbor");return this.stack.push(g),this.lastVar=e,this._path.push(e),this._pathVertices.push(e),this},t.prototype._getLastRestrictableStatementInfo=function(){for(var a=this.stack.length-1;!this.stack[a].allowsRestrict();)a--;return{statement:this.stack[a],options:this.bindVars["options_"+a]}},t.prototype.restrict=function(a){var b=j(a);if(0===b.length)return this;this._addToPrint("restrict",a),this._clearCursor();var c,d=this._getLastRestrictableStatementInfo(),e=d.statement,f=d.options;return e.isEdgeQuery()?(r(this.graph._edgeCollections(),b,"edge collections"),c=f.edgeCollectionRestriction||[],f.edgeCollectionRestriction=c.concat(a)):(e.isVertexQuery()||e.isNeighborQuery())&&(r(this.graph._vertexCollections(),b,"vertex collections"),c=f.vertexCollectionRestriction||[],f.vertexCollectionRestriction=c.concat(a)),this},t.prototype.filter=function(a){this._addToPrint("filter",a),this._clearCursor();var b=[];if("[object Array]"!==Object.prototype.toString.call(a)){if("[object Object]"!==Object.prototype.toString.call(a)){var d=new f;throw d.errorNum=c.errors.ERROR_GRAPH_INVALID_EXAMPLE_ARRAY_OBJECT.code,d.errorMessage=c.errors.ERROR_GRAPH_INVALID_EXAMPLE_ARRAY_OBJECT.message,d}b=[a]}else b=a;var e="FILTER MATCHES("+this.getLastVar()+","+JSON.stringify(b)+")";return this.stack.push(new s(e)),this},t.prototype.printQuery=function(){return this.stack.map(function(a){return a.printQuery()}).join(" ")},t.prototype.execute=function(){this._clearCursor();var a=this.printQuery(),b=this.bindVars;return a+=this.stack[this.stack.length-1].isPathQuery()?" RETURN ["+this._path+"]":this.stack[this.stack.length-1].isPathVerticesQuery()?" RETURN FLATTEN(["+this._pathVertices+"])":this.stack[this.stack.length-1].isPathEdgesQuery()?" RETURN FLATTEN(["+this._pathEdges+"])":" RETURN "+this.getLastVar(),g._query(a,b,{count:!0})},t.prototype.toArray=function(){return this._createCursor(),this.cursor.toArray()},t.prototype.count=function(){return this._createCursor(),this.cursor.count()},t.prototype.hasNext=function(){return this._createCursor(),this.cursor.hasNext()},t.prototype.next=function(){return this._createCursor(),this.cursor.next()};var u=function(a,b){var d;if(arguments.length<2)throw d=new f,d.errorNum=c.errors.ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS.code,d.errorMessage=c.errors.ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS.message+"2",d;if("string"!=typeof a||""===a)throw d=new f,d.errorNum=c.errors.ERROR_GRAPH_INVALID_PARAMETER.code,d.errorMessage=c.errors.ERROR_GRAPH_INVALID_PARAMETER.message+" arg1 must not be empty",d;if(!k(b))throw d=new f,d.errorNum=c.errors.ERROR_GRAPH_INVALID_PARAMETER.code,d.errorMessage=c.errors.ERROR_GRAPH_INVALID_PARAMETER.message+" arg2 must not be empty",d;return{collection:a,from:j(b),to:j(b)}},v=function(a,b,d){var e;if(arguments.length<3)throw e=new f,e.errorNum=c.errors.ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS.code,e.errorMessage=c.errors.ERROR_GRAPH_INVALID_NUMBER_OF_ARGUMENTS.message+"3",e;if("string"!=typeof a||""===a)throw e=new f,e.errorNum=c.errors.ERROR_GRAPH_INVALID_PARAMETER.code,e.errorMessage=c.errors.ERROR_GRAPH_INVALID_PARAMETER.message+" arg1 must be non empty string",e;if(!k(b))throw e=new f,e.errorNum=c.errors.ERROR_GRAPH_INVALID_PARAMETER.code,e.errorMessage=c.errors.ERROR_GRAPH_INVALID_PARAMETER.message+" arg2 must be non empty string or array",e;if(!k(d))throw e=new f,e.errorNum=c.errors.ERROR_GRAPH_INVALID_PARAMETER.code,e.errorMessage=c.errors.ERROR_GRAPH_INVALID_PARAMETER.message+" arg3 must be non empty string or array",e;return{collection:a,from:j(b),to:j(d)}},w=function(){var a=n();return i.pluck(a.toArray(),"_key")},x=function(){return n().toArray()},y=function(){var a=[],b=arguments;return Object.keys(b).forEach(function(c){a.push(b[c])}),a},z=function(a){var b=arguments,c=0;Object.keys(b).forEach(function(d){c++,1!==c&&a.push(b[d])})},A=function(a){return a.from=a.from.sort(),a.to=a.to.sort(),a},B=function(a,b,d,g){Array.isArray(d)||(d=[]);var i,j,k,o=n(),p=!0;if(!a)throw i=new f,i.errorNum=c.errors.ERROR_GRAPH_CREATE_MISSING_NAME.code,i.errorMessage=c.errors.ERROR_GRAPH_CREATE_MISSING_NAME.message,i;if(b=b||[],!Array.isArray(b))throw i=new f,i.errorNum=c.errors.ERROR_GRAPH_CREATE_MALFORMED_EDGE_DEFINITION.code,i.errorMessage=c.errors.ERROR_GRAPH_CREATE_MALFORMED_EDGE_DEFINITION.message,i;var q=[],r={};b.forEach(function(a){var b=a.collection;if(-1!==q.indexOf(b))throw i=new f,i.errorNum=c.errors.ERROR_GRAPH_COLLECTION_MULTI_USE.code,i.errorMessage=c.errors.ERROR_GRAPH_COLLECTION_MULTI_USE.message,i;q.push(b),r[b]=a}),o.toArray().forEach(function(a){var b=a.edgeDefinitions;b.forEach(function(a){var b=a.collection;if(-1!==q.indexOf(b)&&JSON.stringify(a)!==JSON.stringify(r[b]))throw i=new f,i.errorNum=c.errors.ERROR_GRAPH_COLLECTION_USE_IN_MULTI_GRAPHS.code,i.errorMessage=b+" "+c.errors.ERROR_GRAPH_COLLECTION_USE_IN_MULTI_GRAPHS.message,i})});try{o.document(a)}catch(s){if(s.errorNum!==h.ERROR_ARANGO_DOCUMENT_NOT_FOUND.code)throw s;p=!1}if(p)throw i=new f,i.errorNum=c.errors.ERROR_GRAPH_DUPLICATE.code,i.errorMessage=c.errors.ERROR_GRAPH_DUPLICATE.message,i;j=m(b,!1),d.forEach(function(a){l(a,e.TYPE_DOCUMENT)}),b.forEach(function(a,c){var d=A(a);b[c]=d}),d=d.sort();var t=o.save({orphanCollections:d,edgeDefinitions:b,_key:a},g);return k=new H(a,b,j[0],j[1],d,t._rev,t._id)},C=function(a,b,c){Object.defineProperty(a,b,{enumerable:!1,writable:!0}),a[b]=c},D=function O(a,b,c,d){d.__idsToRemove[c]=1,a.forEach(function(e){var f=e.edgeDefinitions;e.edgeDefinitions&&f.forEach(function(e){var f=e.from,h=e.to,i=e.collection;if(-1!==f.indexOf(b)||-1!==h.indexOf(b)){ var j=g._collection(i).edges(c);j.forEach(function(b){d.__idsToRemove.hasOwnProperty(b._id)||(d.__collectionsToLock[i]=1,O(a,i,b._id,d))})}})})},E=function(a,b){i.each(b,function(b){var d=g._collection(b),e=p(d),h=e.save;e.save=function(d,e,g){if("string"!=typeof d||-1===d.indexOf("/")||"string"!=typeof e||-1===e.indexOf("/")){var j=new f;throw j.errorNum=c.errors.ERROR_ARANGO_DOCUMENT_HANDLE_BAD.code,j.errorMessage=c.errors.ERROR_ARANGO_DOCUMENT_HANDLE_BAD.message,j}return a.__edgeDefinitions.forEach(function(a){if(a.collection===b){var g=d.split("/")[0],h=e.split("/")[0];if(!i.contains(a.from,g)||!i.contains(a.to,h)){var j=new f;throw j.errorNum=c.errors.ERROR_GRAPH_INVALID_EDGE.code,j.errorMessage=c.errors.ERROR_GRAPH_INVALID_EDGE.message+" between "+d+" and "+e+".",j}}}),h(d,e,g)},e.remove=function(c,d){-1===c.indexOf("/")&&(c=b+"/"+c);var e=n().toArray(),f=c.split("/")[0];a.__collectionsToLock[f]=1,D(e,f,c,a);try{g._executeTransaction({collections:{write:Object.keys(a.__collectionsToLock)},embed:!0,action:function(a){var b=require("internal").db;a.ids.forEach(function(c){a.options?b._remove(c,a.options):b._remove(c)})},params:{ids:Object.keys(a.__idsToRemove),options:d}})}catch(h){throw a.__idsToRemove={},a.__collectionsToLock={},h}return a.__idsToRemove={},a.__collectionsToLock={},!0},a[b]=e})},F=function(a,b){i.each(b,function(b){var c=g._collection(b),d=p(c);d.remove=function(c,d){var e=n().toArray(),f=b;-1===c.indexOf("/")&&(c=b+"/"+c),a.__collectionsToLock[f]=1,e.forEach(function(b){var d=b.edgeDefinitions;b.edgeDefinitions&&d.forEach(function(b){var d=b.from,h=b.to,i=b.collection;if(-1!==d.indexOf(f)||-1!==h.indexOf(f)){var j=g._collection(i).edges(c);j.length>0&&(a.__collectionsToLock[i]=1,j.forEach(function(b){D(e,i,b._id,a)}))}})});try{g._executeTransaction({collections:{write:Object.keys(a.__collectionsToLock)},embed:!0,action:function(a){var b=require("internal").db;a.ids.forEach(function(c){a.options?b._remove(c,a.options):b._remove(c)}),a.options?b._remove(a.vertexId,a.options):b._remove(a.vertexId)},params:{ids:Object.keys(a.__idsToRemove),options:d,vertexId:c}})}catch(h){throw a.__idsToRemove={},a.__collectionsToLock={},h}return a.__idsToRemove={},a.__collectionsToLock={},!0},a[b]=d})},G=function(a){Object.keys(a).forEach(function(b){"_"!==b.substring(0,1)&&delete a[b]}),a.__edgeDefinitions.forEach(function(b){E(a,[b.collection]),F(a,b.from),F(a,b.to)}),F(a,a.__orphanCollections)},H=function(a,b,c,d,e,f,g){b.forEach(function(a,c){var d=A(a);b[c]=d}),e||(e=[]);var h="object"==typeof ArangoClusterComm;h&&require("@arangodb/cluster").isCoordinator()&&(h=!1);var i=this;C(this,"__useBuiltIn",h),C(this,"__name",a),C(this,"__vertexCollections",c),C(this,"__edgeCollections",d),C(this,"__edgeDefinitions",b),C(this,"__idsToRemove",{}),C(this,"__collectionsToLock",{}),C(this,"__id",g),C(this,"__rev",f),C(this,"__orphanCollections",e),G(i)},I=function(a){var b,d,e,g=n();try{b=g.document(a)}catch(i){if(i.errorNum!==h.ERROR_ARANGO_DOCUMENT_NOT_FOUND.code)throw i;var j=new f;throw j.errorNum=c.errors.ERROR_GRAPH_NOT_FOUND.code,j.errorMessage=c.errors.ERROR_GRAPH_NOT_FOUND.message,j}return d=m(b.edgeDefinitions,!0),e=b.orphanCollections,e||(e=[]),new H(a,b.edgeDefinitions,d[0],d[1],e,b._rev,b._id)},J=function(a){var b=n();return b.exists(a)},K=function(a,b){g._executeTransaction({collections:{write:"_graphs"},action:function(a){var b=n();b&&b.toArray().forEach(function(c){var d,e,f=i.extend({},c),g=!1;if(f.edgeDefinitions)for(d=0;dc;c++)this.hasOwnProperty(c)&&(e[c]=a.call(b,this[c],c,this));return e},f.prototype.getInVertex=function(){return this.map(function(a){return a.getInVertex()})},f.prototype.getOutVertex=function(){return this.map(function(a){return a.getOutVertex()})},f.prototype.getPeerVertex=function(a){return this.map(function(b){return b.getPeerVertex(a)})},f.prototype.setProperty=function(a,b){return this.map(function(c){return c.setProperty(a,b)})},f.prototype.edges=function(){return this.map(function(a){return a.edges()})},f.prototype.outbound=function(){return this.map(function(a){return a.outbound()})},f.prototype.inbound=function(){return this.map(function(a){return a.inbound()})},f.prototype.getInEdges=function(){var a=arguments;return this.map(function(b){return b.getInEdges.apply(b,a)})},f.prototype.getOutEdges=function(){var a=arguments;return this.map(function(b){return b.getOutEdges.apply(b,a)})},f.prototype.getEdges=function(){var a=arguments;return this.map(function(b){return b.getEdges.apply(b,a)})},f.prototype.degree=function(){return this.map(function(a){return a.degree()})},f.prototype.inDegree=function(){return this.map(function(a){return a.inDegree()})},f.prototype.inDegree=function(){return this.map(function(a){return a.outDegree()})},f.prototype.properties=function(){return this.map(function(a){return a.properties()})},c=function(a,b){this._graph=a,this._id=b._key,this._properties=b},c.prototype.getId=function(){return this._properties._key},c.prototype.getLabel=function(){return this._properties.$label},c.prototype.getProperty=function(a){return this._properties[a]},c.prototype.getPropertyKeys=function(){return this._properties.propertyKeys},c.prototype.properties=function(){return this._properties._shallowCopy},c.prototype.getInVertex=function(){return this._graph.getVertex(this._properties._to)},c.prototype.getOutVertex=function(){return this._graph.getVertex(this._properties._from)},c.prototype.getPeerVertex=function(a){return a._properties._id===this._properties._to?this._graph.getVertex(this._properties._from):a._properties._id===this._properties._from?this._graph.getVertex(this._properties._to):null},c.prototype._PRINT=function(a){this._properties._id?void 0!==this._properties._key?"string"==typeof this._properties._key?a.output+='Edge("'+this._properties._key+'")':a.output+="Edge("+this._properties._key+")":a.output+="Edge(<"+this._id+">)":a.output+="[deleted Edge]"},e=function(a,b){this._graph=a,this._id=b._key,this._properties=b},e.prototype.addInEdge=function(a,b,c,d){return this._graph.addEdge(a,this,b,c,d)},e.prototype.addOutEdge=function(a,b,c,d){return this._graph.addEdge(this,a,b,c,d)},e.prototype.degree=function(){return this.getEdges().length},e.prototype.inDegree=function(){return this.getInEdges().length},e.prototype.outDegree=function(){return this.getOutEdges().length},e.prototype.getId=function(){return this._properties._key},e.prototype.getProperty=function(a){return this._properties[a]},e.prototype.getPropertyKeys=function(){return this._properties.propertyKeys},e.prototype.properties=function(){return this._properties._shallowCopy},e.prototype._PRINT=function(a){this._properties._id?void 0!==this._properties._key?"string"==typeof this._properties._key?a.output+='Vertex("'+this._properties._key+'")':a.output+="Vertex("+this._properties._key+")":a.output+="Vertex(<"+this._id+">)":a.output+="[deleted Vertex]"},d=function(a,b,c,d){this.initialize(a,b,c,d)},d.prototype._prepareEdgeData=function(a,b){var c;return h.notExisty(a)&&h.object(b)&&(a=b,b=null),h.notExisty(b)&&h.existy(a)&&h.existy(a.$label)&&(b=a.$label),c=h.notExisty(a)||h.noObject(a)?{}:a._shallowCopy||{},c.$label=b,c},d.prototype._prepareVertexData=function(a){var b;return b=h.notExisty(a)||h.noObject(a)?{}:a._shallowCopy||{}},d.prototype.getOrAddVertex=function(a){var b=this.getVertex(a);return null===b&&(b=this.addVertex(a)),b},d.prototype.addEdge=function(a,b,c,d,e,f){var g,i;return g=h.string(a)?a:a._properties._id,i=h.string(b)?b:b._properties._id,this._saveEdge(c,g,i,this._prepareEdgeData(e,d),f)},d.prototype.addVertex=function(a,b,c){return this._saveVertex(a,this._prepareVertexData(b),c)},d.prototype.replaceVertex=function(a,b){this._replaceVertex(a,b)},d.prototype.replaceEdge=function(a,b){this._replaceEdge(a,b)},d.prototype.order=function(){return this._vertices.count()},d.prototype.size=function(){return this._edges.count()},d.prototype.emptyCachedPredecessors=function(){this.predecessors={}},d.prototype.getCachedPredecessors=function(a,b){var c;return this.predecessors[a.getId()]&&(c=this.predecessors[a.getId()][b.getId()]),c},d.prototype.setCachedPredecessors=function(a,b,c){this.predecessors[a.getId()]||(this.predecessors[a.getId()]={}),this.predecessors[a.getId()][b.getId()]=c},d.prototype.constructVertex=function(a){var b,c;"string"==typeof a?b=a:(b=a._id,c=a._rev);var d=this._verticesCache[b];if(void 0===d||d._rev!==c){var f=this._vertices.document(b);if(!f)throw"accessing a deleted vertex";this._verticesCache[b]=d=new e(this,f)}return d},d.prototype.constructEdge=function(a){var b,d,e,f;if("string"==typeof a?b=a:(b=a._id,d=a._rev),e=this._edgesCache[b],void 0===e||e._rev!==d){if(f=this._edges.document(b),!f)throw"accessing a deleted edge";this._edgesCache[b]=e=new c(this,f)}return e},d.prototype._PRINT=function(a){a.output+='Graph("'+this._properties._key+'")'},a.Edge=c,a.Graph=d,a.Vertex=e,a.GraphArray=f,a.Iterator=g}),module.define("@arangodb/graph",function(a,b){var c=require("@arangodb/graph-blueprint");Object.keys(c).forEach(function(b){a[b]=c[b]})}),module.define("@arangodb/graph/traversal",function(a,b){function c(a){if(null===a||"object"!=typeof a)return a;var b;if(Array.isArray(a))b=[],a.forEach(function(a){b.push(c(a))});else if(a instanceof Object){if(J&&a instanceof J)return a;b={},Object.keys(a).forEach(function(d){b[d]=c(a[d])})}return b}function d(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function e(a){var b=a;"string"==typeof b&&(b=K._collection(b));var c="object"==typeof ArangoClusterComm;return c&&require("@arangodb/cluster").isCoordinator()&&(c=!1),{edgeCollection:b,useBuiltIn:c,getVertexId:function(a){return a._id},getPeerVertex:function(a,b){return a._from===b._id?K._document(a._to):a._to===b._id?K._document(a._from):null},getInVertex:function(a){return K._document(a._to)},getOutVertex:function(a){return K._document(a._from)},getEdgeId:function(a){return a._id},getEdgeFrom:function(a){return a._from},getEdgeTo:function(a){return a._to},getLabel:function(a){return a.$label},getAllEdges:function(a){return this.useBuiltIn?this.edgeCollection.EDGES(a._id):this.edgeCollection.edges(a._id)},getInEdges:function(a){return this.useBuiltIn?this.edgeCollection.INEDGES(a._id):this.edgeCollection.inEdges(a._id)},getOutEdges:function(a){return this.useBuiltIn?this.edgeCollection.OUTEDGES(a._id):this.edgeCollection.outEdges(a._id)}}}function f(a){var b=a;return"string"==typeof b&&(b=F._graph(b)),{graph:b,getVertexId:function(a){return a._id},getPeerVertex:function(a,b){return a._from===b._id?K._document(a._to):a._to===b._id?K._document(a._from):null},getInVertex:function(a){return K._document(a._to)},getOutVertex:function(a){return K._document(a._from)},getEdgeId:function(a){return a._id},getEdgeFrom:function(a){return a._from},getEdgeTo:function(a){return a._to},getLabel:function(a){return a.$label},getAllEdges:function(a){return this.graph._EDGES(a._id)},getInEdges:function(a){return this.graph._INEDGES(a._id)},getOutEdges:function(a){return this.graph._OUTEDGES(a._id)}}}function g(a){return{graph:new E.Graph(a),getVertexId:function(a){return a.getId()},getPeerVertex:function(a,b){return a.getPeerVertex(b)},getInVertex:function(a){return a.getInVertex()},getOutVertex:function(a){return a.getOutVertex()},getEdgeId:function(a){return a.getId()},getEdgeFrom:function(a){return a._properties._from},getEdgeTo:function(a){return a._properties._to},getLabel:function(a){return a.getLabel()},getAllEdges:function(a){return a.edges()},getInEdges:function(a){return a.inbound()},getOutEdges:function(a){return a.outbound()}}}function h(a,b,c){var d,e=a.datasource,f=[],g=e.getOutEdges(b);return g.length>1&&a.sort&&g.sort(a.sort),d=a.buildVertices?a.expandFilter?function(b){try{var d=e.getInVertex(b);a.expandFilter(a,d,b,c)&&f.push({edge:b,vertex:d})}catch(g){}}:function(a){try{var b=e.getInVertex(a);f.push({edge:a,vertex:b})}catch(c){}}:a.expandFilter?function(b){var d=e.getEdgeTo(b),g={_id:d,_key:d.substr(d.indexOf("/")+1)};a.expandFilter(a,g,b,c)&&f.push({edge:b,vertex:g})}:function(a){var b=e.getEdgeTo(a),c={_id:b,_key:b.substr(b.indexOf("/")+1)};f.push({edge:a,vertex:c})},g.forEach(d),f}function i(a,b,c){var d=a.datasource,e=[],f=d.getInEdges(b);f.length>1&&a.sort&&f.sort(a.sort);var g;return g=a.buildVertices?a.expandFilter?function(b){try{var f=d.getOutVertex(b);a.expandFilter(a,f,b,c)&&e.push({edge:b,vertex:f})}catch(g){}}:function(a){try{var b=d.getOutVertex(a);e.push({edge:a,vertex:b})}catch(c){}}:a.expandFilter?function(b){var f=d.getEdgeFrom(b),g={_id:f,_key:f.substr(f.indexOf("/")+1)};a.expandFilter(a,g,b,c)&&e.push({edge:b,vertex:g})}:function(a){var b=d.getEdgeFrom(a),c={_id:b,_key:b.substr(b.indexOf("/")+1)};e.push({edge:a,vertex:c})},f.forEach(g),e}function j(a,b,c){var d=a.datasource,e=[],f=d.getAllEdges(b);f.length>1&&a.sort&&f.sort(a.sort);var g;return g=a.buildVertices?a.expandFilter?function(f){try{var g=d.getPeerVertex(f,b);a.expandFilter(a,g,f,c)&&e.push({edge:f,vertex:g})}catch(h){}}:function(a){try{var c=d.getPeerVertex(a,b);e.push({edge:a,vertex:c})}catch(f){}}:a.expandFilter?function(f){var g=d.getEdgeFrom(f);g===b._id&&(g=d.getEdgeTo(f));var h={_id:g,_key:g.substr(g.indexOf("/")+1)};a.expandFilter(a,h,f,c)&&e.push({edge:f,vertex:h})}:function(a){var c=d.getEdgeFrom(a);c===b._id&&(c=d.getEdgeTo(a));var f={_id:c,_key:c.substr(c.indexOf("/")+1)};e.push({edge:a,vertex:f})},f.forEach(g),e}function k(a,b,c){var d,e=a.datasource,f=[];Array.isArray(a.labels)||(a.labels=[a.labels]);var g=e.getOutEdges(b);if(void 0!==g)for(d=0;d=0&&f.push({edge:h,vertex:e.getInVertex(h)})}return f}function l(a,b,c){var d,e=a.datasource,f=[];Array.isArray(a.labels)||(a.labels=[a.labels]);var g=a.datasource.getInEdges(b);if(void 0!==g)for(d=0;d=0&&f.push({edge:h,vertex:e.getOutVertex(h)})}return f}function m(a,b,c){var d,e=a.datasource,f=[];Array.isArray(a.labels)||(a.labels=[a.labels]);var g=a.datasource.getAllEdges(b);if(void 0!==g)for(d=0;d=0&&f.push({edge:h,vertex:e.getPeerVertex(h,b)})}return f}function n(a,b,d,e){b&&b.visited&&(b.visited.vertices&&b.visited.vertices.push(c(d)),b.visited.paths&&b.visited.paths.push(c(e)))}function o(a,b,c,d){b&&(b.hasOwnProperty("count")?++b.count:b.count=1)}function p(){}function q(){return""}function r(a,b,c){return c&&c.vertices&&c.vertices.length>a.maxDepth?D.PRUNE:void 0}function s(a,b,c){return c&&c.vertices&&c.vertices.length<=a.minDepth?D.EXCLUDE:void 0}function t(a,b,c){Array.isArray(a.matchingAttributes)||(a.matchingAttributes=[a.matchingAttributes]);var d=!1;a.matchingAttributes.forEach(function(a){var c=0,e=Object.keys(a);e.forEach(function(d){b[d]&&b[d]===a[d]&&c++}),c>0&&c===e.length&&(d=!0)});var e;return d||(e="exclude"),e}function u(a,b,c,d){var e=[];return a.forEach(function(a){var f=a(b,c,d);Array.isArray(f)||(f=[f]),e=e.concat(f)}),e}function v(a){function b(a){if(void 0!==a&&null!==a){var d=!1;if("string"==typeof a)a===D.EXCLUDE?(c.visit=!1,d=!0):a===D.PRUNE?(c.expand=!1,d=!0):""===a&&(d=!0);else if(Array.isArray(a)){var e;for(e=0;eb)break;d=a[b]}return c},run:function(a,b,c){for(var d=a.maxIterations,e=0,f=[{edge:null,vertex:c,parentIndex:-1}],g={edges:{},vertices:{}},h=0,i=1,j=x(a);1===i&&h=0;){var k,l=f[h],m=l.vertex,n=l.edge;if(e++>d){var o=new I;throw o.errorNum=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.code,o.errorMessage=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.message,o}if(L(),null===l.visit||void 0===l.visit){if(l.visit=!1,k=this.createPath(f,h),a.uniqueness.vertices===D.UNIQUE_PATH&&(g.vertices=this.getPathItems(a.datasource.getVertexId,k.vertices)),a.uniqueness.edges===D.UNIQUE_PATH&&(g.edges=this.getPathItems(a.datasource.getEdgeId,k.edges)),!w(a,g,m,n)){h0;){if(e++>d){var l=new I;throw l.errorNum=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.code,l.errorMessage=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.message,l}L();var m=f[f.length-1],n=m.vertex,o=m.edge;if(null===m.visit||void 0===m.visit){if(m.visit=!1,k&&(j.vertices===D.UNIQUE_PATH&&(h.vertices=this.getPathItems(a.datasource.getVertexId,g.vertices)),j.edges===D.UNIQUE_PATH&&(h.edges=this.getPathItems(a.datasource.getEdgeId,g.edges)),!w(a,h,n,o))){f.pop();continue}null!==o&&g.edges.push(o),g.vertices.push(n);var p=v(a.filter(a,n,g));if(a.order===D.PRE_ORDER&&p.visit?a.visitor(a,b,n,g):m.visit=p.visit||!1,p.expand){var q,r=a.expander(a,n,g);for(i&&r.reverse(),a.order===D.PRE_ORDER_EXPANDER&&p.visit&&a.visitor(a,b,n,g,r),q=0;q0&&g.edges.pop(),g.vertices.pop()}}}}function A(){return{nodes:{},requiresEndVertex:function(){return!0},makeNode:function(a){var b=a._id;return this.nodes.hasOwnProperty(b)||(this.nodes[b]={vertex:a,dist:1/0}),this.nodes[b]},vertexList:function(a){for(var b=[];a;)b.push(a),a=a.parent;return b},buildPath:function(a){for(var b={vertices:[a.vertex],edges:[]},c=a;c.parent;)b.vertices.unshift(c.parent.vertex),b.edges.unshift(c.parentEdge),c=c.parent;return b},run:function(a,b,c,d){var e=a.maxIterations,f=0,g=new H(function(a){return a.dist}),h=this.makeNode(c);for(h.dist=0,g.push(h);g.size()>0;){if(f++>e){var i=new I;throw i.errorNum=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.code,i.errorMessage=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.message,i}L();var j,k,l=g.pop();if(l.vertex._id===d._id){var m=this.vertexList(l).reverse();for(k=m.length,j=0;k>j;++j)m[j].hide||a.visitor(a,b,m[j].vertex,this.buildPath(m[j]));return}if(!l.visited){if(l.dist===1/0)break;l.visited=!0;var n=this.buildPath(l),o=v(a.filter(a,l.vertex,n));if(o.visit||(l.hide=!0),o.expand){var p=l.dist,q=a.expander(a,l.vertex,n);for(k=q.length,j=0;k>j;++j){var r=this.makeNode(q[j].vertex);if(!r.visited){var s=q[j].edge,t=1;a.distance?t=a.distance(a,l.vertex,r.vertex,s):a.weight&&(t="number"==typeof s[a.weight]?s[a.weight]:a.defaultWeight?a.defaultWeight:1/0);var u=p+t;u0;){if(g++>f){var j=new I;throw j.errorNum=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.code,j.errorMessage=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.message,j}var k,l,m=h.pop();if(e.hasOwnProperty(m.vertex._id)&&(delete e[m.vertex._id],a.visitor(a,b,m,this.buildPath(m)),d(e)))return;if(!m.visited){if(m.dist===1/0)break;m.visited=!0;var n=this.buildPath(m),o=v(a.filter(a,m.vertex,n));if(o.visit||(m.hide=!0),o.expand){var p=m.dist,q=a.expander(a,m.vertex,n);for(l=q.length,k=0;l>k;++k){var r=this.makeNode(q[k].vertex);if(!r.visited){var s=q[k].edge,t=1;a.distance?t=a.distance(a,m.vertex,r.vertex,s):a.weight&&(t="number"==typeof s[a.weight]?s[a.weight]:a.defaultWeight?a.defaultWeight:1/0);var u=p+t;u0;){if(f++>e){var h=new I;throw h.errorNum=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.code,h.errorMessage=G.errors.ERROR_GRAPH_TOO_MANY_ITERATIONS.message,h}L();var i,j,k=g.pop();if(k.vertex._id===d._id){var l=this.vertexList(k);for(a.order!==D.PRE_ORDER&&l.reverse(),j=l.length,i=0;j>i;++i)a.visitor(a,b,l[i].vertex,this.buildPath(l[i]));return}k.closed=!0;var m=this.buildPath(k),n=a.expander(a,k.vertex,m);for(j=n.length,i=0;j>i;++i){var o=this.makeNode(n[i].vertex);if(!o.closed){var p=k.g+1,q=o.visited;if(!q||p0&&f.push(s),void 0!==a.maxDepth&&null!==a.maxDepth&&a.maxDepth>0&&f.push(r),Array.isArray(a.filter)||("function"==typeof a.filter?a.filter=[a.filter]:a.filter=[]),a.filter.forEach(function(a){if("function"!=typeof a)throw d=new I,d.errorNum=G.errors.ERROR_BAD_PARAMETER.code,d.errorMessage="invalid filter function",d;f.push(a)}),f.length>1?a.filter=function(a,b,c){return u(f,a,b,c)}:1===f.length?a.filter=f[0]:a.filter=q,"function"!=typeof a.expander&&(a.expander=b(a.expander,{outbound:h,inbound:i,any:j},"expander")),"function"!=typeof a.expander)throw d=new I,d.errorNum=G.errors.ERROR_BAD_PARAMETER.code,d.errorMessage="invalid expander function",d;if("object"!=typeof a.datasource)throw d=new I,d.errorNum=G.errors.ERROR_BAD_PARAMETER.code,d.errorMessage="invalid datasource",d;this.config=a},D.prototype.traverse=function(a,b,c){var d;if(d=this.config.strategy===D.ASTAR_SEARCH?C():this.config.strategy===D.DIJKSTRA_SEARCH?A():this.config.strategy===D.DIJKSTRA_SEARCH_MULTI?B():this.config.strategy===D.BREADTH_FIRST?y():z(),void 0===b||null===b||"object"!=typeof b){var e=new I;throw e.errorNum=G.errors.ERROR_BAD_PARAMETER.code,e.errorMessage=G.errors.ERROR_BAD_PARAMETER.message+": invalid startVertex specified for traversal",e}if(d.requiresEndVertex()&&(void 0===c||null===c||"object"!=typeof c)){var f=new I;throw f.errorNum=G.errors.ERROR_BAD_PARAMETER.code,f.errorMessage=G.errors.ERROR_BAD_PARAMETER.message+": invalid endVertex specified for traversal",f}try{d.run(this.config,a,b,c)}catch(g){if("object"!=typeof g||!g._intentionallyAborted)throw g}},D.UNIQUE_NONE=0,D.UNIQUE_PATH=1,D.UNIQUE_GLOBAL=2,D.BREADTH_FIRST=0,D.DEPTH_FIRST=1,D.ASTAR_SEARCH=2,D.DIJKSTRA_SEARCH=3,D.DIJKSTRA_SEARCH_MULTI=4,D.PRE_ORDER=0,D.POST_ORDER=1,D.PRE_ORDER_EXPANDER=2,D.FORWARD=0,D.BACKWARD=1,D.PRUNE="prune",D.EXCLUDE="exclude",a.collectionDatasourceFactory=e,a.generalGraphDatasourceFactory=f,a.graphDatasourceFactory=g,a.outboundExpander=h,a.inboundExpander=i,a.anyExpander=j,a.expandOutEdgesWithLabels=k,a.expandInEdgesWithLabels=l,a.expandEdgesWithLabels=m,a.trackingVisitor=n,a.countingVisitor=o,a.doNothingVisitor=p,a.visitAllFilter=q,a.maxDepthFilter=r,a.minDepthFilter=s,a.includeMatchingAttributesFilter=t,a.abortedException=N,a.Traverser=D}),module.define("@arangodb/is",function(a,b){"use strict";function c(a){return null!==a&&void 0!==a}function d(a){return!c(a)}function e(a){return a!==!1&&c(a)}function f(a){return!e(a)}["Object","Array","Boolean","Date","Function","Number","String","RegExp"].forEach(function(b){a[b.toLowerCase()]=function(a){return Object.prototype.toString.call(a)==="[object "+b+"]"},a["no"+b]=function(a){return Object.prototype.toString.call(a)!=="[object "+b+"]"}}),a.existy=c,a.notExisty=d,a.truthy=e,a.falsy=f}),module.define("@arangodb/mimetypes",function(a,b){a.mimeTypes={gif:["image/gif",!1],jpg:["image/jpg",!1],png:["image/png",!1],tiff:["image/tiff",!1],ico:["image/x-icon",!1],css:["text/css",!0],js:["text/javascript",!0],json:["application/json",!0],html:["text/html",!0],htm:["text/html",!0],pdf:["application/pdf",!1],ps:["application/postscript",!1],txt:["text/plain",!0],text:["text/plain",!0],xml:["application/xml",!0],dtd:["application/xml-dtd",!0],svg:["image/svg+xml",!0],ttf:["application/x-font-ttf",!1],otf:["application/x-font-opentype",!1],woff:["application/font-woff",!1],eot:["application/vnd.ms-fontobject",!1],bz2:["application/x-bzip2",!1],gz:["application/x-gzip",!1],tgz:["application/x-tar",!1],zip:["application/x-compressed-zip",!1],doc:["application/msword",!1],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document",!1],dotx:["application/vnd.openxmlformats-officedocument.wordprocessingml.template",!1],potx:["application/vnd.openxmlformats-officedocument.presentationml.template",!1],ppsx:["application/vnd.openxmlformats-officedocument.presentationml.slideshow",!1],ppt:["application/vnd.ms-powerpoint",!1],pptx:["application/vnd.openxmlformats-officedocument.presentationml.presentation",!1],xls:["application/vnd.ms-excel",!1],xlsb:["application/vnd.ms-excel.sheet.binary.macroEnabled.12",!1],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",!1],xltx:["application/vnd.openxmlformats-officedocument.spreadsheetml.template",!1],swf:["application/x-shockwave-flash",!1]},a.extensions={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"image/svg+xml":["svg"],"application/postscript":["ps"],"image/png":["png"],"application/x-font-ttf":["ttf"],"application/vnd.ms-excel.sheet.binary.macroEnabled.12":["xlsb"],"application/x-font-opentype":["otf"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/x-bzip2":["bz2"],"application/json":["json"],"application/pdf":["pdf"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.ms-fontobject":["eot"],"application/xml-dtd":["dtd"],"application/x-shockwave-flash":["swf"],"image/gif":["gif"],"image/jpg":["jpg"],"application/xml":["xml"],"application/vnd.ms-excel":["xls"],"image/tiff":["tiff"],"application/vnd.ms-powerpoint":["ppt"],"application/font-woff":["woff"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"text/plain":["txt","text"],"application/x-tar":["tgz"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/x-gzip":["gz"],"text/javascript":["js"],"text/html":["html","htm"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"image/x-icon":["ico"],"application/x-compressed-zip":["zip"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"text/css":["css"],"application/msword":["doc"]}}),module.define("@arangodb/simple-query-common",function(a,b){function c(a,b,c,d){this._documents=a,this._countTotal=a.length,this._skip=b,this._limit=c,this._cached=!1,this._extra={};var e=this;null!==d&&void 0!==d&&"object"==typeof d&&(["stats","warnings","profile"].forEach(function(a){d.hasOwnProperty(a)&&(e._extra[a]=d[a])}),this._cached=d.cached||!1),this.execute()}function d(){this._execution=null,this._skip=0,this._limit=null,this._countQuery=null,this._countTotal=null,this._batchSize=null}function e(a,b){return 0===a._limit?a=a.clone():0===b?(a=a.clone(),a._limit=0):null===a._limit?(a=a.clone(),a._limit=b):(a=a.clone(),bc&&(b=c);else if(this._skip<0){var d=-this._skip;c>d&&(b=c-d)}null!==this._limit&&b+this._limita){var b=new q;throw b.errorNum=p.ERROR_BAD_PARAMETER,b.errorMessage="limit must be non-negative",b}return e(this,a)},d.prototype.skip=function(a){var b,c;if((void 0===a||null===a)&&(a=0),null!==this._execution)throw"query is already executing";return null===this._limit?(b=this.clone(),null===this._skip||0===this._skip?b._skip=a:b._skip+=a):(c=this.clone().toArray(),b=new l(c),b._skip=a,b._countTotal=c._countTotal),b},d.prototype.toArray=function(){var a;for(this.execute(),a=[];this.hasNext();)a.push(this.next());return a},d.prototype.getBatchSize=function(){return this._batchSize},d.prototype.setBatchSize=function(a){a>=1&&(this._batchSize=a)},d.prototype.count=function(a){return this.execute(),void 0!==a&&a?this._countQuery:this._countTotal},d.prototype.hasNext=function(){return this.execute(),this._execution.hasNext()},d.prototype.next=function(){return this.execute(),this._execution.next()},d.prototype.dispose=function(){null!==this._execution&&this._execution.dispose(),this._execution=null,this._countQuery=null,this._countTotal=null},f.prototype=new d,f.prototype.constructor=f,f.prototype.clone=function(){var a;return a=new f(this._collection),a._skip=this._skip,a._limit=this._limit,a},f.prototype._PRINT=function(a){var b;b="SimpleQueryAll("+this._collection.name()+")",null!==this._skip&&0!==this._skip&&(b+=".skip("+this._skip+")"),null!==this._limit&&(b+=".limit("+this._limit+")"),a.output+=b},l=function(a){this._documents=a},l.prototype=new d,l.prototype.constructor=l,l.prototype.clone=function(){var a;return a=new l(this._documents),a._skip=this._skip,a._limit=this._limit,a},l.prototype.execute=function(){null===this._execution&&(null===this._skip&&(this._skip=0),this._execution=new c(this._documents,this._skip,this._limit))},l.prototype._PRINT=function(a){var b;b="SimpleQueryArray(documents)",null!==this._skip&&0!==this._skip&&(b+=".skip("+this._skip+")"),null!==this._limit&&(b+=".limit("+this._limit+")"),a.output+=b},g.prototype=new d,g.prototype.constructor=g,g.prototype.clone=function(){var a;return a=new g(this._collection,this._example),a._skip=this._skip,a._limit=this._limit,a._type=this._type,a._index=this._index,a},g.prototype._PRINT=function(a){var b;b="SimpleQueryByExample("+this._collection.name()+")",null!==this._skip&&0!==this._skip&&(b+=".skip("+this._skip+")"),null!==this._limit&&(b+=".limit("+this._limit+")"),a.output+=b},h.prototype=new d,h.prototype.constructor=h,h.prototype.clone=function(){var a;return a=new h(this._collection,this._condition),a._skip=this._skip,a._limit=this._limit,a._type=this._type,a._index=this._index,a},h.prototype._PRINT=function(a){var b;b="SimpleQueryByCondition("+this._collection.name()+")",null!==this._skip&&0!==this._skip&&(b+=".skip("+this._skip+")"),null!==this._limit&&(b+=".limit("+this._limit+")"),a.output+=b},i.prototype=new d,i.prototype.constructor=i,i.prototype.clone=function(){var a;return a=new i(this._collection,this._attribute,this._left,this._right,this._type),a._skip=this._skip,a._limit=this._limit,a},i.prototype._PRINT=function(a){var b;b="SimpleQueryRange("+this._collection.name()+")",null!==this._skip&&0!==this._skip&&(b+=".skip("+this._skip+")"),null!==this._limit&&(b+=".limit("+this._limit+")"),a.output+=b},j.prototype._PRINT=function(a){var b;b="GeoIndex("+this._collection.name()+", "+this._index+")",a.output+=b},j.prototype.near=function(a,b){return new m(this._collection,a,b,this._index)},j.prototype.within=function(a,b,c){return new n(this._collection,a,b,c,this._index)},j.prototype.withinRectangle=function(a,b,c,d){return new o(this._collection,a,b,c,d,this._index)},m=function(a,b,c,d){var e,f;if(this._collection=a,this._latitude=b,this._longitude=c,this._index=void 0===d?null:d,this._distance=null,void 0===d)for(e=a.getIndexes(),f=0;f=0&&g>f;f+=a){var h=e?e[f]:f;d=c(d,b[h],h,b)}return d}return function(c,d,e,f){d=v(d,f,4);var g=!C(c)&&u.keys(c),h=(g||c).length,i=a>0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function d(a){return function(b,c,d){c=w(c,d);for(var e=B(b),f=a>0?0:e-1;f>=0&&e>f;f+=a)if(c(b[f],f,b))return f;return-1}}function e(a,b,c){return function(d,e,f){var g=0,h=B(d);if("number"==typeof f)a>0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(m.call(d,g,h),u.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&h>f;f+=a)if(d[f]===e)return f;return-1}}function f(a,b){var c=H.length,d=a.constructor,e=u.isFunction(d)&&d.prototype||j,f="constructor";for(u.has(a,f)&&!u.contains(b,f)&&b.push(f);c--;)f=H[c],f in a&&a[f]!==e[f]&&!u.contains(b,f)&&b.push(f)}var g=this,h=g._,i=Array.prototype,j=Object.prototype,k=Function.prototype,l=i.push,m=i.slice,n=j.toString,o=j.hasOwnProperty,p=Array.isArray,q=Object.keys,r=k.bind,s=Object.create,t=function(){},u=function S(a){return a instanceof S?a:this instanceof S?void(this._wrapped=a):new S(a)};"undefined"!=typeof a?("undefined"!=typeof b&&b.exports&&(a=b.exports=u),a._=u):g._=u,u.VERSION="1.8.3";var v=function(a,b,c){if(void 0===b)return a;switch(null==c?3:c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return function(){return a.apply(b,arguments)}},w=function(a,b,c){return null==a?u.identity:u.isFunction(a)?v(a,b,c):u.isObject(a)?u.matcher(a):u.property(a)};u.iteratee=function(a,b){return w(a,b,1/0)};var x=function(a,b){return function(c){var d=arguments.length;if(2>d||null==c)return c;for(var e=1;d>e;e++)for(var f=arguments[e],g=a(f),h=g.length,i=0;h>i;i++){var j=g[i];b&&void 0!==c[j]||(c[j]=f[j])}return c}},y=function(a){if(!u.isObject(a))return{};if(s)return s(a);t.prototype=a;var b=new t;return t.prototype=null,b},z=function(a){return function(b){return null==b?void 0:b[a]}},A=Math.pow(2,53)-1,B=z("length"),C=function(a){var b=B(a);return"number"==typeof b&&b>=0&&A>=b};u.each=u.forEach=function(a,b,c){b=v(b,c);var d,e;if(C(a))for(d=0,e=a.length;e>d;d++)b(a[d],d,a);else{var f=u.keys(a);for(d=0,e=f.length;e>d;d++)b(a[f[d]],f[d],a)}return a},u.map=u.collect=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=Array(e),g=0;e>g;g++){var h=d?d[g]:g;f[g]=b(a[h],h,a)}return f},u.reduce=u.foldl=u.inject=c(1),u.reduceRight=u.foldr=c(-1),u.find=u.detect=function(a,b,c){var d;return d=C(a)?u.findIndex(a,b,c):u.findKey(a,b,c),void 0!==d&&-1!==d?a[d]:void 0},u.filter=u.select=function(a,b,c){var d=[];return b=w(b,c),u.each(a,function(a,c,e){b(a,c,e)&&d.push(a)}),d},u.reject=function(a,b,c){return u.filter(a,u.negate(w(b)),c)},u.every=u.all=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(!b(a[g],g,a))return!1}return!0},u.some=u.any=function(a,b,c){b=w(b,c);for(var d=!C(a)&&u.keys(a),e=(d||a).length,f=0;e>f;f++){var g=d?d[f]:f;if(b(a[g],g,a))return!0}return!1},u.contains=u.includes=u.include=function(a,b,c,d){return C(a)||(a=u.values(a)),("number"!=typeof c||d)&&(c=0),u.indexOf(a,b,c)>=0},u.invoke=function(a,b){var c=m.call(arguments,2),d=u.isFunction(b);return u.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},u.pluck=function(a,b){return u.map(a,u.property(b))},u.where=function(a,b){return u.filter(a,u.matcher(b))},u.findWhere=function(a,b){return u.find(a,u.matcher(b))},u.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=C(a)?a:u.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],d>f&&(f=d)}else b=w(b,c),u.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},u.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=C(a)?a:u.values(a);for(var h=0,i=a.length;i>h;h++)d=a[h],f>d&&(f=d)}else b=w(b,c),u.each(a,function(a,c,d){e=b(a,c,d),(g>e||e===1/0&&f===1/0)&&(f=a,g=e)});return f},u.shuffle=function(a){for(var b,c=C(a)?a:u.values(a),d=c.length,e=Array(d),f=0;d>f;f++)b=u.random(0,f),b!==f&&(e[f]=e[b]),e[b]=c[f];return e},u.sample=function(a,b,c){return null==b||c?(C(a)||(a=u.values(a)),a[u.random(a.length-1)]):u.shuffle(a).slice(0,Math.max(0,b))},u.sortBy=function(a,b,c){return b=w(b,c),u.pluck(u.map(a,function(a,c,d){return{value:a,index:c,criteria:b(a,c,d)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var D=function(a){return function(b,c,d){var e={};return c=w(c,d),u.each(b,function(d,f){var g=c(d,f,b);a(e,d,g)}),e}};u.groupBy=D(function(a,b,c){u.has(a,c)?a[c].push(b):a[c]=[b]}),u.indexBy=D(function(a,b,c){a[c]=b}),u.countBy=D(function(a,b,c){u.has(a,c)?a[c]++:a[c]=1}),u.toArray=function(a){return a?u.isArray(a)?m.call(a):C(a)?u.map(a,u.identity):u.values(a):[]},u.size=function(a){return null==a?0:C(a)?a.length:u.keys(a).length},u.partition=function(a,b,c){b=w(b,c);var d=[],e=[];return u.each(a,function(a,c,f){(b(a,c,f)?d:e).push(a)}),[d,e]},u.first=u.head=u.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:u.initial(a,a.length-b)},u.initial=function(a,b,c){return m.call(a,0,Math.max(0,a.length-(null==b||c?1:b)))},u.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:u.rest(a,Math.max(0,a.length-b))},u.rest=u.tail=u.drop=function(a,b,c){return m.call(a,null==b||c?1:b)},u.compact=function(a){return u.filter(a,u.identity)};var E=function T(a,b,c,d){for(var e=[],f=0,g=d||0,h=B(a);h>g;g++){var i=a[g];if(C(i)&&(u.isArray(i)||u.isArguments(i))){b||(i=T(i,b,c));var j=0,k=i.length;for(e.length+=k;k>j;)e[f++]=i[j++]}else c||(e[f++]=i)}return e};u.flatten=function(a,b){return E(a,b,!1)},u.without=function(a){return u.difference(a,m.call(arguments,1))},u.uniq=u.unique=function(a,b,c,d){u.isBoolean(b)||(d=c,c=b,b=!1),null!=c&&(c=w(c,d));for(var e=[],f=[],g=0,h=B(a);h>g;g++){var i=a[g],j=c?c(i,g,a):i;b?(g&&f===j||e.push(i),f=j):c?u.contains(f,j)||(f.push(j),e.push(i)):u.contains(e,i)||e.push(i)}return e},u.union=function(){return u.uniq(E(arguments,!0,!0))},u.intersection=function(a){for(var b=[],c=arguments.length,d=0,e=B(a);e>d;d++){var f=a[d];if(!u.contains(b,f)){for(var g=1;c>g&&u.contains(arguments[g],f);g++);g===c&&b.push(f)}}return b},u.difference=function(a){var b=E(arguments,!0,!0,1);return u.filter(a,function(a){return!u.contains(b,a)})},u.zip=function(){return u.unzip(arguments)},u.unzip=function(a){for(var b=a&&u.max(a,B).length||0,c=Array(b),d=0;b>d;d++)c[d]=u.pluck(a,d);return c},u.object=function(a,b){for(var c={},d=0,e=B(a);e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},u.findIndex=d(1),u.findLastIndex=d(-1),u.sortedIndex=function(a,b,c,d){c=w(c,d,1);for(var e=c(b),f=0,g=B(a);g>f;){var h=Math.floor((f+g)/2);c(a[h])f;f++,a+=c)e[f]=a;return e};var F=function(a,b,c,d,e){if(!(d instanceof b))return a.apply(c,e);var f=y(a.prototype),g=a.apply(f,e);return u.isObject(g)?g:f};u.bind=function(a,b){if(r&&a.bind===r)return r.apply(a,m.call(arguments,1));if(!u.isFunction(a))throw new TypeError("Bind must be called on a function");var c=m.call(arguments,2),d=function e(){return F(a,e,b,this,c.concat(m.call(arguments)))};return d},u.partial=function(a){var b=m.call(arguments,1),c=function d(){for(var c=0,e=b.length,f=Array(e),g=0;e>g;g++)f[g]=b[g]===u?arguments[c++]:b[g];for(;c=d)throw new Error("bindAll must be passed function names");for(b=1;d>b;b++)c=arguments[b],a[c]=u.bind(a[c],a);return a},u.memoize=function(a,b){var c=function d(c){var e=d.cache,f=""+(b?b.apply(this,arguments):c);return u.has(e,f)||(e[f]=a.apply(this,arguments)),e[f]};return c.cache={},c},u.delay=function(a,b){var c=m.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},u.defer=u.partial(u.delay,u,1),u.throttle=function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:u.now(),g=null,f=a.apply(d,e),g||(d=e=null)};return function(){var j=u.now(); 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 31c7c744ec..ec3680cb68 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/arangoes5.js b/js/apps/system/_admin/aardvark/APP/frontend/build/arangoes5.js index 034529048c..da913bb4c9 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/arangoes5.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/arangoes5.js @@ -237,7 +237,7 @@ exports.setUnitTestsResult = function(value){global.SYS_UNIT_TESTS_RESULT = valu /// @param longOptsEqual whether long-options are in the type --opt=value /// or --opt value //////////////////////////////////////////////////////////////////////////////// -exports.toArgv = function(structure,longOptsEqual){if(typeof longOptsEqual === 'undefined'){longOptsEqual = false;}var vec=[];for(var key in structure) {if(structure.hasOwnProperty(key)){if(key === 'commandSwitches'){var multivec='';for(var _i=0;_i < structure[key].length;_i++) {if(structure[key][_i].length > 1){vec.push(structure[key][_i]);}else {multivec += structure[key][_i];}}if(multivec.length > 0){vec.push(multivec);}}else if(key === 'flatCommands'){vec = vec.concat(structure[key]);}else {if(longOptsEqual){vec.push('--' + key + '=' + structure[key]);}else {vec.push('--' + key);if(structure[key] !== false){if(structure[key] !== true){vec.push(structure[key]);}else {vec.push('true');}}else {vec.push('false');}}}}}return vec;}; //////////////////////////////////////////////////////////////////////////////// +exports.toArgv = function(structure,longOptsEqual){if(typeof longOptsEqual === 'undefined'){longOptsEqual = false;}var vec=[];for(var key in structure) {if(structure.hasOwnProperty(key)){if(key === 'commandSwitches'){var multivec='';for(var i=0;i < structure[key].length;i++) {if(structure[key][i].length > 1){vec.push(structure[key][i]);}else {multivec += structure[key][i];}}if(multivec.length > 0){vec.push(multivec);}}else if(key === 'flatCommands'){vec = vec.concat(structure[key]);}else {if(longOptsEqual){vec.push('--' + key + '=' + structure[key]);}else {vec.push('--' + key);if(structure[key] !== false){if(structure[key] !== true){vec.push(structure[key]);}else {vec.push('true');}}else {vec.push('false');}}}}}return vec;}; //////////////////////////////////////////////////////////////////////////////// /// @brief argv to structured //////////////////////////////////////////////////////////////////////////////// exports.parseArgv = function(argv,startOffset){var i;function setOption(ret,option,value){if(option.indexOf(':') > 0){var n=option.indexOf(':');var topOption=option.slice(0,n);if(!ret.hasOwnProperty(topOption)){ret[topOption] = {};}setOption(ret[topOption],option.slice(n + 1,option.length),value);}else if(argv[i + 1] === 'true'){ret[option] = true;}else if(argv[i + 1] === 'false'){ret[option] = false;}else if(!isNaN(argv[i + 1])){ret[option] = parseInt(argv[i + 1]);}else {ret[option] = argv[i + 1];}}function setSwitch(ret,option){if(!ret.hasOwnProperty('commandSwitches')){ret.commandSwitches = [];}ret.commandSwitches.push(option);}function setSwitchVec(ret,option){for(var i=0;i < option.length;i++) {setSwitch(ret,option[i]);}}function setFlatCommand(ret,thisString){if(!ret.hasOwnProperty('flatCommands')){ret.flatCommands = [];}ret.flatCommands.push(thisString);}var inFlat=false;var ret={};for(i = startOffset;i < argv.length;i++) {var thisString=argv[i];if(!inFlat){if(thisString.length > 2 && thisString.slice(0,2) === '--'){var option=thisString.slice(2,thisString.length);if(argv.length > i && argv[i + 1].slice(0,1) !== '-'){setOption(ret,option,argv[i + 1]);i++;}else {setSwitch(ret,option);}}else if(thisString === '--'){inFlat = true;}else if(thisString.length > 1 && thisString.slice(0,1) === '-'){setSwitchVec(ret,thisString.slice(1,thisString.length));}else {setFlatCommand(ret,thisString);}}else {setFlatCommand(ret,thisString);}}return ret;}; //////////////////////////////////////////////////////////////////////////////// @@ -272,11 +272,11 @@ var quotable=/[\\\"\x00-\x1f]/g;function quoteJsonString(str){return '"' + str.r function printIndent(context){var j;var indent='';if(context.prettyPrint){indent += '\n';for(j = 0;j < context.level;++j) {indent += ' ';}}context.output += indent;} //////////////////////////////////////////////////////////////////////////////// /// @brief prints the JSON representation of an array //////////////////////////////////////////////////////////////////////////////// -function printArray(object,context){var useColor=context.useColor;if(object.length === 0){if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[ ]';if(useColor){context.output += colors.COLOR_RESET;}}else {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;var sep=' ';context.level = newLevel;for(var _i2=0;_i2 < object.length;_i2++) {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);var path=context.path;context.path += '[' + _i2 + ']';printRecursive(object[_i2],context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}context.path = path;sep = ', ';}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += ']';if(useColor){context.output += colors.COLOR_RESET;}}} //////////////////////////////////////////////////////////////////////////////// +function printArray(object,context){var useColor=context.useColor;if(object.length === 0){if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[ ]';if(useColor){context.output += colors.COLOR_RESET;}}else {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '[';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;var sep=' ';context.level = newLevel;for(var i=0;i < object.length;i++) {if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);var path=context.path;context.path += '[' + i + ']';printRecursive(object[i],context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}context.path = path;sep = ', ';}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += ']';if(useColor){context.output += colors.COLOR_RESET;}}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints an object //////////////////////////////////////////////////////////////////////////////// function printObject(object,context){var useColor=context.useColor;var sep=' ';if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '{';if(useColor){context.output += colors.COLOR_RESET;}var newLevel=context.level + 1;context.level = newLevel;var keys;try{keys = Object.keys(object);}catch(err) { // ES6 proxy objects don't support key enumeration -keys = [];}for(var _i3=0,n=keys.length;_i3 < n;++_i3) {var k=keys[_i3];var val=object[k];if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);if(useColor){context.output += colors.COLOR_INDEX;}context.output += quoteJsonString(k);if(useColor){context.output += colors.COLOR_RESET;}context.output += ' : ';var path=context.path;context.path += '[' + k + ']';printRecursive(val,context);context.path = path;sep = ', ';if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '}';if(useColor){context.output += colors.COLOR_RESET;}} //////////////////////////////////////////////////////////////////////////////// +keys = [];}for(var i=0,n=keys.length;i < n;++i) {var k=keys[i];var val=object[k];if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += sep;if(useColor){context.output += colors.COLOR_RESET;}printIndent(context);if(useColor){context.output += colors.COLOR_INDEX;}context.output += quoteJsonString(k);if(useColor){context.output += colors.COLOR_RESET;}context.output += ' : ';var path=context.path;context.path += '[' + k + ']';printRecursive(val,context);context.path = path;sep = ', ';if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}context.level = newLevel - 1;context.output += ' ';printIndent(context);if(useColor){context.output += colors.COLOR_PUNCTUATION;}context.output += '}';if(useColor){context.output += colors.COLOR_RESET;}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints objects to standard output without a new-line //////////////////////////////////////////////////////////////////////////////// var funcRE=/function ([^\(]*)?\(\) \{ \[native code\] \}/;var func2RE=/function ([^\(]*)?\((.*)\) \{/;exports.printRecursive = printRecursive = function(value,context){var useColor=context.useColor;var customInspect=context.customInspect;var useToString=context.useToString;var limitString=context.limitString;var showFunction=context.showFunction;if(typeof context.seen === 'undefined'){context.seen = [];context.names = [];}var p=context.seen.indexOf(value);if(p >= 0){context.output += context.names[p];}else {if(value && (value instanceof Object || typeof value === 'object' && Object.getPrototypeOf(value) === null)){context.seen.push(value);context.names.push(context.path);if(customInspect && typeof value._PRINT === 'function'){value._PRINT(context);if(context.emit && context.output.length >= context.emit){exports.output(context.output);context.output = '';}}else if(value instanceof Array){printArray(value,context);}else if(value.toString === Object.prototype.toString || typeof value === 'object' && Object.getPrototypeOf(value) === null){var handled=false;try{if(value instanceof Set || value instanceof Map || value instanceof WeakSet || value instanceof WeakMap || typeof value[Symbol.iterator] === 'function'){ // ES6 iterators @@ -287,7 +287,7 @@ try{var s=value.toString();if(context.level > 0 && !showFunction){var a=s.split( if(useColor){context.output += colors.COLOR_NULL;}context.output += value.toString();if(useColor){context.output += colors.COLOR_RESET;}}else {context.output += String(value);}}}; //////////////////////////////////////////////////////////////////////////////// /// @brief buffers output instead of printing it //////////////////////////////////////////////////////////////////////////////// -function bufferOutput(){for(var _i4=0;_i4 < arguments.length;++_i4) {var value=arguments[_i4];var text;if(value === null){text = 'null';}else if(value === undefined){text = 'undefined';}else if(typeof value === 'object'){try{text = JSON.stringify(value);}catch(err) {text = String(value);}}else {text = String(value);}exports.outputBuffer += text;}} //////////////////////////////////////////////////////////////////////////////// +function bufferOutput(){for(var i=0;i < arguments.length;++i) {var value=arguments[i];var text;if(value === null){text = 'null';}else if(value === undefined){text = 'undefined';}else if(typeof value === 'object'){try{text = JSON.stringify(value);}catch(err) {text = String(value);}}else {text = String(value);}exports.outputBuffer += text;}} //////////////////////////////////////////////////////////////////////////////// /// @brief prints all arguments /// /// @FUN{exports.printShell(@FA{arg1}, @FA{arg2}, @FA{arg3}, ...)} @@ -297,10 +297,10 @@ function bufferOutput(){for(var _i4=0;_i4 < arguments.length;++_i4) {var value=a /// Prints the arguments. If an argument is an object having a function /// @FN{_PRINT}, then this function is called. A final newline is printed. //////////////////////////////////////////////////////////////////////////////// -function printShell(){var output=exports.output;for(var _i5=0;_i5 < arguments.length;++_i5) {if(_i5 > 0){output(' ');}if(typeof arguments[_i5] === 'string'){output(arguments[_i5]);}else {var context={customInspect:true,emit:16384,level:0,limitString:printShell.limitString,names:[],output:'',path:'~',prettyPrint:usePrettyPrint,seen:[],showFunction:false,useColor:useColor,useToString:true};printRecursive(arguments[_i5],context);output(context.output);}}output('\n');}printShell.limitString = 80; //////////////////////////////////////////////////////////////////////////////// +function printShell(){var output=exports.output;for(var i=0;i < arguments.length;++i) {if(i > 0){output(' ');}if(typeof arguments[i] === 'string'){output(arguments[i]);}else {var context={customInspect:true,emit:16384,level:0,limitString:printShell.limitString,names:[],output:'',path:'~',prettyPrint:usePrettyPrint,seen:[],showFunction:false,useColor:useColor,useToString:true};printRecursive(arguments[i],context);output(context.output);}}output('\n');}printShell.limitString = 80; //////////////////////////////////////////////////////////////////////////////// /// @brief flatten //////////////////////////////////////////////////////////////////////////////// -var hasOwnProperty=Function.prototype.call.bind(Object.prototype.hasOwnProperty);exports.flatten = function(obj,seen){if(!obj || typeof obj !== 'object' && typeof obj !== 'function'){return obj;}if(obj instanceof Date){return obj.toJSON();}if(!seen){seen = [];}var result=Object.create(null),src=obj,keys,key,val;if(typeof obj === 'function'){result.__exec = String(obj);}while(src) {if(seen.indexOf(src) !== -1 || obj.constructor && src === obj.constructor.prototype){break;}seen.push(src);keys = Object.getOwnPropertyNames(src);for(var _i6=0;_i6 < keys.length;_i6++) {key = keys[_i6];if(typeof src !== 'function' || key !== 'arguments' && key !== 'caller' && key !== 'callee'){if(key.charAt(0) !== '_' && !hasOwnProperty(result,key)){val = obj[key];if(seen.indexOf(val) !== -1 && (typeof val === 'object' || typeof val === 'function')){result[key] = '[Circular]';}else {result[key] = exports.flatten(val,seen);}}}}src = Object.getPrototypeOf(src);}if(obj.constructor && obj.constructor.name){if(obj instanceof Error && obj.name === Error.name){result.name = obj.constructor.name;}else if(!hasOwnProperty(result,'constructor')){result.constructor = {name:obj.constructor.name};}}return result;}; //////////////////////////////////////////////////////////////////////////////// +var hasOwnProperty=Function.prototype.call.bind(Object.prototype.hasOwnProperty);exports.flatten = function(obj,seen){if(!obj || typeof obj !== 'object' && typeof obj !== 'function'){return obj;}if(obj instanceof Date){return obj.toJSON();}if(!seen){seen = [];}var result=Object.create(null),src=obj,keys,key,val;if(typeof obj === 'function'){result.__exec = String(obj);}while(src) {if(seen.indexOf(src) !== -1 || obj.constructor && src === obj.constructor.prototype){break;}seen.push(src);keys = Object.getOwnPropertyNames(src);for(var i=0;i < keys.length;i++) {key = keys[i];if(typeof src !== 'function' || key !== 'arguments' && key !== 'caller' && key !== 'callee'){if(key.charAt(0) !== '_' && !hasOwnProperty(result,key)){val = obj[key];if(seen.indexOf(val) !== -1 && (typeof val === 'object' || typeof val === 'function')){result[key] = '[Circular]';}else {result[key] = exports.flatten(val,seen);}}}}src = Object.getPrototypeOf(src);}if(obj.constructor && obj.constructor.name){if(obj instanceof Error && obj.name === Error.name){result.name = obj.constructor.name;}else if(!hasOwnProperty(result,'constructor')){result.constructor = {name:obj.constructor.name};}}return result;}; //////////////////////////////////////////////////////////////////////////////// /// @brief inspect //////////////////////////////////////////////////////////////////////////////// exports.inspect = function(object,options){var context={customInspect:options && options.customInspect,emit:false,level:0,limitString:false,names:[],output:'',prettyPrint:true,path:'~',seen:[],showFunction:true,useColor:false,useToString:false};if(options && options.hasOwnProperty('prettyPrint')){context.prettyPrint = options.prettyPrint;}printRecursive(object,context);return context.output;}; //////////////////////////////////////////////////////////////////////////////// @@ -354,7 +354,7 @@ global.print = exports.print; ////////////////////////////////////////////////// global.printf = function printf(){var internal=require('internal');internal.printf.apply(internal.printf,arguments);}; //////////////////////////////////////////////////////////////////////////////// /// @brief print_plain //////////////////////////////////////////////////////////////////////////////// -global.print_plain = function print_plain(){var output=require('internal').output;var printRecursive=require('internal').printRecursive;for(var _i7=0;_i7 < arguments.length;++_i7) {if(_i7 > 0){output(' ');}if(typeof arguments[_i7] === 'string'){output(arguments[_i7]);}else {var context={names:[],seen:[],path:'~',level:0,output:'',prettyPrint:false,useColor:false,customInspect:true};printRecursive(arguments[_i7],context);output(context.output);}}output('\n');}; //////////////////////////////////////////////////////////////////////////////// +global.print_plain = function print_plain(){var output=require('internal').output;var printRecursive=require('internal').printRecursive;for(var i=0;i < arguments.length;++i) {if(i > 0){output(' ');}if(typeof arguments[i] === 'string'){output(arguments[i]);}else {var context={names:[],seen:[],path:'~',level:0,output:'',prettyPrint:false,useColor:false,customInspect:true};printRecursive(arguments[i],context);output(context.output);}}output('\n');}; //////////////////////////////////////////////////////////////////////////////// /// @brief start_pretty_print //////////////////////////////////////////////////////////////////////////////// global.start_pretty_print = function start_pretty_print(){require('internal').startPrettyPrint();}; //////////////////////////////////////////////////////////////////////////////// @@ -412,7 +412,7 @@ log = function(level,message){if(typeof jqconsole !== 'undefined'){jqconsole.Wri function logGroup(level,msg){log(level,groupLevel + msg);} //////////////////////////////////////////////////////////////////////////////// /// @brief try to prettify //////////////////////////////////////////////////////////////////////////////// -function prepareArgs(args){var ShapedJson=require('internal').ShapedJson;var result=[];if(args.length > 0 && typeof args[0] !== 'string'){result.push('%s');}for(var _i8=0;_i8 < args.length;++_i8) {var arg=args[_i8];if(typeof arg === 'object'){if(ShapedJson !== undefined && arg instanceof ShapedJson){arg = inspect(arg,{prettyPrint:false});}else if(arg === null){arg = 'null';}else if(arg instanceof Date || arg instanceof RegExp){arg = String(arg);}else if(Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)){arg = inspect(arg,{prettyPrint:false});}}result.push(arg);}return result;} //////////////////////////////////////////////////////////////////////////////// +function prepareArgs(args){var ShapedJson=require('internal').ShapedJson;var result=[];if(args.length > 0 && typeof args[0] !== 'string'){result.push('%s');}for(var i=0;i < args.length;++i) {var arg=args[i];if(typeof arg === 'object'){if(ShapedJson !== undefined && arg instanceof ShapedJson){arg = inspect(arg,{prettyPrint:false});}else if(arg === null){arg = 'null';}else if(arg instanceof Date || arg instanceof RegExp){arg = String(arg);}else if(Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)){arg = inspect(arg,{prettyPrint:false});}}result.push(arg);}return result;} //////////////////////////////////////////////////////////////////////////////// /// @brief assert //////////////////////////////////////////////////////////////////////////////// exports.assert = function(condition){if(condition){return;}var args=Array.prototype.slice.call(arguments,1);var msg;try{msg = sprintf.apply(sprintf,prepareArgs(args));}catch(e) {msg = msg = e + ': ' + args;}logGroup('error',msg);require('assert').ok(condition,msg);}; //////////////////////////////////////////////////////////////////////////////// @@ -421,7 +421,7 @@ exports.assert = function(condition){if(condition){return;}var args=Array.protot exports.debug = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('debug',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief debugLines //////////////////////////////////////////////////////////////////////////////// -exports.debugLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i9=0;_i9 < a.length;++_i9) {logGroup('debug',a[_i9]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.debugLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('debug',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief dir //////////////////////////////////////////////////////////////////////////////// exports.dir = function(object){logGroup('info',inspect(object));}; //////////////////////////////////////////////////////////////////////////////// @@ -430,7 +430,7 @@ exports.dir = function(object){logGroup('info',inspect(object));}; ///////////// exports.error = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('error',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief errorLines //////////////////////////////////////////////////////////////////////////////// -exports.errorLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i10=0;_i10 < a.length;++_i10) {logGroup('error',a[_i10]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.errorLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('error',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief getline //////////////////////////////////////////////////////////////////////////////// if(global.SYS_GETLINE){exports.getline = global.SYS_GETLINE;delete global.SYS_GETLINE;} //////////////////////////////////////////////////////////////////////////////// @@ -448,7 +448,7 @@ exports.groupEnd = function(){groupLevel = groupLevel.substr(2);}; ///////////// exports.info = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('info',msg);}; //////////////////////////////////////////////////////////////////////////////// /// @brief infoLines //////////////////////////////////////////////////////////////////////////////// -exports.infoLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var _i11=0;_i11 < a.length;++_i11) {logGroup('info',a[_i11]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.infoLines = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}var a=msg.split('\n');for(var i=0;i < a.length;++i) {logGroup('info',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief log //////////////////////////////////////////////////////////////////////////////// exports.log = exports.info;exports._log = log; //////////////////////////////////////////////////////////////////////////////// @@ -463,7 +463,7 @@ exports.time = function(label){if(typeof label !== 'string'){throw new Error('la exports.timeEnd = function(label){var symbol=typeof Symbol === 'undefined'?'%' + label:Symbol['for'](label);var time=timers[symbol];if(!time){throw new Error('No such label: ' + label);}var duration=Date.now() - time;delete timers[symbol];logGroup('info',sprintf('%s: %dms',label,duration));}; //////////////////////////////////////////////////////////////////////////////// /// @brief trace //////////////////////////////////////////////////////////////////////////////// -exports.trace = function(){var err=new Error();err.name = 'Trace';err.message = sprintf.apply(sprintf,prepareArgs(arguments));Error.captureStackTrace(err,exports.trace);var a=err.stack.split('\n');while(!a[a.length - 1]) {a.pop();}for(var _i12=0;_i12 < a.length;++_i12) {logGroup('info',a[_i12]);}}; //////////////////////////////////////////////////////////////////////////////// +exports.trace = function(){var err=new Error();err.name = 'Trace';err.message = sprintf.apply(sprintf,prepareArgs(arguments));Error.captureStackTrace(err,exports.trace);var a=err.stack.split('\n');while(!a[a.length - 1]) {a.pop();}for(var i=0;i < a.length;++i) {logGroup('info',a[i]);}}; //////////////////////////////////////////////////////////////////////////////// /// @brief warn //////////////////////////////////////////////////////////////////////////////// exports.warn = function(){var msg;try{msg = sprintf.apply(sprintf,prepareArgs(arguments));}catch(e) {msg = e + ': ' + arguments;}logGroup('warning',msg);}; //////////////////////////////////////////////////////////////////////////////// @@ -1501,13 +1501,13 @@ var maxLength=4096;if(query.length > maxLength){stringBuilder.appendLine(section // var addHint = function (dst, currentNode, msg) { // dst.push({ code: "Hint", message: "Node #" + currentNode + ": " + msg }); // }; -var buildExpression=function buildExpression(_x){var _again=true;_function: while(_again) {var node=_x;binaryOperator = i = ref = out = collectionName = collectionObject = isEdgeCollection = isSystem = undefined;_again = false;var binaryOperator=function binaryOperator(node,name){var lhs=buildExpression(node.subNodes[0]);var rhs=buildExpression(node.subNodes[1]);if(node.subNodes.length === 3){ // array operator node... prepend "all" | "any" | "none" to node type +var buildExpression=function buildExpression(_x){var _again=true;_function: while(_again) {var node=_x;_again = false;var binaryOperator=function binaryOperator(node,name){var lhs=buildExpression(node.subNodes[0]);var rhs=buildExpression(node.subNodes[1]);if(node.subNodes.length === 3){ // array operator node... prepend "all" | "any" | "none" to node type name = node.subNodes[2].quantifier + " " + name;}if(node.sorted){return lhs + " " + name + " " + annotation("/* sorted */") + " " + rhs;}return lhs + " " + name + " " + rhs;};isConst = isConst && ["value","object","object element","array"].indexOf(node.type) !== -1;if(node.type !== "attribute access" && node.hasOwnProperty("subNodes")){for(var i=0;i < node.subNodes.length;++i) {if(node.subNodes[i].type === "reference" && collectionVariables.hasOwnProperty(node.subNodes[i].id)){addHint(explain.warnings,currentNode,"reference to collection document variable '" + node.subNodes[i].name + "' used in potentially non-working way");break;}}}switch(node.type){case "reference":if(references.hasOwnProperty(node.name)){var ref=references[node.name];delete references[node.name];if(Array.isArray(ref)){var out=buildExpression(ref[1]) + "[" + new Array(ref[0] + 1).join('*');if(ref[2].type !== "no-op"){out += " " + keyword("FILTER") + " " + buildExpression(ref[2]);}if(ref[3].type !== "no-op"){out += " " + keyword("LIMIT ") + " " + buildExpression(ref[3]);}if(ref[4].type !== "no-op"){out += " " + keyword("RETURN ") + " " + buildExpression(ref[4]);}out += "]";return out;}return buildExpression(ref) + "[*]";}return variableName(node);case "collection":addHint(explain.warnings,currentNode,"using all documents from collection '" + node.name + "' in expression");return collection(node.name) + " " + annotation("/* all collection documents */");case "value":return value(JSON.stringify(node.value));case "object":if(node.hasOwnProperty("subNodes")){if(node.subNodes.length > 20){ // print only the first 20 values from the objects return "{ " + node.subNodes.slice(0,20).map(buildExpression).join(", ") + ", ... }";}return "{ " + node.subNodes.map(buildExpression).join(", ") + " }";}return "{ }";case "object element":return value(JSON.stringify(node.name)) + " : " + buildExpression(node.subNodes[0]);case "calculated object element":return "[ " + buildExpression(node.subNodes[0]) + " ] : " + buildExpression(node.subNodes[1]);case "array":if(node.hasOwnProperty("subNodes")){if(node.subNodes.length > 20){ // print only the first 20 values from the array return "[ " + node.subNodes.slice(0,20).map(buildExpression).join(", ") + ", ... ]";}return "[ " + node.subNodes.map(buildExpression).join(", ") + " ]";}return "[ ]";case "unary not":return "! " + buildExpression(node.subNodes[0]);case "unary plus":return "+ " + buildExpression(node.subNodes[0]);case "unary minus":return "- " + buildExpression(node.subNodes[0]);case "array limit":return buildExpression(node.subNodes[0]) + ", " + buildExpression(node.subNodes[1]);case "attribute access":if(node.subNodes[0].type === "reference" && collectionVariables.hasOwnProperty(node.subNodes[0].id)){ // top-level attribute access var collectionName=collectionVariables[node.subNodes[0].id],collectionObject=db._collection(collectionName);if(collectionObject !== null){var isEdgeCollection=collectionObject.type() === 3,isSystem=node.name[0] === '_';if(isSystem && ["_key","_id","_rev"].concat(isEdgeCollection?["_from","_to"]:[]).indexOf(node.name) === -1 || !isSystem && isEdgeCollection && ["from","to"].indexOf(node.name) !== -1){addHint(explain.warnings,currentNode,"reference to potentially non-existing attribute '" + node.name + "'");}}}return buildExpression(node.subNodes[0]) + "." + attribute(node.name);case "indexed access":return buildExpression(node.subNodes[0]) + "[" + buildExpression(node.subNodes[1]) + "]";case "range":return buildExpression(node.subNodes[0]) + " .. " + buildExpression(node.subNodes[1]) + " " + annotation("/* range */");case "expand":case "expansion":if(node.subNodes.length > 2){ // [FILTER ...] references[node.subNodes[0].subNodes[0].name] = [node.levels,node.subNodes[0].subNodes[1],node.subNodes[2],node.subNodes[3],node.subNodes[4]];}else { // [*] -references[node.subNodes[0].subNodes[0].name] = node.subNodes[0].subNodes[1];}_x = node.subNodes[1];_again = true;continue _function;case "user function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")" + " " + annotation("/* user-defined function */");case "function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")";case "plus":return "(" + binaryOperator(node,"+") + ")";case "minus":return "(" + binaryOperator(node,"-") + ")";case "times":return "(" + binaryOperator(node,"*") + ")";case "division":return "(" + binaryOperator(node,"/") + ")";case "modulus":return "(" + binaryOperator(node,"%") + ")";case "compare not in":case "array compare not in":return "(" + binaryOperator(node,"not in") + ")";case "compare in":case "array compare in":return "(" + binaryOperator(node,"in") + ")";case "compare ==":case "array compare ==":return "(" + binaryOperator(node,"==") + ")";case "compare !=":case "array compare !=":return "(" + binaryOperator(node,"!=") + ")";case "compare >":case "array compare >":return "(" + binaryOperator(node,">") + ")";case "compare >=":case "array compare >=":return "(" + binaryOperator(node,">=") + ")";case "compare <":case "array compare <":return "(" + binaryOperator(node,"<") + ")";case "compare <=":case "array compare <=":return "(" + binaryOperator(node,"<=") + ")";case "logical or":return "(" + binaryOperator(node,"||") + ")";case "logical and":return "(" + binaryOperator(node,"&&") + ")";case "ternary":return "(" + buildExpression(node.subNodes[0]) + " ? " + buildExpression(node.subNodes[1]) + " : " + buildExpression(node.subNodes[2]) + ")";case "n-ary or":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" || "));}return "";case "n-ary and":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" && "));}return "";default:return "unhandled node type (" + node.type + ")";}}};var buildSimpleExpression=function buildSimpleExpression(simpleExpressions){var rc="";for(var indexNo in simpleExpressions) {if(simpleExpressions.hasOwnProperty(indexNo)){if(rc.length > 0){rc += " AND ";}for(var i=0;i < simpleExpressions[indexNo].length;i++) {var item=simpleExpressions[indexNo][i];rc += attribute("Path") + ".";if(item.isEdgeAccess){rc += attribute("edges");}else {rc += attribute("vertices");}rc += "[" + value(indexNo) + "] -> ";rc += buildExpression(item.varAccess);rc += " " + item.comparisonTypeStr + " ";rc += buildExpression(item.compareTo);}}}return rc;};var buildBound=function buildBound(attr,operators,bound){var boundValue=bound.isConstant?value(JSON.stringify(bound.bound)):buildExpression(bound.bound);return attribute(attr) + " " + operators[bound.include?1:0] + " " + boundValue;};var buildRanges=function buildRanges(ranges){var results=[];ranges.forEach(function(range){var attr=range.attr;if(range.lowConst.hasOwnProperty("bound") && range.highConst.hasOwnProperty("bound") && JSON.stringify(range.lowConst.bound) === JSON.stringify(range.highConst.bound)){range.equality = true;}if(range.equality){if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,["==","=="],range.lowConst));}else if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,["==","=="],bound));});}}else {if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,[">",">="],range.lowConst));}if(range.highConst.hasOwnProperty("bound")){results.push(buildBound(attr,["<","<="],range.highConst));}if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,[">",">="],bound));});}if(range.hasOwnProperty("highs")){range.highs.forEach(function(bound){results.push(buildBound(attr,["<","<="],bound));});}}});if(results.length > 1){return "(" + results.join(" && ") + ")";}return results[0];};var label=function label(node){switch(node.type){case "SingletonNode":return keyword("ROOT");case "NoResultsNode":return keyword("EMPTY") + " " + annotation("/* empty result set */");case "EnumerateCollectionNode":collectionVariables[node.outVariable.id] = node.collection;return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* full collection scan" + (node.random?", random order":"") + " */");case "EnumerateListNode":return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + variableName(node.inVariable) + " " + annotation("/* list iteration */");case "IndexNode":collectionVariables[node.outVariable.id] = node.collection;var types=[];node.indexes.forEach(function(idx,i){var what=(node.reverse?"reverse ":"") + idx.type + " index scan";if(types.length === 0 || what !== types[types.length - 1]){types.push(what);}idx.collection = node.collection;idx.node = node.id;if(node.condition.type && node.condition.type === 'n-ary or'){idx.condition = buildExpression(node.condition.subNodes[i]);}else {idx.condition = "*"; // empty condition. this is likely an index used for sorting only +references[node.subNodes[0].subNodes[0].name] = node.subNodes[0].subNodes[1];}_x = node.subNodes[1];_again = true;binaryOperator = i = ref = out = collectionName = collectionObject = isEdgeCollection = isSystem = undefined;continue _function;case "user function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")" + " " + annotation("/* user-defined function */");case "function call":return func(node.name) + "(" + (node.subNodes && node.subNodes[0].subNodes || []).map(buildExpression).join(", ") + ")";case "plus":return "(" + binaryOperator(node,"+") + ")";case "minus":return "(" + binaryOperator(node,"-") + ")";case "times":return "(" + binaryOperator(node,"*") + ")";case "division":return "(" + binaryOperator(node,"/") + ")";case "modulus":return "(" + binaryOperator(node,"%") + ")";case "compare not in":case "array compare not in":return "(" + binaryOperator(node,"not in") + ")";case "compare in":case "array compare in":return "(" + binaryOperator(node,"in") + ")";case "compare ==":case "array compare ==":return "(" + binaryOperator(node,"==") + ")";case "compare !=":case "array compare !=":return "(" + binaryOperator(node,"!=") + ")";case "compare >":case "array compare >":return "(" + binaryOperator(node,">") + ")";case "compare >=":case "array compare >=":return "(" + binaryOperator(node,">=") + ")";case "compare <":case "array compare <":return "(" + binaryOperator(node,"<") + ")";case "compare <=":case "array compare <=":return "(" + binaryOperator(node,"<=") + ")";case "logical or":return "(" + binaryOperator(node,"||") + ")";case "logical and":return "(" + binaryOperator(node,"&&") + ")";case "ternary":return "(" + buildExpression(node.subNodes[0]) + " ? " + buildExpression(node.subNodes[1]) + " : " + buildExpression(node.subNodes[2]) + ")";case "n-ary or":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" || "));}return "";case "n-ary and":if(node.hasOwnProperty("subNodes")){return bracketize(node,node.subNodes.map(function(sub){return buildExpression(sub);}).join(" && "));}return "";default:return "unhandled node type (" + node.type + ")";}}};var buildSimpleExpression=function buildSimpleExpression(simpleExpressions){var rc="";for(var indexNo in simpleExpressions) {if(simpleExpressions.hasOwnProperty(indexNo)){if(rc.length > 0){rc += " AND ";}for(var i=0;i < simpleExpressions[indexNo].length;i++) {var item=simpleExpressions[indexNo][i];rc += attribute("Path") + ".";if(item.isEdgeAccess){rc += attribute("edges");}else {rc += attribute("vertices");}rc += "[" + value(indexNo) + "] -> ";rc += buildExpression(item.varAccess);rc += " " + item.comparisonTypeStr + " ";rc += buildExpression(item.compareTo);}}}return rc;};var buildBound=function buildBound(attr,operators,bound){var boundValue=bound.isConstant?value(JSON.stringify(bound.bound)):buildExpression(bound.bound);return attribute(attr) + " " + operators[bound.include?1:0] + " " + boundValue;};var buildRanges=function buildRanges(ranges){var results=[];ranges.forEach(function(range){var attr=range.attr;if(range.lowConst.hasOwnProperty("bound") && range.highConst.hasOwnProperty("bound") && JSON.stringify(range.lowConst.bound) === JSON.stringify(range.highConst.bound)){range.equality = true;}if(range.equality){if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,["==","=="],range.lowConst));}else if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,["==","=="],bound));});}}else {if(range.lowConst.hasOwnProperty("bound")){results.push(buildBound(attr,[">",">="],range.lowConst));}if(range.highConst.hasOwnProperty("bound")){results.push(buildBound(attr,["<","<="],range.highConst));}if(range.hasOwnProperty("lows")){range.lows.forEach(function(bound){results.push(buildBound(attr,[">",">="],bound));});}if(range.hasOwnProperty("highs")){range.highs.forEach(function(bound){results.push(buildBound(attr,["<","<="],bound));});}}});if(results.length > 1){return "(" + results.join(" && ") + ")";}return results[0];};var label=function label(node){switch(node.type){case "SingletonNode":return keyword("ROOT");case "NoResultsNode":return keyword("EMPTY") + " " + annotation("/* empty result set */");case "EnumerateCollectionNode":collectionVariables[node.outVariable.id] = node.collection;return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* full collection scan" + (node.random?", random order":"") + " */");case "EnumerateListNode":return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + variableName(node.inVariable) + " " + annotation("/* list iteration */");case "IndexNode":collectionVariables[node.outVariable.id] = node.collection;var types=[];node.indexes.forEach(function(idx,i){var what=(node.reverse?"reverse ":"") + idx.type + " index scan";if(types.length === 0 || what !== types[types.length - 1]){types.push(what);}idx.collection = node.collection;idx.node = node.id;if(node.condition.type && node.condition.type === 'n-ary or'){idx.condition = buildExpression(node.condition.subNodes[i]);}else {idx.condition = "*"; // empty condition. this is likely an index used for sorting only }indexes.push(idx);});return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* " + types.join(", ") + " */");case "IndexRangeNode":collectionVariables[node.outVariable.id] = node.collection;var index=node.index;index.ranges = node.ranges.map(buildRanges).join(" || ");index.collection = node.collection;index.node = node.id;indexes.push(index);return keyword("FOR") + " " + variableName(node.outVariable) + " " + keyword("IN") + " " + collection(node.collection) + " " + annotation("/* " + (node.reverse?"reverse ":"") + node.index.type + " index scan */");case "TraversalNode":node.minMaxDepth = node.minDepth + ".." + node.maxDepth;node.minMaxDepthLen = node.minMaxDepth.length;var rc=keyword("FOR ") + variableName(node.vertexOutVariable) + " " + annotation("/* vertex */");if(node.hasOwnProperty('edgeOutVariable')){rc += " , " + variableName(node.edgeOutVariable) + " " + annotation("/* edge */");}if(node.hasOwnProperty('pathOutVariable')){rc += " , " + variableName(node.pathOutVariable) + " " + annotation("/* paths */");}rc += " " + keyword("IN") + " " + value(node.minMaxDepth) + " " + annotation("/* min..maxPathDepth */") + " ";var translate=["ANY","INBOUND","OUTBOUND"];var defaultDirection=node.directions[0];rc += keyword(translate[defaultDirection]);if(node.hasOwnProperty("vertexId")){rc += " '" + value(node.vertexId) + "' ";}else {rc += " " + variableName(node.inVariable) + " ";}rc += annotation("/* startnode */") + " ";if(Array.isArray(node.graph)){rc += node.graph.map(function(g,index){var tmp="";if(node.directions[index] !== defaultDirection){tmp += keyword(translate[node.directions[index]]);tmp += " ";}return tmp + collection(g);}).join(", ");}else {rc += keyword("GRAPH") + " '" + value(node.graph) + "'";}traversalDetails.push(node);if(node.hasOwnProperty('simpleExpressions')){node.ConditionStr = buildSimpleExpression(node.simpleExpressions);}var e=[];if(node.hasOwnProperty('graphDefinition')){var v=[];node.graphDefinition.vertexCollectionNames.forEach(function(vcn){v.push(collection(vcn));});node.vertexCollectionNameStr = v.join(", ");node.vertexCollectionNameStrLen = node.graphDefinition.vertexCollectionNames.join(", ").length;node.graphDefinition.edgeCollectionNames.forEach(function(ecn){e.push(collection(ecn));});node.edgeCollectionNameStr = e.join(", ");node.edgeCollectionNameStrLen = node.graphDefinition.edgeCollectionNames.join(", ").length;}else {var edgeCols=node.graph || [];edgeCols.forEach(function(ecn){e.push(collection(ecn));});node.edgeCollectionNameStr = e.join(", ");node.edgeCollectionNameStrLen = edgeCols.join(", ").length;node.graph = "";}return rc;case "CalculationNode":return keyword("LET") + " " + variableName(node.outVariable) + " = " + buildExpression(node.expression) + " " + annotation("/* " + node.expressionType + " expression */");case "FilterNode":return keyword("FILTER") + " " + variableName(node.inVariable);case "AggregateNode": /* old-style COLLECT node */return keyword("COLLECT") + " " + node.aggregates.map(function(node){return variableName(node.outVariable) + " = " + variableName(node.inVariable);}).join(", ") + (node.count?" " + keyword("WITH COUNT"):"") + (node.outVariable?" " + keyword("INTO") + " " + variableName(node.outVariable):"") + (node.keepVariables?" " + keyword("KEEP") + " " + node.keepVariables.map(function(variable){return variableName(variable);}).join(", "):"") + " " + annotation("/* " + node.aggregationOptions.method + " */");case "CollectNode":var collect=keyword("COLLECT") + " " + node.groups.map(function(node){return variableName(node.outVariable) + " = " + variableName(node.inVariable);}).join(", ");if(node.hasOwnProperty("aggregates") && node.aggregates.length > 0){if(node.groups.length > 0){collect += " ";}collect += keyword("AGGREGATE") + " " + node.aggregates.map(function(node){return variableName(node.outVariable) + " = " + func(node.type) + "(" + variableName(node.inVariable) + ")";}).join(", ");}collect += (node.count?" " + keyword("WITH COUNT"):"") + (node.outVariable?" " + keyword("INTO") + " " + variableName(node.outVariable):"") + (node.keepVariables?" " + keyword("KEEP") + " " + node.keepVariables.map(function(variable){return variableName(variable);}).join(", "):"") + " " + annotation("/* " + node.collectOptions.method + "*/");return collect;case "SortNode":return keyword("SORT") + " " + node.elements.map(function(node){return variableName(node.inVariable) + " " + keyword(node.ascending?"ASC":"DESC");}).join(", ");case "LimitNode":return keyword("LIMIT") + " " + value(JSON.stringify(node.offset)) + ", " + value(JSON.stringify(node.limit));case "ReturnNode":return keyword("RETURN") + " " + variableName(node.inVariable);case "SubqueryNode":return keyword("LET") + " " + variableName(node.outVariable) + " = ... " + annotation("/* subquery */");case "InsertNode":modificationFlags = node.modificationFlags;return keyword("INSERT") + " " + variableName(node.inVariable) + " " + keyword("IN") + " " + collection(node.collection);case "UpdateNode":modificationFlags = node.modificationFlags;if(node.hasOwnProperty("inKeyVariable")){return keyword("UPDATE") + " " + variableName(node.inKeyVariable) + " " + keyword("WITH") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);}return keyword("UPDATE") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);case "ReplaceNode":modificationFlags = node.modificationFlags;if(node.hasOwnProperty("inKeyVariable")){return keyword("REPLACE") + " " + variableName(node.inKeyVariable) + " " + keyword("WITH") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);}return keyword("REPLACE") + " " + variableName(node.inDocVariable) + " " + keyword("IN") + " " + collection(node.collection);case "UpsertNode":modificationFlags = node.modificationFlags;return keyword("UPSERT") + " " + variableName(node.inDocVariable) + " " + keyword("INSERT") + " " + variableName(node.insertVariable) + " " + keyword(node.isReplace?"REPLACE":"UPDATE") + " " + variableName(node.updateVariable) + " " + keyword("IN") + " " + collection(node.collection);case "RemoveNode":modificationFlags = node.modificationFlags;return keyword("REMOVE") + " " + variableName(node.inVariable) + " " + keyword("IN") + " " + collection(node.collection);case "RemoteNode":return keyword("REMOTE");case "DistributeNode":return keyword("DISTRIBUTE");case "ScatterNode":return keyword("SCATTER");case "GatherNode":return keyword("GATHER");}return "unhandled node type (" + node.type + ")";};var level=0,subqueries=[];var indent=function indent(level,isRoot){return pad(1 + level + level) + (isRoot?"* ":"- ");};var preHandle=function preHandle(node){usedVariables = {};currentNode = node.id;isConst = true;if(node.type === "SubqueryNode"){subqueries.push(level);}};var postHandle=function postHandle(node){var isLeafNode=!parents.hasOwnProperty(node.id);if(["EnumerateCollectionNode","EnumerateListNode","IndexRangeNode","IndexNode","SubqueryNode"].indexOf(node.type) !== -1){level++;}else if(isLeafNode && subqueries.length > 0){level = subqueries.pop();}else if(node.type === "SingletonNode"){level++;}};var constNess=function constNess(){if(isConst){return " " + annotation("/* const assignment */");}return "";};var variablesUsed=function variablesUsed(){var used=[];for(var a in usedVariables) {if(usedVariables.hasOwnProperty(a)){used.push(variable(a) + " : " + collection(usedVariables[a]));}}if(used.length > 0){return " " + annotation("/* collections used:") + " " + used.join(", ") + " " + annotation("*/");}return "";};var printNode=function printNode(node){preHandle(node);var line=" " + pad(1 + maxIdLen - String(node.id).length) + variable(node.id) + " " + keyword(node.type) + pad(1 + maxTypeLen - String(node.type).length) + " ";if(cluster && cluster.isCluster && cluster.isCluster()){line += variable(node.site) + pad(1 + maxSiteLen - String(node.site).length) + " ";}line += pad(1 + maxEstimateLen - String(node.estimatedNrItems).length) + value(node.estimatedNrItems) + " " + indent(level,node.type === "SingletonNode") + label(node);if(node.type === "CalculationNode"){line += variablesUsed() + constNess();}stringBuilder.appendLine(line);postHandle(node);};printQuery(query);stringBuilder.appendLine(section("Execution plan:"));var line=" " + pad(1 + maxIdLen - String("Id").length) + header("Id") + " " + header("NodeType") + pad(1 + maxTypeLen - String("NodeType").length) + " ";if(cluster && cluster.isCluster && cluster.isCluster()){line += header("Site") + pad(1 + maxSiteLen - String("Site").length) + " ";}line += pad(1 + maxEstimateLen - String("Est.").length) + header("Est.") + " " + header("Comment");stringBuilder.appendLine(line);var walk=[rootNode];while(walk.length > 0) {var id=walk.pop();var node=nodes[id];printNode(node);if(parents.hasOwnProperty(id)){walk = walk.concat(parents[id]);}if(node.type === "SubqueryNode"){walk = walk.concat([node.subquery.nodes[0].id]);}}stringBuilder.appendLine();printIndexes(indexes);printTraversalDetails(traversalDetails);stringBuilder.appendLine();printRules(plan.rules);printModificationFlags(modificationFlags);printWarnings(explain.warnings);} /* the exposed function */function explain(data,options,shouldPrint){'use strict';if(typeof data === "string"){data = {query:data};}if(!(data instanceof Object)){throw "ArangoStatement needs initial data";}if(options === undefined){options = data.options;}options = options || {};setColors(options.colors === undefined?true:options.colors);var stmt=db._createStatement(data);var result=stmt.explain(options);stringBuilder.clearOutput();processQuery(data.query,result,true);if(shouldPrint === undefined || shouldPrint){print(stringBuilder.getOutput());}else {return stringBuilder.getOutput();}}exports.explain = explain;});module.define("@arangodb/aql/functions",function(exports,module){ /*jshint strict: false */ //////////////////////////////////////////////////////////////////////////////// /// @brief AQL user functions management /// @@ -3206,7 +3206,7 @@ return +a === 0?1 / +a === 1 / b:+a === +b;case '[object Date]':case '[object Bo // of `NaN` are not equivalent. return +a === +b;}var areArrays=className === '[object Array]';if(!areArrays){if(typeof a != 'object' || typeof b != 'object')return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. -var aCtor=a.constructor,bCtor=b.constructor;if(aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)){return false;}} // Assume equality for cyclic structures. The algorithm for detecting cyclic +var aCtor=a.constructor,bCtor=b.constructor;if(aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b){return false;}} // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/scripts.html.part b/js/apps/system/_admin/aardvark/APP/frontend/build/scripts.html.part index 19a3ff4468..6294d6e02c 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/scripts.html.part +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/scripts.html.part @@ -1,3 +1,3 @@ - - - + + + diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html index 8893ee238e..a3ddff457d 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html @@ -2849,4 +2849,4 @@ var cutByResolution = function (str) {
-
\ No newline at end of file +
\ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html.gz index 71042a0fad..9cbfb838d1 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone-min.html.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone.html b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone.html index ec0a2a0d36..2465ba597a 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/standalone.html +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/standalone.html @@ -3133,9 +3133,9 @@ var cutByResolution = function (str) { - - - + + + diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css b/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css index 0285481849..e1fd00a644 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css @@ -1,7 +1,7 @@ @charset "UTF-8";.arango-tab,.contentDiv,.navlist,div .bigtile,div .tile{list-style:none}body{background:#f5f8f0!important;color:#333;display:block;font-size:14px;line-height:20px;margin:0}.fa,.fa-stack{display:inline-block}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.page-title span,.pingback a.url,body,input,textarea{font-family:'Open Sans',sans-serif!important;font-weight:400}@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local("Open Sans Light"),local("OpenSans-Light"),url(../fonts/opensans/OpenSansLight.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(../fonts/opensans/OpenSans.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(../fonts/opensans/OpenSansBold.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:300;src:local("Open Sans Light Italic"),local("OpenSansLight-Italic"),url(../fonts/opensans/OpenSansLightItalic.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local("Open Sans Italic"),local("OpenSans-Italic"),url(../fonts/opensans/OpenSansItalic.woff) format("woff")}@font-face{font-family:'Open Sans';font-style:italic;font-weight:700;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url(../fonts/opensans/OpenSansBoldItalic.woff) format("woff")}/*! * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome/fontawesome-webfont.eot?v=4.4.0);src:url(../fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(../fonts/fontawesome/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(../fonts/fontawesome/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(../fonts/fontawesome/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(../fonts/fontawesome/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.modal-body,.ui-tooltip,button{font-family:'Open Sans',sans-serif!important}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.contentDiv li,.dashboard-bar-chart-container,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage,.dashboard-full-width-chart,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart,.dashboard-half-height-legend,.dashboard-large-chart,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-legend,.dashboard-medium-chart,.dashboard-medium-chart .dashboard-interior-chart,.dashboard-small-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart,.dashboard-sub-bar,.dashboard-sub-bar .dashboard-sub-bar-title,.dashboard-tendency-container,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar,.dashboard-title-bar .dashboard-half-title-bar,.dashboardModal,.dropdown-toolbar,.fixedDropdown .notificationItemContent,.gv-dropdown-menu,.innerDropdownInnerUL,.link-dropdown-menu,.modal-chart-detail,.modal-chart-detail .modal-body,.modal-chart-detail .modal-dashboard-legend,.modal-chart-detail .modal-inner-detail,.navlist li,.navlogo,.pagination-line li a,.pull-left,.script-dropdown-menu,.user-dropdown-menu,a.button-gui,a.headerButton,div .bigtile,div .bigtile a span.add-Icon,div .tile,div .tile a span.add-Icon,div.centralContent,div.dropdownInner ul,div.footer-center,div.footer-left,div.footer-left p{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.arango-tab li,.dashboard-sub-bar-menu,.docsThirdCol,.fixedDropdown .notificationItem i,.fixedDropdown button,.headerBar>div.headerButtonBar,.navmenu,.query-button,.search-field,div .bigtile .iconSet span,div .tile .iconSet span,div.footer-right,div.footer-right p,div.gv_colour_list,ul.headerButtonList li{float:right}#distributionChartDiv:after,.arango-tab:after,.dashboard-bar-chart-container .dashboard-bar-chart:after,.dashboard-medium-chart .dashboard-medium-chart-inner:after,.dashboard-medium-chart .dashboard-medium-chart-menu:after,.dashboard-row:after,.dashboard-sub-bar:after,.dashboard-tendency-container .dashboard-tendency-chart:after,.detail-chart:after,.document-info .document-info-container .document-inner-info-container .document-attribute:after,.headerBar>div.headerButtonBar:after,.lineChartDiv:after,.pagination-line li:after,.resizecontainer:after,.tileList:after{clear:both;content:'.';display:block;font-size:0;height:0;visibility:hidden}.caret,.contentDiv:after,.contentDiv:before,.form-actions:after,.form-actions:before,.pong-spinner:after,.pong-spinner:before{content:''}.addButton,.arango-tab a,.arango-tab li,.arangoicon,.clusterDownBtn button,.contentDiv .icon,.contentTables tr.contentRowInactive a,.deleteButton i,.edit-index-table .icon_arangodb_roundminus,.fixedDropdown .notificationItem i,.fullNotification:hover,.gv-search-submit-icon,.icon-info-sign,.link>line,.node,.pagination-line li a,.script-dropdown-menu .dropdown-item,.search-submit-icon,a.button-gui,a.headerButton,div .bigtile,div .bigtile .iconSet span,div .bigtile a span.icon,div .bigtile a svg,div .tile .iconSet span,div .tile a span.icon,div .tile a svg,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,div.toolbox div.gv_action_button{cursor:pointer}.navbar,footer.footer{background-color:rgba(245,248,240,.95);color:#fff;left:0;position:fixed;right:0;width:100%;z-index:1000}.ajax-file-upload-red,.button-danger{background-color:#da4f49}.ajax-file-upload-red:focus,.ajax-file-upload-red:hover,.button-danger:focus,.button-danger:hover{background-color:#be342e}.contentTables td span,.deleteButton i,.edit-index-table .icon_arangodb_roundminus{color:#da4f49}.contentTables td span:focus,.contentTables td span:hover,.deleteButton i:focus,.deleteButton i:hover,.edit-index-table .icon_arangodb_roundminus:focus,.edit-index-table .icon_arangodb_roundminus:hover{color:#be342e}.ajax-file-upload,.button-success{background-color:#8aa051}.ajax-file-upload:focus,.ajax-file-upload:hover,.button-success:focus,.button-success:hover{background-color:#788f3d}.addButton,.contentTables td.dbThSecond span{color:#8aa051}.addButton:focus,.addButton:hover,.contentTables td.dbThSecond span:focus,.contentTables td.dbThSecond span:hover{color:#788f3d}.button-warning{background-color:#faa732}.button-warning:focus,.button-warning:hover{background-color:#f89406}.button-close,.button-neutral{background-color:#8f8d8c}.button-close:focus,.button-close:hover,.button-neutral:focus,.button-neutral:hover{background-color:#736b68}.dashboard-sub-bar-menu{color:#8f8d8c}.dashboard-sub-bar-menu:focus,.dashboard-sub-bar-menu:hover{color:#736b68}.button-primary{background-color:#564e4a}.button-primary:focus,.button-primary:hover{background-color:#3a322e}.button-header,a.button-gui,a.headerButton{background-color:#fff;border:1px solid #fff;color:#555}.button-header:focus,.button-header:hover,a.button-gui:focus,a.button-gui:hover,a.headerButton:focus,a.headerButton:hover{background-color:#8aa051;border:1px solid #8aa051;color:#fff}.button-notification{background-color:#faa020}.button-notification:focus,.button-notification:hover{background-color:#f87c0f}.button-inactive,.button-inactive:focus,.button-inactive:hover,[class^=button-]:disabled,[class^=button-]:focus:disabled,[class^=button-]:hover:disabled,button.disabled,button.disabled:focus,button.disabled:hover{background-color:#d3d3d3}a.headerButton.disabled,a.headerButton.disabled:focus,a.headerButton.disabled:hover{color:#d3d3d3}div.queryline .fa.fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:relative;right:21px;top:-1px}div.queryline .fa.fa-search:hover{cursor:pointer;opacity:1}.inputEditorWrapper .aqlEditorWrapper table td input,.inputEditorWrapper .bindParamEditorWrapper table td input,.login-window .login-input,.modal-body .select2-choices input,.modal-body input,.modal-body select,.modal-body textarea,.navbar .arango-collection-select,div.queryline input,div.queryline select,input.search-input{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff!important;border:1px solid rgba(140,138,137,.25);box-shadow:none;outline:transparent 0}.inputEditorWrapper .aqlEditorWrapper table td input:focus,.inputEditorWrapper .bindParamEditorWrapper table td input:focus,.login-window .login-input:focus,.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus,.navbar .arango-collection-select:focus,div.queryline input:focus,div.queryline select:focus,input.search-input:focus{border-color:#999;box-shadow:none;outline:transparent 0}.ajax-file-upload-red:focus,.ajax-file-upload:focus,.button-close:focus,.button-danger:focus,.button-inactive:focus,.button-neutral:focus,.button-notification:focus,.button-primary:focus,.button-success:focus,.button-warning:focus,div.headerBar select:focus{outline:0}.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.script-dropdown-menu,.user-dropdown-menu{background-color:#f5f8f0;border-color:#666;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;display:none;list-style:none;margin:5px 0 0;padding:5px 0;position:absolute;right:0;top:80%;z-index:1000}.script-dropdown-menu .dropdown-item a,.tab{display:block}.dropdown-toolbar li,.gv-dropdown-menu li,.link-dropdown-menu li,.script-dropdown-menu li,.user-dropdown-menu li{line-height:23px;white-space:nowrap;width:100%}.dropdown-toolbar .dropdown-header,.gv-dropdown-menu .dropdown-header,.link-dropdown-menu .dropdown-header,.script-dropdown-menu .dropdown-header,.user-dropdown-menu .dropdown-header{color:#999;font-size:15px;font-weight:600;font-variant:small-caps;padding:0}.dropdown-toolbar .dropdown-header:hover,.gv-dropdown-menu .dropdown-header:hover,.link-dropdown-menu .dropdown-header:hover,.script-dropdown-menu .dropdown-header:hover,.user-dropdown-menu .dropdown-header:hover{cursor:default}div .bigtile:hover,div .tile:hover,div.footer-center p:hover{cursor:pointer}.dropdown-toolbar .divider,.gv-dropdown-menu .divider,.link-dropdown-menu .divider,.script-dropdown-menu .divider,.user-dropdown-menu .divider{background-color:#666;height:1px;margin:10px 0 5px}.dropdown-toolbar a,.gv-dropdown-menu a,.link-dropdown-menu a,.script-dropdown-menu a,.user-dropdown-menu a{color:#fff;padding:0 20px}.navbar{-webkit-font-smoothing:subpixel-antialiased;height:44px;margin-bottom:3px;padding-top:6px;top:0}.navbar .no-left-margin{border:0;margin-left:0}.navbar .no-left-margin.hover{background-color:transparent}.navbar .arangodbLogo{height:auto;margin-left:-5px;margin-top:-1px;width:40%}.navbar .arango-collection-select{position:relative;right:-22px;top:4px}.navbar .nav .dropdown .active>.dropdown-toggle,.navbar .nav .dropdown .open.active>.dropdown-toggle,.navbar .nav .dropdown .open>.dropdown-toggle{background:#788f3d}.navbar .nav>.active>a{-webkit-box-shadow:0 0 0 transparent inset;-moz-box-shadow:0 0 0 transparent inset;box-shadow:0 0 0 transparent inset;background-color:#fff;color:#000}.navbar .nav>li>a:focus{background-color:#fff}.navbar .nav>li>a:hover{background-color:#000;color:#686766}.navlist .dropdown-item:hover a,.navlist>.active a,.navlist>.active:hover a,.navlist>li:hover a{color:#000}.navlogo{margin-left:5px;margin-right:-3px;padding-top:3px}.navlist>li{height:39px}.navlist li{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid transparent;margin-left:7px}.navlist li.dropdown:hover{background-color:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-left:1px solid rgba(0,0,0,.2);border-right:1px solid rgba(0,0,0,.2);border-top:1px solid rgba(0,0,0,.2)}.navlist li.dropdown:hover a{border-bottom:2px solid #fff}.navlist li.divider,.navlist li.navbar-spacer{border:0}.navlist li.divider{background-color:rgba(0,0,0,.2)}.navlist li.navbar-spacer{background-color:#a0a0a0;height:21px;margin-top:9px;width:1px}.navlist li.navbar-spacer.big{margin-left:15px;margin-right:15px}.navlist li.navbar-spacer.med{margin-left:5px;margin-right:5px}.navlist .dropdown-item,.script-dropdown-menu .dropdown-item{margin-left:0}.navlist li.navbar-spacer:hover{background-color:#a0a0a0}.navlist .active .tab{border-bottom:2px solid #8aa051;padding-bottom:4px}.navlist>.active{background-color:transparent}.navlist>.active:hover{background-color:#fff}.navlist .dropdown-item:hover,.navlist>li:hover{background-color:#fff;border-radius:3px}.navlist .dropdown-item a{border-bottom:0;display:block;font-size:11pt}.navlist .dropdown-item a:hover{background-color:#dee9cf;color:#686766}.tab{color:#686766;font-size:12pt;font-weight:100;padding:9px 5px 10px}.tab.userImg{padding-bottom:5px}.dropdown-item a{border-bottom:0!important;font-weight:300}.dropdown-toolbar li a,footer.footer p{font-weight:100}.dropdown-toolbar{background-color:#fff!important;border:1px solid rgba(140,138,137,.25)}.dropdown-toolbar li a:hover{background:0 0;background-color:#dee9cf!important;color:#000!important}.link-dropdown-menu,.user-dropdown-menu{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-top-right-radius:0;margin-right:-1px;margin-top:7px;z-index:-10}.link-dropdown-menu .dropdown-item,.user-dropdown-menu .dropdown-item{border-left:0;border-right:0}.script-dropdown-menu .dropdown-item a:hover{color:#fff}.script-dropdown-menu .dropdown-item:hover{background-color:#8aa051}.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:rgba(0,0,0,.7);border:1px solid #c2c2c2;margin-right:-20px;margin-top:6px}.gv-dropdown-menu:after{border-bottom-color:#fff}.gv-dropdown-menu li:hover{background-color:#fff;background-image:none}.gv-dropdown-menu li a{padding:0}.gv-dropdown-menu li a label{color:#fff;padding-left:5px}.gv-dropdown-menu li a:focus{background-color:#8aa051!important;background-image:none}#arangoCollectionSelect{display:none;float:right;margin-bottom:0;margin-right:15px;padding-bottom:0}.caret{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #686766;display:inline-block;height:0;vertical-align:top;width:0}.applications-menu{display:block}.arango-logo{height:34px;padding:0!important}.arango-logo img{margin-left:22px}.footer{bottom:0;font-size:14px;left:0;position:fixed;right:0;text-align:center;z-index:1000}footer.footer{bottom:0;height:40px}footer.footer p{font-size:10pt;margin-bottom:0;padding-bottom:10px;padding-top:10px}div.footer-left{background:none;color:#686766;width:45%}div.footer-left .social-icons{margin-top:5px}div.footer-left .social-icons a{display:block;float:left;height:25px;width:25px}div.footer-left .social-icons p{background:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;height:25px;margin-right:10px;padding:0;width:25px}div.footer-left .social-icons p:hover{background:#8aa051;cursor:pointer}div.footer-left .social-icons p:hover i{color:#fff}div.footer-left .social-icons i{color:#000;margin-top:6px;position:absolute}div.footer-left .social-icons i.fa-twitter{margin-left:-5px}div.footer-left .social-icons i.fa-envelope{margin-left:-19px}div.footer-left .social-icons i.fa-google{margin-left:-17px;margin-top:7px}div.footer-left .social-icons i.fa-stack-overflow{margin-left:-17px}div.footer-center{background:none;color:#686766;width:10%}div.footer-center i{background-color:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;margin-left:1px;padding:6px 2px;width:20px}div.footer-center i:hover{background-color:#8aa051;color:#fff}div.footer-center p{padding-top:5px}[class*=' button-']:disabled,[class^=button-]:disabled,a.headerButton.disabled,button.disabled{cursor:not-allowed}div.footer-right{background:none;color:#686766;width:45%}div.footer-right p{color:#fff}div.footer-right i{color:#da4f49;font-size:18px}div.footer-right a{color:#686766;margin-left:5px;position:relative;top:-1px}div.footer-right .isOnline{color:#8aa051!important}.ajax-file-upload,.ajax-file-upload-red,.button-close,.button-danger,.button-header,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;font-size:14px;font-weight:300!important}.addButton,.deleteButton i{font-size:16pt;position:relative}.ajax-file-upload,.ajax-file-upload-red,.button-close,.button-danger,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{border:0;color:#fff;margin-left:10px;padding:5px 16px}.ajax-file-upload i,.ajax-file-upload-red i,.button-close i,.button-danger i,.button-inactive i,.button-neutral i,.button-notification i,.button-primary i,.button-success i,.button-warning i{margin-left:-5px}.button-header{margin-top:5px}.addButton{margin-right:7px;margin-top:2px}.deleteButton i{padding-right:3px;top:3px}#closeBtnInfoView{margin-left:0!important}button.btn-server{width:120px}button.gv-zoom-btn{background-size:14px 14px;height:14px;vertical-align:baseline;width:14px}button.gv-zoom-btn.btn-zoom-right{border:0;box-shadow:none;right:0;top:13px}button.gv-zoom-btn.pan-right{background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-right:hover{background:inherit;background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-left{background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-left:hover{background:inherit;background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-top{background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-top:hover{background:inherit;background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-bottom{background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.pan-bottom:hover{background:inherit;background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.btn-zoom{height:14px;margin:0;padding:0;position:absolute;width:16px}button.gv-zoom-btn.btn-zoom-top{border:0;box-shadow:none;left:13px;top:1}button.gv-zoom-btn.btn-zoom-left{border:0;box-shadow:none;left:0;top:13px}button.gv-zoom-btn.btn-zoom-bottom{border:0;box-shadow:none;left:13px;top:25px}button.gv-icon-btn{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;background-size:36px 36px;height:36px;width:36px}button.gv-icon-btn.active{background-color:#8aa051}button.gv_dropdown_entry{height:30px;margin:4px 4px 4px 12px;width:160px}button.gv_context_button{width:65px}button.large-distance{margin-left:12px}button.short-distance{margin-left:6px}button.shutdown{margin-top:6px;padding:3px 14px}button.graphViewer-icon-button{background-color:transparent;border:0;height:20px;margin-left:5px;margin-top:-2px;padding:0;width:20px}button.graphViewer-icon-button img{height:20px;padding-bottom:10px;width:20px}ul.headerButtonList{display:inline-block;margin-bottom:0;margin-left:0;padding-left:0!important}ul.headerButtonList li{display:inline}a.button-gui,a.headerButton{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;margin-left:5px;margin-right:5px}a.headerButton{margin-top:2px;position:relative}a.headerButton .fa,a.headerButton [class*=" icon_"],a.headerButton [class^=icon_]{display:block;height:23px;line-height:23px;position:static;right:0;text-align:center;top:0;width:27px}a.headerButton .icon_arangodb_arrowleft,a.headerButton .icon_arangodb_arrowright{font-weight:700}a.headerButton.activated{background-color:#788f3d;border:1px solid #788f3d;color:#fff}div.toolbox,div.toolbox div.gv_action_button{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff}a.headerButton.activated:hover{background-color:#fff;color:#788f3d}div.toolbox{border-radius:3px;border:1px solid rgba(140,138,137,.25);margin-right:5px;margin-top:-3px;padding-bottom:5px;padding-top:5px;position:absolute}div.toolbox div.gv_action_button{border-radius:3px;color:#555;height:30px;margin:5px;position:relative;text-align:center;width:30px}div.toolbox div.gv_action_button.active{background-color:#8aa051;color:#fff}div.toolbox div.gv_action_button:first-child{margin-top:0}div.toolbox div.gv_action_button:last-child{margin-bottom:0}h6.gv_button_title,h6.gv_icon_icon{left:0;margin:0;position:absolute;right:0}h6.gv_icon_icon{font-size:22px;left:1px;top:4px}h6.gv_button_title{bottom:1px;display:none}.btn-icon{background-color:#383434;padding:4px}.gv-icon-small{background-size:16px 16px;height:16px!important;width:16px!important}.gv-icon-small.delete{background-image:url(../img/icon_delete.png)}.gv-icon-small.add{background-image:url(../img/plus_icon.png)}a.pagination-button,ul.arango-pagination a{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.badge,.btn,.label{text-shadow:none!important}.navbar-inner,.thumbnail{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0}.modal-body th.actionCell>button{margin-top:-12px}.btn-old-padding{padding-bottom:4px!important;padding-top:4px!important}button.btn-overview,button.btn-server{margin:5px}a.button-gui{height:auto;margin-bottom:0;margin-top:0;padding-bottom:1px;padding-top:1px;position:absolute;right:2px;text-decoration:none!important;top:2px;width:auto}a.button-gui.button-gui-disabled{display:none}.clusterDownBtn{padding-bottom:10px;padding-top:10px;text-align:center}.clusterDownBtn button{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#f1f1f1;border:1px solid rgba(0,0,0,.1875);color:#333;font-size:20px;font-weight:300;margin:0;padding:12px 18px;text-align:center;text-decoration:none!important;width:250px}.clusterDownBtn button:hover{background-color:#e8e8e8;color:#4a6c30;-webkit-transition-delay:0;-webkit-transition-duration:.2s;-webkit-transition-property:all;-webkit-transition-timing-function:ease-in}.clusterDownBtn button.green{background-color:#617e2b;color:#fff}.clusterDownBtn button.green:hover{background-color:#8ba142}.bottomButtonBar{background-color:#fff;border-top:1px solid rgba(104,103,102,.1);height:30px;padding:10px}.tileList{margin-left:-6px;margin-right:-6px}.tileList legend{padding-left:5px}.tileList .tile:first-child a{opacity:.8}.tileList .tile:first-child a:hover{opacity:1}div .bigtile,div .tile{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff;border:1px solid #f5f8f0;border-radius:3px;font-size:14px;margin-bottom:13px;margin-left:6px;margin-right:6px;position:relative;text-align:center;z-index:1}div .bigtile progress[value],div .tile progress[value]{color:#5bc0de}div .bigtile progress::-webkit-progress-bar-value,div .tile progress::-webkit-progress-bar-value{background:#5bc0de}div .bigtile progress::-webkit-progress-value,div .tile progress::-webkit-progress-value{background:#5bc0de}div .bigtile progress::-moz-progress-bar,div .tile progress::-moz-progress-bar{background:#5bc0de}div .bigtile progress,div .tile progress{-webkit-appearance:none;border-radius:0;height:2px;margin-top:16px;position:relative;width:100%;z-index:10}div .locked.bigtile,div .locked.tile{cursor:not-allowed}div .locked.bigtile .borderBox,div .locked.bigtile .collection-type-icon,div .locked.bigtile .collectionName,div .locked.bigtile .iconSet,div .locked.tile .borderBox,div .locked.tile .collection-type-icon,div .locked.tile .collectionName,div .locked.tile .iconSet{opacity:.5}div .locked.bigtile .iconSet span:hover,div .locked.tile .iconSet span:hover{background-color:#fff!important;color:#000;cursor:not-allowed!important}div .locked.bigtile .iconSet:hover,div .locked.tile .iconSet:hover{cursor:not-allowed!important}div .bigtile .collection-type-icon:hover,div .bigtile img:hover,div .tile .collection-type-icon:hover,div .tile img:hover{cursor:pointer}div .bigtile .warning-icons,div .tile .warning-icons{background-color:#da4f49;border-radius:3px;color:#fff;font-size:11px;height:17px;left:0;line-height:13px;margin-left:5px;margin-top:5px;padding-left:9px;padding-right:9px;position:absolute;top:0}div .bigtile a svg.icon,div .bigtile img.icon,div .tile a svg.icon,div .tile img.icon{height:50px;width:50px}div .bigtile .warning-icons .fa,div .tile .warning-icons .fa{font-size:11pt;margin-left:1px}div .bigtile .collection-type-icon,div .tile .collection-type-icon{color:#666;font-size:30pt;margin-top:12pt}div .bigtile img,div .tile img{position:relative}div .bigtile a span.add-Icon,div .tile a span.add-Icon{font-size:20px;margin-left:22px;margin-right:10px;position:relative;top:0}div .bigtile a span.icon,div .tile a span.icon{font-size:50px}div .bigtile .tile-icon-svg,div .tile .tile-icon-svg{cursor:pointer;fill:#686766;height:50px;margin-left:90px;margin-top:10px;position:absolute;width:50px}div .bigtile .tile-icon,div .tile .tile-icon{color:#686766;font-size:50px;line-height:1.2}div .bigtile .icon_arangodb_edge5-2,div .tile .icon_arangodb_edge5-2{display:inline-block;position:relative;top:15px;-moz-transform:rotate(80deg);-o-transform:rotate(80deg);-webkit-transform:rotate(80deg)}div .bigtile h5,div .tile h5{background:#8c8a89;color:#fff;font-size:12px;margin:0;overflow:hidden!important;padding:4px 8px;text-overflow:ellipsis!important;white-space:nowrap!important}div .bigtile h5.inProgress,div .tile h5.inProgress{color:#5bc0de}div .bigtile .tileSelects,div .tile .tileSelects{margin-left:40px;position:relative;z-index:9999}div .bigtile .tileSelects select,div .tile .tileSelects select{float:right;height:20px;margin-right:5px;margin-top:16px;width:70px}div .bigtile .fullBorderBox,div .tile .fullBorderBox{border:1px solid rgba(140,138,137,.25);border-radius:3px;height:100%;position:absolute;width:100%}div .bigtile .borderBox,div .tile .borderBox{border:1px solid rgba(140,138,137,.25);border-bottom:0;border-radius:3px;height:75px;position:absolute;width:224px}div .bigtile .iconSet,div .tile .iconSet{position:absolute;right:5px;top:5px}div .bigtile .iconSet span,div .tile .iconSet span{border-radius:3px;color:#666;font-size:18px;z-index:2;padding:2px 3px}.modal,.select2-drop-active{z-index:9999999}div .bigtile .iconSet span:hover,div .tile .iconSet span:hover{background-color:#8aa051;color:#fff}div .bigtile .iconSet span.disabled,div .tile .iconSet span.disabled{cursor:default;opacity:.2}div .bigtile .iconSet span.disabled:hover,div .tile .iconSet span.disabled:hover{background-color:#fff;color:#000;cursor:default;opacity:.2}div .bigtile .badge-success,div .tile .badge-success{font-weight:300}div .bigtile .unloaded div,div .tile .unloaded div{border-bottom:16px solid #ff8f35}div .bigtile .deleted div,div .tile .deleted div{border-bottom:16px solid #700}div .bigtile .tileBadge,div .tile .tileBadge{bottom:29px;font-size:11px;font-weight:300;position:absolute;right:0}div .bigtile .tileBadge button,div .tile .tileBadge button{margin-left:0;margin-right:5px}div .bigtile .tileBadge span,div .tile .tileBadge span{display:inline-block;line-height:15px}div .bigtile .tileBadge span .corneredBadge,div .tile .tileBadge span .corneredBadge{border-bottom-style:solid;border-bottom-width:17px;border-left:5px solid transparent;border-radius:3px;color:#fff;height:0;margin-bottom:4px;margin-right:5px;padding-left:1px;padding-right:6px}div .bigtile .tileBadge span .corneredBadge.loading,div .tile .tileBadge span .corneredBadge.loading{border-bottom-color:#ff8f35}div .bigtile .tileBadge span .corneredBadge.loaded,div .tile .tileBadge span .corneredBadge.loaded{border-bottom-color:#8aa051}div .bigtile .tileBadge span .corneredBadge.inProgress,div .tile .tileBadge span .corneredBadge.inProgress{border-bottom-color:#5bc0de}div .bigtile .tileBadge span .corneredBadge.development,div .bigtile .tileBadge span .corneredBadge.unloaded,div .tile .tileBadge span .corneredBadge.development,div .tile .tileBadge span .corneredBadge.unloaded{border-bottom-color:#ff8f35}div .tile{height:100px;width:226px}div .tile-graph .tile-icon:hover{cursor:pointer}div .bigtile{height:309px;width:452px}div .bigtile .shardContainer{font-size:30px}div .bigtile .shardContainer span{padding:2px}.collectionName{border-bottom-left-radius:3px;border-bottom-right-radius:3px;bottom:0;font-weight:300;left:0;position:absolute;right:0;text-align:left}div.headerBar,div.headerDropdown{border:1px solid rgba(140,138,137,.25)}.resizecontainer{margin:0 auto}@media (max-width:738px){#arangoCollectionUl,.footer-center p{display:none}#collectionsDropdown ul{width:auto!important}#arangoCollectionSelect{display:inline-block;height:29px;margin-top:1px}#queryContent #querySize,#queryContent #querySizeDiv,#queryContent .styled-select{width:90px!important}}@media (max-width:970px){#documentsDiv #totalDocuments{display:none}.navmenu{padding-left:20px;padding-top:0;position:absolute}}@media (min-width:739px) and (max-width:1041px){#arangoCollectionUl a{font-size:12px;height:12px;padding:8px 5px}}@media (min-width:1042px) and (max-width:1284px){#arangoCollectionUl a{font-size:14px}}@media (min-width:250px) and (max-width:489px){.resizecontainer{width:228px}.dashboard-full-width-chart{width:225px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:215px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:69.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:214px}.dashboard-large-chart{width:146px}.dashboard-large-chart .dashboard-sub-bar{width:134px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:136px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:106px}.dashboard-medium-chart{width:96px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:95px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:96px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:79px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:66px}.dashboard-small-chart .dashboard-sub-bar{width:54px}.dashboard-small-chart .dashboard-small-chart-inner{width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:54px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:56px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:40px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-114px;width:248px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:208px}.modal-body .dashboard-large-chart{width:143px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:131px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:133px}.modal-body .dashboard-medium-chart-outer{float:left;width:91px}.modal-body .dashboard-medium-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:89px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:74px}.modal-body .dashboard-small-chart{width:61px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:49px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:51px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:6.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:51px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:56px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:40px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:228px}.application-detail-view aside.meta{display:none}}@media (min-width:490px) and (max-width:729px){.resizecontainer{width:468px}.dashboard-full-width-chart{width:465px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:455px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:149.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart{width:306px}.dashboard-large-chart .dashboard-sub-bar{width:294px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:296px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:226px}.dashboard-medium-chart{width:216px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:215px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:216px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:199px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:146px}.dashboard-small-chart .dashboard-sub-bar{width:134px}.dashboard-small-chart .dashboard-small-chart-inner{width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:48px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:134px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:136px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:120px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-234px;width:488px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:448px}.modal-body .dashboard-large-chart{width:303px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:291px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:293px}.modal-body .dashboard-medium-chart-outer{float:left;width:211px}.modal-body .dashboard-medium-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:194px}.modal-body .dashboard-small-chart{width:141px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:129px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:131px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:46.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:131px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:136px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:120px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:468px}.application-detail-view aside.meta{display:none}}@media (min-width:730px) and (max-width:969px){.resizecontainer{width:708px}.dashboard-full-width-chart{width:705px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:695px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:229.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:694px}.dashboard-large-chart{width:466px}.dashboard-large-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:456px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:346px}.dashboard-medium-chart{width:336px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:335px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:319px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:226px}.dashboard-small-chart .dashboard-sub-bar{width:214px}.dashboard-small-chart .dashboard-small-chart-inner{width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:88px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:214px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:216px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:200px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-354px;width:728px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:688px}.modal-body .dashboard-large-chart{width:463px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:451px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:453px}.modal-body .dashboard-medium-chart-outer{float:left;width:331px}.modal-body .dashboard-medium-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:329px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:314px}.modal-body .dashboard-small-chart{width:221px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:211px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:86.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:211px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:216px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:200px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:508px}}@media (min-width:970px) and (max-width:1209px){.resizecontainer{width:948px}.dashboard-full-width-chart{width:945px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:935px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:309.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart{width:626px}.dashboard-large-chart .dashboard-sub-bar{width:614px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:220px;width:496px}.dashboard-sub-bar-menu{font-size:13px}.dashboard-medium-chart-outer{float:left;width:466px}.dashboard-medium-chart{width:456px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:455px}.dashboard-medium-chart .dashboard-interior-chart{height:220px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:13px;left:438px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:220px;width:456px}.dashboard-medium-chart #clusterGraphs svg text{font-size:11px}.dashboard-small-chart{width:306px}.dashboard-small-chart .dashboard-sub-bar{width:294px}.dashboard-small-chart .dashboard-small-chart-inner{width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:229px;width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:11px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:96.5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:128px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:31.17px;line-height:31.17px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:52.33px;line-height:25.17px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:294px}.dashboard-bar-chart-container{height:98px}.dashboard-bar-chart-container .dashboard-bar-chart{height:96px;width:296px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:31.33px;line-height:31.33px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:45.67px;line-height:45.67px;padding:5px 8px 10px;width:280px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:50.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-474px;width:968px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:13px;min-height:225px;width:130px}.absolut,.percentage{font-size:15px}.modal-chart-detail .modal-inner-detail{width:808px}.modal-body .dashboard-large-chart{width:623px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:611px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:493px}.modal-body .dashboard-medium-chart-outer{float:left;width:451px}.modal-body .dashboard-medium-chart{width:451px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:433px}.modal-body .dashboard-small-chart{width:301px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:289px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:291px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:126.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:291px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:296px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:280px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:11px;font-weight:400}.dashboard-subtitle-bar{font-size:15px;font-weight:300}.dashboard-figure{font-size:18px;font-weight:400}.dashboard-figurePer{font-size:16px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:11px}.dashboard-legend{height:225px;margin-top:-3px;width:120px}.dashboard-half-height-legend{font-size:11px;height:117.5px;width:60px}.application-detail-view section.info{width:748px}}@media (min-width:1210px) and (max-width:1449px){.resizecontainer{width:1188px}.dashboard-full-width-chart{width:1185px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1175px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:389.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1174px}.dashboard-large-chart{width:786px}.dashboard-large-chart .dashboard-sub-bar{width:774px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:255px;width:646px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:586px}.dashboard-medium-chart{width:576px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:575px}.dashboard-medium-chart .dashboard-interior-chart{height:255px;width:446px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:16px;left:555px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:255px;width:576px}.dashboard-medium-chart #clusterGraphs svg text{font-size:12px}.dashboard-small-chart{width:386px}.dashboard-small-chart .dashboard-sub-bar{width:374px}.dashboard-small-chart .dashboard-small-chart-inner{width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:264px;width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:114px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:168px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:37px;line-height:37px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:64px;line-height:31px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:374px}.dashboard-bar-chart-container{height:115.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:113.5px;width:376px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:37.17px;line-height:37.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:57.33px;line-height:57.33px;padding:5px 8px 10px;width:360px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:62.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-594px;width:1208px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:14px;min-height:260px;width:140px}.absolut,.percentage{font-size:18px}.modal-chart-detail .modal-inner-detail{width:1038px}.modal-body .dashboard-large-chart{width:783px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:771px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:643px}.modal-body .dashboard-medium-chart-outer{float:left;width:571px}.modal-body .dashboard-medium-chart{width:571px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:569px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:441px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:550px}.modal-body .dashboard-small-chart{width:381px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:369px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:371px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:166.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:371px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:376px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:360px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:18px;font-weight:300}.dashboard-figure{font-size:22px;font-weight:400}.dashboard-figurePer{font-size:20px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:13px;font-weight:400}.dashboard-legend{font-size:12px;font-weight:400;height:260px;margin-top:-3px;width:130px}.dashboard-half-height-legend{font-size:12px;height:135px;width:65px}.application-detail-view section.info{width:988px}}@media (min-width:1450px) and (max-width:1689px){.resizecontainer{width:1428px}.dashboard-full-width-chart{width:1425px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1415px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:469.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart{width:946px}.dashboard-large-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:796px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:706px}.dashboard-medium-chart{width:696px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:695px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:556px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:18px;left:673px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:696px}.dashboard-medium-chart #clusterGraphs svg text{font-size:13px}.dashboard-small-chart{width:466px}.dashboard-small-chart .dashboard-sub-bar{width:454px}.dashboard-small-chart .dashboard-small-chart-inner{width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:208px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:454px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:456px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:440px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-714px;width:1448px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:15px;min-height:290px;width:150px}.absolut,.percentage{font-size:20px}.modal-chart-detail .modal-inner-detail{width:1268px}.modal-body .dashboard-large-chart{width:943px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:931px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:793px}.modal-body .dashboard-medium-chart-outer{float:left;width:691px}.modal-body .dashboard-medium-chart{width:691px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:551px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:668px}.modal-body .dashboard-small-chart{width:461px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:451px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:206.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:451px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:456px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:440px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:20px;font-weight:300}.dashboard-figure{font-size:26px;font-weight:400}.dashboard-figurePer{font-size:24px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:13px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:13px;height:150px;width:70px}.application-detail-view section.info{width:1228px}}@media (min-width:1690px) and (max-width:1929px){.resizecontainer{width:1668px}.dashboard-full-width-chart{width:1665px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1655px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:549.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1654px}.dashboard-large-chart{width:1106px}.dashboard-large-chart .dashboard-sub-bar{width:1094px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:325px;width:936px}.dashboard-sub-bar-menu{font-size:16px}.dashboard-medium-chart-outer{float:left;width:826px}.dashboard-medium-chart{width:816px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:815px}.dashboard-medium-chart .dashboard-interior-chart{height:325px;width:656px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:22px;left:789px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:325px;width:816px}.dashboard-medium-chart #clusterGraphs svg text{font-size:14px}.dashboard-small-chart{width:546px}.dashboard-small-chart .dashboard-sub-bar{width:534px}.dashboard-small-chart .dashboard-small-chart-inner{width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:334px;width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:149px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:248px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:48.67px;line-height:48.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:87.33px;line-height:42.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:534px}.dashboard-bar-chart-container{height:150.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:148.5px;width:536px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:48.83px;line-height:48.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:80.67px;line-height:80.67px;padding:5px 8px 10px;width:520px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:85.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-834px;width:1688px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:16px;min-height:330px;width:170px}.absolut,.percentage{font-size:24px}.modal-chart-detail .modal-inner-detail{width:1488px}.modal-body .dashboard-large-chart{width:1103px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1091px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:933px}.modal-body .dashboard-medium-chart-outer{float:left;width:811px}.modal-body .dashboard-medium-chart{width:811px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:809px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:651px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:784px}.modal-body .dashboard-small-chart{width:541px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:529px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:531px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:246.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:531px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:536px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:520px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:14px;font-weight:400}.dashboard-subtitle-bar{font-size:24px;font-weight:300}.dashboard-figure{font-size:30px;font-weight:400}.dashboard-figurePer{font-size:28px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:14px}.dashboard-legend{height:330px;margin-top:-3px;width:160px}.dashboard-half-height-legend{font-size:14px;height:170px;width:80px}.application-detail-view section.info{width:1468px}}@media (min-width:1930px) and (max-width:2169px){.resizecontainer{width:1908px}.dashboard-full-width-chart{width:1905px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1895px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:629.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1894px}.dashboard-large-chart{width:1266px}.dashboard-large-chart .dashboard-sub-bar{width:1254px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:385px;width:1086px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:946px}.dashboard-medium-chart{width:936px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:935px}.dashboard-medium-chart .dashboard-interior-chart{height:385px;width:766px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:26px;left:905px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:385px;width:936px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:626px}.dashboard-small-chart .dashboard-sub-bar{width:614px}.dashboard-small-chart .dashboard-small-chart-inner{width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:394px;width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:179px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:288px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:58.67px;line-height:58.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:107.33px;line-height:52.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:614px}.dashboard-bar-chart-container{height:180.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:178.5px;width:616px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:58.83px;line-height:58.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:100.67px;line-height:100.67px;padding:5px 8px 10px;width:600px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:105.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-954px;width:1928px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:390px;width:180px}.absolut,.percentage{font-size:28px}.modal-chart-detail .modal-inner-detail{width:1718px}.modal-body .dashboard-large-chart{width:1263px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1251px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1083px}.modal-body .dashboard-medium-chart-outer{float:left;width:931px}.modal-body .dashboard-medium-chart{width:931px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:929px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:761px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:900px}.modal-body .dashboard-small-chart{width:621px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:609px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:611px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:286.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:611px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:616px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:600px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:28px;font-weight:300}.dashboard-figure{font-size:34px;font-weight:400}.dashboard-figurePer{font-size:32px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:14px;font-weight:400}.dashboard-legend{font-size:15px;font-weight:400;height:390px;margin-top:-3px;width:170px}.dashboard-half-height-legend{font-size:15px;height:200px;width:85px}.application-detail-view section.info{width:1708px}}@media (min-width:2170px) and (max-width:2409px){.resizecontainer{width:2148px}.dashboard-full-width-chart{width:2145px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2135px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:709.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2134px}.dashboard-large-chart{width:1426px}.dashboard-large-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1276px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1066px}.dashboard-medium-chart{width:1056px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1055px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:916px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1031px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1056px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:706px}.dashboard-small-chart .dashboard-sub-bar{width:694px}.dashboard-small-chart .dashboard-small-chart-inner{width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:328px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:694px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:696px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:680px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1074px;width:2168px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:1988px}.modal-body .dashboard-large-chart{width:1423px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1411px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1273px}.modal-body .dashboard-medium-chart-outer{float:left;width:1051px}.modal-body .dashboard-medium-chart{width:1051px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1049px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:911px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1026px}.modal-body .dashboard-small-chart{width:701px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:691px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:326.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:691px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:696px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:680px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:1948px}}@media (min-width:2410px) and (max-width:2649px){.resizecontainer{width:2388px}.dashboard-full-width-chart{width:2385px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2375px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:789.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2374px}.dashboard-large-chart{width:1586px}.dashboard-large-chart .dashboard-sub-bar{width:1574px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1436px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1186px}.dashboard-medium-chart{width:1176px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1175px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1036px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1151px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1176px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:786px}.dashboard-small-chart .dashboard-sub-bar{width:774px}.dashboard-small-chart .dashboard-small-chart-inner{width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:368px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:774px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:776px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:760px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1194px;width:2408px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2228px}.modal-body .dashboard-large-chart{width:1583px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1571px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1433px}.modal-body .dashboard-medium-chart-outer{float:left;width:1171px}.modal-body .dashboard-medium-chart{width:1171px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1169px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1031px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1146px}.modal-body .dashboard-small-chart{width:781px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:769px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:771px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:366.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:771px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:776px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:760px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2188px}}@media (min-width:2650px) and (max-width:2889px){.resizecontainer{width:2628px}.dashboard-full-width-chart{width:2625px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2615px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:869.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2614px}.dashboard-large-chart{width:1746px}.dashboard-large-chart .dashboard-sub-bar{width:1734px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1596px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1306px}.dashboard-medium-chart{width:1296px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1295px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1156px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1271px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1296px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:866px}.dashboard-small-chart .dashboard-sub-bar{width:854px}.dashboard-small-chart .dashboard-small-chart-inner{width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:408px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:854px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:856px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:840px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1314px;width:2648px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2468px}.modal-body .dashboard-large-chart{width:1743px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1731px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1593px}.modal-body .dashboard-medium-chart-outer{float:left;width:1291px}.modal-body .dashboard-medium-chart{width:1291px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1289px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1151px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1266px}.modal-body .dashboard-small-chart{width:861px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:849px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:851px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:406.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:851px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:856px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:840px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2428px}}div.centralRow{margin-bottom:40px;margin-top:40px}div.centralContent{background-color:transparent;height:100%;margin-left:-5px;margin-right:-5px;min-height:80px;padding:5px;width:100%}.contentDiv{padding:13px 0 0}.contentDiv li{background-color:rgba(0,0,0,.05)}.contentDiv a.add{display:block;font-weight:400;padding:40px 0;text-align:left}.modal-body th .valueCell,.modal-body th th.actionCell,.modal-body th th.keyCell,.waitModal{text-align:center}.contentDiv .icon{padding-left:5px;padding-right:5px;padding-top:10px}.contentDiv:after{clear:both}.contentDiv:after,.contentDiv:before{display:table;line-height:0}.clusterInfoIcon{float:left;padding-left:5px;padding-top:2px}.waitModal.icon{font-size:100px;height:120px}.waitModal.message{font-size:20px}.icon_arangodb_info{color:#333;font-size:23px}li a [class*=" icon_arangodb"],li a [class^=icon_arangodb]{font-size:18px;position:absolute;right:4px;top:2px}.fa-minus-circle{color:#da4f49;font-size:14pt}.fa-minus-circle:hover{cursor:pointer}div.headerDropdown{background-color:#fff;border-radius:3px;clear:both;display:none;padding:10px;position:relative;width:auto}div.headerDropdown.smallDropdown .dropdownInner{min-height:20px}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox{display:none}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.dropdown-title{margin-bottom:10px}div.dropdownInner{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;min-height:125px;position:relative;width:auto}div.dropdownInner .nav-header{font-size:10pt}div.dropdownInner>.nav-header{color:#000;font-size:10pt;font-weight:400}div.dropdownInner>label{color:#000;font-weight:300}div.dropdownInner ul{border-left:1px solid rgba(140,138,137,.25);display:inline;list-style-type:none;margin-left:10px;margin-top:10px;min-height:105px;width:175px}div.dropdownInner ul:first-of-type,div.queryline input[type=file]{border:0}div.dropdownInner ul label{color:#000;padding-left:20px}div.dropdownInner ul li .fa{color:#999;margin-right:5px}div.dropdownInner ul li .fa.fa-square-o{margin-left:1px;margin-right:6px}div.dropdownInner ul li .fa.fa-check-circle-o,div.dropdownInner ul li .fa.fa-check-square-o,div.dropdownInner ul li .fa.fa-dot-circle-o{color:#8aa051}div.queryline{color:#000;height:35px}div.queryline .textDiv{margin-right:10px;margin-top:4px}div.queryline input,div.queryline select{margin-bottom:5px}div.queryline input{width:16%}div.queryline.querylineAdd span{color:#fff;padding-left:10px;position:relative;top:-21px}div.queryline .removeFilterItem i{margin-left:5px!important;margin-top:0!important}div.queryline div.searchByAttribute{margin-left:6px;margin-right:6px;position:relative}div.queryline div.searchByAttribute input{width:140px}div.queryline div.searchByAttribute>ul.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:#fff;color:#fff;display:none;left:0;position:absolute;top:20px;width:247px}div.dropdownImport{background-color:#fff;border-radius:3px;display:none;position:relative;padding:10px 10px 5px}div.dropdownImport input{line-height:0;margin-bottom:-15px;margin-top:5px}select.filterSelect{color:#00f;margin-left:10px;margin-right:10px;width:80px}#filterHeader button{float:right;margin-left:10px!important;margin-top:1px}div.input-append button.gv_example_toggle{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;background-color:#8f8d8c;height:30px;margin-left:-1px;padding-left:10px;padding-right:10px;padding-top:12px;vertical-align:top}div.input-append button.gv_example_toggle:hover{background-color:#8aa051}div.headerBar,div.headerBar .infoField{background-color:#fff;padding-left:5px;padding-right:5px}.searchEqualsLabel{margin-left:6px;margin-right:6px}img.gv-throbber{background-image:url(../img/swagger/throbber.gif)}span.gv_caret{border-top:5px solid #fff;margin-top:2px!important}input.search-input{height:14px;line-height:18px;margin-right:-1px;margin-top:6px;width:120px}.search-field{margin-left:10px}.search-field .fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:absolute;right:9px;top:9px}.search-field .fa-search:hover{cursor:pointer;opacity:1}.gv-search-submit-icon,.search-submit-icon{background-image:url(../img/enter_icon.png);background-size:14px;height:14px;margin-left:-18px;opacity:.2;position:absolute;width:14px}.gv-search-submit-icon:hover,.search-submit-icon:hover{opacity:.8}.search-submit-icon{margin-top:11px}.gv-search-submit-icon{margin-top:6px}div.headerBar{border-radius:3px;color:#fff;font-size:16px;height:36px;margin-bottom:5px;margin-top:15px;position:relative}div.headerBar .infoField{border:1px solid rgba(140,138,137,.25);border-radius:3px!important;color:#000;float:right;font-size:12px;margin-right:7px;margin-top:7px}div.headerBar .infoField .fa{cursor:pointer;margin-left:5px}div.headerBar input[type=checkbox].css-checkbox{display:none}div.headerBar input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;cursor:pointer;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerBar input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.headerBar input[type=radio]{display:none}div.headerBar input[type=radio] label span{background:url(../img/check_radio_sheet.png) -38px top no-repeat;cursor:pointer;display:inline-block;height:19px;margin:-1px 4px 0 0;vertical-align:middle;width:19px}#transparentHeader input[type=checkbox].css-checkbox,.contentTables tr.contentRowActive span,.modal-delete-confirmation,.query-div,.query-output .ace_cursor-layer,.query-output .ace_replace_form{display:none}div.headerBar input[type=radio]:checked+label span{background:url(../img/check_radio_sheet.png) -57px top no-repeat}.headerButtonList a.error{color:#da4f49}.headerButtonList a.error:hover{background-color:#da4f49;border-color:#da4f49;color:#fff}.headerBar a.arangoHeader{color:#000;font-size:11.5pt;font-weight:100;left:0;position:relative;top:7px}.headerBar>div.headerButtonBar{margin:4px 0;margin-bottom:0!important}.breadcrumb{background:0 0;border:0;border-radius:0;padding:7px 0}.breadcrumb .disabledBread{color:#666;float:left;font-size:11.5pt;font-weight:100;padding-right:5px;position:relative}.breadcrumb .disabledBread i{font-size:10pt;margin-left:10px}.breadcrumb .activeBread{color:#8aa051;float:left;font-size:11.5pt;font-weight:100}.breadcrumb #app-development-path{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);border-left:1px solid rgba(140,138,137,.25);border-radius:3px;border-right:1px solid rgba(140,138,137,.25);height:24px;margin-left:-6px;margin-top:-10px;padding-left:5px;width:100%}.arangoHeader{font-weight:400}.checkboxLabel{margin-top:4px;padding-left:0}.css-label{background-image:url(../img/dark-check-green.png)}.css-label-round{background-image:url(../img/dark-check-green-round.png)}.modal-dashboard-header,.modal-header{background-color:#fff;border-bottom:0!important;border-radius:3px;margin-top:5px;padding-left:5px;padding-right:10px;padding-top:4px}.modal-dashboard-header .arangoHeader,.modal-header .arangoHeader{color:#000;font-size:13pt;font-weight:100;left:5px;position:relative;top:2px}.modal-dashboard-header a,.modal-header a{top:2px!important}.modal-dashboard-header .close,.modal-header .close{color:#fff;font-weight:300;margin-top:2px;opacity:.5}.modal-dashboard-header .close:hover,.modal-header .close:hover{opacity:1}.modal-tabbar{border-bottom:1px solid #666}.modal-body{color:#736b68;font-size:14px;font-weight:300;max-height:410px}.modal-body .select2-choices{background-image:none!important;border:1px solid #999;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.modal-body .select2-choices input:active{-webkit-box-shadow:none;box-shadow:none;outline:0!important}.modal-body .select2-choices .select2-search-choice{margin:5px 0 3px 5px!important}.modal-body .select2-choices li{background-color:#fff!important;background-image:none!important;color:#000}.modal-body tr.first,.modal-body tr.last,.modal-body tr.middle{background-color:#f5f8f0}.modal-body .select2-choices li a{margin-left:1px;margin-top:-1px}.modal-body .select2-choices:active{border:1px solid #999;-webkit-box-shadow:none!important;box-shadow:none!important;outline:transparent!important}.modal-body .nav-tabs{margin-top:15px}.modal-body .nav-tabs>li>a:hover{border-color:#8c8a89}.modal-body input,.modal-body select,.modal-body textarea{margin-top:10px}.modal-body input[type=checkbox]{margin-bottom:10px}.modal-body input[type=text].invalid-input{border-color:rgba(234,23,23,.6)}.modal-body input[type=text].invalid-input:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6)}.modal-body input[type=file]{line-height:17px}.modal-body tr.spacer{height:10px}.modal-body tr.first th:first-child{border-top-left-radius:3px}.modal-body tr.first th:last-child{border-top-right-radius:3px}.modal-body tr.middle{padding-left:10px;padding-right:10px}.modal-body tr.last th:first-child{border-bottom-left-radius:3px}.modal-body tr.last th:last-child{border-bottom-right-radius:3px}.modal-body tr.first th:first-child,.modal-body tr.last th:first-child,.modal-body tr.middle th:first-child{padding-left:10px}.modal-body tr.first th:last-child,.modal-body tr.last th:last-child,.modal-body tr.middle th:last-child{padding-right:10px}.modal-body th.actionCell{width:30px}.modal-body th.keyCell{width:170px}.modal-body th.keyCell input{width:150px}.modal-body th .valueCell{width:300px}.modal-body th .valueCell input{width:290px}.modal-body th .select2-container{margin-bottom:10px;margin-top:10px}.modal-body .icon-info-sign{margin-bottom:10px;margin-left:10px;opacity:.7;padding-bottom:5px}.modal-body .icon-info-sign:hover{opacity:1}.modal-body .icon_arangodb_info{color:#736b68;font-size:18px;margin-top:-10px;position:absolute;right:12px}.modal-body .icon_arangodb_info:hover{color:#000}.modal-body .collapse{margin-right:-14px;position:relative}.modal-body .accordion-inner{border-top:0;margin-left:0;padding-left:0;padding-right:0}.modal-body .accordion-toggle span .caret{border-top-color:#000;float:right;margin-top:5px}.modal-body .accordion-toggle.collapsed span .caret{-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.modal-body input{width:436px}.modal-body select{width:450px}.modal-body .collectionTh{height:50px}.modal-body .tab-content{min-height:200px}.modal-body .tab-content .tab-pane{border-top:1px solid #666!important;margin-left:0!important;padding-top:10px}.modal-body .tab-content .tab-pane-modal{border-top:none!important}.modal-body .tab-content #appstore{max-height:290px}.modal-body .errorMessage{color:#da4f49;font-size:9pt;font-weight:400;margin-bottom:5px;margin-top:-9px;position:absolute}.modal-body .nav .tab-icon{margin-right:5px;margin-top:-3px;width:20px}.modal-text{font-weight:300;padding-bottom:3px;padding-top:3px}.modal-backdrop,.modal-backdrop.fade.in{opacity:.4}.fade{opacity:0;-moz-transition:opacity 30ms linear;-ms-transition:opacity 30ms linear;-o-transition:opacity 30ms linear;-webkit-transition:opacity 30ms linear;transition:opacity 30ms linear}.modal{border:0!important;border-radius:3px!important;box-shadow:0;margin-left:-325px!important;width:650px}.modal .fade.in{top:12.1%!important}.modal table tr:last-child{border-bottom:0!important}.waitModal{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;border:0;color:#fff}.waitModalBackdrop{opacity:.7!important}.modalTooltips span{color:#736b68;font-size:20px}.fixedDropdown .dropdown-header a,.fixedDropdown .notificationItem,.modalTooltips span:hover{color:#000}.gv-object-view{text-align:left;white-space:pre}.capitalize{text-transform:capitalize}.modal-footer{border-top:0!important;padding-right:17px}.modal-footer .button-close{margin-left:20px;margin-right:10px}.modal-header{margin-left:5px;margin-right:5px}.modal-dashboard-header{margin-left:0;margin-right:0;padding-bottom:9px}.modal table tr,.thBorderBottom{border-bottom:1px solid #f7f3f2!important}.modal-delete-confirmation button{margin-right:10px;margin-top:-4px}.modal-delete-confirmation button .modal-confirm-delete{margin-right:-18px}.modal-delete-confirmation fieldset input{float:left}.modal-delete-confirmation fieldset label{float:left;margin-left:10px}.createModalDialog table{width:100%}.createModalDialog .collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.createModalDialog .figures1,.createModalDialog .figures2{margin-bottom:20px;width:300px}.createModalDialog .figures2{margin-left:20px!important}.createModalDialog .figures3{margin-bottom:0;width:100%}.foxx-store-row .foxx-name{font-weight:700}.foxx-store-row .foxx-author{font-size:10pt;font-weight:300;margin-top:-4px}.foxx-store-row .foxx-version{font-weight:400}#new-app-mount{margin-right:24px;width:360px}#control_event_edge_delete_modal,#control_event_edge_edit_modal,#control_event_new_node_modal,#control_event_node_delete_modal,#control_event_node_edit_modal{margin-left:-320px;width:640px}.navlogo .stat_cpu,.navlogo .stat_ram{width:26px;height:26px}.navlogo .stat_cpu{margin-top:1px}.navlogo .stat_cpu path{fill:#aa0}.navlogo .stat_ram path{fill:#070}.navlogo .stat_req{height:22px;width:22px}.navlogo .stat_req path{fill:#aa0}#notification_menu .innerDropdownInnerUL{margin-left:0}#noty_bottom_layout_container li{border:0!important}.noty_bar .arango_message{font-weight:500!important}.noty_bar .arango_message div{float:right;width:20px}.fixedDropdown{background:#fff!important;border-color:rgba(140,138,137,.25)!important;border-radius:3px!important;margin:10px -3px 0!important;right:-1px!important;width:210px}.fixedDropdown .dropdown-header,.fixedDropdown .dropdown-item,.innerDropdownInnerUL{border-bottom:1px solid rgba(0,0,0,.2)}.fixedDropdown:after{visibility:hidden}.fixedDropdown .dropdown-header{margin-left:-1px;padding:0!important}.fixedDropdown a{padding-left:5px!important}.fixedDropdown .notificationItemContent{font-size:.9em;font-weight:300;margin-left:15px;max-width:180px;min-height:15px;white-space:normal;width:180px;word-wrap:break-word}.fixedDropdown button{margin-right:5px;margin-top:5px}.fixedDropdown .notificationItem .notificationItemTitle{color:#000;font-weight:400;max-width:165px;overflow-wrap:break-word;white-space:normal;word-wrap:break-word}.fixedDropdown .notificationItem .notificationItemTitle:hover{background-color:transparent;cursor:default}.fixedDropdown .notificationItem i{color:rgba(0,0,0,.2);font-size:20px;padding-left:5px;position:relative;right:2px}.fixedDropdown .notificationItem i:hover{color:#000}.innerDropdownInnerUL{height:220px!important;min-height:220px;overflow-x:hidden;overflow-y:auto;width:100%}.innerDropdownInnerUL .dropdown-item:hover{background-color:#e1e1e1!important}.innerDropdownInnerUL li{width:auto!important}#stat_hd{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);height:25px;margin-top:3px;position:relative;right:3px;text-align:center;width:25px}.contentButtons,.contentTables{width:100%;margin-bottom:10px}#stat_hd #stat_hd_counter{color:#c2c2c2;line-height:25px;text-align:center}.fullNotification{background-color:#da4f49!important;border:1px solid #da4f49!important}.fullNotification p{color:#fff!important}.contentTables tr.contentRowActive a,.contentTables tr.contentRowInactive a{color:#000!important}.contentButtons{clear:both}.contentButtons #createDatabase,.contentButtons #createUser{margin-left:0}.contentTables thead{text-align:left}.contentTables thead tr{background-color:#fff;border-bottom:1px solid #c2c2c2}.contentTables tbody tr:nth-child(odd){background-color:#d9d9d9}.contentTables tbody tr:nth-child(even){background-color:#fff}.contentTables tr.contentRowActive{background-color:#bdcc92!important;font-weight:400}.contentTables .dbThFirst{width:90%}.contentTables .dbThSecond{width:10%}.contentTables td{padding:12px 18px}.contentTables td span{float:right;font-size:22px}.contentTables .collectionThSec{margin-right:0;width:80%}.contentTables .collectionTh{margin-right:0;width:5%}.arangoToolbar .pull-right button:first-child,.arangoToolbar .pull-right select:first-child,.arangoToolbar i.fa,.arangoToolbarBottom #executeQuery{margin-right:5px}.user-menu-img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);height:25px;margin-top:-4px}.ui-tooltip{background-color:#8aa051!important;border:0!important;border-radius:3px!important;box-shadow:none!important;color:#fff!important;font-size:10pt!important;font-weight:100!important;z-index:99999999}.dataNotReadyYet,.dygraph-label.dygraph-title{font-family:'Open Sans',sans-serif}.tooltip-inner{max-width:300px!important;white-space:normal!important;word-wrap:break-word!important}.index-tooltip{color:#736b68}.index-tooltip:hover{color:#000}.index-tooltip .arangoicon{font-size:18px!important}.tooltipInfoTh{width:10%}.arangoToolbar span.action:hover{background-color:#8aa051;border-radius:3px;color:#fff;cursor:pointer}.arangoToolbar{background-color:#fff;border:1px solid rgba(140,138,137,.25);height:40px;width:100%}.arangoToolbarTop,.dashboard-bar-chart-container,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-medium-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-tendency-container{border-top-left-radius:3px;border-top-right-radius:3px}.arangoToolbarBottom,.dashboard-sub-bar{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.arangoToolbar .pull-left,.arangoToolbar .pull-right{height:30px;margin-top:5px}.arangoToolbar .pull-left i.positive,.arangoToolbar .pull-right i.positive{color:#8aa051}.arangoToolbar .pull-left i.warning,.arangoToolbar .pull-right i.warning{color:#faa732}.arangoToolbar .pull-left button{margin-left:5px}.arangoToolbar span{padding:5px 8px;position:relative;top:5px;font-weight:100;margin-left:10px}.arangoToolbar i{font-size:11pt;font-style:normal}.arangoToolbar .toolbarType{background:#5bc0de;border-radius:3px;color:#fff;margin-left:5px}.arangoToolbar .styled-select{width:auto}.arangoToolbarBottom{clear:both}.arangoToolbarBottom .button-close:last-child{margin-right:10px}.dbselection{float:left;margin-right:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-bar-chart-container:first-child,.dashboard-full-width-chart .dashboard-full-width-chart-inner:first-child,.dashboard-large-chart .dashboard-large-chart-inner:first-child,.dashboard-medium-chart:first-child,.dashboard-small-chart .dashboard-small-chart-inner:first-child,.dashboard-tendency-container:first-child{margin-left:0}.dashboard-bar-chart-container,.dashboard-full-width-chart,.dashboard-large-chart,.dashboard-medium-chart,.dashboard-small-chart,.dashboard-tendency-container{margin-bottom:10px;position:relative}.dashboard-sub-bar-menu{cursor:pointer;position:absolute;right:9px;top:6px}.dataNotReadyYet{color:#faa732;font-size:14px;font-weight:100;text-align:center}.dashboard-sub-bar{background-color:#686766;color:#fff;height:24px;line-height:24px;margin:0;padding:0 6px}.dashboard-full-width-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-subtitle-bar.top{border-bottom:1px solid #e1e1e1;height:48px;line-height:48px;text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{border-left:1px solid #e1e1e1}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner{margin-left:10px;margin-right:10px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table{margin-bottom:10px;margin-top:10px;table-layout:fixed;width:100%}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-medium-chart .dashboard-interior-chart{margin-bottom:0}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table .no-data{font-style:italic;font-weight:100}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table tr{border-bottom:1px solid rgba(0,0,0,.025)}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:first-child{width:100px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:last-child{text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart:first-child{border-left:0}.dashboard-full-width-chart .state{background-color:#fff;border-radius:5px;color:#000;margin-left:5px;padding-left:6px;padding-right:4px}.dashboard-large-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-large-chart .dashboard-large-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-small-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-small-chart .dashboard-small-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:5px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart-outer:first-child{margin-right:10px}.dashboard-medium-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;margin-bottom:0;padding-top:10px}.dashboard-medium-chart:first-child{margin-right:12px}.dashboard-medium-chart .dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart .dashboard-medium-chart-menu{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:0 solid rgba(0,0,0,.3);color:rgba(0,0,0,.3);cursor:pointer;padding:0 4px;position:absolute;z-index:1000}.dashboard-medium-chart .dashboard-medium-chart-menu:hover{color:rgba(0,0,0,.7)}.dashboard-medium-chart .dashboard-medium-chart-inner{padding-bottom:10px}.dashboard-medium-chart .clusterChart .slice path{fill-opacity:.15;stroke-opacity:1;stroke-width:1.5px}.dashboard-tendency-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-tendency-container .dashboard-tendency-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{background-color:#fff;margin-top:5px;padding:0 8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency:first-child{border-right:1px solid #e1e1e1}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar{border-bottom:1px solid #e1e1e1;text-align:right}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure{text-align:center}.dashboard-bar-chart-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-bar-chart-container .dashboard-bar-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{margin-top:5px;padding:0 8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{font-weight:400}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{text-align:right}#dashboardDetailedChart .dygraph-axis-label-y,.dashboardDetailChart .dygraph-axis-label-y,.innerDashboardChart .dygraph-axis-label-y{text-align:left}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-legend .dashboard-legend-inner{padding:0 5px 5px 0}.dashboard-spacer{margin:0 12px}.headerBar.dashboard-headerbar{margin:20px 0}.modal-chart-detail .modal-dashboard-legend .dashboard-legend-inner{padding-left:20px}.dashboard-half-height-legend .dashboard-legend-inner{padding-top:20px}.dashboard-title-bar{background-color:#686766;color:#fff;font-size:14.5px;font-weight:400;height:30px;line-height:30px;padding:0 5px 0 10px}.dashboard-title-bar .dashboard-half-title-bar{border-left:1px solid #000;margin-left:-1px;width:50%}.dashboard-title-bar .dashboard-half-title-bar:first-child{border-left:0;margin-left:0}.dashboard-row{margin-bottom:0;margin-left:0;margin-right:0}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{color:#666}.dashboardModal{-moz-border-radius:8px!important;-webkit-border-radius:8px!important;border-radius:8px!important;height:80%;margin-left:-45%;min-width:780px;overflow:auto;padding:10px;top:10%;width:90%!important}#dashboardHttpGroup{border:6px solid #000;height:100%;width:100%}#dashboardDetailedChart{border:1px solid #000;height:300px;width:100%}.innerDashboardChart{bottom:5px;left:5px;position:absolute;right:5px;top:5px}.dashboardChart{background-color:#fff;border:1px solid rgba(0,0,0,.2);float:left;height:210px;margin:1.05%;position:relative;width:31%}.dygraph-label.dygraph-title{color:#000;font-size:15px;font-weight:400;text-align:left}#dashboardDetailedLineChart{padding-top:10px}.dashboardDistribution{float:left;width:270px}.dashboardDistribution svg{height:220px;width:250px}.showHotkeyHelp{cursor:pointer}.shortcuts{font-size:14px;font-weight:200}.shortcuts b{border-left:1px solid rgba(0,0,0,.34);margin-left:5px;padding-left:5px}.shortcuts .clearShortcut,.shortcuts b:first-child{border-left:0;margin-left:0;padding-left:0}.loginFixedWindow{background:#f5f8f0;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.loginFixedWindow .resizecontainer{position:relative;top:0}.loginFixedWindow .resizecontainer img{height:33px;margin-left:-6px;margin-top:9px}.login-window{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;height:auto;left:50%;margin-left:-220px!important;margin-top:-150px;padding:10px;position:absolute;top:50%;width:400px}.login-window .fa{color:rgba(0,0,0,.4);float:right;font-size:14pt;margin-right:5px;margin-top:-34px}.login-window .wrong-credentials{color:#da4f49;margin-top:-30px;text-align:center}.login-window .login-space{height:50px}.login-window .login-input{width:387px}.login-window .form-error{border:1px solid #da4f49!important}toolbar{background-color:#f0f0f0;border-bottom:0;border-style:solid;border-width:1px;font-size:20px;height:27px;margin-left:0;margin-right:0}toolbar span:hover{background-color:#da4f49;color:#fff}.queryBottomActions{border-top:1px solid rgba(140,138,137,.25);padding:10px}.queryExecutionTime{margin-left:10px;margin-top:15px}#queryManagementContent{margin-top:18px}.queryManagementBottomActions{background-color:#fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #c2c2c2;height:40px;margin-top:-2px;padding-top:10px}.queryMethods,.vars-editor-header{border-top:1px solid rgba(140,138,137,.25)}.queryManagementBottomActions button{margin-right:10px}#arangoQueryManagementTable .table-cell1,#queryManagementContent .table-cell1{word-break:break-all}.queryMethods{padding:10px 10px 5px}.queryMethods input{line-height:0;margin-top:5px}.queryMethods button a{color:#fff}.vars-editor-header{margin-top:-5px;padding-left:5px}.vars-editor-header i{border-radius:2px;color:#666;height:15px;margin-left:5px;padding-left:3px;padding-top:1px;width:15px}.vars-editor-header i:hover{background-color:#8aa051;color:#fff;cursor:pointer}.aql-editor,.vars-editor{border-color:#a0a0a0;border-left:0!important;border-top:1px solid rgba(140,138,137,.25)!important;height:200px;margin-bottom:5px;min-height:100px;min-width:99.8%;width:auto}.aql-editor .ace_error,.aql-editor .ace_info,.vars-editor .ace_error,.vars-editor .ace_info{background:0 0}.queryTH{width:20%!important}.queryTH2{width:75%!important}.query-output{background-color:#fff;border:0;border-top-width:0;height:200px;margin-left:0;margin-right:0;min-height:100px;overflow-y:hidden;width:auto}.query-output .ace_error,.query-output .ace_info{background:0 0}.ace_print-margin{visibility:hidden!important}#documentsTableID_filter,#documentsTableID_length,#documentsTableID_paginate,#documentsTableID_wrapper .fg-toolbar,.jsoneditor .outer .tree>table>tbody>tr:first-of-type{visibility:hidden}.styled-select{float:right;height:30px;overflow:hidden;width:220px}.styled-select select{background:#fff;border:1px solid #c2c2c2!important;border-radius:3px!important;font-size:14px;font-weight:300;height:30px;line-height:1;outline:0;padding:5px;padding-left:5px!important;padding-top:3px!important}.querySizeDiv,.querySizeDiv select{height:30px!important}.query-select,.query-size{line-height:20px!important;z-index:9999!important}.styled-select select:focus{outline:0}.querySizeDiv{margin-right:10px;width:130px!important}.wide-button-div{height:36px;margin-bottom:15px;margin-top:-10px;padding-top:5px;width:100%}.shortcut-div{float:left;margin-top:-5px;padding-left:45px;width:auto}.query-dropdown-left{margin-top:10px;width:100%}.query-dropdown-right{width:100%}.query-dropdown-right textarea{padding:5px 0 0;resize:vertical;width:100%}.query-dropdown-right textarea:focus{border-color:#8aa051;box-shadow:0 0 3px #8aa051;outline:0}.query-modal-select{padding-left:0;width:100%}.output-toolbar{border-color:silver;border-top:0;position:relative;width:auto}.output-toolbar span{float:right;margin-left:5px;margin-right:5px;position:relative;top:2px}.query-select{border:0!important;border-radius:0!important;margin-bottom:0}.query-select option{z-index:9999!important}.query-dropdown{background-color:#d9d9d9;margin-left:0;margin-right:0;padding-left:5px;padding-right:5px}.query-dropdown-in{background-color:#fff;padding:10px}.query-dropdown-in a{color:#686766;font-size:16px;font-weight:bolder;margin-bottom:5px;width:100%}.query-dropdown-in #save-edit-query{margin-left:7px!important}.query-dropdown-in #delete-edit-query{margin-left:0!important}.query-size{border-radius:0!important;width:130px!important}.query-div .arango-table,.query-div .arango-table tbody,.query-div .arango-table tr{max-width:100%;width:100%}#queryContent{margin-top:18px}#queryContent .arango-tab{margin-bottom:5px}#queryContent .arango-tab a{border-bottom-color:#ddd;font-weight:100}#queryContent .arango-tab .active{border-bottom-color:#fff!important}.query-div{min-height:360px}.query-div .ace-tm .ace_comment{color:#8aa051}.query-div .icon_arangodb{cursor:pointer;margin-bottom:5px}.query-div .arango-table{border-top:1px solid rgba(140,138,137,.25);table-layout:fixed}.query-div .arango-table .table-cell0{cursor:pointer;min-width:250px;overflow:hidden;text-overflow:ellipsis!important;white-space:nowrap!important;width:20%}.query-div .arango-table .table-cell1,.query-div .arango-table .table-cell2{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.query-div .arango-table .table-cell1{cursor:pointer;width:73%}.query-div .arango-table .table-cell2{max-width:40px;min-width:40px;width:40px}.queryImport{margin-bottom:10px}.explain-tree,.tab-content{width:100%}.explain-tree .node text{font-size:14px}.explain-tree .link{fill:none;stroke:#ccc;stroke-width:1.5px}.editor-toolbar{border-color:#a0a0a0;height:33px;padding-right:5px}.editor-toolbar span{border-radius:3px;float:right;height:18px;padding:3px 0 6px 10px;position:relative;top:0;width:22px}.editor-toolbar .vars-editor-header i,.editor-toolbar span:hover{background-color:#8aa051;color:#fff}.editor-toolbar a:hover,.editor-toolbar span:hover{cursor:pointer}.editor-toolbar a:hover i,.editor-toolbar span:hover i{color:#fff}.editor-toolbar i:hover{color:#fff;cursor:pointer}.editor-toolbar .fa{color:#666;font-size:15px}.editor-toolbar .fa-comment,.editor-toolbar .fa-comment-o{position:relative;top:-1px}.inputEditorWrapper{border-bottom:3px solid rgba(140,138,137,.25)!important;border-left:1px solid rgba(140,138,137,.25);border-right:1px solid rgba(140,138,137,.25);clear:both;height:300px;min-height:300px;width:100%}.inputEditorWrapper .aqlEditorWrapper{border:0!important;border-right:3px solid rgba(140,138,137,.25)!important;float:left;height:100%!important;max-width:85%;min-width:20%;width:70%}.inputEditorWrapper #arangoMyQueriesTable tr{cursor:copy}.inputEditorWrapper .aqlEditorWrapper,.inputEditorWrapper .bindParamEditorWrapper{overflow:hidden}.inputEditorWrapper .aqlEditorWrapper .stringtype,.inputEditorWrapper .bindParamEditorWrapper .stringtype{color:#ce2f30}.inputEditorWrapper .aqlEditorWrapper .arraytype,.inputEditorWrapper .aqlEditorWrapper .objecttype,.inputEditorWrapper .bindParamEditorWrapper .arraytype,.inputEditorWrapper .bindParamEditorWrapper .objecttype{color:#00f}.inputEditorWrapper .aqlEditorWrapper .numbertype,.inputEditorWrapper .bindParamEditorWrapper .numbertype{color:#044}.inputEditorWrapper .aqlEditorWrapper .booleantype,.inputEditorWrapper .bindParamEditorWrapper .booleantype{color:#c12dad}.inputEditorWrapper .aqlEditorWrapper table,.inputEditorWrapper .bindParamEditorWrapper table{border-top:0;font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace}.inputEditorWrapper .aqlEditorWrapper table tbody,.inputEditorWrapper .bindParamEditorWrapper table tbody{display:block;overflow-y:auto}.inputEditorWrapper .aqlEditorWrapper table .truncate,.inputEditorWrapper .bindParamEditorWrapper table .truncate{opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:30%}.inputEditorWrapper .aqlEditorWrapper table tr.noBgColor,.inputEditorWrapper .bindParamEditorWrapper table tr.noBgColor{background-color:transparent!important}.inputEditorWrapper .aqlEditorWrapper table tr.selected,.inputEditorWrapper .bindParamEditorWrapper table tr.selected{background-color:#8aa051;color:#fff}.inputEditorWrapper .aqlEditorWrapper table tr.selected .spanWrapper,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .spanWrapper{background-color:rgba(255,255,255,.65)}.inputEditorWrapper .aqlEditorWrapper table tr.selected .fa-comments,.inputEditorWrapper .aqlEditorWrapper table tr.selected .fa-copy,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .fa-comments,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .fa-copy{color:#000}.inputEditorWrapper .aqlEditorWrapper table thead,.inputEditorWrapper .bindParamEditorWrapper table thead{display:block}.arangoFrame,.display-none{display:none}.inputEditorWrapper .aqlEditorWrapper table td,.inputEditorWrapper .bindParamEditorWrapper table td{height:33px;padding:0 5px;width:50%}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper{border-radius:3px;cursor:auto;float:right}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper:hover,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper:hover{cursor:auto}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa{cursor:pointer;font-size:18pt;margin-left:5px;margin-right:5px}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa-minus-circle,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa-minus-circle{margin-left:20px}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa-play-circle-o,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa-play-circle-o{color:#8aa051}.inputEditorWrapper .aqlEditorWrapper table td input,.inputEditorWrapper .bindParamEditorWrapper table td input{clear:both;float:right;font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace!important;height:17px;margin-bottom:3px;margin-top:3px;width:auto!important}.inputEditorWrapper .aqlEditorWrapper table th,.inputEditorWrapper .bindParamEditorWrapper table th{font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace;height:34px;padding:0;width:50%}.inputEditorWrapper .aqlEditorWrapper,.inputEditorWrapper .bindParamEditorWrapper{height:100%}.inputEditorWrapper .aqlEditorWrapper .selectError,.inputEditorWrapper .bindParamEditorWrapper .selectError{background:#da4f49}.inputEditorWrapper .aqlEditorWrapper .aceAction,.inputEditorWrapper .bindParamEditorWrapper .aceAction{background-color:#858585;border-radius:3px;color:#fff;cursor:pointer;font-size:13pt;height:23px;line-height:22px;opacity:.8;position:absolute;right:5px;text-align:center;top:5px;width:33px;z-index:10}.inputEditorWrapper .aqlEditorWrapper .aceAction.type,.inputEditorWrapper .bindParamEditorWrapper .aceAction.type{font-size:8pt}.inputEditorWrapper .aqlEditorWrapper .aceAction i,.inputEditorWrapper .bindParamEditorWrapper .aceAction i{margin-bottom:3px}.inputEditorWrapper .aqlEditorWrapper .aceAction:hover,.inputEditorWrapper .bindParamEditorWrapper .aceAction:hover{cursor:pointer;opacity:1}.inputEditorWrapper .aqlEditorWrapper .previewWrapper,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper{background-color:#fff}.inputEditorWrapper .aqlEditorWrapper .previewWrapper .previewBar,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper .previewBar{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace;height:34px}.collectionInfoTh2,.collectionTh,.figuresHeader th{font-family:'Open Sans',sans-serif!important}.inputEditorWrapper .aqlEditorWrapper .previewWrapper .previewBar span,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper .previewBar span{margin-left:5px;padding-top:8px;position:absolute}.inputEditorWrapper .aqlEditorWrapper .previewWrapper #queryPreview,.inputEditorWrapper .aqlEditorWrapper>div,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper #queryPreview,.inputEditorWrapper .bindParamEditorWrapper>div{height:100%}.inputEditorWrapper .ui-resizable-s{cursor:ns-resize}.inputEditorWrapper .ui-resizable-e{cursor:ew-resize}.queryContent{clear:both;margin-top:0;width:100%}.outputEditors{margin-bottom:60px}.outputEditorWrapper{clear:both;height:100px;padding-top:20px;width:100%}.outputEditorWrapper .switchAce{background-color:rgba(0,0,0,.6);border-radius:3px;color:#fff;cursor:pointer;position:relative;right:-24px;top:45px;z-index:10}.outputEditorWrapper .ace_editor{border-left:1px solid rgba(140,138,137,.25);border-right:1px solid rgba(140,138,137,.25);height:280px;width:100%}.outputEditorWrapper .ace_editor .ace_active-line{background:#fff!important}.outputEditorWrapper .sentWrapper .pull-left,.outputEditorWrapper .sentWrapper .pull-right{width:50%}.row{margin:0 0 20px}.innerContent{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;min-height:200px;padding-top:13px}.arangoFrame{background-color:rgba(0,0,0,.5);bottom:0;left:0;position:fixed;right:0;top:0;z-index:77777}.arangoFrame .outerDiv{min-height:100%;padding:40px;z-index:88888}.arangoFrame .innerDiv{z-index:99999}.arangoFrame .fa-times{color:#fff;float:right;font-size:12pt}.arangoFrame .fa-times:hover{color:#c2c2c2;cursor:pointer}.container{margin-left:20px;margin-right:20px;width:auto!important}.arango-tab{border-bottom:1px solid #ddd;margin-left:0;padding-bottom:0;padding-right:10px}.arango-tab a{-moz-border-radius:0;-webkit-border-radius:0;border-radius:3px 3px 0 0;background-color:#8c8a89;border:1px solid transparent;border-bottom-color:#888;color:#fff;display:block;font-size:13px;line-height:20px;margin-right:2px;min-width:50px;padding:2px 15px;text-align:center}.arango-tab li{background-color:transparent;border:0;margin-bottom:-1px;margin-left:2px;position:relative;z-index:900}.arango-tab li.active a{background:#fff;border-bottom-color:#fff!important;border-left-color:#c2c2c2;border-right-color:#c2c2c2;border-top-color:#c2c2c2;color:#000;height:21px;margin-top:-1px}.jsoneditor,.jsoneditor .menu{background-color:#fff!important}.jsoneditor{border:0 solid rgba(0,0,0,.2)!important}.jsoneditor .menu{border-bottom:1px solid #c2c2c2!important;border-left:0!important;border-right:0!important;border-top:0!important}.jsoneditor .menu button{border:0!important}.jsoneditor .menu button:hover{background-color:#8aa051;color:#fff}.jsoneditor .search .frame{border:0!important;margin:3px!important}.jsoneditor .search .frame input{border:1px solid #c2c2c2!important;border-radius:3px;margin-left:5px;margin-right:5px;margin-top:-2px}.jsoneditor .search .results{color:#fff!important;margin-top:3px!important}.document-editor-extra,div.gv-manage-button-container{margin-top:10px}.document-editor{height:500px;margin-bottom:5px;margin-top:-10px;width:100%}.disabledPag,.disabledPag a{cursor:default!important;opacity:.5!important}.pagination-line{background-color:#fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid rgba(104,103,102,.1);margin:0;padding-top:12px;text-align:center}.pagination-line li a:hover,.pagination-line li.active a,.pagination-line li.active span{background-color:#8f8d8c;color:#fff}.pagination-line li a{background-color:#fff;border:1px solid #fff;font-size:11.9px;line-height:20px;padding:2px 10px;text-decoration:none;border-width:0;min-width:12pt}.pagination-line ul{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;display:inline-block;margin-bottom:0;margin-left:0}.pagination-line li{display:inline-block;margin-left:11px}.pagination-line li span{color:#000;font-size:14px;position:relative;top:2px}.pagination-line li:first-child a,.pagination-line li:first-child span,.pagination-line li:last-child a,.pagination-line li:last-child span{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;background:#8f8d8c;border:0;color:#000;height:21px;position:relative;width:14px}.pagination-line li.disabled:first-child a,.pagination-line li.disabled:first-child span,.pagination-line li.disabled:last-child a,.pagination-line li.disabled:last-child span{background-color:#777;color:#666;cursor:default;pointer-events:none}.collection-pagination{margin-left:23px!important}.arango-pagination i.fa,.las-pagi i.fa,.pre-pagi i.fa{font-size:19px;position:relative;top:-2px}.arango-pagination li:first-child{margin-right:20px}.arango-pagination li:last-child{margin-left:30px}.pre-pagi{margin-right:-5px!important}.accordion-group{border:0}.accordion-body{height:auto!important}.accordion-heading a{border:1px solid #ccc;color:#000;font-weight:400;width:397px!important}.shell_workspace{margin-top:13px}.shell_workspace ::-webkit-scrollbar{display:none}.replShell{background-color:#fff;float:left;height:100%;min-width:100px;overflow-y:hidden;position:relative;width:100%}.replShell>div{border-radius:3px}.replShell pre{border-bottom:0;border-left:0;border-right:1px solid #a0a0a0;border-top:1px solid #a0a0a0}.jqconsole{background-color:#000;border-radius:0;padding:10px}.jqconsole-header{color:#fff}.jserror{color:#f06;margin-left:-10px}.jssuccess{color:#6f0}.jqconsole-cursor{background-color:grey}.jqconsole-blurred .jqconsole-header .jqconsole-cursor{color:#c4cccc}.jqconsole-prompt{color:#b91}.jqconsole-old-prompt{color:#f60;font-weight:400}.jqconsole-input{color:#dd0}.jqconsole-old-input{color:#bb0;font-weight:400}.jqconsole-output{color:#fff}.query-output .ace_gutter-cell{background-color:#f0f0f0}.centralContent .api-actions{margin:0!important;padding:0}.centralContent .api-actions .container{padding-bottom:10px!important;padding-top:13px!important;margin:0 5px!important}.centralContent .api-actions .resource{border-bottom:0!important;padding-left:5px!important}.centralContent .api-actions .resource .heading>.options{margin:11px 10px 0 0!important}.centralContent .api-actions .resource .heading h2 a{color:#000!important;font-weight:300!important}.centralContent .api-actions .active .heading h2 a{color:#000!important}.centralContent .api-actions .endpoint .operations .content{margin:0!important}.centralContent .api-actions .endpoint .operations .content h4{font-weight:700!important}.centralContent .api-actions .endpoints{margin-right:5px!important}.centralContent .api-actions .endpoints .endpoint:last-child{padding-bottom:5px!important}.centralContent .api-actions input[type=button]{background:#8f8d8c!important;border:none!important;box-shadow:none!important;color:#fff!important;float:right!important;font-size:14px!important;font-weight:300!important;margin-top:10px!important;padding:8px 16px!important}.centralContent .api-actions .endpoint .operations .content,.centralContent .api-actions .endpoint .operations .heading{border-radius:0!important;font-weight:300!important}.centralContent .api-actions .required,.centralContent .api-actions em,.centralContent .api-actions strong,.collectionInfoTh2,.collectionTh,.figuresHeader th{font-weight:400!important}.centralContent .api-actions .http_method,.centralContent .api-actions .toggleOperation{border-radius:0!important}.form-actions{background:0 0;border:0}.form-actions:after,.form-actions:before{display:table;line-height:0}.form-actions:after{clear:both}.swagger-section #swagger-ui-container{margin:.3em 1em!important}.alert{padding:15px 35px 15px 14px}.alert,textarea{border-radius:0!important}.log-content{word-break:break-all;word-wrap:break-word}.log-content-id{margin-top:20px;padding-bottom:0!important}.log-content-id .dataTable{border-collapse:separate;border-spacing:0 5px;table-layout:fixed!important}.log-content-id .arango-tab{border-bottom:0!important}.log-content-id .tab-content{margin-top:1px!important}.tab-content{min-height:390px}.crit-table-id,.debug-table-id,.info-table-id,.log-table-id,.warn-table-id{border-spacing:0 0;font-size:15px!important;margin-top:-5px!important}.crit-table-id thead,.debug-table-id thead,.info-table-id thead,.log-table-id thead,.warn-table-id thead{background-color:#f9f9f9;border-top:6px solid #888!important;text-align:center}.crit-table-id thead tr th,.debug-table-id thead tr th,.info-table-id thead tr th,.log-table-id thead tr th,.warn-table-id thead tr th{background-color:#fff!important;border-bottom:1px solid #c2c2c2;border-top:2px solid #888}.crit-table-id .firstcol,.debug-table-id .firstcol,.info-table-id .firstcol,.log-table-id .firstcol,.warn-table-id .firstcol{cursor:default!important;max-width:80px!important;width:80px!important}.crit-table-id tbody .firstcol,.debug-table-id tbody .firstcol,.info-table-id tbody .firstcol,.log-table-id tbody .firstcol,.warn-table-id tbody .firstcol{background-color:transparent!important}.crit-table-id tbody tr td,.debug-table-id tbody tr td,.info-table-id tbody tr td,.log-table-id tbody tr td,.warn-table-id tbody tr td{padding-bottom:8px!important;padding-top:8px!important}div.gv-colour-list li,div.gv_colour_list li{float:none;padding:2px 6px}.thirdcol{cursor:default!important;max-width:500px!important}.dataTables_empty,.seccol{cursor:default!important;margin-bottom:5px;width:100px!important}.dataTables_info{display:none}#arangoLogTable tbody td:nth-child(1),#arangoLogTable tbody td:nth-child(2){text-align:center;width:80px}#arangoLogTable tbody td:nth-child(3){width:auto}div.gv_zoom_widget{height:300px;left:64px;opacity:.7;position:absolute;top:20px;width:40px;z-index:1}div.gv_zoom_widget div.gv_zoom_buttons_bg{background-image:url(../img/gv_button_bg_reverse.png);background-size:contain;height:40px;margin-bottom:20px}div.gv_zoom_widget div.gv_zoom_slider{background:#f5f8f0;border-radius:3px;height:200px;margin:0 17px;width:4px}div.gv_zoom_widget a.ui-slider-handle{background-color:#555;border:1px solid rgba(140,138,137,.25);height:.5em;left:-.55em;outline:0}div.gv_zoom_widget a.ui-slider-handle.ui-state-hover{outline-color:#fff}.documents-size,.spotlightWrapper .typeahead:focus{outline:transparent 0}div.gv_zoom_widget a.ui-slider-handle:hover{cursor:pointer}div.gv_zoom_widget .ui-state-default{background:#f6f6f6}#menubar{margin:0 0 10px}div.gv_colour_list{max-height:680px;overflow:auto;position:absolute;right:26px;text-align:right;top:20px;z-index:1}div.gv_colour_list li{background-color:transparent}svg.graph-viewer{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;left:54px;position:absolute;top:10px;z-index:0}div.gv-colour-list ul ul,div.gv-colour-list ul ul:first-child,div.gv-colour-list ul ul:last-child{border-left:1px solid rgba(104,103,102,.1);border-right:1px solid rgba(104,103,102,.1)}svg.graph-viewer text{max-width:90px;pointer-events:none}div.gv-background{position:relative}.link>line{stroke-width:1}div.gv-colour-list:hover{opacity:1}div.gv-colour-list{border-radius:3px;max-height:350px;max-width:300px;min-width:190px;opacity:.1;overflow-x:hidden!important;overflow-y:auto;position:absolute;right:8px;text-align:right;top:20px;z-index:1}.arangoDataTable .key,div.gv-colour-list li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.gv-colour-list ul ul:first-child{border-top:1px solid rgba(104,103,102,.1);border-top-left-radius:3px;border-top-right-radius:3px}div.gv-colour-list ul ul:last-child{border-bottom:1px solid rgba(104,103,102,.1);border-bottom-left-radius:3px;border-bottom-right-radius:3px}legend.gv-inner{font-size:16px}input.gv-radio-button{display:block;margin-top:3px;width:auto}.addCollection .accordion,.collectionTh select,.collectionTh textarea{margin-top:10px}.collectionTh{font-size:14px;text-align:left;width:20%!important}.collectionInfoTh{min-width:60px;text-align:left;width:320px}.addCollection table tr{border-bottom:0!important;height:53px}.addCollection .icon_arangodb_info{margin-left:20px!important;position:relative;top:2px!important}.addCollection .collectionThSec{width:320px!important}.addCollection .collectionTh{width:96px}.addCollection .modalInput{width:320px}.addCollection .modalSelect{width:334px}.addCollection .accordion-toggle{width:457px!important}.change-collection .tab-content{min-height:230px}.change-collection input{width:384px!important}.change-collection select{width:398px!important}.show-collection .tab-content{min-height:200px}.collectionInfoTh2{text-align:left;width:150px}.collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.figuresHeader{border-bottom:1px solid #c2c2c2}.document-info .document-bold-font,.document-info .document-thin-font{font-family:droid sans mono,monospace,courier new,courier,sans-serif;font-size:11pt}#collectionIndexTable{margin-left:0;width:100%}#collectionTab,#graphTab,#infoTab{border-bottom:0;margin-bottom:1px;padding-bottom:0;padding-right:10px}#collectionTab li,#graphTab li,#infoTab li{float:right}#collectionTab li.disabled a,#graphTab li.disabled a,#infoTab li.disabled a{cursor:not-allowed}#collectionTab a,#graphTab a,#infoTab a{background-color:#8c8a89;border-bottom:1px solid #666;border-top-left-radius:3px!important;border-top-right-radius:3px!important;color:#fff;font-size:13px!important;height:21px;margin-bottom:-1px;margin-right:4px;padding:2px 15px!important}#collectionTab .active>a,#graphTab .active>a,#infoTab .active>a{background-color:#fff;border-color:#888 #888 transparent!important;color:#000}#confirmCreateEdge{margin-left:20px}.collection-info-figures .icon_arangodb_info{position:relative!important;right:-4px!important}.snippet-wrap .snippet-num li{list-style:decimal-leading-zero}.snippet-no-num{list-style-type:none;padding-left:0}.snippet-no-num .prettify{font-size:1.2em}.snippet-no-num .sh_number{color:#044;font-weight:100;margin-left:5px}.snippet-no-num .sh_symbol{color:#00f;font-weight:100;margin-left:5px}.snippet-no-num .sh_cbracket{color:#c7a317;font-weight:100;margin-left:5px}.snippet-no-num .sh_keyword{color:#c12dad;font-weight:100;margin-left:5px}.snippet-no-num .sh_string{color:#ce2f30;font-weight:100;margin-left:5px}.snippet-no-num .sh_array,.snippet-no-num .sh_object{color:#00f;font-weight:100;margin-left:5px}@media (max-width:738px){.arango-collection-ul{display:none}.collection-dropdown ul{width:auto!important}.arango-collection-select{display:inline-block}}@media (min-width:739px) and (max-width:1041px){.arango-collection-ul a{font-size:11px;padding:7px 5px 10px}}@media (min-width:1042px) and (max-width:1284px){.arango-collection-ul a{font-size:13px}}#documentsDiv{padding-top:1px}.document-info-div{margin-top:20px;min-height:0}.document-content-div{margin-top:10px}.document-info{background-color:#fff;border-radius:3px;margin-bottom:8px;margin-top:-13px;min-height:65px;padding:5px}.document-info .document-info-container{clear:both;width:100%}.document-info .document-info-container .document-inner-info-container{float:left;margin-left:10px;margin-top:5px}.document-info .document-info-container .document-inner-info-container .document-attribute{margin-right:20px}.document-info .document-info-container .document-inner-info-container .document-attribute div{float:left}.document-info .document-bold-font{min-width:55px}.document-info .document-thin-font{color:#8aa051}.document-info .document-type-container div{float:left}.document-info .document-type-container #document-id{margin-left:10px}.document-link:hover{cursor:pointer;text-decoration:underline}.jsoneditor .tree div{font-size:11pt}#progressPlaceholder{background-color:rgba(0,0,0,.4);bottom:0;left:0;position:fixed;right:0;top:0;z-index:9999}.progress-view{background-color:#363c39;border-radius:2px;color:#fff;height:188px;left:50%;margin:-150px 0 0 -125px;position:absolute;top:38%;width:250px}.progress-view .progress-content{border:5px solid #fff;border-radius:3px}.progress-view .progress-content .fa-spinner{font-size:100pt}.progress-view .progress-message{background-color:#fff;border-radius:0 0 2px 2px;color:#fff;font-weight:200;height:44px;margin-top:-25px;padding-top:3px;text-align:center}.progress-view .progress-text{background:#fff;color:#000;float:left;font-weight:100;height:25px;left:-5px;margin-left:5px;margin-top:10px;position:relative;top:-10px;width:100%}.progress-view .progress-action{float:right;margin-right:5px;margin-top:5px}#progressPlaceholderIcon{color:#8aa051;float:left;font-size:22px;margin-left:10px;margin-top:7px}.pong-spinner{height:100px;margin:50px auto;position:relative;width:200px}.pong-spinner i{animation:ball 2s infinite linear;background:#8cdb8b;border-radius:10px;height:10px;position:absolute;width:10px}.pong-spinner:after,.pong-spinner:before{animation:left-player 2s infinite linear;background:#8cdb8b;height:30px;position:absolute;width:5px}.pong-spinner:after{animation:right-player 2s infinite linear;right:0}@keyframes left-player{0%,100%{top:0}50%{top:70px}}@keyframes right-player{0%,100%{top:70px}50%{top:0}}@keyframes ball{0%,100%{left:5px;top:20px}25%,75%{left:190px;top:50px}50%{left:5px;top:80px}}#spotlightPlaceholder{background-color:rgba(0,0,0,.25);bottom:0;left:0;position:fixed;right:0;top:0;z-index:2000}.spotlightWrapper{height:50px;left:25%;position:absolute;top:115px;width:50%}.spotlightWrapper .twitter-typeahead{width:100%}.spotlightWrapper .tt-highlight{color:#5bc0de;font-weight:400}.spotlightWrapper input{box-sizing:border-box;height:40px!important}.spotlightWrapper .tt-dataset{clear:both}.spotlightWrapper .tt-menu{background:#3d4246;border-radius:3px;color:#fff;width:100%}.spotlightWrapper .tt-menu .header-type{background:#32373b;clear:both;color:#fff;height:30px;padding-left:5px}.spotlightWrapper .tt-menu .header-type h4{float:left;margin:4px 0 0;padding:0}.spotlightWrapper .tt-menu .header-type .fa{font-size:12pt;margin-left:6px;margin-top:6px}.spotlightWrapper .tt-menu .header-type .type{background-color:#5bc0de;border-radius:3px;float:right;margin:4px;padding:0 5px}.spotlightWrapper .tt-menu .tt-cursor{background-color:#fff;color:#000}.spotlightWrapper .tt-menu .tt-selectable{padding-left:10px}.spotlightWrapper .typeahead{background:#3d4246;border:0 solid #3d4246;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;font-size:22px;height:30px;line-height:30px;outline:transparent 0;padding:8px 12px;width:100%}.application-detail-view section.info{float:left;padding:13px 0 0}.application-detail-view section.info .header{height:200px;margin-bottom:0;position:relative}.application-detail-view section.info .header div.header-icon-container{border-radius:3px;height:182px;left:0;margin:0 0 4px;position:absolute;width:182px}.application-detail-view section.info .header div.header-icon-container img.icon{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;height:auto;max-height:160px;max-width:160px;padding:10px;width:auto}.application-detail-view section.info .header .header_right{padding-top:1px;position:absolute;right:-10px;width:150px}.application-detail-view section.info .header .header_right input.delete,.application-detail-view section.info .header .header_right input.switch-docu,.application-detail-view section.info .header .header_right input.switch-mode,.application-detail-view section.info .header .header_right input.upgrade{margin-top:7.83px;padding-left:10px;padding-right:10px}.application-detail-view section.info .header .header_right input{width:130px}.application-detail-view section.info .header .header_left{margin-left:190px;margin-right:145px;padding-left:10px;padding-top:1px}.application-detail-view section.info .header .header_left input{margin-left:0;margin-top:-4px}.application-detail-view section.info .header .header_left .header_line h3{float:left;margin-bottom:0;margin-top:0;padding-right:5px}.application-detail-view section.info .header .header_left .header_line .license,.application-detail-view section.info .header .header_left .header_line .version{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);color:#a0a0a0;font-size:.6em;font-weight:400;padding:0 8px 2px;position:relative;top:-3px}.application-detail-view section.info .header .header_left .header_line:after{clear:both;content:'';display:table}.application-detail-view section.info .header .app-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#da4f49;color:#fff;padding:6px 8px}.application-detail-view section.info .header .app-warning h4,.application-detail-view section.info .header .app-warning p{font-size:1em;margin:0}.application-detail-view aside.meta{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;clear:right;float:left;height:182px;margin-top:12px;max-height:182px;max-width:182px;overflow-x:hidden;position:relative;right:-16px;width:182px}.application-detail-view aside.meta dl{margin-bottom:0;margin-top:0;padding-left:7px;padding-top:5px}main{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;margin-top:220px}main .app-info{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#5bc0de;color:#fff;margin:10px;padding:6px 8px}main .app-info h4,main .app-info p{font-size:1em;margin:0}main .swagger iframe{border:0;border-radius:3px;height:600px;width:100%}main .readme{background:#fff;padding:1em 2em}.tests-result .stack{border-color:#da4f49;color:#da4f49;font-size:12px;line-height:1.5;margin:5px 0}.tests-result-stats .fail,.tests-result-stats .pass,.tests-result-stats .pending{padding:0 2px}.tests-result-spec{margin-bottom:0}.tests-result-spec-suites .tests-result-spec-suites{margin-left:20px}.tests-result-spec-suites dd{margin-bottom:20px;margin-left:0}.tests-result-spec-tests{margin-left:20px}.tests-result-spec-test-title{padding-left:20px}.tests-result-spec-test-title .fa{line-height:18px;margin-left:-20px;margin-top:2px;position:absolute}.tests-result-spec-test-title .fa-circle{font-size:50%;margin-left:-16px}.tests-result .pass{color:#8aa051}.tests-result .fail{color:#da4f49}.tests-result .pending{color:#666}.hotkeysList .hotkeysLabel{clear:both;color:#000;font-size:16px;font-weight:400}.hotkeysList .hotkeysContent{padding-left:10px}.hotkeysList li{line-height:25px}.hotkeysList li .hotkeysDiv{float:left}.hotkeysList .hotkeysicons{background-color:#686766;border:1px solid #000;border-radius:2px;color:#fff;display:inline;height:19px;margin-left:10px;text-align:center;width:19px}.arango-table tbody tr:nth-child(even),.arango-table thead{background-color:#fff}.hotkeysContentLabel{float:left;width:30%}.arango-table{border-top:1px solid #c2c2c2;width:100%}.arango-table thead th{border-bottom:1px solid #c2c2c2;height:43px}.arango-table tbody tr:nth-child(odd){background:rgba(104,103,102,.05)}.arango-table tbody td{padding:10px 18px}.arango-tabbar{height:27px;width:100%}.arango-tabbar button{background-color:#8c8a89;border:0;border-top-left-radius:3px;border-top-right-radius:3px;color:#fff;float:right;font-weight:100;height:27px;margin-right:5px;width:82px}.arango-tabbar button:first-child{margin-right:10px}.arango-tabbar .arango-active-tab{background-color:#fff;border-bottom:1px solid #fff;border-left:1px solid #c2c2c2;border-right:1px solid #c2c2c2;border-top:1px solid #c2c2c2;color:#000;height:28px;margin-bottom:-1px}.arangoDataTable{border-spacing:0 0;position:relative;table-layout:fixed!important;width:100%!important}.arangoDataTable thead{background-color:#fff!important;font-weight:400!important;text-align:left}.arangoDataTable thead th{border-bottom:0;cursor:default!important;font-weight:400!important;padding:10px 14px!important}.arangoDataTable thead tr{border-bottom:1px solid #c2c2c2}.arangoDataTable tr{cursor:pointer}.arangoDataTable td{padding:8px 18px!important}.arangoDataTable .key{font-weight:100;margin-top:4px}.arangoDataTable .dataTable .noPointer tr{cursor:default}.arangoDataTable .selected-row{background-color:#8aa051!important}.arangoDataTable .selected-row div,.arangoDataTable .selected-row li,.arangoDataTable .selected-row span{color:#fff!important}.api-container #resources>li.resource:nth-child(even),table.arangoDataTable tr.even{background-color:#fff}.api-container #resources>li.resource:nth-child(odd),table.arangoDataTable tr.odd{background-color:rgba(104,103,102,.05)}#tableDiv table.dataTable td{padding:12px 18px!important}#documentsTableID_filter,#documentsTableID_length{display:none}#documentsTableID_wrapper{min-height:467px!important;padding-bottom:0!important}.snippet-no-num{font-family:'Open Sans',sans-serif;font-size:1em;font-weight:400;margin-bottom:0}.cuttedContent,.prettify ul li,.writeable a{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.totalDocuments{color:#666;float:left;font-weight:100;margin-top:-37px!important;padding-left:10px}.prettify{border:none!important;font-size:1em!important;margin:0!important;padding:0!important}.edit-index-table tfoot,.newIndexClass table{border-top:1px solid #f7f3f2}table .sorting{background:0 0!important}#documentsDiv{margin-top:20px}.new-index-view input[type=checkbox]{float:left}.new-index-view table tr{width:600px!important}.new-index-view table tr th:last-child{width:50px!important}.new-index-view table th{font-weight:300!important;width:200px!important}.edit-index-table{margin-top:5px;min-width:auto!important}.edit-index-table th{padding-bottom:5px;padding-left:5px;padding-top:5px}.edit-index-table .icon_arangodb_locked{color:rgba(0,0,0,.5);cursor:default;font-size:20px;margin-left:10px}.index-button-bar i:hover,.queryline .fa-info-circle:hover{cursor:pointer}.edit-index-table .icon_arangodb_roundminus{font-size:20px;margin-left:10px}.edit-index-table tfoot i{color:#8aa051;font-size:19px;margin-left:16px;margin-top:5px}.edit-index-table tfoot i:hover{color:#788f3d;cursor:pointer}.contentIn .arangoicon{font-size:25px;position:relative;top:-3px!important}#collectionEditIndexTable thead{border-bottom:1px solid #e5e5e5}.newIndexClass table{margin-bottom:60px}.newIndexClass table select{margin-right:7px}.newIndexClass table .arangoicon{float:right;margin-right:-12px;margin-top:5px}.index-button-bar{float:right}.index-button-bar i{color:#8aa051;font-size:16pt;margin-right:43px}.index-button-bar #cancelIndex{margin-right:13px}.docsFirstCol,.docsSecCol,.docsThirdCol{border:0!important}.docsFirstCol{height:26px;width:80%}.docsSecCol{height:26px;min-width:400px!important;width:10%}.docsThirdCol{height:26px}.add-filter-item{margin-left:5px}.add-filter-item i{margin-top:0!important}.upload-indicator{display:none;margin-top:-3px;padding-right:10px}.documentsDropdown .dropdownImport,.documentsDropdown .headerDropdown{clear:both;margin-bottom:5px}.documents-size{background-color:#fff!important;border:1px solid #e5e5e5;border-radius:2px;box-shadow:none;float:right;height:28px;line-height:18px;margin-left:10px;margin-right:-2px;margin-top:0;width:115px}.ace_error{background:0 0!important}#exportHeader .fa-exclamation-circle{color:#fff;font-size:13pt;margin-right:10px}.totalDocuments:hover{color:#000}.ajax-file-upload-statusbar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid rgba(0,0,0,.7);margin:10px 10px 5px 5px;padding:5px;width:420px}.ajax-file-upload-filename{color:grey;height:auto;margin:0 5px 5px 10px;width:100%}.ajax-file-upload-progress{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #d9d9d9;display:inline-block;margin:0 10px 5px;padding:1px;position:relative;width:250px}.ajax-file-upload-bar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;background-color:rgba(0,0,0,.7);color:#fff;height:20px;width:0}.ajax-file-upload-percent{display:inline-block;left:48%;position:absolute;top:3px}.ajax-file-upload-red{font-size:13px;font-weight:400;margin-right:5px;padding:4px 15px;vertical-align:top}.ajax-file-upload{display:inline-block;font-size:16px;font-weight:700;height:25px;margin:0 10px 10px 0;padding:6px 10px 4px}.ajax-upload-dragdrop{border:1px dotted #8f8d8c;color:#736b68;padding:10px 10px 0;text-align:left;vertical-align:middle;width:506px}.ajax-upload-dragdrop span{position:relative;top:-22px}/*! + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome/fontawesome-webfont.eot?v=4.4.0);src:url(../fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.4.0) format("embedded-opentype"),url(../fonts/fontawesome/fontawesome-webfont.woff2?v=4.4.0) format("woff2"),url(../fonts/fontawesome/fontawesome-webfont.woff?v=4.4.0) format("woff"),url(../fonts/fontawesome/fontawesome-webfont.ttf?v=4.4.0) format("truetype"),url(../fonts/fontawesome/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.modal-body,.ui-tooltip,button{font-family:'Open Sans',sans-serif!important}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.contentDiv li,.dashboard-bar-chart-container,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut,.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage,.dashboard-full-width-chart,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart,.dashboard-half-height-legend,.dashboard-large-chart,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-legend,.dashboard-medium-chart,.dashboard-medium-chart .dashboard-interior-chart,.dashboard-small-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart,.dashboard-sub-bar,.dashboard-sub-bar .dashboard-sub-bar-title,.dashboard-tendency-container,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar,.dashboard-title-bar .dashboard-half-title-bar,.dashboardModal,.dropdown-toolbar,.fixedDropdown .notificationItemContent,.gv-dropdown-menu,.innerDropdownInnerUL,.link-dropdown-menu,.modal-chart-detail,.modal-chart-detail .modal-body,.modal-chart-detail .modal-dashboard-legend,.modal-chart-detail .modal-inner-detail,.navlist li,.navlogo,.pagination-line li a,.pull-left,.script-dropdown-menu,.user-dropdown-menu,a.button-gui,a.headerButton,div .bigtile,div .bigtile a span.add-Icon,div .tile,div .tile a span.add-Icon,div.centralContent,div.dropdownInner ul,div.footer-center,div.footer-left,div.footer-left p{float:left}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.arango-tab li,.dashboard-sub-bar-menu,.docsThirdCol,.fixedDropdown .notificationItem i,.fixedDropdown button,.headerBar>div.headerButtonBar,.navmenu,.query-button,.search-field,div .bigtile .iconSet span,div .tile .iconSet span,div.footer-right,div.footer-right p,div.gv_colour_list,ul.headerButtonList li{float:right}#distributionChartDiv:after,.arango-tab:after,.dashboard-bar-chart-container .dashboard-bar-chart:after,.dashboard-medium-chart .dashboard-medium-chart-inner:after,.dashboard-medium-chart .dashboard-medium-chart-menu:after,.dashboard-row:after,.dashboard-sub-bar:after,.dashboard-tendency-container .dashboard-tendency-chart:after,.detail-chart:after,.document-info .document-info-container .document-inner-info-container .document-attribute:after,.headerBar>div.headerButtonBar:after,.lineChartDiv:after,.pagination-line li:after,.resizecontainer:after,.tileList:after{clear:both;content:'.';display:block;font-size:0;height:0;visibility:hidden}.caret,.contentDiv:after,.contentDiv:before,.form-actions:after,.form-actions:before,.pong-spinner:after,.pong-spinner:before{content:''}.addButton,.arango-tab a,.arango-tab li,.arangoicon,.clusterDownBtn button,.contentDiv .icon,.contentTables tr.contentRowInactive a,.deleteButton i,.edit-index-table .icon_arangodb_roundminus,.fixedDropdown .notificationItem i,.fullNotification:hover,.gv-search-submit-icon,.icon-info-sign,.link>line,.node,.pagination-line li a,.script-dropdown-menu .dropdown-item,.search-submit-icon,a.button-gui,a.headerButton,div .bigtile,div .bigtile .iconSet span,div .bigtile a span.icon,div .bigtile a svg,div .tile .iconSet span,div .tile a span.icon,div .tile a svg,div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label,div.toolbox div.gv_action_button{cursor:pointer}.navbar,footer.footer{background-color:rgba(245,248,240,.95);color:#fff;left:0;position:fixed;right:0;width:100%;z-index:1000}.ajax-file-upload-red,.button-danger{background-color:#da4f49}.ajax-file-upload-red:focus,.ajax-file-upload-red:hover,.button-danger:focus,.button-danger:hover{background-color:#be342e}.contentTables td span,.deleteButton i,.edit-index-table .icon_arangodb_roundminus{color:#da4f49}.contentTables td span:focus,.contentTables td span:hover,.deleteButton i:focus,.deleteButton i:hover,.edit-index-table .icon_arangodb_roundminus:focus,.edit-index-table .icon_arangodb_roundminus:hover{color:#be342e}.ajax-file-upload,.button-success{background-color:#8aa051}.ajax-file-upload:focus,.ajax-file-upload:hover,.button-success:focus,.button-success:hover{background-color:#788f3d}.addButton,.contentTables td.dbThSecond span{color:#8aa051}.addButton:focus,.addButton:hover,.contentTables td.dbThSecond span:focus,.contentTables td.dbThSecond span:hover{color:#788f3d}.button-warning{background-color:#faa732}.button-warning:focus,.button-warning:hover{background-color:#f89406}.button-close,.button-neutral{background-color:#8f8d8c}.button-close:focus,.button-close:hover,.button-neutral:focus,.button-neutral:hover{background-color:#736b68}.dashboard-sub-bar-menu{color:#8f8d8c}.dashboard-sub-bar-menu:focus,.dashboard-sub-bar-menu:hover{color:#736b68}.button-primary{background-color:#564e4a}.button-primary:focus,.button-primary:hover{background-color:#3a322e}.button-header,a.button-gui,a.headerButton{background-color:#fff;border:1px solid #fff;color:#555}.button-header:focus,.button-header:hover,a.button-gui:focus,a.button-gui:hover,a.headerButton:focus,a.headerButton:hover{background-color:#8aa051;border:1px solid #8aa051;color:#fff}.button-notification{background-color:#faa020}.button-notification:focus,.button-notification:hover{background-color:#f87c0f}.button-inactive,.button-inactive:focus,.button-inactive:hover,[class*=' button-']:disabled,[class*=' button-']:focus:disabled,[class*=' button-']:hover:disabled,[class^=button-]:disabled,[class^=button-]:focus:disabled,[class^=button-]:hover:disabled,button.disabled,button.disabled:focus,button.disabled:hover{background-color:#d3d3d3}a.headerButton.disabled,a.headerButton.disabled:focus,a.headerButton.disabled:hover{color:#d3d3d3}div.queryline .fa.fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:relative;right:21px;top:-1px}div.queryline .fa.fa-search:hover{cursor:pointer;opacity:1}.inputEditorWrapper .aqlEditorWrapper table td input,.inputEditorWrapper .bindParamEditorWrapper table td input,.login-window .login-input,.modal-body .select2-choices input,.modal-body input,.modal-body select,.modal-body textarea,.navbar .arango-collection-select,div.queryline input,div.queryline select,input.search-input{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff!important;border:1px solid rgba(140,138,137,.25);box-shadow:none;outline:transparent 0}.inputEditorWrapper .aqlEditorWrapper table td input:focus,.inputEditorWrapper .bindParamEditorWrapper table td input:focus,.login-window .login-input:focus,.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus,.navbar .arango-collection-select:focus,div.queryline input:focus,div.queryline select:focus,input.search-input:focus{border-color:#999;box-shadow:none;outline:transparent 0}.ajax-file-upload-red:focus,.ajax-file-upload:focus,.button-close:focus,.button-danger:focus,.button-inactive:focus,.button-neutral:focus,.button-notification:focus,.button-primary:focus,.button-success:focus,.button-warning:focus,div.headerBar select:focus{outline:0}.dropdown-toolbar,.gv-dropdown-menu,.link-dropdown-menu,.script-dropdown-menu,.user-dropdown-menu{background-color:#f5f8f0;border-color:#666;border-radius:3px;border-style:solid;border-width:1px;box-shadow:none;display:none;list-style:none;margin:5px 0 0;padding:5px 0;position:absolute;right:0;top:80%;z-index:1000}.script-dropdown-menu .dropdown-item a,.tab{display:block}.dropdown-toolbar li,.gv-dropdown-menu li,.link-dropdown-menu li,.script-dropdown-menu li,.user-dropdown-menu li{line-height:23px;white-space:nowrap;width:100%}.dropdown-toolbar .dropdown-header,.gv-dropdown-menu .dropdown-header,.link-dropdown-menu .dropdown-header,.script-dropdown-menu .dropdown-header,.user-dropdown-menu .dropdown-header{color:#999;font-size:15px;font-weight:600;font-variant:small-caps;padding:0}.dropdown-toolbar .dropdown-header:hover,.gv-dropdown-menu .dropdown-header:hover,.link-dropdown-menu .dropdown-header:hover,.script-dropdown-menu .dropdown-header:hover,.user-dropdown-menu .dropdown-header:hover{cursor:default}div .bigtile:hover,div .tile:hover,div.footer-center p:hover{cursor:pointer}.dropdown-toolbar .divider,.gv-dropdown-menu .divider,.link-dropdown-menu .divider,.script-dropdown-menu .divider,.user-dropdown-menu .divider{background-color:#666;height:1px;margin:10px 0 5px}.dropdown-toolbar a,.gv-dropdown-menu a,.link-dropdown-menu a,.script-dropdown-menu a,.user-dropdown-menu a{color:#fff;padding:0 20px}.navbar{-webkit-font-smoothing:subpixel-antialiased;height:44px;margin-bottom:3px;padding-top:6px;top:0}.navbar .no-left-margin{border:0;margin-left:0}.navbar .no-left-margin.hover{background-color:transparent}.navbar .arangodbLogo{height:auto;margin-left:-5px;margin-top:-1px;width:40%}.navbar .arango-collection-select{position:relative;right:-22px;top:4px}.navbar .nav .dropdown .active>.dropdown-toggle,.navbar .nav .dropdown .open.active>.dropdown-toggle,.navbar .nav .dropdown .open>.dropdown-toggle{background:#788f3d}.navbar .nav>.active>a{-webkit-box-shadow:0 0 0 transparent inset;-moz-box-shadow:0 0 0 transparent inset;box-shadow:0 0 0 transparent inset;background-color:#fff;color:#000}.navbar .nav>li>a:focus{background-color:#fff}.navbar .nav>li>a:hover{background-color:#000;color:#686766}.navlist .dropdown-item:hover a,.navlist>.active a,.navlist>.active:hover a,.navlist>li:hover a{color:#000}.navlogo{margin-left:5px;margin-right:-3px;padding-top:3px}.navlist>li{height:39px}.navlist li{border-left:1px solid transparent;border-right:1px solid transparent;border-top:1px solid transparent;margin-left:7px}.navlist li.dropdown:hover{background-color:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-left:1px solid rgba(0,0,0,.2);border-right:1px solid rgba(0,0,0,.2);border-top:1px solid rgba(0,0,0,.2)}.navlist li.dropdown:hover a{border-bottom:2px solid #fff}.navlist li.divider,.navlist li.navbar-spacer{border:0}.navlist li.divider{background-color:rgba(0,0,0,.2)}.navlist li.navbar-spacer{background-color:#a0a0a0;height:21px;margin-top:9px;width:1px}.navlist li.navbar-spacer.big{margin-left:15px;margin-right:15px}.navlist li.navbar-spacer.med{margin-left:5px;margin-right:5px}.navlist .dropdown-item,.script-dropdown-menu .dropdown-item{margin-left:0}.navlist li.navbar-spacer:hover{background-color:#a0a0a0}.navlist .active .tab{border-bottom:2px solid #8aa051;padding-bottom:4px}.navlist>.active{background-color:transparent}.navlist>.active:hover{background-color:#fff}.navlist .dropdown-item:hover,.navlist>li:hover{background-color:#fff;border-radius:3px}.navlist .dropdown-item a{border-bottom:0;display:block;font-size:11pt}.navlist .dropdown-item a:hover{background-color:#dee9cf;color:#686766}.tab{color:#686766;font-size:12pt;font-weight:100;padding:9px 5px 10px}.tab.userImg{padding-bottom:5px}.dropdown-item a{border-bottom:0!important;font-weight:300}.dropdown-toolbar li a,footer.footer p{font-weight:100}.dropdown-toolbar{background-color:#fff!important;border:1px solid rgba(140,138,137,.25)}.dropdown-toolbar li a:hover{background:0 0;background-color:#dee9cf!important;color:#000!important}.link-dropdown-menu,.user-dropdown-menu{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-top-right-radius:0;margin-right:-1px;margin-top:7px;z-index:-10}.link-dropdown-menu .dropdown-item,.user-dropdown-menu .dropdown-item{border-left:0;border-right:0}.script-dropdown-menu .dropdown-item a:hover{color:#fff}.script-dropdown-menu .dropdown-item:hover{background-color:#8aa051}.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:rgba(0,0,0,.7);border:1px solid #c2c2c2;margin-right:-20px;margin-top:6px}.gv-dropdown-menu:after{border-bottom-color:#fff}.gv-dropdown-menu li:hover{background-color:#fff;background-image:none}.gv-dropdown-menu li a{padding:0}.gv-dropdown-menu li a label{color:#fff;padding-left:5px}.gv-dropdown-menu li a:focus{background-color:#8aa051!important;background-image:none}#arangoCollectionSelect{display:none;float:right;margin-bottom:0;margin-right:15px;padding-bottom:0}.caret{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #686766;display:inline-block;height:0;vertical-align:top;width:0}.applications-menu{display:block}.arango-logo{height:34px;padding:0!important}.arango-logo img{margin-left:22px}.footer{bottom:0;font-size:14px;left:0;position:fixed;right:0;text-align:center;z-index:1000}footer.footer{bottom:0;height:40px}footer.footer p{font-size:10pt;margin-bottom:0;padding-bottom:10px;padding-top:10px}div.footer-left{background:none;color:#686766;width:45%}div.footer-left .social-icons{margin-top:5px}div.footer-left .social-icons a{display:block;float:left;height:25px;width:25px}div.footer-left .social-icons p{background:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;height:25px;margin-right:10px;padding:0;width:25px}div.footer-left .social-icons p:hover{background:#8aa051;cursor:pointer}div.footer-left .social-icons p:hover i{color:#fff}div.footer-left .social-icons i{color:#000;margin-top:6px;position:absolute}div.footer-left .social-icons i.fa-twitter{margin-left:-5px}div.footer-left .social-icons i.fa-envelope{margin-left:-19px}div.footer-left .social-icons i.fa-google{margin-left:-17px;margin-top:7px}div.footer-left .social-icons i.fa-stack-overflow{margin-left:-17px}div.footer-center{background:none;color:#686766;width:10%}div.footer-center i{background-color:#fff;border:1px solid rgba(104,103,102,.1);border-radius:20px;margin-left:1px;padding:6px 2px;width:20px}div.footer-center i:hover{background-color:#8aa051;color:#fff}div.footer-center p{padding-top:5px}[class*=' button-']:disabled,[class^=button-]:disabled,a.headerButton.disabled,button.disabled{cursor:not-allowed}div.footer-right{background:none;color:#686766;width:45%}div.footer-right p{color:#fff}div.footer-right i{color:#da4f49;font-size:18px}div.footer-right a{color:#686766;margin-left:5px;position:relative;top:-1px}div.footer-right .isOnline{color:#8aa051!important}.ajax-file-upload,.ajax-file-upload-red,.button-close,.button-danger,.button-header,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;font-size:14px;font-weight:300!important}.addButton,.deleteButton i{font-size:16pt;position:relative}.ajax-file-upload,.ajax-file-upload-red,.button-close,.button-danger,.button-inactive,.button-neutral,.button-notification,.button-primary,.button-success,.button-warning{border:0;color:#fff;margin-left:10px;padding:5px 16px}.ajax-file-upload i,.ajax-file-upload-red i,.button-close i,.button-danger i,.button-inactive i,.button-neutral i,.button-notification i,.button-primary i,.button-success i,.button-warning i{margin-left:-5px}.button-header{margin-top:5px}.addButton{margin-right:7px;margin-top:2px}.deleteButton i{padding-right:3px;top:3px}#closeBtnInfoView{margin-left:0!important}button.btn-server{width:120px}button.gv-zoom-btn{background-size:14px 14px;height:14px;vertical-align:baseline;width:14px}button.gv-zoom-btn.btn-zoom-right{border:0;box-shadow:none;right:0;top:13px}button.gv-zoom-btn.pan-right{background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-right:hover{background:inherit;background-image:url(../img/gv_arrow_right.png)}button.gv-zoom-btn.pan-left{background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-left:hover{background:inherit;background-image:url(../img/gv_arrow_left.png)}button.gv-zoom-btn.pan-top{background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-top:hover{background:inherit;background-image:url(../img/gv_arrow_top.png)}button.gv-zoom-btn.pan-bottom{background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.pan-bottom:hover{background:inherit;background-image:url(../img/gv_arrow_bottom.png)}button.gv-zoom-btn.btn-zoom{height:14px;margin:0;padding:0;position:absolute;width:16px}button.gv-zoom-btn.btn-zoom-top{border:0;box-shadow:none;left:13px;top:1}button.gv-zoom-btn.btn-zoom-left{border:0;box-shadow:none;left:0;top:13px}button.gv-zoom-btn.btn-zoom-bottom{border:0;box-shadow:none;left:13px;top:25px}button.gv-icon-btn{-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;background-size:36px 36px;height:36px;width:36px}button.gv-icon-btn.active{background-color:#8aa051}button.gv_dropdown_entry{height:30px;margin:4px 4px 4px 12px;width:160px}button.gv_context_button{width:65px}button.large-distance{margin-left:12px}button.short-distance{margin-left:6px}button.shutdown{margin-top:6px;padding:3px 14px}button.graphViewer-icon-button{background-color:transparent;border:0;height:20px;margin-left:5px;margin-top:-2px;padding:0;width:20px}button.graphViewer-icon-button img{height:20px;padding-bottom:10px;width:20px}ul.headerButtonList{display:inline-block;margin-bottom:0;margin-left:0;padding-left:0!important}ul.headerButtonList li{display:inline}a.button-gui,a.headerButton{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;margin-left:5px;margin-right:5px}a.headerButton{margin-top:2px;position:relative}a.headerButton .fa,a.headerButton [class*=" icon_"],a.headerButton [class^=icon_]{display:block;height:23px;line-height:23px;position:static;right:0;text-align:center;top:0;width:27px}a.headerButton .icon_arangodb_arrowleft,a.headerButton .icon_arangodb_arrowright{font-weight:700}a.headerButton.activated{background-color:#788f3d;border:1px solid #788f3d;color:#fff}div.toolbox,div.toolbox div.gv_action_button{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff}a.headerButton.activated:hover{background-color:#fff;color:#788f3d}div.toolbox{border-radius:3px;border:1px solid rgba(140,138,137,.25);margin-right:5px;margin-top:-3px;padding-bottom:5px;padding-top:5px;position:absolute}div.toolbox div.gv_action_button{border-radius:3px;color:#555;height:30px;margin:5px;position:relative;text-align:center;width:30px}div.toolbox div.gv_action_button.active{background-color:#8aa051;color:#fff}div.toolbox div.gv_action_button:first-child{margin-top:0}div.toolbox div.gv_action_button:last-child{margin-bottom:0}h6.gv_button_title,h6.gv_icon_icon{left:0;margin:0;position:absolute;right:0}h6.gv_icon_icon{font-size:22px;left:1px;top:4px}h6.gv_button_title{bottom:1px;display:none}.btn-icon{background-color:#383434;padding:4px}.gv-icon-small{background-size:16px 16px;height:16px!important;width:16px!important}.gv-icon-small.delete{background-image:url(../img/icon_delete.png)}.gv-icon-small.add{background-image:url(../img/plus_icon.png)}a.pagination-button,ul.arango-pagination a{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.badge,.btn,.label{text-shadow:none!important}.navbar-inner,.thumbnail{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0}.modal-body th.actionCell>button{margin-top:-12px}.btn-old-padding{padding-bottom:4px!important;padding-top:4px!important}button.btn-overview,button.btn-server{margin:5px}a.button-gui{height:auto;margin-bottom:0;margin-top:0;padding-bottom:1px;padding-top:1px;position:absolute;right:2px;text-decoration:none!important;top:2px;width:auto}a.button-gui.button-gui-disabled{display:none}.clusterDownBtn{padding-bottom:10px;padding-top:10px;text-align:center}.clusterDownBtn button{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#f1f1f1;border:1px solid rgba(0,0,0,.1875);color:#333;font-size:20px;font-weight:300;margin:0;padding:12px 18px;text-align:center;text-decoration:none!important;width:250px}.clusterDownBtn button:hover{background-color:#e8e8e8;color:#4a6c30;-webkit-transition-delay:0;-webkit-transition-duration:.2s;-webkit-transition-property:all;-webkit-transition-timing-function:ease-in}.clusterDownBtn button.green{background-color:#617e2b;color:#fff}.clusterDownBtn button.green:hover{background-color:#8ba142}.bottomButtonBar{background-color:#fff;border-top:1px solid rgba(104,103,102,.1);height:30px;padding:10px}.tileList{margin-left:-6px;margin-right:-6px}.tileList legend{padding-left:5px}.tileList .tile:first-child a{opacity:.8}.tileList .tile:first-child a:hover{opacity:1}div .bigtile,div .tile{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff;border:1px solid #f5f8f0;border-radius:3px;font-size:14px;margin-bottom:13px;margin-left:6px;margin-right:6px;position:relative;text-align:center;z-index:1}div .bigtile progress[value],div .tile progress[value]{color:#5bc0de}div .bigtile progress::-webkit-progress-bar-value,div .tile progress::-webkit-progress-bar-value{background:#5bc0de}div .bigtile progress::-webkit-progress-value,div .tile progress::-webkit-progress-value{background:#5bc0de}div .bigtile progress::-moz-progress-bar,div .tile progress::-moz-progress-bar{background:#5bc0de}div .bigtile progress,div .tile progress{-webkit-appearance:none;border-radius:0;height:2px;margin-top:16px;position:relative;width:100%;z-index:10}div .locked.bigtile,div .locked.tile{cursor:not-allowed}div .locked.bigtile .borderBox,div .locked.bigtile .collection-type-icon,div .locked.bigtile .collectionName,div .locked.bigtile .iconSet,div .locked.tile .borderBox,div .locked.tile .collection-type-icon,div .locked.tile .collectionName,div .locked.tile .iconSet{opacity:.5}div .locked.bigtile .iconSet span:hover,div .locked.tile .iconSet span:hover{background-color:#fff!important;color:#000;cursor:not-allowed!important}div .locked.bigtile .iconSet:hover,div .locked.tile .iconSet:hover{cursor:not-allowed!important}div .bigtile .collection-type-icon:hover,div .bigtile img:hover,div .tile .collection-type-icon:hover,div .tile img:hover{cursor:pointer}div .bigtile .warning-icons,div .tile .warning-icons{background-color:#da4f49;border-radius:3px;color:#fff;font-size:11px;height:17px;left:0;line-height:13px;margin-left:5px;margin-top:5px;padding-left:9px;padding-right:9px;position:absolute;top:0}div .bigtile a svg.icon,div .bigtile img.icon,div .tile a svg.icon,div .tile img.icon{height:50px;width:50px}div .bigtile .warning-icons .fa,div .tile .warning-icons .fa{font-size:11pt;margin-left:1px}div .bigtile .collection-type-icon,div .tile .collection-type-icon{color:#666;font-size:30pt;margin-top:12pt}div .bigtile img,div .tile img{position:relative}div .bigtile a span.add-Icon,div .tile a span.add-Icon{font-size:20px;margin-left:22px;margin-right:10px;position:relative;top:0}div .bigtile a span.icon,div .tile a span.icon{font-size:50px}div .bigtile .tile-icon-svg,div .tile .tile-icon-svg{cursor:pointer;fill:#686766;height:50px;margin-left:90px;margin-top:10px;position:absolute;width:50px}div .bigtile .tile-icon,div .tile .tile-icon{color:#686766;font-size:50px;line-height:1.2}div .bigtile .icon_arangodb_edge5-2,div .tile .icon_arangodb_edge5-2{display:inline-block;position:relative;top:15px;-moz-transform:rotate(80deg);-o-transform:rotate(80deg);-webkit-transform:rotate(80deg)}div .bigtile h5,div .tile h5{background:#8c8a89;color:#fff;font-size:12px;margin:0;overflow:hidden!important;padding:4px 8px;text-overflow:ellipsis!important;white-space:nowrap!important}div .bigtile h5.inProgress,div .tile h5.inProgress{color:#5bc0de}div .bigtile .tileSelects,div .tile .tileSelects{margin-left:40px;position:relative;z-index:9999}div .bigtile .tileSelects select,div .tile .tileSelects select{float:right;height:20px;margin-right:5px;margin-top:16px;width:70px}div .bigtile .fullBorderBox,div .tile .fullBorderBox{border:1px solid rgba(140,138,137,.25);border-radius:3px;height:100%;position:absolute;width:100%}div .bigtile .borderBox,div .tile .borderBox{border:1px solid rgba(140,138,137,.25);border-bottom:0;border-radius:3px;height:75px;position:absolute;width:224px}div .bigtile .iconSet,div .tile .iconSet{position:absolute;right:5px;top:5px}div .bigtile .iconSet span,div .tile .iconSet span{border-radius:3px;color:#666;font-size:18px;z-index:2;padding:2px 3px}.modal,.select2-drop-active{z-index:9999999}div .bigtile .iconSet span:hover,div .tile .iconSet span:hover{background-color:#8aa051;color:#fff}div .bigtile .iconSet span.disabled,div .tile .iconSet span.disabled{cursor:default;opacity:.2}div .bigtile .iconSet span.disabled:hover,div .tile .iconSet span.disabled:hover{background-color:#fff;color:#000;cursor:default;opacity:.2}div .bigtile .badge-success,div .tile .badge-success{font-weight:300}div .bigtile .unloaded div,div .tile .unloaded div{border-bottom:16px solid #ff8f35}div .bigtile .deleted div,div .tile .deleted div{border-bottom:16px solid #700}div .bigtile .tileBadge,div .tile .tileBadge{bottom:29px;font-size:11px;font-weight:300;position:absolute;right:0}div .bigtile .tileBadge button,div .tile .tileBadge button{margin-left:0;margin-right:5px}div .bigtile .tileBadge span,div .tile .tileBadge span{display:inline-block;line-height:15px}div .bigtile .tileBadge span .corneredBadge,div .tile .tileBadge span .corneredBadge{border-bottom-style:solid;border-bottom-width:17px;border-left:5px solid transparent;border-radius:3px;color:#fff;height:0;margin-bottom:4px;margin-right:5px;padding-left:1px;padding-right:6px}div .bigtile .tileBadge span .corneredBadge.loading,div .tile .tileBadge span .corneredBadge.loading{border-bottom-color:#ff8f35}div .bigtile .tileBadge span .corneredBadge.loaded,div .tile .tileBadge span .corneredBadge.loaded{border-bottom-color:#8aa051}div .bigtile .tileBadge span .corneredBadge.inProgress,div .tile .tileBadge span .corneredBadge.inProgress{border-bottom-color:#5bc0de}div .bigtile .tileBadge span .corneredBadge.development,div .bigtile .tileBadge span .corneredBadge.unloaded,div .tile .tileBadge span .corneredBadge.development,div .tile .tileBadge span .corneredBadge.unloaded{border-bottom-color:#ff8f35}div .tile{height:100px;width:226px}div .tile-graph .tile-icon:hover{cursor:pointer}div .bigtile{height:309px;width:452px}div .bigtile .shardContainer{font-size:30px}div .bigtile .shardContainer span{padding:2px}.collectionName{border-bottom-left-radius:3px;border-bottom-right-radius:3px;bottom:0;font-weight:300;left:0;position:absolute;right:0;text-align:left}div.headerBar,div.headerDropdown{border:1px solid rgba(140,138,137,.25)}.resizecontainer{margin:0 auto}@media (max-width:738px){#arangoCollectionUl,.footer-center p{display:none}#collectionsDropdown ul{width:auto!important}#arangoCollectionSelect{display:inline-block;height:29px;margin-top:1px}#queryContent #querySize,#queryContent #querySizeDiv,#queryContent .styled-select{width:90px!important}}@media (max-width:970px){#documentsDiv #totalDocuments{display:none}.navmenu{padding-left:20px;padding-top:0;position:absolute}}@media (min-width:739px) and (max-width:1041px){#arangoCollectionUl a{font-size:12px;height:12px;padding:8px 5px}}@media (min-width:1042px) and (max-width:1284px){#arangoCollectionUl a{font-size:14px}}@media (min-width:250px) and (max-width:489px){.resizecontainer{width:228px}.dashboard-full-width-chart{width:225px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:215px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:69.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:214px}.dashboard-large-chart{width:146px}.dashboard-large-chart .dashboard-sub-bar{width:134px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:136px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:106px}.dashboard-medium-chart{width:96px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:95px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:96px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:79px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:66px}.dashboard-small-chart .dashboard-sub-bar{width:54px}.dashboard-small-chart .dashboard-small-chart-inner{width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:56px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:54px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:56px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:40px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-114px;width:248px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:208px}.modal-body .dashboard-large-chart{width:143px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:131px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:133px}.modal-body .dashboard-medium-chart-outer{float:left;width:91px}.modal-body .dashboard-medium-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:89px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:91px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:74px}.modal-body .dashboard-small-chart{width:61px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:49px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:51px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:6.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:51px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:56px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:28px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:10.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:40px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:54px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:228px}.application-detail-view aside.meta{display:none}}@media (min-width:490px) and (max-width:729px){.resizecontainer{width:468px}.dashboard-full-width-chart{width:465px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:455px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:149.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart{width:306px}.dashboard-large-chart .dashboard-sub-bar{width:294px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:296px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:226px}.dashboard-medium-chart{width:216px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:215px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:216px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:199px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:146px}.dashboard-small-chart .dashboard-sub-bar{width:134px}.dashboard-small-chart .dashboard-small-chart-inner{width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:136px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:48px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:134px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:136px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:120px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-234px;width:488px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:448px}.modal-body .dashboard-large-chart{width:303px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:291px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:293px}.modal-body .dashboard-medium-chart-outer{float:left;width:211px}.modal-body .dashboard-medium-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:211px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:194px}.modal-body .dashboard-small-chart{width:141px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:129px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:131px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:46.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:131px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:136px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:84px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:34.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:120px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:134px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:468px}.application-detail-view aside.meta{display:none}}@media (min-width:730px) and (max-width:969px){.resizecontainer{width:708px}.dashboard-full-width-chart{width:705px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:695px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:229.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:694px}.dashboard-large-chart{width:466px}.dashboard-large-chart .dashboard-sub-bar{width:454px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:185px;width:456px}.dashboard-sub-bar-menu{font-size:12px}.dashboard-medium-chart-outer{float:left;width:346px}.dashboard-medium-chart{width:336px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:335px}.dashboard-medium-chart #clusterGraphs svg,.dashboard-medium-chart .dashboard-interior-chart{height:185px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:12px;left:319px;top:0}.dashboard-medium-chart #clusterGraphs svg text{font-size:10px}.dashboard-small-chart{width:226px}.dashboard-small-chart .dashboard-sub-bar{width:214px}.dashboard-small-chart .dashboard-small-chart-inner{width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:197px;width:216px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:10px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:78.25px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:88px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:25.08px;line-height:25.08px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:40.17px;line-height:19.08px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:214px}.dashboard-bar-chart-container{height:79.75px}.dashboard-bar-chart-container .dashboard-bar-chart{height:77.75px;width:216px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:25.25px;line-height:25.25px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:33.5px;line-height:33.5px;padding:5px 8px 10px;width:200px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:38.5px}.dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-354px;width:728px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{display:none;font-size:12px;min-height:190px;width:10px}.absolut,.percentage{font-size:14px}.modal-chart-detail .modal-inner-detail{width:688px}.modal-body .dashboard-large-chart{width:463px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:451px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:453px}.modal-body .dashboard-medium-chart-outer{float:left;width:331px}.modal-body .dashboard-medium-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:329px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:314px}.modal-body .dashboard-small-chart{width:221px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:209px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:211px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:86.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:211px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:216px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:140px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:58.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:200px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:214px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:10px;font-weight:400}.dashboard-subtitle-bar{font-size:14px;font-weight:300}.dashboard-figure{font-size:16px;font-weight:400}.dashboard-figurePer{font-size:14px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:10px}.dashboard-legend{display:none;height:190px;margin-top:-3px;width:0}.dashboard-half-height-legend{display:none;font-size:10px;height:100px;width:0}.application-detail-view section.info{width:508px}}@media (min-width:970px) and (max-width:1209px){.resizecontainer{width:948px}.dashboard-full-width-chart{width:945px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:935px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:309.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart{width:626px}.dashboard-large-chart .dashboard-sub-bar{width:614px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:220px;width:496px}.dashboard-sub-bar-menu{font-size:13px}.dashboard-medium-chart-outer{float:left;width:466px}.dashboard-medium-chart{width:456px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:455px}.dashboard-medium-chart .dashboard-interior-chart{height:220px;width:336px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:13px;left:438px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:220px;width:456px}.dashboard-medium-chart #clusterGraphs svg text{font-size:11px}.dashboard-small-chart{width:306px}.dashboard-small-chart .dashboard-sub-bar{width:294px}.dashboard-small-chart .dashboard-small-chart-inner{width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:229px;width:296px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:11px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:96.5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:128px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:31.17px;line-height:31.17px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:52.33px;line-height:25.17px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:294px}.dashboard-bar-chart-container{height:98px}.dashboard-bar-chart-container .dashboard-bar-chart{height:96px;width:296px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:31.33px;line-height:31.33px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:45.67px;line-height:45.67px;padding:5px 8px 10px;width:280px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:50.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-474px;width:968px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:13px;min-height:225px;width:130px}.absolut,.percentage{font-size:15px}.modal-chart-detail .modal-inner-detail{width:808px}.modal-body .dashboard-large-chart{width:623px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:611px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:493px}.modal-body .dashboard-medium-chart-outer{float:left;width:451px}.modal-body .dashboard-medium-chart{width:451px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:331px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:433px}.modal-body .dashboard-small-chart{width:301px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:289px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:291px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:126.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:291px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:296px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:196px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:82.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:280px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:294px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:11px;font-weight:400}.dashboard-subtitle-bar{font-size:15px;font-weight:300}.dashboard-figure{font-size:18px;font-weight:400}.dashboard-figurePer{font-size:16px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:11px}.dashboard-legend{height:225px;margin-top:-3px;width:120px}.dashboard-half-height-legend{font-size:11px;height:117.5px;width:60px}.application-detail-view section.info{width:748px}}@media (min-width:1210px) and (max-width:1449px){.resizecontainer{width:1188px}.dashboard-full-width-chart{width:1185px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1175px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:389.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1174px}.dashboard-large-chart{width:786px}.dashboard-large-chart .dashboard-sub-bar{width:774px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:255px;width:646px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:586px}.dashboard-medium-chart{width:576px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:575px}.dashboard-medium-chart .dashboard-interior-chart{height:255px;width:446px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:16px;left:555px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:255px;width:576px}.dashboard-medium-chart #clusterGraphs svg text{font-size:12px}.dashboard-small-chart{width:386px}.dashboard-small-chart .dashboard-sub-bar{width:374px}.dashboard-small-chart .dashboard-small-chart-inner{width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:264px;width:376px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:114px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:168px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:37px;line-height:37px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:64px;line-height:31px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:374px}.dashboard-bar-chart-container{height:115.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:113.5px;width:376px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:37.17px;line-height:37.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:57.33px;line-height:57.33px;padding:5px 8px 10px;width:360px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:62.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-594px;width:1208px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:14px;min-height:260px;width:140px}.absolut,.percentage{font-size:18px}.modal-chart-detail .modal-inner-detail{width:1038px}.modal-body .dashboard-large-chart{width:783px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:771px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:643px}.modal-body .dashboard-medium-chart-outer{float:left;width:571px}.modal-body .dashboard-medium-chart{width:571px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:569px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:441px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:550px}.modal-body .dashboard-small-chart{width:381px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:369px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:371px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:166.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:371px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:376px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:252px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:106.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:360px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:374px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:18px;font-weight:300}.dashboard-figure{font-size:22px;font-weight:400}.dashboard-figurePer{font-size:20px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:13px;font-weight:400}.dashboard-legend{font-size:12px;font-weight:400;height:260px;margin-top:-3px;width:130px}.dashboard-half-height-legend{font-size:12px;height:135px;width:65px}.application-detail-view section.info{width:988px}}@media (min-width:1450px) and (max-width:1689px){.resizecontainer{width:1428px}.dashboard-full-width-chart{width:1425px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1415px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:469.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart{width:946px}.dashboard-large-chart .dashboard-sub-bar{width:934px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:796px}.dashboard-sub-bar-menu{font-size:15px}.dashboard-medium-chart-outer{float:left;width:706px}.dashboard-medium-chart{width:696px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:695px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:556px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:18px;left:673px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:696px}.dashboard-medium-chart #clusterGraphs svg text{font-size:13px}.dashboard-small-chart{width:466px}.dashboard-small-chart .dashboard-sub-bar{width:454px}.dashboard-small-chart .dashboard-small-chart-inner{width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:456px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:13px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:208px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:454px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:456px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:440px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-714px;width:1448px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:15px;min-height:290px;width:150px}.absolut,.percentage{font-size:20px}.modal-chart-detail .modal-inner-detail{width:1268px}.modal-body .dashboard-large-chart{width:943px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:931px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:793px}.modal-body .dashboard-medium-chart-outer{float:left;width:691px}.modal-body .dashboard-medium-chart{width:691px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:551px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:668px}.modal-body .dashboard-small-chart{width:461px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:449px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:451px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:206.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:451px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:456px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:308px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:130.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:440px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:454px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:13px;font-weight:400}.dashboard-subtitle-bar{font-size:20px;font-weight:300}.dashboard-figure{font-size:26px;font-weight:400}.dashboard-figurePer{font-size:24px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:13px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:13px;height:150px;width:70px}.application-detail-view section.info{width:1228px}}@media (min-width:1690px) and (max-width:1929px){.resizecontainer{width:1668px}.dashboard-full-width-chart{width:1665px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1655px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:549.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1654px}.dashboard-large-chart{width:1106px}.dashboard-large-chart .dashboard-sub-bar{width:1094px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:325px;width:936px}.dashboard-sub-bar-menu{font-size:16px}.dashboard-medium-chart-outer{float:left;width:826px}.dashboard-medium-chart{width:816px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:815px}.dashboard-medium-chart .dashboard-interior-chart{height:325px;width:656px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:22px;left:789px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:325px;width:816px}.dashboard-medium-chart #clusterGraphs svg text{font-size:14px}.dashboard-small-chart{width:546px}.dashboard-small-chart .dashboard-sub-bar{width:534px}.dashboard-small-chart .dashboard-small-chart-inner{width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:334px;width:536px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:149px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:248px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:48.67px;line-height:48.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:87.33px;line-height:42.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:534px}.dashboard-bar-chart-container{height:150.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:148.5px;width:536px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:48.83px;line-height:48.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:80.67px;line-height:80.67px;padding:5px 8px 10px;width:520px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:85.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-834px;width:1688px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:16px;min-height:330px;width:170px}.absolut,.percentage{font-size:24px}.modal-chart-detail .modal-inner-detail{width:1488px}.modal-body .dashboard-large-chart{width:1103px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1091px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:933px}.modal-body .dashboard-medium-chart-outer{float:left;width:811px}.modal-body .dashboard-medium-chart{width:811px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:809px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:651px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:784px}.modal-body .dashboard-small-chart{width:541px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:529px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:531px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:246.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:531px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:536px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:364px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:154.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:520px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:534px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:14px;font-weight:400}.dashboard-subtitle-bar{font-size:24px;font-weight:300}.dashboard-figure{font-size:30px;font-weight:400}.dashboard-figurePer{font-size:28px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:14px}.dashboard-legend{height:330px;margin-top:-3px;width:160px}.dashboard-half-height-legend{font-size:14px;height:170px;width:80px}.application-detail-view section.info{width:1468px}}@media (min-width:1930px) and (max-width:2169px){.resizecontainer{width:1908px}.dashboard-full-width-chart{width:1905px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:1895px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:629.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:1894px}.dashboard-large-chart{width:1266px}.dashboard-large-chart .dashboard-sub-bar{width:1254px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:385px;width:1086px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:946px}.dashboard-medium-chart{width:936px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:935px}.dashboard-medium-chart .dashboard-interior-chart{height:385px;width:766px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:26px;left:905px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:385px;width:936px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:626px}.dashboard-small-chart .dashboard-sub-bar{width:614px}.dashboard-small-chart .dashboard-small-chart-inner{width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:394px;width:616px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:14px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:179px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:288px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:58.67px;line-height:58.67px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:107.33px;line-height:52.67px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:614px}.dashboard-bar-chart-container{height:180.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:178.5px;width:616px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:58.83px;line-height:58.83px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:100.67px;line-height:100.67px;padding:5px 8px 10px;width:600px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:105.67px}.dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-954px;width:1928px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:390px;width:180px}.absolut,.percentage{font-size:28px}.modal-chart-detail .modal-inner-detail{width:1718px}.modal-body .dashboard-large-chart{width:1263px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1251px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1083px}.modal-body .dashboard-medium-chart-outer{float:left;width:931px}.modal-body .dashboard-medium-chart{width:931px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:929px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:761px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:900px}.modal-body .dashboard-small-chart{width:621px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:609px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:611px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:286.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:611px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:616px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:420px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:178.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:600px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:614px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:28px;font-weight:300}.dashboard-figure{font-size:34px;font-weight:400}.dashboard-figurePer{font-size:32px;font-weight:300}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-size:14px;font-weight:400}.dashboard-legend{font-size:15px;font-weight:400;height:390px;margin-top:-3px;width:170px}.dashboard-half-height-legend{font-size:15px;height:200px;width:85px}.application-detail-view section.info{width:1708px}}@media (min-width:2170px) and (max-width:2409px){.resizecontainer{width:2148px}.dashboard-full-width-chart{width:2145px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2135px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:709.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2134px}.dashboard-large-chart{width:1426px}.dashboard-large-chart .dashboard-sub-bar{width:1414px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1276px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1066px}.dashboard-medium-chart{width:1056px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1055px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:916px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1031px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1056px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:706px}.dashboard-small-chart .dashboard-sub-bar{width:694px}.dashboard-small-chart .dashboard-small-chart-inner{width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:696px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:328px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:694px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:696px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:680px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1074px;width:2168px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:1988px}.modal-body .dashboard-large-chart{width:1423px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1411px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1273px}.modal-body .dashboard-medium-chart-outer{float:left;width:1051px}.modal-body .dashboard-medium-chart{width:1051px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1049px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:911px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1026px}.modal-body .dashboard-small-chart{width:701px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:689px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:691px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:326.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:691px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:696px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:476px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:202.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:680px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:694px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:1948px}}@media (min-width:2410px) and (max-width:2649px){.resizecontainer{width:2388px}.dashboard-full-width-chart{width:2385px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2375px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:789.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2374px}.dashboard-large-chart{width:1586px}.dashboard-large-chart .dashboard-sub-bar{width:1574px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1436px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1186px}.dashboard-medium-chart{width:1176px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1175px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1036px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1151px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1176px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:786px}.dashboard-small-chart .dashboard-sub-bar{width:774px}.dashboard-small-chart .dashboard-small-chart-inner{width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:776px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:368px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:774px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:776px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:760px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1194px;width:2408px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2228px}.modal-body .dashboard-large-chart{width:1583px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1571px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1433px}.modal-body .dashboard-medium-chart-outer{float:left;width:1171px}.modal-body .dashboard-medium-chart{width:1171px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1169px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1031px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1146px}.modal-body .dashboard-small-chart{width:781px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:769px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:771px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:366.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:771px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:776px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:532px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:226.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:760px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:774px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2188px}}@media (min-width:2650px) and (max-width:2889px){.resizecontainer{width:2628px}.dashboard-full-width-chart{width:2625px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{width:2615px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{float:left;width:869.33px}.dashboard-full-width-chart .dashboard-sub-bar{width:2614px}.dashboard-large-chart{width:1746px}.dashboard-large-chart .dashboard-sub-bar{width:1734px}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{height:285px;width:1596px}.dashboard-sub-bar-menu{font-size:17px}.dashboard-medium-chart-outer{float:left;width:1306px}.dashboard-medium-chart{width:1296px}.dashboard-medium-chart .dashboard-sub-bar{margin-left:-5px;width:1295px}.dashboard-medium-chart .dashboard-interior-chart{height:285px;width:1156px}.dashboard-medium-chart .dashboard-medium-chart-menu{font-size:20px;left:1271px;top:0}.dashboard-medium-chart #clusterGraphs svg{height:285px;width:1296px}.dashboard-medium-chart #clusterGraphs svg text{font-size:15px}.dashboard-small-chart{width:866px}.dashboard-small-chart .dashboard-sub-bar{width:854px}.dashboard-small-chart .dashboard-small-chart-inner{width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{height:294px;width:856px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-axis text{fill:#666;font-size:15px;font-weight:400}.dashboard-tendency-container .dashboard-tendency-chart{height:129px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:408px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar{height:42px;line-height:42px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure{height:74px;line-height:36px;padding-top:5px}.dashboard-tendency-container .dashboard-sub-bar{width:854px}.dashboard-bar-chart-container{height:130.5px}.dashboard-bar-chart-container .dashboard-bar-chart{height:128.5px;width:856px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{height:42.17px;line-height:42.17px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart{height:67.33px;line-height:67.33px;padding:5px 8px 10px;width:840px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart #residentSizeChart{height:72.33px}.dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.modal-chart-detail{bottom:12.1%!important;left:50%;margin-left:-1314px;width:2648px!important}.modal-chart-detail .modal-body{height:95%;max-height:none;padding:5px}.modal-chart-detail .modal-dashboard-legend{font-size:17px;min-height:290px;width:150px}.absolut,.percentage{font-size:22px}.modal-chart-detail .modal-inner-detail{width:2468px}.modal-body .dashboard-large-chart{width:1743px}.modal-body .dashboard-large-chart .dashboard-sub-bar{width:1731px}.modal-body .dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart{width:1593px}.modal-body .dashboard-medium-chart-outer{float:left;width:1291px}.modal-body .dashboard-medium-chart{width:1291px}.modal-body .dashboard-medium-chart .dashboard-sub-bar{width:1289px}.modal-body .dashboard-medium-chart .dashboard-interior-chart{width:1151px}.modal-body .dashboard-medium-chart .dashboard-medium-chart-menu{left:1266px}.modal-body .dashboard-small-chart{width:861px}.modal-body .dashboard-small-chart .dashboard-sub-bar{width:849px}.modal-body .dashboard-small-chart .dashboard-small-chart-inner,.modal-body .dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart{width:851px}.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-figure,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-subtitle-bar,.modal-body .dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{width:406.5px}.modal-body .dashboard-tendency-container .dashboard-sub-bar{width:851px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart{width:856px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{width:588px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{width:250.8px}.modal-body .dashboard-bar-chart-container .dashboard-bar-chart-chart{width:840px}.modal-body .dashboard-bar-chart-container .dashboard-sub-bar{width:854px}.absolut{font-weight:300}.dashboard-sub-bar{font-size:15px;font-weight:400}.dashboard-subtitle-bar{font-size:22px;font-weight:300}.dashboard-figure{font-size:36px;font-weight:400}.dashboard-figurePer{font-size:34px;font-weight:300}.dashboard-legend,.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{font-weight:400;font-size:15px}.dashboard-legend{height:290px;margin-top:-3px;width:140px}.dashboard-half-height-legend{font-size:15px;height:150px;width:70px}.application-detail-view section.info{width:2428px}}div.centralRow{margin-bottom:40px;margin-top:40px}div.centralContent{background-color:transparent;height:100%;margin-left:-5px;margin-right:-5px;min-height:80px;padding:5px;width:100%}.contentDiv{padding:13px 0 0}.contentDiv li{background-color:rgba(0,0,0,.05)}.contentDiv a.add{display:block;font-weight:400;padding:40px 0;text-align:left}.modal-body th .valueCell,.modal-body th th.actionCell,.modal-body th th.keyCell,.waitModal{text-align:center}.contentDiv .icon{padding-left:5px;padding-right:5px;padding-top:10px}.contentDiv:after{clear:both}.contentDiv:after,.contentDiv:before{display:table;line-height:0}.clusterInfoIcon{float:left;padding-left:5px;padding-top:2px}.waitModal.icon{font-size:100px;height:120px}.waitModal.message{font-size:20px}.icon_arangodb_info{color:#333;font-size:23px}li a [class*=" icon_arangodb"],li a [class^=icon_arangodb]{font-size:18px;position:absolute;right:4px;top:2px}.fa-minus-circle{color:#da4f49;font-size:14pt}.fa-minus-circle:hover{cursor:pointer}div.headerDropdown{background-color:#fff;border-radius:3px;clear:both;display:none;padding:10px;position:relative;width:auto}div.headerDropdown.smallDropdown .dropdownInner{min-height:20px}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox{display:none}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerDropdown.headerDropdown input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.dropdown-title{margin-bottom:10px}div.dropdownInner{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;min-height:125px;position:relative;width:auto}div.dropdownInner .nav-header{font-size:10pt}div.dropdownInner>.nav-header{color:#000;font-size:10pt;font-weight:400}div.dropdownInner>label{color:#000;font-weight:300}div.dropdownInner ul{border-left:1px solid rgba(140,138,137,.25);display:inline;list-style-type:none;margin-left:10px;margin-top:10px;min-height:105px;width:175px}div.dropdownInner ul:first-of-type,div.queryline input[type=file]{border:0}div.dropdownInner ul label{color:#000;padding-left:20px}div.dropdownInner ul li .fa{color:#999;margin-right:5px}div.dropdownInner ul li .fa.fa-square-o{margin-left:1px;margin-right:6px}div.dropdownInner ul li .fa.fa-check-circle-o,div.dropdownInner ul li .fa.fa-check-square-o,div.dropdownInner ul li .fa.fa-dot-circle-o{color:#8aa051}div.queryline{color:#000;height:35px}div.queryline .textDiv{margin-right:10px;margin-top:4px}div.queryline input,div.queryline select{margin-bottom:5px}div.queryline input{width:16%}div.queryline.querylineAdd span{color:#fff;padding-left:10px;position:relative;top:-21px}div.queryline .removeFilterItem i{margin-left:5px!important;margin-top:0!important}div.queryline div.searchByAttribute{margin-left:6px;margin-right:6px;position:relative}div.queryline div.searchByAttribute input{width:140px}div.queryline div.searchByAttribute>ul.gv-dropdown-menu{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;background-color:#fff;color:#fff;display:none;left:0;position:absolute;top:20px;width:247px}div.dropdownImport{background-color:#fff;border-radius:3px;display:none;position:relative;padding:10px 10px 5px}div.dropdownImport input{line-height:0;margin-bottom:-15px;margin-top:5px}select.filterSelect{color:#00f;margin-left:10px;margin-right:10px;width:80px}#filterHeader button{float:right;margin-left:10px!important;margin-top:1px}div.input-append button.gv_example_toggle{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;background-color:#8f8d8c;height:30px;margin-left:-1px;padding-left:10px;padding-right:10px;padding-top:12px;vertical-align:top}div.input-append button.gv_example_toggle:hover{background-color:#8aa051}div.headerBar,div.headerBar .infoField{background-color:#fff;padding-left:5px;padding-right:5px}.searchEqualsLabel{margin-left:6px;margin-right:6px}img.gv-throbber{background-image:url(../img/swagger/throbber.gif)}span.gv_caret{border-top:5px solid #fff;margin-top:2px!important}input.search-input{height:14px;line-height:18px;margin-right:-1px;margin-top:6px;width:120px}.search-field{margin-left:10px}.search-field .fa-search{color:#c2c2c2;font-size:12pt;opacity:.5;position:absolute;right:9px;top:9px}.search-field .fa-search:hover{cursor:pointer;opacity:1}.gv-search-submit-icon,.search-submit-icon{background-image:url(../img/enter_icon.png);background-size:14px;height:14px;margin-left:-18px;opacity:.2;position:absolute;width:14px}.gv-search-submit-icon:hover,.search-submit-icon:hover{opacity:.8}.search-submit-icon{margin-top:11px}.gv-search-submit-icon{margin-top:6px}div.headerBar{border-radius:3px;color:#fff;font-size:16px;height:36px;margin-bottom:5px;margin-top:15px;position:relative}div.headerBar .infoField{border:1px solid rgba(140,138,137,.25);border-radius:3px!important;color:#000;float:right;font-size:12px;margin-right:7px;margin-top:7px}div.headerBar .infoField .fa{cursor:pointer;margin-left:5px}div.headerBar input[type=checkbox].css-checkbox{display:none}div.headerBar input[type=checkbox].css-checkbox label.css-label{background-position:0 0;background-repeat:no-repeat;cursor:pointer;display:inline-block;font-size:15px;height:15px;margin-top:0;padding-left:20px;vertical-align:middle}div.headerBar input[type=checkbox].css-checkbox:checked+label.css-label{background-position:0 -15px}div.headerBar input[type=radio]{display:none}div.headerBar input[type=radio] label span{background:url(../img/check_radio_sheet.png) -38px top no-repeat;cursor:pointer;display:inline-block;height:19px;margin:-1px 4px 0 0;vertical-align:middle;width:19px}#transparentHeader input[type=checkbox].css-checkbox,.contentTables tr.contentRowActive span,.modal-delete-confirmation,.query-div,.query-output .ace_cursor-layer,.query-output .ace_replace_form{display:none}div.headerBar input[type=radio]:checked+label span{background:url(../img/check_radio_sheet.png) -57px top no-repeat}.headerButtonList a.error{color:#da4f49}.headerButtonList a.error:hover{background-color:#da4f49;border-color:#da4f49;color:#fff}.headerBar a.arangoHeader{color:#000;font-size:11.5pt;font-weight:100;left:0;position:relative;top:7px}.headerBar>div.headerButtonBar{margin:4px 0;margin-bottom:0!important}.breadcrumb{background:0 0;border:0;border-radius:0;padding:7px 0}.breadcrumb .disabledBread{color:#666;float:left;font-size:11.5pt;font-weight:100;padding-right:5px;position:relative}.breadcrumb .disabledBread i{font-size:10pt;margin-left:10px}.breadcrumb .activeBread{color:#8aa051;float:left;font-size:11.5pt;font-weight:100}.breadcrumb #app-development-path{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);border-left:1px solid rgba(140,138,137,.25);border-radius:3px;border-right:1px solid rgba(140,138,137,.25);height:24px;margin-left:-6px;margin-top:-10px;padding-left:5px;width:100%}.arangoHeader{font-weight:400}.checkboxLabel{margin-top:4px;padding-left:0}.css-label{background-image:url(../img/dark-check-green.png)}.css-label-round{background-image:url(../img/dark-check-green-round.png)}.modal-dashboard-header,.modal-header{background-color:#fff;border-bottom:0!important;border-radius:3px;margin-top:5px;padding-left:5px;padding-right:10px;padding-top:4px}.modal-dashboard-header .arangoHeader,.modal-header .arangoHeader{color:#000;font-size:13pt;font-weight:100;left:5px;position:relative;top:2px}.modal-dashboard-header a,.modal-header a{top:2px!important}.modal-dashboard-header .close,.modal-header .close{color:#fff;font-weight:300;margin-top:2px;opacity:.5}.modal-dashboard-header .close:hover,.modal-header .close:hover{opacity:1}.modal-tabbar{border-bottom:1px solid #666}.modal-body{color:#736b68;font-size:14px;font-weight:300;max-height:410px}.modal-body .select2-choices{background-image:none!important;border:1px solid #999;border-radius:3px;-webkit-box-shadow:none;box-shadow:none}.modal-body .select2-choices input:active{-webkit-box-shadow:none;box-shadow:none;outline:0!important}.modal-body .select2-choices .select2-search-choice{margin:5px 0 3px 5px!important}.modal-body .select2-choices li{background-color:#fff!important;background-image:none!important;color:#000}.modal-body tr.first,.modal-body tr.last,.modal-body tr.middle{background-color:#f5f8f0}.modal-body .select2-choices li a{margin-left:1px;margin-top:-1px}.modal-body .select2-choices:active{border:1px solid #999;-webkit-box-shadow:none!important;box-shadow:none!important;outline:transparent!important}.modal-body .nav-tabs{margin-top:15px}.modal-body .nav-tabs>li>a:hover{border-color:#8c8a89}.modal-body input,.modal-body select,.modal-body textarea{margin-top:10px}.modal-body input[type=checkbox]{margin-bottom:10px}.modal-body input[type=text].invalid-input{border-color:rgba(234,23,23,.6)}.modal-body input[type=text].invalid-input:focus{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(234,23,23,.6)}.modal-body input[type=file]{line-height:17px}.modal-body tr.spacer{height:10px}.modal-body tr.first th:first-child{border-top-left-radius:3px}.modal-body tr.first th:last-child{border-top-right-radius:3px}.modal-body tr.middle{padding-left:10px;padding-right:10px}.modal-body tr.last th:first-child{border-bottom-left-radius:3px}.modal-body tr.last th:last-child{border-bottom-right-radius:3px}.modal-body tr.first th:first-child,.modal-body tr.last th:first-child,.modal-body tr.middle th:first-child{padding-left:10px}.modal-body tr.first th:last-child,.modal-body tr.last th:last-child,.modal-body tr.middle th:last-child{padding-right:10px}.modal-body th.actionCell{width:30px}.modal-body th.keyCell{width:170px}.modal-body th.keyCell input{width:150px}.modal-body th .valueCell{width:300px}.modal-body th .valueCell input{width:290px}.modal-body th .select2-container{margin-bottom:10px;margin-top:10px}.modal-body .icon-info-sign{margin-bottom:10px;margin-left:10px;opacity:.7;padding-bottom:5px}.modal-body .icon-info-sign:hover{opacity:1}.modal-body .icon_arangodb_info{color:#736b68;font-size:18px;margin-top:-10px;position:absolute;right:12px}.modal-body .icon_arangodb_info:hover{color:#000}.modal-body .collapse{margin-right:-14px;position:relative}.modal-body .accordion-inner{border-top:0;margin-left:0;padding-left:0;padding-right:0}.modal-body .accordion-toggle span .caret{border-top-color:#000;float:right;margin-top:5px}.modal-body .accordion-toggle.collapsed span .caret{-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.modal-body input{width:436px}.modal-body select{width:450px}.modal-body .collectionTh{height:50px}.modal-body .tab-content{min-height:200px}.modal-body .tab-content .tab-pane{border-top:1px solid #666!important;margin-left:0!important;padding-top:10px}.modal-body .tab-content .tab-pane-modal{border-top:none!important}.modal-body .tab-content #appstore{max-height:290px}.modal-body .errorMessage{color:#da4f49;font-size:9pt;font-weight:400;margin-bottom:5px;margin-top:-9px;position:absolute}.modal-body .nav .tab-icon{margin-right:5px;margin-top:-3px;width:20px}.modal-text{font-weight:300;padding-bottom:3px;padding-top:3px}.modal-backdrop,.modal-backdrop.fade.in{opacity:.4}.fade{opacity:0;-moz-transition:opacity .03s linear;-ms-transition:opacity .03s linear;-o-transition:opacity .03s linear;-webkit-transition:opacity .03s linear;transition:opacity .03s linear}.modal{border:0!important;border-radius:3px!important;box-shadow:0;margin-left:-325px!important;width:650px}.modal .fade.in{top:12.1%!important}.modal table tr:last-child{border-bottom:0!important}.waitModal{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:0 0;border:0;color:#fff}.waitModalBackdrop{opacity:.7!important}.modalTooltips span{color:#736b68;font-size:20px}.fixedDropdown .dropdown-header a,.fixedDropdown .notificationItem,.modalTooltips span:hover{color:#000}.gv-object-view{text-align:left;white-space:pre}.capitalize{text-transform:capitalize}.modal-footer{border-top:0!important;padding-right:17px}.modal-footer .button-close{margin-left:20px;margin-right:10px}.modal-header{margin-left:5px;margin-right:5px}.modal-dashboard-header{margin-left:0;margin-right:0;padding-bottom:9px}.modal table tr,.thBorderBottom{border-bottom:1px solid #f7f3f2!important}.modal-delete-confirmation button{margin-right:10px;margin-top:-4px}.modal-delete-confirmation button .modal-confirm-delete{margin-right:-18px}.modal-delete-confirmation fieldset input{float:left}.modal-delete-confirmation fieldset label{float:left;margin-left:10px}.createModalDialog table{width:100%}.createModalDialog .collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.createModalDialog .figures1,.createModalDialog .figures2{margin-bottom:20px;width:300px}.createModalDialog .figures2{margin-left:20px!important}.createModalDialog .figures3{margin-bottom:0;width:100%}.foxx-store-row .foxx-name{font-weight:700}.foxx-store-row .foxx-author{font-size:10pt;font-weight:300;margin-top:-4px}.foxx-store-row .foxx-version{font-weight:400}#new-app-mount{margin-right:24px;width:360px}#control_event_edge_delete_modal,#control_event_edge_edit_modal,#control_event_new_node_modal,#control_event_node_delete_modal,#control_event_node_edit_modal{margin-left:-320px;width:640px}.navlogo .stat_cpu,.navlogo .stat_ram{width:26px;height:26px}.navlogo .stat_cpu{margin-top:1px}.navlogo .stat_cpu path{fill:#aa0}.navlogo .stat_ram path{fill:#070}.navlogo .stat_req{height:22px;width:22px}.navlogo .stat_req path{fill:#aa0}#notification_menu .innerDropdownInnerUL{margin-left:0}#noty_bottom_layout_container li{border:0!important}.noty_bar .arango_message{font-weight:500!important}.noty_bar .arango_message div{float:right;width:20px}.fixedDropdown{background:#fff!important;border-color:rgba(140,138,137,.25)!important;border-radius:3px!important;margin:10px -3px 0!important;right:-1px!important;width:210px}.fixedDropdown .dropdown-header,.fixedDropdown .dropdown-item,.innerDropdownInnerUL{border-bottom:1px solid rgba(0,0,0,.2)}.fixedDropdown:after{visibility:hidden}.fixedDropdown .dropdown-header{margin-left:-1px;padding:0!important}.fixedDropdown a{padding-left:5px!important}.fixedDropdown .notificationItemContent{font-size:.9em;font-weight:300;margin-left:15px;max-width:180px;min-height:15px;white-space:normal;width:180px;word-wrap:break-word}.fixedDropdown button{margin-right:5px;margin-top:5px}.fixedDropdown .notificationItem .notificationItemTitle{color:#000;font-weight:400;max-width:165px;overflow-wrap:break-word;white-space:normal;word-wrap:break-word}.fixedDropdown .notificationItem .notificationItemTitle:hover{background-color:transparent;cursor:default}.fixedDropdown .notificationItem i{color:rgba(0,0,0,.2);font-size:20px;padding-left:5px;position:relative;right:2px}.fixedDropdown .notificationItem i:hover{color:#000}.innerDropdownInnerUL{height:220px!important;min-height:220px;overflow-x:hidden;overflow-y:auto;width:100%}.innerDropdownInnerUL .dropdown-item:hover{background-color:#e1e1e1!important}.innerDropdownInnerUL li{width:auto!important}#stat_hd{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);height:25px;margin-top:3px;position:relative;right:3px;text-align:center;width:25px}.contentButtons,.contentTables{width:100%;margin-bottom:10px}#stat_hd #stat_hd_counter{color:#c2c2c2;line-height:25px;text-align:center}.fullNotification{background-color:#da4f49!important;border:1px solid #da4f49!important}.fullNotification p{color:#fff!important}.contentTables tr.contentRowActive a,.contentTables tr.contentRowInactive a{color:#000!important}.contentButtons{clear:both}.contentButtons #createDatabase,.contentButtons #createUser{margin-left:0}.contentTables thead{text-align:left}.contentTables thead tr{background-color:#fff;border-bottom:1px solid #c2c2c2}.contentTables tbody tr:nth-child(odd){background-color:#d9d9d9}.contentTables tbody tr:nth-child(even){background-color:#fff}.contentTables tr.contentRowActive{background-color:#bdcc92!important;font-weight:400}.contentTables .dbThFirst{width:90%}.contentTables .dbThSecond{width:10%}.contentTables td{padding:12px 18px}.contentTables td span{float:right;font-size:22px}.contentTables .collectionThSec{margin-right:0;width:80%}.contentTables .collectionTh{margin-right:0;width:5%}.arangoToolbar .pull-right button:first-child,.arangoToolbar .pull-right select:first-child,.arangoToolbar i.fa,.arangoToolbarBottom #executeQuery{margin-right:5px}.user-menu-img{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);height:25px;margin-top:-4px}.ui-tooltip{background-color:#8aa051!important;border:0!important;border-radius:3px!important;box-shadow:none!important;color:#fff!important;font-size:10pt!important;font-weight:100!important;z-index:99999999}.dataNotReadyYet,.dygraph-label.dygraph-title{font-family:'Open Sans',sans-serif}.tooltip-inner{max-width:300px!important;white-space:normal!important;word-wrap:break-word!important}.index-tooltip{color:#736b68}.index-tooltip:hover{color:#000}.index-tooltip .arangoicon{font-size:18px!important}.tooltipInfoTh{width:10%}.arangoToolbar span.action:hover{background-color:#8aa051;border-radius:3px;color:#fff;cursor:pointer}.arangoToolbar{background-color:#fff;border:1px solid rgba(140,138,137,.25);height:40px;width:100%}.arangoToolbarTop,.dashboard-bar-chart-container,.dashboard-full-width-chart .dashboard-full-width-chart-inner,.dashboard-large-chart .dashboard-large-chart-inner,.dashboard-medium-chart,.dashboard-small-chart .dashboard-small-chart-inner,.dashboard-tendency-container{border-top-left-radius:3px;border-top-right-radius:3px}.arangoToolbarBottom,.dashboard-sub-bar{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.arangoToolbar .pull-left,.arangoToolbar .pull-right{height:30px;margin-top:5px}.arangoToolbar .pull-left i.positive,.arangoToolbar .pull-right i.positive{color:#8aa051}.arangoToolbar .pull-left i.warning,.arangoToolbar .pull-right i.warning{color:#faa732}.arangoToolbar .pull-left button{margin-left:5px}.arangoToolbar span{padding:5px 8px;position:relative;top:5px;font-weight:100;margin-left:10px}.arangoToolbar i{font-size:11pt;font-style:normal}.arangoToolbar .toolbarType{background:#5bc0de;border-radius:3px;color:#fff;margin-left:5px}.arangoToolbar .styled-select{width:auto}.arangoToolbarBottom{clear:both}.arangoToolbarBottom .button-close:last-child{margin-right:10px}.dbselection{float:left;margin-right:3px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-bar-chart-container:first-child,.dashboard-full-width-chart .dashboard-full-width-chart-inner:first-child,.dashboard-large-chart .dashboard-large-chart-inner:first-child,.dashboard-medium-chart:first-child,.dashboard-small-chart .dashboard-small-chart-inner:first-child,.dashboard-tendency-container:first-child{margin-left:0}.dashboard-bar-chart-container,.dashboard-full-width-chart,.dashboard-large-chart,.dashboard-medium-chart,.dashboard-small-chart,.dashboard-tendency-container{margin-bottom:10px;position:relative}.dashboard-sub-bar-menu{cursor:pointer;position:absolute;right:9px;top:6px}.dataNotReadyYet{color:#faa732;font-size:14px;font-weight:100;text-align:center}.dashboard-sub-bar{background-color:#686766;color:#fff;height:24px;line-height:24px;margin:0;padding:0 6px}.dashboard-full-width-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-subtitle-bar.top{border-bottom:1px solid #e1e1e1;height:48px;line-height:48px;text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart{border-left:1px solid #e1e1e1}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner{margin-left:10px;margin-right:10px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table{margin-bottom:10px;margin-top:10px;table-layout:fixed;width:100%}.dashboard-large-chart .dashboard-large-chart-inner .dashboard-interior-chart,.dashboard-medium-chart .dashboard-interior-chart{margin-bottom:0}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table .no-data{font-style:italic;font-weight:100}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table tr{border-bottom:1px solid rgba(0,0,0,.025)}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:first-child{width:100px}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart .inner table td:last-child{text-align:right}.dashboard-full-width-chart .dashboard-full-width-chart-inner .dashboard-interior-chart:first-child{border-left:0}.dashboard-full-width-chart .state{background-color:#fff;border-radius:5px;color:#000;margin-left:5px;padding-left:6px;padding-right:4px}.dashboard-large-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px;margin-right:12px}.dashboard-large-chart .dashboard-large-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:12px}.dashboard-small-chart{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-small-chart .dashboard-small-chart-inner{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;padding-bottom:10px;padding-top:5px}.dashboard-small-chart .dashboard-small-chart-inner .dashboard-interior-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart-outer:first-child{margin-right:10px}.dashboard-medium-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;margin-bottom:0;padding-top:10px}.dashboard-medium-chart:first-child{margin-right:12px}.dashboard-medium-chart .dashboard-medium-chart-outer{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-medium-chart .dashboard-medium-chart-menu{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:0 solid rgba(0,0,0,.3);color:rgba(0,0,0,.3);cursor:pointer;padding:0 4px;position:absolute;z-index:1000}.dashboard-medium-chart .dashboard-medium-chart-menu:hover{color:rgba(0,0,0,.7)}.dashboard-medium-chart .dashboard-medium-chart-inner{padding-bottom:10px}.dashboard-medium-chart .clusterChart .slice path{fill-opacity:.15;stroke-opacity:1;stroke-width:1.5px}.dashboard-tendency-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-tendency-container .dashboard-tendency-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency{background-color:#fff;margin-top:5px;padding:0 8px}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency:first-child{border-right:1px solid #e1e1e1}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-subtitle-bar{border-bottom:1px solid #e1e1e1;text-align:right}.dashboard-tendency-container .dashboard-tendency-chart .dashboard-tendency .dashboard-figure{text-align:center}.dashboard-bar-chart-container{border:1px solid rgba(104,103,102,.1);border-radius:3px}.dashboard-bar-chart-container .dashboard-bar-chart{background-color:#fff;border-left:5px solid #fff;border-right:5px solid #fff;border-top:5px solid #fff;border-top-left-radius:3px;border-top-right-radius:3px;padding-bottom:5px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title{margin-top:5px;padding:0 8px}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .percentage{font-weight:400}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-title .absolut{text-align:right}#dashboardDetailedChart .dygraph-axis-label-y,.dashboardDetailChart .dygraph-axis-label-y,.innerDashboardChart .dygraph-axis-label-y{text-align:left}.dashboard-bar-chart-container .dashboard-bar-chart .dashboard-bar-chart-chart .nv-bar rect{fill-opacity:.15;stroke-opacity:.8;stroke-width:.5px}.dashboard-legend .dashboard-legend-inner{padding:0 5px 5px 0}.dashboard-spacer{margin:0 12px}.headerBar.dashboard-headerbar{margin:20px 0}.modal-chart-detail .modal-dashboard-legend .dashboard-legend-inner{padding-left:20px}.dashboard-half-height-legend .dashboard-legend-inner{padding-top:20px}.dashboard-title-bar{background-color:#686766;color:#fff;font-size:14.5px;font-weight:400;height:30px;line-height:30px;padding:0 5px 0 10px}.dashboard-title-bar .dashboard-half-title-bar{border-left:1px solid #000;margin-left:-1px;width:50%}.dashboard-title-bar .dashboard-half-title-bar:first-child{border-left:0;margin-left:0}.dashboard-row{margin-bottom:0;margin-left:0;margin-right:0}.dygraph-axis-label.dygraph-axis-label-x,.dygraph-axis-label.dygraph-axis-label-y{color:#666}.dashboardModal{-moz-border-radius:8px!important;-webkit-border-radius:8px!important;border-radius:8px!important;height:80%;margin-left:-45%;min-width:780px;overflow:auto;padding:10px;top:10%;width:90%!important}#dashboardHttpGroup{border:6px solid #000;height:100%;width:100%}#dashboardDetailedChart{border:1px solid #000;height:300px;width:100%}.innerDashboardChart{bottom:5px;left:5px;position:absolute;right:5px;top:5px}.dashboardChart{background-color:#fff;border:1px solid rgba(0,0,0,.2);float:left;height:210px;margin:1.05%;position:relative;width:31%}.dygraph-label.dygraph-title{color:#000;font-size:15px;font-weight:400;text-align:left}#dashboardDetailedLineChart{padding-top:10px}.dashboardDistribution{float:left;width:270px}.dashboardDistribution svg{height:220px;width:250px}.showHotkeyHelp{cursor:pointer}.shortcuts{font-size:14px;font-weight:200}.shortcuts b{border-left:1px solid rgba(0,0,0,.34);margin-left:5px;padding-left:5px}.shortcuts .clearShortcut,.shortcuts b:first-child{border-left:0;margin-left:0;padding-left:0}.loginFixedWindow{background:#f5f8f0;height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.loginFixedWindow .resizecontainer{position:relative;top:0}.loginFixedWindow .resizecontainer img{height:33px;margin-left:-6px;margin-top:9px}.login-window{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;height:auto;left:50%;margin-left:-220px!important;margin-top:-150px;padding:10px;position:absolute;top:50%;width:400px}.login-window .fa{color:rgba(0,0,0,.4);float:right;font-size:14pt;margin-right:5px;margin-top:-34px}.login-window .wrong-credentials{color:#da4f49;margin-top:-30px;text-align:center}.login-window .login-space{height:50px}.login-window .login-input{width:387px}.login-window .form-error{border:1px solid #da4f49!important}toolbar{background-color:#f0f0f0;border-bottom:0;border-style:solid;border-width:1px;font-size:20px;height:27px;margin-left:0;margin-right:0}toolbar span:hover{background-color:#da4f49;color:#fff}.queryBottomActions{border-top:1px solid rgba(140,138,137,.25);padding:10px}.queryExecutionTime{margin-left:10px;margin-top:15px}#queryManagementContent{margin-top:18px}.queryManagementBottomActions{background-color:#fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid #c2c2c2;height:40px;margin-top:-2px;padding-top:10px}.queryMethods,.vars-editor-header{border-top:1px solid rgba(140,138,137,.25)}.queryManagementBottomActions button{margin-right:10px}#arangoQueryManagementTable .table-cell1,#queryManagementContent .table-cell1{word-break:break-all}.queryMethods{padding:10px 10px 5px}.queryMethods input{line-height:0;margin-top:5px}.queryMethods button a{color:#fff}.vars-editor-header{margin-top:-5px;padding-left:5px}.vars-editor-header i{border-radius:2px;color:#666;height:15px;margin-left:5px;padding-left:3px;padding-top:1px;width:15px}.vars-editor-header i:hover{background-color:#8aa051;color:#fff;cursor:pointer}.aql-editor,.vars-editor{border-color:#a0a0a0;border-left:0!important;border-top:1px solid rgba(140,138,137,.25)!important;height:200px;margin-bottom:5px;min-height:100px;min-width:99.8%;width:auto}.aql-editor .ace_error,.aql-editor .ace_info,.vars-editor .ace_error,.vars-editor .ace_info{background:0 0}.queryTH{width:20%!important}.queryTH2{width:75%!important}.query-output{background-color:#fff;border:0;border-top-width:0;height:200px;margin-left:0;margin-right:0;min-height:100px;overflow-y:hidden;width:auto}.query-output .ace_error,.query-output .ace_info{background:0 0}.ace_print-margin{visibility:hidden!important}#documentsTableID_filter,#documentsTableID_length,#documentsTableID_paginate,#documentsTableID_wrapper .fg-toolbar,.jsoneditor .outer .tree>table>tbody>tr:first-of-type{visibility:hidden}.styled-select{float:right;height:30px;overflow:hidden;width:220px}.styled-select select{background:#fff;border:1px solid #c2c2c2!important;border-radius:3px!important;font-size:14px;font-weight:300;height:30px;line-height:1;outline:0;padding:5px;padding-left:5px!important;padding-top:3px!important}.querySizeDiv,.querySizeDiv select{height:30px!important}.query-select,.query-size{line-height:20px!important;z-index:9999!important}.styled-select select:focus{outline:0}.querySizeDiv{margin-right:10px;width:130px!important}.wide-button-div{height:36px;margin-bottom:15px;margin-top:-10px;padding-top:5px;width:100%}.shortcut-div{float:left;margin-top:-5px;padding-left:45px;width:auto}.query-dropdown-left{margin-top:10px;width:100%}.query-dropdown-right{width:100%}.query-dropdown-right textarea{padding:5px 0 0;resize:vertical;width:100%}.query-dropdown-right textarea:focus{border-color:#8aa051;box-shadow:0 0 3px #8aa051;outline:0}.query-modal-select{padding-left:0;width:100%}.output-toolbar{border-color:silver;border-top:0;position:relative;width:auto}.output-toolbar span{float:right;margin-left:5px;margin-right:5px;position:relative;top:2px}.query-select{border:0!important;border-radius:0!important;margin-bottom:0}.query-select option{z-index:9999!important}.query-dropdown{background-color:#d9d9d9;margin-left:0;margin-right:0;padding-left:5px;padding-right:5px}.query-dropdown-in{background-color:#fff;padding:10px}.query-dropdown-in a{color:#686766;font-size:16px;font-weight:bolder;margin-bottom:5px;width:100%}.query-dropdown-in #save-edit-query{margin-left:7px!important}.query-dropdown-in #delete-edit-query{margin-left:0!important}.query-size{border-radius:0!important;width:130px!important}.query-div .arango-table,.query-div .arango-table tbody,.query-div .arango-table tr{max-width:100%;width:100%}#queryContent{margin-top:18px}#queryContent .arango-tab{margin-bottom:5px}#queryContent .arango-tab a{border-bottom-color:#ddd;font-weight:100}#queryContent .arango-tab .active{border-bottom-color:#fff!important}.query-div{min-height:360px}.query-div .ace-tm .ace_comment{color:#8aa051}.query-div .icon_arangodb{cursor:pointer;margin-bottom:5px}.query-div .arango-table{border-top:1px solid rgba(140,138,137,.25);table-layout:fixed}.query-div .arango-table .table-cell0{cursor:pointer;min-width:250px;overflow:hidden;text-overflow:ellipsis!important;white-space:nowrap!important;width:20%}.query-div .arango-table .table-cell1,.query-div .arango-table .table-cell2{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.query-div .arango-table .table-cell1{cursor:pointer;width:73%}.query-div .arango-table .table-cell2{max-width:40px;min-width:40px;width:40px}.queryImport{margin-bottom:10px}.explain-tree,.tab-content{width:100%}.explain-tree .node text{font-size:14px}.explain-tree .link{fill:none;stroke:#ccc;stroke-width:1.5px}.editor-toolbar{border-color:#a0a0a0;height:33px;padding-right:5px}.editor-toolbar span{border-radius:3px;float:right;height:18px;padding:3px 0 6px 10px;position:relative;top:0;width:22px}.editor-toolbar .vars-editor-header i,.editor-toolbar span:hover{background-color:#8aa051;color:#fff}.editor-toolbar a:hover,.editor-toolbar span:hover{cursor:pointer}.editor-toolbar a:hover i,.editor-toolbar span:hover i{color:#fff}.editor-toolbar i:hover{color:#fff;cursor:pointer}.editor-toolbar .fa{color:#666;font-size:15px}.editor-toolbar .fa-comment,.editor-toolbar .fa-comment-o{position:relative;top:-1px}.inputEditorWrapper{border-bottom:3px solid rgba(140,138,137,.25)!important;border-left:1px solid rgba(140,138,137,.25);border-right:1px solid rgba(140,138,137,.25);clear:both;height:300px;min-height:300px;width:100%}.inputEditorWrapper .aqlEditorWrapper{border:0!important;border-right:3px solid rgba(140,138,137,.25)!important;float:left;height:100%!important;max-width:85%;min-width:20%;width:70%}.inputEditorWrapper #arangoMyQueriesTable tr{cursor:copy}.inputEditorWrapper .aqlEditorWrapper,.inputEditorWrapper .bindParamEditorWrapper{overflow:hidden}.inputEditorWrapper .aqlEditorWrapper .stringtype,.inputEditorWrapper .bindParamEditorWrapper .stringtype{color:#ce2f30}.inputEditorWrapper .aqlEditorWrapper .arraytype,.inputEditorWrapper .aqlEditorWrapper .objecttype,.inputEditorWrapper .bindParamEditorWrapper .arraytype,.inputEditorWrapper .bindParamEditorWrapper .objecttype{color:#00f}.inputEditorWrapper .aqlEditorWrapper .numbertype,.inputEditorWrapper .bindParamEditorWrapper .numbertype{color:#044}.inputEditorWrapper .aqlEditorWrapper .booleantype,.inputEditorWrapper .bindParamEditorWrapper .booleantype{color:#c12dad}.inputEditorWrapper .aqlEditorWrapper table,.inputEditorWrapper .bindParamEditorWrapper table{border-top:0;font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace}.inputEditorWrapper .aqlEditorWrapper table tbody,.inputEditorWrapper .bindParamEditorWrapper table tbody{display:block;overflow-y:auto}.inputEditorWrapper .aqlEditorWrapper table .truncate,.inputEditorWrapper .bindParamEditorWrapper table .truncate{opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:30%}.inputEditorWrapper .aqlEditorWrapper table tr.noBgColor,.inputEditorWrapper .bindParamEditorWrapper table tr.noBgColor{background-color:transparent!important}.inputEditorWrapper .aqlEditorWrapper table tr.selected,.inputEditorWrapper .bindParamEditorWrapper table tr.selected{background-color:#8aa051;color:#fff}.inputEditorWrapper .aqlEditorWrapper table tr.selected .spanWrapper,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .spanWrapper{background-color:rgba(255,255,255,.65)}.inputEditorWrapper .aqlEditorWrapper table tr.selected .fa-comments,.inputEditorWrapper .aqlEditorWrapper table tr.selected .fa-copy,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .fa-comments,.inputEditorWrapper .bindParamEditorWrapper table tr.selected .fa-copy{color:#000}.inputEditorWrapper .aqlEditorWrapper table thead,.inputEditorWrapper .bindParamEditorWrapper table thead{display:block}.arangoFrame,.display-none{display:none}.inputEditorWrapper .aqlEditorWrapper table td,.inputEditorWrapper .bindParamEditorWrapper table td{height:33px;padding:0 5px;width:50%}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper{border-radius:3px;cursor:auto;float:right}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper:hover,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper:hover{cursor:auto}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa{cursor:pointer;font-size:18pt;margin-left:5px;margin-right:5px}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa-minus-circle,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa-minus-circle{margin-left:20px}.inputEditorWrapper .aqlEditorWrapper table td .spanWrapper .fa-play-circle-o,.inputEditorWrapper .bindParamEditorWrapper table td .spanWrapper .fa-play-circle-o{color:#8aa051}.inputEditorWrapper .aqlEditorWrapper table td input,.inputEditorWrapper .bindParamEditorWrapper table td input{clear:both;float:right;font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace!important;height:17px;margin-bottom:3px;margin-top:3px;width:auto!important}.inputEditorWrapper .aqlEditorWrapper table th,.inputEditorWrapper .bindParamEditorWrapper table th{font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace;height:34px;padding:0;width:50%}.inputEditorWrapper .aqlEditorWrapper,.inputEditorWrapper .bindParamEditorWrapper{height:100%}.inputEditorWrapper .aqlEditorWrapper .selectError,.inputEditorWrapper .bindParamEditorWrapper .selectError{background:#da4f49}.inputEditorWrapper .aqlEditorWrapper .aceAction,.inputEditorWrapper .bindParamEditorWrapper .aceAction{background-color:#858585;border-radius:3px;color:#fff;cursor:pointer;font-size:13pt;height:23px;line-height:22px;opacity:.8;position:absolute;right:5px;text-align:center;top:5px;width:33px;z-index:10}.inputEditorWrapper .aqlEditorWrapper .aceAction.type,.inputEditorWrapper .bindParamEditorWrapper .aceAction.type{font-size:8pt}.inputEditorWrapper .aqlEditorWrapper .aceAction i,.inputEditorWrapper .bindParamEditorWrapper .aceAction i{margin-bottom:3px}.inputEditorWrapper .aqlEditorWrapper .aceAction:hover,.inputEditorWrapper .bindParamEditorWrapper .aceAction:hover{cursor:pointer;opacity:1}.inputEditorWrapper .aqlEditorWrapper .previewWrapper,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper{background-color:#fff}.inputEditorWrapper .aqlEditorWrapper .previewWrapper .previewBar,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper .previewBar{background-color:#fff;border-bottom:1px solid rgba(140,138,137,.25);font:13px/normal Monaco,Menlo,'Ubuntu Mono',Consolas,source-code-pro,monospace;height:34px}.collectionInfoTh2,.collectionTh,.figuresHeader th{font-family:'Open Sans',sans-serif!important}.inputEditorWrapper .aqlEditorWrapper .previewWrapper .previewBar span,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper .previewBar span{margin-left:5px;padding-top:8px;position:absolute}.inputEditorWrapper .aqlEditorWrapper .previewWrapper #queryPreview,.inputEditorWrapper .aqlEditorWrapper>div,.inputEditorWrapper .bindParamEditorWrapper .previewWrapper #queryPreview,.inputEditorWrapper .bindParamEditorWrapper>div{height:100%}.inputEditorWrapper .ui-resizable-s{cursor:ns-resize}.inputEditorWrapper .ui-resizable-e{cursor:ew-resize}.queryContent{clear:both;margin-top:0;width:100%}.outputEditors{margin-bottom:60px}.outputEditorWrapper{clear:both;height:100px;padding-top:20px;width:100%}.outputEditorWrapper .switchAce{background-color:rgba(0,0,0,.6);border-radius:3px;color:#fff;cursor:pointer;position:relative;right:-24px;top:45px;z-index:10}.outputEditorWrapper .ace_editor{border-left:1px solid rgba(140,138,137,.25);border-right:1px solid rgba(140,138,137,.25);height:280px;width:100%}.outputEditorWrapper .ace_editor .ace_active-line{background:#fff!important}.outputEditorWrapper .sentWrapper .pull-left,.outputEditorWrapper .sentWrapper .pull-right{width:50%}.row{margin:0 0 20px}.innerContent{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;min-height:200px;padding-top:13px}.arangoFrame{background-color:rgba(0,0,0,.5);bottom:0;left:0;position:fixed;right:0;top:0;z-index:77777}.arangoFrame .outerDiv{min-height:100%;padding:20px 40px 40px;z-index:88888}.arangoFrame .innerDiv{z-index:99999}.arangoFrame .fa-times{color:#fff;float:right;font-size:12pt}.arangoFrame .fa-times:hover{color:#c2c2c2;cursor:pointer}.arangoFrame .document-content-div,.arangoFrame .document-info-div{left:40px;position:absolute;right:40px}.arangoFrame .document-content-div{bottom:80px;top:130px}.arangoFrame .document-editor{height:100%}.arangoFrame .bottomButtonBar{left:-1px;position:absolute;right:-1px}.container{margin-left:20px;margin-right:20px;width:auto!important}.arango-tab{border-bottom:1px solid #ddd;margin-left:0;padding-bottom:0;padding-right:10px}.arango-tab a{-moz-border-radius:0;-webkit-border-radius:0;border-radius:3px 3px 0 0;background-color:#8c8a89;border:1px solid transparent;border-bottom-color:#888;color:#fff;display:block;font-size:13px;line-height:20px;margin-right:2px;min-width:50px;padding:2px 15px;text-align:center}.arango-tab li{background-color:transparent;border:0;margin-bottom:-1px;margin-left:2px;position:relative;z-index:900}.arango-tab li.active a{background:#fff;border-bottom-color:#fff!important;border-left-color:#c2c2c2;border-right-color:#c2c2c2;border-top-color:#c2c2c2;color:#000;height:21px;margin-top:-1px}.jsoneditor,.jsoneditor .menu{background-color:#fff!important}.jsoneditor{border:0 solid rgba(0,0,0,.2)!important}.jsoneditor .menu{border-bottom:1px solid #c2c2c2!important;border-left:0!important;border-right:0!important;border-top:0!important}.jsoneditor .menu button{border:0!important}.jsoneditor .menu button:hover{background-color:#8aa051;color:#fff}.jsoneditor .search .frame{border:0!important;margin:3px!important}.jsoneditor .search .frame input{border:1px solid #c2c2c2!important;border-radius:3px;margin-left:5px;margin-right:5px;margin-top:-2px}.jsoneditor .search .results{color:#fff!important;margin-top:3px!important}.document-editor-extra,div.gv-manage-button-container{margin-top:10px}.document-editor{height:500px;margin-bottom:5px;margin-top:-10px;width:100%}.disabledPag,.disabledPag a{cursor:default!important;opacity:.5!important}.pagination-line{background-color:#fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border-top:1px solid rgba(104,103,102,.1);margin:0;padding-top:12px;text-align:center}.pagination-line li a:hover,.pagination-line li.active a,.pagination-line li.active span{background-color:#8f8d8c;color:#fff}.pagination-line li a{background-color:#fff;border:1px solid #fff;font-size:11.9px;line-height:20px;padding:2px 10px;text-decoration:none;border-width:0;min-width:12pt}.pagination-line ul{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;display:inline-block;margin-bottom:0;margin-left:0}.pagination-line li{display:inline-block;margin-left:11px}.pagination-line li span{color:#000;font-size:14px;position:relative;top:2px}.pagination-line li:first-child a,.pagination-line li:first-child span,.pagination-line li:last-child a,.pagination-line li:last-child span{-webkit-box-shadow:0;-moz-box-shadow:0;box-shadow:0;background:#8f8d8c;border:0;color:#000;height:21px;position:relative;width:14px}.pagination-line li.disabled:first-child a,.pagination-line li.disabled:first-child span,.pagination-line li.disabled:last-child a,.pagination-line li.disabled:last-child span{background-color:#777;color:#666;cursor:default;pointer-events:none}.collection-pagination{margin-left:23px!important}.arango-pagination i.fa,.las-pagi i.fa,.pre-pagi i.fa{font-size:19px;position:relative;top:-2px}.arango-pagination li:first-child{margin-right:20px}.arango-pagination li:last-child{margin-left:30px}.pre-pagi{margin-right:-5px!important}.accordion-group{border:0}.accordion-body{height:auto!important}.accordion-heading a{border:1px solid #ccc;color:#000;font-weight:400;width:397px!important}.shell_workspace{margin-top:13px}.shell_workspace ::-webkit-scrollbar{display:none}.replShell{background-color:#fff;float:left;height:100%;min-width:100px;overflow-y:hidden;position:relative;width:100%}.replShell>div{border-radius:3px}.replShell pre{border-bottom:0;border-left:0;border-right:1px solid #a0a0a0;border-top:1px solid #a0a0a0}.jqconsole{background-color:#000;border-radius:0;padding:10px}.jqconsole-header{color:#fff}.jserror{color:#f06;margin-left:-10px}.jssuccess{color:#6f0}.jqconsole-cursor{background-color:grey}.jqconsole-blurred .jqconsole-header .jqconsole-cursor{color:#c4cccc}.jqconsole-prompt{color:#b91}.jqconsole-old-prompt{color:#f60;font-weight:400}.jqconsole-input{color:#dd0}.jqconsole-old-input{color:#bb0;font-weight:400}.jqconsole-output{color:#fff}.query-output .ace_gutter-cell{background-color:#f0f0f0}.centralContent .api-actions{margin:0!important;padding:0}.centralContent .api-actions .container{padding-bottom:10px!important;padding-top:13px!important;margin:0 5px!important}.centralContent .api-actions .resource{border-bottom:0!important;padding-left:5px!important}.centralContent .api-actions .resource .heading>.options{margin:11px 10px 0 0!important}.centralContent .api-actions .resource .heading h2 a{color:#000!important;font-weight:300!important}.centralContent .api-actions .active .heading h2 a{color:#000!important}.centralContent .api-actions .endpoint .operations .content{margin:0!important}.centralContent .api-actions .endpoint .operations .content h4{font-weight:700!important}.centralContent .api-actions .endpoints{margin-right:5px!important}.centralContent .api-actions .endpoints .endpoint:last-child{padding-bottom:5px!important}.centralContent .api-actions input[type=button]{background:#8f8d8c!important;border:none!important;box-shadow:none!important;color:#fff!important;float:right!important;font-size:14px!important;font-weight:300!important;margin-top:10px!important;padding:8px 16px!important}.centralContent .api-actions .endpoint .operations .content,.centralContent .api-actions .endpoint .operations .heading{border-radius:0!important;font-weight:300!important}.centralContent .api-actions .required,.centralContent .api-actions em,.centralContent .api-actions strong,.collectionInfoTh2,.collectionTh,.figuresHeader th{font-weight:400!important}.centralContent .api-actions .http_method,.centralContent .api-actions .toggleOperation{border-radius:0!important}.form-actions{background:0 0;border:0}.form-actions:after,.form-actions:before{display:table;line-height:0}.form-actions:after{clear:both}.swagger-section #swagger-ui-container{margin:.3em 1em!important}.alert{padding:15px 35px 15px 14px}.alert,textarea{border-radius:0!important}.log-content{word-break:break-all;word-wrap:break-word}.log-content-id{margin-top:20px;padding-bottom:0!important}.log-content-id .dataTable{border-collapse:separate;border-spacing:0 5px;table-layout:fixed!important}.log-content-id .arango-tab{border-bottom:0!important}.log-content-id .tab-content{margin-top:1px!important}.tab-content{min-height:390px}.crit-table-id,.debug-table-id,.info-table-id,.log-table-id,.warn-table-id{border-spacing:0 0;font-size:15px!important;margin-top:-5px!important}.crit-table-id thead,.debug-table-id thead,.info-table-id thead,.log-table-id thead,.warn-table-id thead{background-color:#f9f9f9;border-top:6px solid #888!important;text-align:center}.crit-table-id thead tr th,.debug-table-id thead tr th,.info-table-id thead tr th,.log-table-id thead tr th,.warn-table-id thead tr th{background-color:#fff!important;border-bottom:1px solid #c2c2c2;border-top:2px solid #888}.crit-table-id .firstcol,.debug-table-id .firstcol,.info-table-id .firstcol,.log-table-id .firstcol,.warn-table-id .firstcol{cursor:default!important;max-width:80px!important;width:80px!important}.crit-table-id tbody .firstcol,.debug-table-id tbody .firstcol,.info-table-id tbody .firstcol,.log-table-id tbody .firstcol,.warn-table-id tbody .firstcol{background-color:transparent!important}.crit-table-id tbody tr td,.debug-table-id tbody tr td,.info-table-id tbody tr td,.log-table-id tbody tr td,.warn-table-id tbody tr td{padding-bottom:8px!important;padding-top:8px!important}div.gv-colour-list li,div.gv_colour_list li{float:none;padding:2px 6px}.thirdcol{cursor:default!important;max-width:500px!important}.dataTables_empty,.seccol{cursor:default!important;margin-bottom:5px;width:100px!important}.dataTables_info{display:none}#arangoLogTable tbody td:nth-child(1),#arangoLogTable tbody td:nth-child(2){text-align:center;width:80px}#arangoLogTable tbody td:nth-child(3){width:auto}div.gv_zoom_widget{height:300px;left:64px;opacity:.7;position:absolute;top:20px;width:40px;z-index:1}div.gv_zoom_widget div.gv_zoom_buttons_bg{background-image:url(../img/gv_button_bg_reverse.png);background-size:contain;height:40px;margin-bottom:20px}div.gv_zoom_widget div.gv_zoom_slider{background:#f5f8f0;border-radius:3px;height:200px;margin:0 17px;width:4px}div.gv_zoom_widget a.ui-slider-handle{background-color:#555;border:1px solid rgba(140,138,137,.25);height:.5em;left:-.55em;outline:0}div.gv_zoom_widget a.ui-slider-handle.ui-state-hover{outline-color:#fff}.documents-size,.spotlightWrapper .typeahead:focus{outline:transparent 0}div.gv_zoom_widget a.ui-slider-handle:hover{cursor:pointer}div.gv_zoom_widget .ui-state-default{background:#f6f6f6}#menubar{margin:0 0 10px}div.gv_colour_list{max-height:680px;overflow:auto;position:absolute;right:26px;text-align:right;top:20px;z-index:1}div.gv_colour_list li{background-color:transparent}svg.graph-viewer{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;left:54px;position:absolute;top:10px;z-index:0}div.gv-colour-list ul ul,div.gv-colour-list ul ul:first-child,div.gv-colour-list ul ul:last-child{border-left:1px solid rgba(104,103,102,.1);border-right:1px solid rgba(104,103,102,.1)}svg.graph-viewer text{max-width:90px;pointer-events:none}div.gv-background{position:relative}.link>line{stroke-width:1}div.gv-colour-list:hover{opacity:1}div.gv-colour-list{border-radius:3px;max-height:350px;max-width:300px;min-width:190px;opacity:.1;overflow-x:hidden!important;overflow-y:auto;position:absolute;right:8px;text-align:right;top:20px;z-index:1}.arangoDataTable .key,div.gv-colour-list li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.gv-colour-list ul ul:first-child{border-top:1px solid rgba(104,103,102,.1);border-top-left-radius:3px;border-top-right-radius:3px}div.gv-colour-list ul ul:last-child{border-bottom:1px solid rgba(104,103,102,.1);border-bottom-left-radius:3px;border-bottom-right-radius:3px}legend.gv-inner{font-size:16px}input.gv-radio-button{display:block;margin-top:3px;width:auto}.addCollection .accordion,.collectionTh select,.collectionTh textarea{margin-top:10px}.collectionTh{font-size:14px;text-align:left;width:20%!important}.collectionInfoTh{min-width:60px;text-align:left;width:320px}.addCollection table tr{border-bottom:0!important;height:53px}.addCollection .icon_arangodb_info{margin-left:20px!important;position:relative;top:2px!important}.addCollection .collectionThSec{width:320px!important}.addCollection .collectionTh{width:96px}.addCollection .modalInput{width:320px}.addCollection .modalSelect{width:334px}.addCollection .accordion-toggle{width:457px!important}.change-collection .tab-content{min-height:230px}.change-collection input{width:384px!important}.change-collection select{width:398px!important}.show-collection .tab-content{min-height:200px}.collectionInfoTh2{text-align:left;width:150px}.collection-info-figures table{float:left;margin-left:0;margin-right:0;margin-top:0;min-width:200px;padding:3px;text-align:left}.figuresHeader{border-bottom:1px solid #c2c2c2}.document-info .document-bold-font,.document-info .document-thin-font{font-family:droid sans mono,monospace,courier new,courier,sans-serif;font-size:11pt}#collectionIndexTable{margin-left:0;width:100%}#collectionTab,#graphTab,#infoTab{border-bottom:0;margin-bottom:1px;padding-bottom:0;padding-right:10px}#collectionTab li,#graphTab li,#infoTab li{float:right}#collectionTab li.disabled a,#graphTab li.disabled a,#infoTab li.disabled a{cursor:not-allowed}#collectionTab a,#graphTab a,#infoTab a{background-color:#8c8a89;border-bottom:1px solid #666;border-top-left-radius:3px!important;border-top-right-radius:3px!important;color:#fff;font-size:13px!important;height:21px;margin-bottom:-1px;margin-right:4px;padding:2px 15px!important}#collectionTab .active>a,#graphTab .active>a,#infoTab .active>a{background-color:#fff;border-color:#888 #888 transparent!important;color:#000}#confirmCreateEdge{margin-left:20px}.collection-info-figures .icon_arangodb_info{position:relative!important;right:-4px!important}.snippet-wrap .snippet-num li{list-style:decimal-leading-zero}.snippet-no-num{list-style-type:none;padding-left:0}.snippet-no-num .prettify{font-size:1.2em}.snippet-no-num .sh_number{color:#044;font-weight:100;margin-left:5px}.snippet-no-num .sh_symbol{color:#00f;font-weight:100;margin-left:5px}.snippet-no-num .sh_cbracket{color:#c7a317;font-weight:100;margin-left:5px}.snippet-no-num .sh_keyword{color:#c12dad;font-weight:100;margin-left:5px}.snippet-no-num .sh_string{color:#ce2f30;font-weight:100;margin-left:5px}.snippet-no-num .sh_array,.snippet-no-num .sh_object{color:#00f;font-weight:100;margin-left:5px}@media (max-width:738px){.arango-collection-ul{display:none}.collection-dropdown ul{width:auto!important}.arango-collection-select{display:inline-block}}@media (min-width:739px) and (max-width:1041px){.arango-collection-ul a{font-size:11px;padding:7px 5px 10px}}@media (min-width:1042px) and (max-width:1284px){.arango-collection-ul a{font-size:13px}}#documentsDiv{padding-top:1px}.document-info-div{margin-top:20px;min-height:0}.document-content-div{margin-top:10px}.document-info{background-color:#fff;border-radius:3px;margin-bottom:8px;margin-top:-13px;min-height:65px;padding:5px}.document-info .document-info-container{clear:both;width:100%}.document-info .document-info-container .document-inner-info-container{float:left;margin-left:10px;margin-top:5px}.document-info .document-info-container .document-inner-info-container .document-attribute{margin-right:20px}.document-info .document-info-container .document-inner-info-container .document-attribute div{float:left}.document-info .document-bold-font{min-width:55px}.document-info .document-thin-font{color:#8aa051}.document-info .document-type-container div{float:left}.document-info .document-type-container #document-id{margin-left:10px}.document-link:hover{cursor:pointer;text-decoration:underline}.jsoneditor .tree div{font-size:11pt}#progressPlaceholder{background-color:rgba(0,0,0,.4);bottom:0;left:0;position:fixed;right:0;top:0;z-index:9999}.progress-view{background-color:#363c39;border-radius:2px;color:#fff;height:188px;left:50%;margin:-150px 0 0 -125px;position:absolute;top:38%;width:250px}.progress-view .progress-content{border:5px solid #fff;border-radius:3px}.progress-view .progress-content .fa-spinner{font-size:100pt}.progress-view .progress-message{background-color:#fff;border-radius:0 0 2px 2px;color:#fff;font-weight:200;height:44px;margin-top:-25px;padding-top:3px;text-align:center}.progress-view .progress-text{background:#fff;color:#000;float:left;font-weight:100;height:25px;left:-5px;margin-left:5px;margin-top:10px;position:relative;top:-10px;width:100%}.progress-view .progress-action{float:right;margin-right:5px;margin-top:5px}#progressPlaceholderIcon{color:#8aa051;float:left;font-size:22px;margin-left:10px;margin-top:7px}.pong-spinner{height:100px;margin:50px auto;position:relative;width:200px}.pong-spinner i{animation:ball 2s infinite linear;background:#8cdb8b;border-radius:10px;height:10px;position:absolute;width:10px}.pong-spinner:after,.pong-spinner:before{animation:left-player 2s infinite linear;background:#8cdb8b;height:30px;position:absolute;width:5px}.pong-spinner:after{animation:right-player 2s infinite linear;right:0}@keyframes left-player{0%,100%{top:0}50%{top:70px}}@keyframes right-player{0%,100%{top:70px}50%{top:0}}@keyframes ball{0%,100%{left:5px;top:20px}25%,75%{left:190px;top:50px}50%{left:5px;top:80px}}#spotlightPlaceholder{background-color:rgba(0,0,0,.25);bottom:0;left:0;position:fixed;right:0;top:0;z-index:2000}.spotlightWrapper{height:50px;left:25%;position:absolute;top:115px;width:50%}.spotlightWrapper .twitter-typeahead{width:100%}.spotlightWrapper .tt-highlight{color:#5bc0de;font-weight:400}.spotlightWrapper input{box-sizing:border-box;height:40px!important}.spotlightWrapper .tt-dataset{clear:both}.spotlightWrapper .tt-menu{background:#3d4246;border-radius:3px;color:#fff;width:100%}.spotlightWrapper .tt-menu .header-type{background:#32373b;clear:both;color:#fff;height:30px;padding-left:5px}.spotlightWrapper .tt-menu .header-type h4{float:left;margin:4px 0 0;padding:0}.spotlightWrapper .tt-menu .header-type .fa{font-size:12pt;margin-left:6px;margin-top:6px}.spotlightWrapper .tt-menu .header-type .type{background-color:#5bc0de;border-radius:3px;float:right;margin:4px;padding:0 5px}.spotlightWrapper .tt-menu .tt-cursor{background-color:#fff;color:#000}.spotlightWrapper .tt-menu .tt-selectable{padding-left:10px}.spotlightWrapper .typeahead{background:#3d4246;border:0 solid #3d4246;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;font-size:22px;height:30px;line-height:30px;outline:transparent 0;padding:8px 12px;width:100%}.application-detail-view section.info{float:left;padding:13px 0 0}.application-detail-view section.info .header{height:200px;margin-bottom:0;position:relative}.application-detail-view section.info .header div.header-icon-container{border-radius:3px;height:182px;left:0;margin:0 0 4px;position:absolute;width:182px}.application-detail-view section.info .header div.header-icon-container img.icon{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;height:auto;max-height:160px;max-width:160px;padding:10px;width:auto}.application-detail-view section.info .header .header_right{padding-top:1px;position:absolute;right:-10px;width:150px}.application-detail-view section.info .header .header_right input.delete,.application-detail-view section.info .header .header_right input.switch-docu,.application-detail-view section.info .header .header_right input.switch-mode,.application-detail-view section.info .header .header_right input.upgrade{margin-top:7.83px;padding-left:10px;padding-right:10px}.application-detail-view section.info .header .header_right input{width:130px}.application-detail-view section.info .header .header_left{margin-left:190px;margin-right:145px;padding-left:10px;padding-top:1px}.application-detail-view section.info .header .header_left input{margin-left:0;margin-top:-4px}.application-detail-view section.info .header .header_left .header_line h3{float:left;margin-bottom:0;margin-top:0;padding-right:5px}.application-detail-view section.info .header .header_left .header_line .license,.application-detail-view section.info .header .header_left .header_line .version{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;border:1px solid rgba(140,138,137,.25);color:#a0a0a0;font-size:.6em;font-weight:400;padding:0 8px 2px;position:relative;top:-3px}.application-detail-view section.info .header .header_left .header_line:after{clear:both;content:'';display:table}.application-detail-view section.info .header .app-warning{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#da4f49;color:#fff;padding:6px 8px}.application-detail-view section.info .header .app-warning h4,.application-detail-view section.info .header .app-warning p{font-size:1em;margin:0}.application-detail-view aside.meta{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;clear:right;float:left;height:182px;margin-top:12px;max-height:182px;max-width:182px;overflow-x:hidden;position:relative;right:-16px;width:182px}.application-detail-view aside.meta dl{margin-bottom:0;margin-top:0;padding-left:7px;padding-top:5px}main{background-color:#fff;border:1px solid rgba(140,138,137,.25);border-radius:3px;margin-top:220px}main .app-info{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#5bc0de;color:#fff;margin:10px;padding:6px 8px}main .app-info h4,main .app-info p{font-size:1em;margin:0}main .swagger iframe{border:0;border-radius:3px;height:600px;width:100%}main .readme{background:#fff;padding:1em 2em}.tests-result .stack{border-color:#da4f49;color:#da4f49;font-size:12px;line-height:1.5;margin:5px 0}.tests-result-stats .fail,.tests-result-stats .pass,.tests-result-stats .pending{padding:0 2px}.tests-result-spec{margin-bottom:0}.tests-result-spec-suites .tests-result-spec-suites{margin-left:20px}.tests-result-spec-suites dd{margin-bottom:20px;margin-left:0}.tests-result-spec-tests{margin-left:20px}.tests-result-spec-test-title{padding-left:20px}.tests-result-spec-test-title .fa{line-height:18px;margin-left:-20px;margin-top:2px;position:absolute}.tests-result-spec-test-title .fa-circle{font-size:50%;margin-left:-16px}.tests-result .pass{color:#8aa051}.tests-result .fail{color:#da4f49}.tests-result .pending{color:#666}.hotkeysList .hotkeysLabel{clear:both;color:#000;font-size:16px;font-weight:400}.hotkeysList .hotkeysContent{padding-left:10px}.hotkeysList li{line-height:25px}.hotkeysList li .hotkeysDiv{float:left}.hotkeysList .hotkeysicons{background-color:#686766;border:1px solid #000;border-radius:2px;color:#fff;display:inline;height:19px;margin-left:10px;text-align:center;width:19px}.arango-table tbody tr:nth-child(even),.arango-table thead{background-color:#fff}.hotkeysContentLabel{float:left;width:30%}.arango-table{border-top:1px solid #c2c2c2;width:100%}.arango-table thead th{border-bottom:1px solid #c2c2c2;height:43px}.arango-table tbody tr:nth-child(odd){background:rgba(104,103,102,.05)}.arango-table tbody td{padding:10px 18px}.arango-tabbar{height:27px;width:100%}.arango-tabbar button{background-color:#8c8a89;border:0;border-top-left-radius:3px;border-top-right-radius:3px;color:#fff;float:right;font-weight:100;height:27px;margin-right:5px;width:82px}.arango-tabbar button:first-child{margin-right:10px}.arango-tabbar .arango-active-tab{background-color:#fff;border-bottom:1px solid #fff;border-left:1px solid #c2c2c2;border-right:1px solid #c2c2c2;border-top:1px solid #c2c2c2;color:#000;height:28px;margin-bottom:-1px}.arangoDataTable{border-spacing:0 0;position:relative;table-layout:fixed!important;width:100%!important}.arangoDataTable thead{background-color:#fff!important;font-weight:400!important;text-align:left}.arangoDataTable thead th{border-bottom:0;cursor:default!important;font-weight:400!important;padding:10px 14px!important}.arangoDataTable thead tr{border-bottom:1px solid #c2c2c2}.arangoDataTable tr{cursor:pointer}.arangoDataTable td{padding:8px 18px!important}.arangoDataTable .key{font-weight:100;margin-top:4px}.arangoDataTable .dataTable .noPointer tr{cursor:default}.arangoDataTable .selected-row{background-color:#8aa051!important}.arangoDataTable .selected-row div,.arangoDataTable .selected-row li,.arangoDataTable .selected-row span{color:#fff!important}.api-container #resources>li.resource:nth-child(even),table.arangoDataTable tr.even{background-color:#fff}.api-container #resources>li.resource:nth-child(odd),table.arangoDataTable tr.odd{background-color:rgba(104,103,102,.05)}#tableDiv table.dataTable td{padding:12px 18px!important}#documentsTableID_filter,#documentsTableID_length{display:none}#documentsTableID_wrapper{min-height:467px!important;padding-bottom:0!important}.snippet-no-num{font-family:'Open Sans',sans-serif;font-size:1em;font-weight:400;margin-bottom:0}.cuttedContent,.prettify ul li,.writeable a{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.totalDocuments{color:#666;float:left;font-weight:100;margin-top:-37px!important;padding-left:10px}.prettify{border:none!important;font-size:1em!important;margin:0!important;padding:0!important}.edit-index-table tfoot,.newIndexClass table{border-top:1px solid #f7f3f2}table .sorting{background:0 0!important}#documentsDiv{margin-top:20px}.new-index-view input[type=checkbox]{float:left}.new-index-view table tr{width:600px!important}.new-index-view table tr th:last-child{width:50px!important}.new-index-view table th{font-weight:300!important;width:200px!important}.edit-index-table{margin-top:5px;min-width:auto!important}.edit-index-table th{padding-bottom:5px;padding-left:5px;padding-top:5px}.edit-index-table .icon_arangodb_locked{color:rgba(0,0,0,.5);cursor:default;font-size:20px;margin-left:10px}.index-button-bar i:hover,.queryline .fa-info-circle:hover{cursor:pointer}.edit-index-table .icon_arangodb_roundminus{font-size:20px;margin-left:10px}.edit-index-table tfoot i{color:#8aa051;font-size:19px;margin-left:16px;margin-top:5px}.edit-index-table tfoot i:hover{color:#788f3d;cursor:pointer}.contentIn .arangoicon{font-size:25px;position:relative;top:-3px!important}#collectionEditIndexTable thead{border-bottom:1px solid #e5e5e5}.newIndexClass table{margin-bottom:60px}.newIndexClass table select{margin-right:7px}.newIndexClass table .arangoicon{float:right;margin-right:-12px;margin-top:5px}.index-button-bar{float:right}.index-button-bar i{color:#8aa051;font-size:16pt;margin-right:43px}.index-button-bar #cancelIndex{margin-right:13px}.docsFirstCol,.docsSecCol,.docsThirdCol{border:0!important}.docsFirstCol{height:26px;width:80%}.docsSecCol{height:26px;min-width:400px!important;width:10%}.docsThirdCol{height:26px}.add-filter-item{margin-left:5px}.add-filter-item i{margin-top:0!important}.upload-indicator{display:none;margin-top:-3px;padding-right:10px}.documentsDropdown .dropdownImport,.documentsDropdown .headerDropdown{clear:both;margin-bottom:5px}.documents-size{background-color:#fff!important;border:1px solid #e5e5e5;border-radius:2px;box-shadow:none;float:right;height:28px;line-height:18px;margin-left:10px;margin-right:-2px;margin-top:0;width:115px}.ace_error{background:0 0!important}#exportHeader .fa-exclamation-circle{color:#fff;font-size:13pt;margin-right:10px}.totalDocuments:hover{color:#000}.ajax-file-upload-statusbar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid rgba(0,0,0,.7);margin:10px 10px 5px 5px;padding:5px;width:420px}.ajax-file-upload-filename{color:grey;height:auto;margin:0 5px 5px 10px;width:100%}.ajax-file-upload-progress{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #d9d9d9;display:inline-block;margin:0 10px 5px;padding:1px;position:relative;width:250px}.ajax-file-upload-bar{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;background-color:rgba(0,0,0,.7);color:#fff;height:20px;width:0}.ajax-file-upload-percent{display:inline-block;left:48%;position:absolute;top:3px}.ajax-file-upload-red{font-size:13px;font-weight:400;margin-right:5px;padding:4px 15px;vertical-align:top}.ajax-file-upload{display:inline-block;font-size:16px;font-weight:700;height:25px;margin:0 10px 10px 0;padding:6px 10px 4px}.ajax-upload-dragdrop{border:1px dotted #8f8d8c;color:#736b68;padding:10px 10px 0;text-align:left;vertical-align:middle;width:506px}.ajax-upload-dragdrop span{position:relative;top:-22px}/*! Animate.css - http://daneden.me/animate Licensed under the MIT license - http://opensource.org/licenses/MIT diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css.gz index 30b6cc78c3..21a5743584 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/style-minified.css.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/style.css b/js/apps/system/_admin/aardvark/APP/frontend/build/style.css index 1f2a312abf..0111e0dbb1 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/style.css +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/style.css @@ -68,7 +68,7 @@ textarea, .fa { display: inline-block; - font: normal normal normal 14px/1 FontAwesome; + font: normal normal normal 14px / 1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; @@ -113,7 +113,7 @@ textarea, left: -1.8571428571em; } .fa-border { - padding: 0.2em 0.25em 0.15em; + padding: .2em .25em .15em; border: solid 0.08em #eee; border-radius: .1em; } @@ -2154,11 +2154,14 @@ textarea, background-color: #f87c0f; } [class^='button-']:disabled, -button.disabled, .button-inactive { +button.disabled, +[class*=' button-']:disabled, .button-inactive { background-color: #d3d3d3; } [class^='button-']:hover:disabled, - button.disabled:hover, .button-inactive:hover, [class^='button-']:focus:disabled, - button.disabled:focus, .button-inactive:focus { + button.disabled:hover, + [class*=' button-']:hover:disabled, .button-inactive:hover, [class^='button-']:focus:disabled, + button.disabled:focus, + [class*=' button-']:focus:disabled, .button-inactive:focus { background-color: #d3d3d3; } a.headerButton.disabled { @@ -5675,11 +5678,11 @@ div.headerBar { .fade { opacity: 0; - -moz-transition: opacity 0.03s linear; - -ms-transition: opacity 0.03s linear; - -o-transition: opacity 0.03s linear; - -webkit-transition: opacity 0.03s linear; - transition: opacity 0.03s linear; } + -moz-transition: opacity .03s linear; + -ms-transition: opacity .03s linear; + -o-transition: opacity .03s linear; + -webkit-transition: opacity .03s linear; + transition: opacity .03s linear; } .modal { border: 0 !important; @@ -6958,7 +6961,7 @@ toolbar { z-index: 77777; } .arangoFrame .outerDiv { min-height: 100%; - padding: 40px; + padding: 20px 40px 40px; z-index: 88888; } .arangoFrame .innerDiv { z-index: 99999; } @@ -6969,6 +6972,20 @@ toolbar { .arangoFrame .fa-times:hover { color: #c2c2c2; cursor: pointer; } + .arangoFrame .document-info-div, + .arangoFrame .document-content-div { + left: 40px; + position: absolute; + right: 40px; } + .arangoFrame .document-content-div { + bottom: 80px; + top: 130px; } + .arangoFrame .document-editor { + height: 100%; } + .arangoFrame .bottomButtonBar { + left: -1px; + position: absolute; + right: -1px; } .container { margin-left: 20px; @@ -7275,7 +7292,7 @@ toolbar { clear: both; } .swagger-section #swagger-ui-container { - margin: 0.3em 1em !important; } + margin: .3em 1em !important; } .alert { padding: 15px 35px 15px 14px; } diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/style.css.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/style.css.gz index f1fa59de97..b137c573be 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/style.css.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/style.css.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/scss/_general.scss b/js/apps/system/_admin/aardvark/APP/frontend/scss/_general.scss index b1753d0a6c..b564569a80 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/scss/_general.scss +++ b/js/apps/system/_admin/aardvark/APP/frontend/scss/_general.scss @@ -29,7 +29,7 @@ .outerDiv { min-height: 100%; - padding: 40px; + padding: 20px 40px 40px; z-index: 88888; } @@ -47,6 +47,29 @@ color: $c-c2grey; cursor: pointer; } + + .document-info-div, + .document-content-div { + left: 40px; + position: absolute; + right: 40px; + } + + .document-content-div { + bottom: 80px; + top: 130px; + } + + .document-editor { + height: 100%; + } + + .bottomButtonBar { + left: -1px; + position: absolute; + right: -1px; + } + } //still in use??? diff --git a/js/client/bootstrap/modules/internal.js b/js/client/bootstrap/modules/internal.js index 91779653fd..5bd8ce8f60 100644 --- a/js/client/bootstrap/modules/internal.js +++ b/js/client/bootstrap/modules/internal.js @@ -31,7 +31,6 @@ /// @author Copyright 2010-2013, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// - var exports = require('internal'); //////////////////////////////////////////////////////////////////////////////// @@ -47,7 +46,6 @@ if (global.SYS_ARANGO) { delete global.SYS_ARANGO; } - //////////////////////////////////////////////////////////////////////////////// /// @brief write-ahead log functionality //////////////////////////////////////////////////////////////////////////////// diff --git a/js/client/modules/@arangodb/testing.js b/js/client/modules/@arangodb/testing.js index af6e603ecd..20c6acae26 100644 --- a/js/client/modules/@arangodb/testing.js +++ b/js/client/modules/@arangodb/testing.js @@ -98,8 +98,9 @@ const optionsDocumentation = [ ' - `cleanup`: if set to true (the default), the cluster data files', ' and logs are removed after termination of the test.', '', - ' - benchargs : additional commandline arguments to arangob', + ' - `benchargs`: additional commandline arguments to arangob', '', + ' - `build`: the directory containing the binaries', '', ' - `sanitizer`: if set the programs are run with enabled sanitizer', ' and need longer tomeouts', @@ -119,6 +120,7 @@ const optionsDocumentation = [ ]; const optionsDefaults = { + "build": "", "cleanup": true, "cluster": false, "clusterNodes": 2, @@ -190,26 +192,20 @@ const TOP_DIR = (function findTopDir() { return topDir; }()); -const BIN_DIR = (fs.exists("build") && fs.exists(fs.join("build", "bin"))) ? - fs.join(TOP_DIR, "build", "bin") : - fs.join(TOP_DIR, "bin"); - -const CONFIG_DIR = (fs.exists("build") && fs.exists(fs.join("build", "etc"))) ? - fs.join(TOP_DIR, "build", "etc", "arangodb") : - fs.join(TOP_DIR, "etc", "arangodb"); - -const ARANGOB_BIN = fs.join(BIN_DIR, "arangob"); -const ARANGODUMP_BIN = fs.join(BIN_DIR, "arangodump"); -const ARANGOD_BIN = fs.join(BIN_DIR, "arangod"); -const ARANGOIMP_BIN = fs.join(BIN_DIR, "arangoimp"); -const ARANGORESTORE_BIN = fs.join(BIN_DIR, "arangorestore"); -const ARANGOSH_BIN = fs.join(BIN_DIR, "arangosh"); -const CONFIG_RELATIVE_DIR = fs.join(TOP_DIR, "etc", "relative"); -const ETCD_ARANGO_BIN = fs.join(BIN_DIR, "etcd-arango"); -const JS_DIR = fs.join(TOP_DIR, "js"); -const LOGS_DIR = fs.join(TOP_DIR, "logs"); -const PEM_FILE = fs.join(TOP_DIR, "UnitTests", "server.pem"); -const UNITTESTS_DIR = fs.join(TOP_DIR, fs.join("build", "tests")); +let BIN_DIR; +let CONFIG_DIR; +let ARANGOB_BIN; +let ARANGODUMP_BIN; +let ARANGOD_BIN; +let ARANGOIMP_BIN; +let ARANGORESTORE_BIN; +let ARANGOSH_BIN; +let CONFIG_RELATIVE_DIR; +let ETCD_ARANGO_BIN; +let JS_DIR; +let LOGS_DIR; +let PEM_FILE; +let UNITTESTS_DIR; function makeResults(testname) { const startTime = time(); @@ -291,7 +287,7 @@ function makeArgsArangosh(options) { "javascript.startup-directory": JS_DIR, "server.username": options.username, "server.password": options.password, - "flatCommands": ["--no-colors", "--quiet"] + "flatCommands": ["--console.colors", "false", "--quiet"] }; } @@ -976,7 +972,11 @@ function runStressTest(options, command, testname) { /// @brief executes a command and wait for result //////////////////////////////////////////////////////////////////////////////// -function executeAndWait(cmd, args) { +function executeAndWait(cmd, args, options) { + if (options.extremeVerbosity) { + print("executeAndWait: cmd =", cmd, "args =", args); + } + const startTime = time(); const res = executeExternalAndWait(cmd, args); const deltaTime = time() - startTime; @@ -1052,7 +1052,7 @@ function runInArangosh(options, instanceInfo, file, addArgs) { args = _.extend(args, addArgs); } - let rc = executeAndWait(ARANGOSH_BIN, toArgv(args)); + let rc = executeAndWait(ARANGOSH_BIN, toArgv(args), options); let result; @@ -1083,7 +1083,7 @@ function runArangoshCmd(options, instanceInfo, addArgs, cmds) { } const argv = toArgv(args).concat(cmds); - return executeAndWait(ARANGOSH_BIN, argv); + return executeAndWait(ARANGOSH_BIN, argv, options); } //////////////////////////////////////////////////////////////////////////////// @@ -1112,7 +1112,7 @@ function runArangoImp(options, instanceInfo, what) { args["separator"] = what.separator; } - return executeAndWait(ARANGOIMP_BIN, toArgv(args)); + return executeAndWait(ARANGOIMP_BIN, toArgv(args), options); } //////////////////////////////////////////////////////////////////////////////// @@ -1139,7 +1139,7 @@ function runArangoDumpRestore(options, instanceInfo, which, database) { exe = ARANGORESTORE_BIN; } - return executeAndWait(exe, toArgv(args)); + return executeAndWait(exe, toArgv(args), options); } //////////////////////////////////////////////////////////////////////////////// @@ -1153,7 +1153,7 @@ function runArangoBenchmark(options, instanceInfo, cmds) { "server.password": options.password, "server.endpoint": instanceInfo.endpoint, // "server.request-timeout": 1200 // default now. - "server.connect-timeout": 10 // 5s default + "server.connection-timeout": 10 // 5s default }; args = _.extend(args, cmds); @@ -1162,7 +1162,7 @@ function runArangoBenchmark(options, instanceInfo, cmds) { args.quiet = true; } - return executeAndWait(ARANGOB_BIN, toArgv(args)); + return executeAndWait(ARANGOB_BIN, toArgv(args), options); } //////////////////////////////////////////////////////////////////////////////// @@ -1561,13 +1561,13 @@ function startInstanceAgency(instanceInfo, protocol, options, instanceInfo.ports = ports; const endpoints = ports.map(function(port) { - return protocol + "://127.0.0.1:" + port; - }); + return protocol + "://127.0.0.1:" + port; + }); instanceInfo.endpoints = endpoints; let td = ports.map(function(port) { - return fs.join(tmpDataDir, "data" + port); - }); + return fs.join(tmpDataDir, "data" + port); + }); for (let i = 0; i < N; i++) { fs.makeDirectoryRecursive(td[i]); } @@ -1590,8 +1590,8 @@ function startInstanceAgency(instanceInfo, protocol, options, if (addArgs !== undefined) { args = _.extend(args, addArgs); } - - if (i === N-1) { + + if (i === N - 1) { let l = []; for (let j = 0; j < N; j++) { l.push("--agency.endpoint"); @@ -1856,7 +1856,7 @@ function rubyTests(options, ssl) { print("\n" + Date() + " rspec trying", te, "..."); - const res = executeAndWait(command, args); + const res = executeAndWait(command, args, options); result[te] = { total: 0, @@ -2198,90 +2198,90 @@ testFuncs.arangosh = function(options) { const benchTodos = [{ "requests": "10000", "concurrency": "2", - "test": "version", + "test-case": "version", "keep-alive": "false" }, { "requests": "10000", "concurrency": "2", - "test": "version", + "test-case": "version", "async": "true" }, { "requests": "20000", "concurrency": "1", - "test": "version", + "test-case": "version", "async": "true" }, { "requests": "100000", "concurrency": "2", - "test": "shapes", + "test-case": "shapes", "batch-size": "16", "complexity": "2" }, { "requests": "100000", "concurrency": "2", - "test": "shapes-append", + "test-case": "shapes-append", "batch-size": "16", "complexity": "4" }, { "requests": "100000", "concurrency": "2", - "test": "random-shapes", + "test-case": "random-shapes", "batch-size": "16", "complexity": "2" }, { "requests": "1000", "concurrency": "2", - "test": "version", + "test-case": "version", "batch-size": "16" }, { "requests": "100", "concurrency": "1", - "test": "version", + "test-case": "version", "batch-size": "0" }, { "requests": "100", "concurrency": "2", - "test": "document", + "test-case": "document", "batch-size": "10", "complexity": "1" }, { "requests": "2000", "concurrency": "2", - "test": "crud", + "test-case": "crud", "complexity": "1" }, { "requests": "4000", "concurrency": "2", - "test": "crud-append", + "test-case": "crud-append", "complexity": "4" }, { "requests": "4000", "concurrency": "2", - "test": "edge", + "test-case": "edge", "complexity": "4" }, { "requests": "5000", "concurrency": "2", - "test": "hash", + "test-case": "hash", "complexity": "1" }, { "requests": "5000", "concurrency": "2", - "test": "skiplist", + "test-case": "skiplist", "complexity": "1" }, { "requests": "500", "concurrency": "3", - "test": "aqltrx", + "test-case": "aqltrx", "complexity": "1" }, { "requests": "100", "concurrency": "3", - "test": "counttrx" + "test-case": "counttrx" }, { "requests": "500", "concurrency": "3", - "test": "multitrx" + "test-case": "multitrx" }]; testFuncs.arangob = function(options) { @@ -2601,9 +2601,9 @@ testFuncs.boost = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, "basics", run); const newargs = valgrindArgs.concat(args); - results.basics = executeAndWait(options.valgrind, newargs); + results.basics = executeAndWait(options.valgrind, newargs, options); } else { - results.basics = executeAndWait(run, args); + results.basics = executeAndWait(run, args, options); } } @@ -2614,9 +2614,9 @@ testFuncs.boost = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, "geo_suite", run); const newargs = valgrindArgs.concat(args); - results.geo_suite = executeAndWait(options.valgrind, newargs); + results.geo_suite = executeAndWait(options.valgrind, newargs, options); } else { - results.geo_suite = executeAndWait(run, args); + results.geo_suite = executeAndWait(run, args, options); } } @@ -2674,9 +2674,9 @@ testFuncs.config = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, test, run); const newargs = valgrindArgs.concat(toArgv(args)); - results.absolut[test] = executeAndWait(options.valgrind, newargs); + results.absolut[test] = executeAndWait(options.valgrind, newargs, options); } else { - results.absolut[test] = executeAndWait(run, toArgv(args)); + results.absolut[test] = executeAndWait(run, toArgv(args), options); } if (!results.absolut[test].status) { @@ -2708,13 +2708,13 @@ testFuncs.config = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, test, run); const newargs = valgrindArgs.concat(toArgv(args)); - results.relative[test] = executeAndWait(options.valgrind, newargs); + results.relative[test] = executeAndWait(options.valgrind, newargs, options); } else { - results.relative[test] = executeAndWait(run, toArgv(args)); + results.relative[test] = executeAndWait(run, toArgv(args), options); } results.relative[test] = executeAndWait(fs.join(BIN_DIR, test), - toArgv(args)); + toArgv(args), options); if (!results.relative[test].status) { results.relative.status = false; @@ -2744,9 +2744,9 @@ testFuncs.dfdb = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, "dfdb", ARANGOD_BIN); const newargs = valgrindArgs.concat(args); - results.dfdb = executeAndWait(options.valgrind, newargs); + results.dfdb = executeAndWait(options.valgrind, newargs, options); } else { - results.dfdb = executeAndWait(ARANGOD_BIN, args); + results.dfdb = executeAndWait(ARANGOD_BIN, args, options); } return results; @@ -2853,13 +2853,17 @@ testFuncs.dump_authentication = function(options) { print("dump_authentication tests..."); - const auth = { + const auth1 = { "server.disable-authentication": "false" }; - print(JSON.stringify(auth)); + const auth2 = { + "server.authentication": "true" + }; - let instanceInfo = startInstance("tcp", options, auth, "dump_authentication"); + print(JSON.stringify(auth1)); + + let instanceInfo = startInstance("tcp", options, auth1, "dump_authentication"); if (instanceInfo === false) { return { @@ -2875,7 +2879,7 @@ testFuncs.dump_authentication = function(options) { let results = {}; results.setup = runInArangosh(options, instanceInfo, makePathUnix("js/server/tests/dump/dump-authentication-setup.js"), - auth); + auth2); if (checkInstanceAlive(instanceInfo, options) && (results.setup.status === true)) { @@ -2912,7 +2916,7 @@ testFuncs.dump_authentication = function(options) { print(Date() + ": Dump and Restore - teardown"); results.tearDown = runInArangosh(options, instanceInfo, - makePathUnix("js/server/tests/dump/dump-teardown.js"), auth); + makePathUnix("js/server/tests/dump/dump-teardown.js"), auth2); } } } @@ -3198,7 +3202,7 @@ function runArangodRecovery(instanceInfo, options, script, setup) { fs.join(".", "js", "server", "tests", "recovery", script + ".js") ]); - instanceInfo.pid = executeAndWait(ARANGOD_BIN, argv); + instanceInfo.pid = executeAndWait(ARANGOD_BIN, argv, options); } const recoveryTests = [ @@ -3793,9 +3797,9 @@ testFuncs.upgrade = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, "upgrade", ARANGOD_BIN); const newargs = valgrindArgs.concat(argv); - result.upgrade.first = executeAndWait(options.valgrind, newargs); + result.upgrade.first = executeAndWait(options.valgrind, newargs, options); } else { - result.upgrade.first = executeAndWait(ARANGOD_BIN, argv); + result.upgrade.first = executeAndWait(ARANGOD_BIN, argv, options); } if (result.upgrade.first !== 0 && !options.force) { @@ -3809,9 +3813,9 @@ testFuncs.upgrade = function(options) { const valgrindArgs = valgrindArgsSingleServer(options, "upgrade", ARANGOD_BIN); const newargs = valgrindArgs.concat(argv); - result.upgrade.second = executeAndWait(options.valgrind, newargs); + result.upgrade.second = executeAndWait(options.valgrind, newargs, options); } else { - result.upgrade.second = executeAndWait(ARANGOD_BIN, argv); + result.upgrade.second = executeAndWait(ARANGOD_BIN, argv, options); } cleanupDirectories.push(tmpDataDir); @@ -4143,6 +4147,37 @@ function unitTest(cases, options) { }; } + let builddir = options.build; + + if (builddir === "") { + if (fs.exists("build") && fs.exists(fs.join("build", "bin"))) { + builddir = "build"; + } else if (fs.exists("bin")) { + builddir = "."; + } else { + print('FATAL: cannot find binaries, use "--build"\n'); + + return { + status: false + }; + } + } + + BIN_DIR = fs.join(TOP_DIR, builddir, "bin"); + CONFIG_DIR = fs.join(TOP_DIR, builddir, "etc", "arangodb"); + ARANGOB_BIN = fs.join(BIN_DIR, "arangob"); + ARANGODUMP_BIN = fs.join(BIN_DIR, "arangodump"); + ARANGOD_BIN = fs.join(BIN_DIR, "arangod"); + ARANGOIMP_BIN = fs.join(BIN_DIR, "arangoimp"); + ARANGORESTORE_BIN = fs.join(BIN_DIR, "arangorestore"); + ARANGOSH_BIN = fs.join(BIN_DIR, "arangosh"); + CONFIG_RELATIVE_DIR = fs.join(TOP_DIR, "etc", "relative"); + ETCD_ARANGO_BIN = fs.join(BIN_DIR, "etcd-arango"); + JS_DIR = fs.join(TOP_DIR, "js"); + LOGS_DIR = fs.join(TOP_DIR, "logs"); + PEM_FILE = fs.join(TOP_DIR, "UnitTests", "server.pem"); + UNITTESTS_DIR = fs.join(TOP_DIR, fs.join(builddir, "tests")); + const jsonReply = options.jsonReply; delete options.jsonReply; diff --git a/js/client/tests/shell/shell-require-canceled.js b/js/client/tests/shell/shell-require-canceled.js index a3041c8280..6affec65fa 100644 --- a/js/client/tests/shell/shell-require-canceled.js +++ b/js/client/tests/shell/shell-require-canceled.js @@ -30,69 +30,62 @@ var jsunity = require('jsunity'); - //////////////////////////////////////////////////////////////////////////////// /// @brief test suite for 'require-canceled' //////////////////////////////////////////////////////////////////////////////// -function RequireCanceledTestSuite () { +function RequireCanceledTestSuite() { 'use strict'; return { - setUp() { - arango.POST_RAW("/_admin/execute", - "require('module').globalPaths.unshift(require('path').resolve('./js/common/test-data/modules'));", - {'x-arango-v8-context': 0}); - }, + arango.POST_RAW("/_admin/execute", + "require('module').globalPaths.unshift(require('path').resolve('./js/common/test-data/modules'));", { + 'x-arango-v8-context': 0 + }); + }, -//////////////////////////////////////////////////////////////////////////////// -/// @brief tear down -//////////////////////////////////////////////////////////////////////////////// + tearDown() { + arango.POST_RAW("/_admin/execute", + "require('module').globalPaths.splice(0,1);", { + 'x-arango-v8-context': 0 + }); + }, - tearDown() { - arango.POST_RAW("/_admin/execute", - "require('module').globalPaths.splice(0,1);", - {'x-arango-v8-context': 0}); - }, + testRequireJson() { + var internal = require("internal"); + var a = arango.POST_RAW("/_admin/execute", + 'return Object.keys(require("a"));', { + 'x-arango-async': "store", + 'x-arango-v8-context': 0 + }); -//////////////////////////////////////////////////////////////////////////////// -/// @brief test requiring JSON -//////////////////////////////////////////////////////////////////////////////// + internal.sleep(3); - testRequireJson() { - var internal = require("internal"); - var a = arango.POST_RAW("/_admin/execute", - 'return Object.keys(require("a"));', - {'x-arango-async': "store", 'x-arango-v8-context': 0}); - internal.sleep(3); + var id = a.headers['x-arango-async-id']; + arango.PUT_RAW("/_api/job/" + id + "/cancel", ''); - var id = a.headers['x-arango-async-id']; - arango.PUT_RAW("/_api/job/" + id + "/cancel", ''); + var c = arango.POST_RAW("/_admin/execute?returnAsJSON=true", + 'return Object.keys(require("a"));', { + 'x-arango-async': "false", + 'x-arango-v8-context': 0 + }); - var c = arango.POST_RAW("/_admin/execute?returnAsJSON=true", - 'return Object.keys(require("a"));', - {'x-arango-async': "false", 'x-arango-v8-context': 0}); - var d; + var d; - try { - d = JSON.parse(c.body); + try { + d = JSON.parse(c.body); + } catch (err) { + require("internal").print(c.body); + throw err; + } + + assertEqual(2, d.length); } - catch (err) { - require("internal").print(c.body); - throw err; - } - - assertEqual(2, d.length); - }, }; } -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes the test suite -//////////////////////////////////////////////////////////////////////////////// - jsunity.run(RequireCanceledTestSuite); return jsunity.done(); diff --git a/js/common/modules/jslint.js b/js/common/modules/jslint.js index d10c18ab1f..f1c3f003b8 100644 --- a/js/common/modules/jslint.js +++ b/js/common/modules/jslint.js @@ -29,15 +29,14 @@ var internal = require("internal"); var fs = require("fs"); var console = require("console"); -var _ = require('lodash') +var _ = require('lodash'); var JSHINT = require("jshint").JSHINT; var jshintrc = {}; try { jshintrc = JSON.parse(fs.read('./js/.jshintrc')); -} -catch (err) { +} catch (err) { // ignore any errors } @@ -46,18 +45,17 @@ catch (err) { /// @brief runs a JSLint test on a file //////////////////////////////////////////////////////////////////////////////// -function RunTest (path, options) { +function RunTest(path, options) { var content; try { content = fs.read(path); - } - catch (err) { + } catch (err) { console.error("cannot load test file '%s'", path); - return; + return false; } - var result = { }; + var result = {}; content = content.replace("/*jslint", "/*xxxxxx"); result["passed"] = JSHINT(content, _.extend({}, jshintrc, options)); @@ -72,33 +70,34 @@ function RunTest (path, options) { /// @brief runs tests from command-line //////////////////////////////////////////////////////////////////////////////// -function RunCommandLineTests (options) { +function RunCommandLineTests(options) { var result = true; var tests = internal.unitTests(); - for (var i = 0; i < tests.length; ++i) { + for (var i = 0; i < tests.length; ++i) { var file = tests[i]; try { var testResult = RunTest(file, options); result = result && testResult && testResult.passed; - if (testResult && (! testResult.passed && testResult.errors)) { + + if (testResult && (!testResult.passed && testResult.errors)) { for (var j = 0; j < testResult.errors.length; ++j) { var err = testResult.errors[j]; - if (! err) { + + if (!err) { continue; } var position = file + ":" + err.line + ", " + err.character; var reason = err.reason; + console.error("jslint: %s : %s", position, reason); } - } - else { + } else { console.info("jslint: %s passed", file); } - } - catch (err) { + } catch (err) { print("cannot run test file '" + file + "': " + err); print(err.stack); result = false; @@ -108,7 +107,5 @@ function RunCommandLineTests (options) { internal.setUnitTestsResult(result); } - exports.runTest = RunTest; exports.runCommandLineTests = RunCommandLineTests; - diff --git a/lib/ApplicationFeatures/ApplicationFeature.cpp b/lib/ApplicationFeatures/ApplicationFeature.cpp index 75664c1a60..f4e007e77f 100644 --- a/lib/ApplicationFeatures/ApplicationFeature.cpp +++ b/lib/ApplicationFeatures/ApplicationFeature.cpp @@ -23,7 +23,7 @@ #include "ApplicationFeature.h" #include "ApplicationFeatures/ApplicationServer.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using namespace arangodb::application_features; using namespace arangodb::options; @@ -40,36 +40,34 @@ ApplicationFeature::~ApplicationFeature() {} // add the feature's options to the global list of options. this method will be // called regardless of whether to feature is enabled or disabled -void ApplicationFeature::collectOptions(std::shared_ptr) { - LOG(TRACE) << name() << "::collectOptions"; -} +void ApplicationFeature::collectOptions(std::shared_ptr) {} + +// load options from somewhere. this method will only be called for enabled +// features +void ApplicationFeature::loadOptions(std::shared_ptr) {} // validate the feature's options. this method will only be called for active // features, after the ApplicationServer has determined which features should be // turned off globally. in order to abort further processing in case of invalid // parameter values, the feature should bail out by calling // `abortInvalidParameters()` -void ApplicationFeature::validateOptions(std::shared_ptr) { - LOG(TRACE) << name() << "::validateOptions"; -} +void ApplicationFeature::validateOptions(std::shared_ptr) {} // preparation phase for feature // in the preparation phase, the features must not start any threads // furthermore, they must not write any files under elevated privileges // if they want other features to access them, or if they want to access // these files with dropped privileges -void ApplicationFeature::prepare() { LOG(TRACE) << name() << "::prepare"; } +void ApplicationFeature::prepare() {} // start the feature -void ApplicationFeature::start() { LOG(TRACE) << name() << "::start"; } +void ApplicationFeature::start() {} // notify the feature about a shutdown request -void ApplicationFeature::beginShutdown() { - LOG(TRACE) << name() << "::beginShutdown"; -} +void ApplicationFeature::beginShutdown() {} // stop and shut down the feature -void ApplicationFeature::stop() { LOG(TRACE) << name() << "::stop"; } +void ApplicationFeature::stop() {} // determine all direct and indirect ancestors of a feature std::unordered_set ApplicationFeature::ancestors() const { diff --git a/lib/ApplicationFeatures/ApplicationFeature.h b/lib/ApplicationFeatures/ApplicationFeature.h index 7973a64856..7ef21fd5c6 100644 --- a/lib/ApplicationFeatures/ApplicationFeature.h +++ b/lib/ApplicationFeatures/ApplicationFeature.h @@ -43,6 +43,7 @@ class ApplicationFeature { virtual ~ApplicationFeature(); + public: // return the feature's name std::string name() const { return _name; } @@ -90,9 +91,13 @@ class ApplicationFeature { bool doesStartBefore(std::string const& other) const; // add the feature's options to the global list of options. this method will - // be regardless of whether to feature is enabled or disabled + // be called regardless of whether to feature is enabled or disabled virtual void collectOptions(std::shared_ptr); + // load options from somewhere. this method will only be called for enabled + // features + virtual void loadOptions(std::shared_ptr); + // validate the feature's options. this method will only be called for active // features, after the ApplicationServer has determined which features should // be turned off globally. in order to abort further processing in case of @@ -101,7 +106,7 @@ class ApplicationFeature { virtual void validateOptions(std::shared_ptr); // preparation phase for feature in the preparation phase, the features must - // not start any threads furthermore, they must not write any files under + // not start any threads. furthermore, they must not write any files under // elevated privileges if they want other features to access them, or if they // want to access these files with dropped privileges virtual void prepare(); @@ -146,24 +151,31 @@ class ApplicationFeature { // abort program execution because of invalid parameters // TODO: add default implementation - void abortInvalidParameters(); + void abortInvalidParameters() { std::abort(); } private: // pointer to application server ApplicationServer* _server; + // name of feature std::string const _name; + // names of other features required to be enabled if this feature // is enabled std::vector _requires; + // name of other feature that will enable or disable this feature std::string _enableWith; + // a list of start dependencies for the feature std::unordered_set _startsAfter; + // whether or not the feature is enabled bool _enabled; + // whether or not the feature is optional bool _optional; + // whether or not the feature requires elevated privileges bool _requiresElevatedPrivileges; }; diff --git a/lib/ApplicationFeatures/ApplicationServer.cpp b/lib/ApplicationFeatures/ApplicationServer.cpp index c72abfeda6..83f96f2f02 100644 --- a/lib/ApplicationFeatures/ApplicationServer.cpp +++ b/lib/ApplicationFeatures/ApplicationServer.cpp @@ -23,18 +23,42 @@ #include "ApplicationServer.h" #include "ApplicationFeatures/ApplicationFeature.h" -#include "Basics/Logger.h" +#include "ProgramOptions2/ArgumentParser.h" +#include "Logger/Logger.h" using namespace arangodb::application_features; using namespace arangodb::options; +ApplicationServer* ApplicationServer::server = nullptr; + ApplicationServer::ApplicationServer(std::shared_ptr options) - : _options(options), _stopping(false), _privilegesDropped(false) {} + : _options(options), _stopping(false), _privilegesDropped(false) { + if (ApplicationServer::server != nullptr) { + LOG(ERR) << "ApplicationServer initialized twice"; + } + + ApplicationServer::server = this; +} ApplicationServer::~ApplicationServer() { for (auto& it : _features) { delete it.second; } + + ApplicationServer::server = nullptr; +} + +ApplicationFeature* ApplicationServer::lookupFeature(std::string const& name) { + if (ApplicationServer::server == nullptr) { + return nullptr; + } + + try { + return ApplicationServer::server->feature(name); + } catch (...) { + } + + return nullptr; } // adds a feature to the application server. the application server @@ -83,14 +107,22 @@ bool ApplicationServer::isRequired(std::string const& name) const { // this method will initialize and validate options // of all feature, start them and wait for a shutdown // signal. after that, it will shutdown all features -void ApplicationServer::run() { - LOG(TRACE) << "ApplicationServer::run"; +void ApplicationServer::run(int argc, char* argv[]) { + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::run"; // collect options from all features // in this phase, all features are order-independent collectOptions(); - // TODO: parse command-line options here + // setup dependency, but ignore any failure for now + setupDependencies(false); + + // parse the command line parameters and load any configuration + // file(s) + parseOptions(argc, argv); + + // seal the options + _options->seal(); // validate options of all features // in this phase, all features are stil order-independent @@ -100,7 +132,7 @@ void ApplicationServer::run() { enableAutomaticFeatures(); // setup and validate all feature dependencies - setupDependencies(); + setupDependencies(true); // now the features will actually do some preparation work // in the preparation phase, the features must not start any threads @@ -124,9 +156,10 @@ void ApplicationServer::run() { // signal the server to shut down void ApplicationServer::beginShutdown() { - LOG(TRACE) << ""; - LOG(TRACE) << "ApplicationServer::beginShutdown"; - LOG(TRACE) << "------------------------------------------------"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::beginShutdown"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; // fowards the begin shutdown signal to all features for (auto it = _orderedFeatures.rbegin(); it != _orderedFeatures.rend(); @@ -159,15 +192,42 @@ void ApplicationServer::apply(std::function callback, } void ApplicationServer::collectOptions() { - LOG(TRACE) << "ApplicationServer::collectOptions"; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::collectOptions"; apply([this](ApplicationFeature* feature) { feature->collectOptions(_options); }, true); } +void ApplicationServer::parseOptions(int argc, char* argv[]) { + ArgumentParser parser(_options.get()); + + std::string helpSection = parser.helpSection(argc, argv); + + if (!helpSection.empty()) { + // user asked for "--help" + _options->printHelp(helpSection); + exit(EXIT_SUCCESS); + } + + if (!parser.parse(argc, argv)) { + // command-line option parsing failed. an error was already printed + // by now, so we can exit + exit(EXIT_FAILURE); + } + + for (auto it = _orderedFeatures.begin(); it != _orderedFeatures.end(); ++it) { + if ((*it)->isEnabled()) { + (*it)->loadOptions(_options); + } + } +} + void ApplicationServer::validateOptions() { - LOG(TRACE) << "ApplicationServer::vaiidateOptions"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::validateOptions"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; apply([this](ApplicationFeature* feature) { feature->validateOptions(_options); @@ -197,34 +257,44 @@ void ApplicationServer::enableAutomaticFeatures() { } // setup and validate all feature dependencies, determine feature order -void ApplicationServer::setupDependencies() { - LOG(TRACE) << "ApplicationServer::vaiidateDependencies"; +void ApplicationServer::setupDependencies(bool failOnMissing) { + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "ApplicationServer::validateDependencies"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; // first check if a feature references an unknown other feature - apply([this](ApplicationFeature* feature) { - for (auto& other : feature->requires()) { - if (!this->exists(other)) { - fail("feature '" + feature->name() + "' depends on unknown feature '" + - other + "'"); + if (failOnMissing) { + apply([this](ApplicationFeature* feature) { + for (auto& other : feature->requires()) { + if (!this->exists(other)) { + fail("feature '" + feature->name() + + "' depends on unknown feature '" + other + "'"); + } + if (!this->feature(other)->isEnabled()) { + fail("enabled feature '" + feature->name() + + "' depends on other feature '" + other + "', which is disabled"); + } } - if (!this->feature(other)->isEnabled()) { - fail("enabled feature '" + feature->name() + - "' depends on other feature '" + other + "', which is disabled"); - } - } - }, true); + }, true); + } // first insert all features, even the inactive ones std::vector features; for (auto& it : _features) { - features.emplace_back(it.second); + auto insertPosition = features.end(); + + if (!features.empty()) { + for (size_t i = features.size(); i > 0; --i) { + if (it.second->doesStartBefore(features[i - 1]->name())) { + insertPosition = features.begin() + (i - 1); + } + } + } + features.insert(insertPosition, it.second); } - - std::sort(features.begin(), features.end(), - [](ApplicationFeature const* lhs, ApplicationFeature const* rhs) { - return lhs->doesStartBefore(rhs->name()); - }); - + // remove all inactive features for (auto it = features.begin(); it != features.end(); /* no hoisting */) { if ((*it)->isEnabled()) { @@ -240,9 +310,10 @@ void ApplicationServer::setupDependencies() { } void ApplicationServer::prepare() { - LOG(TRACE) << ""; - LOG(TRACE) << "ApplicationServer::prepare"; - LOG(TRACE) << "------------------------------------------------"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::prepare"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; // we start with elevated privileges bool privilegesElevated = true; @@ -276,9 +347,10 @@ void ApplicationServer::prepare() { } void ApplicationServer::start() { - LOG(TRACE) << ""; - LOG(TRACE) << "ApplicationServer::start"; - LOG(TRACE) << "------------------------------------------------"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::start"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; for (auto it = _orderedFeatures.begin(); it != _orderedFeatures.end(); ++it) { (*it)->start(); @@ -286,9 +358,10 @@ void ApplicationServer::start() { } void ApplicationServer::stop() { - LOG(TRACE) << ""; - LOG(TRACE) << "ApplicationServer::stop"; - LOG(TRACE) << "------------------------------------------------"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::stop"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; for (auto it = _orderedFeatures.rbegin(); it != _orderedFeatures.rend(); ++it) { @@ -297,7 +370,10 @@ void ApplicationServer::stop() { } void ApplicationServer::wait() { - LOG(TRACE) << "ApplicationServer::wait"; + LOG_TOPIC(TRACE, Logger::STARTUP) << ""; + LOG_TOPIC(TRACE, Logger::STARTUP) << "ApplicationServer::wait"; + LOG_TOPIC(TRACE, Logger::STARTUP) + << "------------------------------------------------"; while (!_stopping) { // TODO: use condition variable for waiting for shutdown diff --git a/lib/ApplicationFeatures/ApplicationServer.h b/lib/ApplicationFeatures/ApplicationServer.h index c65547363c..69b82f4143 100644 --- a/lib/ApplicationFeatures/ApplicationServer.h +++ b/lib/ApplicationFeatures/ApplicationServer.h @@ -37,6 +37,10 @@ class ApplicationServer { ApplicationServer(ApplicationServer const&) = delete; ApplicationServer& operator=(ApplicationServer const&) = delete; + public: + static ApplicationServer* server; + static ApplicationFeature* lookupFeature(std::string const&); + public: explicit ApplicationServer(std::shared_ptr); @@ -70,7 +74,7 @@ class ApplicationServer { // this method will initialize and validate options // of all feature, start them and wait for a shutdown // signal. after that, it will shutdown all features - void run(); + void run(int argc, char* argv[]); // signal the server to shut down void beginShutdown(); @@ -85,16 +89,25 @@ class ApplicationServer { // collects the program options from all features, // without validating them void collectOptions(); + + // parse options + void parseOptions(int argc, char* argv[]); + // allows features to cross-validate their program options void validateOptions(); + // enable automatic features void enableAutomaticFeatures(); + // setup and validate all feature dependencies, determine feature order - void setupDependencies(); + void setupDependencies(bool failOnMissing); + // allows features to prepare themselves void prepare(); + // starts features void start(); + // stops features void stop(); @@ -109,12 +122,16 @@ class ApplicationServer { private: // the shared program options std::shared_ptr _options; + // map of feature names to features std::unordered_map _features; + // features order for prepare/start std::vector _orderedFeatures; + // stop flag. this is being changed by calling beginShutdown std::atomic _stopping; + // whether or not privileges have been dropped permanently bool _privilegesDropped; }; diff --git a/lib/ApplicationFeatures/ClientFeature.cpp b/lib/ApplicationFeatures/ClientFeature.cpp new file mode 100644 index 0000000000..e6277be52f --- /dev/null +++ b/lib/ApplicationFeatures/ClientFeature.cpp @@ -0,0 +1,181 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/ClientFeature.h" + +#include "ApplicationFeatures/ConsoleFeature.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" +#include "Rest/Endpoint.h" +#include "SimpleHttpClient/GeneralClientConnection.h" +#include "SimpleHttpClient/SimpleHttpClient.h" + +using namespace arangodb; +using namespace arangodb::httpclient; +using namespace arangodb::options; +using namespace arangodb::rest; + +ClientFeature::ClientFeature(application_features::ApplicationServer* server, + double connectionTimeout, double requestTimeout) + : ApplicationFeature(server, "ClientFeature"), + _databaseName("_system"), + _authentication(true), + _endpoint(Endpoint::getDefaultEndpoint()), + _username("root"), + _password(""), + _connectionTimeout(connectionTimeout), + _requestTimeout(requestTimeout), + _sslProtocol(4), + _section("server"), + _retries(DEFAULT_RETRIES), + _warn(false) { + setOptional(true); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void ClientFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection(Section(_section, "Configure a connection to the server", + _section + " options", false, false)); + + options->addOption("--" + _section + ".database", + "database name to use when connecting", + new StringParameter(&_databaseName)); + + options->addOption("--" + _section + ".authentication", + "require authentication when connecting", + new BooleanParameter(&_authentication)); + + options->addOption("--" + _section + ".username", + "username to use when connecting", + new StringParameter(&_username)); + + options->addOption( + "--" + _section + ".endpoint", + "endpoint to connect to, use 'none' to start without a server", + new StringParameter(&_endpoint)); + + options->addOption("--" + _section + ".password", + "password to use when connection. If not specified and " + "authentication is required, the user will be prompted " + "for a password.", + new StringParameter(&_password)); + + options->addOption("--" + _section + ".connection-timeout", + "connection timeout in seconds", + new DoubleParameter(&_connectionTimeout)); + + options->addOption("--" + _section + ".request-timeout", + "request timeout in seconds", + new DoubleParameter(&_requestTimeout)); + + std::unordered_set sslProtocols = {1, 2, 3, 4}; + + options->addOption("--" + _section + ".ssl-protocol", + "1 = SSLv2, 2 = SSLv23, 3 = SSLv3, 4 = TLSv1", + new DiscreteValuesParameter( + &_sslProtocol, sslProtocols)); +} + +void ClientFeature::validateOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + // if a username is specified explicitly, assume authentication is desired + if (options->processingResult().touched(_section + ".username")) { + _authentication = true; + } + + // check timeouts + if (_connectionTimeout < 0.0) { + LOG(ERR) << "invalid value for --" << _section + << ".connect-timeout, must be >= 0"; + abortInvalidParameters(); + } else if (_connectionTimeout == 0.0) { + _connectionTimeout = LONG_TIMEOUT; + } + + if (_requestTimeout < 0.0) { + LOG(ERR) << "invalid value for --" << _section + << ".request-timeout, must be positive"; + abortInvalidParameters(); + } else if (_requestTimeout == 0.0) { + _requestTimeout = LONG_TIMEOUT; + } + + // username must be non-empty + if (_username.empty()) { + LOG(ERR) << "no value specified for --" << _section << ".username"; + abortInvalidParameters(); + } + + // ask for a password + if (_authentication && + !options->processingResult().touched(_section + ".password")) { + usleep(10 * 1000); + _password = ConsoleFeature::readPassword("Please specify a password: "); + } +} + +std::unique_ptr ClientFeature::createConnection() { + return createConnection(_endpoint); +} + +std::unique_ptr ClientFeature::createConnection( + std::string const& definition) { + std::unique_ptr endpoint(Endpoint::clientFactory(definition)); + + if (endpoint.get() == nullptr) { + LOG(ERR) << "invalid value for --server.endpoint ('" << definition << "')"; + THROW_ARANGO_EXCEPTION(TRI_ERROR_BAD_PARAMETER); + } + + std::unique_ptr connection( + GeneralClientConnection::factory(endpoint, _requestTimeout, + _connectionTimeout, _retries, + _sslProtocol)); + + return connection; +} + +std::unique_ptr ClientFeature::createHttpClient() { + return createHttpClient(_endpoint); +} + +std::unique_ptr ClientFeature::createHttpClient( + std::string const& definition) { + std::unique_ptr endpoint(Endpoint::clientFactory(definition)); + + if (endpoint.get() == nullptr) { + LOG(ERR) << "invalid value for --server.endpoint ('" << definition << "')"; + THROW_ARANGO_EXCEPTION(TRI_ERROR_BAD_PARAMETER); + } + + std::unique_ptr connection( + GeneralClientConnection::factory(endpoint, _requestTimeout, + _connectionTimeout, _retries, + _sslProtocol)); + + return std::make_unique(connection, _requestTimeout, _warn); +} diff --git a/lib/ApplicationFeatures/ClientFeature.h b/lib/ApplicationFeatures/ClientFeature.h new file mode 100644 index 0000000000..005abbc3c6 --- /dev/null +++ b/lib/ApplicationFeatures/ClientFeature.h @@ -0,0 +1,100 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_CLIENT_FEATURE_H +#define APPLICATION_FEATURES_CLIENT_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +namespace httpclient { +class GeneralClientConnection; +class SimpleHttpClient; +} +namespace rest { +class Endpoint; +} + +class ClientFeature final : public application_features::ApplicationFeature { + public: + constexpr static double const DEFAULT_REQUEST_TIMEOUT = 1200.0; + constexpr static double const DEFAULT_CONNECTION_TIMEOUT = 5.0; + constexpr static size_t const DEFAULT_RETRIES = 2; + constexpr static double const LONG_TIMEOUT = 86400.0; + + public: + explicit ClientFeature(application_features::ApplicationServer* server, + double connectionTimeout = DEFAULT_CONNECTION_TIMEOUT, + double requestTimeout = DEFAULT_REQUEST_TIMEOUT); + + public: + void collectOptions(std::shared_ptr) override; + void validateOptions( + std::shared_ptr options) override; + + public: + std::string const& databaseName() const { return _databaseName; } + bool authentication() const { return _authentication; } + std::string const& endpoint() const { return _endpoint; } + void setEndpoint(std::string const& value) { _endpoint = value; } + std::string const& username() const { return _username; } + void setUsername(std::string const& value) { _username = value; } + std::string const& password() const { return _password; } + void setPassword(std::string const& value) { _password = value; } + double connectionTimeout() const { return _connectionTimeout; } + double requestTimeout() const { return _requestTimeout; } + uint64_t sslProtocol() const { return _sslProtocol; } + + public: + std::unique_ptr createConnection(); + std::unique_ptr createConnection( + std::string const& definition); + std::unique_ptr createHttpClient(); + std::unique_ptr createHttpClient( + std::string const& definition); + + void setDatabaseName(std::string const& databaseName) { + _databaseName = databaseName; + } + + void setRetries(size_t retries) { _retries = retries; } + + void setWarn(bool warn) { _warn = warn; } + + private: + std::string _databaseName; + bool _authentication; + std::string _endpoint; + std::string _username; + std::string _password; + double _connectionTimeout; + double _requestTimeout; + uint64_t _sslProtocol; + + private: + std::string _section; + size_t _retries; + bool _warn; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/ConfigFeature.cpp b/lib/ApplicationFeatures/ConfigFeature.cpp new file mode 100644 index 0000000000..3cdb4eb9a5 --- /dev/null +++ b/lib/ApplicationFeatures/ConfigFeature.cpp @@ -0,0 +1,137 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/ConfigFeature.h" + +#include "Logger/Logger.h" +#include "Basics/FileUtils.h" +#include "Basics/StringUtils.h" +#include "ProgramOptions2/IniFileParser.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::options; + +ConfigFeature::ConfigFeature(application_features::ApplicationServer* server, + std::string const& progname) + : ApplicationFeature(server, "ConfigFeature"), + _file(""), + _progname(progname) { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void ConfigFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection( + Section("", "Global configuration", "global options", false, false)); + + options->addOption("--configuration,-c", "the configuration file or 'none'", + new StringParameter(&_file)); +} + +void ConfigFeature::loadOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::loadOptions"; + + if (StringUtils::tolower(_file) == "none") { + LOG_TOPIC(DEBUG, Logger::CONFIG) << "use 'none' config file at all"; + return; + } + + IniFileParser parser(options.get()); + + // always prefer an explicitly given config file + if (!_file.empty()) { + LOG_TOPIC(DEBUG, Logger::CONFIG) << "using user supplied conifg file '" + << _file << "'"; + + if (!parser.parse(_file)) { + exit(EXIT_FAILURE); + } + + return; + } + + // clang-format off + // + // check in order: + // + // .conf + // ./etc/relative/.conf + // ${HOME}/.arangodb/.conf + // /etc/arangodb/.conf + // + // clang-format on + + std::string basename = _progname + ".conf"; + std::string filename = + FileUtils::buildFilename(FileUtils::currentDirectory(), basename); + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "checking '" << filename << "'"; + + if (!FileUtils::exists(filename)) { + filename = FileUtils::buildFilename(FileUtils::currentDirectory(), + "etc/relative/" + basename); + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "checking '" << filename << "'"; + + if (!FileUtils::exists(filename)) { + filename = FileUtils::buildFilename(FileUtils::homeDirectory(), basename); + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "checking '" << filename << "'"; + + if (!FileUtils::exists(filename)) { + filename = + FileUtils::buildFilename(FileUtils::configDirectory(), basename); + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "checking '" << filename << "'"; + + if (!FileUtils::exists(filename)) { + LOG_TOPIC(DEBUG, Logger::CONFIG) << "cannot find any config file"; + return; + } + } + } + } + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "loading '" << filename << "'"; + + if (!parser.parse(filename)) { + exit(EXIT_FAILURE); + } + + filename = filename + ".local"; + + LOG_TOPIC(DEBUG, Logger::CONFIG) << "checking override '" << filename << "'"; + + if (FileUtils::exists(filename)) { + LOG_TOPIC(DEBUG, Logger::CONFIG) << "loading '" << filename << "'"; + + if (!parser.parse(filename)) { + exit(EXIT_FAILURE); + } + } +} diff --git a/lib/ApplicationFeatures/ConfigFeature.h b/lib/ApplicationFeatures/ConfigFeature.h new file mode 100644 index 0000000000..0007c2fcec --- /dev/null +++ b/lib/ApplicationFeatures/ConfigFeature.h @@ -0,0 +1,46 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_CONFIG_FEATURE_H +#define APPLICATION_FEATURES_CONFIG_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class ConfigFeature final : public application_features::ApplicationFeature { + public: + explicit ConfigFeature(application_features::ApplicationServer* server, + std::string const& progname); + + public: + void collectOptions(std::shared_ptr) override; + void loadOptions(std::shared_ptr) override; + + public: + std::string _file; + + private: + std::string _progname; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/ConsoleFeature.cpp b/lib/ApplicationFeatures/ConsoleFeature.cpp new file mode 100644 index 0000000000..7e3050d4b3 --- /dev/null +++ b/lib/ApplicationFeatures/ConsoleFeature.cpp @@ -0,0 +1,477 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/ConsoleFeature.h" + +#include "ApplicationFeatures/ClientFeature.h" +#include "Basics/messages.h" +#include "Basics/shell-colors.h" +#include "Basics/terminal-utils.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +ConsoleFeature::ConsoleFeature(application_features::ApplicationServer* server) + : ApplicationFeature(server, "ConsoleFeature"), +#ifdef _WIN32 + _codePage(-1), + _cygwinShell(false), +#endif + _quiet(false), + _colors(true), + _autoComplete(true), + _prettyPrint(true), + _auditFile(), + _pager(false), + _pagerCommand("less -X -R -F -L"), + _prompt("%E@%d> "), + _promptError(false), + _supportsColors(isatty(STDIN_FILENO)), + _toPager(stdout), + _toAuditFile(nullptr) { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void ConsoleFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection(Section("console", "Configure the console", + "console options", false, false)); + + options->addOption("--quiet", "silent startup", + new BooleanParameter(&_quiet, false)); + + options->addOption("--console.colors", "enable color support", + new BooleanParameter(&_colors)); + + options->addOption("--console.auto-complete", "enable auto completion", + new BooleanParameter(&_autoComplete)); + + options->addOption("--console.pretty-print", "enable pretty printing", + new BooleanParameter(&_prettyPrint)); + + options->addOption("--console.audit-file", + "audit log file to save commands and results", + new StringParameter(&_auditFile)); + + options->addOption("--console.pager", "enable paging", + new BooleanParameter(&_pager)); + + options->addHiddenOption("--console.pager-command", "pager command", + new StringParameter(&_pagerCommand)); + + options->addOption("--console.prompt", "prompt used in REPL", + new StringParameter(&_prompt)); + +#if _WIN32 + options->addOption("--console.code-page", "Windows code page to use", + new Int16Parameter(&_codePage)); +#endif +} + +void ConsoleFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + +#if _WIN32 + if (getenv("SHELL") != nullptr) { + _cygwinShell = true; + } +#endif +} + +void ConsoleFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + openLog(); +} + +void ConsoleFeature::stop() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; + + closeLog(); +} + +// prints a string to stdout, without a newline (Non-Windows only) on +// Windows, we'll print the line and a newline. No, we cannot use +// std::cout as this doesn't support UTF-8 on Windows. + +void ConsoleFeature::printContinuous(std::string const& s) { +#ifdef _WIN32 + // On Windows, we just print the line followed by a newline + printLine(s, true); +#else + fprintf(stdout, "%s", s.c_str()); + fflush(stdout); +#endif +} + +#ifdef _WIN32 +static bool _newLine() { + COORD pos; + CONSOLE_SCREEN_BUFFER_INFO bufferInfo; + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); + if (bufferInfo.dwCursorPosition.Y + 1 >= bufferInfo.dwSize.Y) { + // when we are at the last visible line of the console + // the first line of console is deleted (the content of the console + // is scrolled one line above + SMALL_RECT srctScrollRect; + srctScrollRect.Top = 0; + srctScrollRect.Bottom = bufferInfo.dwCursorPosition.Y + 1; + srctScrollRect.Left = 0; + srctScrollRect.Right = bufferInfo.dwSize.X; + COORD coordDest; + coordDest.X = 0; + coordDest.Y = -1; + CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo; + CHAR_INFO chiFill; + chiFill.Char.AsciiChar = (char)' '; + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), + &consoleScreenBufferInfo)) { + chiFill.Attributes = consoleScreenBufferInfo.wAttributes; + } else { + // Fill the bottom row with green blanks. + chiFill.Attributes = BACKGROUND_GREEN | FOREGROUND_RED; + } + ScrollConsoleScreenBuffer(GetStdHandle(STD_OUTPUT_HANDLE), &srctScrollRect, + nullptr, coordDest, &chiFill); + pos.Y = bufferInfo.dwCursorPosition.Y; + pos.X = 0; + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); + return true; + } else { + pos.Y = bufferInfo.dwCursorPosition.Y + 1; + pos.X = 0; + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); + return false; + } +} +#endif + +#ifdef _WIN32 +static void _printLine(std::string const& s) { + LPWSTR wBuf = (LPWSTR)TRI_Allocate(TRI_CORE_MEM_ZONE, + (sizeof WCHAR) * (s.size() + 1), true); + int wLen = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wBuf, + (int)((sizeof WCHAR) * (s.size() + 1))); + + if (wLen) { + DWORD n; + COORD pos; + CONSOLE_SCREEN_BUFFER_INFO bufferInfo; + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); + // save old cursor position + pos = bufferInfo.dwCursorPosition; + + size_t newX = static_cast(pos.X) + s.size(); + // size_t oldY = static_cast(pos.Y); + if (newX >= static_cast(bufferInfo.dwSize.X)) { + for (size_t i = 0; i <= newX / bufferInfo.dwSize.X; ++i) { + // insert as many newlines as we need. this prevents running out of + // buffer space when printing lines + // at the end of the console output buffer + if (_newLine()) { + pos.Y = pos.Y - 1; + } + } + } + + // save new cursor position + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &bufferInfo); + auto newPos = bufferInfo.dwCursorPosition; + + // print the actual string. note: printing does not advance the cursor + // position + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); + WriteConsoleOutputCharacterW(GetStdHandle(STD_OUTPUT_HANDLE), wBuf, + (DWORD)s.size(), pos, &n); + + // finally set the cursor position to where the printing should have + // stopped + SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), newPos); + } else { + fprintf(stdout, "window error: '%d' \r\n", GetLastError()); + fprintf(stdout, "%s\r\n", s.c_str()); + } + + if (wBuf) { + TRI_Free(TRI_CORE_MEM_ZONE, wBuf); + } +} +#endif + +void ConsoleFeature::printLine(std::string const& s, bool forceNewLine) { +#ifdef _WIN32 +#warning do we need forceNewLine + + if (!cygwinShell) { + // no, we cannot use std::cout as this doesn't support UTF-8 on Windows + // fprintf(stdout, "%s\r\n", s.c_str()); + TRI_vector_string_t subStrings = TRI_SplitString(s.c_str(), '\n'); + bool hasNewLines = (s.find("\n") != std::string::npos) | forceNewLine; + + if (hasNewLines) { + for (size_t i = 0; i < subStrings._length; i++) { + _printLine(subStrings._buffer[i]); + _newLine(); + } + } else { + _printLine(s); + } + TRI_DestroyVectorString(&subStrings); + } else +#endif + { + fprintf(stdout, "%s\n", s.c_str()); + } +} + +void ConsoleFeature::printErrorLine(std::string const& s) { +#ifdef _WIN32 + // no, we can use std::cerr as this doesn't support UTF-8 on Windows + printLine(s); +#else + fprintf(stderr, "%s\n", s.c_str()); +#endif +} + +std::string ConsoleFeature::readPassword(std::string const& message) { + std::string password; + + printContinuous(message); + +#ifdef TRI_HAVE_TERMIOS_H + TRI_SetStdinVisibility(false); + std::getline(std::cin, password); + + TRI_SetStdinVisibility(true); +#else + std::getline(std::cin, password); +#endif + ConsoleFeature::printLine(""); + + return password; +} + +void ConsoleFeature::printWelcomeInfo() { + if (!_quiet) { + if (_pager) { + std::ostringstream s; + + s << "Using pager '" << _pagerCommand << "' for output buffering."; + + printLine(s.str()); + } + + if (_prettyPrint) { + printLine("Pretty printing values."); + } + } +} + +void ConsoleFeature::printByeBye() { + if (!_quiet) { + printLine(""); + printLine(TRI_BYE_MESSAGE); + } +} + +static std::string StripBinary(std::string const& value) { + std::string result; + + bool inBinary = false; + + for (char c : value) { + if (inBinary) { + if (c == 'm') { + inBinary = false; + } + } else { + if (c == '\x1b') { + inBinary = true; + } else { + result.push_back(c); + } + } + } + + return result; +} + +void ConsoleFeature::print(std::string const& message) { + if (_toPager == stdout) { +#ifdef _WIN32 + // at moment the formating is ignored in windows + printLine(message); +#else + fprintf(_toPager, "%s", message.c_str()); +#endif + + } else { + std::string sanitized = StripBinary(message.c_str()); + fprintf(_toPager, "%s", sanitized.c_str()); + } + + log(message); +} + +void ConsoleFeature::openLog() { + if (!_auditFile.empty()) { + _toAuditFile = fopen(_auditFile.c_str(), "w"); + + std::ostringstream s; + + if (_toAuditFile == nullptr) { + s << "Cannot open file '" << _auditFile << "' for logging."; + printErrorLine(s.str()); + } else { + s << "Logging input and output to '" << _auditFile << "'."; + printLine(s.str()); + } + } +} + +void ConsoleFeature::closeLog() { + if (_toAuditFile != nullptr) { + fclose(_toAuditFile); + _toAuditFile = nullptr; + } +} + +void ConsoleFeature::log(std::string const& message) { + if (_toAuditFile != nullptr) { + std::string sanitized = StripBinary(message); + + if (!sanitized.empty()) { + // do not print terminal escape sequences into log + fprintf(_toAuditFile, "%s", sanitized.c_str()); + } + } +} + +void ConsoleFeature::flushLog() { + if (_toAuditFile) { + fflush(_toAuditFile); + } +} + +ConsoleFeature::Prompt ConsoleFeature::buildPrompt(ClientFeature* client) { + std::string result; + bool esc = false; + + for (char c : _prompt) { + if (c == '\0') { + break; + } + + if (esc) { + if (c == '%') { + result.push_back(c); + } else if (c == 'd') { + if (client != nullptr) { + result.append(client->databaseName()); + } else { + result.append("[database]"); + } + } else if (c == 'e' || c == 'E') { + std::string ep; + + if (client == nullptr) { + ep = "none"; + } else { + ep = client->endpoint(); + } + + if (c == 'E') { + // replace protocol + if (ep.find("tcp://") == 0) { + ep = ep.substr(6); + } else if (ep.find("ssl://") == 0) { + ep = ep.substr(6); + } else if (ep.find("unix://") == 0) { + ep = ep.substr(7); + } + } + + result.append(ep); + } else if (c == 'u') { + if (client == nullptr) { + result.append("[user]"); + } else { + result.append(client->username()); + } + } + + esc = false; + } else { + if (c == '%') { + esc = true; + } else { + result.push_back(c); + } + } + } + + std::string colored; + + if (_supportsColors && _colors) { + if (_promptError) { + colored = TRI_SHELL_COLOR_BOLD_RED + result + TRI_SHELL_COLOR_RESET; + } else { + colored = TRI_SHELL_COLOR_BOLD_GREEN + result + TRI_SHELL_COLOR_RESET; + } + } else { + colored = result; + } + + return {result, colored}; +} + +void ConsoleFeature::startPager() { +#ifndef _WIN32 + if (!_pager || _pagerCommand.empty() || _pagerCommand == "stdout" || + _pagerCommand == "-") { + _toPager = stdout; + } else { + _toPager = popen(_pagerCommand.c_str(), "w"); + + if (_toPager == nullptr) { + LOG(ERR) << "popen() for pager failed! Using stdout instead!"; + _toPager = stdout; + _pager = false; + } + } +#endif +} + +void ConsoleFeature::stopPager() { +#ifndef _WIN32 + if (_toPager != stdout) { + pclose(_toPager); + _toPager = stdout; + } +#endif +} diff --git a/lib/ApplicationFeatures/ConsoleFeature.h b/lib/ApplicationFeatures/ConsoleFeature.h new file mode 100644 index 0000000000..efdd640598 --- /dev/null +++ b/lib/ApplicationFeatures/ConsoleFeature.h @@ -0,0 +1,100 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_CONSOLE_FEATURE_H +#define APPLICATION_FEATURES_CONSOLE_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class ClientFeature; + +class ConsoleFeature final : public application_features::ApplicationFeature { + public: + explicit ConsoleFeature(application_features::ApplicationServer* server); + + public: + void collectOptions(std::shared_ptr) override; + void prepare() override; + void start() override; + void stop() override; + + public: + bool quiet() const { return _quiet; } + void setQuiet(bool value) { _quiet = value; } + bool colors() const { return _colors; } + bool autoComplete() const { return _autoComplete; } + bool prettyPrint() const { return _prettyPrint; } + bool pager() const { return _pager; } + void setPager(bool value) { _pager = value; } + std::string const& pagerCommand() const { return _pagerCommand; } + std::string const& prompt() const { return _prompt; } + + private: +#ifdef WIN32 + int16_t _codePage; + bool _cygwinShell; +#endif + bool _quiet; + bool _colors; + bool _autoComplete; + bool _prettyPrint; + std::string _auditFile; + bool _pager; + std::string _pagerCommand; + std::string _prompt; + + public: + static void printContinuous(std::string const&); + static void printLine(std::string const&, bool forceNewLine = false); + static void printErrorLine(std::string const&); + static std::string readPassword(std::string const& message); + + public: + void setPromptError(bool value) { _promptError = value; } + void setSupportsColors(bool value) { _supportsColors = value; } + void printWelcomeInfo(); + void printByeBye(); + void print(std::string const&); + void openLog(); + void closeLog(); + void log(std::string const&); + void flushLog(); + + struct Prompt { + std::string _plain; + std::string _colored; + }; + + Prompt buildPrompt(ClientFeature*); + void startPager(); + void stopPager(); + + private: + bool _promptError; + bool _supportsColors; + FILE* _toPager; + FILE* _toAuditFile; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/DatabaseFeature.cpp b/lib/ApplicationFeatures/DatabaseFeature.cpp new file mode 100644 index 0000000000..b1f51d708f --- /dev/null +++ b/lib/ApplicationFeatures/DatabaseFeature.cpp @@ -0,0 +1,73 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/DatabaseFeature.h" + +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +DatabaseFeature::DatabaseFeature( + application_features::ApplicationServer* server, + uint64_t maximalJournalSize) + : ApplicationFeature(server, "DatabaseFeature"), + _directory(""), + _maximalJournalSize(maximalJournalSize), + _queryTracking(true), + _queryCacheMode("off"), + _queryCacheEntries(128) { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void DatabaseFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection(Section("database", "Configure the database", + "database options", false, false)); + + options->addOption("--database.directory", "path to the database directory", + new StringParameter(&_directory)); + + options->addOption("--database.maximal-journal-size", + "default maximal journal size, can be overwritten when " + "creating a collection", + new UInt64Parameter(&_maximalJournalSize)); + + options->addSection( + Section("query", "Configure queries", "query options", false, false)); + + options->addOption("--query.tracking", "wether to track queries", + new BooleanParameter(&_queryTracking)); + + options->addOption("--query.cache-mode", + "mode for the AQL query cache (on, off, demand)", + new StringParameter(&_queryCacheMode)); + + options->addOption("--query.cache-entries", + "maximum number of results in query cache per database", + new UInt64Parameter(&_queryCacheEntries)); +} diff --git a/lib/ApplicationFeatures/DatabaseFeature.h b/lib/ApplicationFeatures/DatabaseFeature.h new file mode 100644 index 0000000000..188941cf36 --- /dev/null +++ b/lib/ApplicationFeatures/DatabaseFeature.h @@ -0,0 +1,46 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_DATABASE_FEATURE_H +#define APPLICATION_FEATURES_DATABASE_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class DatabaseFeature final : public application_features::ApplicationFeature { + public: + explicit DatabaseFeature(application_features::ApplicationServer* server, + uint64_t maximalJournalSize); + + public: + void collectOptions(std::shared_ptr) override; + + private: + std::string _directory; + uint64_t _maximalJournalSize; + bool _queryTracking; + std::string _queryCacheMode; + uint64_t _queryCacheEntries; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/LanguageFeature.cpp b/lib/ApplicationFeatures/LanguageFeature.cpp new file mode 100644 index 0000000000..7babe00e04 --- /dev/null +++ b/lib/ApplicationFeatures/LanguageFeature.cpp @@ -0,0 +1,65 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/LanguageFeature.h" + +#include "Basics/Utf8Helper.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::basics; +using namespace arangodb::options; + +LanguageFeature::LanguageFeature( + application_features::ApplicationServer* server) + : ApplicationFeature(server, "LanguageFeature") { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void LanguageFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addHiddenOption("--default-language", "ISO-639 language code", + new StringParameter(&_language)); +} + +void LanguageFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + + if (!Utf8Helper::DefaultUtf8Helper.setCollatorLanguage(_language)) { + std::string msg = + "cannot initialize ICU; please make sure ICU*dat is available; " + "the variable ICU_DATA='"; + if (getenv("ICU_DATA") != nullptr) { + msg += getenv("ICU_DATA"); + } + msg += "' should point the directory containing the ICU*dat file."; + + LOG(FATAL) << msg; + FATAL_ERROR_EXIT(); + } +} diff --git a/lib/ApplicationFeatures/LanguageFeature.h b/lib/ApplicationFeatures/LanguageFeature.h new file mode 100644 index 0000000000..b8b203e6c1 --- /dev/null +++ b/lib/ApplicationFeatures/LanguageFeature.h @@ -0,0 +1,42 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_LANGUAGE_FEATURE_H +#define APPLICATION_FEATURES_LANGUAGE_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class LanguageFeature final : public application_features::ApplicationFeature { + public: + explicit LanguageFeature(application_features::ApplicationServer* server); + + public: + void collectOptions(std::shared_ptr) override; + void prepare() override; + + private: + std::string _language; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/LoggerFeature.cpp b/lib/ApplicationFeatures/LoggerFeature.cpp index 468cbb2815..e75f6c8932 100644 --- a/lib/ApplicationFeatures/LoggerFeature.cpp +++ b/lib/ApplicationFeatures/LoggerFeature.cpp @@ -22,6 +22,7 @@ #include "ApplicationFeatures/LoggerFeature.h" +#include "Logger/Logger.h" #include "ProgramOptions2/ProgramOptions.h" #include "ProgramOptions2/Section.h" @@ -31,34 +32,128 @@ using namespace arangodb::options; LoggerFeature::LoggerFeature(application_features::ApplicationServer* server) : ApplicationFeature(server, "LoggerFeature"), _output(), - _level("info"), + _levels(), _useLocalTime(false), + _prefix(""), + _file(), _lineNumber(false), - _thread(false) { + _thread(false), + _performance(false), + _daemon(false), + _backgrounded(false), + _threaded(false) { + _levels.push_back("info"); setOptional(false); requiresElevatedPrivileges(false); } void LoggerFeature::collectOptions(std::shared_ptr options) { - options->addSection( - Section("log", "Configure the logging", "logging options", false, false)); + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection("log", "Configure the logging"); options->addOption("--log.output,-o", "log destination(s)", new VectorParameter(&_output)); options->addOption("--log.level,-l", "the global or topic-specific log level", - new StringParameter(&_level)); + new VectorParameter(&_levels)); options->addOption("--log.use-local-time", "use local timezone instead of UTC", new BooleanParameter(&_useLocalTime)); - options->addSection(Section("log-hidden", "Configure the logging", - "hidden logging options", true, false)); + options->addOption("--log.prefix", "prefix log message with this string", + new StringParameter(&_prefix)); - options->addOption("--log.line-number", "append line number and file name", - new BooleanParameter(&_lineNumber)); + options->addHiddenOption( + "--log.prefix", "adds a prefix in case multiple instances are running", + new StringParameter(&_prefix)); - options->addOption("--log.thread", "append a thread identifier", - new BooleanParameter(&_thread)); + options->addOption("--log", "the global or topic-specific log level", + new VectorParameter(&_levels)); + + options->addHiddenOption("--log.file", + "shortcut for '--log.output file://'", + new StringParameter(&_file)); + + options->addHiddenOption("--log.line-number", + "append line number and file name", + new BooleanParameter(&_lineNumber)); + + options->addHiddenOption("--log.thread", "append a thread identifier", + new BooleanParameter(&_thread)); + + options->addHiddenOption("--log.performance", + "shortcut for '--log.level requests=trace'", + new BooleanParameter(&_performance)); +} + +void LoggerFeature::loadOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::loadOptions"; + + // for debugging purpose, we set the log levels NOW + // this might be overwritten latter + Logger::initialize(false); + Logger::setLogLevel(_levels); +} + +void LoggerFeature::validateOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::validateOptions"; + + if (options->processingResult().touched("log.file")) { + std::string definition; + + if (_file == "+" || _file == "-") { + definition = _file; + } else if (_daemon) { + definition = "file://" + _file + ".daemon"; + } else { + definition = "file://" + _file; + } + + _output.push_back(definition); + } + + if (_performance) { + _levels.push_back("requests=trace"); + } + + if (!_backgrounded && isatty(STDIN_FILENO) != 0) { + _output.push_back("*"); + } +} + +void LoggerFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + +#if _WIN32 + if (!TRI_InitWindowsEventLog()) { + std::cerr << "failed to init event log" << std::endl; + FATAL_ERROR_EXIT(); + } +#endif + + Logger::setLogLevel(_levels); + Logger::setUseLocalTime(_useLocalTime); + Logger::setShowLineNumber(_lineNumber); + Logger::setShowThreadIdentifier(_thread); + Logger::setOutputPrefix(_prefix); +} + +void LoggerFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + if (_threaded) { + Logger::flush(); + Logger::shutdown(false); + Logger::initialize(_threaded); + } +} + +void LoggerFeature::stop() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; + + Logger::flush(); + Logger::shutdown(true); } diff --git a/lib/ApplicationFeatures/LoggerFeature.h b/lib/ApplicationFeatures/LoggerFeature.h index 62b80eaad3..cb92bdfa16 100644 --- a/lib/ApplicationFeatures/LoggerFeature.h +++ b/lib/ApplicationFeatures/LoggerFeature.h @@ -32,13 +32,26 @@ class LoggerFeature final : public application_features::ApplicationFeature { public: void collectOptions(std::shared_ptr) override; + void loadOptions(std::shared_ptr) override; + void validateOptions(std::shared_ptr) override; + void prepare() override; + void start() override; + void stop() override; private: std::vector _output; - std::string _level; + std::vector _levels; bool _useLocalTime; + std::string _prefix; + std::string _file; bool _lineNumber; bool _thread; + bool _performance; + + private: + bool _daemon; + bool _backgrounded; + bool _threaded; }; } diff --git a/lib/ApplicationFeatures/ShutdownFeature.cpp b/lib/ApplicationFeatures/ShutdownFeature.cpp new file mode 100644 index 0000000000..3ee01bcc56 --- /dev/null +++ b/lib/ApplicationFeatures/ShutdownFeature.cpp @@ -0,0 +1,45 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/ShutdownFeature.h" + +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +ShutdownFeature::ShutdownFeature( + application_features::ApplicationServer* server, std::string const& feature) + : ApplicationFeature(server, "ShutdownFeature") { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); + startsAfter(feature); +} + +void ShutdownFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + server()->beginShutdown(); +} diff --git a/lib/ApplicationFeatures/ShutdownFeature.h b/lib/ApplicationFeatures/ShutdownFeature.h new file mode 100644 index 0000000000..d37503df91 --- /dev/null +++ b/lib/ApplicationFeatures/ShutdownFeature.h @@ -0,0 +1,39 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_SHUTDOWN_FEATURE_H +#define APPLICATION_FEATURES_SHUTDOWN_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class ShutdownFeature final : public application_features::ApplicationFeature { + public: + explicit ShutdownFeature(application_features::ApplicationServer* server, + std::string const&); + + public: + void start() override; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/SslFeature.cpp b/lib/ApplicationFeatures/SslFeature.cpp new file mode 100644 index 0000000000..32e527efdf --- /dev/null +++ b/lib/ApplicationFeatures/SslFeature.cpp @@ -0,0 +1,78 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/SslFeature.h" + +#include "Basics/ssl-helper.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +SslFeature::SslFeature(application_features::ApplicationServer* server) + : ApplicationFeature(server, "SslFeature"), + _cafile(), + _keyfile(), + _sessionCache(false), + _chiperList(), + _protocol(TLS_V1), + _options( + (long)(SSL_OP_TLS_ROLLBACK_BUG | SSL_OP_CIPHER_SERVER_PREFERENCE)) { + setOptional(true); + requiresElevatedPrivileges(true); + startsAfter("LoggerFeature"); +} + +void SslFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection(Section("ssl", "Configure SSL communication", + "ssl options", false, false)); + + options->addOption("--ssl.cafile", "ca file used for secure connections", + new StringParameter(&_cafile)); + + options->addOption("--ssl.keyfile", "key-file used for secure connections", + new StringParameter(&_keyfile)); + + options->addOption("--ssl.session-cache", + "enable the session cache for connections", + new BooleanParameter(&_sessionCache)); + + options->addOption("--ssl.chipher-list", + "ssl chipers to use, see OpenSSL documentation", + new StringParameter(&_chiperList)); + + options->addOption( + "--ssl.protocol", + "ssl protocol (1 = SSLv2, 2 = SSLv23, 3 = SSLv3, 4 = TLSv1)", + new UInt64Parameter(&_protocol)); + + options->addSection(Section("ssl-hidden", "Configure the logging", + "hidden ssl options", true, false)); + + options->addOption("--ssl.options", + "ssl connection options, see OpenSSL documentation", + new UInt64Parameter(&_options)); +} diff --git a/lib/ApplicationFeatures/SslFeature.h b/lib/ApplicationFeatures/SslFeature.h new file mode 100644 index 0000000000..4799d7bd32 --- /dev/null +++ b/lib/ApplicationFeatures/SslFeature.h @@ -0,0 +1,46 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_SSL_FEATURE_H +#define APPLICATION_FEATURES_SSL_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class SslFeature final : public application_features::ApplicationFeature { + public: + explicit SslFeature(application_features::ApplicationServer* server); + + public: + void collectOptions(std::shared_ptr) override; + + public: + std::string _cafile; + std::string _keyfile; + bool _sessionCache; + std::string _chiperList; + uint64_t _protocol; + uint64_t _options; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/TempFeature.cpp b/lib/ApplicationFeatures/TempFeature.cpp new file mode 100644 index 0000000000..5044c09ffc --- /dev/null +++ b/lib/ApplicationFeatures/TempFeature.cpp @@ -0,0 +1,63 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/TempFeature.h" + +#include "Basics/files.h" +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +TempFeature::TempFeature(application_features::ApplicationServer* server, + std::string const& appname) + : ApplicationFeature(server, "TempFeature"), _path(), _appname(appname) { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void TempFeature::collectOptions(std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection(Section("temp", "Configure the temporary files", + "temp options", false, false)); + + options->addOption("--temp.path", "path for temporary files", + new StringParameter(&_path)); +} + +void TempFeature::prepare() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::prepare"; + + TRI_SetApplicationName(_appname.c_str()); +} + +void TempFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + if (!_path.empty()) { + TRI_SetUserTempPath((char*)_path.c_str()); + } +} diff --git a/lib/ApplicationFeatures/TempFeature.h b/lib/ApplicationFeatures/TempFeature.h new file mode 100644 index 0000000000..55217050d7 --- /dev/null +++ b/lib/ApplicationFeatures/TempFeature.h @@ -0,0 +1,45 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_TEMP_FEATURE_H +#define APPLICATION_FEATURES_TEMP_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +namespace arangodb { +class TempFeature final : public application_features::ApplicationFeature { + public: + TempFeature(application_features::ApplicationServer* server, + std::string const& appname); + + public: + void collectOptions(std::shared_ptr) override; + void prepare() override; + void start() override; + + public: + std::string _path; + std::string _appname; +}; +} + +#endif diff --git a/lib/ApplicationFeatures/V8PlatformFeature.cpp b/lib/ApplicationFeatures/V8PlatformFeature.cpp new file mode 100644 index 0000000000..0a2241aafe --- /dev/null +++ b/lib/ApplicationFeatures/V8PlatformFeature.cpp @@ -0,0 +1,97 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#include "ApplicationFeatures/V8PlatformFeature.h" + +#include "Logger/Logger.h" +#include "ProgramOptions2/ProgramOptions.h" +#include "ProgramOptions2/Section.h" + +using namespace arangodb; +using namespace arangodb::options; + +class BufferAllocator : public v8::ArrayBuffer::Allocator { + public: + virtual void* Allocate(size_t length) { + void* data = AllocateUninitialized(length); + if (data != nullptr) { + memset(data, 0, length); + } + return data; + } + virtual void* AllocateUninitialized(size_t length) { return malloc(length); } + virtual void Free(void* data, size_t) { + if (data != nullptr) { + free(data); + } + } +}; + +V8PlatformFeature::V8PlatformFeature( + application_features::ApplicationServer* server) + : ApplicationFeature(server, "V8PlatformFeature") { + setOptional(false); + requiresElevatedPrivileges(false); + startsAfter("LoggerFeature"); +} + +void V8PlatformFeature::collectOptions( + std::shared_ptr options) { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::collectOptions"; + + options->addSection("javascript", "Configure the Javascript engine"); + + options->addOption("--javascript.v8-options", "options to pass to v8", + new StringParameter(&_v8options)); +} + +void V8PlatformFeature::start() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::start"; + + v8::V8::InitializeICU(); + + // explicit option --javascript.v8-options used + if (!_v8options.empty()) { + v8::V8::SetFlagsFromString(_v8options.c_str(), (int)_v8options.size()); + } + +#ifdef TRI_FORCE_ARMV6 + std::string const forceARMv6 = "--noenable-armv7"; + v8::V8::SetFlagsFromString(forceARMv6.c_str(), (int)forceARMv6.size()); +#endif + + _platform.reset(v8::platform::CreateDefaultPlatform()); + v8::V8::InitializePlatform(_platform.get()); + v8::V8::Initialize(); + + _allocator.reset(new BufferAllocator()); + v8::V8::SetArrayBufferAllocator(_allocator.get()); +} + +void V8PlatformFeature::stop() { + LOG_TOPIC(TRACE, Logger::STARTUP) << name() << "::stop"; + + v8::V8::Dispose(); + v8::V8::ShutdownPlatform(); + _platform.reset(); + _allocator.reset(); +} diff --git a/lib/ApplicationFeatures/V8PlatformFeature.h b/lib/ApplicationFeatures/V8PlatformFeature.h new file mode 100644 index 0000000000..485720fa78 --- /dev/null +++ b/lib/ApplicationFeatures/V8PlatformFeature.h @@ -0,0 +1,50 @@ +//////////////////////////////////////////////////////////////////////////////// +/// DISCLAIMER +/// +/// Copyright 2016 ArangoDB GmbH, Cologne, Germany +/// +/// Licensed under the Apache License, Version 2.0 (the "License"); +/// you may not use this file except in compliance with the License. +/// You may obtain a copy of the License at +/// +/// http://www.apache.org/licenses/LICENSE-2.0 +/// +/// Unless required by applicable law or agreed to in writing, software +/// distributed under the License is distributed on an "AS IS" BASIS, +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +/// See the License for the specific language governing permissions and +/// limitations under the License. +/// +/// Copyright holder is ArangoDB GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +//////////////////////////////////////////////////////////////////////////////// + +#ifndef APPLICATION_FEATURES_V8PLATFORM_FEATURE_H +#define APPLICATION_FEATURES_V8PLATFORM_FEATURE_H 1 + +#include "ApplicationFeatures/ApplicationFeature.h" + +#include +#include + +namespace arangodb { +class V8PlatformFeature final : public application_features::ApplicationFeature { + public: + explicit V8PlatformFeature(application_features::ApplicationServer* server); + + public: + void collectOptions(std::shared_ptr) override; + void start() override; + void stop() override; + + private: + std::string _v8options; + + private: + std::unique_ptr _platform; + std::unique_ptr _allocator; +}; +} + +#endif diff --git a/lib/Basics/AssocMulti.h b/lib/Basics/AssocMulti.h index 5efd3205a6..2bbd3c3056 100644 --- a/lib/Basics/AssocMulti.h +++ b/lib/Basics/AssocMulti.h @@ -30,11 +30,11 @@ // #define TRI_CHECK_MULTI_POINTER_HASH 1 #include "Basics/Common.h" -#include "Basics/Logger.h" #include "Basics/memory-map.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" #include "Basics/prime-numbers.h" +#include "Logger/Logger.h" #include #include diff --git a/lib/Basics/AssocUnique.h b/lib/Basics/AssocUnique.h index 9a7f8a06d2..23cb2efc94 100644 --- a/lib/Basics/AssocUnique.h +++ b/lib/Basics/AssocUnique.h @@ -28,11 +28,11 @@ #include "Basics/Common.h" #include "Basics/gcd.h" -#include "Basics/Logger.h" #include "Basics/memory-map.h" #include "Basics/MutexLocker.h" #include "Basics/prime-numbers.h" #include "Basics/random.h" +#include "Logger/Logger.h" #include #include diff --git a/lib/Basics/AttributeNameParser.cpp b/lib/Basics/AttributeNameParser.cpp index 9bd4168676..f17b6d1275 100644 --- a/lib/Basics/AttributeNameParser.cpp +++ b/lib/Basics/AttributeNameParser.cpp @@ -23,7 +23,7 @@ #include "AttributeNameParser.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using AttributeName = arangodb::basics::AttributeName; diff --git a/lib/Basics/Barrier.cpp b/lib/Basics/Barrier.cpp index 1cdcf04b5a..c295d0f7c8 100644 --- a/lib/Basics/Barrier.cpp +++ b/lib/Basics/Barrier.cpp @@ -23,7 +23,7 @@ #include "Barrier.h" #include "Basics/ConditionLocker.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using namespace arangodb::basics; diff --git a/lib/Basics/Common.h b/lib/Basics/Common.h index 5de420fcc7..b8e5ec8b13 100644 --- a/lib/Basics/Common.h +++ b/lib/Basics/Common.h @@ -211,6 +211,9 @@ static inline uint32_t TRI_64to32(uint64_t x) { #ifdef _WIN32 #include "Basics/win-utils.h" +#else +inline void ADB_WindowsEntryFunction() {} +inline void ADB_WindowsExitFunction(int exitCode, void* data) {} #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/ConditionLocker.cpp b/lib/Basics/ConditionLocker.cpp index a8d5d92adc..dbd10d7c1a 100644 --- a/lib/Basics/ConditionLocker.cpp +++ b/lib/Basics/ConditionLocker.cpp @@ -26,7 +26,7 @@ #include "Basics/ConditionVariable.h" #ifdef TRI_SHOW_LOCK_TIME -#include "Basics/Logger.h" +#include "Logger/Logger.h" #endif using namespace arangodb::basics; diff --git a/lib/Basics/Exceptions.cpp b/lib/Basics/Exceptions.cpp index 9ef04078d7..1ba80373c1 100644 --- a/lib/Basics/Exceptions.cpp +++ b/lib/Basics/Exceptions.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using namespace arangodb::basics; diff --git a/lib/Basics/FileUtils.cpp b/lib/Basics/FileUtils.cpp index 9c811c1d47..5018c58e8d 100644 --- a/lib/Basics/FileUtils.cpp +++ b/lib/Basics/FileUtils.cpp @@ -34,7 +34,7 @@ #include "Basics/Exceptions.h" #include "Basics/StringBuffer.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #if defined(_WIN32) && defined(_MSC_VER) @@ -83,12 +83,12 @@ void normalizePath(std::string& name) { std::string buildFilename(char const* path, char const* name) { std::string result(path); - if (! result.empty()) { + if (!result.empty()) { result = removeTrailingSeparator(result) + TRI_DIR_SEPARATOR_CHAR; } - - result.append(name); - normalizePath(result); // in place + + result.append(name); + normalizePath(result); // in place return result; } @@ -96,12 +96,12 @@ std::string buildFilename(char const* path, char const* name) { std::string buildFilename(std::string const& path, std::string const& name) { std::string result(path); - if (! result.empty()) { + if (!result.empty()) { result = removeTrailingSeparator(result) + TRI_DIR_SEPARATOR_CHAR; } - - result.append(name); - normalizePath(result); // in place + + result.append(name); + normalizePath(result); // in place return result; } @@ -362,7 +362,9 @@ bool copyDirectoryRecursive(std::string const& source, do { #else - auto isSubDirectory = [](struct dirent* item) -> bool { return isDirectory(item->d_name); }; + auto isSubDirectory = [](struct dirent* item) -> bool { + return isDirectory(item->d_name); + }; struct dirent* d = (struct dirent*)TRI_Allocate( TRI_UNKNOWN_MEM_ZONE, (offsetof(struct dirent, d_name) + PATH_MAX + 1), @@ -591,6 +593,31 @@ std::string homeDirectory() { return result; } + +std::string configDirectory() { + char* dir = TRI_LocateConfigDirectory(); + + if (dir == nullptr) { + return currentDirectory(); + } + + std::string result = dir; + TRI_FreeString(TRI_CORE_MEM_ZONE, dir); + + return result; +} + +std::string dirname(std::string const& name) { + char* result = TRI_Dirname(name.c_str()); + std::string base; + + if (result != nullptr) { + base = result; + TRI_FreeString(TRI_CORE_MEM_ZONE, result); + } + + return base; +} } } } diff --git a/lib/Basics/FileUtils.h b/lib/Basics/FileUtils.h index 8179c4c17a..7b09bab558 100644 --- a/lib/Basics/FileUtils.h +++ b/lib/Basics/FileUtils.h @@ -209,6 +209,18 @@ std::string currentDirectory(int* errorNumber = 0); //////////////////////////////////////////////////////////////////////////////// std::string homeDirectory(); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the config directory +//////////////////////////////////////////////////////////////////////////////// + +std::string configDirectory(); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the base name +//////////////////////////////////////////////////////////////////////////////// + +std::string dirname(std::string const&); } } } diff --git a/lib/Basics/Mutex.cpp b/lib/Basics/Mutex.cpp index de46ba7f4c..1a817036c0 100644 --- a/lib/Basics/Mutex.cpp +++ b/lib/Basics/Mutex.cpp @@ -24,7 +24,7 @@ #include "Mutex.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" using namespace arangodb; diff --git a/lib/Basics/MutexLocker.cpp b/lib/Basics/MutexLocker.cpp index 7e19ee11e2..864284ceba 100644 --- a/lib/Basics/MutexLocker.cpp +++ b/lib/Basics/MutexLocker.cpp @@ -25,7 +25,7 @@ #include "MutexLocker.h" #ifdef TRI_SHOW_LOCK_TIME -#include "Basics/Logger.h" +#include "Logger/Logger.h" #endif using namespace arangodb; diff --git a/lib/Basics/Nonce.cpp b/lib/Basics/Nonce.cpp index 91999b70f9..2ac1ab7e44 100644 --- a/lib/Basics/Nonce.cpp +++ b/lib/Basics/Nonce.cpp @@ -26,7 +26,7 @@ #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/RandomGenerator.h" #include "Basics/StringUtils.h" diff --git a/lib/Basics/RandomGenerator.cpp b/lib/Basics/RandomGenerator.cpp index e839d65338..c30a098b20 100644 --- a/lib/Basics/RandomGenerator.cpp +++ b/lib/Basics/RandomGenerator.cpp @@ -23,7 +23,7 @@ #include "RandomGenerator.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Exceptions.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" diff --git a/lib/Basics/ReadLocker.h b/lib/Basics/ReadLocker.h index 9324aa85de..e6ebadff23 100644 --- a/lib/Basics/ReadLocker.h +++ b/lib/Basics/ReadLocker.h @@ -29,7 +29,7 @@ #include "Basics/ReadWriteLock.h" #ifdef TRI_SHOW_LOCK_TIME -#include "Basics/Logger.h" +#include "Logger/Logger.h" #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/StringBuffer.h b/lib/Basics/StringBuffer.h index 4cf07cd938..3f3eb2eaa1 100644 --- a/lib/Basics/StringBuffer.h +++ b/lib/Basics/StringBuffer.h @@ -25,8 +25,7 @@ #define LIB_BASICS_STRING_BUFFER_H 1 #include "Basics/Common.h" -#include "Basics/Logger.h" - +#include "Logger/Logger.h" #include "Zip/zip.h" #include diff --git a/lib/Basics/StringUtils.cpp b/lib/Basics/StringUtils.cpp index 5edd2c25c9..c5ca62213f 100644 --- a/lib/Basics/StringUtils.cpp +++ b/lib/Basics/StringUtils.cpp @@ -26,7 +26,7 @@ #include #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Exceptions.h" #include "Basics/tri-strings.h" #include "Basics/StringBuffer.h" diff --git a/lib/Basics/Thread.cpp b/lib/Basics/Thread.cpp index e3748a6ea5..90474a4797 100644 --- a/lib/Basics/Thread.cpp +++ b/lib/Basics/Thread.cpp @@ -29,7 +29,7 @@ #include "Basics/ConditionLocker.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/WorkMonitor.h" #include @@ -124,14 +124,19 @@ TRI_tid_t Thread::currentThreadId() { #endif #endif } - + std::string Thread::stringify(ThreadState state) { switch (state) { - case ThreadState::CREATED: return "created"; - case ThreadState::STARTED: return "started"; - case ThreadState::STOPPING: return "stopping"; - case ThreadState::STOPPED: return "stopped"; - case ThreadState::DETACHED: return "detached"; + case ThreadState::CREATED: + return "created"; + case ThreadState::STARTED: + return "started"; + case ThreadState::STOPPING: + return "stopping"; + case ThreadState::STOPPED: + return "stopped"; + case ThreadState::DETACHED: + return "detached"; } return "unknown"; } @@ -158,7 +163,8 @@ Thread::Thread(std::string const& name) Thread::~Thread() { auto state = _state.load(); - LOG_TOPIC(TRACE, Logger::THREADS) << "delete(" << _name << "), state: " << stringify(state); + LOG_TOPIC(TRACE, Logger::THREADS) << "delete(" << _name + << "), state: " << stringify(state); if (state == ThreadState::STOPPED) { int res = TRI_JoinThread(&_thread); @@ -172,7 +178,8 @@ Thread::~Thread() { state = _state.load(); if (state != ThreadState::DETACHED) { - LOG(FATAL) << "thread is not detached but " << stringify(state) << ". shutting down hard"; + LOG(FATAL) << "thread is not detached but " << stringify(state) + << ". shutting down hard"; FATAL_ERROR_EXIT(); } } @@ -190,6 +197,9 @@ void Thread::beginShutdown() { state != ThreadState::DETACHED) { _state.compare_exchange_strong(state, ThreadState::STOPPING); } + + LOG_TOPIC(TRACE, Logger::THREADS) << "beginShutdown(" << _name + << ") reached state " << (int)_state.load(); } //////////////////////////////////////////////////////////////////////////////// @@ -275,8 +285,7 @@ bool Thread::start(ConditionVariable* finishedCondition) { } } else { _state.store(ThreadState::STOPPED); - LOG_TOPIC(ERR, Logger::THREADS) << "could not start thread '" - << _name + LOG_TOPIC(ERR, Logger::THREADS) << "could not start thread '" << _name << "': " << strerror(errno); return false; @@ -342,21 +351,21 @@ void Thread::runMe() { run(); _state.store(ThreadState::STOPPED); } catch (Exception const& ex) { - LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" - << _name << "': " << ex.what(); + LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" << _name + << "': " << ex.what(); Logger::flush(); _state.store(ThreadState::STOPPED); throw; } catch (std::exception const& ex) { - LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" - << _name << "': " << ex.what(); + LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" << _name + << "': " << ex.what(); Logger::flush(); _state.store(ThreadState::STOPPED); throw; } catch (...) { if (!isSilent()) { - LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" - << _name << "'"; + LOG_TOPIC(ERR, Logger::THREADS) << "exception caught in thread '" << _name + << "'"; Logger::flush(); } _state.store(ThreadState::STOPPED); diff --git a/lib/Basics/Utf8Helper.cpp b/lib/Basics/Utf8Helper.cpp index fc7df10742..e84e5d82ac 100644 --- a/lib/Basics/Utf8Helper.cpp +++ b/lib/Basics/Utf8Helper.cpp @@ -23,7 +23,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "Utf8Helper.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "unicode/normalizer2.h" #include "unicode/brkiter.h" diff --git a/lib/Basics/VelocyPackHelper.cpp b/lib/Basics/VelocyPackHelper.cpp index b09020f6f5..d6e15bb534 100644 --- a/lib/Basics/VelocyPackHelper.cpp +++ b/lib/Basics/VelocyPackHelper.cpp @@ -24,7 +24,7 @@ #include "VelocyPackHelper.h" #include "Basics/conversions.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/files.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" diff --git a/lib/Basics/VelocyPackHelper.h b/lib/Basics/VelocyPackHelper.h index 2e9d0276a7..2e55e56886 100644 --- a/lib/Basics/VelocyPackHelper.h +++ b/lib/Basics/VelocyPackHelper.h @@ -25,6 +25,7 @@ #define LIB_BASICS_VELOCY_PACK_HELPER_H 1 #include "Basics/JsonHelper.h" +#include "Logger/Logger.h" #include #include diff --git a/lib/Basics/WorkMonitor.cpp b/lib/Basics/WorkMonitor.cpp index 27b6f48cf1..da557c9e96 100644 --- a/lib/Basics/WorkMonitor.cpp +++ b/lib/Basics/WorkMonitor.cpp @@ -27,7 +27,7 @@ #include #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Mutex.h" #include "Basics/MutexLocker.h" #include "Basics/tri-strings.h" diff --git a/lib/Basics/WriteLocker.h b/lib/Basics/WriteLocker.h index 689e0a1adc..cbe537245a 100644 --- a/lib/Basics/WriteLocker.h +++ b/lib/Basics/WriteLocker.h @@ -29,7 +29,7 @@ #include "Basics/ReadWriteLock.h" #ifdef TRI_SHOW_LOCK_TIME -#include "Basics/Logger.h" +#include "Logger/Logger.h" #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/conversions.h b/lib/Basics/conversions.h index b14da0a6a9..be5bff094a 100644 --- a/lib/Basics/conversions.h +++ b/lib/Basics/conversions.h @@ -144,60 +144,12 @@ size_t TRI_StringInt64InPlace(int64_t, char*); size_t TRI_StringUInt64InPlace(uint64_t, char*); -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from int8 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringInt8 (int8_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from uint16 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt8 (uint8_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from int16 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringInt16 (int16_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from uint16 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt16 (uint16_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from int32 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringInt32 (int32_t); -#endif - //////////////////////////////////////////////////////////////////////////////// /// @brief convert to string from uint32 //////////////////////////////////////////////////////////////////////////////// char* TRI_StringUInt32(uint32_t); -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to string from int64 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringInt64 (int64_t); -#endif - //////////////////////////////////////////////////////////////////////////////// /// @brief convert to string from uint64 //////////////////////////////////////////////////////////////////////////////// @@ -226,22 +178,6 @@ size_t TRI_StringUInt32HexInPlace(uint32_t, char*); size_t TRI_StringUInt64HexInPlace(uint64_t, char*); -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to hex string from int32 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt32Hex (uint32_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to hex string from int64 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt64Hex (uint64_t); -#endif - //////////////////////////////////////////////////////////////////////////////// /// @brief convert to an octal string from uint32, using the specified buffer. /// A NUL-byte will be appended at the end. @@ -264,22 +200,6 @@ size_t TRI_StringUInt32OctalInPlace(uint32_t, char*); size_t TRI_StringUInt64OctalInPlace(uint64_t, char*); -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to octal string from int32 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt32Octal (uint32_t); -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief convert to octal string from int64 -//////////////////////////////////////////////////////////////////////////////// - -#if 0 -char* TRI_StringUInt64Octal (uint64_t); -#endif - //////////////////////////////////////////////////////////////////////////////// /// @brief converts a time stamp to a string //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/debugging.cpp b/lib/Basics/debugging.cpp index 8381d8e897..e4e2e40fee 100644 --- a/lib/Basics/debugging.cpp +++ b/lib/Basics/debugging.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "Basics/Common.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/ReadLocker.h" #include "Basics/ReadWriteLock.h" #include "Basics/WriteLocker.h" diff --git a/lib/Basics/files.cpp b/lib/Basics/files.cpp index 059ade6780..b28f134867 100644 --- a/lib/Basics/files.cpp +++ b/lib/Basics/files.cpp @@ -41,7 +41,7 @@ #include "Basics/conversions.h" #include "Basics/hashes.h" #include "Basics/locks.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/random.h" #include "Basics/StringBuffer.h" #include "Basics/Thread.h" @@ -1980,11 +1980,14 @@ int TRI_Crc32File(char const* path, uint32_t* crc) { /// call to TRI_GetTempPath //////////////////////////////////////////////////////////////////////////////// -static char const* TRI_ApplicationName = nullptr; +static std::string TRI_ApplicationName = "arangodb"; void TRI_SetApplicationName(char const* name) { TRI_ASSERT(strlen(name) <= 13); - TRI_ApplicationName = name; + + if (name != nullptr) { + TRI_ApplicationName = name; + } } //////////////////////////////////////////////////////////////////////////////// @@ -2019,7 +2022,7 @@ std::string TRI_GetTempPath() { system = std::string(v) + "/"; } - system += std::string(TRI_ApplicationName) + "_XXXXXX"; + system += TRI_ApplicationName + "_XXXXXX"; // copy to a character array SystemTempPath.reset(new char[system.size() + 1]); diff --git a/lib/Basics/json.cpp b/lib/Basics/json.cpp index 1093d36957..7572566ab4 100644 --- a/lib/Basics/json.cpp +++ b/lib/Basics/json.cpp @@ -23,7 +23,7 @@ #include "json.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringBuffer.h" #include "Basics/tri-strings.h" diff --git a/lib/Basics/levenshtein.cpp b/lib/Basics/levenshtein.cpp index 3a8c52c15d..827792c381 100644 --- a/lib/Basics/levenshtein.cpp +++ b/lib/Basics/levenshtein.cpp @@ -18,70 +18,44 @@ /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// -/// @author Dr. Frank Celler -/// @author Benjamin Pritchard (ben@bennyp.org) +/// @author Jan Steemann //////////////////////////////////////////////////////////////////////////////// #include "levenshtein.h" +#include + //////////////////////////////////////////////////////////////////////////////// /// @brief calculate the levenshtein distance of the two strings -/// @author Benjamin Pritchard (ben@bennyp.org) -/// copyright 2013 Benjamin Pritchard. Released under the MIT License -/// copyright The MIT License -/// From -/// https://raw.githubusercontent.com/bennybp/stringmatch/master/stringmatch.cpp //////////////////////////////////////////////////////////////////////////////// -int TRI_Levenshtein(std::string const& str1, std::string const& str2) { - // for all i and j, d[i,j] will hold the Levenshtein distance between - // the first i characters of s and the first j characters of t; - // note that d has (m+1)x(n+1) values - size_t m = str1.size(); - size_t n = str2.size(); +int TRI_Levenshtein(std::string const& lhs, std::string const& rhs) { + int const lhsLength = static_cast(lhs.size()); + int const rhsLength = static_cast(rhs.size()); - int** d = new int* [m + 1]; - for (size_t i = 0; i <= m; i++) { - d[i] = new int[n + 1]; - } + int* col = new int[lhsLength + 1]; + int start = 1; + // fill with initial values + std::iota(col + start, col + lhsLength + 1, start); - for (size_t i = 0; i <= m; i++) { - d[i][0] = static_cast( - i); // the distance of any first string to an empty second string - } - - for (size_t j = 0; j <= n; j++) { - d[0][j] = static_cast( - j); // the distance of any second string to an empty first string - } - - int min; - - for (size_t j = 1; j <= n; j++) { - for (size_t i = 1; i <= m; i++) { - if (str1[i - 1] == str2[j - 1]) { - d[i][j] = d[i - 1][j - 1]; // no operation required - } else { - // find a minimum - min = d[i - 1][j] + /*1*/ 3; // a deletion - if ((d[i][j - 1] + 1) < min) { // an insertion - min = (d[i][j - 1] + 1); - } - if ((d[i - 1][j - 1] + 1) < min) { // a substitution - min = (d[i - 1][j - 1] + /*1*/ 2); - } - - d[i][j] = min; - } + for (int x = start; x <= rhsLength; ++x) { + col[0] = x; + int last = x - start; + for (int y = start; y <= lhsLength; ++y) { + int const save = col[y]; + col[y] = (std::min)({ + col[y] + 1, // deletion + col[y - 1] + 1, // insertion + last + (lhs[y - 1] == rhs[x - 1] ? 0 : 1) // substitution + }); + last = save; } } - int result = d[m][n]; - - for (size_t i = 0; i <= m; i++) { - delete[] d[i]; - } - delete[] d; + // fetch final value + int result = col[lhsLength]; + // free memory + delete[] col; return result; } diff --git a/lib/Basics/levenshtein.h b/lib/Basics/levenshtein.h index b95423f34d..7e02cee142 100644 --- a/lib/Basics/levenshtein.h +++ b/lib/Basics/levenshtein.h @@ -18,7 +18,7 @@ /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// -/// @author Dr. Frank Celler +/// @author Jen Steemann //////////////////////////////////////////////////////////////////////////////// #ifndef LIB_BASICS_LEVENSHTEIN_H diff --git a/lib/Basics/locks-posix.cpp b/lib/Basics/locks-posix.cpp index 8b98cd371f..7a13043269 100644 --- a/lib/Basics/locks-posix.cpp +++ b/lib/Basics/locks-posix.cpp @@ -25,7 +25,7 @@ #ifdef TRI_HAVE_POSIX_THREADS -#include "Basics/Logger.h" +#include "Logger/Logger.h" #define BUSY_LOCK_DELAY (10 * 1000) diff --git a/lib/Basics/memory-map-posix.cpp b/lib/Basics/memory-map-posix.cpp index ca0ae8f442..0c9db70903 100644 --- a/lib/Basics/memory-map-posix.cpp +++ b/lib/Basics/memory-map-posix.cpp @@ -25,7 +25,7 @@ #ifdef TRI_HAVE_POSIX_MMAP -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include diff --git a/lib/Basics/memory-map-win32.cpp b/lib/Basics/memory-map-win32.cpp index d21e889097..afbdb29183 100644 --- a/lib/Basics/memory-map-win32.cpp +++ b/lib/Basics/memory-map-win32.cpp @@ -26,7 +26,7 @@ #ifdef TRI_HAVE_WIN32_MMAP #include "Windows.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" using namespace arangodb; diff --git a/lib/Basics/process-utils.cpp b/lib/Basics/process-utils.cpp index 25baa6eb51..9c2c9a43aa 100644 --- a/lib/Basics/process-utils.cpp +++ b/lib/Basics/process-utils.cpp @@ -51,7 +51,7 @@ #include #endif -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/MutexLocker.h" #include "Basics/StringBuffer.h" #include "Basics/StringUtils.h" @@ -136,46 +136,6 @@ typedef struct process_state_s { #endif -//////////////////////////////////////////////////////////////////////////////// -/// @brief original process name -//////////////////////////////////////////////////////////////////////////////// - -static char* ProcessName = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief argc -//////////////////////////////////////////////////////////////////////////////// - -static int ARGC = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief argv -//////////////////////////////////////////////////////////////////////////////// - -static char** ARGV = 0; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief true, if environment has been copied already -//////////////////////////////////////////////////////////////////////////////// - -#ifdef TRI_TAMPER_WITH_ENVIRON -static bool IsEnvironmentEnlarged = false; -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief do we need to free the copy of the environ data on shutdown -//////////////////////////////////////////////////////////////////////////////// - -#ifdef TRI_TAMPER_WITH_ENVIRON -static bool MustFreeEnvironment = false; -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @brief maximal size of the process title -//////////////////////////////////////////////////////////////////////////////// - -static size_t MaximalProcessTitleSize = 0; - //////////////////////////////////////////////////////////////////////////////// /// @brief all external processes //////////////////////////////////////////////////////////////////////////////// @@ -785,61 +745,7 @@ TRI_process_info_t TRI_ProcessInfo(TRI_pid_t pid) { /// @brief sets the process name //////////////////////////////////////////////////////////////////////////////// -extern char** environ; - void TRI_SetProcessTitle(char const* title) { -#if TRI_TAMPER_WITH_ENVIRON - - if (!IsEnvironmentEnlarged) { - size_t size; - - int envLen = -1; - - if (environ) { - while (environ[++envLen]) { - ; - } - } - - if (envLen > 0) { - size = environ[envLen - 1] + strlen(environ[envLen - 1]) - ARGV[0]; - } else { - size = ARGV[ARGC - 1] + strlen(ARGV[ARGC - 1]) - ARGV[0]; - } - - if (environ) { - char** newEnviron = - TRI_Allocate(TRI_CORE_MEM_ZONE, (envLen + 1) * sizeof(char*), false); - size_t i = 0; - - while (environ[i]) { - newEnviron[i] = TRI_DuplicateString(TRI_CORE_MEM_ZONE, environ[i]); - ++i; - } - // pad with a null pointer so we know the end of the array - newEnviron[i] = NULL; - - environ = newEnviron; - MustFreeEnvironment = true; - } - - IsEnvironmentEnlarged = true; - MaximalProcessTitleSize = size; - } - -#else - - MaximalProcessTitleSize = ARGV[ARGC - 1] + strlen(ARGV[ARGC - 1]) - ARGV[0]; - -#endif - - if (0 < MaximalProcessTitleSize) { - char* args = ARGV[0]; - - memset(args, '\0', MaximalProcessTitleSize); - snprintf(args, MaximalProcessTitleSize - 1, "%s", title); - } - #ifdef TRI_HAVE_SYS_PRCTL_H prctl(PR_SET_NAME, title, 0, 0, 0); #endif @@ -1338,16 +1244,8 @@ static uint64_t GetPhysicalMemory() { /// @brief initializes the process components //////////////////////////////////////////////////////////////////////////////// -void TRI_InitializeProcess(int argc, char* argv[]) { +void TRI_InitializeProcess() { TRI_PhysicalMemory = GetPhysicalMemory(); - - if (ProcessName != nullptr) { - return; - } - - ProcessName = TRI_DuplicateString(argv[0]); - ARGC = argc; - ARGV = argv; } //////////////////////////////////////////////////////////////////////////////// @@ -1355,20 +1253,4 @@ void TRI_InitializeProcess(int argc, char* argv[]) { //////////////////////////////////////////////////////////////////////////////// void TRI_ShutdownProcess() { - TRI_FreeString(TRI_CORE_MEM_ZONE, ProcessName); - -#ifdef TRI_TAMPER_WITH_ENVIRON - if (MustFreeEnvironment) { - size_t i = 0; - - TRI_ASSERT(environ); - // free all arguments copied for environ - - while (environ[i]) { - TRI_FreeString(TRI_CORE_MEM_ZONE, environ[i]); - ++i; - } - TRI_Free(TRI_CORE_MEM_ZONE, environ); - } -#endif } diff --git a/lib/Basics/process-utils.h b/lib/Basics/process-utils.h index 916e33ec6d..da1242deef 100644 --- a/lib/Basics/process-utils.h +++ b/lib/Basics/process-utils.h @@ -175,7 +175,7 @@ bool TRI_KillExternalProcess(TRI_external_id_t pid); /// @brief initializes the process components //////////////////////////////////////////////////////////////////////////////// -void TRI_InitializeProcess(int argc, char* argv[]); +void TRI_InitializeProcess(); //////////////////////////////////////////////////////////////////////////////// /// @brief shut downs the process components diff --git a/lib/Basics/socket-utils.cpp b/lib/Basics/socket-utils.cpp index 783f987163..b28a88a4b4 100644 --- a/lib/Basics/socket-utils.cpp +++ b/lib/Basics/socket-utils.cpp @@ -34,7 +34,7 @@ #include #endif -#include "Basics/Logger.h" +#include "Logger/Logger.h" //////////////////////////////////////////////////////////////////////////////// /// @brief closes a socket diff --git a/lib/Basics/ssl-helper.cpp b/lib/Basics/ssl-helper.cpp index 97dd20bb84..f9a107db06 100644 --- a/lib/Basics/ssl-helper.cpp +++ b/lib/Basics/ssl-helper.cpp @@ -22,21 +22,19 @@ //////////////////////////////////////////////////////////////////////////////// #include "ssl-helper.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include -using namespace arangodb::basics; +using namespace arangodb; - -extern "C" const SSL_METHOD *SSLv3_method(void); +extern "C" const SSL_METHOD* SSLv3_method(void); //////////////////////////////////////////////////////////////////////////////// /// @brief creates an SSL context //////////////////////////////////////////////////////////////////////////////// -SSL_CTX* arangodb::basics::sslContext(protocol_e protocol, - std::string const& keyfile) { +SSL_CTX* arangodb::sslContext(protocol_e protocol, std::string const& keyfile) { // create our context SSL_METHOD SSL_CONST* meth = nullptr; @@ -67,12 +65,14 @@ SSL_CTX* arangodb::basics::sslContext(protocol_e protocol, // load our keys and certificates if (!SSL_CTX_use_certificate_chain_file(sslctx, keyfile.c_str())) { - LOG(ERR) << "cannot read certificate from '" << keyfile << "': " << arangodb::basics::lastSSLError(); + LOG(ERR) << "cannot read certificate from '" << keyfile + << "': " << lastSSLError(); return nullptr; } if (!SSL_CTX_use_PrivateKey_file(sslctx, keyfile.c_str(), SSL_FILETYPE_PEM)) { - LOG(ERR) << "cannot read key from '" << keyfile << "': " << arangodb::basics::lastSSLError(); + LOG(ERR) << "cannot read key from '" << keyfile + << "': " << lastSSLError(); return nullptr; } @@ -87,7 +87,7 @@ SSL_CTX* arangodb::basics::sslContext(protocol_e protocol, /// @brief get the name of an SSL protocol version //////////////////////////////////////////////////////////////////////////////// -std::string arangodb::basics::protocolName(protocol_e protocol) { +std::string arangodb::protocolName(protocol_e protocol) { switch (protocol) { case SSL_V2: return "SSLv2"; @@ -110,7 +110,7 @@ std::string arangodb::basics::protocolName(protocol_e protocol) { /// @brief get last SSL error //////////////////////////////////////////////////////////////////////////////// -std::string arangodb::basics::lastSSLError() { +std::string arangodb::lastSSLError() { char buf[122]; memset(buf, 0, sizeof(buf)); diff --git a/lib/Basics/ssl-helper.h b/lib/Basics/ssl-helper.h index 533a37430b..dcf5d33a98 100644 --- a/lib/Basics/ssl-helper.h +++ b/lib/Basics/ssl-helper.h @@ -29,7 +29,6 @@ #include namespace arangodb { -namespace basics { //////////////////////////////////////////////////////////////////////////////// /// @brief SSL protocol methods @@ -73,6 +72,5 @@ std::string protocolName(protocol_e protocol); std::string lastSSLError(); } -} #endif diff --git a/lib/Basics/threads-posix.cpp b/lib/Basics/threads-posix.cpp index 76601cd2dd..22f6a7c5d6 100644 --- a/lib/Basics/threads-posix.cpp +++ b/lib/Basics/threads-posix.cpp @@ -29,7 +29,7 @@ #include #endif -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/threads-win32.cpp b/lib/Basics/threads-win32.cpp index cbc689d5f6..5ab86073a2 100644 --- a/lib/Basics/threads-win32.cpp +++ b/lib/Basics/threads-win32.cpp @@ -23,7 +23,7 @@ #include "threads.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Basics/win-utils.cpp b/lib/Basics/win-utils.cpp index 8ee8e07c93..f210b2a167 100644 --- a/lib/Basics/win-utils.cpp +++ b/lib/Basics/win-utils.cpp @@ -32,7 +32,7 @@ #include #include -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/files.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" @@ -94,7 +94,8 @@ void TRI_usleep(unsigned long waitTime) { } if (GetLastError() == ERROR_ALREADY_EXISTS) { - LOG(FATAL) << "internal error in TRI_usleep()"; FATAL_ERROR_EXIT(); + LOG(FATAL) << "internal error in TRI_usleep()"; + FATAL_ERROR_EXIT(); } // Set timer to wait for indicated micro seconds. @@ -109,7 +110,8 @@ void TRI_usleep(unsigned long waitTime) { if (result != WAIT_OBJECT_0) { CloseHandle(hTimer); - LOG(FATAL) << "couldn't wait for timer in TRI_usleep()"; FATAL_ERROR_EXIT(); + LOG(FATAL) << "couldn't wait for timer in TRI_usleep()"; + FATAL_ERROR_EXIT(); } CloseHandle(hTimer); @@ -219,12 +221,14 @@ int initializeWindows(const TRI_win_initialize_e initializeWhat, errorCode = WSAStartup(wVersionRequested, &wsaData); if (errorCode != 0) { - LOG(ERR) << "Could not find a usable Winsock DLL. WSAStartup returned an error."; + LOG(ERR) << "Could not find a usable Winsock DLL. WSAStartup returned " + "an error."; return -1; } if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { - LOG(ERR) << "Could not find a usable Winsock DLL. WSAStartup did not return version 2.2."; + LOG(ERR) << "Could not find a usable Winsock DLL. WSAStartup did not " + "return version 2.2."; WSACleanup(); return -1; } @@ -531,10 +535,11 @@ void TRI_CloseWindowsEventlog(void) { // No clue why there is no header for these... #define MSG_INVALID_COMMAND ((DWORD)0xC0020100L) #define UI_CATEGORY ((WORD)0x00000003L) -void TRI_LogWindowsEventlog(char const* func, char const* file, int line, std::string const& message) { +void TRI_LogWindowsEventlog(char const* func, char const* file, int line, + std::string const& message) { char buf[1024]; char linebuf[32]; - LPCSTR logBuffers[] = { buf, file, func, linebuf, NULL }; + LPCSTR logBuffers[] = {buf, file, func, linebuf, NULL}; TRI_ASSERT(hEventLog != INVALID_HANDLE_VALUE); @@ -545,8 +550,8 @@ void TRI_LogWindowsEventlog(char const* func, char const* file, int line, std::s // Try to get messages through to windows syslog... if (!ReportEvent(hEventLog, EVENTLOG_ERROR_TYPE, UI_CATEGORY, - MSG_INVALID_COMMAND, NULL, 4, 0, (LPCSTR*)logBuffers, - NULL)) { + MSG_INVALID_COMMAND, NULL, 4, 0, (LPCSTR*)logBuffers, + NULL)) { // well, fail then... } } @@ -580,3 +585,46 @@ void TRI_WindowsEmergencyLog(char const* func, char const* file, int line, TRI_LogWindowsEventlog(func, file, line, fmt, ap); va_end(ap); } + +void ADB_WindowsEntryFunction() { + int maxOpenFiles = 1024; + int res = 0; + + // ........................................................................... + // Uncomment this to call this for extended debug information. + // If you familiar with valgrind ... then this is not like that, however + // you do get some similar functionality. + // ........................................................................... + // res = initializeWindows(TRI_WIN_INITIAL_SET_DEBUG_FLAG, 0); + + res = initializeWindows(TRI_WIN_INITIAL_SET_INVALID_HANLE_HANDLER, 0); + + if (res != 0) { + _exit(1); + } + + res = initializeWindows(TRI_WIN_INITIAL_SET_MAX_STD_IO, + (char const*)(&maxOpenFiles)); + + if (res != 0) { + _exit(1); + } + + res = initializeWindows(TRI_WIN_INITIAL_WSASTARTUP_FUNCTION_CALL, 0); + + if (res != 0) { + _exit(1); + } + + TRI_Application_Exit_SetExit(ADB_WindowsExitFunction); +} + +void ADB_WindowsExitFunction(int exitCode, void* data) { + int res = finalizeWindows(TRI_WIN_FINAL_WSASTARTUP_FUNCTION_CALL, 0); + + if (res != 0) { + exit(1); + } + + exit(exitCode); +} diff --git a/lib/Basics/win-utils.h b/lib/Basics/win-utils.h index f905fccf63..9f57085d8f 100644 --- a/lib/Basics/win-utils.h +++ b/lib/Basics/win-utils.h @@ -47,6 +47,9 @@ typedef enum { int finalizeWindows(const TRI_win_finalize_e, char const*); int initializeWindows(const TRI_win_initialize_e, char const*); +void ADB_WindowsEntryFunction(); +void ADB_WindowsExitFunction(int exitCode, void* data); + // ............................................................................. // windows equivalent of ftruncate (the truncation of an open file) is // _chsize @@ -101,6 +104,7 @@ int TRI_MapSystemError(DWORD); //////////////////////////////////////////////////////////////////////////////// /// @brief open/close the windows eventlog. Call on start / shutdown //////////////////////////////////////////////////////////////////////////////// + bool TRI_InitWindowsEventLog(void); void TRI_CloseWindowsEventlog(void); @@ -111,7 +115,8 @@ void TRI_CloseWindowsEventlog(void); /// the arango internal logging will handle that usually. //////////////////////////////////////////////////////////////////////////////// -void TRI_LogWindowsEventlog(char const* func, char const* file, int line, std::string const&); +void TRI_LogWindowsEventlog(char const* func, char const* file, int line, + std::string const&); void TRI_LogWindowsEventlog(char const* func, char const* file, int line, char const* fmt, va_list ap); diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 01848d9bae..8592d360da 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -145,7 +145,16 @@ add_library(${LIB_ARANGO} STATIC ${LIB_ASM_SOURCES} ApplicationFeatures/ApplicationFeature.cpp ApplicationFeatures/ApplicationServer.cpp + ApplicationFeatures/ClientFeature.cpp + ApplicationFeatures/ConfigFeature.cpp + ApplicationFeatures/ConsoleFeature.cpp + ApplicationFeatures/DatabaseFeature.cpp + ApplicationFeatures/LanguageFeature.cpp ApplicationFeatures/LoggerFeature.cpp + ApplicationFeatures/ShutdownFeature.cpp + ApplicationFeatures/SslFeature.cpp + ApplicationFeatures/TempFeature.cpp + ApplicationFeatures/V8PlatformFeature.cpp Basics/AttributeNameParser.cpp Basics/Barrier.cpp Basics/ConditionLocker.cpp @@ -154,7 +163,6 @@ add_library(${LIB_ARANGO} STATIC Basics/Exceptions.cpp Basics/FileUtils.cpp Basics/JsonHelper.cpp - Basics/Logger.cpp Basics/Mutex.cpp Basics/MutexLocker.cpp Basics/Nonce.cpp @@ -200,6 +208,7 @@ add_library(${LIB_ARANGO} STATIC Basics/voc-errors.cpp Basics/voc-mimetypes.cpp JsonParser/json-parser.cpp + Logger/Logger.cpp ProgramOptions/program-options.cpp Rest/Endpoint.cpp Rest/EndpointIp.cpp diff --git a/lib/Basics/Logger.cpp b/lib/Logger/Logger.cpp similarity index 99% rename from lib/Basics/Logger.cpp rename to lib/Logger/Logger.cpp index 5ffcb64f19..fc925f3664 100644 --- a/lib/Basics/Logger.cpp +++ b/lib/Logger/Logger.cpp @@ -790,6 +790,7 @@ LoggerStream::~LoggerStream() { LogTopic Logger::COLLECTOR("collector"); LogTopic Logger::COMPACTOR("compactor"); +LogTopic Logger::CONFIG("config"); LogTopic Logger::DATAFILES("datafiles", LogLevel::INFO); LogTopic Logger::MMAP("mmap"); LogTopic Logger::PERFORMANCE("performance", @@ -797,7 +798,9 @@ LogTopic Logger::PERFORMANCE("performance", LogTopic Logger::QUERIES("queries", LogLevel::INFO); LogTopic Logger::REPLICATION("replication", LogLevel::INFO); LogTopic Logger::REQUESTS("requests", LogLevel::FATAL); // suppress by default +LogTopic Logger::STARTUP("startup", LogLevel::WARN); LogTopic Logger::THREADS("threads", LogLevel::WARN); +LogTopic Logger::V8("v8", LogLevel::WARN); //////////////////////////////////////////////////////////////////////////////// /// @brief current log level diff --git a/lib/Basics/Logger.h b/lib/Logger/Logger.h similarity index 99% rename from lib/Basics/Logger.h rename to lib/Logger/Logger.h index 8a22915057..7937473833 100644 --- a/lib/Basics/Logger.h +++ b/lib/Logger/Logger.h @@ -273,13 +273,16 @@ class Logger { static LogTopic COLLECTOR; static LogTopic COMPACTOR; + static LogTopic CONFIG; + static LogTopic DATAFILES; static LogTopic MMAP; static LogTopic PERFORMANCE; static LogTopic QUERIES; static LogTopic REPLICATION; static LogTopic REQUESTS; - static LogTopic DATAFILES; + static LogTopic STARTUP; static LogTopic THREADS; + static LogTopic V8; public: ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/ProgramOptions2/ArgumentParser.h b/lib/ProgramOptions2/ArgumentParser.h index a77f337d1d..d79ccc57b3 100644 --- a/lib/ProgramOptions2/ArgumentParser.h +++ b/lib/ProgramOptions2/ArgumentParser.h @@ -39,6 +39,11 @@ class ArgumentParser { std::string helpSection(int argc, char* argv[]) { for (int i = 1; i < argc; ++i) { std::string const current(argv[i]); + + if (current == "--") { + break; + } + if (current.size() >= 6 && current.substr(0, 6) == "--help") { if (current.size() <= 7) { return "*"; @@ -56,6 +61,7 @@ class ArgumentParser { _options->setContext("command-line options"); std::string lastOption; + bool optionsDone = false; for (int i = 1; i < argc; ++i) { std::string option; @@ -69,13 +75,21 @@ class ArgumentParser { if (!option.empty()) { value = current; } else { + if (current == "--") { + optionsDone = true; + continue; + } + option = current; size_t dashes = 0; - if (option.substr(0, 2) == "--") { - dashes = 2; - } else if (option.substr(0, 1) == "-") { - dashes = 1; + + if (! optionsDone) { + if (option.substr(0, 2) == "--") { + dashes = 2; + } else if (option.substr(0, 1) == "-") { + dashes = 1; + } } if (dashes == 0) { @@ -129,6 +143,7 @@ class ArgumentParser { } // all is well + _options->endPass(); return true; } diff --git a/lib/ProgramOptions2/IniFileParser.h b/lib/ProgramOptions2/IniFileParser.h index 04f630f30c..c7c1c45ba7 100644 --- a/lib/ProgramOptions2/IniFileParser.h +++ b/lib/ProgramOptions2/IniFileParser.h @@ -45,7 +45,7 @@ class IniFileParser { std::regex::ECMAScript); // a line that assigns a value to a named variable _matchers.assignment = std::regex( - "^[ \t]*(([-_A-Za-z0-9]*\\.)?[-_A-Za-z0-9]*)[ \t]*=[ \t]*(.*)?[ \t]*$", + "^[ \t]*(([-_A-Za-z0-9]*\\.)?[-_A-Za-z0-9]*)[ \t]*=[ \t]*(.*?)?[ \t]*$", std::regex::ECMAScript); } @@ -103,6 +103,7 @@ class IniFileParser { } // all is well + _options->endPass(); return true; } diff --git a/lib/ProgramOptions2/Parameters.h b/lib/ProgramOptions2/Parameters.h index 1a8609fc13..c8613169b7 100644 --- a/lib/ProgramOptions2/Parameters.h +++ b/lib/ProgramOptions2/Parameters.h @@ -37,7 +37,7 @@ namespace options { // convert a string into a number, base version for signed integer types template -typename std::enable_if::value, T>::type toNumber( +inline typename std::enable_if::value, T>::type toNumber( std::string const& value) { auto v = static_cast(std::stoll(value)); if (v < (std::numeric_limits::min)() || v > (std::numeric_limits::max)()) { @@ -48,7 +48,7 @@ typename std::enable_if::value, T>::type toNumber( // convert a string into a number, base version for unsigned integer types template -typename std::enable_if::value, T>::type toNumber( +inline typename std::enable_if::value, T>::type toNumber( std::string const& value) { auto v = static_cast(std::stoull(value)); if (v < (std::numeric_limits::min)() || v > (std::numeric_limits::max)()) { @@ -59,7 +59,7 @@ typename std::enable_if::value, T>::type toNumber( // convert a string into a number, version for double values template <> -double toNumber(std::string const& value) { +inline double toNumber(std::string const& value) { return std::stod(value); } @@ -305,7 +305,8 @@ struct DiscreteValuesParameter : public T { if (it == allowed.end()) { return "invalid value " + value; } - return ""; + + return T::set(value); } std::unordered_set allowed; diff --git a/lib/ProgramOptions2/ProgramOptions.h b/lib/ProgramOptions2/ProgramOptions.h index cf3c7c0a7e..18f9e4e61e 100644 --- a/lib/ProgramOptions2/ProgramOptions.h +++ b/lib/ProgramOptions2/ProgramOptions.h @@ -25,13 +25,13 @@ #include "Basics/Common.h" -#include "ProgramOptions2/Option.h" -#include "ProgramOptions2/Section.h" - #include #include -#include +#include "Basics/levenshtein.h" +#include "Basics/terminal-utils.h" +#include "ProgramOptions2/Option.h" +#include "ProgramOptions2/Section.h" #define ARANGODB_PROGRAM_OPTIONS_PROGNAME "#progname#" @@ -45,30 +45,51 @@ class ProgramOptions { // struct containing the option processing result class ProcessingResult { public: - ProcessingResult() : _positionals(), _touched(), _failed(false) {} + ProcessingResult() : _positionals(), _touched(), _frozen(), _failed(false) {} ~ProcessingResult() = default; // mark an option as being touched during options processing void touch(std::string const& name) { _touched.emplace(name); } - // whether or not an option was touched during options processing + + // whether or not an option was touched during options processing, + // including the current pass bool touched(std::string const& name) const { return _touched.find(Option::stripPrefix(name)) != _touched.end(); } + + // mark an option as being frozen + void freeze(std::string const& name) { _frozen.emplace(name); } + + // whether or not an option was touched during options processing, + // not including the current pass + bool frozen(std::string const& name) const { + return _frozen.find(Option::stripPrefix(name)) != _frozen.end(); + } + // mark options processing as failed void failed(bool value) { _failed = value; } + // whether or not options processing has failed bool failed() const { return _failed; } // values of all positional arguments found std::vector _positionals; + // which options were touched during option processing + // this includes options that are touched in the current pass std::unordered_set _touched; + + // which options were touched during option processing + // this does not include options that are touched in the current pass + std::unordered_set _frozen; + // whether or not options processing failed bool _failed; }; // function type for determining terminal width typedef std::function TerminalWidthFuncType; + // function type for determining the similarity between two strings typedef std::function SimilarityFuncType; @@ -79,8 +100,8 @@ class ProgramOptions { ProgramOptions(char const* progname, std::string const& usage, std::string const& more, - TerminalWidthFuncType const& terminalWidth, - SimilarityFuncType const& similarity) + TerminalWidthFuncType const& terminalWidth = TRI_ColumnsWidth, + SimilarityFuncType const& similarity = TRI_Levenshtein) : _progname(progname), _usage(usage), _more(more), @@ -114,10 +135,8 @@ class ProgramOptions { checkIfSealed(); _overrideOptions = value; } - - bool allowOverride() const { - return _overrideOptions; - } + + bool allowOverride() const { return _overrideOptions; } // set context for error reporting void setContext(std::string const& value) { _context = value; } @@ -167,7 +186,8 @@ class ProgramOptions { // prints a help for all options, or the options of a section // the special search string "*" will show help for all sections - // the special search string "." will show help for all sections, even if hidden + // the special search string "." will show help for all sections, even if + // hidden void printHelp(std::string const& search) const { printUsage(); @@ -198,10 +218,11 @@ class ProgramOptions { } // returns a VPack representation of the option values - VPackBuilder toVPack(bool onlyTouched, std::unordered_set const& exclude) const { + VPackBuilder toVPack(bool onlyTouched, + std::unordered_set const& exclude) const { VPackBuilder builder; builder.openObject(); - + walk([&builder, &exclude](Section const&, Option const& option) { std::string full(option.fullName()); if (exclude.find(full) != exclude.end()) { @@ -271,10 +292,10 @@ class ProgramOptions { // sets a value for an option bool setValue(std::string const& name, std::string const& value) { - if (!_overrideOptions && _processingResult.touched(name)) { - // option already set. don't override it + if (!_overrideOptions && _processingResult.frozen(name)) { + // option already frozen. don't override it return true; - } + } auto parts = Option::splitName(name); auto it = _sections.find(parts.first); @@ -313,6 +334,16 @@ class ProgramOptions { return true; } + // finalizes a pass, copying touched into frozen + void endPass() { + if (!_overrideOptions) { + return; + } + for (auto const& it : _processingResult._touched) { + _processingResult.freeze(it); + } + } + // check whether or not an option requires a value bool requiresValue(std::string const& name) const { auto parts = Option::splitName(name); diff --git a/lib/Rest/Endpoint.cpp b/lib/Rest/Endpoint.cpp index 5e48402d95..e4feb7e3db 100644 --- a/lib/Rest/Endpoint.cpp +++ b/lib/Rest/Endpoint.cpp @@ -23,7 +23,7 @@ #include "Endpoint.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/socket-utils.h" #include "Basics/StringUtils.h" diff --git a/lib/Rest/EndpointIp.cpp b/lib/Rest/EndpointIp.cpp index 67d11d2055..80ed29f3cd 100644 --- a/lib/Rest/EndpointIp.cpp +++ b/lib/Rest/EndpointIp.cpp @@ -25,7 +25,7 @@ #include "EndpointIp.h" #include "Basics/StringUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Rest/Endpoint.h" diff --git a/lib/Rest/EndpointList.cpp b/lib/Rest/EndpointList.cpp index 16370fae5f..61199a2292 100644 --- a/lib/Rest/EndpointList.cpp +++ b/lib/Rest/EndpointList.cpp @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////// #include "EndpointList.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" using namespace arangodb::basics; diff --git a/lib/Rest/EndpointUnixDomain.cpp b/lib/Rest/EndpointUnixDomain.cpp index 729a36838f..dd75cdb033 100644 --- a/lib/Rest/EndpointUnixDomain.cpp +++ b/lib/Rest/EndpointUnixDomain.cpp @@ -25,7 +25,7 @@ #include "Basics/Common.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Rest/Endpoint.h" diff --git a/lib/Rest/HttpRequest.cpp b/lib/Rest/HttpRequest.cpp index 1e2f4cf0e5..bf9eaf7929 100644 --- a/lib/Rest/HttpRequest.cpp +++ b/lib/Rest/HttpRequest.cpp @@ -24,7 +24,7 @@ #include "HttpRequest.h" #include "Basics/conversions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringBuffer.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" diff --git a/lib/Rest/InitializeRest.cpp b/lib/Rest/InitializeRest.cpp index f105ace9a0..5bd7aab4cf 100644 --- a/lib/Rest/InitializeRest.cpp +++ b/lib/Rest/InitializeRest.cpp @@ -34,7 +34,7 @@ #error missing thread support for openssl, please recomple OpenSSL with threads #endif -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/RandomGenerator.h" #include "Basics/error.h" #include "Basics/files.h" @@ -73,7 +73,7 @@ void setter(CRYPTO_THREADID* id, T p) { #else template void setter(CRYPTO_THREADID* id, T p) { - CRYPTO_THREADID_set_pointer(id, (void *) (intptr_t) p); + CRYPTO_THREADID_set_pointer(id, (void*)(intptr_t)p); } #endif @@ -147,7 +147,7 @@ using namespace arangodb::basics; namespace arangodb { namespace rest { -void InitializeRest(int argc, char* argv[]) { +void InitializeRest() { TRI_InitializeMemory(); TRI_InitializeDebugging(); TRI_InitializeError(); @@ -155,7 +155,7 @@ void InitializeRest(int argc, char* argv[]) { TRI_InitializeMimetypes(); Logger::initialize(false); TRI_InitializeRandom(); - TRI_InitializeProcess(argc, argv); + TRI_InitializeProcess(); // use the rng so the linker does not remove it from the executable // we might need it later because .so files might refer to the symbols diff --git a/lib/Rest/InitializeRest.h b/lib/Rest/InitializeRest.h index 0ea8d8401c..eda1c59cf6 100644 --- a/lib/Rest/InitializeRest.h +++ b/lib/Rest/InitializeRest.h @@ -38,7 +38,7 @@ namespace rest { /// @brief initialize function //////////////////////////////////////////////////////////////////////////////// -extern void InitializeRest(int argc, char* argv[]); +extern void InitializeRest(); //////////////////////////////////////////////////////////////////////////////// /// @brief shutdown function @@ -52,9 +52,9 @@ extern void ShutdownRest(); /// @brief initialize //////////////////////////////////////////////////////////////////////////////// -#define TRIAGENS_REST_INITIALIZE(a, b) \ - do { \ - arangodb::rest::InitializeRest((a), (b)); \ +#define TRIAGENS_REST_INITIALIZE() \ + do { \ + arangodb::rest::InitializeRest(); \ } while (0) //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/SimpleHttpClient/ClientConnection.cpp b/lib/SimpleHttpClient/ClientConnection.cpp index 6004954079..d9db29931a 100644 --- a/lib/SimpleHttpClient/ClientConnection.cpp +++ b/lib/SimpleHttpClient/ClientConnection.cpp @@ -64,6 +64,12 @@ ClientConnection::ClientConnection(Endpoint* endpoint, double requestTimeout, : GeneralClientConnection(endpoint, requestTimeout, connectTimeout, connectRetries) {} +ClientConnection::ClientConnection(std::unique_ptr& endpoint, + double requestTimeout, double connectTimeout, + size_t connectRetries) + : GeneralClientConnection(endpoint, requestTimeout, connectTimeout, + connectRetries) {} + //////////////////////////////////////////////////////////////////////////////// /// @brief destroys a client connection //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/SimpleHttpClient/ClientConnection.h b/lib/SimpleHttpClient/ClientConnection.h index 2300a9ba03..dbafe96d9c 100644 --- a/lib/SimpleHttpClient/ClientConnection.h +++ b/lib/SimpleHttpClient/ClientConnection.h @@ -47,6 +47,8 @@ class ClientConnection final : public GeneralClientConnection { ////////////////////////////////////////////////////////////////////////////// ClientConnection(arangodb::rest::Endpoint* endpoint, double, double, size_t); + ClientConnection(std::unique_ptr& endpoint, double, + double, size_t); ////////////////////////////////////////////////////////////////////////////// /// @brief destroys a client connection diff --git a/lib/SimpleHttpClient/GeneralClientConnection.cpp b/lib/SimpleHttpClient/GeneralClientConnection.cpp index 3fd22e6072..65024998c4 100644 --- a/lib/SimpleHttpClient/GeneralClientConnection.cpp +++ b/lib/SimpleHttpClient/GeneralClientConnection.cpp @@ -38,6 +38,19 @@ GeneralClientConnection::GeneralClientConnection(Endpoint* endpoint, double connectTimeout, size_t connectRetries) : _endpoint(endpoint), + _freeEndpointOnDestruction(false), + _requestTimeout(requestTimeout), + _connectTimeout(connectTimeout), + _connectRetries(connectRetries), + _numConnectRetries(0), + _isConnected(false), + _isInterrupted(false) {} + +GeneralClientConnection::GeneralClientConnection( + std::unique_ptr& endpoint, double requestTimeout, + double connectTimeout, size_t connectRetries) + : _endpoint(endpoint.release()), + _freeEndpointOnDestruction(true), _requestTimeout(requestTimeout), _connectTimeout(connectTimeout), _connectRetries(connectRetries), @@ -49,7 +62,11 @@ GeneralClientConnection::GeneralClientConnection(Endpoint* endpoint, /// @brief destroys a client connection //////////////////////////////////////////////////////////////////////////////// -GeneralClientConnection::~GeneralClientConnection() {} +GeneralClientConnection::~GeneralClientConnection() { + if (_freeEndpointOnDestruction) { + delete _endpoint; + } +} //////////////////////////////////////////////////////////////////////////////// /// @brief create a new connection from an endpoint @@ -69,6 +86,20 @@ GeneralClientConnection* GeneralClientConnection::factory( return nullptr; } +GeneralClientConnection* GeneralClientConnection::factory( + std::unique_ptr& endpoint, double requestTimeout, double connectTimeout, + size_t numRetries, uint32_t sslProtocol) { + if (endpoint->getEncryption() == Endpoint::ENCRYPTION_NONE) { + return new ClientConnection(endpoint, requestTimeout, connectTimeout, + numRetries); + } else if (endpoint->getEncryption() == Endpoint::ENCRYPTION_SSL) { + return new SslClientConnection(endpoint, requestTimeout, connectTimeout, + numRetries, sslProtocol); + } + + return nullptr; +} + //////////////////////////////////////////////////////////////////////////////// /// @brief connect //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/SimpleHttpClient/GeneralClientConnection.h b/lib/SimpleHttpClient/GeneralClientConnection.h index 6c79a085e1..99bddb809b 100644 --- a/lib/SimpleHttpClient/GeneralClientConnection.h +++ b/lib/SimpleHttpClient/GeneralClientConnection.h @@ -55,6 +55,9 @@ class GeneralClientConnection { GeneralClientConnection(arangodb::rest::Endpoint* endpoint, double, double, size_t); + GeneralClientConnection(std::unique_ptr& endpoint, + double, double, size_t); + ////////////////////////////////////////////////////////////////////////////// /// @brief destroys a client connection ////////////////////////////////////////////////////////////////////////////// @@ -69,6 +72,10 @@ class GeneralClientConnection { static GeneralClientConnection* factory(arangodb::rest::Endpoint*, double, double, size_t, uint32_t); + static GeneralClientConnection* factory( + std::unique_ptr&, double, double, size_t, + uint32_t); + ////////////////////////////////////////////////////////////////////////////// /// @brief return the endpoint ////////////////////////////////////////////////////////////////////////////// @@ -194,6 +201,7 @@ class GeneralClientConnection { ////////////////////////////////////////////////////////////////////////////// arangodb::rest::Endpoint* _endpoint; + bool _freeEndpointOnDestruction; ////////////////////////////////////////////////////////////////////////////// /// @brief request timeout (in seconds) diff --git a/lib/SimpleHttpClient/SimpleHttpClient.cpp b/lib/SimpleHttpClient/SimpleHttpClient.cpp index fc1236e8b7..842ed1db0a 100644 --- a/lib/SimpleHttpClient/SimpleHttpClient.cpp +++ b/lib/SimpleHttpClient/SimpleHttpClient.cpp @@ -24,7 +24,7 @@ #include "SimpleHttpClient.h" #include "Basics/JsonHelper.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "GeneralClientConnection.h" #include "SimpleHttpClient/SimpleHttpResult.h" @@ -39,7 +39,7 @@ namespace httpclient { /// @brief empty map, used for headers //////////////////////////////////////////////////////////////////////////////// -std::map const SimpleHttpClient::NoHeaders; +std::map const SimpleHttpClient::NO_HEADERS; // ----------------------------------------------------------------------------- // constructors and destructors @@ -62,6 +62,7 @@ SimpleHttpClient::SimpleHttpClient(GeneralClientConnection* connection, _maxRetries(3), _retryWaitTime(1 * 1000 * 1000), _retryMessage(), + _deleteConnectionOnDestruction(false), _keepConnectionOnDestruction(false), _warn(warn), _keepAlive(true), @@ -74,12 +75,24 @@ SimpleHttpClient::SimpleHttpClient(GeneralClientConnection* connection, } } +SimpleHttpClient::SimpleHttpClient( + std::unique_ptr& connection, double requestTimeout, + bool warn) + : SimpleHttpClient(connection.get(), requestTimeout, warn) { + _deleteConnectionOnDestruction = true; + connection.release(); +} + SimpleHttpClient::~SimpleHttpClient() { // connection may have been invalidated by other objects if (_connection != nullptr) { if (!_keepConnectionOnDestruction || !_connection->isConnected()) { _connection->disconnect(); } + + if (_deleteConnectionOnDestruction) { + delete _connection; + } } } @@ -87,6 +100,21 @@ SimpleHttpClient::~SimpleHttpClient() { // public methods // ----------------------------------------------------------------------------- +void SimpleHttpClient::setInterrupted(bool value) { + if (_connection != nullptr) { + _connection->setInterrupted(value); + } +} + +bool SimpleHttpClient::isConnected() { return _connection->isConnected(); } + +void SimpleHttpClient::disconnect() { _connection->disconnect(); } + +std::string SimpleHttpClient::getEndpointSpecification() const { + return _connection == nullptr ? "unknown" + : _connection->getEndpointSpecification(); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief close connection //////////////////////////////////////////////////////////////////////////////// @@ -112,7 +140,7 @@ void SimpleHttpClient::close() { SimpleHttpResult* SimpleHttpClient::retryRequest( rest::HttpRequest::HttpRequestType method, std::string const& location, char const* body, size_t bodyLength) { - return retryRequest(method, location, body, bodyLength, NoHeaders); + return retryRequest(method, location, body, bodyLength, NO_HEADERS); } //////////////////////////////////////////////////////////////////////////////// @@ -147,7 +175,8 @@ SimpleHttpResult* SimpleHttpClient::retryRequest( } if (!_retryMessage.empty() && (_maxRetries - tries) > 0) { - LOG(WARN) << "" << _retryMessage << " - retries left: " << (_maxRetries - tries); + LOG(WARN) << "" << _retryMessage + << " - retries left: " << (_maxRetries - tries); } #ifdef _WIN32 @@ -168,7 +197,7 @@ SimpleHttpResult* SimpleHttpClient::retryRequest( SimpleHttpResult* SimpleHttpClient::request( rest::HttpRequest::HttpRequestType method, std::string const& location, char const* body, size_t bodyLength) { - return doRequest(method, location, body, bodyLength, NoHeaders); + return doRequest(method, location, body, bodyLength, NO_HEADERS); } //////////////////////////////////////////////////////////////////////////////// @@ -198,7 +227,7 @@ SimpleHttpResult* SimpleHttpClient::doRequest( TRI_ASSERT(_result == nullptr); // create a new result - _result = new SimpleHttpResult; + _result = new SimpleHttpResult(); // reset error message _errorMessage = ""; diff --git a/lib/SimpleHttpClient/SimpleHttpClient.h b/lib/SimpleHttpClient/SimpleHttpClient.h index d2bc9e9f74..2f1f940a0f 100644 --- a/lib/SimpleHttpClient/SimpleHttpClient.h +++ b/lib/SimpleHttpClient/SimpleHttpClient.h @@ -28,7 +28,7 @@ #include "Basics/Common.h" #include "Basics/StringBuffer.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Rest/HttpRequest.h" namespace arangodb { @@ -62,18 +62,14 @@ class SimpleHttpClient { DEAD }; - ////////////////////////////////////////////////////////////////////////////// - /// @brief constructs a new http client - ////////////////////////////////////////////////////////////////////////////// - + public: + SimpleHttpClient(std::unique_ptr&, double, bool); SimpleHttpClient(GeneralClientConnection*, double, bool); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief destructs a http client - ////////////////////////////////////////////////////////////////////////////// - ~SimpleHttpClient(); + public: + void setInterrupted(bool value); + ////////////////////////////////////////////////////////////////////////////// /// @brief invalidates the connection used by the client /// this may be called from other objects that are responsible for managing @@ -83,6 +79,24 @@ class SimpleHttpClient { void invalidateConnection() { _connection = nullptr; } + ////////////////////////////////////////////////////////////////////////////// + /// @brief checks if the connection is open + ////////////////////////////////////////////////////////////////////////////// + + bool isConnected(); + + ////////////////////////////////////////////////////////////////////////////// + /// @brief checks if the connection is open + ////////////////////////////////////////////////////////////////////////////// + + void disconnect(); + + ////////////////////////////////////////////////////////////////////////////// + /// @brief returns a string representation of the connection endpoint + ////////////////////////////////////////////////////////////////////////////// + + std::string getEndpointSpecification() const; + ////////////////////////////////////////////////////////////////////////////// /// @brief close connection, go to state IN_CONNECT and clear the input /// buffer. This is used to organise a retry of the connection. @@ -404,10 +418,10 @@ class SimpleHttpClient { std::string _retryMessage; private: - ////////////////////////////////////////////////////////////////////////////// - /// @brief flag whether or not we keep the connection on destruction - ////////////////////////////////////////////////////////////////////////////// + // flag whether or not to delete the connection on destruction + bool _deleteConnectionOnDestruction; + // flag whether or not we keep the connection on destruction bool _keepConnectionOnDestruction; bool _warn; @@ -418,11 +432,8 @@ class SimpleHttpClient { bool _supportDeflate; - ////////////////////////////////////////////////////////////////////////////// - /// @brief empty map, used for headers - ////////////////////////////////////////////////////////////////////////////// - - static std::map const NoHeaders; + // empty map, used for headers + static std::map const NO_HEADERS; }; } } diff --git a/lib/SimpleHttpClient/SslClientConnection.cpp b/lib/SimpleHttpClient/SslClientConnection.cpp index 48930ff4d4..09c137d3a4 100644 --- a/lib/SimpleHttpClient/SslClientConnection.cpp +++ b/lib/SimpleHttpClient/SslClientConnection.cpp @@ -116,6 +116,56 @@ SslClientConnection::SslClientConnection(Endpoint* endpoint, } } +SslClientConnection::SslClientConnection(std::unique_ptr& endpoint, + double requestTimeout, + double connectTimeout, + size_t connectRetries, + uint32_t sslProtocol) + : GeneralClientConnection(endpoint, requestTimeout, connectTimeout, + connectRetries), + _ssl(nullptr), + _ctx(nullptr) { + TRI_invalidatesocket(&_socket); + + SSL_METHOD SSL_CONST* meth = nullptr; + + switch (protocol_e(sslProtocol)) { +#ifndef OPENSSL_NO_SSL2 + case SSL_V2: + meth = SSLv2_method(); + break; +#endif + +#ifndef OPENSSL_NO_SSL3_METHOD + case SSL_V3: + meth = SSLv3_method(); + break; +#endif + + case SSL_V23: + meth = SSLv23_method(); + break; + + case TLS_V1: + meth = TLSv1_method(); + break; + + default: + // fallback is to use tlsv1 + meth = TLSv1_method(); + } + + _ctx = SSL_CTX_new(meth); + + if (_ctx != nullptr) { + SSL_CTX_set_cipher_list(_ctx, "ALL"); + + bool sslCache = true; + SSL_CTX_set_session_cache_mode( + _ctx, sslCache ? SSL_SESS_CACHE_SERVER : SSL_SESS_CACHE_OFF); + } +} + //////////////////////////////////////////////////////////////////////////////// /// @brief destroys a client connection //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/SimpleHttpClient/SslClientConnection.h b/lib/SimpleHttpClient/SslClientConnection.h index 47f06914cd..c3cbafa35a 100644 --- a/lib/SimpleHttpClient/SslClientConnection.h +++ b/lib/SimpleHttpClient/SslClientConnection.h @@ -53,6 +53,9 @@ class SslClientConnection final : public GeneralClientConnection { SslClientConnection(arangodb::rest::Endpoint* endpoint, double, double, size_t, uint32_t); + SslClientConnection(std::unique_ptr& endpoint, + double, double, size_t, uint32_t); + ////////////////////////////////////////////////////////////////////////////// /// @brief destroys a client connection ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/Utilities/ScriptLoader.cpp b/lib/Utilities/ScriptLoader.cpp index c34a89b954..ab79196a84 100644 --- a/lib/Utilities/ScriptLoader.cpp +++ b/lib/Utilities/ScriptLoader.cpp @@ -24,7 +24,7 @@ #include "ScriptLoader.h" #include "Basics/MutexLocker.h" #include "Basics/files.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Basics/StringUtils.h" diff --git a/lib/V8/JSLoader.cpp b/lib/V8/JSLoader.cpp index b45dd15282..0288e28877 100644 --- a/lib/V8/JSLoader.cpp +++ b/lib/V8/JSLoader.cpp @@ -23,7 +23,7 @@ #include "JSLoader.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "V8/v8-utils.h" diff --git a/lib/V8/V8LineEditor.cpp b/lib/V8/V8LineEditor.cpp index faa14ee77e..3fb342fba3 100644 --- a/lib/V8/V8LineEditor.cpp +++ b/lib/V8/V8LineEditor.cpp @@ -23,7 +23,7 @@ #include "V8LineEditor.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/tri-strings.h" #include "Utilities/Completer.h" #include "Utilities/ShellBase.h" diff --git a/lib/V8/v8-conv.cpp b/lib/V8/v8-conv.cpp index 86f175974d..c395d84a7d 100644 --- a/lib/V8/v8-conv.cpp +++ b/lib/V8/v8-conv.cpp @@ -24,7 +24,7 @@ #include "v8-conv.h" #include "Basics/Exceptions.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/StringUtils.h" #include "Basics/tri-strings.h" #include "V8/v8-utils.h" diff --git a/lib/V8/v8-globals.h b/lib/V8/v8-globals.h index 7e8f062efe..1959f741d5 100644 --- a/lib/V8/v8-globals.h +++ b/lib/V8/v8-globals.h @@ -77,6 +77,10 @@ static const uint32_t V8DataSlot = 0; v8::String::NewFromOneByte(isolate, (uint8_t const*)(name), \ v8::String::kNormalString, (int)strlen(name)) +#define TRI_V8_ASCII_STRING2(isolate, name) \ + v8::String::NewFromOneByte(isolate, (uint8_t const*)(name), \ + v8::String::kNormalString, (int)strlen(name)) + //////////////////////////////////////////////////////////////////////////////// /// @brief shortcut for creating a v8 symbol for the specified string /// implicites isolate available. @@ -98,6 +102,10 @@ static const uint32_t V8DataSlot = 0; v8::String::NewFromUtf8(isolate, (name), v8::String::kNormalString, \ (int)strlen(name)) +#define TRI_V8_STRING2(isolate, name) \ + v8::String::NewFromUtf8(isolate, (name), v8::String::kNormalString, \ + (int)strlen(name)) + //////////////////////////////////////////////////////////////////////////////// /// @brief shortcut for creating a v8 symbol for the specified string /// implicites isolate available. @@ -108,6 +116,10 @@ static const uint32_t V8DataSlot = 0; v8::String::NewFromUtf8(isolate, name.c_str(), v8::String::kNormalString, \ (int)name.length()) +#define TRI_V8_STD_STRING2(isolate, name) \ + v8::String::NewFromUtf8(isolate, name.c_str(), v8::String::kNormalString, \ + (int)name.length()) + //////////////////////////////////////////////////////////////////////////////// /// @brief shortcut for creating a v8 symbol for the specified string /// implicites isolate available. diff --git a/lib/V8/v8-utils.cpp b/lib/V8/v8-utils.cpp index 00f6ae0b01..9d3e605752 100644 --- a/lib/V8/v8-utils.cpp +++ b/lib/V8/v8-utils.cpp @@ -34,7 +34,7 @@ #include "Basics/Exceptions.h" #include "Basics/files.h" #include "Basics/FileUtils.h" -#include "Basics/Logger.h" +#include "Logger/Logger.h" #include "Basics/Nonce.h" #include "Basics/process-utils.h" #include "Basics/ProgramOptions.h" @@ -3874,18 +3874,23 @@ v8::Handle TRI_ExecuteJavaScriptString( v8::Handle print = v8::Handle::Cast(context->Global()->Get(printFuncName)); - v8::Handle arguments[] = {result}; - print->Call(print, 1, arguments); + if (print->IsFunction()) { + v8::Handle arguments[] = {result}; + print->Call(print, 1, arguments); - if (tryCatch.HasCaught()) { - if (tryCatch.CanContinue()) { - TRI_LogV8Exception(isolate, &tryCatch); - } else { - TRI_GET_GLOBALS(); - v8g->_canceled = true; - return scope.Escape(v8::Undefined(isolate)); + if (tryCatch.HasCaught()) { + if (tryCatch.CanContinue()) { + TRI_LogV8Exception(isolate, &tryCatch); + } else { + TRI_GET_GLOBALS(); + v8g->_canceled = true; + return scope.Escape(v8::Undefined(isolate)); + } } } + else { + LOG(ERR) << "no output function defined in Javascript context"; + } } return scope.Escape(result); @@ -4287,15 +4292,19 @@ void TRI_InitV8Utils(v8::Isolate* isolate, v8::Handle context, TRI_AddGlobalVariableVocbase(isolate, context, TRI_V8_ASCII_STRING("MODULES_PATH"), V8PathList(isolate, modules)); + TRI_AddGlobalVariableVocbase(isolate, context, TRI_V8_ASCII_STRING("STARTUP_PATH"), TRI_V8_STD_STRING(startupPath)); + TRI_AddGlobalVariableVocbase(isolate, context, TRI_V8_ASCII_STRING("PATH_SEPARATOR"), TRI_V8_ASCII_STRING(TRI_DIR_SEPARATOR_STR)); + TRI_AddGlobalVariableVocbase( isolate, context, TRI_V8_ASCII_STRING("VALGRIND"), - RUNNING_ON_VALGRIND > 0 ? v8::True(isolate) : v8::False(isolate)); + v8::Boolean::New(isolate, (RUNNING_ON_VALGRIND > 0))); + #ifdef COVERAGE TRI_AddGlobalVariableVocbase( isolate, context, TRI_V8_ASCII_STRING("COVERAGE"), v8::True(isolate)); @@ -4303,6 +4312,7 @@ void TRI_InitV8Utils(v8::Isolate* isolate, v8::Handle context, TRI_AddGlobalVariableVocbase( isolate, context, TRI_V8_ASCII_STRING("COVERAGE"), v8::False(isolate)); #endif + TRI_AddGlobalVariableVocbase(isolate, context, TRI_V8_ASCII_STRING("VERSION"), TRI_V8_ASCII_STRING(ARANGODB_VERSION)); diff --git a/scripts/unittest b/scripts/unittest index 4e69a39325..5be73735c2 100755 --- a/scripts/unittest +++ b/scripts/unittest @@ -15,7 +15,6 @@ ulimit -n 2048 export PORT=`expr 1024 + $RANDOM` export ETCD_NONO_WAL_SYNC=1 - if [ -z "${ARANGOSH}" ]; then if [ -x build/bin/arangosh ]; then ARANGOSH=build/bin/arangosh