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 BCDDCC806 for ; Mon, 9 Sep 2013 09:53:52 +0000 (UTC) Received: (qmail 22212 invoked by uid 500); 9 Sep 2013 09:53:41 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 21711 invoked by uid 500); 9 Sep 2013 09:53:33 -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 19712 invoked by uid 99); 9 Sep 2013 09:53:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2013 09:53:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8247E9039A0; Mon, 9 Sep 2013 09:53:22 +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: Mon, 09 Sep 2013 09:54:10 -0000 Message-Id: <59be8cb3956344caaf7b4cdaabe4fedd@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [50/50] [abbrv] git commit: updated refs/heads/1867-feature-plugins to 8aad450 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/8aad4507 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/8aad4507 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/8aad4507 Branch: refs/heads/1867-feature-plugins Commit: 8aad4507f963439001ad91ef2064bc3e4698baf9 Parents: addaccb Author: Jan Lehnardt Authored: Mon Sep 9 11:22:01 2013 +0200 Committer: Jan Lehnardt Committed: Mon Sep 9 11:52:25 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 | 1 + 6 files changed, 187 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/8aad4507/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 6c67ab7..d93c545 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,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/contribute http://git-wip-us.apache.org/repos/asf/couchdb/blob/8aad4507/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/8aad4507/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/8aad4507/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/8aad4507/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/8aad4507/src/fauxton/settings.json.default ---------------------------------------------------------------------- diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default index 2b7fe89..1218700 100644 --- a/src/fauxton/settings.json.default +++ b/src/fauxton/settings.json.default @@ -4,6 +4,7 @@ { "name": "config" }, { "name": "logs" }, { "name": "stats" }, + { "name": "plugins" }, { "name": "contribute" }, { "name": "auth" } ],