Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Commit

Permalink
Merge pull request #9 from PhysiciansDataCollaborative/dev
Browse files Browse the repository at this point in the history
0.1.2
  • Loading branch information
DerekRoberts committed Jul 30, 2015
2 parents a6e38bf + a21b7fc commit a676f60
Show file tree
Hide file tree
Showing 29 changed files with 1,696 additions and 503 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cert/
.vagrant/
runme.sh
*.log
.idea/
181 changes: 156 additions & 25 deletions assets/css/auxilary.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,181 @@
html, body {
height: 100%;
height: 100%;
}

body {
padding: 50px 0 0 0;
padding: 50px 0 0 0;
font-family: "HelveticaNeue-Light", "Helvetica Neue Thin", "Helvetica Neue";
}

span {
font-weight: 200;
font-style: normal;
font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
font-weight: 200;
}

.navbar-toggle {
float: left;
margin-left: 15px;
float: left;
margin-left: 15px;
}

@media (min-width: 0) {
.navbar-toggle {
display: block; /* force showing the toggle */
}
.navbar-toggle {
display: block; /* force showing the toggle */
}
}

@media (min-width: 992px) {
body {
padding: 0;
}
.navbar {
right: auto;
background: none;
border: none;
box-shadow: none;
}
body {
padding: 0;
}

.navbar {
right: auto;
background: none;
border: none;
box-shadow: none;
}
}

.navmenu-header {
display: block;
font-size: 18px;
line-height: 20px;
padding: 10px 15px;
margin: 10px 0;
display: block;
font-size: 18px;
line-height: 20px;
padding: 10px 15px;
margin: 10px 0;
}

.navmenu-header:hover,
.navmenu-header:focus {
text-decoration: none;
text-decoration: none;
}

.darkened {
background: #444444;
background: #444444;
}

.nav > li > a {
display: inline-block;
}
display: inline-block;
}

.login-wrapper {
margin-left: auto;
margin-right: auto;
max-width: 900px;
min-width: 750px;
}

.left-logo {

width: 60%;
min-width: 317px;
max-width: 317px;
min-height: 48px;

}

.top-row {

margin-top: 20px;
}

.login-row {

margin-top: 10px;
width: 100%;
background-color: #F0F0F0;
border-radius: 5px;

}

.wrapper {
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}

.container{
min-width: 960px;
}

.welcome-message {

font-size: 36px;
font-style: normal;
font-weight: 200;

}

.user-dropdown {
margin-top: 10px;
text-align: right;
}

.user-dropdown-item {
text-align: left;

}

#userDropdown {
min-width: 120px;
text-align: left;

}

.initiative-title-wrap {
padding-left: 0px;
margin-top: 10px;
}

.initiative-logo-wrap {
padding-right: 0;
opacity: 0.5;
}

.initiative-logo-wrap:hover {
opacity: 1;
}

.navbar-box > img {
width: 30px;
height: 30px;
}

.navbar-box {
border-right: 1px solid dimgray;
padding: 10px;
text-align: center;
}

.navbar-box:hover {
background-color: #e6e6e6;
}

.navbar-box > span {
margin-top: 1px;
margin-left: 5px;
text-decoration: none;
color: black; /** remove color from the hyperlinking */

}

.navbar-outer {
margin-top: 20px;
border: 1px solid dimgray;
border-radius: 5px;
}

.navbar-box.far-right {

border-right: none;

}

svg {
text-align: center;
}

Binary file added assets/images/attachment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/data-quality.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/polypharmacy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/population-health.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/practice-reflection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ function middleware(next, data) {
} else {


logger.warn(util.inspect(body));
logger.error(body.federation);
logger.error(body.jurisdiction);
logger.error(body.username);

if (!(body.federation && body.jurisdiction && body.username)) {

logger.error(util.inspect(body));
logger.warn("middleware.hubapiGet() : User verification failed.");
next(401, null);
return;
Expand Down Expand Up @@ -378,6 +384,7 @@ function middleware(next, data) {

if (request && request.body) {

logger.success(util.inspect(request.body));
req.visualization = request.body;
callback();

Expand Down Expand Up @@ -463,7 +470,7 @@ function middleware(next, data) {
//return an empty array for reports.
logger.warn("middleware.populateReportsList caused an error (" + error + "), returning empty list.");
req.reports = [];
return callback()
return callback();
break;

}
Expand All @@ -474,10 +481,10 @@ function middleware(next, data) {

if (response.body[i] && response.body[i].shortTitle) {

toReturn.push({
toReturn[response.body[i].shortTitle] = {
shortTitle: response.body[i].shortTitle += ".csv",
title : response.body[i].title
});
};

}

Expand Down Expand Up @@ -527,10 +534,9 @@ function middleware(next, data) {

try {

if (!req.body.jur && !req.body.user && !req.body.password) {
if (!req.body.juri || !req.body.user || !req.body.password) {

res.statusCode = 401;
res.redirect('/auth', {message: "Please provide username, password, and jurisdiction"});
res.redirect(401, '/auth');

} else {

Expand Down Expand Up @@ -613,6 +619,9 @@ function middleware(next, data) {
//if we get here we have a valid session.
req.session.bakedCookie = authResult.cookie;
req.session.user = user;

logger.success(authResult.cookie);

callback();

}
Expand Down
Loading

0 comments on commit a676f60

Please sign in to comment.