@@ -676,7 +674,7 @@ function cloud_metering_mail_settings($form, $form_state) {
...
@@ -676,7 +674,7 @@ function cloud_metering_mail_settings($form, $form_state) {
$description=t('Customize the format of the mail that will be sent whenever an instance crosses the cost threshold. The following tokens are available -');
$description=t('Customize the format of the mail that will be sent whenever an instance crosses the cost threshold. The following tokens are available -');
@@ -1029,13 +972,9 @@ function cloud_metering_terminate_budget_crossed_instances($maxed_instances) {
...
@@ -1029,13 +972,9 @@ function cloud_metering_terminate_budget_crossed_instances($maxed_instances) {
else{
else{
_cloud_metering_activity_audit(t('Failed to send notification mail for instance %instance_id.',array('%instance_id'=>$instance_id)),'user_activity','',WATCHDOG_ERROR);
_cloud_metering_activity_audit(t('Failed to send notification mail for instance %instance_id.',array('%instance_id'=>$instance_id)),'user_activity','',WATCHDOG_ERROR);
}
}
}
}
}
}
}
}
}
}
/**
/**
...
@@ -1134,110 +1073,88 @@ function cloud_metering_get_grouped_instances($cloud_context = NULL) {
...
@@ -1134,110 +1073,88 @@ function cloud_metering_get_grouped_instances($cloud_context = NULL) {
if(!empty($account->roles)&&user_access('configure user budget')){
if(user_access('configure user budget')){
foreach($account->rolesas$rid=>$role){
if($role!='authenticated user'){
break;
}
}
if(!empty($rid)){
if(!empty($rid)){
$edit_link=l(t('Edit user budget'),'admin/config/cloud_metering/group_settings/'.$rid.'/edit');
$edit_link=l(t('Edit user budget'),'admin/config/cloud_metering/group_settings/'.$rid.'/edit');
}
}
}
}
$message=filter_xss(t("Instance budget settings not saved due to user's budget constraint. Setting this budget will make the budget allocated to all instances of the user @total; but the user's budget is @user-budget. !edit-link",array('@total'=>$total_budget,'@user-budget'=>$user_budget,'!edit-link'=>$edit_link)));
$message=t("Instance budget settings not saved due to user's budget constraint. Setting this budget will make the budget allocated to all instances of the user @total; but the user's budget is @user-budget. !edit-link",array('@total'=>$total_budget,'@user-budget'=>$user_budget,'!edit-link'=>$edit_link));