Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F63910CCD for ; Thu, 3 Oct 2013 15:47:51 +0000 (UTC) Received: (qmail 29756 invoked by uid 500); 3 Oct 2013 15:47:07 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 29617 invoked by uid 500); 3 Oct 2013 15:47:06 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 28906 invoked by uid 99); 3 Oct 2013 15:47:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 15:47:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 589E890E977; Thu, 3 Oct 2013 15:47:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jan@apache.org To: commits@couchdb.apache.org Date: Thu, 03 Oct 2013 15:47:27 -0000 Message-Id: In-Reply-To: <89db8fc13604415eafa0b3c075f2c4e5@git.apache.org> References: <89db8fc13604415eafa0b3c075f2c4e5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [29/50] git commit: updated refs/heads/1894-feature-experimental-nodejs-couchjs to 532100c add plugins plugin for Fauxton Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/492c9899 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/492c9899 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/492c9899 Branch: refs/heads/1894-feature-experimental-nodejs-couchjs Commit: 492c98990f929dddc7de56fc0bb9582a5ce8d66b Parents: f8509fa Author: Jan Lehnardt Authored: Mon Sep 9 11:22:01 2013 +0200 Committer: Jan Lehnardt Committed: Thu Oct 3 16:09:17 2013 +0200 ---------------------------------------------------------------------- .gitignore | 1 + src/fauxton/app/addons/plugins/base.js | 24 ++++++ src/fauxton/app/addons/plugins/resources.js | 26 ++++++ src/fauxton/app/addons/plugins/routes.js | 47 +++++++++++ .../app/addons/plugins/templates/plugins.html | 88 ++++++++++++++++++++ src/fauxton/settings.json.default | 3 +- 6 files changed, 188 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index c554e82..5f3c9df 100644 --- a/.gitignore +++ b/.gitignore @@ -92,6 +92,7 @@ src/fauxton/app/load_addons.js src/fauxton/app/addons/* !src/fauxton/app/addons/activetasks !src/fauxton/app/addons/config +!src/fauxton/app/addons/plugins !src/fauxton/app/addons/logs !src/fauxton/app/addons/stats !src/fauxton/app/addons/replication http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/src/fauxton/app/addons/plugins/base.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/plugins/base.js b/src/fauxton/app/addons/plugins/base.js new file mode 100644 index 0000000..140a1f8 --- /dev/null +++ b/src/fauxton/app/addons/plugins/base.js @@ -0,0 +1,24 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +define([ + "app", + "api", + "addons/plugins/routes" +], + +function(app, FauxtonAPI, plugins) { + plugins.initialize = function() { + FauxtonAPI.addHeaderLink({title: "Plugins", href: "#_plugins", icon: "fonticon-plugins", className: 'plugins'}); + }; + return plugins; +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/src/fauxton/app/addons/plugins/resources.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/plugins/resources.js b/src/fauxton/app/addons/plugins/resources.js new file mode 100644 index 0000000..d00fada --- /dev/null +++ b/src/fauxton/app/addons/plugins/resources.js @@ -0,0 +1,26 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +define([ + "app", + "api" +], + +function (app, FauxtonAPI) { + var plugins = FauxtonAPI.addon(); + + plugins.Hello = FauxtonAPI.View.extend({ + template: "addons/plugins/templates/plugins" + }); + + return plugins; +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/src/fauxton/app/addons/plugins/routes.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/plugins/routes.js b/src/fauxton/app/addons/plugins/routes.js new file mode 100644 index 0000000..24d47f0 --- /dev/null +++ b/src/fauxton/app/addons/plugins/routes.js @@ -0,0 +1,47 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +define([ + "app", + "api", + "addons/plugins/resources" +], +function(app, FauxtonAPI, plugins) { + var PluginsRouteObject = FauxtonAPI.RouteObject.extend({ + layout: "one_pane", + + crumbs: [ + {"name": "Plugins","link": "_plugins"} + ], + + routes: { + "_plugins": "pluginsRoute" + }, + + selectedHeader: "Plugins", + + roles: ["_admin"], + + apiUrl:'plugins', + + initialize: function () { + //put common views used on all your routes here (eg: sidebars ) + }, + + pluginsRoute: function () { + this.setView("#dashboard-content", new plugins.Hello({})); + } + }); + + plugins.RouteObjects = [PluginsRouteObject]; + return plugins; +}); http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/src/fauxton/app/addons/plugins/templates/plugins.html ---------------------------------------------------------------------- diff --git a/src/fauxton/app/addons/plugins/templates/plugins.html b/src/fauxton/app/addons/plugins/templates/plugins.html new file mode 100644 index 0000000..3a49c28 --- /dev/null +++ b/src/fauxton/app/addons/plugins/templates/plugins.html @@ -0,0 +1,88 @@ +
+
+

GeoCouch

+

Version: couchdb1.2.x_v0.3.0-11-g66e6219

+

Author: Volker Mische

+

+ Available Erlang Versions: +

    +
  • CouchDB 1.4.0-XXX R15B01
  • +
+

+

+ +

+
+
+

CouchPerUser

+

Version: 1.0.0

+

Author: Bob Ippolito

+

+ Available Erlang Versions: +

    +
  • CouchDB 1.4.0-XXX R15B01
  • +
+

+

+ +

+
+
+ + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/couchdb/blob/492c9899/src/fauxton/settings.json.default ---------------------------------------------------------------------- diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default index 30088f0..4964135 100644 --- a/src/fauxton/settings.json.default +++ b/src/fauxton/settings.json.default @@ -4,7 +4,8 @@ { "name": "config" }, { "name": "logs" }, { "name": "stats" }, - { "name": "replication" }, + { "name": "replication" }, + { "name": "plugins" }, { "name": "contribute" }, { "name": "permissions" }, { "name": "auth" }