Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 52426200BFB for ; Wed, 11 Jan 2017 07:53:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 509D5160B4E; Wed, 11 Jan 2017 06:53:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 32349160B51 for ; Wed, 11 Jan 2017 07:53:38 +0100 (CET) Received: (qmail 327 invoked by uid 500); 11 Jan 2017 06:53:37 -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 312 invoked by uid 99); 11 Jan 2017 06:53:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2017 06:53:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 03807DFCC8; Wed, 11 Jan 2017 06:53:37 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garren@apache.org To: commits@couchdb.apache.org Date: Wed, 11 Jan 2017 06:53:37 -0000 Message-Id: <5e1d8b9291b848b798b03701a344c056@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] fauxton commit: updated refs/heads/master to 14b0901 archived-at: Wed, 11 Jan 2017 06:53:40 -0000 remove all unused variables and imports Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/14b0901d Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/14b0901d Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/14b0901d Branch: refs/heads/master Commit: 14b0901df88a909513d8441fcc499023da3524a8 Parents: a766d34 Author: Garren Smith Authored: Tue Jan 10 14:23:33 2017 +0200 Committer: Garren Smith Committed: Wed Jan 11 08:52:50 2017 +0200 ---------------------------------------------------------------------- .eslintrc | 5 ++- Gruntfile.js | 18 +------- app/addons/activetasks/base.js | 1 - app/addons/activetasks/components.react.jsx | 7 +-- app/addons/activetasks/resources.js | 1 - app/addons/activetasks/routes.js | 3 -- app/addons/activetasks/stores.js | 3 +- .../tests/activetasks.componentsSpec.react.jsx | 4 +- .../activetasks/tests/activetasks.storesSpec.js | 14 +----- app/addons/auth/layout.js | 3 +- app/addons/auth/resources.js | 2 +- app/addons/auth/stores.js | 2 - app/addons/cluster/base.js | 2 - app/addons/cluster/cluster.react.jsx | 2 - app/addons/cluster/routes.js | 1 - app/addons/cluster/tests/clusterSpec.react.jsx | 1 - app/addons/cluster/tests/resourcesSpec.js | 1 - app/addons/components/__tests__/polling.test.js | 4 +- app/addons/components/components/codeeditor.js | 2 +- .../components/components/codeeditorpanel.js | 1 - app/addons/components/components/copy.js | 2 +- app/addons/components/components/polling.js | 1 - app/addons/components/components/tray.js | 2 +- .../tests/apiBarControllerSpec.react.jsx | 5 +-- .../components/tests/badgesSpec.react.jsx | 1 - .../components/tests/beautifySpec.react.jsx | 2 - .../tests/codeEditorPanelSpec.react.jsx | 2 - .../components/tests/codeEditorSpec.react.jsx | 1 - .../tests/confirmButtonSpec.react.jsx | 1 - .../tests/deleteDatabaseModalSpec.react.jsx | 10 ++--- app/addons/components/tests/docSpec.react.jsx | 1 - .../tests/headerBreadcrumbsSpec.react.jsx | 1 - .../tests/headerTogglebuttonSpec.react.jsx | 1 - .../tests/paddedBorderedBoxSpec.react.jsx | 2 - .../tests/stringEditModalSpec.react.jsx | 6 +-- .../components/tests/styledSelectSpec.react.jsx | 1 - .../components/tests/zenModeSpec.react.jsx | 1 - app/addons/config/base.js | 1 - app/addons/config/layout.js | 2 - app/addons/config/resources.js | 2 +- app/addons/config/routes.js | 3 -- app/addons/config/tests/actionsSpec.js | 1 - app/addons/cors/base.js | 1 - app/addons/cors/resources.js | 2 +- app/addons/cors/tests/actionsSpecs.js | 1 - app/addons/cors/tests/componentsSpec.react.jsx | 4 +- app/addons/cors/tests/resourcesSpec.js | 1 - app/addons/cors/tests/storesSpec.js | 2 - app/addons/databases/actions.js | 6 +-- app/addons/databases/base.js | 2 +- app/addons/databases/components.react.jsx | 4 +- app/addons/databases/routes.js | 2 - app/addons/databases/stores.js | 1 - .../databases/tests/componentsSpec.react.jsx | 2 - .../tests/nightwatch/checkDatabaseTooltip.js | 3 +- .../tests/nightwatch/createsDatabase.js | 4 +- .../tests/nightwatch/permissionsDbTable.js | 4 -- app/addons/databases/tests/storesSpec.js | 2 - app/addons/documentation/base.js | 1 - app/addons/documentation/components.react.jsx | 2 - app/addons/documentation/routes.js | 1 - .../tests/nightwatch/checksDocsPage.js | 3 +- .../documents/changes/components.react.jsx | 1 - .../tests/changes.componentsSpec.react.jsx | 2 - .../changes/tests/changes.storesSpec.js | 1 - .../documents/components/header-docs-left.jsx | 12 +----- .../documents/components/header-docs-right.jsx | 8 ---- app/addons/documents/designdocinfo/actions.js | 1 - app/addons/documents/doc-editor/actions.js | 6 +-- .../documents/doc-editor/components.react.jsx | 2 +- .../tests/doc-editor.componentsSpec.react.jsx | 7 +-- .../doc-editor/tests/doc-editor.storesSpec.js | 1 - app/addons/documents/header/header.react.jsx | 5 --- app/addons/documents/index-editor/actions.js | 2 - .../documents/index-editor/tests/actionsSpec.js | 3 -- .../tests/viewIndex.componentsSpec.react.jsx | 2 - app/addons/documents/index-results/actions.js | 4 +- .../index-results.components.react.jsx | 5 +-- app/addons/documents/index-results/stores.js | 7 +-- .../index-results.componentsSpec.react.jsx | 9 ---- .../tests/index-results.storesSpec.js | 7 ++- app/addons/documents/layouts.js | 6 +-- app/addons/documents/mango/mango.actions.js | 5 +-- .../documents/mango/mango.components.react.jsx | 1 - .../mango/tests/mango.componentsSpec.react.jsx | 2 - .../documents/mango/tests/mango.storesSpec.js | 1 - app/addons/documents/mangolayout.js | 1 - app/addons/documents/pagination/actions.js | 1 - .../documents/pagination/pagination.react.jsx | 1 - app/addons/documents/queryoptions/actions.js | 2 - .../queryoptions/queryoptions.react.jsx | 9 ++-- app/addons/documents/queryoptions/stores.js | 2 - .../tests/queryoptions.componentsSpec.react.jsx | 5 +-- .../tests/queryoptions.storesSpec.js | 2 - app/addons/documents/resources.js | 14 ++---- .../rev-browser/rev-browser.actions.js | 3 +- .../rev-browser.components.react.jsx | 8 ++-- .../tests/rev-browser.actionsSpec.js | 1 - app/addons/documents/routes-doc-editor.js | 2 - app/addons/documents/routes-documents.js | 1 - app/addons/documents/routes-index-editor.js | 3 -- app/addons/documents/routes-mango.js | 5 --- app/addons/documents/shared-resources.js | 2 +- app/addons/documents/shared-routes.js | 5 +-- app/addons/documents/sidebar/actions.js | 1 - .../tests/sidebar.componentsSpec.react.jsx | 2 - .../sidebar/tests/sidebar.storesSpec.js | 1 - .../documents/tests/document-test-helper.js | 1 - app/addons/documents/tests/helpersSpec.js | 1 - .../nightwatch/createsDocumentWithoutId.js | 1 - .../tests/nightwatch/deleteDatabaseModal.js | 4 +- .../tests/nightwatch/fixRegressionTableView.js | 3 +- .../documents/tests/nightwatch/viewCreate.js | 4 -- .../tests/nightwatch/viewCreateBadView.js | 3 +- app/addons/documents/tests/resourcesSpec.js | 5 +-- app/addons/documents/tests/routeSpec.js | 45 -------------------- app/addons/fauxton/appwrapper.js | 2 - app/addons/fauxton/base.js | 7 --- app/addons/fauxton/components.react.jsx | 1 - app/addons/fauxton/navigation/actions.js | 1 - .../fauxton/navigation/components.react.jsx | 1 - .../navigation/tests/componentsSpec.react.jsx | 2 - .../notifications/notifications.react.jsx | 2 - .../fauxton/notifications/tests/actionsSpec.js | 2 - .../tests/componentsSpec.react.jsx | 1 - .../fauxton/notifications/tests/storesSpec.js | 2 - .../fauxton/tests/componentsSpec.react.jsx | 2 - app/addons/permissions/actions.js | 9 ++-- app/addons/permissions/base.js | 1 - .../permissions/components/PermissionsItem.js | 2 +- .../permissions/components/PermissionsScreen.js | 2 +- .../components/PermissionsSection.js | 2 +- app/addons/permissions/layout.js | 1 - app/addons/permissions/routes.js | 3 +- app/addons/replication/actions.js | 10 ----- app/addons/replication/api.js | 2 +- app/addons/replication/base.js | 1 - app/addons/replication/components/activity.js | 3 +- app/addons/replication/components/modals.js | 2 +- .../replication/components/newreplication.js | 1 - app/addons/replication/components/options.js | 3 +- app/addons/replication/components/source.js | 3 +- app/addons/replication/components/submit.js | 1 - app/addons/replication/controller.js | 8 +--- app/addons/replication/route.js | 1 - app/addons/replication/tests/apiSpec.js | 2 - .../replication/tests/newreplicationSpec.js | 1 - .../replication/tests/nightwatch/replication.js | 2 +- .../tests/nightwatch/replicationactivity.js | 3 -- app/addons/setup/base.js | 1 - app/addons/setup/setup.actions.js | 16 +------ app/addons/setup/tests/setupSpec.js | 1 - app/addons/verifyinstall/actions.js | 3 +- app/addons/verifyinstall/base.js | 2 +- app/addons/verifyinstall/components.react.jsx | 8 +--- app/addons/verifyinstall/resources.js | 2 +- app/addons/verifyinstall/routes.js | 1 - app/addons/verifyinstall/tests/actionsSpec.js | 1 - .../tests/componentsSpec.react.jsx | 1 - .../tests/verifyinstall.storesSpec.js | 1 - app/app.js | 5 +-- app/core/auth.js | 5 +-- app/core/routeObject.js | 2 - app/core/tests/couchdbSessionSpec.js | 2 - app/core/tests/utilsSpec.js | 1 - app/core/utils.js | 4 +- app/helpers.js | 1 - bin/remove-test-dbs.js | 2 +- couchapp.js | 2 +- devserver.js | 14 ++---- index.js | 4 +- jest-setup.js | 2 +- tasks/fauxton.js | 5 +-- tasks/helper.js | 3 +- test/dev.js | 2 +- webpack.config.dev.js | 3 +- webpack.config.test-dev.js | 3 +- webpack.config.test.js | 3 +- 178 files changed, 114 insertions(+), 484 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/.eslintrc ---------------------------------------------------------------------- diff --git a/.eslintrc b/.eslintrc index c642ec6..0ff1456 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,7 +26,10 @@ "no-trailing-spaces": 2, "semi-spacing": [2, {"before": false, "after": true}], "no-empty": 2, - "space-in-parens": [2, "never"] + "space-in-parens": [2, "never"], + "no-unused-vars": [2, {"varsIgnorePattern": "ReactDOM"}], + "react/jsx-uses-vars": 2, + "react/jsx-uses-react": 2 }, "parserOptions": { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index 639e81e..25b1157 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -19,13 +19,11 @@ "use strict"; const path = require('path'); -var webpackConfig = require("./webpack.config.dev.js"); module.exports = function (grunt) { var helper = require('./tasks/helper.js'), initHelper = helper.init(grunt), - _ = grunt.util._, - fs = require('fs'); + _ = grunt.util._; var couch_config = function () { var default_couch_config = { @@ -77,20 +75,6 @@ module.exports = function (grunt) { return settings.template; })(); - var couchserver_config = function () { - // add a "couchserver" key to settings.json with JSON that matches the - // keys and values below (plus your customizations) to have Fauxton work - // against a remote CouchDB-compatible server. - var defaults = { - port: helper.devServerPort, - proxy: { - target: helper.couch - } - }; - - return initHelper.readSettingsFile().couchserver || defaults; - }(); - var config = { // The clean task ensures all files are removed from the dist/ directory so http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/base.js ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/base.js b/app/addons/activetasks/base.js index 6c99fb0..62a2728 100644 --- a/app/addons/activetasks/base.js +++ b/app/addons/activetasks/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Activetasks from "./routes"; import "./assets/less/activetasks.less"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/components.react.jsx b/app/addons/activetasks/components.react.jsx index 33c6c4c..8e2bf69 100644 --- a/app/addons/activetasks/components.react.jsx +++ b/app/addons/activetasks/components.react.jsx @@ -11,17 +11,14 @@ // the License. import app from "../../app"; -import FauxtonAPI from "../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import Stores from "./stores"; import Resources from "./resources"; import Actions from "./actions"; import Components from "../components/react-components.react"; -import ComponentsReact from "../fauxton/components.react"; -import ReactCSSTransitionGroup from "react-addons-css-transition-group"; -const {TabElement, TabElementWrapper, Polling, TrayContents} = Components; +const {TabElement, TabElementWrapper, Polling} = Components; const activeTasksStore = Stores.activeTasksStore; @@ -274,7 +271,7 @@ var ActiveTasksTableBody = React.createClass({ return this.getStoreState(); }, - componentWillReceiveProps (nextProps) { + componentWillReceiveProps () { this.setState({ filteredTable: activeTasksStore.getFilteredTable(this.props.collection) }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/resources.js b/app/addons/activetasks/resources.js index 55967f8..7b88677 100644 --- a/app/addons/activetasks/resources.js +++ b/app/addons/activetasks/resources.js @@ -11,7 +11,6 @@ // the License. import app from "../../app"; -import FauxtonAPI from "../../core/api"; import Actions from "./actions"; var Active = {}; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/routes.js b/app/addons/activetasks/routes.js index 2e427cf..e45cc9b 100644 --- a/app/addons/activetasks/routes.js +++ b/app/addons/activetasks/routes.js @@ -11,11 +11,8 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; import ActiveTasksResources from "./resources"; -import ActiveTasksComponents from "./components.react"; -import Actions from "./actions"; import Layout from './layout'; var ActiveTasksRouteObject = FauxtonAPI.RouteObject.extend({ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/stores.js b/app/addons/activetasks/stores.js index 51b31ed..7453e48 100644 --- a/app/addons/activetasks/stores.js +++ b/app/addons/activetasks/stores.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import ActionTypes from "./actiontypes"; @@ -124,7 +123,7 @@ var ActiveTasksStore = FauxtonAPI.Store.extend({ this._collection = sorted; }, - getFilteredTable (collection) { + getFilteredTable () { var table = []; //sort the table here http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx b/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx index d22be2f..6377cb7 100644 --- a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx +++ b/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ActiveTasks from "../resources"; import Components from "../components.react"; import Stores from "../stores"; @@ -20,7 +19,6 @@ import Actions from "../actions"; import utils from "../../../../test/mocha/testUtils"; import TestUtils from "react-addons-test-utils"; import sinon from "sinon"; -import { mount } from 'enzyme'; var assert = utils.assert; var restore = utils.restore; var activeTasksStore = Stores.activeTasksStore; @@ -30,7 +28,7 @@ activeTasksCollection.parse(fakedResponse); describe('Active Tasks -- Components', function () { describe('Active Tasks Table (Components)', function () { - var table, tableDiv, spy, filterTab; + var table, tableDiv, spy; beforeEach(function () { tableDiv = document.createElement('div'); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/activetasks/tests/activetasks.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/activetasks/tests/activetasks.storesSpec.js b/app/addons/activetasks/tests/activetasks.storesSpec.js index 1ffa698..5ba7632 100644 --- a/app/addons/activetasks/tests/activetasks.storesSpec.js +++ b/app/addons/activetasks/tests/activetasks.storesSpec.js @@ -9,16 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ActiveTasks from "../resources"; import Stores from "../stores"; import fakedResponse from "./fakeActiveTaskResponse"; -import React from "react"; import utils from "../../../../test/mocha/testUtils"; -import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; -var restore = utils.restore; var activeTasksStore = Stores.activeTasksStore; var activeTasksCollection = new ActiveTasks.AllTasks(); @@ -30,13 +25,7 @@ describe('Active Tasks -- Stores', function () { }); describe('Active Task Stores - Filter Tab Tray', function () { - var fakeFilteredTable, storeFilteredtable; - function sort (a, b, sortBy) { //sorts array by objects with key 'sortBy', with default started_on - if (_.isUndefined(sortBy)) { - sortBy = 'started-on'; - } - return b[sortBy] - a[sortBy]; - } + var fakeFilteredTable; afterEach(function () { fakeFilteredTable = []; @@ -65,7 +54,6 @@ describe('Active Tasks -- Stores', function () { var searchTerm = 'base'; activeTasksStore.setSearchTerm(searchTerm); var storeGeneratedTable = activeTasksStore.getFilteredTable(activeTasksStore._collection); - var regEx = new RegExp(searchTerm); fakeFilteredTable = [ { user: 'information'}, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/auth/layout.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/layout.js b/app/addons/auth/layout.js index 648502e..3597e70 100644 --- a/app/addons/auth/layout.js +++ b/app/addons/auth/layout.js @@ -11,7 +11,6 @@ // the License. import React from 'react'; -import FauxtonAPI from "../../core/api"; import {OnePane, OnePaneContent} from '../components/layouts'; import {Breadcrumbs} from '../components/header-breadcrumbs'; import Components from "./components.react"; @@ -44,7 +43,7 @@ export const AuthLayout = ({crumbs, component}) => { ); }; -export const AdminLayout = ({crumbs, changePassword, component}) => { +export const AdminLayout = ({crumbs, changePassword}) => { let content = changePassword ? : ; return (
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/auth/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/resources.js b/app/addons/auth/resources.js index 91f4456..5c4a921 100644 --- a/app/addons/auth/resources.js +++ b/app/addons/auth/resources.js @@ -33,7 +33,7 @@ var Admin = Backbone.Model.extend({ isNew: function () { return false; }, - sync: function (method, model, options) { + sync: function (method, model) { var params = { url: model.url(), contentType: 'application/json', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/auth/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/stores.js b/app/addons/auth/stores.js index 25ef23a..ce43e4a 100644 --- a/app/addons/auth/stores.js +++ b/app/addons/auth/stores.js @@ -10,11 +10,9 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import ActionTypes from "./actiontypes"; - // Not thrilled with this. The sole purpose of these next two stores is because the Create Admin + Change Password // forms need to clear after a successful post. Since those events occur in actions.js, we need a way to tell the // component to update + clear the fields. That's why all this code exists. http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cluster/base.js ---------------------------------------------------------------------- diff --git a/app/addons/cluster/base.js b/app/addons/cluster/base.js index ec264ab..338334d 100644 --- a/app/addons/cluster/base.js +++ b/app/addons/cluster/base.js @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; -import FauxtonAPI from "../../core/api"; import Cluster from "./routes"; Cluster.initialize = function () {}; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cluster/cluster.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/cluster/cluster.react.jsx b/app/addons/cluster/cluster.react.jsx index 97f6ea1..609e866 100644 --- a/app/addons/cluster/cluster.react.jsx +++ b/app/addons/cluster/cluster.react.jsx @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; -import FauxtonAPI from "../../core/api"; import React from "react"; import ClusterStore from "./cluster.stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cluster/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/cluster/routes.js b/app/addons/cluster/routes.js index 99ac615..591541f 100644 --- a/app/addons/cluster/routes.js +++ b/app/addons/cluster/routes.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import React from 'react'; import FauxtonAPI from "../../core/api"; import Cluster from "./resources"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cluster/tests/clusterSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/cluster/tests/clusterSpec.react.jsx b/app/addons/cluster/tests/clusterSpec.react.jsx index fae04be..a76b36d 100644 --- a/app/addons/cluster/tests/clusterSpec.react.jsx +++ b/app/addons/cluster/tests/clusterSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ClusterComponent from "../cluster.react"; import ClusterActions from "../cluster.actions"; import ClusterStores from "../cluster.stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cluster/tests/resourcesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/cluster/tests/resourcesSpec.js b/app/addons/cluster/tests/resourcesSpec.js index 7443d6d..b5ee911 100644 --- a/app/addons/cluster/tests/resourcesSpec.js +++ b/app/addons/cluster/tests/resourcesSpec.js @@ -11,7 +11,6 @@ // the License. import testUtils from "../../../../test/mocha/testUtils"; -import FauxtonAPI from "../../../core/api"; import Resources from "../resources"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/__tests__/polling.test.js ---------------------------------------------------------------------- diff --git a/app/addons/components/__tests__/polling.test.js b/app/addons/components/__tests__/polling.test.js index c6a206a..ca6f83a 100644 --- a/app/addons/components/__tests__/polling.test.js +++ b/app/addons/components/__tests__/polling.test.js @@ -92,13 +92,13 @@ describe("Polling", () => { assert.ok(pollCalled); done(); }; - const wrapper = mount(); + />); clock.tick(1010); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/components/codeeditor.js ---------------------------------------------------------------------- diff --git a/app/addons/components/components/codeeditor.js b/app/addons/components/components/codeeditor.js index 9a89618..8a0680e 100644 --- a/app/addons/components/components/codeeditor.js +++ b/app/addons/components/components/codeeditor.js @@ -212,7 +212,7 @@ export const CodeEditor = React.createClass({ }.bind(this)); }, - showHideEditStringGutterIcon (e) { + showHideEditStringGutterIcon () { if (this.hasErrors() || !this.parseLineForStringMatch()) { this.setState({ stringEditIconVisible: false }); return false; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/components/codeeditorpanel.js ---------------------------------------------------------------------- diff --git a/app/addons/components/components/codeeditorpanel.js b/app/addons/components/components/codeeditorpanel.js index 92e3693..dc7910d 100644 --- a/app/addons/components/components/codeeditorpanel.js +++ b/app/addons/components/components/codeeditorpanel.js @@ -12,7 +12,6 @@ import React from "react"; import ReactDOM from "react-dom"; import {CodeEditor} from './codeeditor'; -import {StringEditModal} from './stringeditmodal'; import {Beautify} from './beautify'; import {ZenModeOverlay} from './zenmodeoverlay'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/components/copy.js ---------------------------------------------------------------------- diff --git a/app/addons/components/components/copy.js b/app/addons/components/components/copy.js index 2c00793..1bf3519 100644 --- a/app/addons/components/components/copy.js +++ b/app/addons/components/components/copy.js @@ -20,7 +20,7 @@ let clipboard; // sets the callback on 'success' (usually a Fauxton notification). export const initializeClipboard = (uniqueKey, cb) => { clipboard = new Clipboard('#copy-' + uniqueKey); - clipboard.on('success', function(e) { + clipboard.on('success', function() { cb(); }); }; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/components/polling.js ---------------------------------------------------------------------- diff --git a/app/addons/components/components/polling.js b/app/addons/components/components/polling.js index af9ced1..b6b8d37 100644 --- a/app/addons/components/components/polling.js +++ b/app/addons/components/components/polling.js @@ -83,7 +83,6 @@ export class Polling extends React.Component { render () { const { - pollingFreqOptions, stepSize, min, max, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/components/tray.js ---------------------------------------------------------------------- diff --git a/app/addons/components/components/tray.js b/app/addons/components/components/tray.js index 8b92967..8602837 100644 --- a/app/addons/components/components/tray.js +++ b/app/addons/components/components/tray.js @@ -117,7 +117,7 @@ export const TrayWrapper = React.createClass({ }, renderChildren () { - return React.Children.map(this.props.children, function (child, key) { + return React.Children.map(this.props.children, function (child) { const props = {}; Object.keys(this.props).filter((k) => { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/apiBarControllerSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/apiBarControllerSpec.react.jsx b/app/addons/components/tests/apiBarControllerSpec.react.jsx index 543e1d5..028f742 100644 --- a/app/addons/components/tests/apiBarControllerSpec.react.jsx +++ b/app/addons/components/tests/apiBarControllerSpec.react.jsx @@ -9,15 +9,12 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import Actions from "../actions"; import Stores from "../stores"; import utils from "../../../../test/mocha/testUtils"; -import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; import React from "react"; import ReactDOM from "react-dom"; -import {APIBar, ApiBarController} from '../components/apibar'; +import {ApiBarController} from '../components/apibar'; import {mount} from 'enzyme'; const assert = utils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/badgesSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/badgesSpec.react.jsx b/app/addons/components/tests/badgesSpec.react.jsx index 23cf3ef..3014c24 100644 --- a/app/addons/components/tests/badgesSpec.react.jsx +++ b/app/addons/components/tests/badgesSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/beautifySpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/beautifySpec.react.jsx b/app/addons/components/tests/beautifySpec.react.jsx index 7306b96..2d0d1c6 100644 --- a/app/addons/components/tests/beautifySpec.react.jsx +++ b/app/addons/components/tests/beautifySpec.react.jsx @@ -9,13 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/codeEditorPanelSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/codeEditorPanelSpec.react.jsx b/app/addons/components/tests/codeEditorPanelSpec.react.jsx index 1b62151..703e695 100644 --- a/app/addons/components/tests/codeEditorPanelSpec.react.jsx +++ b/app/addons/components/tests/codeEditorPanelSpec.react.jsx @@ -9,13 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; var codeNoNewlines = 'function (doc) {emit(doc._id, 1);}'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/codeEditorSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/codeEditorSpec.react.jsx b/app/addons/components/tests/codeEditorSpec.react.jsx index 7f45057..6d4469b 100644 --- a/app/addons/components/tests/codeEditorSpec.react.jsx +++ b/app/addons/components/tests/codeEditorSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/confirmButtonSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/confirmButtonSpec.react.jsx b/app/addons/components/tests/confirmButtonSpec.react.jsx index cc44b7c..71157bd 100644 --- a/app/addons/components/tests/confirmButtonSpec.react.jsx +++ b/app/addons/components/tests/confirmButtonSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx b/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx index 32e6a52..f0231c4 100644 --- a/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx +++ b/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx @@ -9,10 +9,8 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; -import { Modal } from "react-bootstrap"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; @@ -22,7 +20,7 @@ var assert = utils.assert; function noop () {} describe('DeleteDatabaseModal', function () { - var container, instance; + var container; beforeEach(function () { container = document.createElement('div'); }); @@ -32,7 +30,7 @@ describe('DeleteDatabaseModal', function () { }); it('submitting is disabled when initially rendered', function () { - instance = TestUtils.renderIntoDocument( + TestUtils.renderIntoDocument( , @@ -43,7 +41,7 @@ describe('DeleteDatabaseModal', function () { }); it('submitting is disabled when garbage entered', function () { - instance = TestUtils.renderIntoDocument( + TestUtils.renderIntoDocument( , @@ -57,7 +55,7 @@ describe('DeleteDatabaseModal', function () { }); it('submitting is enabled when same db name entered', function () { - instance = TestUtils.renderIntoDocument( + TestUtils.renderIntoDocument( , http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/docSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/docSpec.react.jsx b/app/addons/components/tests/docSpec.react.jsx index dd12277..f4ae867 100644 --- a/app/addons/components/tests/docSpec.react.jsx +++ b/app/addons/components/tests/docSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx b/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx index 2c40683..20a3976 100644 --- a/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx +++ b/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from '../../../core/api'; import utils from '../../../../test/mocha/testUtils'; import React from 'react'; import ReactDOM from 'react-dom'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/headerTogglebuttonSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/headerTogglebuttonSpec.react.jsx b/app/addons/components/tests/headerTogglebuttonSpec.react.jsx index f87a6e2..7aa0b47 100644 --- a/app/addons/components/tests/headerTogglebuttonSpec.react.jsx +++ b/app/addons/components/tests/headerTogglebuttonSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx b/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx index 5223eac..69c7c52 100644 --- a/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx +++ b/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx @@ -9,13 +9,11 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/stringEditModalSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/stringEditModalSpec.react.jsx b/app/addons/components/tests/stringEditModalSpec.react.jsx index fbd25d8..f606dc5 100644 --- a/app/addons/components/tests/stringEditModalSpec.react.jsx +++ b/app/addons/components/tests/stringEditModalSpec.react.jsx @@ -9,9 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; -import { Modal } from "react-bootstrap"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; @@ -21,7 +19,7 @@ import sinon from "sinon"; var assert = utils.assert; describe('String Edit Modal', function () { - var container, el; + var container; var stub = function () { }; beforeEach(function () { @@ -36,7 +34,7 @@ describe('String Edit Modal', function () { it('ensures same content returns on saving', function () { var string = "a string!"; var spy = sinon.spy(); - el = TestUtils.renderIntoDocument( + TestUtils.renderIntoDocument( , container ); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/styledSelectSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/styledSelectSpec.react.jsx b/app/addons/components/tests/styledSelectSpec.react.jsx index 85f304b..8ae3fc4 100644 --- a/app/addons/components/tests/styledSelectSpec.react.jsx +++ b/app/addons/components/tests/styledSelectSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/components/tests/zenModeSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/components/tests/zenModeSpec.react.jsx b/app/addons/components/tests/zenModeSpec.react.jsx index 861b24f..4fc8ef2 100644 --- a/app/addons/components/tests/zenModeSpec.react.jsx +++ b/app/addons/components/tests/zenModeSpec.react.jsx @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import FauxtonAPI from "../../../core/api"; import ReactComponents from "../react-components.react"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/config/base.js ---------------------------------------------------------------------- diff --git a/app/addons/config/base.js b/app/addons/config/base.js index 8913ecf..2360ed7 100644 --- a/app/addons/config/base.js +++ b/app/addons/config/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Config from "./routes"; import "./assets/less/config.less"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/config/layout.js ---------------------------------------------------------------------- diff --git a/app/addons/config/layout.js b/app/addons/config/layout.js index 342551a..1d03d48 100644 --- a/app/addons/config/layout.js +++ b/app/addons/config/layout.js @@ -11,8 +11,6 @@ // the License. import React from 'react'; -import FauxtonAPI from "../../core/api"; -import {TabsSidebarHeader} from '../documents/layouts'; import ConfigComponents from "./components.react"; import CORSComponents from "../cors/components.react"; import {Breadcrumbs} from '../components/header-breadcrumbs'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/config/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/config/resources.js b/app/addons/config/resources.js index f010c0d..5e5c134 100644 --- a/app/addons/config/resources.js +++ b/app/addons/config/resources.js @@ -29,7 +29,7 @@ Config.OptionModel = Backbone.Model.extend({ isNew () { return false; }, - sync (method, model, options) { + sync (method, model) { var params = { url: model.url(), http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/config/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/config/routes.js b/app/addons/config/routes.js index a6d1599..4b19238 100644 --- a/app/addons/config/routes.js +++ b/app/addons/config/routes.js @@ -10,13 +10,10 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Config from "./resources"; -import CORSComponents from "../cors/components.react"; import CORSActions from "../cors/actions"; import ClusterActions from "../cluster/cluster.actions"; -import ConfigComponents from "./components.react"; import ConfigActions from "./actions"; import Layout from './layout'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/config/tests/actionsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/config/tests/actionsSpec.js b/app/addons/config/tests/actionsSpec.js index 0d35cae..91734de 100644 --- a/app/addons/config/tests/actionsSpec.js +++ b/app/addons/config/tests/actionsSpec.js @@ -12,7 +12,6 @@ import testUtils from "../../../../test/mocha/testUtils"; import FauxtonAPI from "../../../core/api"; import Actions from "../actions"; -import Resources from "../resources"; import Backbone from "backbone"; import sinon from "sinon"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/base.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/base.js b/app/addons/cors/base.js index 6c32bd4..6f8d400 100644 --- a/app/addons/cors/base.js +++ b/app/addons/cors/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import "./assets/less/cors.less"; var CORS = FauxtonAPI.addon(); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/resources.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/resources.js b/app/addons/cors/resources.js index 73a2091..6c9a1c3 100644 --- a/app/addons/cors/resources.js +++ b/app/addons/cors/resources.js @@ -71,7 +71,7 @@ CORS.ConfigModel = Backbone.Model.extend({ isNew: function () { return false; }, - sync: function (method, model, options) { + sync: function (method, model) { var params = { url: model.url(), http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/tests/actionsSpecs.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/tests/actionsSpecs.js b/app/addons/cors/tests/actionsSpecs.js index 7391468..2188ebd 100644 --- a/app/addons/cors/tests/actionsSpecs.js +++ b/app/addons/cors/tests/actionsSpecs.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import utils from "../../../../test/mocha/testUtils"; import FauxtonAPI from "../../../core/api"; import Actions from "../actions"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/cors/tests/componentsSpec.react.jsx b/app/addons/cors/tests/componentsSpec.react.jsx index 0ab9b1b..1a28e68 100644 --- a/app/addons/cors/tests/componentsSpec.react.jsx +++ b/app/addons/cors/tests/componentsSpec.react.jsx @@ -28,7 +28,7 @@ describe('CORS Components', function () { describe('CorsController', function () { - var container, corsEl, saveStub; + var container, corsEl; beforeEach(function () { container = document.createElement('div'); @@ -38,7 +38,7 @@ describe('CORS Components', function () { corsStore._configChanged = true; corsEl = TestUtils.renderIntoDocument(, container); //stub this out so it doesn't keep trying to save cors and crash phantomjs - saveStub = sinon.stub(corsEl, 'save'); + sinon.stub(corsEl, 'save'); }); afterEach(function () { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/tests/resourcesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/tests/resourcesSpec.js b/app/addons/cors/tests/resourcesSpec.js index 9c02a7e..e75efc6 100644 --- a/app/addons/cors/tests/resourcesSpec.js +++ b/app/addons/cors/tests/resourcesSpec.js @@ -9,7 +9,6 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import testUtils from "../../../../test/mocha/testUtils"; import CORS from "../resources"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/cors/tests/storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/cors/tests/storesSpec.js b/app/addons/cors/tests/storesSpec.js index 556e8f0..f9ee787 100644 --- a/app/addons/cors/tests/storesSpec.js +++ b/app/addons/cors/tests/storesSpec.js @@ -9,9 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import testUtils from "../../../../test/mocha/testUtils"; -import FauxtonAPI from "../../../core/api"; import Stores from "../stores"; var assert = testUtils.assert; var store = Stores.corsStore; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/actions.js b/app/addons/databases/actions.js index bd09672..3450e7f 100644 --- a/app/addons/databases/actions.js +++ b/app/addons/databases/actions.js @@ -15,7 +15,7 @@ import Stores from "./stores"; import ActionTypes from "./actiontypes"; import Resources from "./resources"; -function getDatabaseDetails (dbList, fullDbList, cb) { +function getDatabaseDetails (dbList, fullDbList) { const databaseDetails = []; const failedDbs = []; let seen = 0; @@ -27,7 +27,7 @@ function getDatabaseDetails (dbList, fullDbList, cb) { .then((res) => { databaseDetails.push(res); }) - .fail((xhr) => { + .fail(() => { failedDbs.push(db); }) .always(() => { @@ -57,7 +57,7 @@ function fetch (url) { }); } -function getDatabaseList (limit, page) { +function getDatabaseList () { const url = FauxtonAPI.urls('allDBs', 'server'); return fetch(url); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/base.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/base.js b/app/addons/databases/base.js index 33cd69a..8264e93 100644 --- a/app/addons/databases/base.js +++ b/app/addons/databases/base.js @@ -55,7 +55,7 @@ FauxtonAPI.registerUrls('allDBs', { return '_all_dbs'; }, - apiurl: function (id, query) { + apiurl: function () { return window.location.origin + '/_all_dbs'; } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/databases/components.react.jsx b/app/addons/databases/components.react.jsx index 47cfde4..cddc602 100644 --- a/app/addons/databases/components.react.jsx +++ b/app/addons/databases/components.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import React from "react"; import ReactDOM from "react-dom"; @@ -19,7 +18,6 @@ import ComponentsStore from "../components/stores"; import ComponentsActions from "../components/actions"; import FauxtonComponentsReact from "..//fauxton/components.react"; import Stores from "./stores"; -import Resources from "./resources"; import Actions from "./actions"; import ReactSelect from "react-select"; @@ -96,7 +94,7 @@ const DatabaseTable = React.createClass({ }); }, - showDeleteDatabaseModal (name) { + showDeleteDatabaseModal () { ComponentsActions.showDeleteDatabaseModal({ showDeleteModal: !this.props.showDeleteDatabaseModal.showDeleteModal }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js index b86ed53..6870379 100644 --- a/app/addons/databases/routes.js +++ b/app/addons/databases/routes.js @@ -11,10 +11,8 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Actions from "./actions"; -import Components from "./components.react"; import Databases from "./resources"; import Layout from './layout'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/stores.js b/app/addons/databases/stores.js index ff75d01..b517a61 100644 --- a/app/addons/databases/stores.js +++ b/app/addons/databases/stores.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import ActionTypes from "./actiontypes"; import Resources from "./resources"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/tests/componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/databases/tests/componentsSpec.react.jsx b/app/addons/databases/tests/componentsSpec.react.jsx index ab6f933..f619599 100644 --- a/app/addons/databases/tests/componentsSpec.react.jsx +++ b/app/addons/databases/tests/componentsSpec.react.jsx @@ -12,13 +12,11 @@ import FauxtonAPI from "../../../core/api"; import Views from "../components.react"; import Actions from "../actions"; -import ActionTypes from "../actiontypes"; import Stores from "../stores"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; import { mount } from 'enzyme'; var assert = utils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js b/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js index b2c24b6..d2c6606 100644 --- a/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js +++ b/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js @@ -16,8 +16,7 @@ module.exports = { 'Check the tooltip icon for DB with deleted items appears': function (client) { var waitTime = client.globals.maxWaitTime, newDatabaseName = client.globals.testDatabaseName, - newDocumentName = 'TemporaryDoc', - baseUrl = client.globals.test_settings.launch_url; + newDocumentName = 'TemporaryDoc'; client // use nano to quickly set up a DB with a single doc http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/tests/nightwatch/createsDatabase.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/tests/nightwatch/createsDatabase.js b/app/addons/databases/tests/nightwatch/createsDatabase.js index 72ce684..b0bae61 100644 --- a/app/addons/databases/tests/nightwatch/createsDatabase.js +++ b/app/addons/databases/tests/nightwatch/createsDatabase.js @@ -18,14 +18,14 @@ module.exports = { before: function (client, done) { var nano = helpers.getNanoInstance(client.globals.test_settings.db_url); - nano.db.destroy(newDatabaseName, function (err, body, header) { + nano.db.destroy(newDatabaseName, function () { done(); }); }, after: function (client, done) { var nano = helpers.getNanoInstance(client.globals.test_settings.db_url); - nano.db.destroy(newDatabaseName, function (err, body, header) { + nano.db.destroy(newDatabaseName, function () { done(); }); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/tests/nightwatch/permissionsDbTable.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/tests/nightwatch/permissionsDbTable.js b/app/addons/databases/tests/nightwatch/permissionsDbTable.js index c659aac..64711f7 100644 --- a/app/addons/databases/tests/nightwatch/permissionsDbTable.js +++ b/app/addons/databases/tests/nightwatch/permissionsDbTable.js @@ -10,14 +10,10 @@ // License for the specific language governing permissions and limitations under // the License. - -const helpers = require('../../../../../test/nightwatch_tests/helpers/helpers.js'); - module.exports = { 'lists databases with a 401' : function (client) { const waitTime = client.globals.maxWaitTime; - const baseUrl = client.globals.test_settings.launch_url; const userDoc = { "_id": "org.couchdb.user:furbie", http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/databases/tests/storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/databases/tests/storesSpec.js b/app/addons/databases/tests/storesSpec.js index 2adbd62..a4bda76 100644 --- a/app/addons/databases/tests/storesSpec.js +++ b/app/addons/databases/tests/storesSpec.js @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; -import FauxtonAPI from "../../../core/api"; import utils from "../../../../test/mocha/testUtils"; import Stores from "../stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documentation/base.js ---------------------------------------------------------------------- diff --git a/app/addons/documentation/base.js b/app/addons/documentation/base.js index d69f8fe..28e68d6 100644 --- a/app/addons/documentation/base.js +++ b/app/addons/documentation/base.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; import FauxtonAPI from "../../core/api"; import Documentation from "./routes"; import "./assets/less/documentation.less"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documentation/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documentation/components.react.jsx b/app/addons/documentation/components.react.jsx index b082b91..da450a0 100644 --- a/app/addons/documentation/components.react.jsx +++ b/app/addons/documentation/components.react.jsx @@ -10,8 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../app"; -import FauxtonAPI from "../../core/api"; import React from "react"; const docLinks = [ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documentation/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/documentation/routes.js b/app/addons/documentation/routes.js index 0657be7..7c3dbca 100644 --- a/app/addons/documentation/routes.js +++ b/app/addons/documentation/routes.js @@ -11,7 +11,6 @@ // the License. import React from 'react'; -import app from "../../app"; import FauxtonAPI from "../../core/api"; import DocumentationComponents from "./components.react"; import {OnePaneSimpleLayout} from '../components/layouts'; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documentation/tests/nightwatch/checksDocsPage.js ---------------------------------------------------------------------- diff --git a/app/addons/documentation/tests/nightwatch/checksDocsPage.js b/app/addons/documentation/tests/nightwatch/checksDocsPage.js index 7af6f83..aad3674 100644 --- a/app/addons/documentation/tests/nightwatch/checksDocsPage.js +++ b/app/addons/documentation/tests/nightwatch/checksDocsPage.js @@ -14,8 +14,7 @@ module.exports = { 'Check the documentation page exists': function (client) { - var waitTime = client.globals.maxWaitTime, - baseUrl = client.globals.test_settings.launch_url; + var waitTime = client.globals.maxWaitTime; client .loginToGUI() http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/changes/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/changes/components.react.jsx b/app/addons/documents/changes/components.react.jsx index 1b9aefd..3262a21 100644 --- a/app/addons/documents/changes/components.react.jsx +++ b/app/addons/documents/changes/components.react.jsx @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx b/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx index e145ff7..e138b6c 100644 --- a/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx +++ b/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx @@ -11,8 +11,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../../app"; -import FauxtonAPI from "../../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import Changes from "../components.react"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/changes/tests/changes.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/changes/tests/changes.storesSpec.js b/app/addons/documents/changes/tests/changes.storesSpec.js index 20631d9..ebe4365 100644 --- a/app/addons/documents/changes/tests/changes.storesSpec.js +++ b/app/addons/documents/changes/tests/changes.storesSpec.js @@ -11,7 +11,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../../app"; import FauxtonAPI from "../../../../core/api"; import Stores from "../stores"; import utils from "../../../../../test/mocha/testUtils"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/components/header-docs-left.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/components/header-docs-left.jsx b/app/addons/documents/components/header-docs-left.jsx index 85b893c..1d14778 100644 --- a/app/addons/documents/components/header-docs-left.jsx +++ b/app/addons/documents/components/header-docs-left.jsx @@ -12,17 +12,9 @@ import React from "react"; import ReactDOM from "react-dom"; - -import ReactComponents from "../../components/react-components.react"; - import Helpers from "../helpers"; import FauxtonAPI from '../../../core/api'; - - -import { Dropdown, MenuItem } from "react-bootstrap"; - -const MenuDropDown = ReactComponents.MenuDropDown; - +import { Dropdown } from "react-bootstrap"; function getModififyDbLinks (dbName) { return Helpers.getModifyDatabaseLinks(dbName); @@ -38,7 +30,7 @@ function getDropdownItems (items) { return items.map((el, i) => { if (el.title && el.links) { - const items = el.links.map((subel, i2) => { + const items = el.links.map((subel) => { return {subel.title}; }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/components/header-docs-right.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/components/header-docs-right.jsx b/app/addons/documents/components/header-docs-right.jsx index e269414..da14ef8 100644 --- a/app/addons/documents/components/header-docs-right.jsx +++ b/app/addons/documents/components/header-docs-right.jsx @@ -10,19 +10,11 @@ // License for the specific language governing permissions and limitations under // the License. -import app from '../../../app'; -import FauxtonAPI from '../../../core/api'; -import Documents from '../resources'; -import Databases from '../../databases/resources'; import React from 'react'; import QueryOptions from '../queryoptions/queryoptions.react'; -import QueryActions from '../queryoptions/actions'; import JumpToDoc from './jumptodoc.react'; -import IndexResultStores from '../index-results/stores'; import Actions from './actions'; -const { indexResultsStore } = IndexResultStores; - const { QueryOptionsController } = QueryOptions; const RightAllDocsHeader = ({database}) => http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/designdocinfo/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/designdocinfo/actions.js b/app/addons/documents/designdocinfo/actions.js index 7e6ec4a..fec37a8 100644 --- a/app/addons/documents/designdocinfo/actions.js +++ b/app/addons/documents/designdocinfo/actions.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; import Stores from "./stores"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/doc-editor/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/actions.js b/app/addons/documents/doc-editor/actions.js index 95a0ade..e7a45ac 100644 --- a/app/addons/documents/doc-editor/actions.js +++ b/app/addons/documents/doc-editor/actions.js @@ -13,7 +13,7 @@ /* global FormData */ import app from "../../../app"; -import FauxtonAPI, { url } from "../../../core/api"; +import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; var xhr; @@ -35,7 +35,7 @@ function initDocEditor (params) { if (params.onLoaded) { params.onLoaded(); } - }, function (xhr, reason, msg) { + }, function (xhr) { if (xhr.status === 404) { errorNotification('The document does not exist.'); } @@ -97,7 +97,7 @@ function deleteDoc (doc) { }); FauxtonAPI.navigate(FauxtonAPI.urls('allDocs', 'app', databaseName, '')); }, - error: function (resp) { + error: function () { FauxtonAPI.addNotification({ msg: 'Failed to delete your document!', type: 'error', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/doc-editor/components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/components.react.jsx b/app/addons/documents/doc-editor/components.react.jsx index 0a614fd..9c24396 100644 --- a/app/addons/documents/doc-editor/components.react.jsx +++ b/app/addons/documents/doc-editor/components.react.jsx @@ -102,7 +102,7 @@ var DocEditorController = React.createClass({ Actions.saveDoc(this.state.doc, this.checkDocIsValid(), this.onSaveComplete); }, - onSaveComplete: function (json) { + onSaveComplete: function () { this.getEditor().clearChanges(); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx index 2a9b374..95db3da 100644 --- a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx +++ b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx @@ -10,19 +10,16 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../../app"; import FauxtonAPI from "../../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import Documents from "../../resources"; import Components from "../components.react"; -import Stores from "../stores"; import Actions from "../actions"; import ActionTypes from "../actiontypes"; import Databases from "../../../databases/base"; import utils from "../../../../../test/mocha/testUtils"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; var assert = utils.assert; var docJSON = { @@ -150,7 +147,7 @@ describe('DocEditorController', function () { }); it('setting deleteDocModal=true in store shows modal', function () { - var el = TestUtils.renderIntoDocument(, container); + TestUtils.renderIntoDocument(, container); var doc = new Documents.Doc(docWithAttachmentsJSON, { database: database }); FauxtonAPI.dispatch({ type: ActionTypes.DOC_LOADED, @@ -170,7 +167,7 @@ describe('DocEditorController', function () { }); it('setting uploadDocModal=true in store shows modal', function () { - var el = TestUtils.renderIntoDocument(, container); + TestUtils.renderIntoDocument(, container); var doc = new Documents.Doc(docWithAttachmentsJSON, { database: database }); FauxtonAPI.dispatch({ type: ActionTypes.DOC_LOADED, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js b/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js index fb5480b..ac9c4bb 100644 --- a/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js +++ b/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js @@ -10,7 +10,6 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../../app"; import FauxtonAPI from "../../../../core/api"; import Stores from "../stores"; import Documents from "../../resources"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/header/header.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/header/header.react.jsx b/app/addons/documents/header/header.react.jsx index caff6d4..342a1ef 100644 --- a/app/addons/documents/header/header.react.jsx +++ b/app/addons/documents/header/header.react.jsx @@ -10,16 +10,11 @@ // License for the specific language governing permissions and limitations under // the License. -import app from '../../../app'; - -import FauxtonAPI from '../../../core/api'; import React from 'react'; import Actions from './header.actions'; import Components from '../../components/react-components.react'; import IndexResultStores from '../index-results/stores'; -import IndexResultsActions from '../index-results/actions'; import QueryOptionsStore from '../queryoptions/stores'; -import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import { Button, ButtonGroup } from 'react-bootstrap'; const { indexResultsStore } = IndexResultStores; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-editor/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-editor/actions.js b/app/addons/documents/index-editor/actions.js index 6de2928..88f4789 100644 --- a/app/addons/documents/index-editor/actions.js +++ b/app/addons/documents/index-editor/actions.js @@ -14,11 +14,9 @@ import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import Documents from "../resources"; import ActionTypes from "./actiontypes"; -import IndexResultsActions from "../index-results/actions"; import SidebarActions from "../sidebar/actions"; import SidebarActionTypes from "../sidebar/actiontypes"; - function selectReduceChanged (reduceOption) { FauxtonAPI.dispatch({ type: ActionTypes.SELECT_REDUCE_CHANGE, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-editor/tests/actionsSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-editor/tests/actionsSpec.js b/app/addons/documents/index-editor/tests/actionsSpec.js index 797c9b6..4b09038 100644 --- a/app/addons/documents/index-editor/tests/actionsSpec.js +++ b/app/addons/documents/index-editor/tests/actionsSpec.js @@ -13,10 +13,7 @@ import FauxtonAPI from "../../../../core/api"; import Actions from "../actions"; import Documents from "../../resources"; -import ActionTypes from "../actiontypes"; -import Stores from "../stores"; import testUtils from "../../../../../test/mocha/testUtils"; -import IndexResultsActions from "../../index-results/actions"; import sinon from "sinon"; import "../../../documents/base"; var assert = testUtils.assert; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx b/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx index d36ee3a..b4ab031 100644 --- a/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx +++ b/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx @@ -12,9 +12,7 @@ import FauxtonAPI from "../../../../core/api"; import Resources from "../../resources"; import Views from "../components.react"; -import Stores from "../stores"; import Actions from "../actions"; -import Documents from "../../../documents/resources"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-results/actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/actions.js b/app/addons/documents/index-results/actions.js index c0a4ceb..38c7765 100644 --- a/app/addons/documents/index-results/actions.js +++ b/app/addons/documents/index-results/actions.js @@ -10,11 +10,9 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; import Stores from "./stores"; -import Documents from "../resources"; import SidebarActions from "../sidebar/actions"; var indexResultsStore = Stores.indexResultsStore; @@ -199,7 +197,7 @@ export default { errorMessage(ids); selectedIds = ids; }) - .always(function (id) { + .always(function () { if (designDocs && hasDesignDocs) { SidebarActions.updateDesignDocs(designDocs); } http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-results/index-results.components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/index-results.components.react.jsx b/app/addons/documents/index-results/index-results.components.react.jsx index 0e84ff3..3b31a10 100644 --- a/app/addons/documents/index-results/index-results.components.react.jsx +++ b/app/addons/documents/index-results/index-results.components.react.jsx @@ -10,14 +10,11 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import React from "react"; import Stores from "./stores"; import Actions from "./actions"; import Components from "../../components/react-components.react"; -import Documents from "../resources"; -import { SplitButton, MenuItem } from "react-bootstrap"; import ReactSelect from "react-select"; import "../../../../assets/js/plugins/prettify"; import uuid from 'uuid'; @@ -49,7 +46,7 @@ var TableRow = React.createClass({ data: React.PropTypes.object.isRequired }, - onChange: function (e) { + onChange: function () { this.props.docChecked(this.props.el.id, this.props.el._rev); }, http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-results/stores.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/stores.js b/app/addons/documents/index-results/stores.js index 6281853..3348e79 100644 --- a/app/addons/documents/index-results/stores.js +++ b/app/addons/documents/index-results/stores.js @@ -15,10 +15,8 @@ import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; import HeaderActionTypes from "../header/header.actiontypes"; import PaginationActionTypes from "../pagination/actiontypes"; -import Documents from "../resources"; import MangoHelper from "../mango/mango.helper"; import Resources from "../resources"; -import DatabaseResources from "../../databases/resources"; var Stores = {}; @@ -277,8 +275,7 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({ }, getMangoDoc: function (doc, index) { - var selector, - header; + var header; if (doc.get('def') && doc.get('def').fields) { @@ -637,7 +634,7 @@ Stores.IndexResultsStore = FauxtonAPI.Store.extend({ return this._isLoading; }, - selectDoc: function (doc, noReset) { + selectDoc: function (doc) { if (!doc._id || doc._id === '_all_docs') { return; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx b/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx index 11bf3a3..a32dc32 100644 --- a/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx +++ b/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx @@ -14,13 +14,11 @@ import Views from "../index-results.components.react"; import IndexResultsActions from "../actions"; import Stores from "../stores"; import Documents from "../../resources"; -import Databases from "../../../databases/resources"; import documentTestHelper from "../../tests/document-test-helper"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; import TestUtils from "react-addons-test-utils"; -import sinon from "sinon"; FauxtonAPI.router = new FauxtonAPI.Router([]); @@ -80,13 +78,6 @@ describe('Index Results', function () { }); describe('checkbox rendering', function () { - var opts = { - params: {}, - database: { - safeID: function () { return '1';} - } - }; - beforeEach(function () { container = document.createElement('div'); store.reset(); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/index-results/tests/index-results.storesSpec.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/index-results/tests/index-results.storesSpec.js b/app/addons/documents/index-results/tests/index-results.storesSpec.js index c84f9c9..2ac3de2 100644 --- a/app/addons/documents/index-results/tests/index-results.storesSpec.js +++ b/app/addons/documents/index-results/tests/index-results.storesSpec.js @@ -12,7 +12,6 @@ import FauxtonAPI from "../../../../core/api"; import Stores from "../stores"; -import ActionTypes from "../actiontypes"; import Documents from "../../resources"; import documentTestHelper from "../../tests/document-test-helper"; import testUtils from "../../../../../test/mocha/testUtils"; @@ -69,8 +68,8 @@ describe('Index Results Store', function () { [1, 2], [3, 4] ]; - var res = store.sortByTwoFields(a); + store.sortByTwoFields(a); assert.equal(a[0][0], 20); assert.equal(a[1][0], 3); assert.equal(a[2][0], 1); @@ -82,8 +81,8 @@ describe('Index Results Store', function () { [1, "g"], [1, "a"] ]; - var res = store.sortByTwoFields(a); + store.sortByTwoFields(a); assert.equal(a[0][1], 'a'); assert.equal(a[1][1], 'g'); assert.equal(a[2][1], 'z'); @@ -382,7 +381,7 @@ describe('#getMangoDoc', function () { it('supports custom header fields', function () { FauxtonAPI.registerExtension('mango:additionalIndexes', { - createHeader: function (doc) { + createHeader: function () { return ['foobar']; } }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/layouts.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/layouts.js b/app/addons/documents/layouts.js index ba03d72..229595f 100644 --- a/app/addons/documents/layouts.js +++ b/app/addons/documents/layouts.js @@ -11,13 +11,9 @@ // the License. import React from 'react'; -import FauxtonAPI from "../../core/api"; -import {OnePane, OnePaneContent} from '../components/layouts'; import IndexResultsComponents from './index-results/index-results.components.react'; import ReactPagination from './pagination/pagination.react'; import ReactHeader from './header/header.react'; -import {Breadcrumbs} from '../components/header-breadcrumbs'; -import {RightHeader} from './mangolayout'; import {NotificationCenterButton} from '../fauxton/notifications/notifications.react'; import {ApiBarWrapper} from '../components/layouts'; import SidebarComponents from "./sidebar/sidebar.react"; @@ -136,7 +132,7 @@ export const ChangesSidebarLayout = ({docURL, database, endpoint, dbName, dropDo ); }; -export const ViewsTabsSidebarLayout = ({showEditView, database, showIncludeAllDocs, docURL, endpoint, dbName, dropDownLinks}) => { +export const ViewsTabsSidebarLayout = ({showEditView, database, docURL, endpoint, dbName, dropDownLinks}) => { const content = showEditView ? : ; return (
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/mango/mango.actions.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/mango/mango.actions.js b/app/addons/documents/mango/mango.actions.js index 28cfd87..80825bc 100644 --- a/app/addons/documents/mango/mango.actions.js +++ b/app/addons/documents/mango/mango.actions.js @@ -10,14 +10,11 @@ // License for the specific language governing permissions and limitations under // the License. -import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import Documents from "../resources"; import ActionTypes from "./mango.actiontypes"; -import Stores from "./mango.stores"; import IndexResultsStores from "../index-results/stores"; import IndexResultActions from "../index-results/actions"; -var store = Stores.mangoStore; export default { @@ -54,7 +51,7 @@ export default { mangoIndex .save() - .then(function (res) { + .then(function () { var url = '#' + FauxtonAPI.urls('mango', 'query-app', options.database.safeID()); FauxtonAPI.dispatch({ http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14b0901d/app/addons/documents/mango/mango.components.react.jsx ---------------------------------------------------------------------- diff --git a/app/addons/documents/mango/mango.components.react.jsx b/app/addons/documents/mango/mango.components.react.jsx index abc5ddc..dab725f 100644 --- a/app/addons/documents/mango/mango.components.react.jsx +++ b/app/addons/documents/mango/mango.components.react.jsx @@ -65,7 +65,6 @@ var MangoQueryEditorController = React.createClass({ }, render: function () { - var loadLines; if (this.state.isLoading) { return (