Skip to content
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

Display version number on main page #71

Closed
omwah opened this issue Jul 11, 2013 · 12 comments
Closed

Display version number on main page #71

omwah opened this issue Jul 11, 2013 · 12 comments

Comments

@omwah
Copy link
Collaborator

omwah commented Jul 11, 2013

In order to help debug customer issues, the main IIAB page should show the version number. Also we should tag the repo with version numbers before we deploy new rpms.

@braddockcg
Copy link
Collaborator

John,
This is a good ice breaker task to get you oriented to the system. Please add code to display the version number stored in iiab.version to the Settings page. version is defined in iiab/init.py. You will need to pass it as a parameter to the top level home template, and then display it in the templates/home.html template in the div for id="page11".

Not much of a task, but it will force you to learn about the templating system and position you to handle more sophisticated tasks.

Thanks,
Braddock

@johnjkim
Copy link
Contributor

Yessir. I will take on this issue.

@ghost ghost assigned johnjkim Jul 17, 2013
@johnjkim
Copy link
Contributor

Done; the task wasn't so bad. Please check. Fortunately, Vim skills came in quite handy there.

A few questions:
Is there some sort of review procedure you have before a contributor can push into the system? What about displaying the version number on "the main IIAB page" as omwah suggested? Wouldn't that mean including the version number on the home screen?

Thanks.

@braddockcg
Copy link
Collaborator

Sorry John, not quite that easy. You need to pass iiab.version itself into the template, not just update the text to "0.4.4". We need to have one place where version is stored - in iiab/init.py - I have to update it every time there is a new release. We can't maintain the HTML separately.

So you need to pass iiab.version into the template and have it display. Does that make sense?

Thanks,
Braddock

@gnufreedom100
Copy link
Collaborator

Hi John,

The Jinja template docs are at http://jinja.pocoo.org/docs/templates/ .
You can put your python code between the {% %} blocks, and you output
the contents of a variable with {{ your_variable }} .

Internationalization stuff is at http://pythonhosted.org/Flask-Babel/ .

@omwah
Copy link
Collaborator Author

omwah commented Jul 18, 2013

Also, be aware that I moved settings into its own template file last night. So make sure you pull the latest changes.

@johnjkim
Copy link
Contributor

Ok, seems that I will have to study the different statements in Jinja.

@braddockcg
Copy link
Collaborator

Thanks John. Hopefully this will be a pleasant learning experience which will enable you to help on more complex matters. Let us know if you have any questions or want a different task.

@johnjkim
Copy link
Contributor

By the way, omwah, from moving settings to its own template, the language button is broken.

@omwah
Copy link
Collaborator Author

omwah commented Jul 19, 2013

Yes I am in the progress of fixing that.

@johnjkim
Copy link
Contributor

Woot. I've accomplished the task, but I accidentally did a git push -f, removing two of your commits. Please don't pull the first thing today.

Anyway, how does it look?

@braddockcg
Copy link
Collaborator

Nice work! Looks good. When you complete a task feel free to close the ticket. I'll think of something else for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants