Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B6148200BE2 for ; Wed, 30 Nov 2016 14:42:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B4BF4160B08; Wed, 30 Nov 2016 13:42:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1E3A160B13 for ; Wed, 30 Nov 2016 14:42:23 +0100 (CET) Received: (qmail 15303 invoked by uid 500); 30 Nov 2016 13:42:23 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 15277 invoked by uid 99); 30 Nov 2016 13:42:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2016 13:42:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 79766DFCF8; Wed, 30 Nov 2016 13:42:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garren@apache.org To: commits@couchdb.apache.org Date: Wed, 30 Nov 2016 13:42:23 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/5] fauxton commit: updated refs/heads/master to 14224ea archived-at: Wed, 30 Nov 2016 13:42:24 -0000 remove with_sidebar Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/a599d5a4 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/a599d5a4 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/a599d5a4 Branch: refs/heads/master Commit: a599d5a44031686b250e2908bfb97ce28b9714d3 Parents: 75b8eb4 Author: Garren Smith Authored: Wed Nov 23 17:14:05 2016 +0200 Committer: Garren Smith Committed: Wed Nov 30 11:38:39 2016 +0200 ---------------------------------------------------------------------- app/addons/auth/layout.js | 25 +++++++++++++++++++++++++ app/addons/auth/routes.js | 25 ++++++++++++++----------- app/addons/cluster/cluster.actions.js | 4 ++-- app/core/layout.js | 2 +- app/core/routeObject.js | 2 +- app/templates/layouts/with_sidebar.html | 27 --------------------------- 6 files changed, 43 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/addons/auth/layout.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/layout.js b/app/addons/auth/layout.js index 32559c4..648502e 100644 --- a/app/addons/auth/layout.js +++ b/app/addons/auth/layout.js @@ -14,6 +14,9 @@ import React from 'react'; import FauxtonAPI from "../../core/api"; import {OnePane, OnePaneContent} from '../components/layouts'; import {Breadcrumbs} from '../components/header-breadcrumbs'; +import Components from "./components.react"; + +const { CreateAdminForm, ChangePasswordForm } = Components; export const OnePaneHeader = ({crumbs}) => { return ( @@ -41,4 +44,26 @@ export const AuthLayout = ({crumbs, component}) => { ); }; +export const AdminLayout = ({crumbs, changePassword, component}) => { + let content = changePassword ? : ; + return ( +
+ + +
+ +
+ {content} +
+
+
+ + ); + +}; + export default AuthLayout; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/addons/auth/routes.js ---------------------------------------------------------------------- diff --git a/app/addons/auth/routes.js b/app/addons/auth/routes.js index be30171..3f67c64 100644 --- a/app/addons/auth/routes.js +++ b/app/addons/auth/routes.js @@ -17,7 +17,7 @@ import Auth from "./resources"; import AuthActions from "./actions"; import Components from "./components.react"; import ClusterActions from "../cluster/cluster.actions"; -import Layout from './layout'; +import {AuthLayout, AdminLayout} from './layout'; const {LoginForm, CreateAdminForm} = Components; @@ -40,7 +40,7 @@ var AuthRouteObject = FauxtonAPI.RouteObject.extend({ login: function () { const crumbs = [{ name: 'Log In to CouchDB' }]; - this.setComponent(".template", Layout, { + this.setComponent(".template", AuthLayout, { crumbs: crumbs, component: }); @@ -56,7 +56,7 @@ var AuthRouteObject = FauxtonAPI.RouteObject.extend({ createAdminForNode: function () { ClusterActions.fetchNodes(); const crumbs = [{ name: 'Create Admin' }]; - this.setComponent(".template", Layout, { + this.setComponent(".template", AuthLayout, { crumbs: crumbs, component: }); @@ -65,7 +65,9 @@ var AuthRouteObject = FauxtonAPI.RouteObject.extend({ var UserRouteObject = FauxtonAPI.RouteObject.extend({ - layout: 'with_sidebar', + layout: 'empty', + hideNotificationCenter: true, + hideApiBar: true, routes: { 'changePassword': { @@ -98,23 +100,24 @@ var UserRouteObject = FauxtonAPI.RouteObject.extend({ return FauxtonAPI.session.user().name; }, - initialize: function () { - this.setComponent('#sidebar-content', Components.CreateAdminSidebar); - }, - changePassword: function () { ClusterActions.fetchNodes(); AuthActions.selectPage('changePassword'); - this.setComponent('#dashboard-content', Components.ChangePasswordForm); + this.setComponent(".template", AdminLayout, { + crumbs: [{name: 'User Management'}], + changePassword: true + }); }, addAdmin: function () { ClusterActions.fetchNodes(); AuthActions.selectPage('addAdmin'); - this.setComponent('#dashboard-content', Components.CreateAdminForm, { loginAfter: false }); + this.setComponent(".template", AdminLayout, { + crumbs: [{name: 'User Management'}], + changePassword: false + }); }, - crumbs: [{name: 'User Management'}] }); Auth.RouteObjects = [AuthRouteObject, UserRouteObject]; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/addons/cluster/cluster.actions.js ---------------------------------------------------------------------- diff --git a/app/addons/cluster/cluster.actions.js b/app/addons/cluster/cluster.actions.js index f515548..47dcf0c 100644 --- a/app/addons/cluster/cluster.actions.js +++ b/app/addons/cluster/cluster.actions.js @@ -18,11 +18,11 @@ export default { fetchNodes: function () { var memberships = new ClusterResources.ClusterNodes(); - memberships.fetch().then(function () { + memberships.fetch().then(() => { this.updateNodes({ nodes: memberships.get('nodes_mapped') }); - }.bind(this)); + }); }, updateNodes: function (options) { http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/core/layout.js ---------------------------------------------------------------------- diff --git a/app/core/layout.js b/app/core/layout.js index c277889..21ecfd1 100644 --- a/app/core/layout.js +++ b/app/core/layout.js @@ -17,7 +17,7 @@ import "backbone.layoutmanager"; // Allows the main layout of the page to be changed by any plugin. var Layout = function () { this.layout = new Backbone.Layout({ - template: "templates/layouts/with_sidebar", + template: "templates/layouts/empty", className: 'pusher' }); http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/core/routeObject.js ---------------------------------------------------------------------- diff --git a/app/core/routeObject.js b/app/core/routeObject.js index de1a4bb..61a145f 100644 --- a/app/core/routeObject.js +++ b/app/core/routeObject.js @@ -72,7 +72,7 @@ _.extend(RouteObject.prototype, Backbone.Events, { routes: {}, events: {}, crumbs: [], - layout: "with_sidebar", + layout: "empty", apiUrl: null, hideNotificationPanel: null, loaderClassname: 'loader', http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a599d5a4/app/templates/layouts/with_sidebar.html ---------------------------------------------------------------------- diff --git a/app/templates/layouts/with_sidebar.html b/app/templates/layouts/with_sidebar.html deleted file mode 100644 index 6edd592..0000000 --- a/app/templates/layouts/with_sidebar.html +++ /dev/null @@ -1,27 +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. -*/%> -
-
-
- -
-
-
-
- -
- -
-
-