1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
Willi Goesgens 2015-03-05 15:25:31 +01:00
commit ffb8c36610
6 changed files with 5 additions and 23 deletions

View File

@ -23,6 +23,7 @@ Start the interface from <a href="http://localhost:8529" target="_blank">http://
<dt>Note</dt> <dt>Note</dt>
<dd>Before we start: Please <a href="https://www.arangodb.com/download" target="_blank">Install and run ArangoDB</a> in version 2.5 or newer</dd> <dd>Before we start: Please <a href="https://www.arangodb.com/download" target="_blank">Install and run ArangoDB</a> in version 2.5 or newer</dd>
</dl> </dl>
![ArangoDB WebInterface](applications-tab.png) ![ArangoDB WebInterface](applications-tab.png)
<a id="new-application" /> <a id="new-application" />
@ -54,7 +55,6 @@ Whenever we modify something in the app during this tutorial it should be visibl
So you can directly test if your modification has worked or not. So you can directly test if your modification has worked or not.
![Swagger Documentation](foxx_documentation.png) ![Swagger Documentation](foxx_documentation.png)
![TODO](foxx_create.png)
<a id="developing" /> <a id="developing" />
!SUBSECTION Developing in Foxx !SUBSECTION Developing in Foxx
@ -153,9 +153,6 @@ Some details you should know about the code:
* `res.json()` creates a JSON response for the client. * `res.json()` creates a JSON response for the client.
* The comment on top of the function will generate a nice documentation. * The comment on top of the function will generate a nice documentation.
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_readDocuments.png" width="100%">
<a id="create-document" /> <a id="create-document" />
!SUBSECTION Create a new document !SUBSECTION Create a new document
This code-snippet defines the route to create a new document in our collection: This code-snippet defines the route to create a new document in our collection:
@ -183,10 +180,6 @@ Some details you should know about the code:
* `forClient()` will create JSON output for the client * `forClient()` will create JSON output for the client
* `bodyParam` defines that there is an body expected in each request and the body should correspond to a valid FirstCollection object. All other bodies will be rejected and a documentation will be generated for this body. It can be accessed in the request parameters via it's name 'firstCollection' * `bodyParam` defines that there is an body expected in each request and the body should correspond to a valid FirstCollection object. All other bodies will be rejected and a documentation will be generated for this body. It can be accessed in the request parameters via it's name 'firstCollection'
<div class="tutorialViewer">
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_createNewDoc.png" width="100%">
</div>
<a id="read-document" /> <a id="read-document" />
!SUBSECTION Read a single document !SUBSECTION Read a single document
This route allows to read a specific document in our collection, identified by Id: This route allows to read a specific document in our collection, identified by Id:
@ -214,10 +207,6 @@ controller.get('/firstCollection/:id', function (req, res) {
* `byId` fetches a document from the collection by it's unique identifier: `_key` * `byId` fetches a document from the collection by it's unique identifier: `_key`
* `pathParam` documents the path parameter `id` as described in the path. It also restricts it to be a string. * `pathParam` documents the path parameter `id` as described in the path. It also restricts it to be a string.
<div class="tutorialViewer">
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_readDocument.png" width="100%">
</div>
<a id="update-document"> <a id="update-document">
!SUBSECTION Update a document !SUBSECTION Update a document
This code shows how to update a specific document in our collection. The API call is: This code shows how to update a specific document in our collection. The API call is:
@ -247,10 +236,6 @@ Some details you should now about the code:
* `controller.put(path, callback)` creates a `PUT` request on `path`. It will call `callback` whenever triggered. * `controller.put(path, callback)` creates a `PUT` request on `path`. It will call `callback` whenever triggered.
* `replaceById` overwrites a document from the collection with a newer version. * `replaceById` overwrites a document from the collection with a newer version.
<div class="tutorialViewer">
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_updateDocument.png" width="100%">
</div>
<a id="delete-document"> <a id="delete-document">
!SUBSECTION Delete a document !SUBSECTION Delete a document
This call allows to delete a specific document in our collection: This call allows to delete a specific document in our collection:
@ -281,10 +266,6 @@ Some details you should now about the code:
* `errorResponse` defines the message that should be delivered to the client whenever there was an error. In this case the user will get a classical `404`. * `errorResponse` defines the message that should be delivered to the client whenever there was an error. In this case the user will get a classical `404`.
* If no `errorResponse` is given a internal `500` will be returned by the server. * If no `errorResponse` is given a internal `500` will be returned by the server.
<div class="tutorialViewer">
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_removeDocument.png" width="100%">
</div>
<a id="execute-query"> <a id="execute-query">
!SUBSECTION Adding a new route / execute a query !SUBSECTION Adding a new route / execute a query
We now want to add some functionality, a simple search query. First we create an endpoint that allows to execute a simple AQL query. We now want to add some functionality, a simple search query. First we create an endpoint that allows to execute a simple AQL query.
@ -323,6 +304,3 @@ Some details you should know about the code:
<dt>Note</dt> <dt>Note</dt>
<dd>This part of the code is not generated.</dd> <dd>This part of the code is not generated.</dd>
</dl> </dl>
<div class="tutorialViewer">
<img src="/wp-content/themes/triagens/tutorials/foxx/foxx_searchByName.png" width="100%">
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -33,6 +33,8 @@
// Spy on all views that are initialized by startup // Spy on all views that are initialized by startup
beforeEach(function () { beforeEach(function () {
// Disable the binding of resize event. Causes tests to occasionally fail
spyOn($.fn, "resize");
window.CreateDummyForObject(window, "FoxxInstallView"); window.CreateDummyForObject(window, "FoxxInstallView");
naviDummy = { naviDummy = {
id: "navi", id: "navi",
@ -324,6 +326,7 @@
beforeEach(function () { beforeEach(function () {
r = new window.Router(); r = new window.Router();
spyOn(r, "handleResize");
simpleNavigationCheck = function (url, viewName, navTo, initObject, simpleNavigationCheck = function (url, viewName, navTo, initObject,
funcList, shouldNotRender, shouldNotCache) { funcList, shouldNotRender, shouldNotCache) {
var route, var route,
@ -676,6 +679,7 @@
beforeEach(function () { beforeEach(function () {
spyOn(jQueryDummy, "ajax").andCallFake(function() { }); spyOn(jQueryDummy, "ajax").andCallFake(function() { });
r = new window.Router(); r = new window.Router();
spyOn(r, "handleResize");
}); });
it("checkUser logged in", function () { it("checkUser logged in", function () {