Merge "project_type: value 'all' may not be defined"
This commit is contained in:
commit
0029c2a877
@ -320,7 +320,9 @@ def make_page_title(project_type_inst, release, module_inst, company,
|
||||
pt_class = project_type_inst['id']
|
||||
if project_type_inst.get('parent'):
|
||||
pt_class = project_type_inst['parent']['id']
|
||||
is_openstack = pt_class == 'all' or pt_class[:9] == 'openstack'
|
||||
pt_title = project_type_inst['title']
|
||||
is_openstack = (pt_title.lower() == 'openstack' or
|
||||
pt_class[:9] == 'openstack')
|
||||
|
||||
if company or user_inst:
|
||||
if user_inst:
|
||||
@ -333,7 +335,7 @@ def make_page_title(project_type_inst, release, module_inst, company,
|
||||
if is_openstack:
|
||||
s = 'OpenStack community'
|
||||
else:
|
||||
s = project_type_inst['title'] + ' community'
|
||||
s = pt_title + ' community'
|
||||
s += ' contribution'
|
||||
if module_inst:
|
||||
s += ' to %s' % module_inst['module_group_name']
|
||||
|
@ -194,7 +194,7 @@
|
||||
var options = {};
|
||||
options['release'] = 'all';
|
||||
options['metric'] = 'members';
|
||||
options['project_type'] = 'all';
|
||||
options['project_type'] = '{{ project_type }}';
|
||||
|
||||
options['company'] = $('#company_selector').val();
|
||||
options['days'] = $('#days_selector').val();
|
||||
@ -211,7 +211,7 @@
|
||||
function show_page() {
|
||||
|
||||
var start_date = get_start_date();
|
||||
var base_options = { metric: 'members', project_type: 'all', release: 'all', start_date: start_date };
|
||||
var base_options = { metric: 'members', project_type: '{{ project_type }}', release: 'all', start_date: start_date };
|
||||
renderTimeline(base_options);
|
||||
|
||||
show_engineers_table(base_options);
|
||||
@ -230,7 +230,7 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
var start_date = get_start_date();
|
||||
var base_options = { metric: 'members', project_type: 'all', release: 'all', start_date: start_date };
|
||||
var base_options = { metric: 'members', project_type: '{{ project_type }}', release: 'all', start_date: start_date };
|
||||
|
||||
initSingleSelector("company", makeURI("/api/1.0/companies", base_options), {allowClear: true});
|
||||
|
||||
|
@ -194,8 +194,6 @@ def is_project_type_valid(project_type):
|
||||
if not project_type:
|
||||
return False
|
||||
project_type = project_type.lower()
|
||||
if project_type == 'all':
|
||||
return True
|
||||
project_types = get_vault().get('project_types_index', [])
|
||||
return project_type in project_types
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user