mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
feat(notify): add action 'change_ipaddr' for notify topic
This commit is contained in:
@@ -32,6 +32,7 @@ var (
|
||||
ActionResize SAction = "resize"
|
||||
ActionExpiredRelease SAction = "expired_release"
|
||||
ActionExecute SAction = "execute"
|
||||
ActionChangeIpaddr SAction = "change_ipaddr"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -151,6 +151,7 @@ var action2Topic = make(map[string]string, 0)
|
||||
func init() {
|
||||
action2Topic[string(api.ActionRebuildRoot)] = string(api.ActionUpdate)
|
||||
action2Topic[string(api.ActionResetPassword)] = string(api.ActionUpdate)
|
||||
action2Topic[string(api.ActionChangeIpaddr)] = string(api.ActionUpdate)
|
||||
}
|
||||
|
||||
func (lt *SLocalTemplateManager) fillWithTemplate(ctx context.Context, titleOrContent string, contactType string, lang string, event api.SEvent, dis jsonutils.JSONObject) (string, error) {
|
||||
|
||||
@@ -149,6 +149,9 @@ func (sm *STopicManager) InitializeData() error {
|
||||
notify.TOPIC_RESOURCE_ELASTICCACHE,
|
||||
)
|
||||
t.addAction(notify.ActionUpdate)
|
||||
t.addAction(notify.ActionRebuildRoot)
|
||||
t.addAction(notify.ActionResetPassword)
|
||||
t.addAction(notify.ActionChangeIpaddr)
|
||||
t.Type = notify.TOPIC_TYPE_RESOURCE
|
||||
case DefaultResourceReleaseDue1Day:
|
||||
t.addResources(
|
||||
@@ -340,6 +343,7 @@ func init() {
|
||||
notify.ActionChangeConfig,
|
||||
notify.ActionExpiredRelease,
|
||||
notify.ActionExecute,
|
||||
notify.ActionChangeIpaddr,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user