Severity and Markdown support in MOTD

[Delivers #133555165]
This commit is contained in:
Joseph Schorr 2017-01-17 16:41:24 -05:00
parent 0f203b01d3
commit 3106504f39
13 changed files with 234 additions and 36 deletions

View file

@ -395,6 +395,7 @@ def initialize_database():
MediaType.create(name='text/plain')
MediaType.create(name='application/json')
MediaType.create(name='text/markdown')
LabelSourceType.create(name='manifest')
LabelSourceType.create(name='api', mutable=True)
@ -798,7 +799,11 @@ def populate_database(minimal=False, with_storage=False):
'trigger_id': trigger.uuid, 'config': json.loads(trigger.config),
'service': trigger.service.name})
model.message.create([{'content': 'We love you, Quay customers!'}])
model.message.create([{'content': 'We love you, Quay customers!', 'severity': 'info',
'media_type': 'text/plain'}])
model.message.create([{'content': 'This is a **development** install of Quay',
'severity': 'warning', 'media_type': 'text/markdown'}])
fake_queue = WorkQueue('fakequeue', tf)
fake_queue.put(['canonical', 'job', 'name'], '{}')