Add 'app observatory' category

This commit is contained in:
Alexandre Aubin 2018-05-30 02:31:02 +02:00
parent f579dad5b3
commit a290c879aa
2 changed files with 29 additions and 14 deletions

View file

@ -22,18 +22,6 @@ def sort_test_results(results):
def index(): def index():
return render_template('index.html') return render_template('index.html')
@main.route('/applist_history')
def applist_history():
data = json.loads(open("./app/scripts/appListsHistory/count_history.json").read())
return render_template('applist_history.html', data=data)
@main.route('/apps.rss')
def apps_rss():
file_ = open("./app/scripts/appListsHistory/atom.xml").read()
response = make_response(file_)
response.headers['Content-Type'] = 'application/rss+xml'
return response
@main.route('/pullrequests') @main.route('/pullrequests')
def pullrequests(): def pullrequests():
@ -50,6 +38,10 @@ def pullrequests():
return render_template("pullrequests.html", prs=prs, count_by_team=count_by_team) return render_template("pullrequests.html", prs=prs, count_by_team=count_by_team)
#
# Apps CI
#
@main.route('/appci/branch/<branch>') @main.route('/appci/branch/<branch>')
def appci_branch(branch): def appci_branch(branch):
@ -133,3 +125,21 @@ def badge(app):
return response return response
#
# Apps observatory
#
@main.route('/applist_history')
@main.route('/appsobservatory/history')
def appsobservatory_history():
data = json.loads(open("./app/scripts/appListsHistory/count_history.json").read())
return render_template('applist_history.html', data=data)
@main.route('/appsobservatory/rss')
def appsobservatory_rss():
file_ = open("./app/scripts/appListsHistory/atom.xml").read()
response = make_response(file_)
response.headers['Content-Type'] = 'application/rss+xml'
return response

View file

@ -40,8 +40,13 @@
<a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="arm")}}">Stable vs. ARM</a> <a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="arm")}}">Stable vs. ARM</a>
<a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="testing")}}">Stable vs. Testing</a> <a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="testing")}}">Stable vs. Testing</a>
<a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="stretch")}}">Stable vs. Stretch</a> <a class="dropdown-item" href="{{ url_for('main.appci_compare', ref="stable", target="stretch")}}">Stable vs. Stretch</a>
<div class="dropdown-divider"></div> </div>
<a class="dropdown-item" href="{{ url_for('main.applist_history')}}">Apps list history graph</a> </li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown">Apps observatory</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ url_for('main.appsobservatory_history')}}">History graphs</a>
<a class="dropdown-item" href="{{ url_for('main.appsobservatory_rss')}}">RSS</a>
</div> </div>
</li> </li>
</ul> </ul>