Merge pull request #2282 from coreos-inc/motd-updates

Severity and Markdown support in MOTD
This commit is contained in:
josephschorr 2017-01-18 17:41:27 -05:00 committed by GitHub
commit e2748fccd9
13 changed files with 234 additions and 36 deletions

View file

@ -828,11 +828,6 @@ class LogEntry(BaseModel):
(('repository', 'datetime', 'kind'), False),
)
class Messages(BaseModel):
content = TextField()
# TODO: This should be non-nullable and indexed
uuid = CharField(default=uuid_generator, max_length=36, null=True)
class RepositoryActionCount(BaseModel):
repository = ForeignKeyField(Repository)
@ -1022,6 +1017,13 @@ class MediaType(BaseModel):
name = CharField(index=True, unique=True)
class Messages(BaseModel):
content = TextField()
uuid = CharField(default=uuid_generator, max_length=36, index=True)
severity = CharField(default='info', index=True)
media_type = ForeignKeyField(MediaType)
class LabelSourceType(BaseModel):
""" LabelSourceType is an enumeration of the possible sources for a label. """
name = CharField(index=True, unique=True)