Skip to content

Commit

Permalink
change project to openstack swift
Browse files Browse the repository at this point in the history
Signed-off-by: Thiago da Silva <thiago@redhat.com>
  • Loading branch information
Thiago da Silva committed Sep 20, 2016
1 parent 92c58db commit 4678ad8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
4 changes: 2 additions & 2 deletions launchpad/bug.py
Expand Up @@ -37,7 +37,7 @@ def sanitize_string(self, s):
return filter(lambda x: x in string.printable, s)

def __init__(self, lpbug):

# straight copy fields from the lpbug object. this do not make any calls to LP
for name in FIELDS_TO_COPY:
setattr(self, name, getattr(lpbug, name))
Expand Down Expand Up @@ -79,7 +79,7 @@ def get_status_changes(self):
result = []

# When the bug was assigned to the release
date_open = min(d for d in [self.date_triaged, self.date_confirmed, self.date_left_new, self.date_assigned] if d is not None)
date_open = min(d for d in [self.date_created, self.date_triaged, self.date_confirmed, self.date_left_new, self.date_assigned] if d is not None)
result.append( {"date": date_open, "type": "Open", "matches": [s for s in lpdata.LaunchpadData.BUG_STATUSES["Open"] if s != "In Progress"]} )

# When the bug went to in progress state
Expand Down
2 changes: 1 addition & 1 deletion main.py
Expand Up @@ -44,7 +44,7 @@ def bug_report_get_incoming_outgoing_data(project_name, milestone_name):

@app.route('/')
def main_page():
return flask.redirect(flask.url_for("project_overview", project_name="fuel"))
return flask.redirect(flask.url_for("project_overview", project_name="Swift"))

if __name__ == "__main__":
app.run(host = "0.0.0.0", port = 4444, threaded = True, debug = True)
1 change: 0 additions & 1 deletion templates/bug_list.html
Expand Up @@ -34,4 +34,3 @@ <h2 class="sub-header">{{ bug_type }} Bugs: {{ bugs|length }} total</h2>

{% endif %}
{% endblock %}

4 changes: 2 additions & 2 deletions templates/bug_table.html
@@ -1,9 +1,9 @@
{% extends "layout.html" %}
{% block body %}

<p>
<!-- <p>
<h4><input type="checkbox" id="tagged"> Only customer-found</input></h4>
</p>
</p>-->

<script>
var customer_found = false;
Expand Down
14 changes: 7 additions & 7 deletions templates/bug_trends.html
@@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% block body %}

<h2 class="page-header">{{ milestone_name }} Release Bug Trends</h2>
<h2 class="page-header">Bug Trends</h2>

<div class="row placeholders">
<div id="bug-report-chart">
Expand All @@ -10,7 +10,7 @@ <h2 class="page-header">{{ milestone_name }} Release Bug Trends</h2>
</div>
</div>

<h2 class="page-header">{{ milestone_name }} Incoming/Outgoing Bugs (Weekly)</h2>
<h2 class="page-header">Incoming/Outgoing Bugs (Weekly)</h2>
<div class="row placeholders">
<div id="bug-incoming-outgoing-chart">
<img src="{{ url_for('static', filename='loader.gif') }}" />
Expand Down Expand Up @@ -82,12 +82,12 @@ <h2 class="page-header">{{ milestone_name }} Incoming/Outgoing Bugs (Weekly)</h2
.showControls(true) //Allow user to switch between 'Grouped' and 'Stacked' mode.
.groupSpacing(0.1) //Distance between each group of bars.
;

chart.xAxis
.showMaxMin(true)
.axisLabel('Date')
.tickFormat(function(d) { return d3.time.format('%x')(new Date(d)) });

chart.yAxis
.showMaxMin(true)
.axisLabel('# of bugs')
Expand All @@ -96,9 +96,9 @@ <h2 class="page-header">{{ milestone_name }} Incoming/Outgoing Bugs (Weekly)</h2
d3.select('#bug-incoming-outgoing-chart svg')
.datum(data)
.transition().duration(500).call(chart);

nv.utils.windowResize(chart.update);

$('#bug-incoming-outgoing-chart img').hide();

return chart;
Expand All @@ -107,4 +107,4 @@ <h2 class="page-header">{{ milestone_name }} Incoming/Outgoing Bugs (Weekly)</h2

</script>

{% endblock %}
{% endblock %}
16 changes: 8 additions & 8 deletions templates/layout.html
Expand Up @@ -30,7 +30,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project: {{ project.name }}</a>
<a class="navbar-brand" href="#">Project: {{ project.display_name }}</a>
</div>
<!--
<div class="navbar-collapse collapse">
Expand Down Expand Up @@ -59,15 +59,15 @@
<li {% if selected_bug_table and bug_type == 'New' %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='New', milestone_name='None') }}">New bugs</a></li>
</ul>

{% for m in project.active_milestones|sort %}
{% for m in ['None']|sort %}
<ul class="nav nav-sidebar">
<li {% if selected_bug_trends and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_trends', project_name=project.name, milestone_name=m) }}">{{ m }}: Bug Trends</a></li>
<li {% if selected_bug_table and bug_type == 'Open' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Open', milestone_name=m) }}">{{ m }}: Open Bugs</a></li>
<li {% if selected_bug_table and bug_type == 'Incomplete' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Incomplete', milestone_name=m) }}">{{ m }}: Incomplete Bugs</a></li>
<li {% if selected_bug_table and bug_type == 'Closed' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Closed', milestone_name=m) }}">{{ m }}: Closed Bugs</a></li>
<li {% if selected_bug_trends and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_trends', project_name=project.name, milestone_name=m) }}">Bug Trends</a></li>
<li {% if selected_bug_table and bug_type == 'Open' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Open', milestone_name=m) }}">Open Bugs</a></li>
<li {% if selected_bug_table and bug_type == 'Incomplete' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Incomplete', milestone_name=m) }}">Incomplete Bugs</a></li>
<li {% if selected_bug_table and bug_type == 'Closed' and milestone_name == m %}class="active"{% endif %}><a href="{{ url_for('bug_table_for_status', project_name=project.name, bug_type='Closed', milestone_name=m) }}">Closed Bugs</a></li>
</ul>
{% endfor %}
{% endfor %}

</div>
<!-- Bootstrap core JavaScript
================================================== -->
Expand Down

0 comments on commit 4678ad8

Please sign in to comment.