From 2ff1ddba3d20163b110f27abfe7875d6edf2255c Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Mon, 10 Apr 2017 09:10:22 -0400 Subject: [PATCH] Nav re-order. Profile page Signed-off-by: Laurence Maultsby --- .../core/modules/api/userManagementAPI.js | 3 + .../widgets/skyquake_nav/skyquakeNav.scss | 15 ++- skyquake/plugins/accounts/config.json | 2 +- skyquake/plugins/config/config.json | 1 + skyquake/plugins/logging/config.json | 2 +- .../plugins/project_management/config.json | 3 +- skyquake/plugins/user_management/config.json | 1 + .../src/dashboard/userMgmt.scss | 16 +++ .../src/userProfile/userProfile.jsx | 104 ++++++++---------- 9 files changed, 83 insertions(+), 64 deletions(-) diff --git a/skyquake/framework/core/modules/api/userManagementAPI.js b/skyquake/framework/core/modules/api/userManagementAPI.js index c6260dfea..b0b8ad501 100644 --- a/skyquake/framework/core/modules/api/userManagementAPI.js +++ b/skyquake/framework/core/modules/api/userManagementAPI.js @@ -107,6 +107,8 @@ UserManagement.getUserInfo = function(req, userId, domain) { } }, + //id/key values for each project + projectId:[], project: { /** * [projectId] : { @@ -123,6 +125,7 @@ UserManagement.getUserInfo = function(req, userId, domain) { var userProjects = []; projects && projects.map(function(p, i) { var users = p['project-config'] && p['project-config'].user; + userData.projectId.push(p.name); users && users.map(function(u) { if(u['user-name'] == id) { userData.project[p.name] = { diff --git a/skyquake/framework/widgets/skyquake_nav/skyquakeNav.scss b/skyquake/framework/widgets/skyquake_nav/skyquakeNav.scss index c31dd7abb..6d2e5814d 100644 --- a/skyquake/framework/widgets/skyquake_nav/skyquakeNav.scss +++ b/skyquake/framework/widgets/skyquake_nav/skyquakeNav.scss @@ -22,15 +22,21 @@ justify-content: flex-end; } .app { + display: -ms-flexbox; + display: block; position:relative; margin: auto 0.5rem; + min-width: 140px; h2 { font-size:0.75rem; border-right: 1px solid black; display: -ms-flexbox; display: flex; + -ms-flex-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; -ms-flex-align: center; - align-items: center; + align-items: center; .oi { padding-right: 0.5rem; } @@ -40,6 +46,9 @@ display:none; z-index:2; width: 100%; + li { + text-align:left; + } } &:first-child{ h2 { @@ -77,7 +86,7 @@ padding:0.5rem 1rem; text-decoration:none; text-transform:uppercase; - text-align:center; + text-align:left; color:white; } &:before { @@ -94,7 +103,7 @@ align-items:center; padding-left: 1rem; text-transform:uppercase; - text-align: center; + text-align: left; border-left:1px solid white; .projectSelect { padding: 0 0.5rem; diff --git a/skyquake/plugins/accounts/config.json b/skyquake/plugins/accounts/config.json index 81bb702fd..7bea692ab 100644 --- a/skyquake/plugins/accounts/config.json +++ b/skyquake/plugins/accounts/config.json @@ -2,7 +2,7 @@ "root": "public", "name": "Accounts", "dashboard": "./account/accountsDashboard.jsx", - "order": 1, + "order": 3, "priority":1, "routes": [ { diff --git a/skyquake/plugins/config/config.json b/skyquake/plugins/config/config.json index 6fd9f4301..a861d72c7 100644 --- a/skyquake/plugins/config/config.json +++ b/skyquake/plugins/config/config.json @@ -4,6 +4,7 @@ "dashboard": "./dashboard/dashboard.jsx", "order": 1, "priority":1, + "admin_link": true, "routes": [ { "label": "Configuration Dashboard", diff --git a/skyquake/plugins/logging/config.json b/skyquake/plugins/logging/config.json index 7c43dc0a0..bd6a017f2 100644 --- a/skyquake/plugins/logging/config.json +++ b/skyquake/plugins/logging/config.json @@ -2,7 +2,7 @@ "root": "public", "name": "Logging", "dashboard": "./loggingGeneral.jsx", - "order": 101, + "order": 1, "priority":2, "admin_link": true, "routes": [ diff --git a/skyquake/plugins/project_management/config.json b/skyquake/plugins/project_management/config.json index b78e3b2bb..642fb907d 100644 --- a/skyquake/plugins/project_management/config.json +++ b/skyquake/plugins/project_management/config.json @@ -3,7 +3,8 @@ "name": "Project Management", "dashboard": "./dashboard/dashboard.jsx", "order": 1, - "priority":1, + "priority":2, + "admin_link": true, "routes": [ { "label": "Project Management Dashboard", diff --git a/skyquake/plugins/user_management/config.json b/skyquake/plugins/user_management/config.json index 42e3f185b..03662144d 100644 --- a/skyquake/plugins/user_management/config.json +++ b/skyquake/plugins/user_management/config.json @@ -4,6 +4,7 @@ "dashboard": "./dashboard/dashboard.jsx", "order": 1, "priority":1, + "admin_link": true, "allow": ["rw-rbac-platform:super-admin", "rw-rbac-platform:platform-admin", "rw-rbac-platform:platform-oper"], "routes": [ { diff --git a/skyquake/plugins/user_management/src/dashboard/userMgmt.scss b/skyquake/plugins/user_management/src/dashboard/userMgmt.scss index da31abf6c..4e935eafe 100644 --- a/skyquake/plugins/user_management/src/dashboard/userMgmt.scss +++ b/skyquake/plugins/user_management/src/dashboard/userMgmt.scss @@ -142,6 +142,21 @@ background: #00acee; } } + + + .userProfile { + &-table { + thead{ + font-weight:bold; + } + font-size: 1rem; + tr { + td { + vertical-align:top; + } + } + } + } } .addInput, .removeInput { @@ -166,3 +181,4 @@ text-transform: uppercase; } } + diff --git a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx index 67d55159e..d7cb6005a 100644 --- a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx +++ b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx @@ -38,7 +38,6 @@ class UserProfileDashboard extends React.Component { } componentWillMount() { this.Store.listen(this.updateState); - this.Store.getUsers(); } componentWillUnmount() { this.Store.unlisten(this.updateState); @@ -173,6 +172,7 @@ class UserProfileDashboard extends React.Component { render() { let self = this; + const User = this.context.userProfile || {}; let html; let props = this.props; let state = this.state; @@ -182,74 +182,62 @@ class UserProfileDashboard extends React.Component {