couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [04/27] fauxton commit: updated refs/heads/master to 0ca35da
Date Tue, 31 May 2016 07:58:32 GMT
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index 42a543f..cef6629 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -10,338 +10,334 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  '../fauxton/components',
-  './resources'
-],
-function (app, FauxtonAPI, Components, Replication) {
-  var View = {},
-    Events = {},
-    pollingInfo = {
-      rate: 5,
-      intervalId: null
-    };
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import Components from "../fauxton/components";
+import Replication from "./resources";
+var View = {},
+  Events = {},
+  pollingInfo = {
+    rate: 5,
+    intervalId: null
+  };
+
+_.extend(Events, Backbone.Events);
+
+// NOTES: http://wiki.apache.org/couchdb/Replication
+
+// Replication form view is huge
+// -----------------------------------
+// afterRender: autocomplete on the target input field
+// beforeRender:  add the status table
+// disableFields:  disable non active fields on submit
+// enableFields:  enable field when radio btns are clicked
+// establish:  get the DB list for autocomplete
+// formValidation:  make sure fields aren't empty
+// showProgress:  make a call to active_tasks model and show only replication types.  Poll every 5 seconds. (make this it's own view)
+// startReplication:  saves to the model, starts replication
+// submit:  form submit handler
+// swapFields:  change to and from target
+// toggleAdvancedOptions:  toggle advanced
+
+View.ReplicationFormForAdmins = FauxtonAPI.View.extend({
+  template: 'addons/replication/templates/form',
+  events:  {
+    'submit #replication': 'validate',
+    'click .btn-group .btn': 'showFields',
+    'click .swap': 'swapFields',
+    'click .options': 'toggleAdvancedOptions'
+  },
+
+  initialize: function (options) {
+    this.status = options.status;
+    this.selectedDB = options.selectedDB;
+    this.newRepModel = new Replication.Replicate({});
+  },
+
+  afterRender: function () {
+    this.dbSearchTypeahead = new Components.DbSearchTypeahead({
+      dbLimit: 30,
+      el: 'input#to_name'
+    });
+
+    this.dbSearchTypeahead.render();
+  },
+
+  beforeRender: function () {
+    this.insertView('#replicationStatus', new View.ReplicationListForAdmins({
+      collection: this.status
+    }));
+  },
+
+  cleanup: function () {
+    clearInterval(pollingInfo.intervalId);
+  },
+
+  enableFields: function () {
+    this.$el.find('input', 'select').attr('disabled', false);
+  },
+
+  disableFields: function () {
+    this.$el.find('input:hidden', 'select:hidden').attr('disabled', true);
+  },
+
+  showFields: function (e) {
+    var $currentTarget = this.$(e.currentTarget),
+    targetVal = $currentTarget.val();
+
+    if (targetVal === 'local') {
+      $currentTarget.parents('.form_set').addClass('local');
+      return;
+    }
 
-  _.extend(Events, Backbone.Events);
-
-  // NOTES: http://wiki.apache.org/couchdb/Replication
-
-  // Replication form view is huge
-  // -----------------------------------
-  // afterRender: autocomplete on the target input field
-  // beforeRender:  add the status table
-  // disableFields:  disable non active fields on submit
-  // enableFields:  enable field when radio btns are clicked
-  // establish:  get the DB list for autocomplete
-  // formValidation:  make sure fields aren't empty
-  // showProgress:  make a call to active_tasks model and show only replication types.  Poll every 5 seconds. (make this it's own view)
-  // startReplication:  saves to the model, starts replication
-  // submit:  form submit handler
-  // swapFields:  change to and from target
-  // toggleAdvancedOptions:  toggle advanced
-
-  View.ReplicationFormForAdmins = FauxtonAPI.View.extend({
-    template: 'addons/replication/templates/form',
-    events:  {
-      'submit #replication': 'validate',
-      'click .btn-group .btn': 'showFields',
-      'click .swap': 'swapFields',
-      'click .options': 'toggleAdvancedOptions'
-    },
+    $currentTarget.parents('.form_set').removeClass('local');
+  },
 
-    initialize: function (options) {
-      this.status = options.status;
-      this.selectedDB = options.selectedDB;
-      this.newRepModel = new Replication.Replicate({});
-    },
+  establish: function () {
+    return [this.collection.fetch(), this.status.fetch()];
+  },
 
-    afterRender: function () {
-      this.dbSearchTypeahead = new Components.DbSearchTypeahead({
-        dbLimit: 30,
-        el: 'input#to_name'
+  validate: function (e) {
+    e.preventDefault();
+    if (this.formValidation()) {
+      FauxtonAPI.addNotification({
+        msg: 'Please enter every field.',
+        type: 'error',
+        clear: true
       });
+      return;
 
-      this.dbSearchTypeahead.render();
-    },
-
-    beforeRender: function () {
-      this.insertView('#replicationStatus', new View.ReplicationListForAdmins({
-        collection: this.status
-      }));
-    },
-
-    cleanup: function () {
-      clearInterval(pollingInfo.intervalId);
-    },
-
-    enableFields: function () {
-      this.$el.find('input', 'select').attr('disabled', false);
-    },
-
-    disableFields: function () {
-      this.$el.find('input:hidden', 'select:hidden').attr('disabled', true);
-    },
-
-    showFields: function (e) {
-      var $currentTarget = this.$(e.currentTarget),
-      targetVal = $currentTarget.val();
-
-      if (targetVal === 'local') {
-        $currentTarget.parents('.form_set').addClass('local');
-        return;
-      }
-
-      $currentTarget.parents('.form_set').removeClass('local');
-    },
-
-    establish: function () {
-      return [this.collection.fetch(), this.status.fetch()];
-    },
-
-    validate: function (e) {
-      e.preventDefault();
-      if (this.formValidation()) {
+    } else if (this.$('input#to_name').is(':visible') && !this.$('input[name=create_target]').is(':checked')) {
+      var alreadyExists = this.collection.where({
+        "name": this.$('input#to_name').val()
+      });
+      if (alreadyExists.length === 0) {
         FauxtonAPI.addNotification({
-          msg: 'Please enter every field.',
+          msg: 'This database doesn\'t exist. Check create target if you want to create it.',
           type: 'error',
           clear: true
         });
         return;
-
-      } else if (this.$('input#to_name').is(':visible') && !this.$('input[name=create_target]').is(':checked')) {
-        var alreadyExists = this.collection.where({
-          "name": this.$('input#to_name').val()
-        });
-        if (alreadyExists.length === 0) {
-          FauxtonAPI.addNotification({
-            msg: 'This database doesn\'t exist. Check create target if you want to create it.',
-            type: 'error',
-            clear: true
-          });
-          return;
-        }
       }
-
-      this.submit(e);
-    },
-
-    formValidation: function () {
-      var $remote = this.$el.find('input:visible'),
-          error = false;
-      _.each($remote, function (item) {
-        if (item.value === 'http://' || item.value === '') {
-          error = true;
-        }
-      });
-      return error;
-    },
-
-    serialize: function () {
-      return {
-        databases:  this.collection.toJSON(),
-        selectedDB: this.selectedDB
-      };
-    },
-
-    startReplication: function (json) {
-      var that = this;
-      this.newRepModel.save(json, {
-        success: function (resp) {
-          FauxtonAPI.addNotification({
-            msg: 'Replication from ' + resp.get('source') + ' to ' + resp.get('target') + ' has begun.',
-            type: 'success',
-            clear: true
-          });
-          that.updateButtonText(false);
-          Events.trigger('update:tasks');
-        },
-        error: function (model, xhr, options) {
-          var errorMessage = JSON.parse(xhr.responseText);
-          FauxtonAPI.addNotification({
-            msg: errorMessage.reason,
-            type: 'error',
-            clear: true
-          });
-          that.updateButtonText(false);
-        }
-      });
-      this.enableFields();
-    },
-
-    updateButtonText: function (wait) {
-      var $button = this.$('#replication button[type=submit]');
-      if (wait) {
-        $button.text('Starting replication...').attr('disabled', true);
-      } else {
-        $button.text('Replication').attr('disabled', false);
-      }
-    },
-
-    submit: function (e) {
-      this.disableFields();
-      var formJSON = {};
-      _.map(this.$(e.currentTarget).serializeArray(), function (formData) {
-        if (formData.value !== '') {
-          formJSON[formData.name] = (formData.value === "true" ? true : formData.value.replace(/\s/g, '').toLowerCase());
-        }
-      });
-
-      this.updateButtonText(true);
-      this.startReplication(formJSON);
-    },
-
-    swapFields: function (e) {
-      // WALL O' VARIABLES
-      var $fromSelect = this.$('#from_name'),
-          $toSelect = this.$('#to_name'),
-          $toInput = this.$('#to_url'),
-          $fromInput = this.$('#from_url'),
-          fromSelectVal = $fromSelect.val(),
-          fromInputVal = $fromInput.val(),
-          toSelectVal = $toSelect.val(),
-          toInputVal = $toInput.val();
-
-      $fromSelect.val(toSelectVal);
-      $toSelect.val(fromSelectVal);
-
-      $fromInput.val(toInputVal);
-      $toInput.val(fromInputVal);
-
-      // prevent other click handlers from running
-      return false;
     }
-  });
-
-  View.ReplicationForm = View.ReplicationFormForAdmins.extend({
-    template: 'addons/replication/templates/form',
-
-    events: {
-      'submit #replication': 'validate',
-      'click .btn-group .btn': 'showFields',
-      'click .swap': 'swapFields',
-      'click .options': 'toggleAdvancedOptions'
-    },
 
-    initialize: function (options) {
-      this.selectedDB = options.selectedDB;
-      this.newRepModel = new Replication.Replicate({});
-    },
+    this.submit(e);
+  },
 
-    beforeRender: function () {},
+  formValidation: function () {
+    var $remote = this.$el.find('input:visible'),
+        error = false;
+    _.each($remote, function (item) {
+      if (item.value === 'http://' || item.value === '') {
+        error = true;
+      }
+    });
+    return error;
+  },
+
+  serialize: function () {
+    return {
+      databases:  this.collection.toJSON(),
+      selectedDB: this.selectedDB
+    };
+  },
 
-    establish: function () {
-      return [this.collection.fetch()];
+  startReplication: function (json) {
+    var that = this;
+    this.newRepModel.save(json, {
+      success: function (resp) {
+        FauxtonAPI.addNotification({
+          msg: 'Replication from ' + resp.get('source') + ' to ' + resp.get('target') + ' has begun.',
+          type: 'success',
+          clear: true
+        });
+        that.updateButtonText(false);
+        Events.trigger('update:tasks');
+      },
+      error: function (model, xhr, options) {
+        var errorMessage = JSON.parse(xhr.responseText);
+        FauxtonAPI.addNotification({
+          msg: errorMessage.reason,
+          type: 'error',
+          clear: true
+        });
+        that.updateButtonText(false);
+      }
+    });
+    this.enableFields();
+  },
+
+  updateButtonText: function (wait) {
+    var $button = this.$('#replication button[type=submit]');
+    if (wait) {
+      $button.text('Starting replication...').attr('disabled', true);
+    } else {
+      $button.text('Replication').attr('disabled', false);
     }
-  });
-
-  View.ReplicationListForAdmins = FauxtonAPI.View.extend({
-    tagName: 'ul',
-
-    initialize: function () {
-      Events.bind('update:tasks', this.establish, this);
-      this.listenTo(this.collection, 'reset', this.render);
-      this.$el.prepend('<li class="header"><h4>Active Replication Tasks</h4></li>');
-    },
-
-    establish: function () {
-      return [this.collection.fetch({ reset: true })];
-    },
+  },
+
+  submit: function (e) {
+    this.disableFields();
+    var formJSON = {};
+    _.map(this.$(e.currentTarget).serializeArray(), function (formData) {
+      if (formData.value !== '') {
+        formJSON[formData.name] = (formData.value === "true" ? true : formData.value.replace(/\s/g, '').toLowerCase());
+      }
+    });
+
+    this.updateButtonText(true);
+    this.startReplication(formJSON);
+  },
+
+  swapFields: function (e) {
+    // WALL O' VARIABLES
+    var $fromSelect = this.$('#from_name'),
+        $toSelect = this.$('#to_name'),
+        $toInput = this.$('#to_url'),
+        $fromInput = this.$('#from_url'),
+        fromSelectVal = $fromSelect.val(),
+        fromInputVal = $fromInput.val(),
+        toSelectVal = $toSelect.val(),
+        toInputVal = $toInput.val();
+
+    $fromSelect.val(toSelectVal);
+    $toSelect.val(fromSelectVal);
+
+    $fromInput.val(toInputVal);
+    $toInput.val(fromInputVal);
+
+    // prevent other click handlers from running
+    return false;
+  }
+});
 
-    setPolling: function () {
-      var that = this;
-      this.cleanup();
-      pollingInfo.intervalId = setInterval(function () {
-        that.establish();
-      }, pollingInfo.rate * 1000);
-    },
+View.ReplicationForm = View.ReplicationFormForAdmins.extend({
+  template: 'addons/replication/templates/form',
 
-    cleanup: function () {
-      Events.unbind('update:tasks');
-      clearInterval(pollingInfo.intervalId);
-    },
+  events: {
+    'submit #replication': 'validate',
+    'click .btn-group .btn': 'showFields',
+    'click .swap': 'swapFields',
+    'click .options': 'toggleAdvancedOptions'
+  },
 
-    beforeRender: function () {
-      this.collection.forEach(function (item) {
-        this.insertView(new View.replicationItem({
-          model: item
-        }));
-      }, this);
-    },
+  initialize: function (options) {
+    this.selectedDB = options.selectedDB;
+    this.newRepModel = new Replication.Replicate({});
+  },
 
-    showHeader: function () {
-      this.$el.parent()
-        .toggleClass('showHeader', this.collection.length > 0);
-    },
+  beforeRender: function () {},
 
-    afterRender: function () {
-      this.showHeader();
-      this.setPolling();
-    }
-  });
-
-  //make this a table row item.
-  View.replicationItem = FauxtonAPI.View.extend({
-    tagName: 'li',
-    className: 'row',
-    template: 'addons/replication/templates/progress',
-    events: {
-      'click .cancel': 'cancelReplication'
-    },
+  establish: function () {
+    return [this.collection.fetch()];
+  }
+});
 
-    initialize: function () {
-      this.newRepModel = new Replication.Replicate({});
-    },
+View.ReplicationListForAdmins = FauxtonAPI.View.extend({
+  tagName: 'ul',
+
+  initialize: function () {
+    Events.bind('update:tasks', this.establish, this);
+    this.listenTo(this.collection, 'reset', this.render);
+    this.$el.prepend('<li class="header"><h4>Active Replication Tasks</h4></li>');
+  },
+
+  establish: function () {
+    return [this.collection.fetch({ reset: true })];
+  },
+
+  setPolling: function () {
+    var that = this;
+    this.cleanup();
+    pollingInfo.intervalId = setInterval(function () {
+      that.establish();
+    }, pollingInfo.rate * 1000);
+  },
+
+  cleanup: function () {
+    Events.unbind('update:tasks');
+    clearInterval(pollingInfo.intervalId);
+  },
+
+  beforeRender: function () {
+    this.collection.forEach(function (item) {
+      this.insertView(new View.replicationItem({
+        model: item
+      }));
+    }, this);
+  },
+
+  showHeader: function () {
+    this.$el.parent()
+      .toggleClass('showHeader', this.collection.length > 0);
+  },
+
+  afterRender: function () {
+    this.showHeader();
+    this.setPolling();
+  }
+});
 
-    establish: function () {
-      return [this.model.fetch()];
+//make this a table row item.
+View.replicationItem = FauxtonAPI.View.extend({
+  tagName: 'li',
+  className: 'row',
+  template: 'addons/replication/templates/progress',
+  events: {
+    'click .cancel': 'cancelReplication'
+  },
+
+  initialize: function () {
+    this.newRepModel = new Replication.Replicate({});
+  },
+
+  establish: function () {
+    return [this.model.fetch()];
+  },
+
+  cancelReplication: function (e) {
+    // need to pass "cancel": true with source & target
+    var $currentTarget = this.$(e.currentTarget),
+        repID = $currentTarget.attr('data-rep-id');
+
+    this.newRepModel.save({
+      "replication_id": repID,
+      "cancel": true
     },
-
-    cancelReplication: function (e) {
-      // need to pass "cancel": true with source & target
-      var $currentTarget = this.$(e.currentTarget),
-          repID = $currentTarget.attr('data-rep-id');
-
-      this.newRepModel.save({
-        "replication_id": repID,
-        "cancel": true
+    {
+      success: function (model, xhr, options) {
+        FauxtonAPI.addNotification({
+          msg: 'Replication stopped.',
+          type: 'success',
+          clear: true
+        });
       },
-      {
-        success: function (model, xhr, options) {
-          FauxtonAPI.addNotification({
-            msg: 'Replication stopped.',
-            type: 'success',
-            clear: true
-          });
-        },
-        error: function (model, xhr, options) {
-          var errorMessage = JSON.parse(xhr.responseText);
-          FauxtonAPI.addNotification({
-            msg: errorMessage.reason,
-            type: 'error',
-            clear: true
-          });
-        }
-      });
-    },
-
-    afterRender: function () {
-      if (this.model.get('continuous')) {
-        this.$el.addClass('continuous');
+      error: function (model, xhr, options) {
+        var errorMessage = JSON.parse(xhr.responseText);
+        FauxtonAPI.addNotification({
+          msg: errorMessage.reason,
+          type: 'error',
+          clear: true
+        });
       }
-    },
+    });
+  },
 
-    serialize: function () {
-      return {
-        progress:  this.model.get('progress'),
-        target: this.model.get('target'),
-        source: this.model.get('source'),
-        continuous: this.model.get('continuous'),
-        repid: this.model.get('replication_id')
-      };
+  afterRender: function () {
+    if (this.model.get('continuous')) {
+      this.$el.addClass('continuous');
     }
-  });
-
-  return View;
+  },
+
+  serialize: function () {
+    return {
+      progress:  this.model.get('progress'),
+      target: this.model.get('target'),
+      source: this.model.get('source'),
+      continuous: this.model.get('continuous'),
+      repid: this.model.get('replication_id')
+    };
+  }
 });
+
+export default View;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/base.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/base.js b/app/addons/setup/base.js
index c1abf1b..1750885 100644
--- a/app/addons/setup/base.js
+++ b/app/addons/setup/base.js
@@ -10,21 +10,16 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  './route',
-  './assets/less/setup.less'
-],
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import Setup from "./route";
+import "./assets/less/setup.less";
+Setup.initialize = function () {
+  FauxtonAPI.addHeaderLink({
+    title: 'Setup',
+    href: "#setup",
+    icon: 'fonticon-wrench'
+  });
+};
 
-function (app, FauxtonAPI, Setup) {
-  Setup.initialize = function () {
-    FauxtonAPI.addHeaderLink({
-      title: 'Setup',
-      href: "#setup",
-      icon: 'fonticon-wrench'
-    });
-  };
-
-  return Setup;
-});
+export default Setup;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/resources.js b/app/addons/setup/resources.js
index 0073a0a..1963f04 100644
--- a/app/addons/setup/resources.js
+++ b/app/addons/setup/resources.js
@@ -10,47 +10,42 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api'
-],
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
 
-function (app, FauxtonAPI) {
+var Setup = FauxtonAPI.addon();
 
-  var Setup = FauxtonAPI.addon();
 
+Setup.Model = Backbone.Model.extend({
 
-  Setup.Model = Backbone.Model.extend({
+  documentation: app.host + '/_utils/docs',
 
-    documentation: app.host + '/_utils/docs',
-
-    url: function (context) {
-      if (context === "apiurl") {
-        return window.location.origin + "/_cluster_setup";
-      } else {
-        return '/_cluster_setup';
-      }
-    },
-
-    validate: function (attrs) {
-      if (!attrs.username) {
-        return 'Admin name is required';
-      }
+  url: function (context) {
+    if (context === "apiurl") {
+      return window.location.origin + "/_cluster_setup";
+    } else {
+      return '/_cluster_setup';
+    }
+  },
 
-      if (!attrs.password) {
-        return 'Admin password is required';
-      }
+  validate: function (attrs) {
+    if (!attrs.username) {
+      return 'Admin name is required';
+    }
 
-      if (attrs.bind_address && attrs.bind_address === '127.0.0.1') {
-        return 'Bind address can not be 127.0.0.1';
-      }
+    if (!attrs.password) {
+      return 'Admin password is required';
+    }
 
-      if (attrs.port && _.isNaN(+attrs.port)) {
-        return 'Bind port must be a number';
-      }
+    if (attrs.bind_address && attrs.bind_address === '127.0.0.1') {
+      return 'Bind address can not be 127.0.0.1';
     }
 
-  });
+    if (attrs.port && _.isNaN(+attrs.port)) {
+      return 'Bind port must be a number';
+    }
+  }
 
-  return Setup;
 });
+
+export default Setup;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/route.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/route.js b/app/addons/setup/route.js
index ddff10d..49d8a8e 100644
--- a/app/addons/setup/route.js
+++ b/app/addons/setup/route.js
@@ -10,62 +10,58 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  './resources',
-  './setup.react',
-  './setup.actions',
-  '../cluster/cluster.actions'
-],
-function (app, FauxtonAPI, Setup, SetupComponents, SetupActions, ClusterActions) {
-  var RouteObject = FauxtonAPI.RouteObject.extend({
-    layout: 'one_pane',
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import Setup from "./resources";
+import SetupComponents from "./setup.react";
+import SetupActions from "./setup.actions";
+import ClusterActions from "../cluster/cluster.actions";
+var RouteObject = FauxtonAPI.RouteObject.extend({
+  layout: 'one_pane',
 
-    roles: ['_admin'],
+  roles: ['_admin'],
 
-    routes: {
-      'setup': 'setupInitView',
-      'setup/finish': 'finishView',
-      'setup/singlenode': 'setupSingleNode',
-      'setup/multinode': 'setupMultiNode'
-    },
+  routes: {
+    'setup': 'setupInitView',
+    'setup/finish': 'finishView',
+    'setup/singlenode': 'setupSingleNode',
+    'setup/multinode': 'setupMultiNode'
+  },
 
-    crumbs: [
-      {'name': 'Setup ' + app.i18n.en_US['couchdb-productname'], 'link': 'setup'}
-    ],
+  crumbs: [
+    {'name': 'Setup ' + app.i18n.en_US['couchdb-productname'], 'link': 'setup'}
+  ],
 
-    apiUrl: function () {
-      return [this.setupModel.url('apiurl'), this.setupModel.documentation];
-    },
+  apiUrl: function () {
+    return [this.setupModel.url('apiurl'), this.setupModel.documentation];
+  },
 
-    initialize: function () {
-      this.setupModel = new Setup.Model();
-    },
+  initialize: function () {
+    this.setupModel = new Setup.Model();
+  },
 
-    setupInitView: function () {
-      ClusterActions.fetchNodes();
-      SetupActions.getClusterStateFromCouch();
-      this.setComponent('#dashboard-content', SetupComponents.SetupFirstStepController);
-    },
+  setupInitView: function () {
+    ClusterActions.fetchNodes();
+    SetupActions.getClusterStateFromCouch();
+    this.setComponent('#dashboard-content', SetupComponents.SetupFirstStepController);
+  },
 
-    setupSingleNode: function () {
-      ClusterActions.fetchNodes();
-      this.setComponent('#dashboard-content', SetupComponents.SetupSingleNodeController);
-    },
+  setupSingleNode: function () {
+    ClusterActions.fetchNodes();
+    this.setComponent('#dashboard-content', SetupComponents.SetupSingleNodeController);
+  },
 
-    setupMultiNode: function () {
-      ClusterActions.fetchNodes();
-      this.setComponent('#dashboard-content', SetupComponents.SetupMultipleNodesController);
-    },
+  setupMultiNode: function () {
+    ClusterActions.fetchNodes();
+    this.setComponent('#dashboard-content', SetupComponents.SetupMultipleNodesController);
+  },
 
-    finishView: function () {
-      this.setComponent('#dashboard-content', SetupComponents.ClusterConfiguredScreen);
-    }
-  });
+  finishView: function () {
+    this.setComponent('#dashboard-content', SetupComponents.ClusterConfiguredScreen);
+  }
+});
 
 
-  Setup.RouteObjects = [RouteObject];
+Setup.RouteObjects = [RouteObject];
 
-  return Setup;
-});
+export default Setup;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/setup.actions.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/setup.actions.js b/app/addons/setup/setup.actions.js
index cfcfff3..bdafc32 100644
--- a/app/addons/setup/setup.actions.js
+++ b/app/addons/setup/setup.actions.js
@@ -9,277 +9,273 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../core/api',
-  '../config/resources',
-  './resources',
-  './setup.actiontypes',
-  '../cluster/cluster.stores',
-  './setup.stores',
+import FauxtonAPI from "../../core/api";
+import ConfigResources from "../config/resources";
+import SetupResources from "./resources";
+import ActionTypes from "./setup.actiontypes";
+import ClusterStores from "../cluster/cluster.stores";
+import SetupStores from "./setup.stores";
+var nodesStore = ClusterStores.nodesStore;
+var setupStore = SetupStores.setupStore;
 
-], function (FauxtonAPI, ConfigResources, SetupResources, ActionTypes, ClusterStores, SetupStores) {
-    var nodesStore = ClusterStores.nodesStore;
-    var setupStore = SetupStores.setupStore;
+export default {
 
-    return {
+  getClusterStateFromCouch: function () {
+    var setupData = new SetupResources.Model();
 
-      getClusterStateFromCouch: function () {
-        var setupData = new SetupResources.Model();
+    setupData.fetch().then(function () {
+      FauxtonAPI.dispatch({
+        type: ActionTypes.SETUP_SET_CLUSTERSTATUS,
+        options: {
+          state: setupData.get('state')
+        }
+      });
+    });
+  },
 
-        setupData.fetch().then(function () {
-          FauxtonAPI.dispatch({
-            type: ActionTypes.SETUP_SET_CLUSTERSTATUS,
-            options: {
-              state: setupData.get('state')
-            }
-          });
-        });
-      },
+  finishClusterSetup: function (message) {
 
-      finishClusterSetup: function (message) {
+    $.ajax({
+      type: 'POST',
+      url: '/_cluster_setup',
+      contentType: 'application/json',
+      dataType: 'json',
+      data: JSON.stringify({
+        action: 'finish_cluster'
+      })
+    })
+    .success(function (res) {
+      FauxtonAPI.addNotification({
+        msg: message,
+        type: 'success',
+        fade: false,
+        clear: true
+      });
+      FauxtonAPI.navigate('#setup/finish');
+    })
+    .fail(function () {
+      FauxtonAPI.addNotification({
+        msg: 'There was an error. Please check your setup and try again.',
+        type: 'error',
+        fade: false,
+        clear: true
+      });
+    });
 
-        $.ajax({
-          type: 'POST',
-          url: '/_cluster_setup',
-          contentType: 'application/json',
-          dataType: 'json',
-          data: JSON.stringify({
-            action: 'finish_cluster'
-          })
-        })
-        .success(function (res) {
-          FauxtonAPI.addNotification({
-            msg: message,
-            type: 'success',
-            fade: false,
-            clear: true
-          });
-          FauxtonAPI.navigate('#setup/finish');
-        })
-        .fail(function () {
-          FauxtonAPI.addNotification({
-            msg: 'There was an error. Please check your setup and try again.',
-            type: 'error',
-            fade: false,
-            clear: true
-          });
-        });
+  },
 
-      },
+  setupSingleNode: function () {
+    var nodes = nodesStore.getNodes();
+    var isAdminParty = setupStore.getIsAdminParty();
+    var username = setupStore.getUsername();
+    var password = setupStore.getPassword();
 
-      setupSingleNode: function () {
-        var nodes = nodesStore.getNodes();
-        var isAdminParty = setupStore.getIsAdminParty();
-        var username = setupStore.getUsername();
-        var password = setupStore.getPassword();
+    var setupModel = new SetupResources.Model({
+      action: 'enable_cluster',
+      username: username,
+      password: password,
+      bind_address: setupStore.getBindAdressForSetupNode(),
+      port: setupStore.getPortForSetupNode()
+    });
 
-        var setupModel = new SetupResources.Model({
-          action: 'enable_cluster',
-          username: username,
-          password: password,
-          bind_address: setupStore.getBindAdressForSetupNode(),
-          port: setupStore.getPortForSetupNode()
-        });
+    setupModel.on('invalid', function (model, error) {
+      FauxtonAPI.addNotification({
+        msg: error,
+        type: 'error',
+        fade: false,
+        clear: true
+      });
+    });
 
-        setupModel.on('invalid', function (model, error) {
-          FauxtonAPI.addNotification({
-            msg: error,
-            type: 'error',
-            fade: false,
-            clear: true
-          });
-        });
+    setupModel.save()
+      .then(function () {
+        return FauxtonAPI.session.login(username, password);
+      })
+      .then(function () {
+        return this.finishClusterSetup('CouchDB is set up!');
+      }.bind(this));
+  },
 
-        setupModel.save()
-          .then(function () {
-            return FauxtonAPI.session.login(username, password);
-          })
-          .then(function () {
-            return this.finishClusterSetup('CouchDB is set up!');
-          }.bind(this));
-      },
+  addNode: function (isOrWasAdminParty) {
+    var username = setupStore.getUsername();
+    var password = setupStore.getPassword();
+    var portForSetupNode = setupStore.getPortForSetupNode();
+    var bindAddressForSetupNode = setupStore.getBindAdressForSetupNode();
 
-      addNode: function (isOrWasAdminParty) {
-        var username = setupStore.getUsername();
-        var password = setupStore.getPassword();
-        var portForSetupNode = setupStore.getPortForSetupNode();
-        var bindAddressForSetupNode = setupStore.getBindAdressForSetupNode();
+    var bindAddressForAdditionalNode = setupStore.getAdditionalNode().bindAddress;
+    var remoteAddressForAdditionalNode = setupStore.getAdditionalNode().remoteAddress;
+    var portForForAdditionalNode = setupStore.getAdditionalNode().port;
 
-        var bindAddressForAdditionalNode = setupStore.getAdditionalNode().bindAddress;
-        var remoteAddressForAdditionalNode = setupStore.getAdditionalNode().remoteAddress;
-        var portForForAdditionalNode = setupStore.getAdditionalNode().port;
 
+    var setupNode = new SetupResources.Model({
+      action: 'enable_cluster',
+      username: username,
+      password: password,
+      bind_address: bindAddressForSetupNode,
+      port: portForSetupNode
+    });
 
-        var setupNode = new SetupResources.Model({
-          action: 'enable_cluster',
-          username: username,
-          password: password,
-          bind_address: bindAddressForSetupNode,
-          port: portForSetupNode
-        });
+    setupNode.on('invalid', function (model, error) {
+      FauxtonAPI.addNotification({
+        msg: error,
+        type: 'error',
+        fade: false,
+        clear: true
+      });
+    });
 
-        setupNode.on('invalid', function (model, error) {
-          FauxtonAPI.addNotification({
-            msg: error,
-            type: 'error',
-            fade: false,
-            clear: true
-          });
-        });
+    var additionalNodeData = {
+      action: 'enable_cluster',
+      username: username,
+      password: password,
+      bind_address: bindAddressForAdditionalNode,
+      port: portForForAdditionalNode,
+      remote_node: remoteAddressForAdditionalNode,
+      remote_current_user: username,
+      remote_current_password: password
+    };
 
-        var additionalNodeData = {
-          action: 'enable_cluster',
-          username: username,
-          password: password,
-          bind_address: bindAddressForAdditionalNode,
-          port: portForForAdditionalNode,
-          remote_node: remoteAddressForAdditionalNode,
-          remote_current_user: username,
-          remote_current_password: password
-        };
+    if (isOrWasAdminParty) {
+      delete additionalNodeData.remote_current_user;
+      delete additionalNodeData.remote_current_password;
+    }
 
-        if (isOrWasAdminParty) {
-          delete additionalNodeData.remote_current_user;
-          delete additionalNodeData.remote_current_password;
+    function dontGiveUp (f, u, p) {
+      return f(u, p).then(
+        undefined,
+        function (err) {
+          return dontGiveUp(f, u, p);
         }
+      );
+    }
 
-        function dontGiveUp (f, u, p) {
-          return f(u, p).then(
-            undefined,
-            function (err) {
-              return dontGiveUp(f, u, p);
-            }
-          );
-        }
+    var additionalNode = new SetupResources.Model(additionalNodeData);
+
+    additionalNode.on('invalid', function (model, error) {
+      FauxtonAPI.addNotification({
+        msg: error,
+        type: 'error',
+        fade: false,
+        clear: true
+      });
+    });
+    setupNode
+      .save()
+      .always(function () {
+        FauxtonAPI.session.login(username, password).then(function () {
+          continueSetup();
+        });
+      });
 
-        var additionalNode = new SetupResources.Model(additionalNodeData);
+    function continueSetup () {
+      var addNodeModel = new SetupResources.Model({
+        action: 'add_node',
+        username: username,
+        password: password,
+        host: remoteAddressForAdditionalNode,
+        port: portForForAdditionalNode
+      });
 
-        additionalNode.on('invalid', function (model, error) {
+      additionalNode
+        .save()
+        .then(function () {
+          return addNodeModel.save();
+        })
+        .then(function () {
+          FauxtonAPI.dispatch({
+            type: ActionTypes.SETUP_ADD_NODE_TO_LIST,
+            options: {
+              value: {
+                port: portForForAdditionalNode,
+                remoteAddress: remoteAddressForAdditionalNode
+              }
+            }
+          });
           FauxtonAPI.addNotification({
-            msg: error,
+            msg: 'Added node',
+            type: 'success',
+            fade: false,
+            clear: true
+          });
+        })
+        .fail(function (xhr) {
+          var responseText = JSON.parse(xhr.responseText).reason;
+          FauxtonAPI.addNotification({
+            msg: 'Adding node failed: ' + responseText,
             type: 'error',
             fade: false,
             clear: true
           });
         });
-        setupNode
-          .save()
-          .always(function () {
-            FauxtonAPI.session.login(username, password).then(function () {
-              continueSetup();
-            });
-          });
-
-        function continueSetup () {
-          var addNodeModel = new SetupResources.Model({
-            action: 'add_node',
-            username: username,
-            password: password,
-            host: remoteAddressForAdditionalNode,
-            port: portForForAdditionalNode
-          });
+    }
+  },
 
-          additionalNode
-            .save()
-            .then(function () {
-              return addNodeModel.save();
-            })
-            .then(function () {
-              FauxtonAPI.dispatch({
-                type: ActionTypes.SETUP_ADD_NODE_TO_LIST,
-                options: {
-                  value: {
-                    port: portForForAdditionalNode,
-                    remoteAddress: remoteAddressForAdditionalNode
-                  }
-                }
-              });
-              FauxtonAPI.addNotification({
-                msg: 'Added node',
-                type: 'success',
-                fade: false,
-                clear: true
-              });
-            })
-            .fail(function (xhr) {
-              var responseText = JSON.parse(xhr.responseText).reason;
-              FauxtonAPI.addNotification({
-                msg: 'Adding node failed: ' + responseText,
-                type: 'error',
-                fade: false,
-                clear: true
-              });
-            });
-        }
-      },
-
-      resetAddtionalNodeForm: function () {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_RESET_ADDITIONAL_NODE,
-        });
-      },
+  resetAddtionalNodeForm: function () {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_RESET_ADDITIONAL_NODE,
+    });
+  },
 
-      alterPortAdditionalNode: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_PORT_ADDITIONAL_NODE,
-          options: {
-            value: value
-          }
-        });
-      },
+  alterPortAdditionalNode: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_PORT_ADDITIONAL_NODE,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      alterRemoteAddressAdditionalNode: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE,
-          options: {
-            value: value
-          }
-        });
-      },
+  alterRemoteAddressAdditionalNode: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      alterBindAddressAdditionalNode: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_BIND_ADDRESS_ADDITIONAL_NODE,
-          options: {
-            value: value
-          }
-        });
-      },
+  alterBindAddressAdditionalNode: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_BIND_ADDRESS_ADDITIONAL_NODE,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      setUsername: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_SET_USERNAME,
-          options: {
-            value: value
-          }
-        });
-      },
+  setUsername: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_SET_USERNAME,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      setPassword: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_SET_PASSWORD,
-          options: {
-            value: value
-          }
-        });
-      },
+  setPassword: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_SET_PASSWORD,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      setPortForSetupNode: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_PORT_FOR_SINGLE_NODE,
-          options: {
-            value: value
-          }
-        });
-      },
+  setPortForSetupNode: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_PORT_FOR_SINGLE_NODE,
+      options: {
+        value: value
+      }
+    });
+  },
 
