couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [63/64] [abbrv] fauxton commit: updated refs/heads/secondary-indexes to ef01e24
Date Wed, 23 Jul 2014 19:25:12 GMT
Setting Up Indexes addon


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/fe48dc97
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/fe48dc97
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/fe48dc97

Branch: refs/heads/secondary-indexes
Commit: fe48dc97befb6032233d9c462296e94a4d8098d5
Parents: 893e988
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Tue Jul 22 11:39:46 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Wed Jul 23 15:02:01 2014 -0400

----------------------------------------------------------------------
 .gitignore                             |  1 +
 app/addons/indexes/base.js             | 44 +++++++++++++++++++++++++++++
 app/addons/indexes/index-components.js | 28 ++++++++++++++++++
 app/addons/indexes/resources.js        | 21 ++++++++++++++
 app/addons/indexes/routes.js           | 33 ++++++++++++++++++++++
 app/addons/indexes/views.js            | 21 ++++++++++++++
 6 files changed, 148 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 1baaaf1..4d2ca75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ app/addons/*
 !app/addons/replication
 !app/addons/contribute
 !app/addons/auth
+!app/addons/indexes
 !app/addons/exampleAuth
 !app/addons/permissions
 !app/addons/verifyinstall

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/app/addons/indexes/base.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/base.js b/app/addons/indexes/base.js
new file mode 100644
index 0000000..a7107a1
--- /dev/null
+++ b/app/addons/indexes/base.js
@@ -0,0 +1,44 @@
+// 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.
+
+
+/*  View Indexes  */
+define([
+  "app",
+  "api",
+  "addons/indexes/views",
+  "addons/indexes/routes"
+],
+function(app, FauxtonAPI, Views, Routes) {
+  Routes.initialize = function() {
+
+    /*
+      Example of an extension:
+      An extension is just an event that may or may not have listener in another view.
+      In this case the listener is in the documents addon in the sidebar.
+
+      If there are is a view that you want rendered in another route, this is the way to
do it.
+
+      Each Secondary index is going to trigger this event with the views it's passing.
+      The views will be rendered and have links to the routes defined in this addon. Then
it's just business as usual.
+
+      FauxtonAPI.registerExtension('sidebar:list', new Views.IndexMenu({}));
+      FauxtonAPI.registerExtension('sidebar:links',{
+        title: "New View",
+        url: "new_view"
+      });
+
+
+    */
+  };
+  return Routes;
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/app/addons/indexes/index-components.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/index-components.js b/app/addons/indexes/index-components.js
new file mode 100644
index 0000000..ffb22a0
--- /dev/null
+++ b/app/addons/indexes/index-components.js
@@ -0,0 +1,28 @@
+// 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.
+
+
+/*
+  Index components includes any common, generic, and reusable code for creating secondary
indexes
+  View functions, List functions, Show Functions, and Filter functions, as well as anything
created by
+  couchdb affiliates.
+*/
+
+define([
+  "app",
+  "api"
+],
+
+function(app, FauxtonAPI) {
+
+
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/app/addons/indexes/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/resources.js b/app/addons/indexes/resources.js
new file mode 100644
index 0000000..667eaba
--- /dev/null
+++ b/app/addons/indexes/resources.js
@@ -0,0 +1,21 @@
+// 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",
+  "addons/fauxton/base",
+],
+
+function (app, Fauxton) {
+  var Resources = {};
+
+  return Resources;
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/app/addons/indexes/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes.js b/app/addons/indexes/routes.js
new file mode 100644
index 0000000..4c7515d
--- /dev/null
+++ b/app/addons/indexes/routes.js
@@ -0,0 +1,33 @@
+// 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/indexes/resources",
+  "addons/indexes/views"
+],
+
+function (app, FauxtonAPI, Resources, Views) {
+
+  var ViewIndexes = FauxtonAPI.RouteObject.extend({});
+
+  var FilterIndexes = FauxtonAPI.RouteObject.extend({});
+
+  var ShowIndexes = FauxtonAPI.RouteObject.extend({});
+
+  var ListIndexes = FauxtonAPI.RouteObject.extend({});
+
+
+  Resources.RouteObjects = [ViewIndexes, FilterIndexes, ShowIndexes, ListIndexes];
+
+  return Resources;
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fe48dc97/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
new file mode 100644
index 0000000..e8383cf
--- /dev/null
+++ b/app/addons/indexes/views.js
@@ -0,0 +1,21 @@
+// 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 Views = {};
+
+  return Views;
+});


Mime
View raw message