From 633726e48fd4693c58b98a3102da149b42ddee4d Mon Sep 17 00:00:00 2001 From: Zhang Dongliang Date: Mon, 18 Apr 2022 15:47:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(notify):=20=E9=80=9A=E7=9F=A5=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../local-templates/content@cn/CHECKSUM_TEST_FAILED.tmpl | 9 ++++----- .../local-templates/content@en/CHECKSUM_TEST_FAILED.tmpl | 2 +- .../local-templates/title@cn/CHECKSUM_TEST_FAILED.tmpl | 5 +++++ .../local-templates/title@en/CHECKSUM_TEST_FAILED.tmpl | 5 +++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build/notify/root/opt/yunion/share/local-templates/content@cn/CHECKSUM_TEST_FAILED.tmpl b/build/notify/root/opt/yunion/share/local-templates/content@cn/CHECKSUM_TEST_FAILED.tmpl index e02957b5aa..a6ec4613e2 100644 --- a/build/notify/root/opt/yunion/share/local-templates/content@cn/CHECKSUM_TEST_FAILED.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/content@cn/CHECKSUM_TEST_FAILED.tmpl @@ -1,14 +1,13 @@ {{- $d := .resource_details -}} {{- if eq .resource_type "db_table_field" }} -数据库{{ $d.db_name }}表{{ $d.table_name }}记录{{ $d.name }}被修改, +数据库{{ $d.db_name }}表{{ $d.table_name }}记录{{ $d.name }}被修改,完整性校验失败 {{- end -}} {{- if eq .resource_type "cloudpods_component" }} -组件{{ $d.name }} +{{ $d.details }} {{- end -}} {{- if eq .resource_type "snapshot" }} -快照{{ $d.name }}的内存快照 +快照{{ $d.name }}的内存快照完整性校验失败 {{- end -}} {{- if eq .resource_type "image" }} -镜像{{ $d.name }} +镜像{{ $d.name }}完整性校验失败 {{- end -}} -完整性校验失败 diff --git a/build/notify/root/opt/yunion/share/local-templates/content@en/CHECKSUM_TEST_FAILED.tmpl b/build/notify/root/opt/yunion/share/local-templates/content@en/CHECKSUM_TEST_FAILED.tmpl index a38e857aae..b0d5d25635 100644 --- a/build/notify/root/opt/yunion/share/local-templates/content@en/CHECKSUM_TEST_FAILED.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/content@en/CHECKSUM_TEST_FAILED.tmpl @@ -3,7 +3,7 @@ The record {{ $d.name }} in table {{ $d.table_name }} of the database {{ $d.db_name }} has been modified because the checksum test failed. {{- end -}} {{- if eq .resource_type "cloudpods_component" }} -The checksum of cloudpods component {{ $d.name }} test failed. +{{ $d.details }} {{- end -}} {{- if eq .resource_type "snapshot" }} The checksum of the memory snapshot of the snapshot {{ $d.name }} test failed. diff --git a/build/notify/root/opt/yunion/share/local-templates/title@cn/CHECKSUM_TEST_FAILED.tmpl b/build/notify/root/opt/yunion/share/local-templates/title@cn/CHECKSUM_TEST_FAILED.tmpl index ec1a6b946e..884374def0 100644 --- a/build/notify/root/opt/yunion/share/local-templates/title@cn/CHECKSUM_TEST_FAILED.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/title@cn/CHECKSUM_TEST_FAILED.tmpl @@ -1 +1,6 @@ +{{- $d := .resource_details -}} +{{- if eq .resource_type "cloudpods_component" }} +{{ $d.title }} +{{- else -}} {{ .resource_type_display }}完整性校验失败 +{{- end -}} diff --git a/build/notify/root/opt/yunion/share/local-templates/title@en/CHECKSUM_TEST_FAILED.tmpl b/build/notify/root/opt/yunion/share/local-templates/title@en/CHECKSUM_TEST_FAILED.tmpl index de46dab56b..f40aa942e1 100644 --- a/build/notify/root/opt/yunion/share/local-templates/title@en/CHECKSUM_TEST_FAILED.tmpl +++ b/build/notify/root/opt/yunion/share/local-templates/title@en/CHECKSUM_TEST_FAILED.tmpl @@ -1 +1,6 @@ +{{- $d := .resource_details -}} +{{- if eq .resource_type "cloudpods_component" }} +{{ $d.title }} +{{- else -}} The checksum of {{ .resource_type_display }} test failed +{{- end -}}