Add probe URL to email template context
This commit is contained in:
		
							parent
							
								
									d6ab9a60f1
								
							
						
					
					
						commit
						71db57b2e0
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -221,6 +221,10 @@ class TempmonServerDaemon(Daemon):
 | 
			
		|||
            if (self.now - probe.status_changed) <= timeout:
 | 
			
		||||
                return
 | 
			
		||||
 | 
			
		||||
        # determine URL for probe, if possible
 | 
			
		||||
        url = self.config.get('tailbone', 'url.tempmon.probe', default='#')
 | 
			
		||||
        data['probe_url'] = url.format(uuid=probe.uuid)
 | 
			
		||||
 | 
			
		||||
        since = localtime(self.config, probe.status_changed, from_utc=True)
 | 
			
		||||
        data['status_since'] = since.strftime('%I:%M %p')
 | 
			
		||||
        data['status_since_delta'] = humanize.naturaltime(self.now - probe.status_changed)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue