From 10bfbb90e5d1dd45fba597f82cca2b4c38d1a47d Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 23 Nov 2012 09:04:37 +0100 Subject: [PATCH 1/5] fixed type errors --- arangod/VocBase/compactor.c | 4 ++-- arangod/VocBase/datafile.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arangod/VocBase/compactor.c b/arangod/VocBase/compactor.c index 213ee4882c..15a3860f8c 100644 --- a/arangod/VocBase/compactor.c +++ b/arangod/VocBase/compactor.c @@ -248,7 +248,7 @@ static bool Compactifier (TRI_df_marker_t const* marker, void* data, TRI_datafil TRI_READ_UNLOCK_DOCUMENTS_INDEXES_PRIMARY_COLLECTION(primary); if (deleted) { - LOG_TRACE("found a stale document: %llu", d->_did); + LOG_TRACE("found a stale document: %llu", (unsigned long long) d->_did); return true; } @@ -277,7 +277,7 @@ static bool Compactifier (TRI_df_marker_t const* marker, void* data, TRI_datafil dfi->_numberDead += 1; dfi->_sizeDead += marker->_size - markerSize; - LOG_DEBUG("found a stale document after copying: %llu", d->_did); + LOG_DEBUG("found a stale document after copying: %llu", (unsigned long long) d->_did); TRI_WRITE_UNLOCK_DATAFILES_DOC_COLLECTION(primary); return true; diff --git a/arangod/VocBase/datafile.c b/arangod/VocBase/datafile.c index f0dfd7cd5e..38e3b78456 100644 --- a/arangod/VocBase/datafile.c +++ b/arangod/VocBase/datafile.c @@ -626,7 +626,7 @@ TRI_datafile_t* TRI_CreateDatafile (char const* filename, TRI_voc_size_t maximal // remove empty file TRI_UnlinkFile(filename); - LOG_ERROR("cannot memory map file '%s': '%d'", filename, res); + LOG_ERROR("cannot memory map file '%s': '%d'", filename, (int) res); return NULL; } From 4cb14d75378c1d4c3524da2803756ea149e14808 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 23 Nov 2012 09:32:52 +0100 Subject: [PATCH 2/5] fixed documentation --- Documentation/Manual/Home.md | 8 +++++--- Documentation/Manual/NewFeatures11.md | 4 ++-- Installation/Makefile.local | 9 +++------ Makefile.in | 1 + 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/Manual/Home.md b/Documentation/Manual/Home.md index 08d50350db..1f05e17716 100644 --- a/Documentation/Manual/Home.md +++ b/Documentation/Manual/Home.md @@ -23,8 +23,10 @@ The HTML and PDF versions of the manual can be found Please contact @EXTREF_S{http://www.arangodb.org/connect,us} if you have any questions. -New Features in ArangoDB 1.1 {#NewFeatures11} -============================================= +New Features in ArangoDB 1.1 +============================ + +- @ref NewFeatures11 Upgrading to ArangoDB 1.1 {#ArangoDBUpgrading} ============================================== @@ -65,7 +67,7 @@ ArangoDB's Developer Manuals {#ArangoDBAPIManual} API aka Drivers {#HomeApi} ========================== -Though arangoDB is yet a young project, a couple of people started to +Though ArangoDB is yet a young project, a couple of people started to add APIs for different programming languages/frameworks. See @EXTREF{http://www.arangodb.org/api,http://www.arangodb.org/api}. diff --git a/Documentation/Manual/NewFeatures11.md b/Documentation/Manual/NewFeatures11.md index 3646023180..e37d327e1b 100644 --- a/Documentation/Manual/NewFeatures11.md +++ b/Documentation/Manual/NewFeatures11.md @@ -154,7 +154,7 @@ supplied. All other attributes will be removed. Replacing will also create a new arangosh> db.users.replace(user, { "active" : false }); -For more information, please check @ref JS_UpdateVocbaseCol and @ref JS_ReplaeVocbaseCol. +For more information, please check @ref JS_UpdateVocbaseCol and @ref JS_ReplaceVocbaseCol. ## AQL @@ -240,7 +240,7 @@ Blueprints is a property graph model interface with provided implementations. Databases that implement the Blueprints interfaces automatically support Blueprints-enabled applications (@EXTREF{http://tinkerpop.com/,http://tinkerpop.com}). -For more information please refer to @ref HttpBluePrints. +For more information please refer to @ref HttpBlueprints. ## Server statistics diff --git a/Installation/Makefile.local b/Installation/Makefile.local index e7ac8ee6e9..6efa467877 100644 --- a/Installation/Makefile.local +++ b/Installation/Makefile.local @@ -1,7 +1,6 @@ # -*- mode: Makefile; -*- MANUAL_DST=www@www.arangodb.org:/var/www/www.arangodb.org/avoc/manuals -IMAGES_DST=www@www.arangodb.org:/var/www/www.arangodb.org/avoc/manuals/images OUTPUT_FOLDER=Doxygen/manuals/$(PACKAGE_VERSION) @@ -22,14 +21,14 @@ publish-wiki: $(MAKE) wiki (cd Doxygen/wiki && git add *.md; git commit -m "`date`" -a; git push) -publish-html: $(OUTPUT_FOLDER) +publish-html: $(MAKE) doxygen + mkdir -p $(OUTPUT_FOLDER)/images @for w in $(WIKI); do cp Doxygen/website/$$w.html $(OUTPUT_FOLDER); done - @for i in `ls Doxygen/website/images/*.png`; do cp $$i $(OUTPUT_FOLDER)/images; done + @for i in `ls Doxygen/website/images/*.png`; do cp $$i $(OUTPUT_FOLDER)/images/; done @cp Doxygen/website/arangodb.css $(OUTPUT_FOLDER) publish-pdf: $(OUTPUT_FOLDER) - $(MAKE) latex $(MAKE) latex cp Doxygen/latex/dba-manual.pdf $(OUTPUT_FOLDER) cp Doxygen/latex/implementor-manual.pdf $(OUTPUT_FOLDER) @@ -39,5 +38,3 @@ publish-pdf: $(OUTPUT_FOLDER) cp Doxygen/latex/imp-manual.pdf $(OUTPUT_FOLDER) cp arangod/Documentation/arangodb_1.0_shell_reference_card.pdf $(OUTPUT_FOLDER) -$(OUTPUT_FOLDER): - mkdir -p $(OUTPUT_FOLDER)/images diff --git a/Makefile.in b/Makefile.in index 425d89fa13..ae10dbc00e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1648,6 +1648,7 @@ WIKI = \ JSModules \ Key-Value \ NamingConventions \ + NewFeatures11 \ RefManual \ RestDocument \ RestEdge \ From 483cf6cbb174aca7eafe9150071f5df3066eac11 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 23 Nov 2012 09:37:32 +0100 Subject: [PATCH 3/5] update manual --- Documentation/Manual/NewFeatures11.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/Manual/NewFeatures11.md b/Documentation/Manual/NewFeatures11.md index e37d327e1b..74a84132f3 100644 --- a/Documentation/Manual/NewFeatures11.md +++ b/Documentation/Manual/NewFeatures11.md @@ -24,8 +24,7 @@ batch requests may still be beneficial in many cases, but it should be obvious that they should be used only when they replace a considerable amount of individual requests. -For more information see @ref HttpBatch. - +For more information see @ref HttpBatch and @EXTREF{http://www.arangodb.org/2012/10/04/gain-factor-of-5-using-batch-updates,this blog article}. ## More fine grained control of sync behavior @@ -62,10 +61,10 @@ synchronisation behavior will be applied. Setting the parameter to `true` will force synchronisation. The following Javascript methods support forcing synchronisation, too: -* save() -* update() -* relace() -* delete() +* `save()` +* `update()` +* `relace()` +* `delete()` Force synchronisation of a save operation: From 2b9e7d134db839779e1270a295daa1facd3f8a48 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 23 Nov 2012 10:02:51 +0100 Subject: [PATCH 4/5] documentation fix --- Documentation/Manual/FirstStepsArangoDB.md | 33 +++++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/Documentation/Manual/FirstStepsArangoDB.md b/Documentation/Manual/FirstStepsArangoDB.md index 785c982aeb..60f1ebf024 100644 --- a/Documentation/Manual/FirstStepsArangoDB.md +++ b/Documentation/Manual/FirstStepsArangoDB.md @@ -56,26 +56,14 @@ In case you just want to experiment with ArangoDB you can use the @EXTREF_S{http://www.arangodb.org/try,on-line} demo without installing ArangoDB locally. -The ArangoDB database package comes with the following programs: - -- `arangod`: The ArangoDB database daemon. This server program is - intended to run as daemon process and to server the various clients - connection to the server via TCP / HTTP. See @ref - UserManualServerStartStop. -- `arango-update`: Used to initialize or update the database. -- `arangosh`: The ArangoDB shell. A client that implements a - read-eval-print loop (REPL) and provides functions to access and - administrate the ArangoDB server. See @ref UserManualShellStartStop. -- `arangoimp`: A bulk importer for the ArangoDB server. - See @ref ImpManual - For Linux: - visit the official ArangoDB download page at @EXTREF{http://www.arangodb.org/download,http://www.arangodb.org/download} and download the correct package for you Linux distribution - install the package using you favorite package manager -- start up the database server, normally this is down by +- initialise (or upgrade) the database `/usr/local/bin/arango-upgrade` +- start up the database server, normally this is done by executing `/etc/init.d/arangod start`. The exact command depends on your Linux distribution @@ -94,6 +82,23 @@ the ArangoDB database server. If there is no such process, check the log file `/var/log/arangodb/arangod.log` for errors. +ArangoDB programs {#FirstStepsArangoDBBinaries} +=============================================== + +The ArangoDB database package comes with the following programs: + +- `arangod`: The ArangoDB database daemon. This server program is + intended to run as daemon process and to server the various clients + connection to the server via TCP / HTTP. See @ref + UserManualServerStartStop. +- `arango-update`: Used to initialize or update the database. +- `arangosh`: The ArangoDB shell. A client that implements a + read-eval-print loop (REPL) and provides functions to access and + administrate the ArangoDB server. See @ref UserManualShellStartStop. +- `arangoimp`: A bulk importer for the ArangoDB server. + See @ref ImpManual + + Exploring Collections and Documents {#FirstStepsArangoDBFirstSteps} =================================================================== From 8ff9eefdbe3359c85528d35e2143f37808aa811e Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 23 Nov 2012 10:39:11 +0100 Subject: [PATCH 5/5] fixed update in web interface --- html/admin/js/master.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/html/admin/js/master.js b/html/admin/js/master.js index 804240f03a..56f37523c3 100644 --- a/html/admin/js/master.js +++ b/html/admin/js/master.js @@ -17,8 +17,8 @@ var statDivCount; // documents global vars var collectionTotalPages; var collectionCurrentPage; +var globalDocumentCopy = { }; var globalCollectionName; -var globalCollectionID; var checkCollectionName; var printedHelp = false; var open = false; @@ -775,7 +775,6 @@ var logTable = $('#logTableID').dataTable({ /////////////////////////////////////////////////////////////////////////////// $('#saveEditedDocButton').live('click', function () { - if (tableView == true) { var data = documentEditTable.fnGetData(); var result = {}; @@ -784,23 +783,22 @@ var logTable = $('#logTableID').dataTable({ for (row in data) { var row_data = data[row]; if ( row_data[1] == "_id" ) { - documentID = row_data[3]; + documentID = JSON.parse(row_data[3]); } else { result[row_data[1]] = JSON.parse(row_data[3]); } - } $.ajax({ type: "PUT", - url: "/_api/document/" + JSON.parse(documentID), + url: "/_api/document/" + documentID, data: JSON.stringify(result), contentType: "application/json", processData: false, success: function(data) { tableView = true; - var collID = JSON.parse(documentID).split("/"); + var collID = documentID.split("/"); window.location.href = "#showCollection?" + collID[0]; }, error: function(data) { @@ -810,9 +808,8 @@ var logTable = $('#logTableID').dataTable({ } else { try { - var documentID; + var documentID = globalDocumentCopy._id; var boxContent = $('#documentEditSourceBox').val(); - documentID = globalCollectionID; boxContent = stateReplace(boxContent); parsedContent = JSON.parse(boxContent); @@ -957,11 +954,12 @@ var logTable = $('#logTableID').dataTable({ result[row_data[1]] = JSON.parse(row_data[3]); } - var copies = { }; // copy systerm attributes + var copies = { }; // copy system attributes for (var a in systemAttributes()) { copies[a] = result[a]; delete result[a]; } + globalDocumentCopy = copies; var myFormattedString = FormatJSON(result); $('#documentEditSourceBox').val(myFormattedString); @@ -982,7 +980,9 @@ var logTable = $('#logTableID').dataTable({ }); for (var a in systemAttributes()) { - documentEditTable.fnAddData(['', a, value2html(copies[a], true), JSON.stringify(copies[a]) ]); + if (globalDocumentCopy[a] != undefined) { + documentEditTable.fnAddData(['', a, value2html(globalDocumentCopy[a], true), JSON.stringify(globalDocumentCopy[a]) ]); + } } documentTableMakeEditable ('#documentEditTableID');