-      setBindAddressForSetupNode: function (value) {
-        FauxtonAPI.dispatch({
-          type: ActionTypes.SETUP_BIND_ADDRESS_FOR_SINGLE_NODE,
-          options: {
-            value: value
-          }
-        });
+  setBindAddressForSetupNode: function (value) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.SETUP_BIND_ADDRESS_FOR_SINGLE_NODE,
+      options: {
+        value: value
       }
-    };
-  });
+    });
+  }
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/setup.actiontypes.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/setup.actiontypes.js b/app/addons/setup/setup.actiontypes.js
index 6bbd390..a7ef0eb 100644
--- a/app/addons/setup/setup.actiontypes.js
+++ b/app/addons/setup/setup.actiontypes.js
@@ -10,18 +10,15 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([], function () {
-  return {
-    SETUP_SET_CLUSTERSTATUS: 'SETUP_SET_CLUSTERSTATUS',
-    SETUP_SET_USERNAME: 'SETUP_SET_USERNAME',
-    SETUP_SET_PASSWORD: 'SETUP_SET_PASSWORD',
-    SETUP_BIND_ADDRESS_FOR_SINGLE_NODE: 'SETUP_BIND_ADDRESS_FOR_SINGLE_NODE',
-    SETUP_PORT_FOR_SINGLE_NODE: 'SETUP_PORT_FOR_SINGLE_NODE',
-    SETUP_PORT_ADDITIONAL_NODE: 'SETUP_PORT_ADDITIONAL_NODE',
-    SETUP_BIND_ADDRESS_ADDITIONAL_NODE: 'SETUP_BIND_ADDRESS_ADDITIONAL_NODE',
-    SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE: 'SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE',
-    SETUP_RESET_ADDITIONAL_NODE: 'SETUP_RESET_ADDITIONAL_NODE',
-    SETUP_ADD_NODE_TO_LIST: 'SETUP_ADD_NODE_TO_LIST',
-  };
-});
-
+export default {
+  SETUP_SET_CLUSTERSTATUS: 'SETUP_SET_CLUSTERSTATUS',
+  SETUP_SET_USERNAME: 'SETUP_SET_USERNAME',
+  SETUP_SET_PASSWORD: 'SETUP_SET_PASSWORD',
+  SETUP_BIND_ADDRESS_FOR_SINGLE_NODE: 'SETUP_BIND_ADDRESS_FOR_SINGLE_NODE',
+  SETUP_PORT_FOR_SINGLE_NODE: 'SETUP_PORT_FOR_SINGLE_NODE',
+  SETUP_PORT_ADDITIONAL_NODE: 'SETUP_PORT_ADDITIONAL_NODE',
+  SETUP_BIND_ADDRESS_ADDITIONAL_NODE: 'SETUP_BIND_ADDRESS_ADDITIONAL_NODE',
+  SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE: 'SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE',
+  SETUP_RESET_ADDITIONAL_NODE: 'SETUP_RESET_ADDITIONAL_NODE',
+  SETUP_ADD_NODE_TO_LIST: 'SETUP_ADD_NODE_TO_LIST',
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/setup.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/setup/setup.react.jsx b/app/addons/setup/setup.react.jsx
index 268dda8..03f2852 100644
--- a/app/addons/setup/setup.react.jsx
+++ b/app/addons/setup/setup.react.jsx
@@ -10,379 +10,374 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  'react',
-  '../components/react-components.react',
-  './setup.actions',
-  './setup.stores',
-
-
-], function (app, FauxtonAPI, React, ReactComponents, SetupActions, SetupStores) {
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import React from "react";
+import ReactComponents from "../components/react-components.react";
+import SetupActions from "./setup.actions";
+import SetupStores from "./setup.stores";
+
+var setupStore = SetupStores.setupStore;
+var ConfirmButton = ReactComponents.ConfirmButton;
+
+
+var ClusterConfiguredScreen = React.createClass({
+
+  render: function () {
+    return (
+      <div className="setup-screen">
+        {app.i18n.en_US['couchdb-productname']} is configured for production usage!
+        <br />
+        <br/>
+        Do you want to <a href="#replication">replicate data</a>?
+      </div>
+    );
+  }
+});
 
-  var setupStore = SetupStores.setupStore;
-  var ConfirmButton = ReactComponents.ConfirmButton;
+var SetupCurrentAdminPassword = React.createClass({
 
+  render: function () {
+    var text = 'Your current Admin Username & Password';
 
-  var ClusterConfiguredScreen = React.createClass({
+    if (this.props.adminParty) {
+      text = 'Admin Username & Password that you want to use';
+    }
 
-    render: function () {
-      return (
-        <div className="setup-screen">
-          {app.i18n.en_US['couchdb-productname']} is configured for production usage!
-          <br />
-          <br/>
-          Do you want to <a href="#replication">replicate data</a>?
+    return (
+      <div className="setup-creds">
+        <div>
+          <h2>Specify Credentials</h2>
+          {text}
         </div>
-      );
-    }
-  });
+        <input
+          className="setup-username"
+          onChange={this.props.onAlterUsername}
+          placeholder="Admin Username"
+          type="text" />
+        <input
+          className="setup-password"
+          onChange={this.props.onAlterPassword}
+          placeholder="Admin Password"
+          type="password" />
+      </div>
+    );
+  },
 
-  var SetupCurrentAdminPassword = React.createClass({
 
-    render: function () {
-      var text = 'Your current Admin Username & Password';
+});
 
-      if (this.props.adminParty) {
-        text = 'Admin Username & Password that you want to use';
-      }
 
-      return (
-        <div className="setup-creds">
-          <div>
-            <h2>Specify Credentials</h2>
-            {text}
-          </div>
+var SetupOptionalSettings = React.createClass({
+  getInitialState: function () {
+    return {
+      ipValue: this.props.ipInitialValue,
+      portValue: this.props.portValue
+    };
+  },
+
+  handleIpChange: function (event) {
+    this.props.onAlterBindAddress(event);
+    this.setState({ipValue: event.target.value});
+  },
+
+  handlePortChange: function (event) {
+    this.props.onAlterPort(event);
+    this.setState({portValue: event.target.value});
+  },
+
+  render: function () {
+    return (
+      <div className="setup-opt-settings">
+        <h2>IP</h2>
+        Bind address to listen on<br/>
+
+        <input
+          className="setup-input-ip"
+          value={this.state.ipValue}
+          onChange={this.handleIpChange}
+          defaultValue="0.0.0.0"
+          type="text" />
+
+        <div className="setup-port">
+          <h2>Port</h2>
+          Port that the Node uses <br/>
           <input
-            className="setup-username"
-            onChange={this.props.onAlterUsername}
-            placeholder="Admin Username"
+            className="setup-input-port"
+            value={this.state.portValue}
+            onChange={this.handlePortChange}
+            defaultValue="5984"
             type="text" />
-          <input
-            className="setup-password"
-            onChange={this.props.onAlterPassword}
-            placeholder="Admin Password"
-            type="password" />
         </div>
-      );
-    },
+      </div>
+    );
+  }
+});
 
+var SetupMultipleNodesController = React.createClass({
 
-  });
+  getInitialState: function () {
+    return this.getStoreState();
+  },
 
+  getStoreState: function () {
+    return {
+      nodeList: setupStore.getNodeList(),
+      isAdminParty: setupStore.getIsAdminParty(),
+      remoteAddress: setupStore.getAdditionalNode().remoteAddress
+    };
+  },
 
-  var SetupOptionalSettings = React.createClass({
-    getInitialState: function () {
-      return {
-        ipValue: this.props.ipInitialValue,
-        portValue: this.props.portValue
-      };
-    },
+  componentDidMount: function () {
+    this.isAdminParty = setupStore.getIsAdminParty();
+    setupStore.on('change', this.onChange, this);
+  },
 
-    handleIpChange: function (event) {
-      this.props.onAlterBindAddress(event);
-      this.setState({ipValue: event.target.value});
-    },
+  componentWillUnmount: function () {
+    setupStore.off('change', this.onChange);
+  },
 
-    handlePortChange: function (event) {
-      this.props.onAlterPort(event);
-      this.setState({portValue: event.target.value});
-    },
+  onChange: function () {
+    if (this.isMounted()) {
+      this.setState(this.getStoreState());
+    }
+  },
 
-    render: function () {
+  getNodeList: function () {
+    return this.state.nodeList.map(function (el, i) {
       return (
-        <div className="setup-opt-settings">
-          <h2>IP</h2>
-          Bind address to listen on<br/>
-
-          <input
-            className="setup-input-ip"
-            value={this.state.ipValue}
-            onChange={this.handleIpChange}
-            defaultValue="0.0.0.0"
-            type="text" />
-
-          <div className="setup-port">
-            <h2>Port</h2>
-            Port that the Node uses <br/>
-            <input
-              className="setup-input-port"
-              value={this.state.portValue}
-              onChange={this.handlePortChange}
-              defaultValue="5984"
-              type="text" />
-          </div>
+        <div key={i} className="node-item">
+          {el.remoteAddress}:{el.port}
         </div>
       );
-    }
-  });
-
-  var SetupMultipleNodesController = React.createClass({
-
-    getInitialState: function () {
-      return this.getStoreState();
-    },
-
-    getStoreState: function () {
-      return {
-        nodeList: setupStore.getNodeList(),
-        isAdminParty: setupStore.getIsAdminParty(),
-        remoteAddress: setupStore.getAdditionalNode().remoteAddress
-      };
-    },
-
-    componentDidMount: function () {
-      this.isAdminParty = setupStore.getIsAdminParty();
-      setupStore.on('change', this.onChange, this);
-    },
-
-    componentWillUnmount: function () {
-      setupStore.off('change', this.onChange);
-    },
-
-    onChange: function () {
-      if (this.isMounted()) {
-        this.setState(this.getStoreState());
-      }
-    },
-
-    getNodeList: function () {
-      return this.state.nodeList.map(function (el, i) {
-        return (
-          <div key={i} className="node-item">
-            {el.remoteAddress}:{el.port}
+    }, this);
+  },
+
+  addNode: function () {
+    SetupActions.addNode(this.isAdminParty);
+  },
+
+  alterPortAdditionalNode: function (e) {
+    SetupActions.alterPortAdditionalNode(e.target.value);
+  },
+
+  alterBindAddressAdditionalNode: function (e) {
+    SetupActions.alterBindAddressAdditionalNode(e.target.value);
+  },
+
+  alterRemoteAddressAdditionalNode: function (e) {
+    SetupActions.alterRemoteAddressAdditionalNode(e.target.value);
+  },
+
+  alterUsername: function (e) {
+    SetupActions.setUsername(e.target.value);
+  },
+
+  alterPassword: function (e) {
+    SetupActions.setPassword(e.target.value);
+  },
+
+  alterBindAddressSetupNode: function (e) {
+    SetupActions.setBindAddressForSetupNode(e.target.value);
+  },
+
+  alterPortSetupNode: function (e) {
+    SetupActions.setPortForSetupNode(e.target.value);
+  },
+
+  finishClusterSetup: function () {
+    SetupActions.finishClusterSetup('CouchDB Cluster set up!');
+  },
+
+  render: function () {
+
+    return (
+      <div className="setup-nodes">
+        Setup your initial base-node, afterwards add the other nodes that you want to add
+        <div className="setup-setupnode-section">
+          <SetupCurrentAdminPassword
+            onAlterUsername={this.alterUsername}
+            onAlterPassword={this.alterPassword}
+            adminParty={this.state.isAdminParty} />
+
+          <SetupOptionalSettings
+            onAlterPort={this.alterPortSetupNode}
+            onAlterBindAddress={this.alterBindAddressSetupNode} />
           </div>
-        );
-      }, this);
-    },
-
-    addNode: function () {
-      SetupActions.addNode(this.isAdminParty);
-    },
-
-    alterPortAdditionalNode: function (e) {
-      SetupActions.alterPortAdditionalNode(e.target.value);
-    },
-
-    alterBindAddressAdditionalNode: function (e) {
-      SetupActions.alterBindAddressAdditionalNode(e.target.value);
-    },
-
-    alterRemoteAddressAdditionalNode: function (e) {
-      SetupActions.alterRemoteAddressAdditionalNode(e.target.value);
-    },
-
-    alterUsername: function (e) {
-      SetupActions.setUsername(e.target.value);
-    },
-
-    alterPassword: function (e) {
-      SetupActions.setPassword(e.target.value);
-    },
-
-    alterBindAddressSetupNode: function (e) {
-      SetupActions.setBindAddressForSetupNode(e.target.value);
-    },
-
-    alterPortSetupNode: function (e) {
-      SetupActions.setPortForSetupNode(e.target.value);
-    },
-
-    finishClusterSetup: function () {
-      SetupActions.finishClusterSetup('CouchDB Cluster set up!');
-    },
-
-    render: function () {
+        <hr/>
+        <div className="setup-add-nodes-section">
+          <h2>Add Nodes</h2>
+          Remote host <br/>
+          <input
+            value={this.state.remoteAddress}
+            onChange={this.alterRemoteAddressAdditionalNode}
+            className="input-remote-node"
+            type="text"
+            placeholder="127.0.0.1" />
 
-      return (
-        <div className="setup-nodes">
-          Setup your initial base-node, afterwards add the other nodes that you want to add
-          <div className="setup-setupnode-section">
-            <SetupCurrentAdminPassword
-              onAlterUsername={this.alterUsername}
-              onAlterPassword={this.alterPassword}
-              adminParty={this.state.isAdminParty} />
-
-            <SetupOptionalSettings
-              onAlterPort={this.alterPortSetupNode}
-              onAlterBindAddress={this.alterBindAddressSetupNode} />
-            </div>
-          <hr/>
-          <div className="setup-add-nodes-section">
-            <h2>Add Nodes</h2>
-            Remote host <br/>
-            <input
-              value={this.state.remoteAddress}
-              onChange={this.alterRemoteAddressAdditionalNode}
-              className="input-remote-node"
-              type="text"
-              placeholder="127.0.0.1" />
-
-            <SetupOptionalSettings
-              onAlterPort={this.alterPortAdditionalNode}
-              onAlterBindAddress={this.alterBindAddressAdditionalNode} />
-
-            <div className="setup-add-button">
-              <ConfirmButton
-                onClick={this.addNode}
-                showIcon={false}
-                id="setup-btn-no-thanks"
-                text="Add Node" />
-            </div>
-          </div>
-          <div className="setup-nodelist">
-            {this.getNodeList()}
-          </div>
+          <SetupOptionalSettings
+            onAlterPort={this.alterPortAdditionalNode}
+            onAlterBindAddress={this.alterBindAddressAdditionalNode} />
 
-          <div className="centered setup-finish">
-            <ConfirmButton onClick={this.finishClusterSetup} showIcon={false} text="Configure Cluster" />
+          <div className="setup-add-button">
+            <ConfirmButton
+              onClick={this.addNode}
+              showIcon={false}
+              id="setup-btn-no-thanks"
+              text="Add Node" />
           </div>
         </div>
-      );
-    }
-  });
-
-  var SetupSingleNodeController = React.createClass({
-
-    getInitialState: function () {
-      return this.getStoreState();
-    },
-
-    getStoreState: function () {
-      return {
-        isAdminParty: setupStore.getIsAdminParty()
-      };
-    },
-
-    componentDidMount: function () {
-      setupStore.on('change', this.onChange, this);
-    },
-
-    componentWillUnmount: function () {
-      setupStore.off('change', this.onChange);
-    },
+        <div className="setup-nodelist">
+          {this.getNodeList()}
+        </div>
 
-    onChange: function () {
-      if (this.isMounted()) {
-        this.setState(this.getStoreState());
-      }
-    },
+        <div className="centered setup-finish">
+          <ConfirmButton onClick={this.finishClusterSetup} showIcon={false} text="Configure Cluster" />
+        </div>
+      </div>
+    );
+  }
+});
 
-    alterUsername: function (e) {
-      SetupActions.setUsername(e.target.value);
-    },
+var SetupSingleNodeController = React.createClass({
 
-    alterPassword: function (e) {
-      SetupActions.setPassword(e.target.value);
-    },
+  getInitialState: function () {
+    return this.getStoreState();
+  },
 
-    alterBindAddress: function (e) {
-      SetupActions.setBindAddressForSetupNode(e.target.value);
-    },
+  getStoreState: function () {
+    return {
+      isAdminParty: setupStore.getIsAdminParty()
+    };
+  },
 
-    alterPort: function (e) {
-      SetupActions.setPortForSetupNode(e.target.value);
-    },
+  componentDidMount: function () {
+    setupStore.on('change', this.onChange, this);
+  },
 
-    render: function () {
-      return (
-        <div className="setup-nodes">
-          <div className="setup-setupnode-section">
-            <SetupCurrentAdminPassword
-              onAlterUsername={this.alterUsername}
-              onAlterPassword={this.alterPassword}
-              adminParty={this.state.isAdminParty} />
-            <SetupOptionalSettings
-              onAlterPort={this.alterPort}
-              onAlterBindAddress={this.alterBindAddress} />
-            <ConfirmButton
-              onClick={this.finishSingleNode}
-              text="Configure Node" />
-          </div>
-        </div>
-      );
-    },
+  componentWillUnmount: function () {
+    setupStore.off('change', this.onChange);
+  },
 
-    finishSingleNode: function (e) {
-      e.preventDefault();
-      SetupActions.setupSingleNode();
+  onChange: function () {
+    if (this.isMounted()) {
+      this.setState(this.getStoreState());
     }
-  });
+  },
+
+  alterUsername: function (e) {
+    SetupActions.setUsername(e.target.value);
+  },
+
+  alterPassword: function (e) {
+    SetupActions.setPassword(e.target.value);
+  },
+
+  alterBindAddress: function (e) {
+    SetupActions.setBindAddressForSetupNode(e.target.value);
+  },
+
+  alterPort: function (e) {
+    SetupActions.setPortForSetupNode(e.target.value);
+  },
+
+  render: function () {
+    return (
+      <div className="setup-nodes">
+        <div className="setup-setupnode-section">
+          <SetupCurrentAdminPassword
+            onAlterUsername={this.alterUsername}
+            onAlterPassword={this.alterPassword}
+            adminParty={this.state.isAdminParty} />
+          <SetupOptionalSettings
+            onAlterPort={this.alterPort}
+            onAlterBindAddress={this.alterBindAddress} />
+          <ConfirmButton
+            onClick={this.finishSingleNode}
+            text="Configure Node" />
+        </div>
+      </div>
+    );
+  },
+
+  finishSingleNode: function (e) {
+    e.preventDefault();
+    SetupActions.setupSingleNode();
+  }
+});
 
-  var SetupFirstStepController = React.createClass({
+var SetupFirstStepController = React.createClass({
 
-    getInitialState: function () {
-      return this.getStoreState();
-    },
+  getInitialState: function () {
+    return this.getStoreState();
+  },
 
-    getStoreState: function () {
-      return {
-        clusterState: setupStore.getClusterState()
-      };
-    },
+  getStoreState: function () {
+    return {
+      clusterState: setupStore.getClusterState()
+    };
+  },
 
-    componentDidMount: function () {
-      setupStore.on('change', this.onChange, this);
-    },
+  componentDidMount: function () {
+    setupStore.on('change', this.onChange, this);
+  },
 
-    componentWillUnmount: function () {
-      setupStore.off('change', this.onChange);
-    },
+  componentWillUnmount: function () {
+    setupStore.off('change', this.onChange);
+  },
 
-    onChange: function () {
-      if (this.isMounted()) {
-        this.setState(this.getStoreState());
-      }
-    },
+  onChange: function () {
+    if (this.isMounted()) {
+      this.setState(this.getStoreState());
+    }
+  },
 
-    render: function () {
-      if (this.state.clusterState === 'cluster_finished') {
-        return (<ClusterConfiguredScreen />);
-      }
+  render: function () {
+    if (this.state.clusterState === 'cluster_finished') {
+      return (<ClusterConfiguredScreen />);
+    }
 
-      return (
-        <div className="setup-screen">
-          <h2>Welcome to {app.i18n.en_US['couchdb-productname']}!</h2>
-          <p>
-            The recommended way to run the wizard is directly on your
-            node (e.g without a Loadbalancer) in front of it.
-          </p>
-          <p>
-            Do you want to setup a cluster with multiple nodes
-            or just a single node CouchDB installation?
-          </p>
-          <div>
-            <ConfirmButton
-              onClick={this.redirectToMultiNodeSetup}
-              showIcon={false}
-              text="Configure	Cluster" />
-            <ConfirmButton
-              onClick={this.redirectToSingleNodeSetup}
-              showIcon={false}
-              id="setup-btn-no-thanks"
-              text="Configure	Single	Node" />
-          </div>
+    return (
+      <div className="setup-screen">
+        <h2>Welcome to {app.i18n.en_US['couchdb-productname']}!</h2>
+        <p>
+          The recommended way to run the wizard is directly on your
+          node (e.g without a Loadbalancer) in front of it.
+        </p>
+        <p>
+          Do you want to setup a cluster with multiple nodes
+          or just a single node CouchDB installation?
+        </p>
+        <div>
+          <ConfirmButton
+            onClick={this.redirectToMultiNodeSetup}
+            showIcon={false}
+            text="Configure	Cluster" />
+          <ConfirmButton
+            onClick={this.redirectToSingleNodeSetup}
+            showIcon={false}
+            id="setup-btn-no-thanks"
+            text="Configure	Single	Node" />
         </div>
-      );
-    },
-
-    redirectToSingleNodeSetup: function (e) {
-      e.preventDefault();
-      FauxtonAPI.navigate('#setup/singlenode');
-    },
-
-    redirectToMultiNodeSetup: function (e) {
-      e.preventDefault();
-      FauxtonAPI.navigate('#setup/multinode');
-    }
-  });
-
-  return {
-    SetupMultipleNodesController: SetupMultipleNodesController,
-    SetupFirstStepController: SetupFirstStepController,
-    ClusterConfiguredScreen: ClusterConfiguredScreen,
-    SetupSingleNodeController: SetupSingleNodeController,
-    SetupOptionalSettings: SetupOptionalSettings
-  };
+      </div>
+    );
+  },
+
+  redirectToSingleNodeSetup: function (e) {
+    e.preventDefault();
+    FauxtonAPI.navigate('#setup/singlenode');
+  },
+
+  redirectToMultiNodeSetup: function (e) {
+    e.preventDefault();
+    FauxtonAPI.navigate('#setup/multinode');
+  }
 });
+
+export default {
+  SetupMultipleNodesController: SetupMultipleNodesController,
+  SetupFirstStepController: SetupFirstStepController,
+  ClusterConfiguredScreen: ClusterConfiguredScreen,
+  SetupSingleNodeController: SetupSingleNodeController,
+  SetupOptionalSettings: SetupOptionalSettings
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/setup.stores.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/setup.stores.js b/app/addons/setup/setup.stores.js
index ab0504f..93946df 100644
--- a/app/addons/setup/setup.stores.js
+++ b/app/addons/setup/setup.stores.js
@@ -10,175 +10,171 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../core/api',
-  './setup.actiontypes'
+import FauxtonAPI from "../../core/api";
+import ActionTypes from "./setup.actiontypes";
 
-], function (FauxtonAPI, ActionTypes) {
+var SetupStore = FauxtonAPI.Store.extend({
 
-  var SetupStore = FauxtonAPI.Store.extend({
+  initialize: function () {
+    this.reset();
+  },
 
-    initialize: function () {
-      this.reset();
-    },
+  reset: function () {
+    this._clusterState = [];
 
-    reset: function () {
-      this._clusterState = [];
+    this._username = '';
+    this._password = '';
 
-      this._username = '';
-      this._password = '';
+    this._setupNode = {
+      bindAddress: '0.0.0.0',
+      port: 5984
+    };
 
-      this._setupNode = {
-        bindAddress: '0.0.0.0',
-        port: 5984
-      };
+    this.resetAddtionalNode();
 
-      this.resetAddtionalNode();
+    this._nodeList = [];
+  },
 
-      this._nodeList = [];
-    },
+  resetAddtionalNode: function () {
+    this._additionalNode = {
+      bindAddress: '0.0.0.0',
+      port: 5984,
+      remoteAddress: '127.0.0.1'
+    };
+  },
 
-    resetAddtionalNode: function () {
-      this._additionalNode = {
-        bindAddress: '0.0.0.0',
-        port: 5984,
-        remoteAddress: '127.0.0.1'
-      };
-    },
+  setClusterState: function (options) {
+    this._clusterState = options.state;
+  },
 
-    setClusterState: function (options) {
-      this._clusterState = options.state;
-    },
+  getClusterState: function () {
+    return this._clusterState;
+  },
 
-    getClusterState: function () {
-      return this._clusterState;
-    },
+  getNodeList: function () {
+    return this._nodeList;
+  },
 
-    getNodeList: function () {
-      return this._nodeList;
-    },
+  getIsAdminParty: function () {
+    return FauxtonAPI.session.isAdminParty();
+  },
 
-    getIsAdminParty: function () {
-      return FauxtonAPI.session.isAdminParty();
-    },
+  setUsername: function (options) {
+    this._username = options.value;
+  },
 
-    setUsername: function (options) {
-      this._username = options.value;
-    },
+  setPassword: function (options) {
+    this._password = options.value;
+  },
 
-    setPassword: function (options) {
-      this._password = options.value;
-    },
+  getUsername: function () {
+    return this._username;
+  },
 
-    getUsername: function () {
-      return this._username;
-    },
+  getPassword: function () {
+    return this._password;
+  },
 
-    getPassword: function () {
-      return this._password;
-    },
+  setBindAdressForSetupNode: function (options) {
+    this._setupNode.bindAddress = options.value;
+  },
 
-    setBindAdressForSetupNode: function (options) {
-      this._setupNode.bindAddress = options.value;
-    },
+  setPortForSetupNode: function (options) {
+    this._setupNode.port = options.value;
+  },
 
-    setPortForSetupNode: function (options) {
-      this._setupNode.port = options.value;
-    },
+  getPortForSetupNode: function () {
+    return this._setupNode.port;
+  },
 
-    getPortForSetupNode: function () {
-      return this._setupNode.port;
-    },
+  getBindAdressForSetupNode: function () {
+    return this._setupNode.bindAddress;
+  },
 
-    getBindAdressForSetupNode: function () {
-      return this._setupNode.bindAddress;
-    },
+  setBindAdressForAdditionalNode: function (options) {
+    this._additionalNode.bindAddress = options.value;
+  },
 
-    setBindAdressForAdditionalNode: function (options) {
-      this._additionalNode.bindAddress = options.value;
-    },
+  setPortForAdditionalNode: function (options) {
+    this._additionalNode.port = options.value;
+  },
 
-    setPortForAdditionalNode: function (options) {
-      this._additionalNode.port = options.value;
-    },
+  setRemoteAddressForAdditionalNode: function (options) {
+    this._additionalNode.remoteAddress = options.value;
+  },
 
-    setRemoteAddressForAdditionalNode: function (options) {
-      this._additionalNode.remoteAddress = options.value;
-    },
+  getAdditionalNode: function () {
+    return this._additionalNode;
+  },
 
-    getAdditionalNode: function () {
-      return this._additionalNode;
-    },
+  addNodeToList: function (options) {
+    this._nodeList.push(options.value);
+    this.resetAddtionalNode();
+  },
 
-    addNodeToList: function (options) {
-      this._nodeList.push(options.value);
-      this.resetAddtionalNode();
-    },
+  getHostForSetupNode: function () {
+    return '127.0.0.1';
+  },
 
-    getHostForSetupNode: function () {
-      return '127.0.0.1';
-    },
+  dispatch: function (action) {
 
-    dispatch: function (action) {
+    switch (action.type) {
+      case ActionTypes.SETUP_SET_CLUSTERSTATUS:
+        this.setClusterState(action.options);
+      break;
 
-      switch (action.type) {
-        case ActionTypes.SETUP_SET_CLUSTERSTATUS:
-          this.setClusterState(action.options);
-        break;
+      case ActionTypes.SETUP_SET_USERNAME:
+        this.setUsername(action.options);
+      break;
 
-        case ActionTypes.SETUP_SET_USERNAME:
-          this.setUsername(action.options);
-        break;
+      case ActionTypes.SETUP_SET_PASSWORD:
+        this.setPassword(action.options);
+      break;
 
-        case ActionTypes.SETUP_SET_PASSWORD:
-          this.setPassword(action.options);
-        break;
+      case ActionTypes.SETUP_BIND_ADDRESS_FOR_SINGLE_NODE:
+        this.setBindAdressForSetupNode(action.options);
+      break;
 
-        case ActionTypes.SETUP_BIND_ADDRESS_FOR_SINGLE_NODE:
-          this.setBindAdressForSetupNode(action.options);
-        break;
+      case ActionTypes.SETUP_PORT_FOR_SINGLE_NODE:
+        this.setPortForSetupNode(action.options);
+      break;
 
-        case ActionTypes.SETUP_PORT_FOR_SINGLE_NODE:
-          this.setPortForSetupNode(action.options);
-        break;
+      case ActionTypes.SETUP_PORT_ADDITIONAL_NODE:
+        this.setPortForAdditionalNode(action.options);
+      break;
 
-        case ActionTypes.SETUP_PORT_ADDITIONAL_NODE:
-          this.setPortForAdditionalNode(action.options);
-        break;
+      case ActionTypes.SETUP_BIND_ADDRESS_ADDITIONAL_NODE:
+        this.setBindAdressForAdditionalNode(action.options);
+      break;
 
-        case ActionTypes.SETUP_BIND_ADDRESS_ADDITIONAL_NODE:
-          this.setBindAdressForAdditionalNode(action.options);
-        break;
+      case ActionTypes.SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE:
+        this.setRemoteAddressForAdditionalNode(action.options);
+      break;
 
-        case ActionTypes.SETUP_REMOTE_ADDRESS_ADDITIONAL_NODE:
-          this.setRemoteAddressForAdditionalNode(action.options);
-        break;
+      case ActionTypes.SETUP_ADD_NODE_TO_LIST:
+        this.addNodeToList(action.options);
+      break;
 
-        case ActionTypes.SETUP_ADD_NODE_TO_LIST:
-          this.addNodeToList(action.options);
-        break;
+      case ActionTypes.SETUP_RESET_ADDITIONAL_NODE:
+        this.resetAddtionalNode();
+      break;
 
-        case ActionTypes.SETUP_RESET_ADDITIONAL_NODE:
-          this.resetAddtionalNode();
-        break;
 
-
-        default:
-        return;
-      }
-
-      this.triggerChange();
+      default:
+      return;
     }
 
-  });
+    this.triggerChange();
+  }
 
+});
 
-  var setupStore = new SetupStore();
 
-  setupStore.dispatchToken = FauxtonAPI.dispatcher.register(setupStore.dispatch.bind(setupStore));
+var setupStore = new SetupStore();
 
-  return {
-    setupStore: setupStore,
-    SetupStore: SetupStore
-  };
-});
+setupStore.dispatchToken = FauxtonAPI.dispatcher.register(setupStore.dispatch.bind(setupStore));
+
+export default {
+  setupStore: setupStore,
+  SetupStore: SetupStore
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/tests/setupComponentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/setup/tests/setupComponentsSpec.react.jsx b/app/addons/setup/tests/setupComponentsSpec.react.jsx
index 288500f..d0872bf 100644
--- a/app/addons/setup/tests/setupComponentsSpec.react.jsx
+++ b/app/addons/setup/tests/setupComponentsSpec.react.jsx
@@ -9,137 +9,133 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../../core/api',
-  '../setup.react',
-  '../setup.stores',
-  '../../../../test/mocha/testUtils',
-  'react',
-  'react-dom',
-  'react-addons-test-utils',
-  'sinon'
-], function (FauxtonAPI, Views, Stores, utils, React, ReactDOM, TestUtils, sinon) {
+import FauxtonAPI from "../../../core/api";
+import Views from "../setup.react";
+import Stores from "../setup.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";
 
-  var assert = utils.assert;
+var assert = utils.assert;
 
-  describe('Setup Components', function () {
+describe('Setup Components', function () {
 
-    describe('IP / Port area', function () {
-      var changeHandler, container;
+  describe('IP / Port area', function () {
+    var changeHandler, container;
 
-      beforeEach(function () {
-        changeHandler = sinon.spy();
-        container = document.createElement('div');
-      });
+    beforeEach(function () {
+      changeHandler = sinon.spy();
+      container = document.createElement('div');
+    });
+
+    afterEach(function () {
+      ReactDOM.unmountComponentAtNode(container);
+    });
+
+    it('fires callbacks on change, ip', function () {
+      var optSettings = TestUtils.renderIntoDocument(
+        <Views.SetupOptionalSettings onAlterPort={null} onAlterBindAddress={changeHandler} />,
+        container
+      );
+
+      var node = $(ReactDOM.findDOMNode(optSettings)).find('.setup-input-ip')[0];
+      TestUtils.Simulate.change(node, {target: {value: 'Hello, world'}});
+
+      assert.ok(changeHandler.calledOnce);
+    });
+
+    it('fires callbacks on change, port', function () {
+      var optSettings = TestUtils.renderIntoDocument(
+        <Views.SetupOptionalSettings onAlterPort={changeHandler} onAlterBindAddress={null} />,
+        container
+      );
+
+      var node = $(ReactDOM.findDOMNode(optSettings)).find('.setup-input-port')[0];
+      TestUtils.Simulate.change(node, {target: {value: 'Hello, world'}});
+
+      assert.ok(changeHandler.calledOnce);
+    });
+
+  });
+
+  //commenting out for now. These tests cause other tests to fail. No idea why
+  /*describe('SetupMultipleNodesController', function () {
+    var controller, changeHandler, container;
+
+    beforeEach(function () {
+      sinon.stub(Stores.setupStore, 'getIsAdminParty', function () { return false; });
+      container = document.createElement('div');
+      controller = TestUtils.renderIntoDocument(
+          <Views.SetupMultipleNodesController />,
+        container
+      );
+    });
 
-      afterEach(function () {
-        ReactDOM.unmountComponentAtNode(container);
-      });
+    afterEach(function () {
+      utils.restore(Stores.setupStore.getIsAdminParty);
+      ReactDOM.unmountComponentAtNode(container);
+      Stores.setupStore.reset();
+    });
 
-      it('fires callbacks on change, ip', function () {
-        var optSettings = TestUtils.renderIntoDocument(
-          <Views.SetupOptionalSettings onAlterPort={null} onAlterBindAddress={changeHandler} />,
-          container
-        );
+    it('changes the values in the store for additional nodes', function () {
+      var $addNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-add-nodes-section');
+      TestUtils.Simulate.change($addNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.13.37'}});
+      TestUtils.Simulate.change($addNodesSection.find('.setup-input-port')[0], {target: {value: '1337'}});
+      TestUtils.Simulate.change($addNodesSection.find('.input-remote-node')[0], {target: {value: 'node2.local'}});
 
-        var node = $(ReactDOM.findDOMNode(optSettings)).find('.setup-input-ip')[0];
-        TestUtils.Simulate.change(node, {target: {value: 'Hello, world'}});
+      var additionalNode = Stores.setupStore.getAdditionalNode();
+      assert.equal(additionalNode.bindAddress, '192.168.13.37');
+      assert.equal(additionalNode.remoteAddress, 'node2.local');
+      assert.equal(additionalNode.port, '1337');
+    });
 
-        assert.ok(changeHandler.calledOnce);
-      });
+    it('changes the values in the store for the setup node', function () {
+      var $setupNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-setupnode-section');
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.42.42'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-input-port')[0], {target: {value: '4242'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-username')[0], {target: {value: 'tester'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-password')[0], {target: {value: 'testerpass'}});
 
-      it('fires callbacks on change, port', function () {
-        var optSettings = TestUtils.renderIntoDocument(
-          <Views.SetupOptionalSettings onAlterPort={changeHandler} onAlterBindAddress={null} />,
-          container
-        );
 
-        var node = $(ReactDOM.findDOMNode(optSettings)).find('.setup-input-port')[0];
-        TestUtils.Simulate.change(node, {target: {value: 'Hello, world'}});
+      assert.equal(Stores.setupStore.getBindAdressForSetupNode(), '192.168.42.42');
+      assert.equal(Stores.setupStore.getPortForSetupNode(), '4242');
+      assert.equal(Stores.setupStore.getUsername(), 'tester');
+      assert.equal(Stores.setupStore.getPassword(), 'testerpass');
+    });
 
-        assert.ok(changeHandler.calledOnce);
-      });
+  });*/
 
+  describe('SingleNodeSetup', function () {
+    var controller, changeHandler, container;
+
+    beforeEach(function () {
+      sinon.stub(Stores.setupStore, 'getIsAdminParty', function () { return false; });
+      container = document.createElement('div');
+      controller = TestUtils.renderIntoDocument(
+        <Views.SetupSingleNodeController />,
+        container
+      );
     });
 
-    //commenting out for now. These tests cause other tests to fail. No idea why
-    /*describe('SetupMultipleNodesController', function () {
-      var controller, changeHandler, container;
-
-      beforeEach(function () {
-        sinon.stub(Stores.setupStore, 'getIsAdminParty', function () { return false; });
-        container = document.createElement('div');
-        controller = TestUtils.renderIntoDocument(
-            <Views.SetupMultipleNodesController />,
-          container
-        );
-      });
-
-      afterEach(function () {
-        utils.restore(Stores.setupStore.getIsAdminParty);
-        ReactDOM.unmountComponentAtNode(container);
-        Stores.setupStore.reset();
-      });
-
-      it('changes the values in the store for additional nodes', function () {
-        var $addNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-add-nodes-section');
-        TestUtils.Simulate.change($addNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.13.37'}});
-        TestUtils.Simulate.change($addNodesSection.find('.setup-input-port')[0], {target: {value: '1337'}});
-        TestUtils.Simulate.change($addNodesSection.find('.input-remote-node')[0], {target: {value: 'node2.local'}});
-
-        var additionalNode = Stores.setupStore.getAdditionalNode();
-        assert.equal(additionalNode.bindAddress, '192.168.13.37');
-        assert.equal(additionalNode.remoteAddress, 'node2.local');
-        assert.equal(additionalNode.port, '1337');
-      });
-
-      it('changes the values in the store for the setup node', function () {
-        var $setupNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-setupnode-section');
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.42.42'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-input-port')[0], {target: {value: '4242'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-username')[0], {target: {value: 'tester'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-password')[0], {target: {value: 'testerpass'}});
-
-
-        assert.equal(Stores.setupStore.getBindAdressForSetupNode(), '192.168.42.42');
-        assert.equal(Stores.setupStore.getPortForSetupNode(), '4242');
-        assert.equal(Stores.setupStore.getUsername(), 'tester');
-        assert.equal(Stores.setupStore.getPassword(), 'testerpass');
-      });
-
-    });*/
-
-    describe('SingleNodeSetup', function () {
-      var controller, changeHandler, container;
-
-      beforeEach(function () {
-        sinon.stub(Stores.setupStore, 'getIsAdminParty', function () { return false; });
-        container = document.createElement('div');
-        controller = TestUtils.renderIntoDocument(
-          <Views.SetupSingleNodeController />,
-          container
-        );
-      });
-
-      afterEach(function () {
-        utils.restore(Stores.setupStore.getIsAdminParty);
-        ReactDOM.unmountComponentAtNode(container);
-        Stores.setupStore.reset();
-      });
-
-      it('changes the values in the store for the setup node', function () {
-        var $setupNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-setupnode-section');
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.13.42'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-input-port')[0], {target: {value: '1342'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-username')[0], {target: {value: 'tester'}});
-        TestUtils.Simulate.change($setupNodesSection.find('.setup-password')[0], {target: {value: 'testerpass'}});
-
-        assert.equal(Stores.setupStore.getBindAdressForSetupNode(), '192.168.13.42');
-        assert.equal(Stores.setupStore.getPortForSetupNode(), '1342');
-        assert.equal(Stores.setupStore.getUsername(), 'tester');
-        assert.equal(Stores.setupStore.getPassword(), 'testerpass');
-      });
+    afterEach(function () {
+      utils.restore(Stores.setupStore.getIsAdminParty);
+      ReactDOM.unmountComponentAtNode(container);
+      Stores.setupStore.reset();
+    });
 
+    it('changes the values in the store for the setup node', function () {
+      var $setupNodesSection = $(ReactDOM.findDOMNode(controller)).find('.setup-setupnode-section');
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-input-ip')[0], {target: {value: '192.168.13.42'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-input-port')[0], {target: {value: '1342'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-username')[0], {target: {value: 'tester'}});
+      TestUtils.Simulate.change($setupNodesSection.find('.setup-password')[0], {target: {value: 'testerpass'}});
+
+      assert.equal(Stores.setupStore.getBindAdressForSetupNode(), '192.168.13.42');
+      assert.equal(Stores.setupStore.getPortForSetupNode(), '1342');
+      assert.equal(Stores.setupStore.getUsername(), 'tester');
+      assert.equal(Stores.setupStore.getPassword(), 'testerpass');
     });
 
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/setup/tests/setupSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/setup/tests/setupSpec.js b/app/addons/setup/tests/setupSpec.js
index 4ccf221..78267ba 100644
--- a/app/addons/setup/tests/setupSpec.js
+++ b/app/addons/setup/tests/setupSpec.js
@@ -9,66 +9,63 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../../core/api',
-  '../resources',
-  '../../../../test/mocha/testUtils'
-], function (FauxtonAPI, Resources, testUtils) {
-  var assert = testUtils.assert,
-      ViewSandbox = testUtils.ViewSandbox,
-      model;
+import FauxtonAPI from "../../../core/api";
+import Resources from "../resources";
+import testUtils from "../../../../test/mocha/testUtils";
+var assert = testUtils.assert,
+    ViewSandbox = testUtils.ViewSandbox,
+    model;
 
-  describe('Setup: verify input', function () {
+describe('Setup: verify input', function () {
 
-    beforeEach(function () {
-      model = new Resources.Model();
-    });
-
-    it('You have to set a username', function () {
-      var error = model.validate({
-        admin: {
-          user: '',
-          password: 'ente'
-        }
-      });
+  beforeEach(function () {
+    model = new Resources.Model();
+  });
 
-      assert.ok(error);
+  it('You have to set a username', function () {
+    var error = model.validate({
+      admin: {
+        user: '',
+        password: 'ente'
+      }
     });
 
-    it('You have to set a password', function () {
-      var error = model.validate({
-        admin: {
-          user: 'rocko',
-          password: ''
-        }
-      });
+    assert.ok(error);
+  });
 
-      assert.ok(error);
+  it('You have to set a password', function () {
+    var error = model.validate({
+      admin: {
+        user: 'rocko',
+        password: ''
+      }
     });
 
-    it('Port must be a number, if defined', function () {
-      var error = model.validate({
-        admin: {
-          user: 'rocko',
-          password: 'ente'
-        },
-        port: 'port'
-      });
+    assert.ok(error);
+  });
 
-      assert.ok(error);
+  it('Port must be a number, if defined', function () {
+    var error = model.validate({
+      admin: {
+        user: 'rocko',
+        password: 'ente'
+      },
+      port: 'port'
     });
 
-    it('Bind address can not be 127.0.0.1', function () {
-      var error = model.validate({
-        admin: {
-          user: 'rocko',
-          password: 'ente'
-        },
-        bind_address: '127.0.0.1'
-      });
+    assert.ok(error);
+  });
 
-      assert.ok(error);
+  it('Bind address can not be 127.0.0.1', function () {
+    var error = model.validate({
+      admin: {
+        user: 'rocko',
+        password: 'ente'
+      },
+      bind_address: '127.0.0.1'
     });
 
+    assert.ok(error);
   });
+
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/styletests/base.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/base.js b/app/addons/styletests/base.js
index 3bdcb17..dc57ef4 100644
--- a/app/addons/styletests/base.js
+++ b/app/addons/styletests/base.js
@@ -10,25 +10,20 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  "./routes",
-  "./assets/less/styletests.less"
-],
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import tests from "./routes";
+import "./assets/less/styletests.less";
 
-function (app, FauxtonAPI, tests) {
+tests.initialize = function () {
 
-  tests.initialize = function () {
+  FauxtonAPI.addHeaderLink({
+    title: "Tests",
+    href: '#/tests',
+    bottomNav: true,
+    icon: "fonticon-wrench"
+  });
 
-    FauxtonAPI.addHeaderLink({
-      title: "Tests",
-      href: '#/tests',
-      bottomNav: true,
-      icon: "fonticon-wrench"
-    });
+};
 
-  };
-
-  return tests;
-});
+export default tests;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/styletests/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/styletests/routes.js b/app/addons/styletests/routes.js
index 0a0a803..c931317 100644
--- a/app/addons/styletests/routes.js
+++ b/app/addons/styletests/routes.js
@@ -10,33 +10,27 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  "app",
-  "api",
-  'addons/styletests/styletests.react'
-],
+import app from "app";
+import FauxtonAPI from "api";
+import StyleTests from "addons/styletests/styletests.react";
 
-function (app, FauxtonAPI, StyleTests) {
+var TestRouteObject = FauxtonAPI.RouteObject.extend({
+  layout: "one_pane",
+  routes: {
+    "tests": "initialize"
+  },
 
-  var TestRouteObject = FauxtonAPI.RouteObject.extend({
-    layout: "one_pane",
-    routes: {
-      "tests": "initialize"
-    },
+  selectedHeader: 'theme tests',
 
-    selectedHeader: 'theme tests',
+  crumbs:[],
 
-    crumbs:[],
-
-    apiUrl: function () {
-      return false;
-    },
-
-    initialize: function () {
-      this.setComponent('#dashboard-content', StyleTests.StyleTests);
-    }
-  });
-
-  return {RouteObjects: [TestRouteObject]};
+  apiUrl: function () {
+    return false;
+  },
 
+  initialize: function () {
+    this.setComponent('#dashboard-content', StyleTests.StyleTests);
+  }
 });
+
+export default {RouteObjects: [TestRouteObject]};


Mime
View raw message