# What this PR does Adds labels implementation for integrations: - ability to create/update labels on creating/updating integration - ability to associate labels to integrations - cache for label reprs on OnCall side - feature flag to enable/disable labels ## Which issue(s) this PR fixes https://github.com/grafana/oncall-private/issues/2157 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Maxim <maxim.mordasov@grafana.com> Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
25 lines
621 B
Python
25 lines
621 B
Python
import factory
|
|
|
|
from apps.labels.models import AlertReceiveChannelAssociatedLabel, LabelKeyCache, LabelValueCache
|
|
from common.utils import UniqueFaker
|
|
|
|
|
|
class LabelKeyFactory(factory.DjangoModelFactory):
|
|
id = UniqueFaker("word")
|
|
name = UniqueFaker("word")
|
|
|
|
class Meta:
|
|
model = LabelKeyCache
|
|
|
|
|
|
class LabelValueFactory(factory.DjangoModelFactory):
|
|
id = UniqueFaker("word")
|
|
name = UniqueFaker("word")
|
|
|
|
class Meta:
|
|
model = LabelValueCache
|
|
|
|
|
|
class AlertReceiveChannelAssociatedLabelFactory(factory.DjangoModelFactory):
|
|
class Meta:
|
|
model = AlertReceiveChannelAssociatedLabel
|