couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [5/5] fauxton commit: updated refs/heads/master to 14224ea
Date Wed, 30 Nov 2016 13:42:26 GMT
convert config to layout

Convert config to standard layout, code clean up and fix failing tests.


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

Branch: refs/heads/master
Commit: 14224ea7e6fc688d23b35c30200daefc46a61df3
Parents: 63d8923
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon Nov 28 15:25:36 2016 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Wed Nov 30 15:41:36 2016 +0200

----------------------------------------------------------------------
 app/addons/config/components.react.jsx          |  50 ++++-
 app/addons/config/layout.js                     |  28 +--
 app/addons/config/routes.js                     |  19 --
 app/addons/config/templates/sidebartabs.html    |  24 ---
 app/addons/config/views.js                      |  40 ----
 .../documents/components/header-docs-right.jsx  |   1 -
 .../documents/index-editor/components.react.jsx |   1 -
 app/addons/documents/layouts.js                 |   6 +-
 app/addons/documents/routes-documents.js        |   8 -
 app/addons/documents/routes-index-editor.js     |   7 -
 app/addons/documents/shared-routes.js           |  12 --
 app/addons/fauxton/base.js                      |   7 +-
 app/addons/fauxton/components.js                | 188 -------------------
 app/addons/permissions/routes.js                |  16 +-
 14 files changed, 67 insertions(+), 340 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/config/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/config/components.react.jsx b/app/addons/config/components.react.jsx
index 4432753..f8cd0c6 100644
--- a/app/addons/config/components.react.jsx
+++ b/app/addons/config/components.react.jsx
@@ -387,12 +387,48 @@ var AddOptionButton = React.createClass({
   }
 });
 
