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']
|
pt_class = project_type_inst['id']
|
||||||
if project_type_inst.get('parent'):
|
if project_type_inst.get('parent'):
|
||||||
pt_class = project_type_inst['parent']['id']
|
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 company or user_inst:
|
||||||
if user_inst:
|
if user_inst:
|
||||||
@ -333,7 +335,7 @@ def make_page_title(project_type_inst, release, module_inst, company,
|
|||||||
if is_openstack:
|
if is_openstack:
|
||||||
s = 'OpenStack community'
|
s = 'OpenStack community'
|
||||||
else:
|
else:
|
||||||
s = project_type_inst['title'] + ' community'
|
s = pt_title + ' community'
|
||||||
s += ' contribution'
|
s += ' contribution'
|
||||||
if module_inst:
|
if module_inst:
|
||||||
s += ' to %s' % module_inst['module_group_name']
|
s += ' to %s' % module_inst['module_group_name']
|
||||||
|
@ -194,7 +194,7 @@
|
|||||||
var options = {};
|
var options = {};
|
||||||
options['release'] = 'all';
|
options['release'] = 'all';
|
||||||
options['metric'] = 'members';
|
options['metric'] = 'members';
|
||||||
options['project_type'] = 'all';
|
options['project_type'] = '{{ project_type }}';
|
||||||
|
|
||||||
options['company'] = $('#company_selector').val();
|
options['company'] = $('#company_selector').val();
|
||||||
options['days'] = $('#days_selector').val();
|
options['days'] = $('#days_selector').val();
|
||||||
@ -211,7 +211,7 @@
|
|||||||
function show_page() {
|
function show_page() {
|
||||||
|
|
||||||
var start_date = get_start_date();
|
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);
|
renderTimeline(base_options);
|
||||||
|
|
||||||
show_engineers_table(base_options);
|
show_engineers_table(base_options);
|
||||||
@ -230,7 +230,7 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
var start_date = get_start_date();
|
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});
|
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:
|
if not project_type:
|
||||||
return False
|
return False
|
||||||
project_type = project_type.lower()
|
project_type = project_type.lower()
|
||||||
if project_type == 'all':
|
|
||||||
return True
|
|
||||||
project_types = get_vault().get('project_types_index', [])
|
project_types = get_vault().get('project_types_index', [])
|
||||||
return project_type in project_types
|
return project_type in project_types
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user