mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into vpack
This commit is contained in:
commit
32d0e48d61
|
@ -71,7 +71,7 @@ set (V8_BUILD_COMMAND $(MAKE) -f Makefile-v8 strictaliasing=off
|
|||
CXX="${CMAKE_CXX_COMPILER}" PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
CXXFLAGS=${CMAKE_CXX_FLAGS})
|
||||
if (APPLE AND CMAKE_COMPILER_IS_CLANG)
|
||||
set (V8_BUILD_COMMAND "${V8_BUILD_COMMAND} LDFLAGS=-stdlib=libc++")
|
||||
set (V8_BUILD_COMMAND ${V8_BUILD_COMMAND} LDFLAGS=-stdlib=libc++)
|
||||
endif()
|
||||
ExternalProject_Add(v8_build SOURCE_DIR "${V8_DIR}"
|
||||
BUILD_IN_SOURCE TRUE BUILD_COMMAND "${V8_BUILD_COMMAND}"
|
||||
|
|
|
@ -28,6 +28,8 @@ endif
|
|||
|
||||
V8DIR=@V8_DIR@
|
||||
|
||||
export PYTHON_EXECUTABLE=@PYTHON_EXECUTABLE@
|
||||
|
||||
@V8_LIBS@: @srcdir@/.v8-build-@TRI_BITS@
|
||||
|
||||
@srcdir@/.v8-build-@TRI_BITS@:
|
||||
|
@ -45,7 +47,7 @@ if ENABLE_ARMV6
|
|||
if ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -59,7 +61,7 @@ if ENABLE_V8_DEBUG
|
|||
else
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -80,7 +82,7 @@ if ENABLE_ARMV7
|
|||
if ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Darm_fpu=vfp -Darm_version=6 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -94,7 +96,7 @@ if ENABLE_V8_DEBUG
|
|||
else
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS=" -Darm_version=7 -Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -115,7 +117,7 @@ if ENABLE_DARWIN
|
|||
if ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -134,7 +136,7 @@ if ENABLE_V8_DEBUG
|
|||
else # ! ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -154,7 +156,7 @@ else # ! ENABLE_DARWIN
|
|||
if ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
@ -167,7 +169,7 @@ if ENABLE_V8_DEBUG
|
|||
else # ! ENABLE_V8_DEBUG
|
||||
cd @top_srcdir@/3rdParty/$(V8DIR) \
|
||||
&& export GYPFLAGS="-Dstandalone_static_library=1 $(GOLD_V8_GYP)" \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) -f Makefile-v8 \
|
||||
CC="$(CC)" \
|
||||
CC.host="$(CC)" \
|
||||
CXX="$(CXX)" \
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#define _WIN32_WINNT 0x501
|
||||
#endif // __MINGW32__
|
||||
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <dbghelp.h> // For SymLoadModule64 and al.
|
||||
//#include <dbghelp.h> // For SymLoadModule64 and al.
|
||||
#include <errno.h> // For STRUNCATE
|
||||
#endif // !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <limits.h> // For INT_MAX and al.
|
||||
|
|
|
@ -1261,7 +1261,7 @@
|
|||
'variables': {
|
||||
'gyp_generators': '<!(echo $GYP_GENERATORS)',
|
||||
},
|
||||
'msvs_disabled_warnings': [4351, 4355, 4800],
|
||||
'msvs_disabled_warnings': [4312, 4351, 4355, 4800],
|
||||
}],
|
||||
['component=="shared_library"', {
|
||||
'defines': [
|
||||
|
@ -1567,7 +1567,7 @@
|
|||
'../../src/base/platform/platform-win32.cc',
|
||||
'../../src/base/win32-headers.h',
|
||||
],
|
||||
'msvs_disabled_warnings': [4351, 4355, 4800],
|
||||
'msvs_disabled_warnings': [4312, 4351, 4355, 4800],
|
||||
'link_settings': {
|
||||
'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
|
||||
},
|
||||
|
|
|
@ -176,7 +176,7 @@ describe ArangoDB do
|
|||
found.should eq(true)
|
||||
doc = ArangoDB.log_delete(@prefix, "#{@api}/" + id)
|
||||
doc.code.should eq(200)
|
||||
sleep 1
|
||||
sleep 5
|
||||
doc = ArangoDB.log_get("#{@prefix}-current", @current)
|
||||
found = contains_query doc.body, @query
|
||||
found.should eq(false)
|
||||
|
|
|
@ -2,7 +2,7 @@ class base {
|
|||
public:
|
||||
virtual int foo(int a)
|
||||
{ return 4 + a; }
|
||||
int bar(int a) final
|
||||
int bar(int a)
|
||||
{ return a - 2; }
|
||||
};
|
||||
|
||||
|
@ -12,10 +12,17 @@ public:
|
|||
{ return 8 + 2 * a; };
|
||||
};
|
||||
|
||||
class sub2 final : public base {
|
||||
public:
|
||||
virtual int foo(int a) override final
|
||||
{ return 8 + 2 * a; };
|
||||
};
|
||||
|
||||
int main(void)
|
||||
{
|
||||
base b;
|
||||
sub s;
|
||||
sub2 t;
|
||||
|
||||
return (b.foo(2) * 2 == s.foo(2)) ? 0 : 1;
|
||||
return (b.foo(2) * 2 == s.foo(2) && b.foo(2) * 2 == t.foo(2) ) ? 0 : 1;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
#.rst:
|
||||
# SelectLibraryConfigurations
|
||||
# ---------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
# select_library_configurations( basename )
|
||||
#
|
||||
# This macro takes a library base name as an argument, and will choose
|
||||
# good values for basename_LIBRARY, basename_LIBRARIES,
|
||||
# basename_LIBRARY_DEBUG, and basename_LIBRARY_RELEASE depending on what
|
||||
# has been found and set. If only basename_LIBRARY_RELEASE is defined,
|
||||
# basename_LIBRARY will be set to the release value, and
|
||||
# basename_LIBRARY_DEBUG will be set to basename_LIBRARY_DEBUG-NOTFOUND.
|
||||
# If only basename_LIBRARY_DEBUG is defined, then basename_LIBRARY will
|
||||
# take the debug value, and basename_LIBRARY_RELEASE will be set to
|
||||
# basename_LIBRARY_RELEASE-NOTFOUND.
|
||||
#
|
||||
# If the generator supports configuration types, then basename_LIBRARY
|
||||
# and basename_LIBRARIES will be set with debug and optimized flags
|
||||
# specifying the library to be used for the given configuration. If no
|
||||
# build type has been set or the generator in use does not support
|
||||
# configuration types, then basename_LIBRARY and basename_LIBRARIES will
|
||||
# take only the release value, or the debug value if the release one is
|
||||
# not set.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
|
||||
# Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
macro( select_library_configurations basename )
|
||||
if(NOT ${basename}_LIBRARY_RELEASE)
|
||||
set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
if(NOT ${basename}_LIBRARY_DEBUG)
|
||||
set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.")
|
||||
endif()
|
||||
|
||||
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
|
||||
NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND
|
||||
( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) )
|
||||
# if the generator supports configuration types or CMAKE_BUILD_TYPE
|
||||
# is set, then set optimized and debug options.
|
||||
set( ${basename}_LIBRARY "" )
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE )
|
||||
list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
|
||||
endforeach()
|
||||
foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG )
|
||||
list( APPEND ${basename}_LIBRARY debug "${_libname}" )
|
||||
endforeach()
|
||||
elseif( ${basename}_LIBRARY_RELEASE )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
|
||||
elseif( ${basename}_LIBRARY_DEBUG )
|
||||
set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} )
|
||||
else()
|
||||
set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
|
||||
|
||||
if( ${basename}_LIBRARY )
|
||||
set( ${basename}_FOUND TRUE )
|
||||
endif()
|
||||
|
||||
mark_as_advanced( ${basename}_LIBRARY_RELEASE
|
||||
${basename}_LIBRARY_DEBUG
|
||||
)
|
||||
endmacro()
|
|
@ -88,7 +88,8 @@ else:
|
|||
echo "Compiling V8 requires a python version 2; please adjust your " `which python`
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PYTHON_EXECUTABLE=`which python`
|
||||
AC_SUBST(PYTHON_EXECUTABLE)
|
||||
dnl ----------------------------------------------------------------------------
|
||||
dnl check for special OS like MacOS X or FreeBSD
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
|
|
@ -280,12 +280,7 @@ actions.defineHttp({
|
|||
var name = body.name;
|
||||
var mount = body.mount;
|
||||
var options = body.options;
|
||||
try {
|
||||
var result = foxxManager.runScript(name, mount, options);
|
||||
return result;
|
||||
} catch (e) {
|
||||
throw e.cause || e;
|
||||
}
|
||||
return foxxManager.runScript(name, mount, options);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -315,7 +315,82 @@ controller.post("/graph-examples/create/:name", function(req, res) {
|
|||
}).summary("Create a sample graph")
|
||||
.notes("This function executes the internal scripts to create one example graph.");
|
||||
|
||||
/** Store job id's in db
|
||||
*
|
||||
* Create a new job id entry in a specific system database with a given id.
|
||||
*
|
||||
*/
|
||||
|
||||
controller.post("/job", function(req, res) {
|
||||
|
||||
if (req.body().id && req.body().collection && req.body().type) {
|
||||
|
||||
//store id in _system
|
||||
db.aardvark.save({
|
||||
id: req.body().id,
|
||||
collection: req.body().collection,
|
||||
type: req.body().type
|
||||
});
|
||||
|
||||
res.json(true);
|
||||
}
|
||||
else {
|
||||
res.json(false);
|
||||
}
|
||||
|
||||
}).summary("Store job id of a running job")
|
||||
.notes("This function stores a job id into a system collection.");
|
||||
|
||||
/** Delete all jobs
|
||||
*
|
||||
* Delete an existing job id entry in a specific system database with a given id.
|
||||
*
|
||||
*/
|
||||
|
||||
controller.del("/job/", function(req, res) {
|
||||
|
||||
db.aardvark.truncate();
|
||||
return res.json(true);
|
||||
|
||||
}).summary("Store job id of a running job")
|
||||
.notes("This function stores a job id into a system collection.");
|
||||
|
||||
/** Delete a job id
|
||||
*
|
||||
* Delete an existing job id entry in a specific system database with a given id.
|
||||
*
|
||||
*/
|
||||
|
||||
controller.del("/job/:id", function(req, res) {
|
||||
|
||||
var id = req.params("id");
|
||||
|
||||
if (id) {
|
||||
db.aardvark.removeByExample({
|
||||
id: id
|
||||
}, true);
|
||||
res.json(true);
|
||||
}
|
||||
else {
|
||||
res.json(false);
|
||||
}
|
||||
|
||||
}).summary("Store job id of a running job")
|
||||
.notes("This function stores a job id into a system collection.");
|
||||
|
||||
/** Return all job id's
|
||||
*
|
||||
* Return all job id's which are stored in a system database.
|
||||
*
|
||||
*/
|
||||
|
||||
controller.get("/job", function(req, res) {
|
||||
|
||||
var result = db.aardvark.all().toArray();
|
||||
res.json(result);
|
||||
|
||||
}).summary("Return all job ids.")
|
||||
.notes("This function returns the job ids of all currently running jobs.");
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -223,8 +223,42 @@
|
|||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
<% if (tabBar) { %>
|
||||
<div class="modal-tabbar">
|
||||
<ul id="infoTab" class="nav nav-tabs">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<li class="active"><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<%} else {%>
|
||||
<li><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<% if (tabBar) { %>
|
||||
<div class="tab-content">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<div class="tab-pane tab-pane-modal active" id="<%=value%>">
|
||||
</div>
|
||||
<%} else {%>
|
||||
<div class="tab-pane tab-pane-modal" id="<%=value%>">
|
||||
</div>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
</div>
|
||||
|
||||
<% if (!hideFooter) { %>
|
||||
<div class="modal-footer">
|
||||
<%
|
||||
|
|
Binary file not shown.
|
@ -242,8 +242,42 @@
|
|||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
<% if (tabBar) { %>
|
||||
<div class="modal-tabbar">
|
||||
<ul id="infoTab" class="nav nav-tabs">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<li class="active"><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<%} else {%>
|
||||
<li><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<% if (tabBar) { %>
|
||||
<div class="tab-content">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<div class="tab-pane tab-pane-modal active" id="<%=value%>">
|
||||
</div>
|
||||
<%} else {%>
|
||||
<div class="tab-pane tab-pane-modal" id="<%=value%>">
|
||||
</div>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
</div>
|
||||
|
||||
<% if (!hideFooter) { %>
|
||||
<div class="modal-footer">
|
||||
<%
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*jshint unused: false */
|
||||
/*global window, $, document */
|
||||
/*global window, $, document, _ */
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
|
@ -55,7 +55,7 @@
|
|||
},
|
||||
|
||||
setCheckboxStatus: function(id) {
|
||||
$.each($(id).find('ul').find('li'), function(key, element) {
|
||||
_.each($(id).find('ul').find('li'), function(element) {
|
||||
if (!$(element).hasClass("nav-header")) {
|
||||
if ($(element).find('input').attr('checked')) {
|
||||
if ($(element).find('i').hasClass('css-round-label')) {
|
||||
|
@ -282,6 +282,149 @@
|
|||
$('.arangoFrame').hide();
|
||||
},
|
||||
|
||||
addAardvarkJob: function (object, callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "POST",
|
||||
url: "/_admin/aardvark/job",
|
||||
data: JSON.stringify(object),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteAardvarkJob: function (id, callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "DELETE",
|
||||
url: "/_admin/aardvark/job/" + encodeURIComponent(id),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteAllAardvarkJobs: function (callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "DELETE",
|
||||
url: "/_admin/aardvark/job",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getAardvarkJobs: function (callback) {
|
||||
var result;
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "GET",
|
||||
url: "/_admin/aardvark/job",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
result = data;
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
getPendingJobs: function() {
|
||||
var result;
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "GET",
|
||||
url: "/_api/job/pending",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
result = data;
|
||||
},
|
||||
error: function(data) {
|
||||
console.log("pending jobs error: " + data);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
syncAndReturnUninishedAardvarkJobs: function(type) {
|
||||
|
||||
var AaJobs = this.getAardvarkJobs(),
|
||||
pendingJobs = this.getPendingJobs(),
|
||||
array = [];
|
||||
|
||||
if (pendingJobs.length > 0) {
|
||||
_.each(AaJobs, function(aardvark) {
|
||||
if (aardvark.type === type || aardvark.type === undefined) {
|
||||
|
||||
var found = false;
|
||||
_.each(pendingJobs, function(pending) {
|
||||
if (aardvark.id === pending) {
|
||||
found = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (found) {
|
||||
this.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
else {
|
||||
array.push({
|
||||
collection: aardvark.collection,
|
||||
id: aardvark.id,
|
||||
type: aardvark.type
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.deleteAllAardvarkJobs();
|
||||
}
|
||||
|
||||
return array;
|
||||
},
|
||||
|
||||
getRandomToken: function () {
|
||||
return Math.round(new Date().getTime());
|
||||
},
|
||||
|
@ -1512,7 +1655,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
},
|
||||
error: function(data) {
|
||||
window.progressView.hide();
|
||||
arangoHelper.arangoNotification(
|
||||
arangoHelper.arangoError(
|
||||
"Document error", "Documents inserted, but could not be removed."
|
||||
);
|
||||
}
|
||||
|
@ -1520,7 +1663,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
},
|
||||
error: function(data) {
|
||||
window.progressView.hide();
|
||||
arangoHelper.arangoNotification("Document error", "Could not move selected documents.");
|
||||
arangoHelper.arangoError("Document error", "Could not move selected documents.");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -1603,7 +1746,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
},
|
||||
error: function(data) {
|
||||
window.progressView.hide();
|
||||
arangoHelper.arangoNotification("Document error", "Could not fetch requested documents.");
|
||||
arangoHelper.arangoError("Document error", "Could not fetch requested documents.");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -2833,13 +2976,21 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
|
||||
createModalHotkeys: function() {
|
||||
//submit modal
|
||||
$(this.el).unbind('keydown');
|
||||
$(this.el).unbind('return');
|
||||
$(this.el).bind('keydown', 'return', function(){
|
||||
$('.createModalDialog .modal-footer .button-success').click();
|
||||
});
|
||||
$("input", $(this.el)).bind('keydown', 'return', function(){
|
||||
|
||||
$('.modal-body input').unbind('keydown');
|
||||
$('.modal-body input').unbind('return');
|
||||
$(".modal-body input", $(this.el)).bind('keydown', 'return', function(){
|
||||
$('.createModalDialog .modal-footer .button-success').click();
|
||||
});
|
||||
$("select", $(this.el)).bind('keydown', 'return', function(){
|
||||
|
||||
$('.modal-body select').unbind('keydown');
|
||||
$('.modal-body select').unbind('return');
|
||||
$(".modal-body select", $(this.el)).bind('keydown', 'return', function(){
|
||||
$('.createModalDialog .modal-footer .button-success').click();
|
||||
});
|
||||
},
|
||||
|
@ -2972,7 +3123,7 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
};
|
||||
},
|
||||
|
||||
show: function(templateName, title, buttons, tableContent, advancedContent, extraInfo, events, noConfirm) {
|
||||
show: function(templateName, title, buttons, tableContent, advancedContent, extraInfo, events, noConfirm, tabBar) {
|
||||
var self = this, lastBtn, confirmMsg, closeButtonFound = false;
|
||||
buttons = buttons || [];
|
||||
noConfirm = Boolean(noConfirm);
|
||||
|
@ -2999,7 +3150,8 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
title: title,
|
||||
buttons: buttons,
|
||||
hideFooter: this.hideFooter,
|
||||
confirm: confirmMsg
|
||||
confirm: confirmMsg,
|
||||
tabBar: tabBar
|
||||
}));
|
||||
_.each(buttons, function(b, i) {
|
||||
if (b.disabled || !b.callback) {
|
||||
|
@ -3015,16 +3167,34 @@ window.StatisticsCollection = Backbone.Collection.extend({
|
|||
}
|
||||
$("#modalButton" + i).bind("click", b.callback);
|
||||
});
|
||||
|
||||
$(this.confirm.no).bind("click", function() {
|
||||
$(self.confirm.list).css("display", "none");
|
||||
});
|
||||
|
||||
var template = templateEngine.createTemplate(templateName);
|
||||
var template;
|
||||
if (typeof templateName === 'string') {
|
||||
template = templateEngine.createTemplate(templateName);
|
||||
$(".createModalDialog .modal-body").html(template.render({
|
||||
content: tableContent,
|
||||
advancedContent: advancedContent,
|
||||
info: extraInfo
|
||||
}));
|
||||
}
|
||||
else {
|
||||
var counter = 0;
|
||||
_.each(templateName, function(v) {
|
||||
template = templateEngine.createTemplate(v);
|
||||
$(".createModalDialog .modal-body .tab-content #" + tabBar[counter]).html(template.render({
|
||||
content: tableContent,
|
||||
advancedContent: advancedContent,
|
||||
info: extraInfo
|
||||
}));
|
||||
|
||||
counter++;
|
||||
});
|
||||
}
|
||||
|
||||
$('.createModalDialog .modalTooltips').tooltip({
|
||||
position: {
|
||||
my: "left top",
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -5497,6 +5497,9 @@ div.headerBar {
|
|||
.select2-drop-active {
|
||||
z-index: 9999999; }
|
||||
|
||||
.modal-tabbar {
|
||||
border-bottom: 1px solid #000; }
|
||||
|
||||
.modal-body {
|
||||
color: #736b68;
|
||||
font-family: 'Open Sans', sans-serif !important;
|
||||
|
@ -5622,13 +5625,15 @@ div.headerBar {
|
|||
.modal-body select {
|
||||
width: 398px; }
|
||||
.modal-body .collectionTh {
|
||||
height: 55px; }
|
||||
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 {
|
||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,3 @@
|
|||
<script src="sharedLibs.js?version=1455026760724"></script>
|
||||
<script src="libs.js?version=1455026760724"></script>
|
||||
<script src="app.js?version=1455026760724"></script>
|
||||
<script src="sharedLibs.js?version=1455532583470"></script>
|
||||
<script src="libs.js?version=1455532583470"></script>
|
||||
<script src="app.js?version=1455532583470"></script>
|
||||
|
|
|
@ -378,6 +378,21 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div></script><script id="dashboardView.ejs" type="text/template"><% var subBar = function(title) { %>
|
||||
<div class="dashboard-sub-bar">
|
||||
<div class="dashboard-sub-bar-title"><%= title %></div>
|
||||
|
@ -787,11 +802,6 @@ if (list.length > 0) {
|
|||
<span title="Download documents as JSON file"><i class="fa fa-download"></i></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="enabled">
|
||||
<a id="indexCollection" class="headerButton">
|
||||
<span class="icon_arangodb_checklist" title="Index collection"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="enabled" style="margin-right: 15px">
|
||||
<a id="filterCollection" class="headerButton">
|
||||
<span class="icon_arangodb_filter" title="Filter collection"></span>
|
||||
|
@ -849,247 +859,6 @@ if (list.length > 0) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="indexHeader" class="headerDropdown">
|
||||
<div class="contentIn" id="indexHeaderContent">
|
||||
<div id="indexEditView">
|
||||
<span class="arangoHeader">Indexes:</span>
|
||||
<table id="collectionEditIndexTable" class="edit-index-table">
|
||||
<thead>
|
||||
<tr class="figuresHeader">
|
||||
<th class="collectionInfoTh">ID</th>
|
||||
<th class="collectionInfoTh">Type</th>
|
||||
<th class="collectionInfoTh">Unique</th>
|
||||
<th class="collectionInfoTh">Sparse</th>
|
||||
<th class="collectionInfoTh">Selectivity Est.</th>
|
||||
<th class="collectionInfoTh">Fields</th>
|
||||
<th class="collectionInfoTh">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="index-button-bar">
|
||||
<button id="addIndex" class="button-success">Add Index</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="newIndexView" class="new-index-view" style="display:none">
|
||||
<span id="newIndexHeader" class="arangoHeader">Add Index:</span>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Type:</th>
|
||||
<th class="">
|
||||
<select id="newIndexType">
|
||||
<option value="Cap">Cap Constraint</option>
|
||||
<option value="Geo">Geo Index</option>
|
||||
<option value="Hash">Hash Index</option>
|
||||
<option value="Fulltext">Fulltext Index</option>
|
||||
<option value="Skiplist">Skip-List Index</option>
|
||||
</select>
|
||||
</th>
|
||||
<th class="" style="width: 18px"/>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="newIndexTypeCap" class="newIndexClass">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Size:</th>
|
||||
<th><input type="text" id="newCapSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal number of documents for the collection.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Bytesize:</th>
|
||||
<th><input type="text" id="newCapByteSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal size of the active document data in the collection. (min = 16384)">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeGeo" class="newIndexClass" style="display: none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newGeoFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list with one or two attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Geo JSON:</th>
|
||||
<th>
|
||||
<input id="newGeoJson" type="checkbox" name="newGeoJson" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial index on a location is constructed and geoJson is true, then the order within the list is longitude followed by latitude.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Constraint:</th>
|
||||
<th>
|
||||
<input id="newGeoConstraint" type="checkbox" name="newGeoConstraint" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If constraint is true, then a geo-spatial constraint is created.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Ignore Null:</th>
|
||||
<th>
|
||||
<input id="newGeoIgnoreNull" type="checkbox" name="newGeoIgnoreNull" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial constraint is created and ignoreNull is true, then documents with a null in location or at least one null in latitude or longitude are ignored.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="newIndexTypeHash" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newHashFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newHashUnique" type="checkbox" name="newHashUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newHashSparse" type="checkbox" name="newHashSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeFulltext" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newFulltextFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title='A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of fields should look like this for example: [ "text" ].'>
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Min. length:</th>
|
||||
<th><input type="text" id="newFulltextMinLength" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="newIndexTypeSkiplist" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newSkiplistFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newSkiplistUnique" type="checkbox" name="newSkiplistUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newSkiplistSparse" type="checkbox" name="newSkiplistSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="index-button-bar">
|
||||
<button id="createIndex" class="button-success">Save</button>
|
||||
<button id="cancelIndex" class="button-danger">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="documentsDiv" class="innerContent">
|
||||
|
@ -1117,21 +886,6 @@ if (list.length > 0) {
|
|||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteBtn" class="button-danger" style="float:right" disabled="true">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div></script><script id="edgeDefinitionTable.ejs" type="text/template"><tr class="tableRow" id="row_newEdgeDefinitions<%= number%>">
|
||||
<th class="collectionTh">Edge definitions*:</th>
|
||||
<th class="collectionTh">
|
||||
|
@ -1405,7 +1159,239 @@ if (list.length > 0) {
|
|||
<input id="<%=type %>_<%=id%>" type="text" name="<%=type %>_<%=id%>" placeholder="Attribute" maxlength="75" class="input-xlarge">
|
||||
<button id="remove_<%=type %>_<%=id%>" class="graphViewer-icon-button gv_internal_remove_line gv-icon-small delete" />
|
||||
</div>
|
||||
</div></script><script id="lineChartDetailView.ejs" type="text/template"><div id="lineChartDetail" class="modal hide fade modal-chart-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
|
||||
</div></script><script id="indicesView.ejs" type="text/template"><div class="contentIn" id="indexHeaderContent">
|
||||
<div id="indexEditView">
|
||||
<table id="collectionEditIndexTable" class="edit-index-table">
|
||||
<thead>
|
||||
<tr class="figuresHeader">
|
||||
<th class="collectionInfoTh">ID</th>
|
||||
<th class="collectionInfoTh">Type</th>
|
||||
<th class="collectionInfoTh">Unique</th>
|
||||
<th class="collectionInfoTh">Sparse</th>
|
||||
<th class="collectionInfoTh">Selectivity Est.</th>
|
||||
<th class="collectionInfoTh">Fields</th>
|
||||
<th class="collectionInfoTh">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="index-button-bar">
|
||||
<button id="addIndex" class="button-success">Add Index</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="newIndexView" class="new-index-view" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Type:</th>
|
||||
<th class="">
|
||||
<select id="newIndexType">
|
||||
<option value="Cap">Cap Constraint</option>
|
||||
<option value="Geo">Geo Index</option>
|
||||
<option value="Hash">Hash Index</option>
|
||||
<option value="Fulltext">Fulltext Index</option>
|
||||
<option value="Skiplist">Skip-List Index</option>
|
||||
</select>
|
||||
</th>
|
||||
<th class="" style="width: 18px"/>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="newIndexTypeCap" class="newIndexClass">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Size:</th>
|
||||
<th><input type="text" id="newCapSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal number of documents for the collection.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Bytesize:</th>
|
||||
<th><input type="text" id="newCapByteSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal size of the active document data in the collection. (min = 16384)">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeGeo" class="newIndexClass" style="display: none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newGeoFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list with one or two attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Geo JSON:</th>
|
||||
<th>
|
||||
<input id="newGeoJson" type="checkbox" name="newGeoJson" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial index on a location is constructed and geoJson is true, then the order within the list is longitude followed by latitude.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Constraint:</th>
|
||||
<th>
|
||||
<input id="newGeoConstraint" type="checkbox" name="newGeoConstraint" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If constraint is true, then a geo-spatial constraint is created.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Ignore Null:</th>
|
||||
<th>
|
||||
<input id="newGeoIgnoreNull" type="checkbox" name="newGeoIgnoreNull" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial constraint is created and ignoreNull is true, then documents with a null in location or at least one null in latitude or longitude are ignored.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeHash" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newHashFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newHashUnique" type="checkbox" name="newHashUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newHashSparse" type="checkbox" name="newHashSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeFulltext" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newFulltextFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title='A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of fields should look like this for example: [ "text" ].'>
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Min. length:</th>
|
||||
<th><input type="text" id="newFulltextMinLength" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div id="newIndexTypeSkiplist" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newSkiplistFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newSkiplistUnique" type="checkbox" name="newSkiplistUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newSkiplistSparse" type="checkbox" name="newSkiplistSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="index-button-bar index-button-bar2">
|
||||
<button id="createIndex" class="button-success">Save</button>
|
||||
<button id="cancelIndex" class="button-close">Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div></script><script id="lineChartDetailView.ejs" type="text/template"><div id="lineChartDetail" class="modal hide fade modal-chart-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader"><%=figure%></a>
|
||||
|
@ -1590,8 +1576,42 @@ if (list.length > 0) {
|
|||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
<% if (tabBar) { %>
|
||||
<div class="modal-tabbar">
|
||||
<ul id="infoTab" class="nav nav-tabs">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<li class="active"><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<%} else {%>
|
||||
<li><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<% if (tabBar) { %>
|
||||
<div class="tab-content">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<div class="tab-pane tab-pane-modal active" id="<%=value%>">
|
||||
</div>
|
||||
<%} else {%>
|
||||
<div class="tab-pane tab-pane-modal" id="<%=value%>">
|
||||
</div>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
</div>
|
||||
|
||||
<% if (!hideFooter) { %>
|
||||
<div class="modal-footer">
|
||||
<%
|
||||
|
@ -2302,6 +2322,9 @@ if (list.length > 0) {
|
|||
<li class="dropdown-item">
|
||||
<a id="queryManagement" class="tab" href="#queryManagement">Query Management</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a id="workMonitor" class="tab" href="#workMonitor">Work Monitor</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" id="linkDropdown">
|
||||
|
@ -2335,11 +2358,13 @@ if (list.length > 0) {
|
|||
<% } %>
|
||||
|
||||
<option value="#collections">Collections</option>
|
||||
<option value="#demo">Demo</option>
|
||||
<option value="#applications">Services</option>
|
||||
<option value="#graph">Graph</option>
|
||||
<option value="#query">AQL Editor</option>
|
||||
<option value="#shell">JS Shell</option>
|
||||
<option value="#userManagement">User Management</option>
|
||||
<option value="#queryManagement">Query Management</option>
|
||||
<option value="#workMonitor">Work Monitor</option>
|
||||
|
||||
<% if(currentDB.get('isSystem')) { %>
|
||||
|
||||
|
@ -2759,4 +2784,9 @@ var cutByResolution = function (str) {
|
|||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %></script></head><body><nav class="navbar"><div class="resizecontainer"><div class="navlogo"><a class="logo" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a></div><div id="progressPlaceholderIcon"></div><div class="statmenu" id="statisticBar"></div><div class="usermenu" id="userBar" style="float:right"></div><div class="notificationmenu" id="notificationBar" style="float:right"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="centralRow resizecontainer"><div id="content" class="centralContent"></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><footer class="footer"><div class="resizecontainer" id="footerBar"></div></footer><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js?version=1455026760724"></script><script src="libs.js?version=1455026760724"></script><script src="app.js?version=1455026760724"></script></body></html>
|
||||
<% } %></script><script id="workMonitorView.ejs" type="text/template"><div class="headerBar">
|
||||
<a class="arangoHeader">Work Monitor</a>
|
||||
</div>
|
||||
|
||||
<div id="workMonitorContent" class="innerContent">
|
||||
</div></script></head><body><nav class="navbar"><div class="resizecontainer"><div class="navlogo"><a class="logo" href="#"><img class="arangodbLogo" src="img/arangodb_logo_small.png"></a></div><div id="progressPlaceholderIcon"></div><div class="statmenu" id="statisticBar"></div><div class="usermenu" id="userBar" style="float:right"></div><div class="notificationmenu" id="notificationBar" style="float:right"></div><div class="navmenu" id="navigationBar"></div></div></nav><div class="centralRow resizecontainer"><div id="content" class="centralContent"></div></div><div id="modalPlaceholder"></div><div id="progressPlaceholder" style="display:none"></div><footer class="footer"><div class="resizecontainer" id="footerBar"></div></footer><div class="arangoFrame" style=""><div class="outerDiv"><div class="innerDiv"></div></div></div><script src="sharedLibs.js?version=1455532583470"></script><script src="libs.js?version=1455532583470"></script><script src="app.js?version=1455532583470"></script></body></html>
|
Binary file not shown.
|
@ -419,6 +419,22 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script id="dashboardView.ejs" type="text/template">
|
||||
|
@ -850,11 +866,6 @@ if (list.length > 0) {
|
|||
<span title="Download documents as JSON file"><i class="fa fa-download"></i></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="enabled">
|
||||
<a id="indexCollection" class="headerButton">
|
||||
<span class="icon_arangodb_checklist" title="Index collection"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="enabled" style="margin-right: 15px">
|
||||
<a id="filterCollection" class="headerButton">
|
||||
<span class="icon_arangodb_filter" title="Filter collection"></span>
|
||||
|
@ -912,247 +923,6 @@ if (list.length > 0) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="indexHeader" class="headerDropdown">
|
||||
<div class="contentIn" id="indexHeaderContent">
|
||||
<div id="indexEditView">
|
||||
<span class="arangoHeader">Indexes:</span>
|
||||
<table id="collectionEditIndexTable" class="edit-index-table">
|
||||
<thead>
|
||||
<tr class="figuresHeader">
|
||||
<th class="collectionInfoTh">ID</th>
|
||||
<th class="collectionInfoTh">Type</th>
|
||||
<th class="collectionInfoTh">Unique</th>
|
||||
<th class="collectionInfoTh">Sparse</th>
|
||||
<th class="collectionInfoTh">Selectivity Est.</th>
|
||||
<th class="collectionInfoTh">Fields</th>
|
||||
<th class="collectionInfoTh">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="index-button-bar">
|
||||
<button id="addIndex" class="button-success">Add Index</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="newIndexView" class="new-index-view" style="display:none">
|
||||
<span id="newIndexHeader" class="arangoHeader">Add Index:</span>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Type:</th>
|
||||
<th class="">
|
||||
<select id="newIndexType">
|
||||
<option value="Cap">Cap Constraint</option>
|
||||
<option value="Geo">Geo Index</option>
|
||||
<option value="Hash">Hash Index</option>
|
||||
<option value="Fulltext">Fulltext Index</option>
|
||||
<option value="Skiplist">Skip-List Index</option>
|
||||
</select>
|
||||
</th>
|
||||
<th class="" style="width: 18px"/>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="newIndexTypeCap" class="newIndexClass">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Size:</th>
|
||||
<th><input type="text" id="newCapSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal number of documents for the collection.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Bytesize:</th>
|
||||
<th><input type="text" id="newCapByteSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal size of the active document data in the collection. (min = 16384)">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeGeo" class="newIndexClass" style="display: none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newGeoFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list with one or two attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Geo JSON:</th>
|
||||
<th>
|
||||
<input id="newGeoJson" type="checkbox" name="newGeoJson" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial index on a location is constructed and geoJson is true, then the order within the list is longitude followed by latitude.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Constraint:</th>
|
||||
<th>
|
||||
<input id="newGeoConstraint" type="checkbox" name="newGeoConstraint" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If constraint is true, then a geo-spatial constraint is created.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Ignore Null:</th>
|
||||
<th>
|
||||
<input id="newGeoIgnoreNull" type="checkbox" name="newGeoIgnoreNull" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial constraint is created and ignoreNull is true, then documents with a null in location or at least one null in latitude or longitude are ignored.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="newIndexTypeHash" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newHashFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newHashUnique" type="checkbox" name="newHashUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newHashSparse" type="checkbox" name="newHashSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeFulltext" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newFulltextFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title='A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of fields should look like this for example: [ "text" ].'>
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Min. length:</th>
|
||||
<th><input type="text" id="newFulltextMinLength" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="newIndexTypeSkiplist" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newSkiplistFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newSkiplistUnique" type="checkbox" name="newSkiplistUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newSkiplistSparse" type="checkbox" name="newSkiplistSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="index-button-bar">
|
||||
<button id="createIndex" class="button-success">Save</button>
|
||||
<button id="cancelIndex" class="button-danger">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="documentsDiv" class="innerContent">
|
||||
|
@ -1182,21 +952,6 @@ if (list.length > 0) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Index Modal -->
|
||||
<div id="indexDeleteModal" style="display:none" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<a class="arangoHeader">Delete Index?</a>
|
||||
</div>
|
||||
<div class="modal-body" id="deleteIndex">
|
||||
<p>There is no way back…</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="button-close" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<button id="confirmDeleteIndexBtn" class="button-danger" style="float:right">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script id="edgeDefinitionTable.ejs" type="text/template">
|
||||
|
@ -1505,6 +1260,242 @@ if (list.length > 0) {
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script id="indicesView.ejs" type="text/template">
|
||||
<div class="contentIn" id="indexHeaderContent">
|
||||
<div id="indexEditView">
|
||||
<table id="collectionEditIndexTable" class="edit-index-table">
|
||||
<thead>
|
||||
<tr class="figuresHeader">
|
||||
<th class="collectionInfoTh">ID</th>
|
||||
<th class="collectionInfoTh">Type</th>
|
||||
<th class="collectionInfoTh">Unique</th>
|
||||
<th class="collectionInfoTh">Sparse</th>
|
||||
<th class="collectionInfoTh">Selectivity Est.</th>
|
||||
<th class="collectionInfoTh">Fields</th>
|
||||
<th class="collectionInfoTh">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="index-button-bar">
|
||||
<button id="addIndex" class="button-success">Add Index</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="newIndexView" class="new-index-view" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Type:</th>
|
||||
<th class="">
|
||||
<select id="newIndexType">
|
||||
<option value="Cap">Cap Constraint</option>
|
||||
<option value="Geo">Geo Index</option>
|
||||
<option value="Hash">Hash Index</option>
|
||||
<option value="Fulltext">Fulltext Index</option>
|
||||
<option value="Skiplist">Skip-List Index</option>
|
||||
</select>
|
||||
</th>
|
||||
<th class="" style="width: 18px"/>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="newIndexTypeCap" class="newIndexClass">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Size:</th>
|
||||
<th><input type="text" id="newCapSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal number of documents for the collection.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Bytesize:</th>
|
||||
<th><input type="text" id="newCapByteSize" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="The maximal size of the active document data in the collection. (min = 16384)">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeGeo" class="newIndexClass" style="display: none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newGeoFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list with one or two attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Geo JSON:</th>
|
||||
<th>
|
||||
<input id="newGeoJson" type="checkbox" name="newGeoJson" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial index on a location is constructed and geoJson is true, then the order within the list is longitude followed by latitude.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Constraint:</th>
|
||||
<th>
|
||||
<input id="newGeoConstraint" type="checkbox" name="newGeoConstraint" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If constraint is true, then a geo-spatial constraint is created.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Ignore Null:</th>
|
||||
<th>
|
||||
<input id="newGeoIgnoreNull" type="checkbox" name="newGeoIgnoreNull" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If a geo-spatial constraint is created and ignoreNull is true, then documents with a null in location or at least one null in latitude or longitude are ignored.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeHash" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newHashFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newHashUnique" type="checkbox" name="newHashUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newHashSparse" type="checkbox" name="newHashSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="newIndexTypeFulltext" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newFulltextFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title='A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of fields should look like this for example: [ "text" ].'>
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Min. length:</th>
|
||||
<th><input type="text" id="newFulltextMinLength" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div id="newIndexTypeSkiplist" class="newIndexClass" style="display:none">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="collectionTh">Fields:</th>
|
||||
<th><input type="text" id="newSkiplistFields" value=""/></th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="A list of attribute paths.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Unique:</th>
|
||||
<th>
|
||||
<input id="newSkiplistUnique" type="checkbox" name="newSkiplistUnique" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a unique index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="collectionTh">Sparse:</th>
|
||||
<th>
|
||||
<input id="newSkiplistSparse" type="checkbox" name="newSkiplistSparse" value="true">
|
||||
</th>
|
||||
<th class="tooltipInfoTh">
|
||||
<div>
|
||||
<a class="index-tooltip" data-toggle="tooltip" data-placement="left" title="If true, then create a sparse index.">
|
||||
<span rel="tooltip" class="arangoicon icon_arangodb_info"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="index-button-bar index-button-bar2">
|
||||
<button id="createIndex" class="button-success">Save</button>
|
||||
<button id="cancelIndex" class="button-close">Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script id="lineChartDetailView.ejs" type="text/template">
|
||||
<div id="lineChartDetail" class="modal hide fade modal-chart-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
|
||||
<div class="modal-header">
|
||||
|
@ -1711,8 +1702,42 @@ if (list.length > 0) {
|
|||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
<% if (tabBar) { %>
|
||||
<div class="modal-tabbar">
|
||||
<ul id="infoTab" class="nav nav-tabs">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<li class="active"><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<%} else {%>
|
||||
<li><a href="#<%=value%>" data-toggle="tab"><%=value%></a></li>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<% if (tabBar) { %>
|
||||
<div class="tab-content">
|
||||
<% var counter = 0; %>
|
||||
<% _.each(tabBar, function(value) { %>
|
||||
<% if (counter === 0) { %>
|
||||
<div class="tab-pane tab-pane-modal active" id="<%=value%>">
|
||||
</div>
|
||||
<%} else {%>
|
||||
<div class="tab-pane tab-pane-modal" id="<%=value%>">
|
||||
</div>
|
||||
<% } %>
|
||||
<% counter++; %>
|
||||
<% }); %>
|
||||
</div>
|
||||
<%}%>
|
||||
|
||||
</div>
|
||||
|
||||
<% if (!hideFooter) { %>
|
||||
<div class="modal-footer">
|
||||
<%
|
||||
|
@ -2458,6 +2483,9 @@ if (list.length > 0) {
|
|||
<li class="dropdown-item">
|
||||
<a id="queryManagement" class="tab" href="#queryManagement">Query Management</a>
|
||||
</li>
|
||||
<li class="dropdown-item">
|
||||
<a id="workMonitor" class="tab" href="#workMonitor">Work Monitor</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown" id="linkDropdown">
|
||||
|
@ -2491,11 +2519,13 @@ if (list.length > 0) {
|
|||
<% } %>
|
||||
|
||||
<option value="#collections">Collections</option>
|
||||
<option value="#demo">Demo</option>
|
||||
<option value="#applications">Services</option>
|
||||
<option value="#graph">Graph</option>
|
||||
<option value="#query">AQL Editor</option>
|
||||
<option value="#shell">JS Shell</option>
|
||||
<option value="#userManagement">User Management</option>
|
||||
<option value="#queryManagement">Query Management</option>
|
||||
<option value="#workMonitor">Work Monitor</option>
|
||||
|
||||
<% if(currentDB.get('isSystem')) { %>
|
||||
|
||||
|
@ -2972,6 +3002,15 @@ var cutByResolution = function (str) {
|
|||
<% } %>
|
||||
</script>
|
||||
|
||||
<script id="workMonitorView.ejs" type="text/template">
|
||||
<div class="headerBar">
|
||||
<a class="arangoHeader">Work Monitor</a>
|
||||
</div>
|
||||
|
||||
<div id="workMonitorContent" class="innerContent">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar">
|
||||
|
@ -3014,9 +3053,9 @@ var cutByResolution = function (str) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="sharedLibs.js?version=1455026760724"></script>
|
||||
<script src="libs.js?version=1455026760724"></script>
|
||||
<script src="app.js?version=1455026760724"></script>
|
||||
<script src="sharedLibs.js?version=1455532583470"></script>
|
||||
<script src="libs.js?version=1455532583470"></script>
|
||||
<script src="app.js?version=1455532583470"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -5487,6 +5487,9 @@ div.headerBar {
|
|||
.select2-drop-active {
|
||||
z-index: 9999999; }
|
||||
|
||||
.modal-tabbar {
|
||||
border-bottom: 1px solid #000; }
|
||||
|
||||
.modal-body {
|
||||
color: #736b68;
|
||||
font-family: 'Open Sans', sans-serif !important;
|
||||
|
@ -5612,13 +5615,15 @@ div.headerBar {
|
|||
.modal-body select {
|
||||
width: 398px; }
|
||||
.modal-body .collectionTh {
|
||||
height: 55px; }
|
||||
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 {
|
||||
|
@ -5935,7 +5940,8 @@ div.headerBar {
|
|||
color: #fff !important;
|
||||
font-family: 'Open Sans',sans-serif !important;
|
||||
font-size: 10pt !important;
|
||||
font-weight: 100 !important; }
|
||||
font-weight: 100 !important;
|
||||
z-index: 99999999; }
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 300px !important;
|
||||
|
@ -8061,10 +8067,24 @@ table .sorting {
|
|||
position: relative;
|
||||
top: -3px !important; }
|
||||
|
||||
#collectionEditIndexTable thead {
|
||||
border-bottom: 1px solid #e5e5e5; }
|
||||
|
||||
.newIndexClass table {
|
||||
margin-bottom: 60px; }
|
||||
|
||||
.index-button-bar {
|
||||
margin-top: 15px; }
|
||||
bottom: 0;
|
||||
margin-bottom: 15px;
|
||||
margin-right: 17px;
|
||||
margin-top: 15px;
|
||||
position: absolute;
|
||||
right: 0; }
|
||||
.index-button-bar button {
|
||||
float: right;
|
||||
margin-left: 0; }
|
||||
.index-button-bar #cancelIndex {
|
||||
margin-right: 13px; }
|
||||
|
||||
.docsFirstCol, .docsSecCol, .docsThirdCol {
|
||||
border: 0 !important; }
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
/*jshint unused: false */
|
||||
/*global window, $, document */
|
||||
/*global window, $, document, _ */
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
|
@ -55,7 +55,7 @@
|
|||
},
|
||||
|
||||
setCheckboxStatus: function(id) {
|
||||
$.each($(id).find('ul').find('li'), function(key, element) {
|
||||
_.each($(id).find('ul').find('li'), function(element) {
|
||||
if (!$(element).hasClass("nav-header")) {
|
||||
if ($(element).find('input').attr('checked')) {
|
||||
if ($(element).find('i').hasClass('css-round-label')) {
|
||||
|
@ -282,6 +282,149 @@
|
|||
$('.arangoFrame').hide();
|
||||
},
|
||||
|
||||
addAardvarkJob: function (object, callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "POST",
|
||||
url: "/_admin/aardvark/job",
|
||||
data: JSON.stringify(object),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteAardvarkJob: function (id, callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "DELETE",
|
||||
url: "/_admin/aardvark/job/" + encodeURIComponent(id),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteAllAardvarkJobs: function (callback) {
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "DELETE",
|
||||
url: "/_admin/aardvark/job",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getAardvarkJobs: function (callback) {
|
||||
var result;
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "GET",
|
||||
url: "/_admin/aardvark/job",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
if (callback) {
|
||||
callback(false, data);
|
||||
}
|
||||
result = data;
|
||||
},
|
||||
error: function(data) {
|
||||
if (callback) {
|
||||
callback(true, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
getPendingJobs: function() {
|
||||
var result;
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "GET",
|
||||
url: "/_api/job/pending",
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
result = data;
|
||||
},
|
||||
error: function(data) {
|
||||
console.log("pending jobs error: " + data);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
syncAndReturnUninishedAardvarkJobs: function(type) {
|
||||
|
||||
var AaJobs = this.getAardvarkJobs(),
|
||||
pendingJobs = this.getPendingJobs(),
|
||||
array = [];
|
||||
|
||||
if (pendingJobs.length > 0) {
|
||||
_.each(AaJobs, function(aardvark) {
|
||||
if (aardvark.type === type || aardvark.type === undefined) {
|
||||
|
||||
var found = false;
|
||||
_.each(pendingJobs, function(pending) {
|
||||
if (aardvark.id === pending) {
|
||||
found = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (found) {
|
||||
this.deleteAardvarkJob(aardvark.id);
|
||||
}
|
||||
else {
|
||||
array.push({
|
||||
collection: aardvark.collection,
|
||||
id: aardvark.id,
|
||||
type: aardvark.type
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.deleteAllAardvarkJobs();
|
||||
}
|
||||
|
||||
return array;
|
||||
},
|
||||
|
||||
getRandomToken: function () {
|
||||
return Math.round(new Date().getTime());
|
||||
},
|
||||
|
|
|
@ -91,18 +91,34 @@
|
|||
return data2;
|
||||
},
|
||||
|
||||
|
||||
createIndex: function (postParameter, callback) {
|
||||
|
||||
var self = this;
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
type: "POST",
|
||||
url: "/_api/index?collection="+ this.get("id"),
|
||||
url: "/_api/index?collection="+ self.get("id"),
|
||||
headers: {
|
||||
'x-arango-async': 'store'
|
||||
},
|
||||
data: JSON.stringify(postParameter),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
async: true,
|
||||
success: function() {
|
||||
callback(false);
|
||||
success: function (data, textStatus, xhr) {
|
||||
if (xhr.getResponseHeader('x-arango-async-id')) {
|
||||
window.arangoHelper.addAardvarkJob({
|
||||
id: xhr.getResponseHeader('x-arango-async-id'),
|
||||
type: 'index',
|
||||
collection: self.get("id")
|
||||
});
|
||||
callback(false, data);
|
||||
}
|
||||
else {
|
||||
callback(true, data);
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
callback(true, data);
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="index-button-bar">
|
||||
<div class="index-button-bar index-button-bar2">
|
||||
<button id="createIndex" class="button-success">Save</button>
|
||||
<button id="cancelIndex" class="button-close">Back</button>
|
||||
</div>
|
||||
|
|
|
@ -389,15 +389,27 @@
|
|||
});
|
||||
|
||||
$('#infoTab a').bind('click', function(e) {
|
||||
if ($(e.currentTarget).html() === 'Indices') {
|
||||
$('.modal-footer .button-danger').hide();
|
||||
$('.modal-footer .button-success').hide();
|
||||
$('.modal-footer .button-notification').hide();
|
||||
if ($(e.currentTarget).html() === 'Indices' && !$(e.currentTarget).parent().hasClass('active')) {
|
||||
|
||||
$('#newIndexView').hide();
|
||||
$('#indexEditView').show();
|
||||
|
||||
$('#modal-dialog .modal-footer .button-danger').hide();
|
||||
$('#modal-dialog .modal-footer .button-success').hide();
|
||||
$('#modal-dialog .modal-footer .button-notification').hide();
|
||||
$('#addIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
}
|
||||
if ($(e.currentTarget).html() === 'General' && !$(e.currentTarget).parent().hasClass('active')) {
|
||||
$('#modal-dialog .modal-footer .button-danger').show();
|
||||
$('#modal-dialog .modal-footer .button-success').show();
|
||||
$('#modal-dialog .modal-footer .button-notification').show();
|
||||
var elem = $('.index-button-bar')[0];
|
||||
var elem2 = $('.index-button-bar2')[0];
|
||||
$('#addIndex').detach().appendTo(elem);
|
||||
if ($('#cancelIndex').is(':visible')) {
|
||||
$('#cancelIndex').detach().appendTo(elem2);
|
||||
$('#createIndex').detach().appendTo(elem2);
|
||||
}
|
||||
else {
|
||||
$('.modal-footer .button-danger').show();
|
||||
$('.modal-footer .button-success').show();
|
||||
$('.modal-footer .button-notification').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -609,13 +621,23 @@
|
|||
},
|
||||
|
||||
toggleNewIndexView: function () {
|
||||
var elem = $('.index-button-bar2')[0];
|
||||
var elem2 = $('.index-button-bar')[0];
|
||||
if ($('#indexEditView').is(':visible')) {
|
||||
$('#indexEditView').hide();
|
||||
$('#newIndexView').show();
|
||||
$('#addIndex').detach().appendTo(elem2);
|
||||
$('#cancelIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
$('#createIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
|
||||
}
|
||||
else {
|
||||
console.log("toggle else");
|
||||
$('#indexEditView').show();
|
||||
$('#newIndexView').hide();
|
||||
$('#addIndex').detach().appendTo('#modal-dialog .modal-footer');
|
||||
$('#cancelIndex').detach().appendTo(elem);
|
||||
$('#createIndex').detach().appendTo(elem);
|
||||
}
|
||||
|
||||
arangoHelper.fixTooltips(".icon_arangodb, .arangoicon", "right");
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
template: templateEngine.createTemplate("collectionsView.ejs"),
|
||||
|
||||
render: function () {
|
||||
var dropdownVisible = false;
|
||||
|
||||
var dropdownVisible = false,
|
||||
lockedCollections = window.arangoHelper.syncAndReturnUninishedAardvarkJobs('index');
|
||||
|
||||
if ($('#collectionsDropdown').is(':visible')) {
|
||||
dropdownVisible = true;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,9 @@ exports.checkRequestResult = function (requestResult) {
|
|||
throw new TypeError(requestResult.errorMessage);
|
||||
}
|
||||
|
||||
throw new ArangoError(requestResult);
|
||||
const error = new ArangoError(requestResult);
|
||||
error.message = requestResult.message;
|
||||
throw error;
|
||||
}
|
||||
|
||||
// remove the property from the original object
|
||||
|
|
|
@ -701,13 +701,7 @@ var run = function (args) {
|
|||
return 0;
|
||||
}
|
||||
catch (err) {
|
||||
if (err instanceof ArangoError) {
|
||||
printf("%s\n", err.errorMessage);
|
||||
}
|
||||
else {
|
||||
printf("%s\n", err.message);
|
||||
}
|
||||
|
||||
arangodb.print(String(err));
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -411,9 +411,11 @@ Module._load = function(request, parent, isMain) {
|
|||
if (match) {
|
||||
dbModule = Module._resolveDbModule(match[3]);
|
||||
if (!dbModule) {
|
||||
var err = new Error("Cannot find module '" + request + "'");
|
||||
err.code = 'MODULE_NOT_FOUND';
|
||||
throw err;
|
||||
throw new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_NOT_FOUND.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_NOT_FOUND.message
|
||||
+ '\nFile: ' + request
|
||||
});
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
|
@ -495,9 +497,11 @@ Module._resolveFilename = function(request, parent) {
|
|||
// look up the filename first, since that's the cache key.
|
||||
var filename = Module._findPath(request, paths);
|
||||
if (!filename) {
|
||||
var err = new Error("Cannot find module '" + request + "'");
|
||||
err.code = 'MODULE_NOT_FOUND';
|
||||
throw err;
|
||||
throw new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_NOT_FOUND.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_NOT_FOUND.message
|
||||
+ '\nFile: ' + request
|
||||
});
|
||||
}
|
||||
return filename;
|
||||
};
|
||||
|
@ -511,7 +515,23 @@ Module.prototype.load = function(filename) {
|
|||
|
||||
var extension = path.extname(filename) || '.js';
|
||||
if (!Module._extensions[extension]) extension = '.js';
|
||||
|
||||
try {
|
||||
Module._extensions[extension](this, filename);
|
||||
} catch (e) {
|
||||
if (e.errorNum !== internal.errors.ERROR_MODULE_FAILURE.code) {
|
||||
const error = new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
||||
+ '\nFile: ' + filename
|
||||
+ '\nCause: ' + e
|
||||
});
|
||||
error.cause = e;
|
||||
throw error;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
this.loaded = true;
|
||||
};
|
||||
|
||||
|
@ -545,15 +565,6 @@ Module.prototype._compile = function(content, filename) {
|
|||
content = this.preprocess(content, filename);
|
||||
}
|
||||
|
||||
// test for parse errors first and fail early if a parse error detected
|
||||
if (!internal.parse(content, filename)) {
|
||||
throw new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_SYNTAX_ERROR.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_SYNTAX_ERROR.message
|
||||
+ '\nFile: ' + filename
|
||||
});
|
||||
}
|
||||
|
||||
this.filename = filename;
|
||||
|
||||
var args = this.context;
|
||||
|
@ -561,38 +572,15 @@ Module.prototype._compile = function(content, filename) {
|
|||
// Do not use Function constructor or line numbers will be wrong
|
||||
var wrapper = `(function (${keys.join(', ')}) {${content}\n})`;
|
||||
|
||||
var fn;
|
||||
try {
|
||||
fn = internal.executeScript(wrapper, undefined, filename);
|
||||
} catch (e) {
|
||||
console.errorLines(e.stack || String(e));
|
||||
let err = new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||
errorMessage: internal.errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||
+ '\nFile: ' + filename
|
||||
});
|
||||
err.cause = e;
|
||||
throw err;
|
||||
}
|
||||
var fn = internal.executeScript(wrapper, undefined, filename);
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('Expected internal.executeScript to return a function, not ' + typeof fn);
|
||||
throw new TypeError(`Expected internal.executeScript to return a function, not ${typeof fn}`);
|
||||
}
|
||||
|
||||
try {
|
||||
fn.apply(args.exports, keys.map(function (key) {
|
||||
return args[key];
|
||||
}));
|
||||
} catch (e) {
|
||||
console.errorLines(e.stack || String(e));
|
||||
let err = new internal.ArangoError({
|
||||
errorNum: internal.errors.ERROR_MODULE_FAILURE.code,
|
||||
errorMessage: internal.errors.ERROR_MODULE_FAILURE.message
|
||||
+ '\nFile: ' + filename
|
||||
});
|
||||
err.cause = e;
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -49,22 +49,27 @@ if (global.ArangoError) {
|
|||
this.errorNum = error.errorNum;
|
||||
this.errorMessage = error.errorMessage;
|
||||
}
|
||||
|
||||
this.message = this.toString();
|
||||
};
|
||||
|
||||
exports.ArangoError.prototype = new Error();
|
||||
}
|
||||
|
||||
Object.defineProperty(exports.ArangoError.prototype, 'message', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get() {
|
||||
return this.errorMessage;
|
||||
}
|
||||
});
|
||||
|
||||
exports.ArangoError.prototype.name = 'ArangoError';
|
||||
|
||||
exports.ArangoError.prototype._PRINT = function(context) {
|
||||
context.output += this.toString();
|
||||
context.output += '[' + this.toString() + ']';
|
||||
};
|
||||
|
||||
exports.ArangoError.prototype.toString = function() {
|
||||
var errorNum = this.errorNum;
|
||||
var errorMessage = this.errorMessage || this.message;
|
||||
|
||||
return '[ArangoError ' + errorNum + ': ' + errorMessage + ']';
|
||||
return `${this.name} ${this.errorNum}: ${this.message}`;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const Module = require('module');
|
||||
const ArangoError = require('@arangodb').ArangoError;
|
||||
const errors = require('@arangodb').errors;
|
||||
const runTests = require('@arangodb/mocha').run;
|
||||
const colors = require('internal').COLORS;
|
||||
|
||||
|
@ -200,17 +198,6 @@ function run(filename, context) {
|
|||
});
|
||||
}
|
||||
|
||||
try {
|
||||
module.load(filename);
|
||||
return module.exports;
|
||||
} catch(e) {
|
||||
const err = new ArangoError({
|
||||
errorNum: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.message
|
||||
+ '\nFile: ' + filename
|
||||
});
|
||||
err.stack = e.stack;
|
||||
err.cause = e;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ function ReplicationLoggerSuite () {
|
|||
var cn2 = "UnitTestsReplication2";
|
||||
|
||||
var waitForSync = function () {
|
||||
internal.wait(1.5, false);
|
||||
internal.wait(5, false);
|
||||
};
|
||||
|
||||
var getLogEntries = function (tick, type) {
|
||||
|
|
|
@ -158,7 +158,7 @@ function ErrorsSuite () {
|
|||
fail();
|
||||
}
|
||||
catch (err) {
|
||||
assertEqual("[ArangoError " + e.code + ": " + e.message + "]", err.toString());
|
||||
assertEqual("ArangoError " + e.code + ": " + e.message, err.toString());
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -174,14 +174,13 @@ function ErrorsSuite () {
|
|||
fail();
|
||||
}
|
||||
catch (err) {
|
||||
assertEqual("[ArangoError " + e.code + ": " + e.message + ": did not find document]", err.toString());
|
||||
assertEqual("ArangoError " + e.code + ": " + e.message + ": did not find document", err.toString());
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief executes the test suite
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -102,92 +102,188 @@ describe('Foxx Manager install', function() {
|
|||
it('with malformed controller file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-controller-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause').that.is.an.instanceof(SyntaxError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
it('with malformed controller path', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-controller-name'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_INVALID_APPLICATION_MANIFEST.code);
|
||||
});
|
||||
|
||||
it('with malformed controller path', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-controller-path'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause').that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with broken controller file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'broken-controller-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause');
|
||||
expect(err.cause).not.to.be.an.instanceof(SyntaxError);
|
||||
expect(err.cause).not.to.be.an.instanceof(ArangoError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with broken exports file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'broken-exports-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause');
|
||||
expect(err.cause).not.to.be.an.instanceof(SyntaxError);
|
||||
expect(err.cause).not.to.be.an.instanceof(ArangoError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with broken setup file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'broken-setup-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause');
|
||||
expect(err.cause).not.to.be.an.instanceof(SyntaxError);
|
||||
expect(err.cause).not.to.be.an.instanceof(ArangoError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with malformed exports file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-exports-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(SyntaxError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with malformed exports path', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-exports-path'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with malformed setup file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-setup-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(SyntaxError);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with malformed setup path', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'malformed-setup-path'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with missing controller file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'missing-controller-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with missing exports file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'missing-exports-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
it('with missing setup file', function() {
|
||||
expect(function () {
|
||||
FoxxManager.install(fs.join(basePath, 'missing-setup-file'), '/unittest/broken');
|
||||
}).to.throw(ArangoError)
|
||||
.with.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
}).to.throw(ArangoError).that.satisfies(function (err) {
|
||||
expect(err).to.have.property('errorNum', errors.ERROR_MODULE_FAILURE.code);
|
||||
if (require('@arangodb').isServer) {
|
||||
expect(err).to.have.property('cause')
|
||||
.that.is.an.instanceof(ArangoError)
|
||||
.with.a.property('errorNum', errors.ERROR_SYS_ERROR.code);
|
||||
} else {
|
||||
expect(err).not.to.have.property('cause');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ function createCallbackFromActionCallbackString (callback, parentModule, route)
|
|||
try {
|
||||
actionModule._compile(`module.exports = ${callback}`, route.name);
|
||||
} catch (e) {
|
||||
console.errorLines(e.stack);
|
||||
return notImplementedFunction(route, util.format(
|
||||
"could not generate callback for '%s'",
|
||||
callback
|
||||
|
|
|
@ -92,7 +92,7 @@ function startReadingQuery (endpoint, collName, timeout) {
|
|||
if (r[i].query.indexOf(uuid) !== -1) {
|
||||
// Bingo, found it:
|
||||
if (r[i].state === "executing") {
|
||||
console.info("OK");
|
||||
console.info("startReadingQuery: OK");
|
||||
return r[i].id;
|
||||
}
|
||||
console.info("startReadingQuery: query found but not yet executing");
|
||||
|
@ -114,6 +114,22 @@ function cancelReadingQuery (endpoint, queryid) {
|
|||
console.error("CancelReadingQuery: error", r);
|
||||
return false;
|
||||
}
|
||||
console.info("CancelReadingQuery: success");
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief cancel barrier from sync
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function cancelBarrier (endpoint, barrierId) {
|
||||
var url = endpointToURL(endpoint) + "/_api/replication/barrier/" + barrierId;
|
||||
var r = request({url, method: "DELETE" });
|
||||
if (r.status !== 200 && r.status !== 204) {
|
||||
console.error("CancelBarrier: error", r);
|
||||
return false;
|
||||
}
|
||||
console.info("cancelBarrier: success");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -982,9 +998,16 @@ function synchronizeLocalFollowerCollections (plannedCollections) {
|
|||
inCurrent.servers[0]);
|
||||
// First once without a read transaction:
|
||||
var sy = rep.syncCollection(shard,
|
||||
{ endpoint: ep, incremental: true });
|
||||
{ endpoint: ep, incremental: true,
|
||||
keepBarrier: true });
|
||||
// Now start a read transaction to stop writes:
|
||||
var queryid = startReadingQuery(ep, shard, 300);
|
||||
var queryid;
|
||||
try {
|
||||
queryid = startReadingQuery(ep, shard, 300);
|
||||
}
|
||||
finally {
|
||||
cancelBarrier(ep, sy.barrierId);
|
||||
}
|
||||
var ok = false;
|
||||
try {
|
||||
var sy2 = rep.syncCollectionFinalize(
|
||||
|
|
|
@ -401,32 +401,35 @@ function checkManifest(filename, manifest) {
|
|||
/// All errors are handled including file not found. Returns undefined if manifest is invalid
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function validateManifestFile(file) {
|
||||
function validateManifestFile(filename) {
|
||||
var mf, msg;
|
||||
if (!fs.exists(file)) {
|
||||
msg = `Cannot find manifest file "${file}"`;
|
||||
console.errorLines(msg);
|
||||
if (!fs.exists(filename)) {
|
||||
msg = `Cannot find manifest file "${filename}"`;
|
||||
throwFileNotFound(msg);
|
||||
}
|
||||
try {
|
||||
mf = JSON.parse(fs.read(file));
|
||||
} catch (err) {
|
||||
let details = String(err.stack || err);
|
||||
msg = `Cannot parse app manifest "${file}": ${details}`;
|
||||
console.errorLines(msg);
|
||||
throw new ArangoError({
|
||||
mf = JSON.parse(fs.read(filename));
|
||||
} catch (e) {
|
||||
const error = new ArangoError({
|
||||
errorNum: errors.ERROR_MALFORMED_MANIFEST_FILE.code,
|
||||
errorMessage: msg
|
||||
errorMessage: errors.ERROR_MALFORMED_MANIFEST_FILE.message
|
||||
+ '\nFile: ' + filename
|
||||
+ '\nCause: ' + e
|
||||
});
|
||||
error.cause = e;
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
checkManifest(file, mf);
|
||||
} catch (err) {
|
||||
console.errorLines(`Manifest file "${file}" is invalid:\n${err.errorMessage}`);
|
||||
if (err.stack) {
|
||||
console.errorLines(err.stack);
|
||||
}
|
||||
throw err;
|
||||
checkManifest(filename, mf);
|
||||
} catch (e) {
|
||||
const error = new ArangoError({
|
||||
errorNum: errors.ERROR_INVALID_APPLICATION_MANIFEST.code,
|
||||
errorMessage: errors.ERROR_INVALID_APPLICATION_MANIFEST.message
|
||||
+ '\nFile: ' + filename
|
||||
+ '\nCause: ' + e
|
||||
});
|
||||
error.cause = e;
|
||||
throw error;
|
||||
}
|
||||
return mf;
|
||||
}
|
||||
|
@ -485,24 +488,14 @@ function computeAppPath(mount) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function executeAppScript(scriptName, app, argv) {
|
||||
var readableName = utils.getReadableName(scriptName);
|
||||
var scripts = app.manifest.scripts;
|
||||
|
||||
// Only run setup/teardown scripts if they exist
|
||||
if (scripts[scriptName] || (scriptName !== 'setup' && scriptName !== 'teardown')) {
|
||||
try {
|
||||
return app.run(scripts[scriptName], {
|
||||
appContext: {
|
||||
argv: argv ? (Array.isArray(argv) ? argv : [argv]) : []
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
if (!(e.cause || e).statusCode) {
|
||||
let details = String((e.cause || e).stack || e.cause || e);
|
||||
console.errorLines(`Running script "${readableName}" not possible for mount "${app.mount}":\n${details}`);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -615,10 +608,10 @@ function installAppFromGenerator(targetPath, options) {
|
|||
invalidOptions.push('options.collectionNames has to be an array.');
|
||||
}
|
||||
if (invalidOptions.length > 0) {
|
||||
console.log(invalidOptions);
|
||||
throw new ArangoError({
|
||||
errorNum: errors.ERROR_INVALID_FOXX_OPTIONS.code,
|
||||
errorMessage: JSON.stringify(invalidOptions, undefined, 2)
|
||||
errorMessage: errors.ERROR_INVALID_FOXX_OPTIONS.message
|
||||
+ '\nOptions: ' + JSON.stringify(invalidOptions, undefined, 2)
|
||||
});
|
||||
}
|
||||
options.path = targetPath;
|
||||
|
@ -973,8 +966,6 @@ function _validateApp(appInfo) {
|
|||
routeApp(tmp, true);
|
||||
exportApp(tmp);
|
||||
}
|
||||
} catch (e) {
|
||||
throw e;
|
||||
} finally {
|
||||
fs.removeDirectoryRecursive(tempPath, true);
|
||||
}
|
||||
|
@ -1040,20 +1031,6 @@ function _install(appInfo, mount, options, runSetup) {
|
|||
} catch (err) {
|
||||
console.errorLines(err.stack);
|
||||
}
|
||||
if (e instanceof ArangoError) {
|
||||
if (e.errorNum === errors.ERROR_MODULE_SYNTAX_ERROR.code) {
|
||||
throw _.extend(new ArangoError({
|
||||
errorNum: errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_SYNTAX_ERROR_IN_SCRIPT.message
|
||||
}), {stack: e.stack});
|
||||
}
|
||||
if (e.errorNum === errors.ERROR_MODULE_FAILURE.code) {
|
||||
throw _.extend(new ArangoError({
|
||||
errorNum: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.message
|
||||
}), {stack: e.stack});
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return app;
|
||||
|
@ -1142,12 +1119,6 @@ function _uninstall(mount, options) {
|
|||
}
|
||||
var collection = utils.getStorage();
|
||||
var targetPath = computeAppPath(mount, true);
|
||||
if (!fs.exists(targetPath) && !options.force) {
|
||||
throw new ArangoError({
|
||||
errorNum: errors.ERROR_NO_FOXX_FOUND.code,
|
||||
errorMessage: errors.ERROR_NO_FOXX_FOUND.message
|
||||
});
|
||||
}
|
||||
delete appCache[dbname][mount];
|
||||
if (!options.__clusterDistribution) {
|
||||
try {
|
||||
|
|
|
@ -596,10 +596,7 @@ var routeApp = function (app, isInstallProcess) {
|
|||
// return the new routes
|
||||
return routes;
|
||||
} catch (e) {
|
||||
console.error("Cannot compute Foxx application routes: %s", String(e));
|
||||
if (e.hasOwnProperty("stack")) {
|
||||
console.errorLines(e.stack);
|
||||
}
|
||||
console.errorLines(`Cannot compute Foxx application routes:\n${e.stack}`);
|
||||
if (isInstallProcess) {
|
||||
throw e;
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const _ = require('lodash');
|
||||
const ArangoError = require('@arangodb').ArangoError;
|
||||
const errors = require('@arangodb').errors;
|
||||
const internal = require('internal');
|
||||
const assert = require('assert');
|
||||
const Module = require('module');
|
||||
|
@ -402,23 +400,8 @@ class FoxxService {
|
|||
});
|
||||
}
|
||||
|
||||
try {
|
||||
module.load(filename);
|
||||
return module.exports;
|
||||
} catch(e) {
|
||||
if (e instanceof ArangoError) {
|
||||
e.errorMessage += "\n(app relative include paths not supported anymore) \nFile: " + filename;
|
||||
throw e;
|
||||
}
|
||||
var err = new ArangoError({
|
||||
errorNum: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.code,
|
||||
errorMessage: errors.ERROR_FAILED_TO_EXECUTE_SCRIPT.message
|
||||
+ '\nFile: ' + filename
|
||||
});
|
||||
err.stack = e.stack;
|
||||
err.cause = e;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
get exports() {
|
||||
|
|
|
@ -358,13 +358,8 @@ SIMPLE_CLIENT_COULD_NOT_READ,2003,"could not read from server","Will be raised w
|
|||
|
||||
ERROR_MALFORMED_MANIFEST_FILE,3000,"malformed manifest file","The manifest file is malformed. It is not in a valid JSON format."
|
||||
ERROR_INVALID_APPLICATION_MANIFEST,3001,"manifest file is invalid","The manifest file of this application is invalid."
|
||||
ERROR_MANIFEST_FILE_ATTRIBUTE_MISSING,3002,"missing manifest attribute","The manifest file is incomplete. A required attribute is missing."
|
||||
ERROR_CANNOT_EXTRACT_APPLICATION_ROOT,3003,"unable to extract app root path","The root path of the application could not be found."
|
||||
ERROR_INVALID_FOXX_OPTIONS,3004,"invalid foxx options","The options used to configure the foxx are invalid."
|
||||
ERROR_FAILED_TO_EXECUTE_SCRIPT,3005,"failed to execute script","The script provided contains errors."
|
||||
ERROR_SYNTAX_ERROR_IN_SCRIPT,3006,"syntax error in script"," contains a syntax error: "
|
||||
ERROR_INVALID_MOUNTPOINT,3007,"mountpoint is invalid","mountpoint is invalid"
|
||||
ERROR_NO_FOXX_FOUND,3008,"No foxx found at this location","No foxx found at this location"
|
||||
ERROR_APP_NOT_FOUND,3009,"App not found","No app found at this mountpoint"
|
||||
ERROR_APP_NEEDS_CONFIGURATION,3010,"App not configured","The app has to be configured before it can be used"
|
||||
|
||||
|
@ -373,18 +368,7 @@ ERROR_APP_NEEDS_CONFIGURATION,3010,"App not configured","The app has to be confi
|
|||
################################################################################
|
||||
|
||||
ERROR_MODULE_NOT_FOUND,3100,"cannot locate module","The module path could not be resolved."
|
||||
ERROR_MODULE_SYNTAX_ERROR,3101,"syntax error in module","The module could not be parsed because of a syntax error."
|
||||
ERROR_MODULE_BAD_WRAPPER,3102,"failed to wrap module","The module wrapper could not be generated. This may indicate a problem with some of the names of the module's context variables."
|
||||
ERROR_MODULE_FAILURE,3103,"failed to invoke module","Failed to invoke the module in its context."
|
||||
ERROR_MODULE_UNKNOWN_FILE_TYPE,3110,"unknown file type","The module path resolves to a file of an unknown type."
|
||||
ERROR_MODULE_PATH_MUST_BE_ABSOLUTE,3111,"path must be absolute","The module path must be absolute."
|
||||
ERROR_MODULE_CAN_NOT_ESCAPE,3112,"cannot use '..' to escape top-level-directory","The relative module path can not escape the module's top-level directory."
|
||||
ERROR_MODULE_DRIVE_LETTER,3113,"drive local path is not supported","The module path contains a Windows drive letter, which is not supported."
|
||||
ERROR_MODULE_BAD_MODULE_ORIGIN,3120,"corrupted module origin","The module origin is invalid."
|
||||
ERROR_MODULE_BAD_PACKAGE_ORIGIN,3121,"corrupted package origin","The package origin is invalid."
|
||||
ERROR_MODULE_DOCUMENT_IS_EMPTY,3125,"no content","The module resolves to a document which is empty or malformed."
|
||||
ERROR_MODULE_MAIN_NOT_READABLE,3130,"cannot read main file","The module's main file is not readable."
|
||||
ERROR_MODULE_MAIN_NOT_JS,3131,"main file is not of type 'js'","The module's main file is not a JavaScript file."
|
||||
|
||||
################################################################################
|
||||
## results, which are not errors
|
||||
|
@ -393,12 +377,6 @@ ERROR_MODULE_MAIN_NOT_JS,3131,"main file is not of type 'js'","The module's main
|
|||
RESULT_ELEMENT_EXISTS,10000,"element not inserted into structure, because it already exists","Will be returned if the element was not insert because it already exists."
|
||||
RESULT_ELEMENT_NOT_FOUND,10001,"element not found in structure","Will be returned if the element was not found in the structure."
|
||||
|
||||
################################################################################
|
||||
## foxx app update via github
|
||||
################################################################################
|
||||
|
||||
ERROR_APP_ALREADY_EXISTS,20000,"newest version of app already installed","newest version of app already installed"
|
||||
|
||||
################################################################################
|
||||
## dispatcher errors
|
||||
################################################################################
|
||||
|
|
|
@ -809,13 +809,6 @@ typedef unsigned char bool;
|
|||
#define false 0
|
||||
#endif
|
||||
|
||||
// ...........................................................................
|
||||
// windows does not like the keyword inline -- but only if it uses the c
|
||||
// compiler weird. _inline should work for both I hope
|
||||
// ...........................................................................
|
||||
|
||||
#define inline _inline
|
||||
|
||||
// ...........................................................................
|
||||
// windows uses _alloca instead of alloca
|
||||
// ...........................................................................
|
||||
|
|
|
@ -3810,12 +3810,6 @@ void TRI_LogV8Exception(v8::Isolate* isolate, v8::TryCatch* tryCatch) {
|
|||
|
||||
LOG(ERR) << "!" << l.c_str();
|
||||
}
|
||||
|
||||
TRI_Utf8ValueNFC stacktrace(TRI_UNKNOWN_MEM_ZONE, tryCatch->StackTrace());
|
||||
|
||||
if (*stacktrace && stacktrace.length() > 0) {
|
||||
LOG(ERR) << "stacktrace: " << *stacktrace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue