show deploy name in flash exception message
This commit is contained in:
parent
40c20abddc
commit
1b3234f49f
2 changed files with 5 additions and 4 deletions
|
@ -195,7 +195,7 @@ def dashboard(user_pid=0):
|
||||||
'type': 'kvm' }
|
'type': 'kvm' }
|
||||||
query = contact_proxmaster(data, 'vmrrd')
|
query = contact_proxmaster(data, 'vmrrd')
|
||||||
if query['status'] == 'UNREACHABLE':
|
if query['status'] == 'UNREACHABLE':
|
||||||
flash('Deploy #{} is unreachable. Support is notified.'.format(str(unit_id)))
|
flash('Deploy #{} is unreachable.'.format(str(unit_id)))
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Deploy {} is unreachable'.format(unit_id),
|
send_email(current_app.config['MAIL_USERNAME'], 'Deploy {} is unreachable'.format(unit_id),
|
||||||
'vmanager/email/adm_unreachable', user=cuser, unit_id=unit_id )
|
'vmanager/email/adm_unreachable', user=cuser, unit_id=unit_id )
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -57,7 +57,7 @@ def dashboard():
|
||||||
query = contact_proxmaster(data, 'vmrrd')
|
query = contact_proxmaster(data, 'vmrrd')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error(e)
|
current_app.logger.error(e)
|
||||||
flash('Support is notified.'.format(str(unit_id)))
|
flash('Support is notified about {}.'.format(str(cuser.inv_deployments.filter_by(machine_id=unit_id).first().machine_alias)))
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
||||||
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
||||||
#current_app.logger.info('debug query:')
|
#current_app.logger.info('debug query:')
|
||||||
|
@ -72,7 +72,8 @@ def dashboard():
|
||||||
statuses.update(status)
|
statuses.update(status)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.error(e)
|
current_app.logger.error(e)
|
||||||
flash('Support is notified.'.format(str(unit_id)))
|
#flash('Support is notified.'.format(str(unit_id)))
|
||||||
|
flash('Support is notified about {}.'.format(str(cuser.inv_deployments.filter_by(machine_id=unit_id).first().machine_alias)))
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
||||||
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue