diff --git a/build/notify/root/opt/yunion/share/local-templates/content@cn/CREATE.tmpl b/build/notify/root/opt/yunion/share/local-templates/content@cn/CREATE.tmpl index 3e387a6430..8aa7130b4a 100644 --- a/build/notify/root/opt/yunion/share/local-templates/content@cn/CREATE.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/content@cn/CREATE.tmpl @@ -13,8 +13,8 @@ ,外网地址为{{ $d.public_dns }}:{{ $d.public_connect_port }} {{- end -}} -{{- if and $d.address_type $d.address -}} -,服务地址为{{ $d.address_type }}{{ $d.address }} +{{- if $d.address -}} +,服务地址为{{ $d.address }} {{- end -}} {{- if $d.ips -}} @@ -29,8 +29,8 @@ ,IP地址为{{ $d.ip_addr }} {{- end -}} -{{- if $d.account -}} -,初始帐号为{{ $d.account }} +{{- if $d.login_account -}} +,初始帐号为{{ $d.login_account }} {{- end -}} {{- if $d.password -}} @@ -56,7 +56,7 @@ {{- else -}} SSH {{- end -}} -或控制面板控制台访问虚拟机。 +或前往控制台访问虚拟机。 {{- end -}} {{- if has .resource_type $consoleServiceType -}} diff --git a/build/notify/root/opt/yunion/share/local-templates/content@en/CREATE.tmpl b/build/notify/root/opt/yunion/share/local-templates/content@en/CREATE.tmpl index 77fec21237..181b6483bd 100644 --- a/build/notify/root/opt/yunion/share/local-templates/content@en/CREATE.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/content@en/CREATE.tmpl @@ -9,8 +9,8 @@ Your {{ if $d.brand -}} {{ $d.brand }} {{ end -}} {{ .resource_type_display }} { , the internet address is {{ $d.public_dns }}:{{ $d.public_connect_port }} {{- end -}} -{{- if and $d.address_type $d.address -}} -, the service address is {{ $d.address_type }}{{ $d.address }} +{{- if $d.address -}} +, the service address is {{ $d.address }} {{- end -}} {{- if $d.ips -}} @@ -46,7 +46,7 @@ Your {{ if $d.brand -}} {{ $d.brand }} {{ end -}} {{ .resource_type_display }} { {{- end -}} {{- if eq .resource_type "server" -}} -, and please use {{ if $d.windows -}} Remote Desktop Connector (RDC) {{ else -}} SSH {{ end -}} or the control panel console to access the VM. +, and please use {{ if $d.windows -}} Remote Desktop Connector (RDC) {{ else -}} SSH {{ end -}} or go to the console to access the VM. {{- end -}} {{- if has .resource_type $consoleServiceType -}} diff --git a/pkg/compute/models/guest_actions.go b/pkg/compute/models/guest_actions.go index 9c7d21d98d..a5e3d9f84e 100644 --- a/pkg/compute/models/guest_actions.go +++ b/pkg/compute/models/guest_actions.go @@ -925,7 +925,7 @@ func (self *SGuest) EventNotify(ctx context.Context, userCred mcclient.TokenCred } loginAccount := meta[api.VM_METADATA_LOGIN_ACCOUNT] if len(loginAccount) > 0 { - details.Add(jsonutils.NewString(loginAccount), "account") + details.Add(jsonutils.NewString(loginAccount), "login_account") } keypair := self.getKeypairName() if len(keypair) > 0 { diff --git a/pkg/notify/models/event_template.go b/pkg/notify/models/event_template.go index f86c3d146f..2f1d475374 100644 --- a/pkg/notify/models/event_template.go +++ b/pkg/notify/models/event_template.go @@ -429,6 +429,11 @@ func init() { "baremetal", "裸金属", }, + sI18nElme{ + api.TOPIC_RESOURCE_SNAPSHOTPOLICY, + "snapshot policy", + "快照策略", + }, sI18nElme{ string(api.ActionCreate), "created",