+const TabItem = ({active, link, title}) => {
+  return (
+    <li className={active ? 'active' : ''}>
+    <a href={`#${link}`}>
+        {title}
+    </a>
+    </li>
+  );
+};
+
+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 <TabItem
+      key={item.title}
+      active={selectedTab === item.title}
+      title={item.title}
+      link={item.link}
+      />;
+  });
+  return (
+    <nav className="sidenav">
+      <ul className="nav nav-list">
+        {tabItems}
+      </ul>
+    </nav>
+  );
+};
+
 export default {
-  ConfigTableController: ConfigTableController,
-  ConfigTable: ConfigTable,
-  ConfigOption: ConfigOption,
-  ConfigOptionValue: ConfigOptionValue,
-  ConfigOptionTrash: ConfigOptionTrash,
-  AddOptionController: AddOptionController,
-  AddOptionButton: AddOptionButton
+  Tabs,
+  ConfigTableController,
+  ConfigTable,
+  ConfigOption,
+  ConfigOptionValue,
+  ConfigOptionTrash,
+  AddOptionController,
+  AddOptionButton,
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/config/layout.js
----------------------------------------------------------------------
diff --git a/app/addons/config/layout.js b/app/addons/config/layout.js
index 528dcca..342551a 100644
--- a/app/addons/config/layout.js
+++ b/app/addons/config/layout.js
@@ -19,19 +19,6 @@ import {Breadcrumbs} from '../components/header-breadcrumbs';
 import {NotificationCenterButton} from '../fauxton/notifications/notifications.react';
 import {ApiBarWrapper} from '../components/layouts';
 
-// const sidebarItems = [
-//   {
-//     title: 'Main config',
-//     typeSelect: 'main',
-//     link: '_config/' + node
-//   },
-//   {
-//     title: 'CORS',
-//     typeSelect: 'cors',
-//     link: '_config/' + node + '/cors'
-//   }
-// ];
-
 export const ConfigHeader = ({node, crumbs, docURL, endpoint}) => {
   return (
     <header className="two-panel-header">
@@ -55,6 +42,17 @@ export const ConfigHeader = ({node, crumbs, docURL, endpoint}) => {
 };
 
 export const ConfigLayout = ({showCors, docURL, node, endpoint, crumbs}) => {
+  const sidebarItems = [
+    {
+      title: 'Main config',
+      link: '_config/' + node
+    },
+    {
+      title: 'CORS',
+      link: '_config/' + node + '/cors'
+    }
+  ];
+  const selectedTab = showCors ? 'CORS' : 'Main config';
   const content = showCors ? <CORSComponents.CORSController/> : <ConfigComponents.ConfigTableController
node={node} />;
   return (
     <div id="dashboard" className="with-sidebar">
@@ -66,6 +64,10 @@ export const ConfigLayout = ({showCors, docURL, node, endpoint, crumbs})
=> {
       />
       <div className="with-sidebar tabs-with-sidebar content-area">
         <aside id="sidebar-content" className="scrollable">
+          <ConfigComponents.Tabs
+            sidebarItems={sidebarItems}
+            selectedTab={selectedTab}
+            />
         </aside>
         <section id="dashboard-content" className="flex-layout flex-col">
           <div id="dashboard-upper-content"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/config/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/config/routes.js b/app/addons/config/routes.js
index ee2acff..8692379 100644
--- a/app/addons/config/routes.js
+++ b/app/addons/config/routes.js
@@ -13,7 +13,6 @@
 import app from "../../app";
 import FauxtonAPI from "../../core/api";
 import Config from "./resources";
-import Views from "./views";
 import CORSComponents from "../cors/components.react";
 import CORSActions from "../cors/actions";
 import ClusterActions from "../cluster/cluster.actions";
@@ -58,27 +57,10 @@ var ConfigPerNodeRouteObject = FauxtonAPI.RouteObject.extend({
     var node = options[0];
 
     this.configs = new Config.ConfigModel({ node: node });
-
-    this.sidebar = this.setView('#sidebar-content', new Views.Tabs({
-      sidebarItems: [
-        {
-          title: 'Main config',
-          typeSelect: 'main',
-          link: '_config/' + node
-        },
-        {
-          title: 'CORS',
-          typeSelect: 'cors',
-          link: '_config/' + node + '/cors'
-        }
-      ]
-    }));
   },
 
   configForNode: function (node) {
-    this.removeComponents();
     ConfigActions.fetchAndEditConfig(node);
-    this.sidebar.setSelectedTab('main');
     this.setComponent('.template', Layout, {
       node: node,
       docURL: this.configs.documentation,
@@ -90,7 +72,6 @@ var ConfigPerNodeRouteObject = FauxtonAPI.RouteObject.extend({
 
   configCorsForNode: function (node) {
     CORSActions.fetchAndEditCors(node);
-    this.sidebar.setSelectedTab('cors');
     this.setComponent('.template', Layout, {
       node: node,
       docURL: this.configs.documentation,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/config/templates/sidebartabs.html
----------------------------------------------------------------------
diff --git a/app/addons/config/templates/sidebartabs.html b/app/addons/config/templates/sidebartabs.html
deleted file mode 100644
index 46640d9..0000000
--- a/app/addons/config/templates/sidebartabs.html
+++ /dev/null
@@ -1,24 +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.
-*/%>
-
-<ul class="nav nav-list">
-  <% _.each(sidebarItems, function (item) { %>
-    <li>
-    <a data-type-select="<%- item.typeSelect %>" href="#<%- item.link %>">
-      <span class="<%- item.icon %>"></span>
-      <%- item.title %>
-    </a>
-    </li>
-  <% }); %>
-</ul>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
deleted file mode 100644
index c20b24a..0000000
--- a/app/addons/config/views.js
+++ /dev/null
@@ -1,40 +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 FauxtonAPI from "../../core/api";
-var Views = {};
-
-Views.Tabs = FauxtonAPI.View.extend({
-  className: "sidenav",
-  tagName: "nav",
-  template: 'addons/config/templates/sidebartabs',
-  initialize: function (options) {
-    this.sidebarItems = options.sidebarItems;
-  },
-
-  setSelectedTab: function (selectedTab) {
-    this.selectedTab = selectedTab;
-    this.$('li').removeClass('active');
-    this.$('a[data-type-select="' + this.selectedTab + '"]').parent("li").addClass('active');
-  },
-  afterRender: function () {
-    this.setSelectedTab(this.selectedTab);
-  },
-
-  serialize: function () {
-    return {
-      sidebarItems: this.sidebarItems
-    };
-  }
-});
-
-export default Views;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/components/header-docs-right.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/components/header-docs-right.jsx b/app/addons/documents/components/header-docs-right.jsx
index c06df07..e269414 100644
--- a/app/addons/documents/components/header-docs-right.jsx
+++ b/app/addons/documents/components/header-docs-right.jsx
@@ -12,7 +12,6 @@
 
 import app from '../../../app';
 import FauxtonAPI from '../../../core/api';
-import Components from '../../fauxton/components';
 import Documents from '../resources';
 import Databases from '../../databases/resources';
 import React from 'react';

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/index-editor/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/components.react.jsx b/app/addons/documents/index-editor/components.react.jsx
index 4b461e0..dc3f22c 100644
--- a/app/addons/documents/index-editor/components.react.jsx
+++ b/app/addons/documents/index-editor/components.react.jsx
@@ -16,7 +16,6 @@ import React from "react";
 import ReactDOM from "react-dom";
 import Stores from "./stores";
 import Actions from "./actions";
-import Components from "../../fauxton/components";
 import ReactComponents from "../../components/react-components.react";
 
 var store = Stores.indexEditorStore;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/layouts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/layouts.js b/app/addons/documents/layouts.js
index fd9283d..3f85a10 100644
--- a/app/addons/documents/layouts.js
+++ b/app/addons/documents/layouts.js
@@ -57,8 +57,8 @@ export const TabsSidebarHeader = ({hideHeaderBar, database, dbName, dropDownLink
 TabsSidebarHeader.propTypes = {
   dbName : React.PropTypes.string.isRequired,
   dropDownLinks : React.PropTypes.array.isRequired,
-  docURL : React.PropTypes.string.isRequired,
-  endpoint : React.PropTypes.string.isRequired,
+  docURL : React.PropTypes.string,
+  endpoint : React.PropTypes.string,
   showIncludeAllDocs : React.PropTypes.bool,
   hideHeaderBar : React.PropTypes.bool,
   database : React.PropTypes.object.isRequired
@@ -163,7 +163,7 @@ ViewsTabsSidebarLayout.defaultProps = {
 ViewsTabsSidebarLayout.propTypes = {
   showEditView: React.PropTypes.bool,
   docURL: React.PropTypes.string.isRequired,
-  endpoint: React.PropTypes.string.isRequired,
+  endpoint: React.PropTypes.string,
   dbName: React.PropTypes.string.isRequired,
   dropDownLinks: React.PropTypes.array.isRequired
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index 1233933..445a5fa 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -49,19 +49,12 @@ var DocumentsRouteObject = BaseRoute.extend({
     this.initViews(options[0]);
   },
 
-  establish: function () {
-    return [
-      this.designDocs.fetch({ reset: true })
-    ];
-  },
-
   initViews: function (dbName) {
     this.databaseName = dbName;
     this.database = new Databases.Model({id: this.databaseName});
 
     this.createDesignDocsCollection();
 
-    this.addLeftHeader();
     this.addSidebar();
   },
 
@@ -78,7 +71,6 @@ var DocumentsRouteObject = BaseRoute.extend({
     });
 
     QueryOptionsActions.hideQueryOptions();
-    this.apiUrl = [, designDocInfo.documentation()];
 
     const dropDownLinks = this.getCrumbs(this.database);
     this.setComponent('.template', ViewsTabsSidebarLayout, {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/routes-index-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-index-editor.js b/app/addons/documents/routes-index-editor.js
index 5a007dd..eb1e83a 100644
--- a/app/addons/documents/routes-index-editor.js
+++ b/app/addons/documents/routes-index-editor.js
@@ -50,16 +50,9 @@ var IndexEditorAndResults = BaseRoute.extend({
     this.databaseName = databaseName;
     this.database = new Databases.Model({id: databaseName});
     this.createDesignDocsCollection();
-    this.addLeftHeader();
     this.addSidebar();
   },
 
-  establish: function () {
-    return [
-      this.designDocs.fetch({ reset: true })
-    ];
-  },
-
   showView: function (databaseName, ddoc, viewName) {
     var params = this.createParams(),
         urlParams = params.urlParams,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/documents/shared-routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/shared-routes.js b/app/addons/documents/shared-routes.js
index 136c07a..956d502 100644
--- a/app/addons/documents/shared-routes.js
+++ b/app/addons/documents/shared-routes.js
@@ -61,10 +61,6 @@ var BaseRoute = FauxtonAPI.RouteObject.extend({
     });
   },
 
-  addLeftHeader: function () {
-    const dropDownLinks = this.getCrumbs(this.database);
-  },
-
   addSidebar: function (selectedNavItem) {
     var options = {
       designDocs: this.designDocs,
@@ -84,14 +80,6 @@ var BaseRoute = FauxtonAPI.RouteObject.extend({
     ];
   },
 
-  ddocInfo: function (designDoc, designDocs, view) {
-    return {
-      id: "_design/" + designDoc,
-      currView: view,
-      designDocs: designDocs
-    };
-  },
-
   createParams: function (options) {
     var urlParams = app.getParams(options),
         params = Documents.QueryParams.parse(urlParams);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/fauxton/base.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/base.js b/app/addons/fauxton/base.js
index fed1e0b..0811b89 100644
--- a/app/addons/fauxton/base.js
+++ b/app/addons/fauxton/base.js
@@ -13,8 +13,6 @@
 import app from "../../app";
 import FauxtonAPI from "../../core/api";
 import React from "react";
-
-import Components from "./components";
 import NotificationComponents from "./notifications/notifications.react";
 import Actions from "./notifications/actions";
 import NavbarReactComponents from "./navigation/components.react";
@@ -25,10 +23,9 @@ import {Breadcrumbs} from '../components/header-breadcrumbs';
 
 import "./assets/less/fauxton.less";
 
-var Fauxton = FauxtonAPI.addon();
-
+const Fauxton = FauxtonAPI.addon();
 
-Fauxton.initialize = function () {
+Fauxton.initialize = () => {
 
   FauxtonAPI.RouteObject.on('beforeEstablish', function (routeObject) {
     NavigationActions.setNavbarActiveLink(_.result(routeObject, 'selectedHeader'));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
deleted file mode 100644
index f62afef..0000000
--- a/app/addons/fauxton/components.js
+++ /dev/null
@@ -1,188 +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 app from "../../app";
-import FauxtonAPI from "../../core/api";
-import ReactComponents from "../components/react-components.react";
-import ComponentsActions from "../components/actions";
-import Helpers from "../documents/helpers";
-import "velocity-animate/velocity.ui";
-var Components = FauxtonAPI.addon();
-
-
-/**
- * Our generic Tray component. All trays should extend this guy - it offers some convenient
boilerplate code for
- * hiding/showing, event publishing and so on. The important functions that can be called
on the child Views are:
- * - hideTray
- * - showTray
- * - toggleTray
- */
-Components.Tray = FauxtonAPI.View.extend({
-
-  // populated dynamically
-  events: {},
-
-  initTray: function (opts) {
-    this.toggleTrayBtnSelector = (_.has(opts, 'toggleTrayBtnSelector')) ? opts.toggleTrayBtnSelector
: null;
-    this.onShowTray = (_.has(opts, 'onShowTray')) ? opts.onShowTray : null;
-
-    // if the component extending this one passed along the selector of the element that
toggles the tray,
-    // add the appropriate events
-    if (!_.isNull(this.toggleTrayBtnSelector)) {
-      this.events['click ' + this.toggleTrayBtnSelector] = 'toggleTray';
-    }
-
-    _.bind(this.toggleTray, this);
-    _.bind(this.trayVisible, this);
-    _.bind(this.hideTray, this);
-    _.bind(this.showTray, this);
-
-    // a unique identifier for this tray
-    this.trayId = 'tray-' + this.cid;
-
-    var that = this;
-    $('body').on('click.' + this.trayId, function (e) {
-      var $clickEl = $(e.target);
-
-      if (!that.trayVisible()) {
-        return;
-      }
-      if (!_.isNull(that.toggleTrayBtnSelector) && $clickEl.closest(that.toggleTrayBtnSelector).length)
{
-        return;
-      }
-      if (!$clickEl.closest('.tray').length) {
-        that.hideTray();
-      }
-    });
-
-    FauxtonAPI.Events.on(FauxtonAPI.constants.EVENTS.TRAY_OPENED, this.onTrayOpenEvent, this);
-  },
-
-  cleanup: function () {
-    $('body').off('click.' + this.trayId);
-  },
-
-  // all trays publish a EVENTS.TRAY_OPENED event containing their unique ID. This listens
for those events and
-  // closes the current tray if it's already open
-  onTrayOpenEvent: function (msg) {
-    if (!_.has(msg, 'trayId')) {
-      return;
-    }
-    if (msg.trayId !== this.trayId && this.trayVisible()) {
-      this.hideTray();
-    }
-  },
-
-  toggleTray: function (e) {
-    e.preventDefault();
-
-    if (this.trayVisible()) {
-      this.hideTray();
-    } else {
-      this.showTray();
-    }
-  },
-
-  hideTray: function () {
-    var $tray = this.$('.tray');
-    $tray.velocity('reverse', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED, function () {
-      $tray.hide();
-    });
-
-    if (!_.isNull(this.toggleTrayBtnSelector)) {
-      this.$(this.toggleTrayBtnSelector).removeClass('enabled');
-    }
-  },
-
-  showTray: function () {
-    this.$('.tray').velocity('transition.slideDownIn', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED);
-    if (!_.isNull(this.toggleTrayBtnSelector)) {
-      this.$(this.toggleTrayBtnSelector).addClass('enabled');
-    }
-
-    if (!_.isNull(this.onShowTray)) {
-      this.onShowTray();
-    }
-
-    FauxtonAPI.Events.trigger(FauxtonAPI.constants.EVENTS.TRAY_OPENED, { trayId: this.trayId
});
-  },
-
-  trayVisible: function () {
-    return this.$('.tray').is(':visible');
-  }
-});
-
-Components.Typeahead = FauxtonAPI.View.extend({
-
-  initialize: function (options) {
-    this.source = options.source;
-    this.onUpdateEventName = options.onUpdateEventName;
-  },
-
-  afterRender: function () {
-    var onUpdateEventName = this.onUpdateEventName;
-
-    this.$el.typeahead({
-      source: this.source,
-      updater: function (item) {
-        FauxtonAPI.Events.trigger(onUpdateEventName, item);
-        return item;
-      }
-    });
-  }
-});
-
-Components.DbSearchTypeahead = Components.Typeahead.extend({
-  initialize: function (options) {
-    this.dbLimit = options.dbLimit || 30;
-    if (options.filter) {
-      this.resultFilter = options.resultFilter;
-    }
-    _.bindAll(this);
-  },
-
-  getURL: function (query, dbLimit) {
-    query = encodeURIComponent(query);
-    return [
-      app.host,
-      "/_all_dbs?startkey=%22",
-      query,
-      "%22&endkey=%22",
-      query,
-      encodeURIComponent("\u9999"),
-      "%22&limit=",
-      dbLimit
-    ].join('');
-  },
-
-  source: function (query, process) {
-    var url = this.getURL(query, this.dbLimit);
-    var resultFilter = this.resultFilter;
-
-    if (this.ajaxReq) { this.ajaxReq.abort(); }
-
-    this.ajaxReq = $.ajax({
-      cache: false,
-      url: url,
-      dataType: 'json',
-      success: function (data) {
-        if (resultFilter) {
-          data = resultFilter(data);
-        }
-        process(data);
-      }
-    });
-  }
-});
-
-
-export default Components;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/14224ea7/app/addons/permissions/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/routes.js b/app/addons/permissions/routes.js
index 3b095f4..46ed6f9 100644
--- a/app/addons/permissions/routes.js
+++ b/app/addons/permissions/routes.js
@@ -18,7 +18,7 @@ import Actions from "./actions";
 import BaseRoute from "../documents/shared-routes";
 import Layout from './layout';
 
-var PermissionsRouteObject = BaseRoute.extend({
+const PermissionsRouteObject = BaseRoute.extend({
   layout: 'empty',
   roles: ['fx_loggedIn'],
   routes: {
@@ -39,16 +39,9 @@ var PermissionsRouteObject = BaseRoute.extend({
     });
 
     this.createDesignDocsCollection();
-    this.addLeftHeader();
     this.addSidebar('permissions');
   },
 
-  establish: function () {
-    return [
-      this.designDocs.fetch({reset: true})
-    ];
-  },
-
   permissions: function () {
     Actions.fetchPermissions(this.database, this.security);
     const crumbs = [
@@ -62,12 +55,11 @@ var PermissionsRouteObject = BaseRoute.extend({
       dropDownLinks: crumbs,
       database: this.database
     });
-  },
-
-  crumbs: function () {
   }
 });
 
-Permissions.RouteObjects = [PermissionsRouteObject];
+const Permissions = {
+  RouteObjects: [PermissionsRouteObject]
+};
 
 export default Permissions;


Mime
View raw message