-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network page #67
Network page #67
Conversation
So code is still dirty but features should be there. I think this is ready for review, the whole project code has to be cleaned up at the end anyway ;) |
6b84104
to
5fb4b87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! A few comments.
@@ -28,8 +46,12 @@ routes.info = function (req, res, db) { | |||
} | |||
|
|||
routes.renderNetwork = function (network, res, db) { | |||
db.Pod.projectStats(network, function (projectStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is db.Pod.projectStats
used anywhere after this? Can be removed in database.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Flaburgan I think you were supposed to remove this from database.js by looking at the commit - but it's still there? :)
src/routes.js
Outdated
@@ -3,6 +3,24 @@ | |||
var routes = {}, | |||
util = require('util'); | |||
|
|||
var networkTexts = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we could put texts like these in a separate file and require
them? For example src/texts.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we would even put them in the DB so I considered that as a temp. But it can be kept as a json somewhere.
Remarks corrected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can remove the unused db method then we can merge!
@@ -28,8 +46,12 @@ routes.info = function (req, res, db) { | |||
} | |||
|
|||
routes.renderNetwork = function (network, res, db) { | |||
db.Pod.projectStats(network, function (projectStats) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Flaburgan I think you were supposed to remove this from database.js by looking at the commit - but it's still there? :)
src/texts.js
Outdated
@@ -0,0 +1,22 @@ | |||
//TODO Move them directly in the DB? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I'm not sure what would be the benefit. If they are in a file we can make them translatable easily in the future. There is no need for these to be dynamic, thus imho they shouldn't be in the db. People can change them via PR's.
719c124
to
9578283
Compare
Corrected. |
Alright, thanks a lot, merging! |
I started to work on the network pages. The code is still quite dirty and will be refactored but I wanted to open this PR to have feedback. As for the previous PR, the texts are not definitive and the design is not correctly done. I just tried to get the data from the DB and to display them. Still a lot of work to do.