diff --git a/plugins/database/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java b/plugins/database/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java index b31f05e069f..b5fa5723c3f 100644 --- a/plugins/database/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java +++ b/plugins/database/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java @@ -69,6 +69,6 @@ public interface QuotaConfig { "Sender of quota alert email (will be in the From header of the email)", true); enum QuotaEmailTemplateTypes { - QUOTA_LOW, QUOTA_EMPTY, QUOTA_UNLOCK_ACCOUNT + QUOTA_LOW, QUOTA_EMPTY, QUOTA_UNLOCK_ACCOUNT, QUOTA_STATEMENT } } \ No newline at end of file diff --git a/setup/db/db/schema-451to452.sql b/setup/db/db/schema-451to452.sql index 697004663fc..bea9f6f0fbb 100644 --- a/setup/db/db/schema-451to452.sql +++ b/setup/db/db/schema-451to452.sql @@ -130,7 +130,8 @@ LOCK TABLES `cloud_usage`.`quota_email_templates` WRITE; INSERT INTO `cloud_usage`.`quota_email_templates` (`template_name`, `template_subject`, `template_body`) VALUES ('QUOTA_LOW', 'Quota Usage Threshold crossed by your account ${accountName}', 'Your account ${accountName} in the domain ${domainName} has reached quota usage threshold, your current quota balance is ${quotaBalance}.'), ('QUOTA_EMPTY', 'Quota Exhausted, account ${accountName} is locked now', 'Your account ${accountName} in the domain ${domainName} has exhausted allocated quota and has been locked now, please contact the administrator.'), - ('QUOTA_UNLOCK_ACCOUNT', 'Quota credits added, account ${accountName} is unlocked now', 'Your account ${accountName} in the domain ${domainName} has enough quota credits now with the current balance of ${quotaBalance}. Your account has been unlocked now.'); + ('QUOTA_UNLOCK_ACCOUNT', 'Quota credits added, account ${accountName} is unlocked now', 'Your account ${accountName} in the domain ${domainName} has enough quota credits now with the current balance of ${quotaBalance}. Your account has been unlocked now.'), + ('QUOTA_STATEMENT', 'Quota Statement for your account ${accountName}', 'Monthly quota statement of your account ${accountName} in the domain ${domainName}:
Balance = ${quotaBalance}
Total Usage = ${quotaUsage}.'); UNLOCK TABLES; CREATE TABLE IF NOT EXISTS `cloud_usage`.`quota_sent_emails` ( diff --git a/ui/plugins/quota/quota.js b/ui/plugins/quota/quota.js index 368ccb5f2bc..7a57e578e85 100644 --- a/ui/plugins/quota/quota.js +++ b/ui/plugins/quota/quota.js @@ -585,7 +585,7 @@ var g_quotaCurrency = ''; var emailTemplateForm = $('
'); var templateDropdown = $('
'); - var templateOptions = $(''); + var templateOptions = $(''); templateOptions.appendTo($('

Select Template:

').appendTo(templateDropdown)); $('
').appendTo(templateDropdown); @@ -645,7 +645,7 @@ var g_quotaCurrency = ''; templateBodyTextArea.appendTo(emailTemplateForm); saveTemplateButton.appendTo(emailTemplateForm); $('
').appendTo(emailTemplateForm); - $('

').html("These options can be used in template as ${variable}: quotaBalance, accountName, accountID, accountUsers, domainName, domainID").appendTo(emailTemplateForm); + $('

').html("These options can be used in template as ${variable}: quotaBalance, quotaUsage, accountName, accountID, accountUsers, domainName, domainID").appendTo(emailTemplateForm); emailTemplateForm.appendTo(manageTemplatesView); manageTemplatesView.appendTo($node);