Allow the default project change list query to be customized
Change-Id: I84a5f701db52425ddbeac566eed45889a98a685b
This commit is contained in:
parent
ffee46e7ee
commit
492a857764
|
@ -31,6 +31,12 @@ commentlinks:
|
||||||
text: "{id}"
|
text: "{id}"
|
||||||
query: "changeid:{id}"
|
query: "changeid:{id}"
|
||||||
|
|
||||||
|
# This is the query used for the list of changes when a project is
|
||||||
|
# selected. The default is "status:open"; if you don't want to see
|
||||||
|
# WIP changes, use a query like this:
|
||||||
|
#
|
||||||
|
# change-list-query: "status:open not label:Workflow=-1"
|
||||||
|
|
||||||
dashboards:
|
dashboards:
|
||||||
- name: "My changes"
|
- name: "My changes"
|
||||||
query: "owner:self status:open"
|
query: "owner:self status:open"
|
||||||
|
|
|
@ -89,6 +89,7 @@ class ConfigSchema(object):
|
||||||
'commentlinks': self.commentlinks,
|
'commentlinks': self.commentlinks,
|
||||||
'dashboards': self.dashboards,
|
'dashboards': self.dashboards,
|
||||||
'reviewkeys': self.reviewkeys,
|
'reviewkeys': self.reviewkeys,
|
||||||
|
'change-list-query': str,
|
||||||
})
|
})
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
@ -141,6 +142,8 @@ class Config(object):
|
||||||
text="{url}",
|
text="{url}",
|
||||||
url="{url}"))])))
|
url="{url}"))])))
|
||||||
|
|
||||||
|
self.project_change_list_query = self.config.get('change-list-query', 'status:open')
|
||||||
|
|
||||||
self.dashboards = OrderedDict()
|
self.dashboards = OrderedDict()
|
||||||
for d in self.config.get('dashboards', []):
|
for d in self.config.get('dashboards', []):
|
||||||
self.dashboards[d['key']] = d
|
self.dashboards[d['key']] = d
|
||||||
|
|
|
@ -129,7 +129,7 @@ class ProjectListView(urwid.WidgetWrap):
|
||||||
project_key, project_name = data
|
project_key, project_name = data
|
||||||
self.app.changeScreen(view_change_list.ChangeListView(
|
self.app.changeScreen(view_change_list.ChangeListView(
|
||||||
self.app,
|
self.app,
|
||||||
"_project_key:%s status:open" % project_key,
|
"_project_key:%s %s" % (project_key, self.app.config.project_change_list_query),
|
||||||
project_name, unreviewed=True))
|
project_name, unreviewed=True))
|
||||||
|
|
||||||
def keypress(self, size, key):
|
def keypress(self, size, key):
|
||||||
|
|
Loading…
Reference in New Issue