diff --git a/apps/aardvark/aardvark.js b/apps/aardvark/aardvark.js index e00d3adf48..08378c08a6 100644 --- a/apps/aardvark/aardvark.js +++ b/apps/aardvark/aardvark.js @@ -44,7 +44,14 @@ app.del("/foxxes/:key", function (req, res) { res.json(foxxes.uninstall(req.params("key"))); - }); + }).pathParam("key", { + description: "The _key attribute, where the information of this Foxx-Install is stored.", + dataType: "string", + required: true, + allowMultiple: false + }).nickname("Foxxes") + .summary("Uninstall a Foxx.") + .notes("This function is used to uninstall a foxx."); app.put("/foxxes/:key", function (req, res) { var content = JSON.parse(req.requestBody), @@ -55,15 +62,22 @@ } else { res.json(foxxes.deactivate()); } - }); + }).pathParam("key", { + description: "The _key attribute, where the information of this Foxx-Install is stored.", + dataType: "string", + required: true, + allowMultiple: false + }).nickname("Foxxes") + .summary("List of all foxxes.") + .notes("This function simply returns the list of all running" + + " foxxes and supplies the paths for the swagger documentation"); app.get('/foxxes', function (req, res) { res.json(foxxes.viewAll()); }).nickname("Foxxes") - .summary("List of all foxxes.") - .notes("This function simply returns the list of all running" - + " foxxes and supplies the information for the application viewer"); + .summary("Update a foxx.") + .notes("Used to either activate/deactivate a foxx, or change the mount point."); app.get('/swagger', function (req, res) { res.json(swagger.list()); diff --git a/apps/aardvark/index.html b/apps/aardvark/index.html new file mode 100644 index 0000000000..0ed35f227d --- /dev/null +++ b/apps/aardvark/index.html @@ -0,0 +1,172 @@ + + + + + + + ArangoDB Web Interface + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/aardvark/manifest.json b/apps/aardvark/manifest.json index bfac6eb21d..ea6389e04d 100644 --- a/apps/aardvark/manifest.json +++ b/apps/aardvark/manifest.json @@ -5,6 +5,93 @@ "apps": { "/": "aardvark.js" }, + + "assets": { + "index.html": { + "files": [ + "index.html" + ] + }, + + "app.js": { + "files": [ + "../../html/admin/js/lib/jquery-1.8.3.js", + "../../html/admin/js/lib/jquery-ui-1.9.2.custom.js", + "../../html/admin/js/lib/jquery.dataTables.js", + "../../html/admin/js/lib/jquery.autogrow.js", + "../../html/admin/js/lib/jquery.jeditable.js", + "../../html/admin/js/lib/jquery.jeditable.autogrow.js", + "../../html/admin/js/lib/jquery.snippet.js", + "../../html/admin/js/lib/jquery.gritter.js", + "../../html/admin/js/lib/jquery.slideto.min.js", + "../../html/admin/js/lib/jquery.wiggle.min.js", + "../../html/admin/js/lib/jquery.ba-bbq.min.js", + "../../html/admin/js/lib/handlebars-1.0.rc.1.js", + "../../html/admin/js/lib/underscore.js", + "../../html/admin/js/lib/backbone-1.0.0.js", + "../../html/admin/js/lib/d3.v3.js", + "../../html/admin/js/lib/nv.d3.js", + "../../html/admin/js/lib/ColVis.js", + "../../html/admin/js/lib/ejs_fulljslint.js", + "../../html/admin/js/lib/ejs_0.9_alpha_1_production.js", + "../../html/admin/js/lib/bootstrap.js", + "../../html/admin/js/lib/bootstrap-pagination.js", + "../../html/admin/src/ace.js", + "../../html/admin/js/lib/jqconsole.min.js", + "../../html/admin/js/lib/splitter.js", + "../../html/admin/js/lib/swagger.js", + "../../html/admin/js/lib/swagger-ui.js", + "../../html/admin/js/lib/highlight.7.3.pack.js", + "../../html/admin/js/arango/arango.js", + "../../html/admin/js/shell/browser.js", + "../../html/admin/js/modules/org/**", + "../../html/admin/js/bootstrap/errors.js", + "../../html/admin/js/bootstrap/monkeypatches.js", + "../../html/admin/js/bootstrap/module-internal.js", + "../../html/admin/js/client/bootstrap/module-internal.js", + "../../html/admin/js/shell/print.js", + "../../html/admin/js/client/client.js", + "../../html/admin/js/models/**", + "../../html/admin/js/collections/**", + "../../html/admin/js/views/**", + "../../html/admin/js/routers/**" + ] + }, + + "style.css": { + "files": [ + "../../html/admin/css/swagger/hightlight.default.css", + "../../html/admin/css/swagger/screen.css", + "../../html/admin/css/bootstrap.css", + "../../html/admin/css/jquery-ui-1.9.2.custom.css", + "../../html/admin/css/layout.css", + "../../html/admin/css/jquery.dataTables.css", + "../../html/admin/css/nv.d3.css", + "../../html/admin/css/navigationView.css", + "../../html/admin/css/footerView.css", + "../../html/admin/css/shellView.css", + "../../html/admin/css/queryView.css", + "../../html/admin/css/dashboardView.css", + "../../html/admin/css/logsView.css", + "../../html/admin/css/collectionsView.css", + "../../html/admin/css/collectionsItemView.css", + "../../html/admin/css/collectionView.css", + "../../html/admin/css/documentsView.css", + "../../html/admin/css/documentView.css", + "../../html/admin/css/documentSourceView.css", + "../../html/admin/css/swaggerView.css", + "../../html/admin/css/foxxView.css", + "../../html/admin/css/jquery.snippet.css", + "../../html/admin/css/jquery.gritter.css", + "../../html/admin/css/modal.css", + "../../html/admin/css/ansi.css" + ] + } + }, + + "files": { + "/img" : "../../html/admin/img/**" + }, "models": "models" } \ No newline at end of file diff --git a/html/admin/index.html b/html/admin/index.html index 779b7e2030..0ed35f227d 100644 --- a/html/admin/index.html +++ b/html/admin/index.html @@ -162,7 +162,7 @@ - + diff --git a/html/admin/js/routers/router.js b/html/admin/js/routers/router.js index 84a7f29aeb..c61fcbe54a 100644 --- a/html/admin/js/routers/router.js +++ b/html/admin/js/routers/router.js @@ -15,9 +15,9 @@ $(document).ready(function() { "logs" : "logs", "about" : "about", "application/:key" : "applicationEdit", - "applications/running" : "applicationsActive", "applications/installed" : "applicationsInstalled", - "applications/swagger" : "swagger" + "applications/available" : "applicationsAvailable", + "applications/documentation" : "applicationsDocumentation" }, initialize: function () { @@ -156,7 +156,7 @@ $(document).ready(function() { }); }, - applicationsInstalled: function() { + applicationsAvailable: function() { if (this.foxxList === undefined) { this.foxxList = new window.FoxxCollection(); } @@ -169,7 +169,7 @@ $(document).ready(function() { this.naviView.selectMenuItem('applications-menu'); }, - applicationsActive: function() { + applicationsInstalled: function() { if (this.foxxList === undefined) { this.foxxList = new window.FoxxCollection(); } @@ -199,11 +199,11 @@ $(document).ready(function() { }, - swagger: function() { - if (this.swaggerView === undefined) { - this.swaggerView = new window.SwaggerView(); + applicationsDocumentation: function() { + if (this.appDocuView === undefined) { + this.appDocuView = new window.AppDocumentationView(); } - this.swaggerView.render(); + this.appDocuView.render(); this.naviView.selectMenuItem('applications-menu'); } diff --git a/html/admin/js/templates/swaggerView.ejs b/html/admin/js/templates/appDocumentationView.ejs similarity index 80% rename from html/admin/js/templates/swaggerView.ejs rename to html/admin/js/templates/appDocumentationView.ejs index 415ee81833..1175c98759 100644 --- a/html/admin/js/templates/swaggerView.ejs +++ b/html/admin/js/templates/appDocumentationView.ejs @@ -1,6 +1,6 @@
diff --git a/html/admin/js/templates/foxxEditView.ejs b/html/admin/js/templates/foxxEditView.ejs index 81025a633b..e140fd41de 100644 --- a/html/admin/js/templates/foxxEditView.ejs +++ b/html/admin/js/templates/foxxEditView.ejs @@ -8,9 +8,13 @@ - + - + + + + + @@ -41,10 +45,12 @@ diff --git a/html/admin/js/templates/navigationView.ejs b/html/admin/js/templates/navigationView.ejs index 8d34f3bb30..530b87847b 100644 --- a/html/admin/js/templates/navigationView.ejs +++ b/html/admin/js/templates/navigationView.ejs @@ -12,9 +12,9 @@
  • Collections
  • AQL Editor
  • diff --git a/html/admin/js/views/swaggerView.js b/html/admin/js/views/appDocumentationView.js similarity index 59% rename from html/admin/js/views/swaggerView.js rename to html/admin/js/views/appDocumentationView.js index dcf328e25c..fbcf2c29c5 100644 --- a/html/admin/js/views/swaggerView.js +++ b/html/admin/js/views/appDocumentationView.js @@ -1,10 +1,10 @@ -window.SwaggerView = Backbone.View.extend({ +window.AppDocumentationView = Backbone.View.extend({ el: '#content', - template: new EJS({url: '/_admin/html/js/templates/swaggerView.ejs'}), + template: new EJS({url: '/_admin/html/js/templates/appDocumentationView.ejs'}), initialize: function() { - window.swaggerUi = new SwaggerUi({ + this.swaggerUi = new SwaggerUi({ discoveryUrl:"../../aardvark/swagger", apiKey: false, dom_id:"swagger-ui-container", @@ -12,17 +12,17 @@ window.SwaggerView = Backbone.View.extend({ supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch', 'head'], onComplete: function(swaggerApi, swaggerUi){ if(console) { - console.log("Loaded SwaggerUI") - console.log(swaggerApi); - console.log(swaggerUi); - } + console.log("Loaded SwaggerUI") + console.log(swaggerApi); + console.log(swaggerUi); + } $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, onFailure: function(data) { if(console) { - console.log("Unable to Load SwaggerUI"); - console.log(data); - } + console.log("Unable to Load SwaggerUI"); + console.log(data); + } }, docExpansion: "none" }); @@ -30,7 +30,7 @@ window.SwaggerView = Backbone.View.extend({ render: function(){ $(this.el).html(this.template.render({})); - window.swaggerUi.load(); + this.swaggerUi.load(); return this; } });
    Name:<%=appInfos[1] %><%=appInfos[1] %>
      
    Mount-Point: