From de9404091186c707a82b526f88ec04e67d666e98 Mon Sep 17 00:00:00 2001 From: Garren Smith Date: Wed, 19 Apr 2017 14:03:14 +0200 Subject: [PATCH 1/2] rename all jsx files to js --- .gitignore | 1 - .../stores.test.js} | 2 +- .../{components.react.jsx => components.js} | 2 +- app/addons/activetasks/layout.js | 2 +- ...pec.react.jsx => activetasks.componentsSpec.js} | 2 +- .../stores.test.js} | 1 - .../auth/{components.react.jsx => components.js} | 2 +- app/addons/auth/layout.js | 2 +- app/addons/auth/routes.js | 2 +- ...onentsSpec.react.jsx => auth.componentsSpec.js} | 2 +- .../cluster/{cluster.react.jsx => cluster.js} | 0 app/addons/cluster/routes.js | 2 +- .../{clusterSpec.react.jsx => clusterSpec.js} | 2 +- ...eader-breadcrumbs.jsx => header-breadcrumbs.js} | 0 app/addons/components/layouts.js | 2 +- ...ct-components.react.jsx => react-components.js} | 0 ...ollerSpec.react.jsx => apiBarControllerSpec.js} | 0 .../tests/{badgesSpec.react.jsx => badgesSpec.js} | 2 +- .../{beautifySpec.react.jsx => beautifySpec.js} | 2 +- ...rPanelSpec.react.jsx => codeEditorPanelSpec.js} | 2 +- ...{codeEditorSpec.react.jsx => codeEditorSpec.js} | 2 +- ...rmButtonSpec.react.jsx => confirmButtonSpec.js} | 2 +- ...alSpec.react.jsx => deleteDatabaseModalSpec.js} | 2 +- .../tests/{docSpec.react.jsx => docSpec.js} | 2 +- ...umbsSpec.react.jsx => headerBreadcrumbsSpec.js} | 0 ...tonSpec.react.jsx => headerTogglebuttonSpec.js} | 2 +- ...dBoxSpec.react.jsx => paddedBorderedBoxSpec.js} | 2 +- ...tModalSpec.react.jsx => stringEditModalSpec.js} | 2 +- ...ledSelectSpec.react.jsx => styledSelectSpec.js} | 2 +- .../{zenModeSpec.react.jsx => zenModeSpec.js} | 2 +- app/addons/config/components.js | 434 +++++++++++++++++++++ app/addons/config/components.react.jsx | 8 +- app/addons/config/layout.js | 6 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- .../cors/{components.react.jsx => components.js} | 4 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- .../storesSpec.js => __tests__/stores.test.js} | 1 + .../{components.react.jsx => components.js} | 4 +- app/addons/databases/layout.js | 2 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- .../{components.react.jsx => components.js} | 0 app/addons/documentation/routes.js | 2 +- .../{components.react.jsx => components.js} | 4 +- ...ntsSpec.react.jsx => changes.componentsSpec.js} | 2 +- .../{header-docs-left.jsx => header-docs-left.js} | 0 ...{header-docs-right.jsx => header-docs-right.js} | 4 +- .../{jumptodoc.react.jsx => jumptodoc.js} | 0 .../{components.react.jsx => components.js} | 2 +- .../doc-editor.stores.test.js} | 0 .../{components.react.jsx => components.js} | 4 +- ...Spec.react.jsx => doc-editor.componentsSpec.js} | 2 +- .../header/{header.react.jsx => header.js} | 2 +- .../{components.react.jsx => components.js} | 2 +- ...sSpec.react.jsx => viewIndex.componentsSpec.js} | 2 +- ...nents.react.jsx => index-results.components.js} | 2 +- ...c.react.jsx => index-results.componentsSpec.js} | 2 +- app/addons/documents/layouts.js | 16 +- ...go.components.react.jsx => mango.components.js} | 2 +- ...nentsSpec.react.jsx => mango.componentsSpec.js} | 2 +- app/addons/documents/mangolayout.js | 10 +- .../{pagination.react.jsx => pagination.js} | 0 ...tSpec.react.jsx => pagination.componentSpec.js} | 2 +- .../{queryoptions.react.jsx => queryoptions.js} | 2 +- ...ec.react.jsx => queryoptions.componentsSpec.js} | 2 +- ...ponents.react.jsx => rev-browser.components.js} | 2 +- app/addons/documents/routes-doc-editor.js | 4 +- app/addons/documents/sidebar/actions.js | 2 +- .../sidebar/{sidebar.react.jsx => sidebar.js} | 8 +- .../sidebar/{stores.react.jsx => stores.js} | 0 ...ntsSpec.react.jsx => sidebar.componentsSpec.js} | 2 +- .../documents/sidebar/tests/sidebar.storesSpec.js | 2 +- app/addons/fauxton/appwrapper.js | 2 +- .../{components.react.jsx => components.js} | 0 .../__tests__/permanentNotification.test.js | 2 +- .../{notifications.react.jsx => notifications.js} | 2 +- .../fauxton/notifications/tests/actionsSpec.js | 2 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- app/addons/permissions/layout.js | 2 +- app/addons/replication/components/modals.js | 2 +- .../replication/components/newreplication.js | 2 +- app/addons/replication/components/options.js | 2 +- app/addons/replication/components/source.js | 2 +- app/addons/replication/components/submit.js | 2 +- app/addons/replication/components/target.js | 2 +- app/addons/replication/controller.js | 2 +- app/addons/setup/route.js | 2 +- app/addons/setup/{setup.react.jsx => setup.js} | 2 +- ...onentsSpec.react.jsx => setupComponentsSpec.js} | 0 .../{components.react.jsx => components.js} | 0 app/addons/verifyinstall/routes.js | 2 +- ...{componentsSpec.react.jsx => componentsSpec.js} | 2 +- code-layout.md | 2 +- test/dev.js | 2 +- 94 files changed, 535 insertions(+), 104 deletions(-) rename app/addons/activetasks/{tests/activetasks.storesSpec.js => __tests__/stores.test.js} (98%) rename app/addons/activetasks/{components.react.jsx => components.js} (99%) rename app/addons/activetasks/tests/{activetasks.componentsSpec.react.jsx => activetasks.componentsSpec.js} (98%) rename app/addons/auth/{test/auth.storesSpec.js => __tests__/stores.test.js} (99%) rename app/addons/auth/{components.react.jsx => components.js} (99%) rename app/addons/auth/test/{auth.componentsSpec.react.jsx => auth.componentsSpec.js} (99%) rename app/addons/cluster/{cluster.react.jsx => cluster.js} (100%) rename app/addons/cluster/tests/{clusterSpec.react.jsx => clusterSpec.js} (97%) rename app/addons/components/{header-breadcrumbs.jsx => header-breadcrumbs.js} (100%) rename app/addons/components/{react-components.react.jsx => react-components.js} (100%) rename app/addons/components/tests/{apiBarControllerSpec.react.jsx => apiBarControllerSpec.js} (100%) rename app/addons/components/tests/{badgesSpec.react.jsx => badgesSpec.js} (96%) rename app/addons/components/tests/{beautifySpec.react.jsx => beautifySpec.js} (97%) rename app/addons/components/tests/{codeEditorPanelSpec.react.jsx => codeEditorPanelSpec.js} (98%) rename app/addons/components/tests/{codeEditorSpec.react.jsx => codeEditorSpec.js} (98%) rename app/addons/components/tests/{confirmButtonSpec.react.jsx => confirmButtonSpec.js} (97%) rename app/addons/components/tests/{deleteDatabaseModalSpec.react.jsx => deleteDatabaseModalSpec.js} (97%) rename app/addons/components/tests/{docSpec.react.jsx => docSpec.js} (99%) rename app/addons/components/tests/{headerBreadcrumbsSpec.react.jsx => headerBreadcrumbsSpec.js} (100%) rename app/addons/components/tests/{headerTogglebuttonSpec.react.jsx => headerTogglebuttonSpec.js} (96%) rename app/addons/components/tests/{paddedBorderedBoxSpec.react.jsx => paddedBorderedBoxSpec.js} (95%) rename app/addons/components/tests/{stringEditModalSpec.react.jsx => stringEditModalSpec.js} (96%) rename app/addons/components/tests/{styledSelectSpec.react.jsx => styledSelectSpec.js} (96%) rename app/addons/components/tests/{zenModeSpec.react.jsx => zenModeSpec.js} (97%) create mode 100644 app/addons/config/components.js rename app/addons/config/tests/{componentsSpec.react.jsx => componentsSpec.js} (99%) rename app/addons/cors/{components.react.jsx => components.js} (98%) rename app/addons/cors/tests/{componentsSpec.react.jsx => componentsSpec.js} (99%) rename app/addons/databases/{tests/storesSpec.js => __tests__/stores.test.js} (98%) rename app/addons/databases/{components.react.jsx => components.js} (98%) rename app/addons/databases/tests/{componentsSpec.react.jsx => componentsSpec.js} (99%) rename app/addons/documentation/{components.react.jsx => components.js} (100%) rename app/addons/documents/changes/{components.react.jsx => components.js} (98%) rename app/addons/documents/changes/tests/{changes.componentsSpec.react.jsx => changes.componentsSpec.js} (99%) rename app/addons/documents/components/{header-docs-left.jsx => header-docs-left.js} (100%) rename app/addons/documents/components/{header-docs-right.jsx => header-docs-right.js} (92%) rename app/addons/documents/components/{jumptodoc.react.jsx => jumptodoc.js} (100%) rename app/addons/documents/designdocinfo/{components.react.jsx => components.js} (98%) rename app/addons/documents/doc-editor/{tests/doc-editor.storesSpec.js => __tests__/doc-editor.stores.test.js} (100%) rename app/addons/documents/doc-editor/{components.react.jsx => components.js} (99%) rename app/addons/documents/doc-editor/tests/{doc-editor.componentsSpec.react.jsx => doc-editor.componentsSpec.js} (99%) rename app/addons/documents/header/{header.react.jsx => header.js} (97%) rename app/addons/documents/index-editor/{components.react.jsx => components.js} (99%) rename app/addons/documents/index-editor/tests/{viewIndex.componentsSpec.react.jsx => viewIndex.componentsSpec.js} (99%) rename app/addons/documents/index-results/{index-results.components.react.jsx => index-results.components.js} (99%) rename app/addons/documents/index-results/tests/{index-results.componentsSpec.react.jsx => index-results.componentsSpec.js} (99%) rename app/addons/documents/mango/{mango.components.react.jsx => mango.components.js} (99%) rename app/addons/documents/mango/tests/{mango.componentsSpec.react.jsx => mango.componentsSpec.js} (99%) rename app/addons/documents/pagination/{pagination.react.jsx => pagination.js} (100%) rename app/addons/documents/pagination/tests/{pagination.componentSpec.react.jsx => pagination.componentSpec.js} (98%) rename app/addons/documents/queryoptions/{queryoptions.react.jsx => queryoptions.js} (99%) rename app/addons/documents/queryoptions/tests/{queryoptions.componentsSpec.react.jsx => queryoptions.componentsSpec.js} (99%) rename app/addons/documents/rev-browser/{rev-browser.components.react.jsx => rev-browser.components.js} (99%) rename app/addons/documents/sidebar/{sidebar.react.jsx => sidebar.js} (99%) rename app/addons/documents/sidebar/{stores.react.jsx => stores.js} (100%) rename app/addons/documents/sidebar/tests/{sidebar.componentsSpec.react.jsx => sidebar.componentsSpec.js} (98%) rename app/addons/fauxton/{components.react.jsx => components.js} (100%) rename app/addons/fauxton/notifications/{notifications.react.jsx => notifications.js} (99%) rename app/addons/fauxton/notifications/tests/{componentsSpec.react.jsx => componentsSpec.js} (99%) rename app/addons/fauxton/tests/{componentsSpec.react.jsx => componentsSpec.js} (99%) rename app/addons/setup/{setup.react.jsx => setup.js} (99%) rename app/addons/setup/tests/{setupComponentsSpec.react.jsx => setupComponentsSpec.js} (100%) rename app/addons/verifyinstall/{components.react.jsx => components.js} (100%) rename app/addons/verifyinstall/tests/{componentsSpec.react.jsx => componentsSpec.js} (98%) diff --git a/.gitignore b/.gitignore index f12dc0641..3e9575d68 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,6 @@ test/nightwatch_tests/reports/* test/nightwatch_tests/selenium/* !test/nightwatch_tests/selenium/.gitkeep .DS_Store -*.react.js selenium-debug.log npm-debug.log test/bundle.js diff --git a/app/addons/activetasks/tests/activetasks.storesSpec.js b/app/addons/activetasks/__tests__/stores.test.js similarity index 98% rename from app/addons/activetasks/tests/activetasks.storesSpec.js rename to app/addons/activetasks/__tests__/stores.test.js index 5ba763258..800acebd7 100644 --- a/app/addons/activetasks/tests/activetasks.storesSpec.js +++ b/app/addons/activetasks/__tests__/stores.test.js @@ -11,7 +11,7 @@ // the License. import ActiveTasks from "../resources"; import Stores from "../stores"; -import fakedResponse from "./fakeActiveTaskResponse"; +import fakedResponse from "../tests/fakeActiveTaskResponse"; import utils from "../../../../test/mocha/testUtils"; var assert = utils.assert; diff --git a/app/addons/activetasks/components.react.jsx b/app/addons/activetasks/components.js similarity index 99% rename from app/addons/activetasks/components.react.jsx rename to app/addons/activetasks/components.js index 8e2bf69dc..5882f9563 100644 --- a/app/addons/activetasks/components.react.jsx +++ b/app/addons/activetasks/components.js @@ -16,7 +16,7 @@ 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 Components from "../components/react-components"; const {TabElement, TabElementWrapper, Polling} = Components; diff --git a/app/addons/activetasks/layout.js b/app/addons/activetasks/layout.js index f8932868b..ed96a1300 100644 --- a/app/addons/activetasks/layout.js +++ b/app/addons/activetasks/layout.js @@ -13,7 +13,7 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; import {OnePane, OnePaneHeader, OnePaneContent} from '../components/layouts'; -import {ActiveTasksController, ActiveTasksPollingWidgetController} from "./components.react"; +import {ActiveTasksController, ActiveTasksPollingWidgetController} from "./components"; const crumbs = [ {'name': 'Active Tasks'} diff --git a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx b/app/addons/activetasks/tests/activetasks.componentsSpec.js similarity index 98% rename from app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx rename to app/addons/activetasks/tests/activetasks.componentsSpec.js index 6377cb74c..f5c67c800 100644 --- a/app/addons/activetasks/tests/activetasks.componentsSpec.react.jsx +++ b/app/addons/activetasks/tests/activetasks.componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import ActiveTasks from "../resources"; -import Components from "../components.react"; +import Components from "../components"; import Stores from "../stores"; import fakedResponse from "./fakeActiveTaskResponse"; import React from "react"; diff --git a/app/addons/auth/test/auth.storesSpec.js b/app/addons/auth/__tests__/stores.test.js similarity index 99% rename from app/addons/auth/test/auth.storesSpec.js rename to app/addons/auth/__tests__/stores.test.js index 1c8818f0a..c4cdbba09 100644 --- a/app/addons/auth/test/auth.storesSpec.js +++ b/app/addons/auth/__tests__/stores.test.js @@ -11,7 +11,6 @@ // the License. import FauxtonAPI from "../../../core/api"; -import React from "react"; import testUtils from "../../../../test/mocha/testUtils"; import ActionTypes from "../actiontypes"; import Stores from "../stores"; diff --git a/app/addons/auth/components.react.jsx b/app/addons/auth/components.js similarity index 99% rename from app/addons/auth/components.react.jsx rename to app/addons/auth/components.js index 17846187a..36ac0d32e 100644 --- a/app/addons/auth/components.react.jsx +++ b/app/addons/auth/components.js @@ -17,7 +17,7 @@ import ReactDOM from "react-dom"; import AuthStores from "./stores"; import AuthActions from "./actions"; import { Modal } from 'react-bootstrap'; -import Components from '../components/react-components.react'; +import Components from '../components/react-components'; var changePasswordStore = AuthStores.changePasswordStore; var createAdminStore = AuthStores.createAdminStore; diff --git a/app/addons/auth/layout.js b/app/addons/auth/layout.js index 3597e707e..b6c829142 100644 --- a/app/addons/auth/layout.js +++ b/app/addons/auth/layout.js @@ -13,7 +13,7 @@ import React from 'react'; import {OnePane, OnePaneContent} from '../components/layouts'; import {Breadcrumbs} from '../components/header-breadcrumbs'; -import Components from "./components.react"; +import Components from "./components"; const { CreateAdminForm, ChangePasswordForm } = Components; diff --git a/app/addons/auth/routes.js b/app/addons/auth/routes.js index 12256197e..71f4bc1e7 100644 --- a/app/addons/auth/routes.js +++ b/app/addons/auth/routes.js @@ -15,7 +15,7 @@ import app from "../../app"; import FauxtonAPI from "../../core/api"; import Auth from "./resources"; import AuthActions from "./actions"; -import Components from "./components.react"; +import Components from "./components"; import ClusterActions from "../cluster/cluster.actions"; import {AuthLayout, AdminLayout} from './layout'; diff --git a/app/addons/auth/test/auth.componentsSpec.react.jsx b/app/addons/auth/test/auth.componentsSpec.js similarity index 99% rename from app/addons/auth/test/auth.componentsSpec.react.jsx rename to app/addons/auth/test/auth.componentsSpec.js index b577388a9..3b5f1d8f3 100644 --- a/app/addons/auth/test/auth.componentsSpec.react.jsx +++ b/app/addons/auth/test/auth.componentsSpec.js @@ -13,7 +13,7 @@ import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import utils from "../../../../test/mocha/testUtils"; -import Components from "../components.react"; +import Components from "../components"; import Stores from "../stores"; import Actions from "../actions"; import TestUtils from "react-addons-test-utils"; diff --git a/app/addons/cluster/cluster.react.jsx b/app/addons/cluster/cluster.js similarity index 100% rename from app/addons/cluster/cluster.react.jsx rename to app/addons/cluster/cluster.js diff --git a/app/addons/cluster/routes.js b/app/addons/cluster/routes.js index c4b924d56..339360f7d 100644 --- a/app/addons/cluster/routes.js +++ b/app/addons/cluster/routes.js @@ -13,7 +13,7 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; import Cluster from "./resources"; -import ClusterComponents from "./cluster.react"; +import ClusterComponents from "./cluster"; import ClusterActions from "./cluster.actions"; import {OnePaneSimpleLayout} from '../components/layouts'; diff --git a/app/addons/cluster/tests/clusterSpec.react.jsx b/app/addons/cluster/tests/clusterSpec.js similarity index 97% rename from app/addons/cluster/tests/clusterSpec.react.jsx rename to app/addons/cluster/tests/clusterSpec.js index a76b36dfc..b2132f267 100644 --- a/app/addons/cluster/tests/clusterSpec.react.jsx +++ b/app/addons/cluster/tests/clusterSpec.js @@ -9,7 +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 ClusterComponent from "../cluster.react"; +import ClusterComponent from "../cluster"; import ClusterActions from "../cluster.actions"; import ClusterStores from "../cluster.stores"; import utils from "../../../../test/mocha/testUtils"; diff --git a/app/addons/components/header-breadcrumbs.jsx b/app/addons/components/header-breadcrumbs.js similarity index 100% rename from app/addons/components/header-breadcrumbs.jsx rename to app/addons/components/header-breadcrumbs.js diff --git a/app/addons/components/layouts.js b/app/addons/components/layouts.js index 5deb24c4d..72fd3d1fd 100644 --- a/app/addons/components/layouts.js +++ b/app/addons/components/layouts.js @@ -12,7 +12,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import {NotificationCenterButton} from '../fauxton/notifications/notifications.react'; +import {NotificationCenterButton} from '../fauxton/notifications/notifications'; import {ApiBarController} from './components/apibar'; import {Breadcrumbs} from './header-breadcrumbs'; import ComponentActions from './actions'; diff --git a/app/addons/components/react-components.react.jsx b/app/addons/components/react-components.js similarity index 100% rename from app/addons/components/react-components.react.jsx rename to app/addons/components/react-components.js diff --git a/app/addons/components/tests/apiBarControllerSpec.react.jsx b/app/addons/components/tests/apiBarControllerSpec.js similarity index 100% rename from app/addons/components/tests/apiBarControllerSpec.react.jsx rename to app/addons/components/tests/apiBarControllerSpec.js diff --git a/app/addons/components/tests/badgesSpec.react.jsx b/app/addons/components/tests/badgesSpec.js similarity index 96% rename from app/addons/components/tests/badgesSpec.react.jsx rename to app/addons/components/tests/badgesSpec.js index 3014c2472..e95f12179 100644 --- a/app/addons/components/tests/badgesSpec.react.jsx +++ b/app/addons/components/tests/badgesSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/beautifySpec.react.jsx b/app/addons/components/tests/beautifySpec.js similarity index 97% rename from app/addons/components/tests/beautifySpec.react.jsx rename to app/addons/components/tests/beautifySpec.js index 2d0d1c654..92ab1dae9 100644 --- a/app/addons/components/tests/beautifySpec.react.jsx +++ b/app/addons/components/tests/beautifySpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/codeEditorPanelSpec.react.jsx b/app/addons/components/tests/codeEditorPanelSpec.js similarity index 98% rename from app/addons/components/tests/codeEditorPanelSpec.react.jsx rename to app/addons/components/tests/codeEditorPanelSpec.js index 703e695eb..974d825c3 100644 --- a/app/addons/components/tests/codeEditorPanelSpec.react.jsx +++ b/app/addons/components/tests/codeEditorPanelSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/codeEditorSpec.react.jsx b/app/addons/components/tests/codeEditorSpec.js similarity index 98% rename from app/addons/components/tests/codeEditorSpec.react.jsx rename to app/addons/components/tests/codeEditorSpec.js index 6d4469b9d..f9bcb9ba5 100644 --- a/app/addons/components/tests/codeEditorSpec.react.jsx +++ b/app/addons/components/tests/codeEditorSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/confirmButtonSpec.react.jsx b/app/addons/components/tests/confirmButtonSpec.js similarity index 97% rename from app/addons/components/tests/confirmButtonSpec.react.jsx rename to app/addons/components/tests/confirmButtonSpec.js index 71157bd90..f4ef8d8b3 100644 --- a/app/addons/components/tests/confirmButtonSpec.react.jsx +++ b/app/addons/components/tests/confirmButtonSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx b/app/addons/components/tests/deleteDatabaseModalSpec.js similarity index 97% rename from app/addons/components/tests/deleteDatabaseModalSpec.react.jsx rename to app/addons/components/tests/deleteDatabaseModalSpec.js index f0231c4f8..3b53c84ac 100644 --- a/app/addons/components/tests/deleteDatabaseModalSpec.react.jsx +++ b/app/addons/components/tests/deleteDatabaseModalSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/docSpec.react.jsx b/app/addons/components/tests/docSpec.js similarity index 99% rename from app/addons/components/tests/docSpec.react.jsx rename to app/addons/components/tests/docSpec.js index f4ae867be..57919354b 100644 --- a/app/addons/components/tests/docSpec.react.jsx +++ b/app/addons/components/tests/docSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/headerBreadcrumbsSpec.react.jsx b/app/addons/components/tests/headerBreadcrumbsSpec.js similarity index 100% rename from app/addons/components/tests/headerBreadcrumbsSpec.react.jsx rename to app/addons/components/tests/headerBreadcrumbsSpec.js diff --git a/app/addons/components/tests/headerTogglebuttonSpec.react.jsx b/app/addons/components/tests/headerTogglebuttonSpec.js similarity index 96% rename from app/addons/components/tests/headerTogglebuttonSpec.react.jsx rename to app/addons/components/tests/headerTogglebuttonSpec.js index 7aa0b471c..dfbd456f1 100644 --- a/app/addons/components/tests/headerTogglebuttonSpec.react.jsx +++ b/app/addons/components/tests/headerTogglebuttonSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx b/app/addons/components/tests/paddedBorderedBoxSpec.js similarity index 95% rename from app/addons/components/tests/paddedBorderedBoxSpec.react.jsx rename to app/addons/components/tests/paddedBorderedBoxSpec.js index 69c7c529c..4b5e8a34b 100644 --- a/app/addons/components/tests/paddedBorderedBoxSpec.react.jsx +++ b/app/addons/components/tests/paddedBorderedBoxSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/stringEditModalSpec.react.jsx b/app/addons/components/tests/stringEditModalSpec.js similarity index 96% rename from app/addons/components/tests/stringEditModalSpec.react.jsx rename to app/addons/components/tests/stringEditModalSpec.js index f606dc5b7..f2298f9a1 100644 --- a/app/addons/components/tests/stringEditModalSpec.react.jsx +++ b/app/addons/components/tests/stringEditModalSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/styledSelectSpec.react.jsx b/app/addons/components/tests/styledSelectSpec.js similarity index 96% rename from app/addons/components/tests/styledSelectSpec.react.jsx rename to app/addons/components/tests/styledSelectSpec.js index 8ae3fc4b1..016c46834 100644 --- a/app/addons/components/tests/styledSelectSpec.react.jsx +++ b/app/addons/components/tests/styledSelectSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/components/tests/zenModeSpec.react.jsx b/app/addons/components/tests/zenModeSpec.js similarity index 97% rename from app/addons/components/tests/zenModeSpec.react.jsx rename to app/addons/components/tests/zenModeSpec.js index 4fc8ef25f..6be4e1864 100644 --- a/app/addons/components/tests/zenModeSpec.react.jsx +++ b/app/addons/components/tests/zenModeSpec.js @@ -9,7 +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 ReactComponents from "../react-components.react"; +import ReactComponents from "../react-components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/config/components.js b/app/addons/config/components.js new file mode 100644 index 000000000..ac1b30e0d --- /dev/null +++ b/app/addons/config/components.js @@ -0,0 +1,434 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +import React from "react"; +import ReactDOM from "react-dom"; +import Stores from "./stores"; +import Actions from "./actions"; +import {Overlay, Button, Popover} from "react-bootstrap"; +import Components from "../components/react-components"; +import FauxtonComponents from "../fauxton/components"; + +const configStore = Stores.configStore; + +var ConfigTableController = React.createClass({ + getStoreState () { + return { + options: configStore.getOptions(), + loading: configStore.isLoading() + }; + }, + + getInitialState () { + return this.getStoreState(); + }, + + componentDidMount () { + configStore.on('change', this.onChange, this); + }, + + componentWillUnmount () { + configStore.off('change', this.onChange); + }, + + onChange () { + if (this.isMounted()) { + this.setState(this.getStoreState()); + } + }, + + saveOption (option) { + Actions.saveOption(this.props.node, option); + }, + + deleteOption (option) { + Actions.deleteOption(this.props.node, option); + }, + + editOption (option) { + Actions.editOption(option); + }, + + cancelEdit () { + Actions.cancelEdit(); + }, + + render () { + if (this.state.loading) { + return ( +
+ +
+ ); + } else { + return ( + + ); + } + } +}); + +var ConfigTable = React.createClass({ + createOptions () { + return _.map(this.props.options, (option) => ( + + )); + }, + + render () { + var options = this.createOptions(); + + return ( + + + + + + + + + + + {options} + +
SectionOptionValue
+ ); + } +}); + +var ConfigOption = React.createClass({ + onSave (value) { + var option = this.props.option; + option.value = value; + this.props.onSave(option); + }, + + onDelete () { + this.props.onDelete(this.props.option); + }, + + onEdit () { + this.props.onEdit(this.props.option); + }, + + render () { + return ( + + {this.props.option.header && this.props.option.sectionName} + {this.props.option.optionName} + + + + ); + } +}); + +var ConfigOptionValue = React.createClass({ + getInitialState () { + return { + value: this.props.value, + editing: this.props.editing, + saving: this.props.saving + }; + }, + + getDefaultProps () { + return { + value: '', + editing: false, + saving: false, + onSave: () => null, + onEdit: () => null, + onCancelEdit: () => null + }; + }, + + componentWillReceiveProps (nextProps) { + if (this.props.value !== nextProps.value) { + this.setState({ saving: false }); + } + }, + + onChange (event) { + this.setState({ value: event.target.value }); + }, + + onSave () { + if (this.state.value !== this.props.value) { + this.setState({ saving: true }); + this.props.onSave(this.state.value); + } else { + this.props.onCancelEdit(); + } + }, + + getButtons () { + if (this.state.saving) { + return null; + } else { + return ( + + + + ReactDOM.findDOMNode(this.refs.target)}> + {this.getPopover()} + + + ); + } +}); + +const TabItem = ({active, link, title}) => { + return ( +
  • + + {title} + +
  • + ); +}; + +TabItem.propTypes = { + active: React.PropTypes.bool.isRequired, + link: React.PropTypes.string.isRequired, + icon: React.PropTypes.string, + title: React.PropTypes.string.isRequired +}; + +const Tabs = ({sidebarItems, selectedTab}) => { + const tabItems = sidebarItems.map(item => { + return ; + }); + return ( + + ); +}; + +export default { + Tabs, + ConfigTableController, + ConfigTable, + ConfigOption, + ConfigOptionValue, + ConfigOptionTrash, + AddOptionController, + AddOptionButton, +}; diff --git a/app/addons/config/components.react.jsx b/app/addons/config/components.react.jsx index 57fa6e956..b6dcdaed3 100644 --- a/app/addons/config/components.react.jsx +++ b/app/addons/config/components.react.jsx @@ -15,8 +15,8 @@ import ReactDOM from "react-dom"; import Stores from "./stores"; import Actions from "./actions"; import {Overlay, Button, Popover} from "react-bootstrap"; -import Components from "../components/react-components.react"; -import FauxtonComponents from "../fauxton/components.react"; +import Components from "../components/react-components"; +import FauxtonComponents from "../fauxton/components"; const configStore = Stores.configStore; @@ -41,9 +41,7 @@ var ConfigTableController = React.createClass({ }, onChange () { - if (this.isMounted()) { - this.setState(this.getStoreState()); - } + this.setState(this.getStoreState()); }, saveOption (option) { diff --git a/app/addons/config/layout.js b/app/addons/config/layout.js index 1d03d4892..bc8a504ca 100644 --- a/app/addons/config/layout.js +++ b/app/addons/config/layout.js @@ -11,10 +11,10 @@ // the License. import React from 'react'; -import ConfigComponents from "./components.react"; -import CORSComponents from "../cors/components.react"; +import ConfigComponents from "./components"; +import CORSComponents from "../cors/components"; import {Breadcrumbs} from '../components/header-breadcrumbs'; -import {NotificationCenterButton} from '../fauxton/notifications/notifications.react'; +import {NotificationCenterButton} from '../fauxton/notifications/notifications'; import {ApiBarWrapper} from '../components/layouts'; export const ConfigHeader = ({node, crumbs, docURL, endpoint}) => { diff --git a/app/addons/config/tests/componentsSpec.react.jsx b/app/addons/config/tests/componentsSpec.js similarity index 99% rename from app/addons/config/tests/componentsSpec.react.jsx rename to app/addons/config/tests/componentsSpec.js index b48cff48a..963c10b9a 100644 --- a/app/addons/config/tests/componentsSpec.react.jsx +++ b/app/addons/config/tests/componentsSpec.js @@ -11,7 +11,7 @@ // the License. import FauxtonAPI from "../../../core/api"; -import Views from "../components.react"; +import Views from "../components"; import Actions from "../actions"; import Stores from "../stores"; import utils from "../../../../test/mocha/testUtils"; diff --git a/app/addons/cors/components.react.jsx b/app/addons/cors/components.js similarity index 98% rename from app/addons/cors/components.react.jsx rename to app/addons/cors/components.js index f43b81d8d..a986df48d 100644 --- a/app/addons/cors/components.react.jsx +++ b/app/addons/cors/components.js @@ -16,8 +16,8 @@ import React from "react"; import Stores from "./stores"; import Resources from "./resources"; import Actions from "./actions"; -import ReactComponents from "../components/react-components.react"; -import FauxtonComponents from "../fauxton/components.react"; +import ReactComponents from "../components/react-components"; +import FauxtonComponents from "../fauxton/components"; var LoadLines = ReactComponents.LoadLines; var ConfirmationModal = FauxtonComponents.ConfirmationModal; diff --git a/app/addons/cors/tests/componentsSpec.react.jsx b/app/addons/cors/tests/componentsSpec.js similarity index 99% rename from app/addons/cors/tests/componentsSpec.react.jsx rename to app/addons/cors/tests/componentsSpec.js index 1a28e684b..1c39b5f35 100644 --- a/app/addons/cors/tests/componentsSpec.react.jsx +++ b/app/addons/cors/tests/componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../core/api"; -import Views from "../components.react"; +import Views from "../components"; import Actions from "../actions"; import Resources from "../resources"; import Stores from "../stores"; diff --git a/app/addons/databases/tests/storesSpec.js b/app/addons/databases/__tests__/stores.test.js similarity index 98% rename from app/addons/databases/tests/storesSpec.js rename to app/addons/databases/__tests__/stores.test.js index a4bda762a..f7ae32e32 100644 --- a/app/addons/databases/tests/storesSpec.js +++ b/app/addons/databases/__tests__/stores.test.js @@ -12,6 +12,7 @@ import utils from "../../../../test/mocha/testUtils"; import Stores from "../stores"; +import "../../documents/base"; import DatabaseActions from "../actions"; diff --git a/app/addons/databases/components.react.jsx b/app/addons/databases/components.js similarity index 98% rename from app/addons/databases/components.react.jsx rename to app/addons/databases/components.js index fface848f..04d67516f 100644 --- a/app/addons/databases/components.react.jsx +++ b/app/addons/databases/components.js @@ -13,10 +13,10 @@ import FauxtonAPI from "../../core/api"; import React from "react"; import ReactDOM from "react-dom"; -import Components from "../components/react-components.react"; +import Components from "../components/react-components"; import ComponentsStore from "../components/stores"; import ComponentsActions from "../components/actions"; -import FauxtonComponentsReact from "..//fauxton/components.react"; +import FauxtonComponentsReact from "..//fauxton/components"; import Stores from "./stores"; import Actions from "./actions"; diff --git a/app/addons/databases/layout.js b/app/addons/databases/layout.js index eacfb2142..e83548e65 100644 --- a/app/addons/databases/layout.js +++ b/app/addons/databases/layout.js @@ -13,7 +13,7 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; import {OnePane, OnePaneHeader, OnePaneContent, OnePaneFooter} from '../components/layouts'; -import Components from "./components.react"; +import Components from "./components"; const {RightDatabasesHeader, DatabasesController, DatabasePagination} = Components; export const Layout = () => { diff --git a/app/addons/databases/tests/componentsSpec.react.jsx b/app/addons/databases/tests/componentsSpec.js similarity index 99% rename from app/addons/databases/tests/componentsSpec.react.jsx rename to app/addons/databases/tests/componentsSpec.js index f61959994..037b6d438 100644 --- a/app/addons/databases/tests/componentsSpec.react.jsx +++ b/app/addons/databases/tests/componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../core/api"; -import Views from "../components.react"; +import Views from "../components"; import Actions from "../actions"; import Stores from "../stores"; import utils from "../../../../test/mocha/testUtils"; diff --git a/app/addons/documentation/components.react.jsx b/app/addons/documentation/components.js similarity index 100% rename from app/addons/documentation/components.react.jsx rename to app/addons/documentation/components.js diff --git a/app/addons/documentation/routes.js b/app/addons/documentation/routes.js index 41b62985c..be075d3c6 100644 --- a/app/addons/documentation/routes.js +++ b/app/addons/documentation/routes.js @@ -12,7 +12,7 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; -import DocumentationComponents from "./components.react"; +import DocumentationComponents from "./components"; import {OnePaneSimpleLayout} from '../components/layouts'; var DocumentationRouteObject = FauxtonAPI.RouteObject.extend({ diff --git a/app/addons/documents/changes/components.react.jsx b/app/addons/documents/changes/components.js similarity index 98% rename from app/addons/documents/changes/components.react.jsx rename to app/addons/documents/changes/components.js index db67ee367..457e7c7ad 100644 --- a/app/addons/documents/changes/components.react.jsx +++ b/app/addons/documents/changes/components.js @@ -15,8 +15,8 @@ import React from "react"; import ReactDOM from "react-dom"; import Actions from "./actions"; import Stores from "./stores"; -import Components from "../../fauxton/components.react"; -import ReactComponents from "../../components/react-components.react"; +import Components from "../../fauxton/components"; +import ReactComponents from "../../components/react-components"; import ReactCSSTransitionGroup from "react-addons-css-transition-group"; import "../../../../assets/js/plugins/prettify"; import uuid from 'uuid'; diff --git a/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx b/app/addons/documents/changes/tests/changes.componentsSpec.js similarity index 99% rename from app/addons/documents/changes/tests/changes.componentsSpec.react.jsx rename to app/addons/documents/changes/tests/changes.componentsSpec.js index e138b6c12..dd0e3b961 100644 --- a/app/addons/documents/changes/tests/changes.componentsSpec.react.jsx +++ b/app/addons/documents/changes/tests/changes.componentsSpec.js @@ -13,7 +13,7 @@ import React from "react"; import ReactDOM from "react-dom"; -import Changes from "../components.react"; +import Changes from "../components"; import Stores from "../stores"; import Actions from "../actions"; import utils from "../../../../../test/mocha/testUtils"; diff --git a/app/addons/documents/components/header-docs-left.jsx b/app/addons/documents/components/header-docs-left.js similarity index 100% rename from app/addons/documents/components/header-docs-left.jsx rename to app/addons/documents/components/header-docs-left.js diff --git a/app/addons/documents/components/header-docs-right.jsx b/app/addons/documents/components/header-docs-right.js similarity index 92% rename from app/addons/documents/components/header-docs-right.jsx rename to app/addons/documents/components/header-docs-right.js index 115ae1fc9..249782336 100644 --- a/app/addons/documents/components/header-docs-right.jsx +++ b/app/addons/documents/components/header-docs-right.js @@ -11,8 +11,8 @@ // the License. import React from 'react'; -import QueryOptions from '../queryoptions/queryoptions.react'; -import JumpToDoc from './jumptodoc.react'; +import QueryOptions from '../queryoptions/queryoptions'; +import JumpToDoc from './jumptodoc'; import Actions from './actions'; const { QueryOptionsController } = QueryOptions; diff --git a/app/addons/documents/components/jumptodoc.react.jsx b/app/addons/documents/components/jumptodoc.js similarity index 100% rename from app/addons/documents/components/jumptodoc.react.jsx rename to app/addons/documents/components/jumptodoc.js diff --git a/app/addons/documents/designdocinfo/components.react.jsx b/app/addons/documents/designdocinfo/components.js similarity index 98% rename from app/addons/documents/designdocinfo/components.react.jsx rename to app/addons/documents/designdocinfo/components.js index 237fb88ce..df0f481e1 100644 --- a/app/addons/documents/designdocinfo/components.react.jsx +++ b/app/addons/documents/designdocinfo/components.js @@ -14,7 +14,7 @@ import FauxtonAPI from "../../../core/api"; import React from "react"; import Stores from "./stores"; import Actions from "./actions"; -import ReactComponents from "../../components/react-components.react"; +import ReactComponents from "../../components/react-components"; var designDocInfoStore = Stores.designDocInfoStore; var LoadLines = ReactComponents.LoadLines; var Copy = ReactComponents.Copy; diff --git a/app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js b/app/addons/documents/doc-editor/__tests__/doc-editor.stores.test.js similarity index 100% rename from app/addons/documents/doc-editor/tests/doc-editor.storesSpec.js rename to app/addons/documents/doc-editor/__tests__/doc-editor.stores.test.js diff --git a/app/addons/documents/doc-editor/components.react.jsx b/app/addons/documents/doc-editor/components.js similarity index 99% rename from app/addons/documents/doc-editor/components.react.jsx rename to app/addons/documents/doc-editor/components.js index 3ac6e3404..71e491594 100644 --- a/app/addons/documents/doc-editor/components.react.jsx +++ b/app/addons/documents/doc-editor/components.js @@ -17,8 +17,8 @@ import React from "react"; import ReactDOM from "react-dom"; import Actions from "./actions"; import Stores from "./stores"; -import FauxtonComponents from "../../fauxton/components.react"; -import GeneralComponents from "../../components/react-components.react"; +import FauxtonComponents from "../../fauxton/components"; +import GeneralComponents from "../../components/react-components"; import { Modal } from "react-bootstrap"; import Helpers from "../../../helpers"; diff --git a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.js similarity index 99% rename from app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx rename to app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.js index 95db3da16..97bbae258 100644 --- a/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.react.jsx +++ b/app/addons/documents/doc-editor/tests/doc-editor.componentsSpec.js @@ -14,7 +14,7 @@ import FauxtonAPI from "../../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; import Documents from "../../resources"; -import Components from "../components.react"; +import Components from "../components"; import Actions from "../actions"; import ActionTypes from "../actiontypes"; import Databases from "../../../databases/base"; diff --git a/app/addons/documents/header/header.react.jsx b/app/addons/documents/header/header.js similarity index 97% rename from app/addons/documents/header/header.react.jsx rename to app/addons/documents/header/header.js index 342a1ef5a..0e76d2ec9 100644 --- a/app/addons/documents/header/header.react.jsx +++ b/app/addons/documents/header/header.js @@ -12,7 +12,7 @@ import React from 'react'; import Actions from './header.actions'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; import IndexResultStores from '../index-results/stores'; import QueryOptionsStore from '../queryoptions/stores'; import { Button, ButtonGroup } from 'react-bootstrap'; diff --git a/app/addons/documents/index-editor/components.react.jsx b/app/addons/documents/index-editor/components.js similarity index 99% rename from app/addons/documents/index-editor/components.react.jsx rename to app/addons/documents/index-editor/components.js index d864e2125..1ac8a1ceb 100644 --- a/app/addons/documents/index-editor/components.react.jsx +++ b/app/addons/documents/index-editor/components.js @@ -16,7 +16,7 @@ import React from "react"; import ReactDOM from "react-dom"; import Stores from "./stores"; import Actions from "./actions"; -import ReactComponents from "../../components/react-components.react"; +import ReactComponents from "../../components/react-components"; var store = Stores.indexEditorStore; var getDocUrl = app.helpers.getDocUrl; diff --git a/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx b/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.js similarity index 99% rename from app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx rename to app/addons/documents/index-editor/tests/viewIndex.componentsSpec.js index 16be89b7e..36fec6f25 100644 --- a/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.react.jsx +++ b/app/addons/documents/index-editor/tests/viewIndex.componentsSpec.js @@ -11,7 +11,7 @@ // the License. import FauxtonAPI from "../../../../core/api"; import Resources from "../../resources"; -import Views from "../components.react"; +import Views from "../components"; import Actions from "../actions"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; diff --git a/app/addons/documents/index-results/index-results.components.react.jsx b/app/addons/documents/index-results/index-results.components.js similarity index 99% rename from app/addons/documents/index-results/index-results.components.react.jsx rename to app/addons/documents/index-results/index-results.components.js index 3b31a1041..2b1563fcc 100644 --- a/app/addons/documents/index-results/index-results.components.react.jsx +++ b/app/addons/documents/index-results/index-results.components.js @@ -14,7 +14,7 @@ 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 Components from "../../components/react-components"; import ReactSelect from "react-select"; import "../../../../assets/js/plugins/prettify"; import uuid from 'uuid'; diff --git a/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx b/app/addons/documents/index-results/tests/index-results.componentsSpec.js similarity index 99% rename from app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx rename to app/addons/documents/index-results/tests/index-results.componentsSpec.js index a32dc3297..9de02e7ab 100644 --- a/app/addons/documents/index-results/tests/index-results.componentsSpec.react.jsx +++ b/app/addons/documents/index-results/tests/index-results.componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../../core/api"; -import Views from "../index-results.components.react"; +import Views from "../index-results.components"; import IndexResultsActions from "../actions"; import Stores from "../stores"; import Documents from "../../resources"; diff --git a/app/addons/documents/layouts.js b/app/addons/documents/layouts.js index 442b78250..f5af05a1e 100644 --- a/app/addons/documents/layouts.js +++ b/app/addons/documents/layouts.js @@ -11,16 +11,16 @@ // the License. import React from 'react'; -import IndexResultsComponents from './index-results/index-results.components.react'; -import ReactPagination from './pagination/pagination.react'; -import ReactHeader from './header/header.react'; -import {NotificationCenterButton} from '../fauxton/notifications/notifications.react'; +import IndexResultsComponents from './index-results/index-results.components'; +import ReactPagination from './pagination/pagination'; +import ReactHeader from './header/header'; +import {NotificationCenterButton} from '../fauxton/notifications/notifications'; import {ApiBarWrapper} from '../components/layouts'; -import SidebarComponents from "./sidebar/sidebar.react"; +import SidebarComponents from "./sidebar/sidebar"; import HeaderDocsLeft from './components/header-docs-left'; -import Changes from './changes/components.react'; -import IndexEditorComponents from "./index-editor/components.react"; -import DesignDocInfoComponents from './designdocinfo/components.react'; +import Changes from './changes/components'; +import IndexEditorComponents from "./index-editor/components"; +import DesignDocInfoComponents from './designdocinfo/components'; import RightAllDocsHeader from './components/header-docs-right'; export const TabsSidebarHeader = ({ diff --git a/app/addons/documents/mango/mango.components.react.jsx b/app/addons/documents/mango/mango.components.js similarity index 99% rename from app/addons/documents/mango/mango.components.react.jsx rename to app/addons/documents/mango/mango.components.js index d84c6f13d..00fdb93b9 100644 --- a/app/addons/documents/mango/mango.components.react.jsx +++ b/app/addons/documents/mango/mango.components.js @@ -15,7 +15,7 @@ import FauxtonAPI from "../../../core/api"; import React from "react"; import Stores from "./mango.stores"; import Actions from "./mango.actions"; -import ReactComponents from "../../components/react-components.react"; +import ReactComponents from "../../components/react-components"; import IndexResultActions from "../index-results/actions"; import MangoHelper from "./mango.helper"; import "../../../../assets/js/plugins/prettify"; diff --git a/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx b/app/addons/documents/mango/tests/mango.componentsSpec.js similarity index 99% rename from app/addons/documents/mango/tests/mango.componentsSpec.react.jsx rename to app/addons/documents/mango/tests/mango.componentsSpec.js index 9577ab3b1..f7274a01e 100644 --- a/app/addons/documents/mango/tests/mango.componentsSpec.react.jsx +++ b/app/addons/documents/mango/tests/mango.componentsSpec.js @@ -11,7 +11,7 @@ // the License. import FauxtonAPI from "../../../../core/api"; -import Views from "../mango.components.react"; +import Views from "../mango.components"; import MangoActions from "../mango.actions"; import ActionTypes from "../mango.actiontypes"; import Resources from "../../resources"; diff --git a/app/addons/documents/mangolayout.js b/app/addons/documents/mangolayout.js index 09c226db5..df8c99d2b 100644 --- a/app/addons/documents/mangolayout.js +++ b/app/addons/documents/mangolayout.js @@ -12,13 +12,13 @@ import React from 'react'; import app from "../../app"; -import ReactPagination from "./pagination/pagination.react"; -import ReactHeader from "./header/header.react"; +import ReactPagination from "./pagination/pagination"; +import ReactHeader from "./header/header"; import {Breadcrumbs} from '../components/header-breadcrumbs'; -import {NotificationCenterButton} from '../fauxton/notifications/notifications.react'; +import {NotificationCenterButton} from '../fauxton/notifications/notifications'; import {ApiBarWrapper} from '../components/layouts'; -import MangoComponents from "./mango/mango.components.react"; -import IndexResultsComponents from "./index-results/index-results.components.react"; +import MangoComponents from "./mango/mango.components"; +import IndexResultsComponents from "./index-results/index-results.components"; export const RightHeader = ({showIncludeAllDocs, docURL, endpoint}) => { diff --git a/app/addons/documents/pagination/pagination.react.jsx b/app/addons/documents/pagination/pagination.js similarity index 100% rename from app/addons/documents/pagination/pagination.react.jsx rename to app/addons/documents/pagination/pagination.js diff --git a/app/addons/documents/pagination/tests/pagination.componentSpec.react.jsx b/app/addons/documents/pagination/tests/pagination.componentSpec.js similarity index 98% rename from app/addons/documents/pagination/tests/pagination.componentSpec.react.jsx rename to app/addons/documents/pagination/tests/pagination.componentSpec.js index 6ae651184..e807bdec4 100644 --- a/app/addons/documents/pagination/tests/pagination.componentSpec.react.jsx +++ b/app/addons/documents/pagination/tests/pagination.componentSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../../core/api"; -import Views from "../pagination.react"; +import Views from "../pagination"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/documents/queryoptions/queryoptions.react.jsx b/app/addons/documents/queryoptions/queryoptions.js similarity index 99% rename from app/addons/documents/queryoptions/queryoptions.react.jsx rename to app/addons/documents/queryoptions/queryoptions.js index a7c157d7d..80fa0f50d 100644 --- a/app/addons/documents/queryoptions/queryoptions.react.jsx +++ b/app/addons/documents/queryoptions/queryoptions.js @@ -15,7 +15,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import QueryOptionsStores from './stores'; import Actions from './actions'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; const { connectToStores, TrayWrapper, ToggleHeaderButton, TrayContents } = Components; diff --git a/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx b/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.js similarity index 99% rename from app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx rename to app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.js index e0e8b3bb0..afcc8518c 100644 --- a/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.react.jsx +++ b/app/addons/documents/queryoptions/tests/queryoptions.componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../../core/api"; -import Views from "../queryoptions.react"; +import Views from "../queryoptions"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/documents/rev-browser/rev-browser.components.react.jsx b/app/addons/documents/rev-browser/rev-browser.components.js similarity index 99% rename from app/addons/documents/rev-browser/rev-browser.components.react.jsx rename to app/addons/documents/rev-browser/rev-browser.components.js index 98ff60fc0..38bea35ec 100644 --- a/app/addons/documents/rev-browser/rev-browser.components.react.jsx +++ b/app/addons/documents/rev-browser/rev-browser.components.js @@ -15,7 +15,7 @@ import React from "react"; import ReactDOM from "react-dom"; import RevActions from "./rev-browser.actions"; import RevStores from "./rev-browser.stores"; -import ReactComponents from "../../components/react-components.react"; +import ReactComponents from "../../components/react-components"; import { ButtonGroup, Button, Modal } from "react-bootstrap"; import ReactSelect from "react-select"; import jdp from "jsondiffpatch"; diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js index 01d9df815..aa3ebd3ff 100644 --- a/app/addons/documents/routes-doc-editor.js +++ b/app/addons/documents/routes-doc-editor.js @@ -15,9 +15,9 @@ import FauxtonAPI from "../../core/api"; import Documents from "./resources"; import Databases from "../databases/base"; import Actions from "./doc-editor/actions"; -import ReactComponents from "./doc-editor/components.react"; +import ReactComponents from "./doc-editor/components"; import RevBrowserActions from "./rev-browser/rev-browser.actions"; -import RevBrowserComponents from "./rev-browser/rev-browser.components.react"; +import RevBrowserComponents from "./rev-browser/rev-browser.components"; import {DocEditorLayout} from '../components/layouts'; diff --git a/app/addons/documents/sidebar/actions.js b/app/addons/documents/sidebar/actions.js index 6c4ccfaf4..168305d11 100644 --- a/app/addons/documents/sidebar/actions.js +++ b/app/addons/documents/sidebar/actions.js @@ -12,7 +12,7 @@ import FauxtonAPI from "../../../core/api"; import ActionTypes from "./actiontypes"; -import Stores from "./stores.react"; +import Stores from "./stores"; var store = Stores.sidebarStore; function newOptions (options) { diff --git a/app/addons/documents/sidebar/sidebar.react.jsx b/app/addons/documents/sidebar/sidebar.js similarity index 99% rename from app/addons/documents/sidebar/sidebar.react.jsx rename to app/addons/documents/sidebar/sidebar.js index c2d2ec1d8..9898fa152 100644 --- a/app/addons/documents/sidebar/sidebar.react.jsx +++ b/app/addons/documents/sidebar/sidebar.js @@ -14,14 +14,14 @@ import app from "../../../app"; import FauxtonAPI from "../../../core/api"; import React from "react"; import ReactDOM from "react-dom"; -import Stores from "./stores.react"; +import Stores from "./stores"; import Actions from "./actions"; -import Components from "../../components/react-components.react"; +import Components from "../../components/react-components"; import ComponentsStore from "../../components/stores"; import ComponentsActions from "../../components/actions"; import IndexEditorActions from "../index-editor/actions"; -import IndexEditorComponents from "../index-editor/components.react"; -import GeneralComponents from "../../fauxton/components.react"; +import IndexEditorComponents from "../index-editor/components"; +import GeneralComponents from "../../fauxton/components"; import DocumentHelper from "../../documents/helpers"; import { OverlayTrigger, Popover, Modal } from "react-bootstrap"; import "../../../../assets/js/plugins/prettify"; diff --git a/app/addons/documents/sidebar/stores.react.jsx b/app/addons/documents/sidebar/stores.js similarity index 100% rename from app/addons/documents/sidebar/stores.react.jsx rename to app/addons/documents/sidebar/stores.js diff --git a/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx b/app/addons/documents/sidebar/tests/sidebar.componentsSpec.js similarity index 98% rename from app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx rename to app/addons/documents/sidebar/tests/sidebar.componentsSpec.js index 68f6ade90..fea704145 100644 --- a/app/addons/documents/sidebar/tests/sidebar.componentsSpec.react.jsx +++ b/app/addons/documents/sidebar/tests/sidebar.componentsSpec.js @@ -12,7 +12,7 @@ import React from "react"; import ReactDOM from "react-dom"; import utils from "../../../../../test/mocha/testUtils"; -import Components from "../sidebar.react"; +import Components from "../sidebar"; import TestUtils from "react-addons-test-utils"; var assert = utils.assert; var DesignDoc = Components.DesignDoc; diff --git a/app/addons/documents/sidebar/tests/sidebar.storesSpec.js b/app/addons/documents/sidebar/tests/sidebar.storesSpec.js index e55eadeec..f4323a30f 100644 --- a/app/addons/documents/sidebar/tests/sidebar.storesSpec.js +++ b/app/addons/documents/sidebar/tests/sidebar.storesSpec.js @@ -11,7 +11,7 @@ // the License. import FauxtonAPI from "../../../../core/api"; -import Stores from "../stores.react"; +import Stores from "../stores"; import testUtils from "../../../../../test/mocha/testUtils"; var assert = testUtils.assert; var dispatchToken; diff --git a/app/addons/fauxton/appwrapper.js b/app/addons/fauxton/appwrapper.js index 573521baf..ab3ddd4ed 100644 --- a/app/addons/fauxton/appwrapper.js +++ b/app/addons/fauxton/appwrapper.js @@ -11,7 +11,7 @@ // the License. import React from 'react'; -import {NotificationController, PermanentNotification} from "./notifications/notifications.react"; +import {NotificationController, PermanentNotification} from "./notifications/notifications"; import NavBar from './navigation/container/NavBar'; import NavbarActions from './navigation/actions'; import Stores from './navigation/stores'; diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.js similarity index 100% rename from app/addons/fauxton/components.react.jsx rename to app/addons/fauxton/components.js diff --git a/app/addons/fauxton/notifications/__tests__/permanentNotification.test.js b/app/addons/fauxton/notifications/__tests__/permanentNotification.test.js index fb13425b0..f22dbc88a 100644 --- a/app/addons/fauxton/notifications/__tests__/permanentNotification.test.js +++ b/app/addons/fauxton/notifications/__tests__/permanentNotification.test.js @@ -9,7 +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 { PermanentNotification } from "../notifications.react"; +import { PermanentNotification } from "../notifications"; import Stores from "../stores"; import FauxtonAPI from "../../../../core/api"; import ActionTypes from "../actiontypes"; diff --git a/app/addons/fauxton/notifications/notifications.react.jsx b/app/addons/fauxton/notifications/notifications.js similarity index 99% rename from app/addons/fauxton/notifications/notifications.react.jsx rename to app/addons/fauxton/notifications/notifications.js index 0f7fce5cd..ceccd9bd2 100644 --- a/app/addons/fauxton/notifications/notifications.react.jsx +++ b/app/addons/fauxton/notifications/notifications.js @@ -14,7 +14,7 @@ import React from "react"; import ReactDOM from "react-dom"; import Actions from "./actions"; import Stores from "./stores"; -import Components from "../../components/react-components.react"; +import Components from "../../components/react-components"; import VelocityReact from "velocity-react"; import "velocity-animate/velocity"; import "velocity-animate/velocity.ui"; diff --git a/app/addons/fauxton/notifications/tests/actionsSpec.js b/app/addons/fauxton/notifications/tests/actionsSpec.js index 3f9540c99..4b8ff5693 100644 --- a/app/addons/fauxton/notifications/tests/actionsSpec.js +++ b/app/addons/fauxton/notifications/tests/actionsSpec.js @@ -9,7 +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 Views from "../notifications.react"; +import Views from "../notifications"; import Stores from "../stores"; import Actions from "../actions"; import utils from "../../../../../test/mocha/testUtils"; diff --git a/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx b/app/addons/fauxton/notifications/tests/componentsSpec.js similarity index 99% rename from app/addons/fauxton/notifications/tests/componentsSpec.react.jsx rename to app/addons/fauxton/notifications/tests/componentsSpec.js index 9db2a925f..8e97d7779 100644 --- a/app/addons/fauxton/notifications/tests/componentsSpec.react.jsx +++ b/app/addons/fauxton/notifications/tests/componentsSpec.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import FauxtonAPI from "../../../../core/api"; -import Views from "../notifications.react"; +import Views from "../notifications"; import Stores from "../stores"; import utils from "../../../../../test/mocha/testUtils"; import React from "react"; diff --git a/app/addons/fauxton/tests/componentsSpec.react.jsx b/app/addons/fauxton/tests/componentsSpec.js similarity index 99% rename from app/addons/fauxton/tests/componentsSpec.react.jsx rename to app/addons/fauxton/tests/componentsSpec.js index 6f23e388a..5cebdeec5 100644 --- a/app/addons/fauxton/tests/componentsSpec.react.jsx +++ b/app/addons/fauxton/tests/componentsSpec.js @@ -9,7 +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 Views from "../components.react"; +import Views from "../components"; import utils from "../../../../test/mocha/testUtils"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/app/addons/permissions/layout.js b/app/addons/permissions/layout.js index ed0c3a96c..dc8558d22 100644 --- a/app/addons/permissions/layout.js +++ b/app/addons/permissions/layout.js @@ -13,7 +13,7 @@ import React from 'react'; import {TabsSidebarHeader} from '../documents/layouts'; import PermissionsContainer from './container/PermissionsContainer'; -import SidebarComponents from "../documents/sidebar/sidebar.react"; +import SidebarComponents from "../documents/sidebar/sidebar"; export const PermissionsLayout = ({docURL, database, endpoint, dbName, dropDownLinks}) => { return ( diff --git a/app/addons/replication/components/modals.js b/app/addons/replication/components/modals.js index abde4906a..f978c7934 100644 --- a/app/addons/replication/components/modals.js +++ b/app/addons/replication/components/modals.js @@ -11,7 +11,7 @@ // the License. import React from 'react'; import {Modal} from 'react-bootstrap'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; const {ConfirmButton} = Components; diff --git a/app/addons/replication/components/newreplication.js b/app/addons/replication/components/newreplication.js index 7dc254f1e..d09dfd0da 100644 --- a/app/addons/replication/components/newreplication.js +++ b/app/addons/replication/components/newreplication.js @@ -17,7 +17,7 @@ import {ReplicationSource} from './source'; import {ReplicationTarget} from './target'; import {ReplicationOptions} from './options'; import {ReplicationSubmit} from './submit'; -import AuthComponents from '../../auth/components.react'; +import AuthComponents from '../../auth/components'; import Constants from '../constants'; import {ConflictModal} from './modals'; import {isEmpty} from 'lodash'; diff --git a/app/addons/replication/components/options.js b/app/addons/replication/components/options.js index 2eaabcbb2..138bf0076 100644 --- a/app/addons/replication/components/options.js +++ b/app/addons/replication/components/options.js @@ -11,7 +11,7 @@ // the License. import React from 'react'; import Constants from '../constants'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; const { StyledSelect } = Components; diff --git a/app/addons/replication/components/source.js b/app/addons/replication/components/source.js index 24d0d3c74..0ac9f3392 100644 --- a/app/addons/replication/components/source.js +++ b/app/addons/replication/components/source.js @@ -11,7 +11,7 @@ // the License. import React from 'react'; import Constants from '../constants'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; import ReactSelect from 'react-select'; import RemoteExample from './remoteexample'; diff --git a/app/addons/replication/components/submit.js b/app/addons/replication/components/submit.js index f82fd9254..e8031fead 100644 --- a/app/addons/replication/components/submit.js +++ b/app/addons/replication/components/submit.js @@ -10,7 +10,7 @@ // License for the specific language governing permissions and limitations under // the License. import React from 'react'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; const {ConfirmButton} = Components; diff --git a/app/addons/replication/components/target.js b/app/addons/replication/components/target.js index c605ac2d0..7d2004f51 100644 --- a/app/addons/replication/components/target.js +++ b/app/addons/replication/components/target.js @@ -11,7 +11,7 @@ // the License. import React from 'react'; import Constants from '../constants'; -import Components from '../../components/react-components.react'; +import Components from '../../components/react-components'; import ReactSelect from 'react-select'; import RemoteExample from './remoteexample'; diff --git a/app/addons/replication/controller.js b/app/addons/replication/controller.js index 22c0b35b2..62d95f2de 100644 --- a/app/addons/replication/controller.js +++ b/app/addons/replication/controller.js @@ -13,7 +13,7 @@ import React from 'react'; import Stores from './stores'; import Actions from './actions'; import AuthActions from '../auth/actions'; -import Components from '../components/react-components.react'; +import Components from '../components/react-components'; import NewReplication from './components/newreplication'; import Activity from './components/activity'; import {checkReplicationDocID} from './api'; diff --git a/app/addons/setup/route.js b/app/addons/setup/route.js index 1549bdc1f..e2b487eca 100644 --- a/app/addons/setup/route.js +++ b/app/addons/setup/route.js @@ -14,7 +14,7 @@ import React from 'react'; import app from "../../app"; import FauxtonAPI from "../../core/api"; import Setup from "./resources"; -import SetupComponents from "./setup.react"; +import SetupComponents from "./setup"; import SetupActions from "./setup.actions"; import ClusterActions from "../cluster/cluster.actions"; import {OnePaneSimpleLayout} from '../components/layouts'; diff --git a/app/addons/setup/setup.react.jsx b/app/addons/setup/setup.js similarity index 99% rename from app/addons/setup/setup.react.jsx rename to app/addons/setup/setup.js index 7bc3219de..7c4a7b2dd 100644 --- a/app/addons/setup/setup.react.jsx +++ b/app/addons/setup/setup.js @@ -13,7 +13,7 @@ import app from "../../app"; import FauxtonAPI from "../../core/api"; import React from "react"; -import ReactComponents from "../components/react-components.react"; +import ReactComponents from "../components/react-components"; import SetupActions from "./setup.actions"; import SetupStores from "./setup.stores"; diff --git a/app/addons/setup/tests/setupComponentsSpec.react.jsx b/app/addons/setup/tests/setupComponentsSpec.js similarity index 100% rename from app/addons/setup/tests/setupComponentsSpec.react.jsx rename to app/addons/setup/tests/setupComponentsSpec.js diff --git a/app/addons/verifyinstall/components.react.jsx b/app/addons/verifyinstall/components.js similarity index 100% rename from app/addons/verifyinstall/components.react.jsx rename to app/addons/verifyinstall/components.js diff --git a/app/addons/verifyinstall/routes.js b/app/addons/verifyinstall/routes.js index 8c8c7030b..12c675fed 100644 --- a/app/addons/verifyinstall/routes.js +++ b/app/addons/verifyinstall/routes.js @@ -14,7 +14,7 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; import VerifyInstall from "./resources"; import Actions from "./actions"; -import Components from "./components.react"; +import Components from "./components"; import {OnePaneSimpleLayout} from '../components/layouts'; const VerifyRouteObject = FauxtonAPI.RouteObject.extend({ diff --git a/app/addons/verifyinstall/tests/componentsSpec.react.jsx b/app/addons/verifyinstall/tests/componentsSpec.js similarity index 98% rename from app/addons/verifyinstall/tests/componentsSpec.react.jsx rename to app/addons/verifyinstall/tests/componentsSpec.js index b38e7cc9c..d1643f525 100644 --- a/app/addons/verifyinstall/tests/componentsSpec.react.jsx +++ b/app/addons/verifyinstall/tests/componentsSpec.js @@ -15,7 +15,7 @@ import React from "react"; import ReactDOM from "react-dom"; import testUtils from "../../../../test/mocha/testUtils"; import Constants from "../constants"; -import Components from "../components.react"; +import Components from "../components"; import TestUtils from "react-addons-test-utils"; import sinon from "sinon"; FauxtonAPI.router = new FauxtonAPI.Router([]); diff --git a/code-layout.md b/code-layout.md index 9dcefb877..e7b6d98c8 100644 --- a/code-layout.md +++ b/code-layout.md @@ -61,7 +61,7 @@ A good place to get started is to read through a couple of the existing addons. the Fauxton interface so you can see exactly where it appears and what it does. Each module must have a `base.js` file, this is read and compiled when Fauxton is deployed. A `resources.js` file -is usually used for your Backbone.Models and Backbone.Collections, `components.react.jsx` for your React components. +is usually used for your Backbone.Models and Backbone.Collections, `components.jsx` for your React components. The `routes.js` is used to register one or more URL paths for your addon along with what layout, data, breadcrumbs and API point is required for the view. diff --git a/test/dev.js b/test/dev.js index 8fdf4c519..6abd785f8 100644 --- a/test/dev.js +++ b/test/dev.js @@ -13,7 +13,7 @@ // This will search for files ending in .test.js and require them // so that they are added to the webpack bundle -var context = require.context('../app/addons/documents/index-results/tests', true, /index-results.stores[Ss]pec/); +var context = require.context('../app/addons/warehouse', true, /[Ss]pec/); console.log('Testing files', context.keys()); context.keys().forEach(context); module.exports = context; From 3c74319ad647f6cbdbb2649fb238cc28711ab204 Mon Sep 17 00:00:00 2001 From: Garren Smith Date: Wed, 19 Apr 2017 15:10:12 +0200 Subject: [PATCH 2/2] review fixes --- app/addons/config/components.js | 4 +- app/addons/config/components.react.jsx | 432 --------------------------------- code-layout.md | 10 +- test/dev.js | 2 +- 4 files changed, 3 insertions(+), 445 deletions(-) delete mode 100644 app/addons/config/components.react.jsx diff --git a/app/addons/config/components.js b/app/addons/config/components.js index ac1b30e0d..b6dcdaed3 100644 --- a/app/addons/config/components.js +++ b/app/addons/config/components.js @@ -41,9 +41,7 @@ var ConfigTableController = React.createClass({ }, onChange () { - if (this.isMounted()) { - this.setState(this.getStoreState()); - } + this.setState(this.getStoreState()); }, saveOption (option) { diff --git a/app/addons/config/components.react.jsx b/app/addons/config/components.react.jsx deleted file mode 100644 index b6dcdaed3..000000000 --- a/app/addons/config/components.react.jsx +++ /dev/null @@ -1,432 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -import React from "react"; -import ReactDOM from "react-dom"; -import Stores from "./stores"; -import Actions from "./actions"; -import {Overlay, Button, Popover} from "react-bootstrap"; -import Components from "../components/react-components"; -import FauxtonComponents from "../fauxton/components"; - -const configStore = Stores.configStore; - -var ConfigTableController = React.createClass({ - getStoreState () { - return { - options: configStore.getOptions(), - loading: configStore.isLoading() - }; - }, - - getInitialState () { - return this.getStoreState(); - }, - - componentDidMount () { - configStore.on('change', this.onChange, this); - }, - - componentWillUnmount () { - configStore.off('change', this.onChange); - }, - - onChange () { - this.setState(this.getStoreState()); - }, - - saveOption (option) { - Actions.saveOption(this.props.node, option); - }, - - deleteOption (option) { - Actions.deleteOption(this.props.node, option); - }, - - editOption (option) { - Actions.editOption(option); - }, - - cancelEdit () { - Actions.cancelEdit(); - }, - - render () { - if (this.state.loading) { - return ( -
    - -
    - ); - } else { - return ( - - ); - } - } -}); - -var ConfigTable = React.createClass({ - createOptions () { - return _.map(this.props.options, (option) => ( - - )); - }, - - render () { - var options = this.createOptions(); - - return ( - - - - - - - - - - - {options} - -
    SectionOptionValue
    - ); - } -}); - -var ConfigOption = React.createClass({ - onSave (value) { - var option = this.props.option; - option.value = value; - this.props.onSave(option); - }, - - onDelete () { - this.props.onDelete(this.props.option); - }, - - onEdit () { - this.props.onEdit(this.props.option); - }, - - render () { - return ( - - {this.props.option.header && this.props.option.sectionName} - {this.props.option.optionName} - - - - ); - } -}); - -var ConfigOptionValue = React.createClass({ - getInitialState () { - return { - value: this.props.value, - editing: this.props.editing, - saving: this.props.saving - }; - }, - - getDefaultProps () { - return { - value: '', - editing: false, - saving: false, - onSave: () => null, - onEdit: () => null, - onCancelEdit: () => null - }; - }, - - componentWillReceiveProps (nextProps) { - if (this.props.value !== nextProps.value) { - this.setState({ saving: false }); - } - }, - - onChange (event) { - this.setState({ value: event.target.value }); - }, - - onSave () { - if (this.state.value !== this.props.value) { - this.setState({ saving: true }); - this.props.onSave(this.state.value); - } else { - this.props.onCancelEdit(); - } - }, - - getButtons () { - if (this.state.saving) { - return null; - } else { - return ( - - - - ReactDOM.findDOMNode(this.refs.target)}> - {this.getPopover()} - - - ); - } -}); - -const TabItem = ({active, link, title}) => { - return ( -
  • - - {title} - -
  • - ); -}; - -TabItem.propTypes = { - active: React.PropTypes.bool.isRequired, - link: React.PropTypes.string.isRequired, - icon: React.PropTypes.string, - title: React.PropTypes.string.isRequired -}; - -const Tabs = ({sidebarItems, selectedTab}) => { - const tabItems = sidebarItems.map(item => { - return ; - }); - return ( - - ); -}; - -export default { - Tabs, - ConfigTableController, - ConfigTable, - ConfigOption, - ConfigOptionValue, - ConfigOptionTrash, - AddOptionController, - AddOptionButton, -}; diff --git a/code-layout.md b/code-layout.md index e7b6d98c8..7bb038a54 100644 --- a/code-layout.md +++ b/code-layout.md @@ -43,14 +43,6 @@ With Flux, you can just publish the single event, then each store could listen f internally, then notify any components that was listening: and they would then have the choice to rerender or not, based on what changed. This is basic "pub/sub": allowing you to keep code loosely coupled, but still communicate. -### JSX - -You'll noticed that some of our files have `.jsx` extensions. JSX is a javascript pre-parser, allowing us embed -markup directly into our javascript, linking template and code. - -Read more about [JSX here](https://facebook.github.io/react/docs/jsx-in-depth.html). - - ## Addons Each bit of functionality is its own separate module or addon. Addons are located in their own `app/addons/myaddon-name` @@ -61,7 +53,7 @@ A good place to get started is to read through a couple of the existing addons. the Fauxton interface so you can see exactly where it appears and what it does. Each module must have a `base.js` file, this is read and compiled when Fauxton is deployed. A `resources.js` file -is usually used for your Backbone.Models and Backbone.Collections, `components.jsx` for your React components. +is usually used for your Backbone.Models and Backbone.Collections, `components.js` for your React components. The `routes.js` is used to register one or more URL paths for your addon along with what layout, data, breadcrumbs and API point is required for the view. diff --git a/test/dev.js b/test/dev.js index 6abd785f8..c897a856c 100644 --- a/test/dev.js +++ b/test/dev.js @@ -13,7 +13,7 @@ // This will search for files ending in .test.js and require them // so that they are added to the webpack bundle -var context = require.context('../app/addons/warehouse', true, /[Ss]pec/); +var context = require.context('../app/addons/documents/index-results/testse', true, /[Ss]pec/); console.log('Testing files', context.keys()); context.keys().forEach(context); module.exports = context;