You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by be...@apache.org on 2014/12/01 17:17:56 UTC

fauxton commit: updated refs/heads/master to 05a7e8b

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 73d272e6e -> 05a7e8b56


verifyinstall addon whitespace and style fixes

Just a housekeeping ticket.


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

Branch: refs/heads/master
Commit: 05a7e8b56611e3c9bea234cf8f4f34ae661056c2
Parents: 73d272e
Author: Benjamin Keen <be...@gmail.com>
Authored: Fri Nov 28 12:52:46 2014 -0800
Committer: Benjamin Keen <be...@gmail.com>
Committed: Mon Dec 1 08:17:46 2014 -0800

----------------------------------------------------------------------
 app/addons/verifyinstall/base.js             | 15 ++++-----
 app/addons/verifyinstall/resources.js        | 40 +++++++++--------------
 app/addons/verifyinstall/routes.js           | 11 ++++---
 app/addons/verifyinstall/templates/main.html | 38 ++++++++++-----------
 app/addons/verifyinstall/views.js            | 12 +++----
 5 files changed, 52 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05a7e8b5/app/addons/verifyinstall/base.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/base.js b/app/addons/verifyinstall/base.js
index ccae3f9..a64d44a 100644
--- a/app/addons/verifyinstall/base.js
+++ b/app/addons/verifyinstall/base.js
@@ -11,21 +11,20 @@
 // the License.
 
 define([
-  "app",
-  "api",
-  "addons/verifyinstall/routes"
+  'app',
+  'api',
+  'addons/verifyinstall/routes'
 ],
 
 function(app, FauxtonAPI, VerifyInstall) {
   VerifyInstall.initialize = function () {
     FauxtonAPI.addHeaderLink({
-        title: "Verify", 
-        href: "#verifyinstall",
-        icon: "fonticon-ok-circled",
-        bottomNav: true,
+        title: 'Verify',
+        href: '#verifyinstall',
+        icon: 'fonticon-ok-circled',
+        bottomNav: true
       });
   };
 
-
   return VerifyInstall;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05a7e8b5/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/resources.js b/app/addons/verifyinstall/resources.js
index 86b8165..c018ca0 100644
--- a/app/addons/verifyinstall/resources.js
+++ b/app/addons/verifyinstall/resources.js
@@ -11,10 +11,10 @@
 // the License.
 
 define([
-  "app",
-  "api",
-  "addons/databases/resources",
-  "addons/documents/resources"
+  'app',
+  'api',
+  'addons/databases/resources',
+  'addons/documents/resources'
 ],
 
 function (app, FauxtonAPI, Databases, Documents) {
@@ -33,7 +33,6 @@ function (app, FauxtonAPI, Databases, Documents) {
   var doc, viewDoc;
 
   Verifyinstall.testProcess = {
-
     saveDoc: function () {
       doc = new Documents.Doc({_id: 'test_doc_1', a: 1}, {
         database: db
@@ -47,7 +46,7 @@ function (app, FauxtonAPI, Databases, Documents) {
     },
 
     updateDoc: function () {
-      doc.set({b: "hello"});
+      doc.set({b: 'hello'});
       return doc.save(); 
     },
 
@@ -66,7 +65,7 @@ function (app, FauxtonAPI, Databases, Documents) {
       .then(function () {
         deferred.resolve();
       }, function (xhr, error, reason) {
-        if (reason === "Unauthorized") {
+        if (reason === 'Unauthorized') {
           deferred.reject(xhr, error, reason);
         }
       });
@@ -92,8 +91,8 @@ function (app, FauxtonAPI, Databases, Documents) {
           return deferred.resolve();
         }
         var reason = {
-            reason: 'Values expect 6, got ' + row.value
-          };
+          reason: 'Values expect 6, got ' + row.value
+        };
 
         deferred.reject({responseText: JSON.stringify(reason)});
       }, deferred.reject);
@@ -102,31 +101,23 @@ function (app, FauxtonAPI, Databases, Documents) {
     },
 
     setupView: function () {
-      var doc1 = new Documents.Doc({_id: 'test_doc10', a: 1}, {
-        database: db
-      });
-
-      var doc2 = new Documents.Doc({_id: 'test_doc_20', a: 2}, {
-        database: db
-      });
-
-      var doc3 = new Documents.Doc({_id: 'test_doc_30', a: 3}, {
-        database: db
-      });
+      var doc1 = new Documents.Doc({_id: 'test_doc_10', a: 1}, { database: db });
+      var doc2 = new Documents.Doc({_id: 'test_doc_20', a: 2}, { database: db });
+      var doc3 = new Documents.Doc({_id: 'test_doc_30', a: 3}, { database: db });
 
       viewDoc = new Documents.Doc({
         _id: '_design/view_check',
         views: {
           'testview': { 
-            map:'function (doc) { emit(doc._id, doc.a); }',
+            map: 'function (doc) { emit(doc._id, doc.a); }',
             reduce: '_sum'
           }
         } 
       },{
-        database: db,
+        database: db
       });
 
-      return FauxtonAPI.when([doc1.save(),doc2.save(), doc3.save(), viewDoc.save()]);
+      return FauxtonAPI.when([doc1.save(), doc2.save(), doc3.save(), viewDoc.save()]);
     },
 
     setupReplicate: function () {
@@ -140,7 +131,7 @@ function (app, FauxtonAPI, Databases, Documents) {
           create_target: true,
           source: 'verifytestdb',
           target: 'verifytestdb_replicate'
-        }),
+        })
       });
     },
 
@@ -168,7 +159,6 @@ function (app, FauxtonAPI, Databases, Documents) {
     removeDBs: function () {
       dbReplicate.destroy();
       db.destroy();
-
     }
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05a7e8b5/app/addons/verifyinstall/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/routes.js b/app/addons/verifyinstall/routes.js
index df00736..14dff0b 100644
--- a/app/addons/verifyinstall/routes.js
+++ b/app/addons/verifyinstall/routes.js
@@ -11,9 +11,9 @@
 // the License.
 
 define([
-  "app",
-  "api",
-  "addons/verifyinstall/views"
+  'app',
+  'api',
+  'addons/verifyinstall/views'
 ],
 function(app, FauxtonAPI, VerifyInstall) {
 
@@ -21,9 +21,9 @@ function(app, FauxtonAPI, VerifyInstall) {
     layout: 'one_pane',
 
     routes: {
-      'verifyinstall': "verifyInstall"
+      'verifyinstall': 'verifyInstall'
     },
-    selectedHeader: "Verify",
+    selectedHeader: 'Verify',
 
     verifyInstall: function () {
       this.setView('#dashboard-content', new VerifyInstall.Main({}));
@@ -33,5 +33,6 @@ function(app, FauxtonAPI, VerifyInstall) {
   });
 
   VerifyInstall.RouteObjects = [VerifyRouteObject];
+
   return VerifyInstall;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05a7e8b5/app/addons/verifyinstall/templates/main.html
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/templates/main.html b/app/addons/verifyinstall/templates/main.html
index fa41907..1491488 100644
--- a/app/addons/verifyinstall/templates/main.html
+++ b/app/addons/verifyinstall/templates/main.html
@@ -1,4 +1,4 @@
-<!--
+<%/*
 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
@@ -10,41 +10,41 @@ 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.
--->
-<button id="start" class="btn btn-large btn-success"> Verify Installation </button>
-<div id="error"> </div>
+*/%>
+<button id="start" class="btn btn-large btn-success">Verify Installation</button>
+<div id="error"></div>
 
-<table id="test-score" class="table table-striped table-bordered" >
+<table id="test-score" class="table table-striped table-bordered">
   <thead>
     <tr>
-      <th> Test </th>
-      <th> Status </th>
+      <th>Test</th>
+      <th>Status</th>
     </tr>
   </thead>
   <tbody>
     <tr>
-      <td> Create Database </td>
-      <td id="create-database" class="status">  </td>
+      <td>Create Database</td>
+      <td id="create-database" class="status"></td>
     </tr>
     <tr>
-      <td> Create Document </td>
-      <td id="create-document" class="status">  </td>
+      <td>Create Document</td>
+      <td id="create-document" class="status"></td>
     </tr>
     <tr>
-      <td> Update Document </td>
-      <td id="update-document" class="status">  </td>
+      <td>Update Document</td>
+      <td id="update-document" class="status"></td>
     </tr>
     <tr>
-      <td> Delete Document </td>
-      <td id="delete-document" class="status">  </td>
+      <td>Delete Document</td>
+      <td id="delete-document" class="status"></td>
     </tr>
     <tr>
-      <td> Create View </td>
-      <td id="create-view" class="status">  </td>
+      <td>Create View</td>
+      <td id="create-view" class="status"></td>
     </tr>
     <tr>
-      <td> Replication </td>
-      <td id="replicate" class="status">  </td>
+      <td>Replication</td>
+      <td id="replicate" class="status"></td>
     </tr>
   </tbody>
 </table>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/05a7e8b5/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index dd0c287..9982708 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -11,9 +11,9 @@
 // the License.
 
 define([
-  "app",
-  "api",
-  "addons/verifyinstall/resources",
+  'app',
+  'api',
+  'addons/verifyinstall/resources'
 ],
 function(app, FauxtonAPI, VerifyInstall) {
 
@@ -21,10 +21,10 @@ function(app, FauxtonAPI, VerifyInstall) {
     template: 'addons/verifyinstall/templates/main',
 
     events: {
-      "click #start": "startTest"
+      'click #start': 'startTest'
     },
 
-    initialize: function (options) {
+    initialize: function () {
       _.bindAll(this);
     },
 
@@ -69,7 +69,6 @@ function(app, FauxtonAPI, VerifyInstall) {
         setError(id, JSON.parse(xhr.responseText).reason);
       };
     },
-
     
     startTest: function () {
       this.disableButton();
@@ -78,7 +77,6 @@ function(app, FauxtonAPI, VerifyInstall) {
       var testProcess = VerifyInstall.testProcess,
           setPass = this.setPass,
           complete = this.complete,
-          setError = this.setError,
           formatError = this.formatError;
 
       testProcess.setup()